<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><P>Thanks a lot. Its working now.</P>
<P>It had to be like:</P>
<P>if(avp_check("$avp(i:103)", "eq/i:0/g")) {</P>
<P>&nbsp;&nbsp;&nbsp; do certain things</P>
<P>} else {</P>
<P>&nbsp;&nbsp;&nbsp; do certain things</P>
<P>}</P>
<P>&nbsp;</P>
<P>w/regards,</P>
<P>Jayesh</P>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Bogdan-Andrei Iancu &lt;bogdan@voice-system.ro&gt;<BR>To: Jayesh Nambiar &lt;voip_freak@yahoo.co.in&gt;<BR>Cc: openser &lt;users@openser.org&gt;<BR>Sent: Friday, 28 December, 2007 2:54:17 PM<BR>Subject: Re: [OpenSER-Users] ERROR:avpops:check_avp: value types don't match<BR><BR>Hi Jayesh,<BR><BR>try to use the avp_print() debug function to see what avps you have <BR>loaded after the avp_db_query() and check the type. Note you need to use <BR>debug=6 .<BR><BR><A href="http://www.openser.org/docs/modules/1.3.x/avpops..html#AEN611" target=_blank>http://www.openser.org/docs/modules/1.3.x/avpops.html#AEN611</A><BR><BR>regards,<BR>bogdan<BR><BR>Jayesh Nambiar wrote:<BR>&gt; Hi All,<BR>&gt; I am using the function avp_db_query to query a table and fetch few <BR>&gt; values. The query is as follows:<BR>&gt; "select subscriptionid, ip,
 media_status from domestic where <BR>&gt; prefix=$rU", "$avp(i:101), $avp(i:102), $avp(i:103)".<BR>&gt;&nbsp; <BR>&gt; Now the media_status column is a column with datatype as integer which <BR>&gt; will contain either 0 or 1. I need to check the value in this column <BR>&gt; so I use the following:<BR>&gt;&nbsp; <BR>&gt; if(avp_check("$avp(i:103)", "eq/0/i")) {<BR>&gt;&nbsp; &nbsp; do certain things;<BR>&gt; } else {<BR>&gt;&nbsp; &nbsp; do certain things;<BR>&gt; };<BR>&gt;&nbsp; <BR>&gt; Even when the value at media_status column is 0 it does not get into <BR>&gt; that condition, it always executes the else condition and I see the <BR>&gt; following in the logs:<BR>&gt; ERROR:avpops:check_avp: value types don't match<BR>&gt;&nbsp; <BR>&gt; Can someone please help me to overcome this error. When I keep the <BR>&gt; datatype of media_status column as varchar it works fine, but I dont <BR>&gt; want to do that as that column is going to conatin only
 integer values.<BR>&gt;&nbsp; <BR>&gt; Thanks in advance.<BR>&gt;&nbsp; <BR>&gt; w/regards,<BR>&gt; Jayesh<BR>&gt;&nbsp; <BR>&gt;<BR>&gt; ------------------------------------------------------------------------<BR>&gt; Forgot the famous last words? Access your message archive online. <BR>&gt; Click here. <BR>&gt; &lt;<A href="http://in.rd.yahoo.com/tagline_webmessenger_4/*http://in.messenger.yahoo.com/webmessengerpromo.php" target=_blank>http://in.rd.yahoo.com/tagline_webmessenger_4/*http://in.messenger.yahoo.com/webmessengerpromo.php</A>&gt; <BR>&gt;<BR>&gt; ------------------------------------------------------------------------<BR>&gt;<BR>&gt; _______________________________________________<BR>&gt; Users mailing list<BR>&gt; <A href="mailto:Users@lists.openser.org" ymailto="mailto:Users@lists.openser.org">Users@lists.openser.org</A><BR>&gt; <A href="http://lists.openser.org/cgi-bin/mailman/listinfo/users"
 target=_blank>http://lists.openser.org/cgi-bin/mailman/listinfo/users</A><BR>&gt;&nbsp; <BR><BR></DIV><BR></DIV></div><br>


      <!--5--><hr size=1></hr> Get the freedom to save as many mails as you wish. <a href="http://in.rd.yahoo.com/tagline_mail_5/*http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/">Click here to know how.</a></body></html>