feat: Add BroadSoft Access-Side Extensions Support (Auto-Answer and Remote Control) #1118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for BroadSoft Access-Side Extensions, implementing two key features:
Call-Infoheader withanswer-afterparameterEvent: talkChanges
Core API (
src/api/broadsoft/)auto-answer.ts- Auto-answer logic for Call-Info header parsing and delayed answeringcall-info-parser.ts- Parser for Call-Info header with answer-after parameterremote-control.ts- Handler for remote control NOTIFY events (talk/mute)types.ts- TypeScript types and enums for BroadSoft extensionsindex.ts- Public API exports with helper functionsDemo Application
demo/demo-broadsoft.html- Interactive demo UI for testing BroadSoft extensionsdemo/demo-broadsoft.ts- Full-featured demo implementation with FreeSWITCH integrationdemo/demo-broadsoft.css- Styled UI for demo applicationTests
test/spec/api/broadsoft/auto-answer.spec.ts- Unit tests for auto-answer functionalitytest/spec/api/broadsoft/call-info-parser.spec.ts- Unit tests for Call-Info header parsingtest/spec/api/broadsoft/remote-control.spec.ts- Unit tests for remote control eventsDocumentation
src/api/broadsoft/README.md- Comprehensive API documentation with usage examplesexamples/broadsoft-extensions.ts- Code examples demonstrating integrationintegration-tests/FREESWITCH.md- FreeSWITCH integration testing guideintegration-tests/README.md- General integration testing documentationFeatures
Auto-Answer
Call-Info: <sip:domain>; answer-after=Nheader from incoming INVITEshouldAutoAnswer(),getAutoAnswerDelay(),handleAutoAnswer()Remote Control
Event: talkisBroadSoftNotification(),handleRemoteControlNotification()Testing
Run the test suite: