<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 7 23:17:32 localhost openser[7035]: ERROR:xl_parse_spec: bad pvar name "rr{s.escape.common})') " <br>
Nov 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 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 <daniel@voice-system.ro><br>To: Douglas Garstang <dougmig33@yahoo.com><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>> All,<br>><br>> I'd like to store SIP response codes in mysql using avpops. Is this <br>> possible?<br>><br>> I tried to do this a few years ago and couldn't find any <br>> documentation. Unfortunately, I still can't find any.<br>><br>> Can someone post an example? All I can find online is reference <br>> documentation for avpops.<br>><br>> I'd really like to see a full example with the modparams defining the
<br>> table structure, and how I would use avp_write and avp_db_store to <br>> 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>><br>> Thanks.<br>> Douglas.<br>><br>><br>> __________________________________________________<br>> Do You Yahoo!?<br>> Tired of spam? Yahoo! Mail has the best spam protection around<br>> <a href="http://mail.yahoo.com" target="_blank">http://mail.yahoo.com</a><br>>
------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> Users mailing list<br>> <a ymailto="mailto:Users@lists.openser.org" href="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></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>