Add support for Session-ID header, REF 14596
According to RFC7329 there is a need for having a globally unique session identifier for the same SIP session that can be consistently maintained across SIP Proxies. There is a Call-ID header value already as a globally unique identifier but in practice it is often changed by SIP Back-to-Back User Agents. Therefore in order to provide an identifier that will not be modified/replaced by B2BUAs a new SIP header "Session-ID" is added.
The general concept of "Session-ID" header is that the UAC generating an out-of-dialog request generates a new, unique value that remains constant for the duration of the transaction, any dialog created from that request or for a registration.
Merge request reports
Activity
requested review from @iryna.antsyferova
assigned to @Yalu
It is not easy to review the patch format without applying it locally.
You basically add a new parameterparam_session_id
to the APIpjsip_endpt_create_request
. If this parameter is NULL, a unique value will be generated by the API. Otherwise the input parameter with value will be used.In most cases, NULL is passed for this parameter. But in some cases, a non-null parameter is passed. Could you please explain why such a difference is needed?
Generally the definition of session-id is very similar as call-id. It should be an unique value which is maitained during the dialog. Thats why the new unique value for session-id is generated when it has to be created, in other cases where the outgoing request is being sent in the same dialog the session-id is reused. From my understanding we should behave with session-id the same as with call-id, just it should be an other value which is needed since call-id is sometimes edited by the sip server (please see my description in the commit message). Since the call-id is added in pjproject I looked for each place where the call-id is generated and did the same thing for session-id.
I gave the image to Michael, He tested it with DT Sip Server and from his tests it seems to work ok:
[12:12 PM] Michael Gustavsson As far as I can tell, session-id handling is defined in Annex A of TR-114 AnnexB, and based on the logs, all looks fine. So this is great.
Edited by Grzegorz SlujaThanks for your explanation and it is reasonable.
Regarding Call-Id being modified by proxy servers, it shall only happen by back-to-back user agent (it is called B2BUA sometimes). It is briefly described as below. B2BUA actually has two calls, one call with the caller and another call with callee. In this scenario, the Call-Id seen from the called party won't be the same as the value from the caller party. But Session-Id would be the same.
INVITE with Call-Id(original) from the call originator | B2BUA generates a new INVITE with a new Call-Id for a new session/dialog/call | new INVITE to the called party
added 4 commits
-
e61c01ff...ba91ea97 - 3 commits from branch
asterisk_rdkb
- fb69364d - Add support for Session-ID header, REF 14596
-
e61c01ff...ba91ea97 - 3 commits from branch