[SR-Users] How to rewrite "tu" in CANCEL message ?

Daniel-Constantin Mierla miconda at gmail.com
Thu Jan 31 12:56:47 CET 2013


I checked the sources and found that building CANCEL with From/To 
headers used in the INVITE sent out is done when using uac functions for 
changing their value. Some internal flags are set by those functions.

So a patch should be done for remove_hf()/insert_hf() case or 
alternatively export a function to explicitely set these internal flags 
from config (do be used by the script writer when knowing the from/to 
headers where changed in some way).

Without a patch, the uac module functions have to be used.

Cheers,
Daniel

On 1/31/13 12:29 PM, Julia wrote:
> We get the same result with
> modparam("tm", "reparse_invite", 1) and
> modparam("tm", "reparse_invite", 0)
>
> -----Original Message-----
> From: sr-users-bounces at lists.sip-router.org
> [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of
> Daniel-Constantin Mierla
> Sent: Thursday, January 31, 2013 1:24 PM
> To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> UsersMailing List
> Subject: Re: [SR-Users] How to rewrite "tu" in CANCEL message ?
>
> Hello,
>
> have you changed the value for tm parameter 'reparse_invite':
>
> http://kamailio.org/docs/modules/stable/modules/tm.html#reparse_invite
>
> Cheers,
> Daniel
>
> On 1/31/13 12:02 PM, Julia wrote:
>> OK, but a problem is in partially re-parsing of CANCEL.
>>
>> ru = modified ru;
>> tu = original tu;
>> fu = original fu.
>> In this case 481 received from GW.
>>
>>
>> INVITE  --> Kam   INVIRE -->
>> ru=a			   ru=c	
>> tu=a			   tu=c
>> fu=b			   fu=d 	
>> <---100            <--- 100
>> <---180            <---180
>> CANCEL  -->       CANCEL -->
>> ru=a                ru=c
>> tu=a                tu=a
>> fu=b                fu=b
>>                  <--481 Call/Transaction does not exist
>>
>> Thank you,
>>
>> -----Original Message-----
>> From: sr-users-bounces at lists.sip-router.org
>> [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Olle E.
>> Johansson
>> Sent: Thursday, January 31, 2013 10:52 AM
>> To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
>> UsersMailing List
>> Subject: Re: [SR-Users] How to rewrite "tu" in CANCEL message ?
>>
>> Unless you rewrote the To-URI in the INVITE, you really should not try to
>> change a CANCEL. It needs to be almost a copy of the matching INVITE.
>>
>> /O
>> 30 jan 2013 kl. 14:40 skrev Carsten Bock <carsten at ng-voice.com>:
>>
>>> Hi,
>>>
>>> probably the best way is to simply use the uac_replace_to-method from
>>> the uac module:
>>>
>>> http://www.kamailio.org/docs/modules/devel/modules/uac.html#id2494560
>>> (tested with 3.3)
>>>
>>> Kind regards,
>>> Carsten
>>>
>>> 2013/1/30 Julia <juliabo at gmail.com>:
>>>> Hello all,
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Is there any way to rewrite “tu” in CANCEL message in 3.2.1?
>>>>
>>>>
>>>>
>>>> We use remove_hf / insert_hf   for INVITE’s “tu” modification before
>>>> t_relay.
>>>>
>>>>
>>>>
>>>> It works fine, but it doesn’t work for CANCEL (INVITE re-parsing is
>>>> disabled).
>>>>
>>>>
>>>>
>>>> Ths,
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>> -- 
>>> Carsten Bock
>>> CEO (Geschäftsführer)
>>>
>>> ng-voice GmbH
>>> Schomburgstr. 80
>>> D-22767 Hamburg / Germany
>>>
>>> http://www.ng-voice.com
>>> mailto:carsten at ng-voice.com
>>>
>>> Office +49 40 34927219
>>> Fax +49 40 34927220
>>>
>>> Sitz der Gesellschaft: Hamburg
>>> Registergericht: Amtsgericht Hamburg, HRB 120189
>>> Geschäftsführer: Carsten Bock
>>> Ust-ID: DE279344284
>>>
>>> Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
>>> http://www.ng-voice.com/imprint/
>>>
>>> _______________________________________________
>>> 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
>> _______________________________________________
>> 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
>>
>>
>> _______________________________________________
>> 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

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
  - http://conference.kamailio.com -




More information about the sr-users mailing list