[OpenSIPS-Users] prioritizing branches by usrloc flag

Tito Cumpen tito at xsvoce.com
Tue Jul 7 11:14:55 CEST 2015


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>
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 Developerhttp://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 listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150707/6cab04ef/attachment.htm>


More information about the Users mailing list