Bogdan,<div>But I did:</div><div>do_routing("$(avp(s:routegroup){<a href="http://s.int">s.int</a>})") </div><div><br></div><div>as well. Shouldn't that have worked?</div><div><br>maybe I need to:</div><div>$avp(s:routegroup) = $(avp(s:group_temp){<a href="http://s.int">s.int</a>});<br>
<div class="gmail_quote"><div>do_routing("$avp(s:routegroup)")</div></div><div class="gmail_quote"><br></div><div class="gmail_quote">What do you think?</div><div class="gmail_quote">Thanks,</div><div class="gmail_quote">
-Brett</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, May 22, 2009 at 11:13 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Brett,<br>
<br>
A simple answer - the cache works only for strings, so it is not able to store numerical values (only in string representation) .<br>
<br>
Before do_routing(), try to do avp_print() to get the list with AVPS., types and vals - just to double check.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Brett Nemeroff wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hey All,<br>
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:<br>
cache_fetch("local","trunk2group_$si",$avp(s:group_temp))<br>
<br>
Then for scripting reasons (I promise, there is a good reason) I do:<br>
$avp(s:routegroup) = $avp(s:group_temp);<br>
<br>
Then I pass it to do_routing like:<br>
do_routing("$avp(s:routegroup)");<br>
<br>
and then I get:<br>
ERROR:drouting:do_routing: failed to get group id <br>
I've printed out the value of $avp(s:routegroup) and it's perfectly valid.. <br>
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).<br>
<br>
<br>
So any idea what the problem might be? I've tried casting to int ie:<br></div>
do_routing("$(avp(s:routegroup){<a href="http://s.int" target="_blank">s.int</a> <<a href="http://s.int" target="_blank">http://s.int</a>>}))<div class="im"><br>
<br>
but that doesn't seem to make anything better.<br>
<br>
any ideas? Right now I'm having to bypass my cache or it just won't work.<br>
<br>
Thanks,<br>
Brett<br>
<br></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>