[Freeswitch-users] adding sip header without X-

Mathieu Rene mrene_lists at avgs.ca
Wed Feb 3 16:28:21 PST 2010


If you look carefully, you'll see that it imports X- headers as  
variables on an incoming invite, but it'll send out sip_h_<anything>  
anyways.

For alert info, FS uses a channel variable called "alert_info", its  
implemented directly, without using sip_h_*.

Mathieu Rene
Avant-Garde Solutions Inc
Office: + 1 (514) 664-1044 x100
Cell: +1 (514) 664-1044 x200
mrene at avgs.ca




On 3-Feb-10, at 7:19 PM, Christian Löschenkohl wrote:

> hello
>
> thank you for your answer
> setting only sip_h_Alert-Info was my first try, didn't work at all
>
> i use trun rev. 16456 in proxy mode - if it helps
> every header i add with X-... shows up in the invite to the sip  
> endpoint (snom phone)
>
> when i read sofia_glue.c i do see the function  
> sofia_glue_set_extra_headers
> which only adds header starting with X- or P- (line 1407 for me)
>
> br
>
> Kristian Kielhofner wrote:
>
>> Hello Christian,
>>
>>  Reading through the code (sofia_glue.c) it looks like all you have
>> to do is set the alert_info channel variable.  I also don't think you
>> have to include the X- when using set with sip_h.  It's just always
>> good (RFC compliant) to prefix "custom" headers with X-.
>>
>>  Regarding my suggestion for that configuration option/channel
>> variable.  That was only to be used on bridged channels to make it
>> configurable which headers FreeSWITCH passes from the a leg to the b
>> leg when using bridge.  A "proper" B2BUA (according to me) should
>> completely rewrite the outgoing INVITE, including stripping any  
>> custom
>> headers.
>>
>> 2010/2/3 Christian Löschenkohl <christian.loeschenkohl at xpirio.com>:
>>> hello
>>>
>>> do anybody know a way to add "Alert-Info: <http:// 
>>> www.notused.com>;info=alert-group;x-line-id=0"
>>> as a custom sip header to the invite message?
>>>
>>> <action application="set" data="sip_h_X-Alert-Info=<http://www.notused.com 
>>> >\;info=alert-internal\;x-line-id=0"/>
>>> works but "X-Alert-Info" as a header isn't usefull at all
>>>
>>> the purpose is to distinguish internal and external calls in a  
>>> pbx. it is also described here
>>> http://wiki.snom.com/Web_Interface/V7/Preferences/Alert-Info_Ringer
>>>
>>> there was also a posting on the list by Kristian Kielhofner who  
>>> suggested a very flexible solution
>>>
>>> -----
>>> mail from: 2009-10-09 21:10
>>>
>>> 2)  Make the behavior configurable with a channel variable and/or
>>>    sofia config option: {sip_pass_headers=all|none|X- 
>>> MyCustomHeaderByName}
>>> -----
>>>
>>> br
>>>
>>>
>>> --
>>> Ing. Christian Löschenkohl
>>> Technische Leitung, Forschung & Entwicklung VoIP
>>>
>>> xpirio
>>> Telekommunikation & Service GmbH
>>> Lakeside B04
>>> 9020 Klagenfurt
>>> Austria
>>>
>>> T  +43 (0) 5 77 11 - 1000
>>> F  +43 (0) 5 77 11 - 1002
>>> E  christian.loeschenkohl at xpirio.com
>>>
>>> _______________________________________________
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>
>>
>>
>
>
> -- 
> Ing. Christian Löschenkohl
> Technische Leitung, Forschung & Entwicklung VoIP
>
> xpirio
> Telekommunikation & Service GmbH
> Lakeside B04
> 9020 Klagenfurt
> Austria
>
> T  +43 (0) 5 77 11 - 1000
> F  +43 (0) 5 77 11 - 1002
> E  christian.loeschenkohl at xpirio.com
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org





More information about the FreeSWITCH-users mailing list