[prev in list] [next in list] [prev in thread] [next in thread] 

List:       serusers
Subject:    Re: [SR-Users] AVPs vs Variables
From:       "Spencer Thomason"<spencer () 5ninesolutions ! com>
Date:       2012-01-27 21:55:58
Message-ID: c1555c31-013e-4c0a-9d09-7065d25e4eb9 () blur
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thank your for clarifying that. 

Connected by DROID on Verizon Wireless

-----Original message-----
From: Alex Balashov <abalashov@evaristesys.com>
To: sr-users@lists.sip-router.org
Sent: Fri, Jan 27, 2012 21:14:08 GMT+00:00
Subject: Re: [SR-Users] AVPs vs Variables

Hi Spencer,

On 01/27/2012 04:08 PM, Spencer Thomason wrote:

> I'm a little confused as to the difference between avps and vars and
> when I would use one or the other. I'm currently using sqlops to
> populate a few avps. Would vars be more suitable?

Your question straddles a generational boundary.  AVPs are an older 
concept that go back to a time before OpenSER had really generic 
database interfaces or endless ways to craft custom business logic, 
many variables facilities, etc.

At this point, the only real difference between them is that $var()s 
only exist for the duration of the processing of a given SIP message 
in the config script.  AVPs are transaction-persistent, so, for 
instance, if you set one in an initial request route, you can also 
access it in the onreply_route, which is often necessary to do CDR 
accounting, etc.  Also, some modules still require use of AVPs.

If you're pulling data out of SQL queries and using it immediately, in 
the course of processing the same SIP message, just use $var()s.

-- 
Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



[Attachment #5 (text/html)]

<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>



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic