[Kamailio-Devel] tobody, nameaddr and parameters

Brandon Armstead brandon at cryy.com
Thu Apr 30 05:50:22 CEST 2009


Hello,

    One observation I've made with {param.value} transformation is that in
an example such as:

Contact: <sip:fu at bar.com <sip%3Afu at bar.com>;nat=yes>

$(ct{param.value,nat}) yeilds:        "yes>"   versus "yes"

Is this correct behavior? (Just tested with 1.5.1-notls)

I've also noticed that sometimes the param.value transformation does not
seem to always work, in other scenarios such as:

Remote-Party-ID: <sip:fu at bar.com <sip%3Afu at bar.com>>;privacy=yes

$(hdr(Remote-Party-ID){param.value,privacy}) sometime yields "yes", at other
times null?

I've not put any specific attention into this, and have just worked around
it but not sure if this is an actual issue for this transformation
currently, any further input on this guys?

Thanks for all and every input ahead of time!

Cheers,
Brandon.

On Tue, Apr 28, 2009 at 3:46 AM, Alex Hermann <alex at speakup.nl> wrote:

> 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)?
>
> --
> Greetings,
>
> Alex Hermann
>
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/devel/attachments/20090429/4c6ae904/attachment-0001.htm 


More information about the Devel mailing list