Some extra details and examples, hopefully for better clarification of new people dealing with xavps.
To add an xavp, you must not use an index, like Alberto wrote:
Hello Linux,
Each xavp has a name and name values. So if you first define the name of the variable then you assign the name value it will work for you:
$xavp(caller_peer=>accountname) = "Account Variable"; /*This is an example*/
$xavp(caller_peer[0]=>accountname) = "AAA";
xlog("L_WARN", "XAVP ACCOUNT NAME $xavp(caller_peer[0]=>accountname) \n");
Regards,
On Mon, Nov 28, 2016 at 5:55 PM, Linux Vince <linuxv@gmail.com> wrote:
Hi,
I am sure i am doing something very basic wrongly.
Here is my config file snippet
$xavp(caller_peer[0]=>accountname) = "AAA";
xlog("L_WARN", "XAVP ACCOUNT NAME $xavp(caller_peer[0]=>accountname) \n");
No matter what i set this XAVP at, it always prints null in log file as below
WARNING: <script>: XAVP ACCOUNT NAME <null>
Please help how i can set XAVP and use it further in config file.
_______________________________________________
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
--
Alberto Llamas
Phone: +1-786-805-6003Digium Certified Asterisk Professional (dCap)Telecommunications Engineer
_______________________________________________ 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
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com