Hi all,
I just found the problem ;-)

The column in ported table was BIGINT but sqlops and avops take only string or int. I changed the colunm id table from BIGINT to INT and everything works fine!
kamailio Rock's!!

Alex



On Mon, Dec 21, 2009 at 8:17 PM, alex pappas <rebel.pappas@gmail.com> wrote:
Hi Alex,

I tried :

if(!is_avp_set("$avp(s:lnp_prefix)")){
                                xlog("alx ------- The new rU $rU with prefix $avp(s:lnp_prefix)  return code:$retcode ----------");
                        }

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..

Any comments about the sqlops ?

Thank

Alex




On Mon, Dec 21, 2009 at 6:37 PM, Alex Balashov <abalashov@evaristesys.com> wrote:
Alex,

Try:  if(is_avp_set("$avp(s:lnp_prefix)"))

--
Sent from mobile device


On Dec 21, 2009, at 11:19 AM, alex pappas <rebel.pappas@gmail.com> wrote:

Hi all,

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.

modparam("avpops", "db_url","mysql://openser:openserrw@localhost/openser")

avp_db_query("SELECT prefix FROM ported WHERE phonenumber='$rU'","$avp(s:lnp_prefix)")  ;The query run perfectly in command line.

The return code is always 1 but when I print $avp(s:lnp_prefix) I get no result.

I have 2 questions :

1. Which is the best way to check portability in my case
2. What I'm doing wrong and I'm not getting any result from the query.

Thank you ALL

Alex


_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users