[OpenSIPS-Users] prioritizing branches by usrloc flag

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Jul 7 13:01:46 CEST 2015


Hi Tito,

Try $(branch(uri)[x]{uri.transport}) to get the transport param from the 
URI.

Or, look into the $(branch(socket)[x]{s.select,0,:}) - the proto of the 
sending socket.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.07.2015 12:14, Tito Cumpen wrote:
> Bogdan,
>
>
> Thanks for your reply. These variables seem like a step in the right 
> direction although it raises another question as to how to access the 
> branches and check the destination proto. How does one access the 
> array of branches? Would they have to be casted and lopped and checked 
> against a regex? *dP seems to provide the proto but what would be 
> provided in the case of various destination protos as in the case of 
> sip and ws?*
> *
> *
> *
> *
> *Thanks,*
> *Tito*
>
> On Thu, Jul 2, 2015 at 9:31 AM, Bogdan-Andrei Iancu 
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
>     Hi Tito,
>
>     The registrar module (responsible for extracting the contacts from
>     SIP msg and storing into USRLOC) takes the q value from the
>     Contact header (as SIP RFC requires).
>     Currently there is no way to change the q value (from script
>     level) before saving into USRLOC.
>
>     But what you can do is to change the q values after the lookup
>     (when loaded into msg from USRLOC).
>
>     Take a look at branch variable $branch(q) :
>     http://www.opensips.org/Documentation/Script-CoreVar-2-1#toc22
>     and $ru_q (q value for RURI) :
>     http://www.opensips.org/Documentation/Script-CoreVar-2-1#toc77
>
>     and you may change the q values and do a serialize_branches()
>     after that.
>
>     Best regards,
>
>     Bogdan-Andrei Iancu
>     OpenSIPS Founder and Developer
>     http://www.opensips-solutions.com
>
>     On 01.07.2015 19:57, Tito Cumpen wrote:
>>     Group,
>>
>>
>>     Is it possible to set the q value upon registration? I need to
>>     set ws destinations to a lower q value as rtpengine has a
>>     limitation on sending different media params on a per branch
>>     basis in parallel. Or should I loop into the branches with a
>>     certain attribute and order them before serializing them?
>>
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.opensips.org  <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150707/b8488d89/attachment.htm>


More information about the Users mailing list