[Kamailio-Devel] tobody, nameaddr and parameters

Daniel-Constantin Mierla miconda at gmail.com
Tue Apr 28 13:33:06 CEST 2009


Hello,

there was a but in tobody.params. Can you test the attached patch and 
see if now is ok?

Thanks,
Daniel

On 04/28/2009 01:20 PM, Klaus Darilion wrote:
> I guess param.value works only on SIP URIs (= addr-spec).
>
> I would use: $(ct{nameaddr.uri}{uri.param,expires})
>
> I think tobody is some kind of shortcut.
>
> Further, consider multiple contacts in a single header
>
> regards
> klaus
>
> Alex Hermann schrieb:
>   
>> Hello,
>>
>> I'm trying to extract the expires parameter from the contact.
>>
>> The following script fragment:
>>
>> 1) TRACE("Contact: $ct");
>> 2) TRACE("Contact expires: $(ct{param.value,expires})");
>> 3) TRACE("Contact tobody uri: $(ct{tobody.uri})");
>> 4) TRACE("Contact tobody params: $(ct{tobody.params})");
>> 5) TRACE("Contact tobody param expires: $(ct{tobody.params}{param.value,expires})");
>> 6) TRACE("Contact nameaddr uri: $(ct{nameaddr.uri})");
>>
>> generated the following log lines:
>>
>> 1) Contact: "phone_3_0" <sip:phone_3_0 at 172.28.4.105:5060;transport=udp>;expires=3600
>> 2) ERROR:core:parse_params: invalid character [<] - expected ;
>> 2) Contact expires:
>> 3) Contact tobody uri: sip:phone_3_0 at 172.28.4.105:5060;transport=udp
>> 4) Contact tobody params:
>> 5) Contact tobody param expires:
>> 6) Contact nameaddr uri: sip:phone_3_0 at 172.28.4.105:5060;transport=udp
>>
>>
>> My questions:
>>
>> Why does {param.value,expires} trip over a '<' symbol (line 2)?
>>
>> What is a tobody? I can't find any documentation on its structure. How is it different from nameaddr?
>>
>> Shouldn't line 4 have returned "expires=3600"
>>
>> Why is there no "{nameaddr.params}"?
>>
>>
>> How _do_ I extract the expires parameter (without parse errors)?
>>
>>     
>
> _______________________________________________
> Kamailio (OpenSER) - Devel mailing list
> Devel at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pv-toparams.patch
Type: text/x-patch
Size: 668 bytes
Desc: not available
Url : http://lists.kamailio.org/pipermail/devel/attachments/20090428/983da45a/attachment.bin 


More information about the Devel mailing list