[OpenSER-Users] ERROR:avpops:check_avp: value types don't match

Jayesh Nambiar voip_freak at yahoo.co.in
Sat Dec 29 09:58:48 CET 2007


Thanks a lot. Its working now.
It had to be like:
if(avp_check("$avp(i:103)", "eq/i:0/g")) {
    do certain things
} else {
    do certain things
}

w/regards,
Jayesh



----- Original Message ----
From: Bogdan-Andrei Iancu <bogdan at voice-system.ro>
To: Jayesh Nambiar <voip_freak at yahoo.co.in>
Cc: openser <users at openser.org>
Sent: Friday, 28 December, 2007 2:54:17 PM
Subject: Re: [OpenSER-Users] ERROR:avpops:check_avp: value types don't match

Hi Jayesh,

try to use the avp_print() debug function to see what avps you have 
loaded after the avp_db_query() and check the type. Note you need to use 
debug=6 .

http://www.openser.org/docs/modules/1.3.x/avpops.html#AEN611

regards,
bogdan

Jayesh Nambiar wrote:
> Hi All,
> I am using the function avp_db_query to query a table and fetch few 
> values. The query is as follows:
> "select subscriptionid, ip, media_status from domestic where 
> prefix=$rU", "$avp(i:101), $avp(i:102), $avp(i:103)".
>  
> Now the media_status column is a column with datatype as integer which 
> will contain either 0 or 1. I need to check the value in this column 
> so I use the following:
>  
> if(avp_check("$avp(i:103)", "eq/0/i")) {
>    do certain things;
> } else {
>    do certain things;
> };
>  
> Even when the value at media_status column is 0 it does not get into 
> that condition, it always executes the else condition and I see the 
> following in the logs:
> ERROR:avpops:check_avp: value types don't match
>  
> Can someone please help me to overcome this error. When I keep the 
> datatype of media_status column as varchar it works fine, but I dont 
> want to do that as that column is going to conatin only integer values.
>  
> Thanks in advance.
>  
> w/regards,
> Jayesh
>  
>
> ------------------------------------------------------------------------
> Forgot the famous last words? Access your message archive online. 
> Click here. 
> <http://in.rd.yahoo.com/tagline_webmessenger_4/*http://in.messenger.yahoo.com/webmessengerpromo.php> 
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>


      Get the freedom to save as many mails as you wish. To know how, go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20071229/e5aa5cbb/attachment.htm 


More information about the Users mailing list