SIP read only and writable variables
Hi, how could I know which variables related to SIP are writable variables and which ones just read variables? For example, I'm trying to set the From domain and User-Agent in leg B by doing: <action application="bridge" data="{sip_invite_domain=${sip_from_host},sip_user_agent=CUSTOM}sofia/gateway/gw1/xxx@xxxxxx.xxx"/> Unfortunatelly just the From domain is set while the User-Agent remains the value in 'user-agent-string' of the Sofia profile. -- Iñaki Baz Castillo
Setting the user_agent isn't supported like that. You set it on the profile itself. /b On Nov 24, 2008, at 3:21 AM, Iñaki Baz Castillo wrote:
Hi, how could I know which variables related to SIP are writable variables and which ones just read variables? For example, I'm trying to set the From domain and User-Agent in leg B by doing:
<action application="bridge" data="{sip_invite_domain=${sip_from_host},sip_user_agent=CUSTOM}sofia/gateway/gw1/xxx@xxxxxx.xxx "/>
Unfortunatelly just the From domain is set while the User-Agent remains the value in 'user-agent-string' of the Sofia profile.
El Lunes, 24 de Noviembre de 2008, Brian West escribió:
Setting the user_agent isn't supported like that. You set it on the profile itself.
Thanks, that's exactly the reason why I ask for a document in which it's explained which variables are read only and which ones allow writting. -- Iñaki Baz Castillo
El Lunes, 24 de Noviembre de 2008, Brian West escribió:
You can set them to anything you want but they won't have any effect.
Well, I think I'm asking for something useful. Of course I can set any variable with useless result but... I would like to contribute in the Wiki by explaining which variables allow writting (and have effect on leg B after "export" app), but I hope I won't need to try all of them one by one. Regards. -- Iñaki Baz Castillo
Its not a matter of writable. They all are. The code just doesn't look at them if you happen to change them. /b On Nov 24, 2008, at 7:32 AM, Iñaki Baz Castillo wrote:
Well, I think I'm asking for something useful. Of course I can set any variable with useless result but... I would like to contribute in the Wiki by explaining which variables allow writting (and have effect on leg B after "export" app), but I hope I won't need to try all of them one by one.
Regards.
On Nov 24, 2008, at 8:32 AM, Iñaki Baz Castillo wrote:
El Lunes, 24 de Noviembre de 2008, Brian West escribió:
You can set them to anything you want but they won't have any effect.
Well, I think I'm asking for something useful. Of course I can set any variable with useless result but... I would like to contribute in the Wiki by explaining which variables allow writting (and have effect on leg B after "export" app), but I hope I won't need to try all of them one by one.
The quickest and easiest way to get this list would be to start with a nearly complete list of vars we set by routing a sip call to the info app and recording all the sip_* variables listed. To get a list of vars we look for you can grep mod_sofia for switch_channel_get_variable. Please note we use #defines for some of the var names, so if they are all caps without quotes you will need to find the define. This should get you 95% of the way. Mike
participants (3)
-
Brian West
-
Iñaki Baz Castillo
-
Michael Jerris