[SR-Users] how to give integer avp name in pseudo variable?

Juha Heinanen jh at tutpro.com
Tue Nov 8 12:29:29 CET 2011


answering to myself, the solution is to assign integer value to
$var(name). test

    $var(name) = 1000;
    $avp($var(name)) = "value";
    xlog("L_INFO", "avp i:1000 has value <$avp(i:1000)>\n");
    xlog("L_INFO", "avp s:i1000 has value <$avp(s:i:1000)>\n");

produces to syslog

Nov  8 13:26:25 sip /usr/sbin/sip-proxy[8980]: INFO: avp i:1000 has value <value>
Nov  8 13:26:25 sip /usr/sbin/sip-proxy[8980]: INFO: avp s:i1000 has value <<null>>

i didn't find this documented anywhere.  should it be added to pv wiki
page or is it too obvious?

-- juha



More information about the sr-users mailing list