Hello,
I've run into a problem while using parameters parsing tools from Kamailio. When i request the value of a parameter it discards some characters like "" for example.
Here is an example :
$var(Parameters) = "kamailio="version5";sip=hey"; xerr("String Parameter = $var(Parameters)"); xerr("Parameter on position 1 = $(var(Parameters){param.name,0}) and has value = $(var(Parameters){param.valueat,0})");
This code returns : ERROR: <script>: String Parameter = kamailio="version5";sip=hey ERROR: <script>: Parameter on position 0 = kamailio and has value = version5
I found this issue while processing calls with the Contact parameter sip.instance.
Is there anything i can do to get the original string?
I'm running Kamailio 5.2.0.
Best Regards
The grammar of SIP defines the value what is in between quotes. The the value of the parameter should be between quotes if it has some special characters, otherwise is ok without quotes. The params transformation follows the SIP grammar, changing that means breaking the specs. You can eventually use search function to see if the param value starts with quotes and then add the quotes via config operations.
Other variant is to use s.select along with other transformations to split the string in the tokens you need.
Then you can also use embedded KEMI scripts for more advanced parsing.
Not being a bug, I am closing this one, for more discussions, switch to sr-users mailing list.
Closed #2200.