[svn-commits] mjordan: trunk r400772 - in /trunk: ./ res/res_pjsip_header_funcs.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Oct 8 17:59:34 CDT 2013


Author: mjordan
Date: Tue Oct  8 17:59:32 2013
New Revision: 400772

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400772
Log:
Add PJSIP_HEADER function for manipulation of SIP headers in the PJSIP stack

This patch adds support to the PJSIP stack in Asterisk for SIP header
manipulation. Note that this is analagous to SIPAddHeader/SIPRemoveHeader.

For PJSIP_HEADER, an incoming supplemental session callback is registered that
takes the pjsip_hdrs from the incoming session and stores them in a linked
list in the session datastore.  Calls to PJSIP_HEADER traverse over the list
and return the nth matching header where 'n' is the 'number' argument to the
function.

When adding a header, the first call creates a datastore and linked list and
adds the datastore to the session.  The header is then created as a pjsip_hdr
and added to the list.  An outgoing supplemental session callback then
traverses the list and adds the headers to the outgoing pjsip_msg.

When removing a header, the list created with PJSIP_HEADER(add,...) is
traversed and all matching entries are removed.

(closes issue ASTERISK-22498)
Reported by: George Joseph
patch:
  res_pjsip_header_funcs_v1.patch uploaded by george.joseph (License 6322)
........

Merged revisions 400771 from http://svn.asterisk.org/svn/asterisk/branches/12

Added:
    trunk/res/res_pjsip_header_funcs.c
      - copied unchanged from r400771, branches/12/res/res_pjsip_header_funcs.c
Modified:
    trunk/   (props changed)

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.




More information about the svn-commits mailing list