[Home]

Summary:ASTERISK-13372: [patch] SIPRemoveHeader() function to remove previously added headers
Reporter:klaus3000 (klaus3000)Labels:
Date Opened:2009-01-15 03:25:38.000-0600Date Closed:2009-01-15 07:37:47.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 2patch_chan_sip_SIPRemoveHeader_1.4.22.txt
( 1) 2patch_chan_sip_SIPRemoveHeader_trunk.txt
Description:Hi!

This new application removes either all or selcted SIPADDHEADER channel variables. This allows you to remove previously addeded headers - selectivly or all.

Patches included for trunk and 1.4.22. 1.4.22 is tested, trunk version compiles fine, is untested but should work fine too.


****** ADDITIONAL INFORMATION ******

core show application SIPRemoveHeader
gw*CLI>
 -= Info about application 'SIPRemoveHeader' =-

[Synopsis]
Remove SIP headers previously added with SIPAddHeader

[Description]
 SIPRemoveHeader()
SIPRemoveHeader() allows you to remove headers which were previously
added with SIPAddHeader(). If no parameter is supplied, all previously
added headers will be removed. If a parameter is supplied, only the matching
headers will be removed.

For example you have added these 2 headers:
 SIPAddHeader(P-Asserted-Identity: sip:foo@bar);
 SIPAddHeader(P-Preferred-Identity: sip:bar@foo);

 // remove all headers
 SIPRemoveHeader();

 // remove all P- headers
 SIPRemoveHeader(P-);

 // remove one the PAI header (note the : at the end)
 SIPRemoveHeader(P-Asserted-Identity:);

Always returns 0
Comments:By: klaus3000 (klaus3000) 2009-01-15 03:31:09.000-0600

please remove the first two patches (without 2 at the beginning) - I fixed a typo

By: Olle Johansson (oej) 2009-01-15 07:33:00.000-0600

I would suggest that the help text explains the matching a bit better...

By: Digium Subversion (svnbot) 2009-01-15 07:35:51.000-0600

Repository: asterisk
Revision: 168638

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r168638 | oej | 2009-01-15 07:35:51 -0600 (Thu, 15 Jan 2009) | 8 lines

Add capability to remove added SIP headers *before* INVITE is generated.

(closes issue ASTERISK-13372)
Reported by: klaus3000
Patches:
     2patch_chan_sip_SIPRemoveHeader_trunk.txt uploaded by klaus3000 (license 65)


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168638

By: Digium Subversion (svnbot) 2009-01-15 07:37:47.000-0600

Repository: asterisk
Revision: 168639

U   trunk/CHANGES
U   trunk/CREDITS

------------------------------------------------------------------------
r168639 | oej | 2009-01-15 07:37:46 -0600 (Thu, 15 Jan 2009) | 3 lines

Related to issue ASTERISK-13372
Update changes for SIPRemoveHeader()

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=168639