[OpenSER-Users] Storing SIP Response Codes with avpops?
    Daniel-Constantin Mierla 
    daniel at voice-system.ro
       
    Thu Nov  8 20:57:35 CET 2007
    
    
  
Hello,
On 11/08/07 21:40, Douglas Garstang wrote:
> All,
>
> I'd like to store SIP response codes in mysql using avpops. Is this 
> possible?
>
> I tried to do this a few years ago and couldn't find any 
> documentation. Unfortunately, I still can't find any.
>
> Can someone post an example? All I can find online is reference 
> documentation for avpops.
>
> I'd really like to see a full example with the modparams defining the 
> table structure, and how I would use avp_write and avp_db_store to 
> write the $rr response code.
the easiest way is to use avp_db_query(), you can give as parameter any 
sql query. In your case, you can use in onreply_route:
avp_db_query("insert into sip_responses (response_code, response_reason) 
values ('$rs', '$(rr{s.escape.common})') ");
You need to create the table sip_responses, with the two string columns.
Daniel
>
> Thanks.
> Douglas.
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>   
    
    
More information about the Users
mailing list