Generic INVITE dialog NOTIFY as basis for talk & hold NOTIFY #748
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.
This PR is about implement support for talk and hold NOTIFY in a generic way.
Talk and hold NOTIFY are SIP NOTIFYs that are sent on a INVITE dialog. It's based on a specification originally written by Broadsoft and now maintained by Cisco.
It is a de-facto industry standard which has been implemented by several more PBX manufacturers and is based on RFC 3265.
A detailed feature explanation can be found in the specification SIPAccessSideExtensionsInterfaceSpec sections 6 and 7: https://pubhub.devnetcloud.com/media/broadsoft-docs/docs/pdf/BW-SIPAccessSideExtensionsInterfaceSpec.pdf
The change in this pull request allows the user to set an Allow-Events SIP header for a list (string array) of NOTIFY events.
This can be set:
If a list of events is provided JsSIP will attach an Allow-Events SIP header to the initial INVITE and its responses 180 Ringing and 200 Ok (depending on incoming or outgoing call).
The Allow-Events header is only added in the initial request/response which is in accordance with RFC 3265 section 3.3.7.
If a NOTIFY request is received JsSIP will check if the client registered for events of the same type and if yes emit a 'newNotify' event and respond with 200 Ok.
I have tested this change on one of my PBXes by setting the appropriate events and verified that JsSIP correctly handles the corresponding NOTIFYs.