[Kamailio-Devel] tobody, nameaddr and parameters
Klaus Darilion
klaus.mailinglists at pernau.at
Tue Apr 28 13:20:24 CEST 2009
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)?
>
More information about the Devel
mailing list