[OpenSIPS-Users] memcache -> avp -> drouting failure

Brett Nemeroff brett at nemeroff.com
Fri May 22 17:17:52 CEST 2009


Hey All,I've got this problem, that I imagine has something to do with
datatypes. So I pull from cache (cache_fetch) the group_id to pass to
drouting kinda like:
cache_fetch("local","trunk2group_$si",$avp(s:group_temp))

Then for scripting reasons (I promise, there is a good reason) I do:
$avp(s:routegroup) = $avp(s:group_temp);

Then I pass it to do_routing like:
do_routing("$avp(s:routegroup)");

and then I get:
ERROR:drouting:do_routing: failed to get group id

I've printed out the value of $avp(s:routegroup) and it's perfectly valid..

So I take my cache bits out, and instead I populate $avp(s:group_temp)
direct from  avp_db_query. The field comes from MySQL and is an int(11).
This works perfectly every time (and returns the same value (which is the
number 5).


So any idea what the problem might be? I've tried casting to int ie:
do_routing("$(avp(s:routegroup){s.int}))

but that doesn't seem to make anything better.

any ideas? Right now I'm having to bypass my cache or it just won't work.

Thanks,
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090522/37b9b7ac/attachment.htm 


More information about the Users mailing list