<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"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Thanks, but when I try that, I get the following error from openser:<br>
<br>
Nov&nbsp; 7 23:17:32 localhost openser[7035]: ERROR:xl_parse_spec: bad pvar name "rr{s.escape.common})') " <br>
Nov&nbsp; 7 23:17:32 localhost openser[7035]:
ERROR:avpops:fixup_db_query_avp: wrong format[insert into sip_responses
(response_code, response_reason) values ('$rs',
'$(rr{s.escape.common})') ] <br>
Nov&nbsp; 7 23:17:32 localhost openser[7035]: ERROR: fix_actions: fixing failed (code=-1) at cfg line 139 <br>
<br>
OpenSER also complains that i need to specify an avp table, but since I
am specifying the table in the query, I don't understand why that's
required.<br>
<br>
Douglas.<br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Daniel-Constantin Mierla &lt;daniel@voice-system.ro&gt;<br>To: Douglas Garstang &lt;dougmig33@yahoo.com&gt;<br>Cc: users@lists.openser.org<br>Sent: Thursday, November 8, 2007 11:57:35 AM<br>Subject: Re: [OpenSER-Users] Storing SIP Response Codes with avpops?<br><br>
Hello,<br><br>On 11/08/07 21:40, Douglas Garstang wrote:<br>&gt; All,<br>&gt;<br>&gt; I'd like to store SIP response codes in mysql using avpops. Is this <br>&gt; possible?<br>&gt;<br>&gt; I tried to do this a few years ago and couldn't find any <br>&gt; documentation. Unfortunately, I still can't find any.<br>&gt;<br>&gt; Can someone post an example? All I can find online is reference <br>&gt; documentation for avpops.<br>&gt;<br>&gt; I'd really like to see a full example with the modparams defining the
 <br>&gt; table structure, and how I would use avp_write and avp_db_store to <br>&gt; write the $rr response code.<br>the easiest way is to use avp_db_query(), you can give as parameter any
 <br>sql query. In your case, you can use in onreply_route:<br><br>avp_db_query("insert into sip_responses (response_code,
 response_reason) <br>values ('$rs', '$(rr{s.escape.common})') ");<br><br>You need to create the table sip_responses, with the two string
 columns.<br><br>Daniel<br><br>&gt;<br>&gt; Thanks.<br>&gt; Douglas.<br>&gt;<br>&gt;<br>&gt; __________________________________________________<br>&gt; Do You Yahoo!?<br>&gt; Tired of spam? Yahoo! Mail has the best spam protection around<br>&gt; <a href="http://mail.yahoo.com" target="_blank">http://mail.yahoo.com</a><br>&gt;
 ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; Users mailing list<br>&gt; <a ymailto="mailto:Users@lists.openser.org" href="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></div><br></div></div><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com </body></html>