[SR-Users] User accounting

Ali Jawad ali.jawad at splendor.net
Thu Sep 6 16:04:02 CEST 2012


Thank you Alex, I got where I need to. Appreciated.
Regards

On Thu, Sep 6, 2012 at 4:30 PM, Alex Balashov <abalashov at evaristesys.com>wrote:

> On 09/06/2012 09:25 AM, Ali Jawad wrote:
>
>  How do I get the variables for username,agent and IP.
>>
>
> This information comes from pseudovariables ("PVs"), which are basically
> parts of the SIP message that are parsed by Kamailio and exposed inside the
> config script environment as read-only (and in a cases, mutable) variables.
>
> Take a look at the full list here:
>
>    http://www.kamailio.org/**dokuwiki/doku.php/**pseudovariables:3.1.x<http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:3.1.x>
>
> The ones you are looking for are:
>
> (1) $au - for authentication username, or $fU for From URI user part.
>
> (2) $ua - user agent identifier, if present.  A good way to check if it is
> present is to check for the existence of the User-Agent header, which is
> not a mandatory header:
>
>    $var(ua) = '';
>
>    if(is_present_hf("User-Agent")**)
>       $var(ua) = $ua;
>
>    # Log $var(ua)...
>
> (3) $si - source IP of the request being processed.
>
>
> -- Alex
>
> --
> Alex Balashov - Principal
> Evariste Systems LLC
> 235 E Ponce de Leon Ave
> Suite 106
> Decatur, GA 30030
> Tel: +1-678-954-0670
> Fax: +1-404-961-1892
> Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
>
> ______________________________**_________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**users<http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120906/f7cc9355/attachment.htm>


More information about the sr-users mailing list