Skip to content
Snippets Groups Projects

Add support for Session-ID header, REF 14596

Merged Grzegorz Sluja requested to merge add_session_id_header into asterisk_rdkb
1 unresolved thread

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Grzegorz Sluja marked this merge request as ready

    marked this merge request as ready

  • requested review from @iryna.antsyferova

  • assigned to @Yalu

  • Looks good to me

  • It is not easy to review the patch format without applying it locally. :smile: You basically add a new parameter param_session_id to the API pjsip_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?

    • Author Maintainer

      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 Sluja
    • Thanks 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
    • Please register or sign in to reply
  • Yalu Zhang added 4 commits

    added 4 commits

    Compare with previous version

  • merged

Please register or sign in to reply
Loading