[Kamailio-Users] m_store fails with $ct

Daniel-Constantin Mierla miconda at gmail.com
Tue Jan 27 17:38:58 CET 2009


Hello,

On 01/26/2009 05:20 PM, Henning Westerholt wrote:
> On Saturday 24 January 2009, Siddhardha Garige wrote:
>   
>> A question regarding MSILO Module.
>>
>> My sip client is registering to Service provider through kamailio (working
>> in edge proxy mode with path header support). Service provider updates
>> Voicemail status with NOTIFY message. If client is offline and voicemail
>> status changes, service provider proxy will send NOTIFY message to handset
>> via kamailio edge proxy. kamailio forwards NOTIFY statefully and performs
>> retransmissions. IF no response is received NOTIFY message content will be
>> stored in MISLO module.
>>
>> I tried using m_store("$ct") to store NOTIFY message body and I get bad uri
>> error. m_store works fine with $ru, $fu and $tu. I looked into soruce code
>> and $ru, $fu and $tu returns uri in sip:user at host format. $ct returns uri
>> in <sip:user at host> format with "< >".parse_uri fuction fails with
>> <sip:user at host>  and work fine with sip:user at host.
>>
>> Is this a bug or using $ct is worng?
>>     
>
> Hi Siddhardha,
>
> as you already mentioned has the contact header a different format that can't 
> be parsed by the parse_uri function. You can try to fix this with some 
> transformation in the script, to remove the brackets before its parsed. But 
> the contact could contain also some parameters, this will again break this. 
> The trunk version also contains a new transformation "tobody" that probably 
> could also used to extract the uri.
yes, tobody transformation can be used to get the uri out of there. For 
older versions can be used {nameaddr.uri} if the uri is enclosed in <>:
http://www.kamailio.org/dokuwiki/doku.php/transformations:1.4.x#nameaddr.uri

Cheers,
Daniel

>  Probably the easiest solution is to not 
> use the $ct with this function. ;-)
>
> Cheers,
>
> Henning
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

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





More information about the sr-users mailing list