Perfect... Thank you very much. <div><br></div><div>BTW, Is this true for many modules? That'd be good to include in the transformation docs.</div><div><br><br><div class="gmail_quote">On Fri, May 22, 2009 at 11:20 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>
do_routing expects a simple AVP (without transformation), the first format will not help, but the second should<div class="im"><br>
<br>
Regards,<br>
Bogdan<br>
<br>
Brett Nemeroff wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Bogdan,<br>
But I did:<br>
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>>})") <br><div class="im">
as well. Shouldn't that have worked?<br>
<br>
maybe I need to:<br></div>
$avp(s:routegroup) = $(avp(s:group_temp){<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>
do_routing("$avp(s:routegroup)")<br>
<br>
What do you think?<br>
Thanks,<br>
-Brett<br>
<br></div><div><div></div><div class="h5">
On Fri, May 22, 2009 at 11:13 AM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>> wrote:<br>
<br>
Hi Brett,<br>
<br>
A simple answer - the cache works only for strings, so it is not<br>
able to store numerical values (only in string representation) .<br>
<br>
Before do_routing(), try to do avp_print() to get the list with<br>
AVPS., types and vals - just to double check.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Brett Nemeroff wrote:<br>
<br>
Hey All,<br>
I've got this problem, that I imagine has something to do with<br>
datatypes. So I pull from cache (cache_fetch) the group_id to<br>
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)<br>
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<br>
perfectly valid..<br>
So I take my cache bits out, and instead I populate<br>
$avp(s:group_temp) direct from avp_db_query. The field comes<br>
from MySQL and is an int(11). This works perfectly every time<br>
(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<br>
int ie:<br>
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>><br>
<<a href="http://s.int" target="_blank">http://s.int</a>>}))<br>
<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<br>
won't work.<br>
<br>
Thanks,<br>
Brett<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br></div></div>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>><div class="im"><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>
<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br></div>