[Home]

Summary:ASTERISK-02797: [patch] SipAddHeader() Application
Reporter:Olle Johansson (oej)Labels:
Date Opened:2004-11-12 10:09:25.000-0600Date Closed:2008-01-15 15:15:29.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) sipaddheader.txt
Description:* Changing the variable named "type" to "channeltype"
* Adding app sipaddheader to add any SIP header to outgoing INVITE.


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

Disclaimer on file.
This patch was taken from chan_sip2.
Comments:By: Olle Johansson (oej) 2004-11-13 04:44:02.000-0600

Small change to get the code more in line with recent changes.

By: twisted (twisted) 2004-11-17 23:11:55.000-0600

oej, you are pure evil :)

By: Mark Spencer (markster) 2004-11-17 23:27:22.000-0600

This application gives me heartburn.  Why are we having to add applications to set/retrieve SIP headers??

By: Olle Johansson (oej) 2004-11-18 02:29:49.000-0600

Markster: There is a lot of device/supplier-specific headers that people want to use in their SIP network. Look at the patch you made the other day for a SNOM specific header - we can't go on adding code in chan_sip for each vendor/device specific header people want to support. Generic functions make sense.

As an example, if you (for any reason) use SIP between two asterisk servers, you can now send accountcode information between them...

Find me on IRC to discuss this. A lot of people have asked me for a port of this from chan_sip2 to chan_sip, specificly on the SIP breakout session at Astricon.

By: tbclark (tbclark) 2004-11-18 08:05:49.000-0600

I find this application invaluable and was very excited to see it moved from sip2.  I use it to collect AlertInfo headers that contain distinctive ring information.

By: khb (khb) 2004-11-18 10:51:43.000-0600

I think the idea to add headers is good.  It's the whole idea of SIP and the text based signalling that you can easily customize and enhance the protocol for specific purposes by adding headers.
However, the implementation could be better.  The code modifies the internal API, adding parameters in specific procedures. The changes should be transparent. This is what the pvt  is for.  Create storage/flags in the pvt and populate it in sipaddheader,
then any routine that needs to have access, can get it without API changes during the entire lifetime of the dialog.

edited on: 11-18-04 10:54

edited on: 11-18-04 13:15

By: Brian West (bkw918) 2004-11-18 15:08:10.000-0600

Also guys

sip.conf:

[bob]
type=user
setvar=_ALERT_INFO=blah
setvar=SIPADDHEADER=X-blah: blah

That can be done now if this patch is applied:P  Since the setvar stuff was added to chan_sip/iax2 a few days back.

bkw

bkw

By: Mark Spencer (markster) 2004-12-02 18:46:40.000-0600

Added to CVS, thanks!

By: Russell Bryant (russell) 2004-12-02 19:13:52.000-0600

not in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:15:29.000-0600

Repository: asterisk
Revision: 4373

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r4373 | markster | 2008-01-15 15:15:29 -0600 (Tue, 15 Jan 2008) | 2 lines

Add nasty "AddSIPHeader" application (bug ASTERISK-2797)

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

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