[OpenSIPS-Users] {param.value,field} problem with quoted values

Jeff Pyle jpyle at fidelityvoice.com
Thu Oct 21 06:15:39 CEST 2010


Hello,

I'm pulling some data out of a script variable using the {param.value,field} string manipulator.  It works fine, unless the value is in quotes.  For example, $var(ct) is like this:

<sip:2165551212 at 192.168.32.2;rn=+12166210000;ocn=9321;carrier="AT&T";cat="RBOC";lata=320>

I can pull out the ocn, lata and rn successfully with functions like this:

                if !($(var(ct){param.value,ocn}) == '') {
                        $avp(s:call_ocn) = $(var(lrnct){param.value,ocn});
                }

But, the following 'if' statement returns false and never sets the AVP:

                if !($(var(ct){param.value,carrier}) == '') {
                        $avp(s:call_carname) = $(var(lrnct){param.value,carrier});
                }

If I skip the 'if' and set the AVP directly, it's empty.

This is on Opensips 1.5.3.  Obviously it's possible this has already been addressed in more recent versions.  This server is scheduled for an upgrade to 1.6 in the coming weeks, but we're not there yet.  I thought I'd ask anyway.


- Jeff




More information about the Users mailing list