I am guessing you are using the latest trunk version of OpenSIPS since you aren't using s: or i: with your AVP. The older versions don't appear to let you do it so I will upgrade and it should work if you can do it.
<br />
<br />Thanks.
<br />
<br />On Jun 30, 2011 3:19am, Razvan Crainea <razvancrainea@opensips.org> wrote:
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> Hello Duane,
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> Indeed the $(branch(q)[x]) should receive only int values. But
<br />>
<br />> according to your logs, the $avp(s:exten1_q_value) seems to have a
<br />>
<br />> string value.
<br />>
<br />>
<br />> I've just tested the code below and works fine:
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> $avp(q) = 1000;
<br />>
<br />>
<br />> $(branch(q)[0]) = $avp(q);
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> Please double check your AVP really has an integer value and not a
<br />>
<br />> string one (something like "1000").
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> Regards,
<br />>
<br />>
<br />> Razvan Crainea
<br />>
<br />> OpenSIPS Developer
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> On 29.06.2011 19:03, duane.larson@gmail.com wrote:
<br />>
<br />> Would it be possible to allow us to set the
<br />>
<br />> $(branch(q)[x]) with an AVP or Script Variable? Currently when you
<br />>
<br />> try to set the branch q value with an AVP that is an Integer
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> $(branch(q)[1]) = $avp(s:exten1_q_value);
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> I see in syslog that it complains because the value on the right
<br />>
<br />> is not an int. Even though I added the AVP value as an Integer
<br />>
<br />> OpenSIPS doesn't like it. Didn't know if this could be added to
<br />>
<br />> the OpenSIPS 1.7 or a trunk
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> _______________________________________________
<br />>
<br />> Users mailing list
<br />>
<br />> Users@lists.opensips.org
<br />>
<br />> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>