[SR-Users] XAVP question

Kelvin Chua kelchy at gmail.com
Fri Dec 27 11:02:41 CET 2013


ok got it,
a lil bit counter intuitive but works.

Kelvin Chua


On Fri, Dec 27, 2013 at 5:22 PM, Daniel-Constantin Mierla <miconda at gmail.com
> wrote:

>  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 listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131227/f5a2ec3b/attachment.html>


More information about the sr-users mailing list