Thank you Alex, I got where I need to. Appreciated. Regards
On Thu, Sep 6, 2012 at 4:30 PM, Alex Balashov abalashov@evaristesys.comwrote:
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.xhttp://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@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users