[OpenSIPS-Users] pjsip patch supporting sip 3xx embedded headers

Di-Shi Sun di-shi.sun at transnexus.com
Tue Apr 26 13:01:25 UTC 2022


I committed a pjsip patch pull request in pjsip project to support SIP 3xx embedded header. It inserts stand-alone SIP headers based on SIP 3xx Contact header URI header parameters into the redirect SIP INVITE messages. It is a common feature supported by any SIP implementations, such as Metaswitch, Oracle SBC, Ribbon, etc. It should solve the issue that it is difficult to pass useful information using SIP 3xx in Asterisk. If anybody wants to try, the patch link is attached.


To use this patch, please follow the steps

  1.  Download Asterisk 18 source code
  2.  Run “./configure --with-pjproject-bundled --with-jansson-bundled”.
  3.  Apply the patch to ./third-party/pjproject/source/pjsip/src/pjsip-ua/sip_inv.c
  4.  Build/install/run Asterisk
  5.  In pjsip.conf, the redirect server endpoint should be configured with “redirect_method=uri_pjsip”
  6.  When the redirect server returns a SIP 3xx with Contact header, say “Contact: <sip:xxxxxxxxxxx at a.b.c.d?Test=test>;q=0.99”, the redirected SIP INVITE message should contain “Test: test” header.

Please me know if you have any questions.


Di-Shi Sun.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20220426/ae310730/attachment-0001.html>

More information about the Users mailing list