[SR-Users] drouting - do_routing with $avp does not work
Daniel-Constantin Mierla
miconda at gmail.com
Mon Jan 16 09:42:52 CET 2012
Hello,
might be that the drouting module expects the group id avp to hold an
integer, looking at your config snippet, it is string. Try with:
$avp(tdr)=$(avp(dr_attrs){s.int});
Cheers,
Daniel
On 1/15/12 5:11 PM, Uri Shacked wrote:
> Hi,
> this is my cfg:
> if(do_routing("0")){
> $avp(tdr)=$avp(dr_attrs);
> } else {
> $avp(tdr)="1";
> }
> subst_user('/(.*)/$avp(Ssrvindx)/');
> xlog("L_CRIT","$C(rg) group is $avp(tdr)$C(xx)\n");
> if(!do_routing("$avp(tdr)")){
> xlog("L_CRIT","$C(rg)No TDR is found for $avp(DID) with Index
> $avp(Ssrvindx)$C(xx)\n");
> t_reply("404", "Not found");
> exit;
> }
> in the log, i get the following:
> 1(25799) CRITICAL: <script>: group is 8
> 1(25799) ERROR: drouting [drouting.c:706]: failed to get group id
> when i change the do_routing("$avp(tdr)") to do_routing("8"),
> everything works.....
> it looks like with the avp (although it is 8) it does not work.
> any ideas?
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120116/eb4bb8d3/attachment.htm>
More information about the sr-users
mailing list