[SR-Users] Parameters list transformations comma and semi column conflict

Seudin Kasumovic seudin.kasumovic at gmail.com
Fri Oct 18 22:54:51 CEST 2013


Hi Peter,

I tried transformation {pram.value,name['delimiter']} for 4.1.0-pre0:

$(*avp*(my_var){param.value, a, ';'})

and got parsing error:

0(32237) ERROR: pv [pv_trans.c:2386]: tr_parse_paramlist(): invalid
separator in transformation: value,a,';'}
0(32237) ERROR: <core> [pvapi.c:1586]: tr_lookup(): error parsing
[{param.value,a,';'}]
0(32237) ERROR: <core> [pvapi.c:972]: pv_parse_spec2(): bad tr in pvar name
"avp"
0(32237) ERROR: <core> [pvapi.c:998]: pv_parse_spec2(): invalid parsing in
[$(avp(my_var){param.value,a,';'})] at (4)

If set delimiter without quotes (documentation isn't clear for this), e.g.

$(*avp*(my_var){param.value, a, ;})

then no parsing complain. But, get same wrong results, for parameter value
not quoted if contains ','.

Is this expected behavior?

Regards,
Seudin


On Fri, Oct 18, 2013 at 10:41 AM, Seudin Kasumovic <
seudin.kasumovic at gmail.com> wrote:

> Hello,
>
> will try this feature...
>
> thank you Peter.
>
>
> On Thu, Oct 17, 2013 at 5:36 PM, Peter Dunkley <
> peter.dunkley at crocodilertc.net> wrote:
>
>> Hello,
>>
>> Parameters to SIP headers are ';' separated.  ',' is used to concatenate
>> multiple headers onto a single line.  The {param...} transformation is
>> intended to process SIP header parameters.
>>
>> However, there is a new feature in Kamailio 4.1 (currently in a
>> pre-release/testing phase) that allows you to specify the delimiter value.
>>  That may do what you require.
>>
>> Please see:
>> http://www.kamailio.org/wiki/cookbooks/devel/transformations#paramvalue_name_delimiter
>>
>> Regards,
>>
>> Peter
>>
>>
>> On 17 October 2013 16:04, Seudin Kasumovic <seudin.kasumovic at gmail.com>wrote:
>>
>>> Hi,
>>>
>>> Transformation {param.value, param_name} returns incomplete or empty
>>> values when parameter value contains comma (,).
>>>
>>> See next example:
>>>
>>> *$avp*(my_var)="a=val_a1,val_a2,val_a3;b=val_b";
>>>
>>> in next transformations:
>>>
>>> $(*avp*(my_var){param.value, a}) returns 'val_a1'
>>> $(*avp*(my_var){param.value, b}) returns empty string
>>>
>>> Seams that comma in parameter value conflicts with semi column separator.
>>>
>>> Is this bug or wrong documented?
>>>
>>> Related link:
>>>
>>> http://www.kamailio.org/wiki/cookbooks/4.0.x/transformations#paramvalue_name
>>>
>>> --
>>> Seudin Kasumovic
>>> Tuzla, Bosnia
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>>
>> --
>> Peter Dunkley
>> Technical Director
>>  Crocodile RCS Ltd
>>
>> _______________________________________________
>> 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
>>
>>
>
>
> --
> MSC Seudin Kasumovic
> Tuzla, Bosnia
>



-- 
MSC Seudin Kasumovic
Tuzla, Bosnia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131018/a890cd3a/attachment.html>


More information about the sr-users mailing list