[asterisk-dev] [Code Review] 3514: res_pjsip_refer: Add Referred-By header on INVITE for blind transfers.

rmudgett reviewboard at asterisk.org
Fri May 2 11:20:34 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3514/
-----------------------------------------------------------

(Updated May 2, 2014, 11:20 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 5014


Bugs: ASTERISK-23501
    https://issues.asterisk.org/jira/browse/ASTERISK-23501


Repository: Asterisk


Description
-------

Per rfc3892, the Referred-By header in a REFER must be copied into the referenced request (IE. The outgoing INVITE to the transfer target).

* Automatically put the Referred-By header in the outgoing INVITE message if the SIPREFERREDBYHDR channel variable is defined with a value.

* Made chan_sip.c:get_refer_info() set SIPREFERREDBYHDR for inheritance so chan_pjsip has a better chance to interoperate.

* Fixed refer_blind_callback() and refer_incoming_refer_request() to not modify the data in the pointer returned by pjsip_msg_find_hdr_by_name().  It seems wrong to modify that data since the calling routine doesn't own the buffer.


Diffs
-----

  /branches/12/res/res_pjsip_refer.c 413157 
  /branches/12/channels/chan_sip.c 413157 

Diff: https://reviewboard.asterisk.org/r/3514/diff/


Testing
-------

The testsuite/tests/channels/pjsip/transfers/blind_transfer/caller_refer_only test now passes with this patch and the minor modification to allow SIPREFERREDBYHDR to have the optional inheritance '_' prefixes added.

Index: tests/channels/pjsip/transfers/blind_transfer/caller_refer_only/test-config.yaml
===================================================================
--- tests/channels/pjsip/transfers/blind_transfer/caller_refer_only/test-config.yaml	(revision 5006)
+++ tests/channels/pjsip/transfers/blind_transfer/caller_refer_only/test-config.yaml	(working copy)
@@ -104,7 +104,7 @@
                 match:
                     Event: 'VarSet'
                     Channel: 'PJSIP/bob-.{8}'
-                    Variable: 'SIPREFERREDBYHDR'
+                    Variable: '_{0,2}SIPREFERREDBYHDR'
                     Value: 'alice <sip:alice at 127.0.0.1>'
             count: 2
         -
@@ -112,7 +112,7 @@
             conditions:
                 match:
                     Event: 'VarSet'
-                    Variable: 'SIPREFERTOHDR'
+                    Variable: '_{0,2}SIPREFERTOHDR'
                     Value: 'sip:charlie at 127.0.0.1'
             count: 2
         -


Thanks,

rmudgett

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140502/0d218d10/attachment-0001.html>


More information about the asterisk-dev mailing list