[SR-Users] XAVP question

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 27 10:22:13 CET 2013


Hello,

whenever you want to add one xavp, you must not provide the index. Try:

$xavp(arr=>foo1) = 'bar1';
$xavp(arr[0]=>foo2) = 'bar2';
$xavp(arr=>foo1) = 'bar3';
$xavp(arr[0]=>foo2) = 'bar4';

Note that is still adding as a stack, like for avp. But when you provide 
an index, it is expecting to exist and overwritte if all indexes are 
provided.

Cheers,
Daniel

On 27/12/13 09:34, Kelvin Chua wrote:
> i'm trying to create an array (similar to sql_xquery result) using xavp,
> i tried the ff:
>
> $xavp(arr[0]=>foo1) = 'bar1';
> $xavp(arr[0]=>foo2) = 'bar2';
> $xavp(arr[1]=>foo1) = 'bar3';
> $xavp(arr[1]=>foo2) = 'bar4';
>
> this does not work.
>
> Kelvin Chua
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131227/3e3533ab/attachment.html>


More information about the sr-users mailing list