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