[OpenSER-Users] avp_substr, re-index's lists?
Brandon Armstead
brandon at voipo.com
Fri Aug 31 14:32:52 CEST 2007
Hello,
Say I have something like the following:
$avp(a[0]) = "27*"
$avp(a[1]) = "22*"
Then I run avp_substr like the following: avp_subst("$avp(a)/g",
"/\*/[0-9]/g");
As you would expect it to simply strip * from the avp list values, instead
it decides to rewrite the index in numerical order, so the avp's would now
look like:
[ BAD RESULTS ]
$avp(a[0]) = "22";
$avp(a[1]) = "27";
however the [ EXPECTED RESULTS ]
$avp(a[0]) = "27";
$avp(a[1]) = "22";
Could someone please elaborate on why OpenSER would re-numerate the list
index on a simple avp_substr, also any ideas on how I can get around this
and stop this from happening? Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20070831/ddcdf229/attachment.htm>
More information about the sr-users
mailing list