<html><head><style type="text/css">body {word-wrap: break-word; background-color:#ffffff;}</style></head><body><div style="font-family: sans-serif; font-size: 16px">Thank your for clarifying that. <br><br><font face="sans-serif"><span style="font-size: 14px"><i><font color="#333333">Connected by DROID on Verizon Wireless</font></i></span></font></div><br><br>-----Original message-----<br><blockquote style="; border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-family: sans-serif; font-size: 14px"><b>From: </b>Alex Balashov &lt;abalashov@evaristesys.com&gt;<b><br>To: </b>sr-users@lists.sip-router.org<b><br>Sent: </b>Fri, Jan 27, 2012 21:14:08 GMT+00:00<b><br>Subject: </b>Re: [SR-Users] AVPs vs Variables<br><br></div>Hi Spencer,<br><br>On 01/27/2012 04:08 PM, Spencer Thomason wrote:<br><br>> I'm a little confused as to the difference between avps and vars and<br>> when I would use one or the other. I'm currently using sqlops to<br>> populate a few avps. Would vars be more suitable?<br><br>Your question straddles a generational boundary.  AVPs are an older <br>concept that go back to a time before OpenSER had really generic <br>database interfaces or endless ways to craft custom business logic, <br>many variables facilities, etc.<br><br>At this point, the only real difference between them is that $var()s <br>only exist for the duration of the processing of a given SIP message <br>in the config script.  AVPs are transaction-persistent, so, for <br>instance, if you set one in an initial request route, you can also <br>access it in the onreply_route, which is often necessary to do CDR <br>accounting, etc.  Also, some modules still require use of AVPs.<br><br>If you're pulling data out of SQL queries and using it immediately, in <br>the course of processing the same SIP message, just use $var()s.<br><br>-- <br>Alex Balashov - Principal<br>Evariste Systems LLC<br>260 Peachtree Street NW<br>Suite 2200<br>Atlanta, GA 30303<br>Tel: +1-678-954-0670<br>Fax: +1-404-961-1892<br>Web: <a href="http://www.evaristesys.com">http://www.evaristesys.com</a>/<br><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>sr-users@lists.sip-router.org<br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br><br></blockquote></body></html>