<div dir="ltr">Thank you Alex, I got where I need to. Appreciated.<div>Regards<br><br><div class="gmail_quote">On Thu, Sep 6, 2012 at 4:30 PM, Alex Balashov <span dir="ltr">&lt;<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 09/06/2012 09:25 AM, Ali Jawad wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How do I get the variables for username,agent and IP.<br>
</blockquote>
<br></div>
This information comes from pseudovariables (&quot;PVs&quot;), 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.<br>


<br>
Take a look at the full list here:<br>
<br>
   <a href="http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:3.1.x" target="_blank">http://www.kamailio.org/<u></u>dokuwiki/doku.php/<u></u>pseudovariables:3.1.x</a><br>
<br>
The ones you are looking for are:<br>
<br>
(1) $au - for authentication username, or $fU for From URI user part.<br>
<br>
(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:<br>
<br>
   $var(ua) = &#39;&#39;;<br>
<br>
   if(is_present_hf(&quot;User-Agent&quot;)<u></u>)<br>
      $var(ua) = $ua;<br>
<br>
   # Log $var(ua)...<br>
<br>
(3) $si - source IP of the request being processed.<div class="im HOEnZb"><br>
<br>
-- Alex<br>
<br>
-- <br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
235 E Ponce de Leon Ave<br>
Suite 106<br>
Decatur, GA 30030<br>
Tel: +1-678-954-0670<br>
Fax: +1-404-961-1892<br>
Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.alexbalashov.com/" target="_blank">http://www.alexbalashov.com/</a><br>
<br></div><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div><br>
</div></div>