Hi Alex,<br><br>I tried :<br><br>if(!is_avp_set("$avp(s:lnp_prefix)")){<br> xlog("alx ------- The new rU $rU with prefix $avp(s:lnp_prefix) return code:$retcode ----------");<br>
}<br><br>and it looks like is doing to right thing BUT why I don't see the avp value? I need this value to added in the front of rU as portability prefix..<br><br>Any comments about the sqlops ?<br>
<br>Thank<br><br>Alex<br><br><br><br><div class="gmail_quote">On Mon, Dec 21, 2009 at 6:37 PM, Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Alex,<br>
<br>
Try: if(is_avp_set("$avp(s:lnp_prefix)"))<br>
<br>
--<br>
Sent from mobile device<div><div></div><div class="h5"><br>
<br>
On Dec 21, 2009, at 11:19 AM, alex pappas <<a href="mailto:rebel.pappas@gmail.com" target="_blank">rebel.pappas@gmail.com</a>> wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hi all,<br>
<br>
I'm trying to make an sql query through my kamailio script in order to check for number portability. i have a table with 2 col (phonenumber,prefix). I'm trying both modules avpops and sqlops but I'm not able to retreive any data.<br>
<br>
modparam("avpops", "db_url","mysql://openser:openserrw@localhost/openser")<br>
<br>
avp_db_query("SELECT prefix FROM ported WHERE phonenumber='$rU'","$avp(s:lnp_prefix)") ;The query run perfectly in command line.<br>
<br>
The return code is always 1 but when I print $avp(s:lnp_prefix) I get no result.<br>
<br>
I have 2 questions :<br>
<br>
1. Which is the best way to check portability in my case<br>
2. What I'm doing wrong and I'm not getting any result from the query.<br>
<br>
Thank you ALL<br>
<br>
Alex<br>
<br>
<br></div></div>
_______________________________________________<br>
Kamailio (OpenSER) - Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</blockquote></div><br>