[SR-Users] log the value of "from_uri" and "myself"

Alex Balashov abalashov at evaristesys.com
Thu May 28 16:26:59 CEST 2015


That's not possible, as these classical composite variables cannot be interpolated into strings.
‎
But if you want to log ‎the From URI, you can log $fu. 

'myself' expands into a variable-length list of bound interface addresses and DNS names, so you can't log that. But you can log the address on which the message was received, i.e. $Ri. 

‎More generally, take a look at the built-in PV list:
‎
‎http://www.kamailio.org/wiki/cookbooks/4.2.x/pseudovariables
‎
All these can be logged.‎

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

Sent from my BlackBerry.
  Original Message  
From: Al S
Sent: Thursday, May 28, 2015 16:23
To: sr-users at lists.sip-router.org
Reply To: Kamailio (SER) - Users Mailing List
Subject: [SR-Users] log the value of "from_uri" and "myself"



Hi,

I would like to know how to log the value of "from_uri" and "myself" attributes on kamailio 3.3.7 ?
None of the following works:

xlog("L_INFO","from_uri: $dlg(from_uri)");

$var(x) = from_uri;
xlog("L_INFO","$var(x)");

Thanks,
Al




More information about the sr-users mailing list