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

Daniel-Constantin Mierla miconda at gmail.com
Fri Feb 8 10:42:08 CET 2013


Hello,

On 2/5/13 6:52 AM, Julia wrote:
>
> Hello,
>
> We solved problems by disabling double rr in rr module.
>
> Now this works well! :)
>
this works well as long as you don't have kamailio bridging between 
networks or transport layers. In other words, if kamailio is listening 
on a single ip and port, all is fine.

Otherwise, like said inthe previous email, do record routing after 
applying changes.

Cheers,
Daniel

> Thank all of you,
>
> Julia.
>
> ------------------------------------------------------------------------
>
> *From:*Julia [mailto:juliabo at gmail.com]
> *Sent:* Monday, February 04, 2013 3:17 PM
> *To:* 'miconda at gmail.com'; 'SIP Router - Kamailio (OpenSER) and SIP 
> Express Router (SER) -Users Mailing List'
> *Subject:* RE: [SR-Users] How to rewrite "tu" in CANCEL message ?
>
> Hello Daniel,
>
> We tested in version 3.3.0 and got some problems:
>
> 1) Modified "To" header sent in CANCEL only when we add 
> *msg_apply_changes()* after uac_replace_to()command in INVITE set out.
>
> 2) When we add *msg_apply_changes(),*INVITE is being sent out with 
> additional "Record-route" header (without IP):
>
> S<:E"@<F<INVITE sip:039988002 at 172.16.60.6 
> <mailto:sip%3A039988002 at 172.16.60.6>;user=phone SIP/2.0
> *Record-Route: 
> <sip:;r2=on;lr;ftag=02e3a8c0-5ffc5d-t-2;vst=AAAAAHQAAAwLAQkICnABBXIfCAQABwYWGAlHRktAB0VYWV5edXNlcj1waG9uZQ-->
> Record-Route: 
> <sip:172.16.60.70;r2=on;lr;ftag=02e3a8c0-5ffc5d-t-2;vst=AAAAAHQAAAwLAQkICnABBXIfCAQABwYWGAlHRktAB0VYWV5edXNlcj1waG9uZQ-->
> *Via: SIP/2.0/UDP 172.16.60.70;branch=z9hG4bK5653.9713646.0
> Via: SIP/2.0/UDP 
> 192.168.225.2:50602;branch=z9hG4bK00000000005ffc5d511f5cf933dcd0456cb2ffe5874d2a08
> Max-Forwards: 68
> From: "39936646 39936646" 
> <sip:39936646;cpc=ordinary at 192.168.225.2:5060;user=phone>;tag=02e3a8c0-5ffc5d-t-2
> To: <sip:039988002 at 172.16.60.6 
> <mailto:sip%3A039988002 at 172.16.60.6>;user=phone>
> Call-ID: 1bf13574-02e3a8c0-00010c35 at 192.168.225.2 
> <mailto:1bf13574-02e3a8c0-00010c35 at 192.168.225.2>
> CSeq: 2 INVITE
> Contact: <sip:39936646 at 192.168.225.2:50602 
> <http://sip:39936646@192.168.225.2:50602>>
> User-Agent: NetCentrex CCS Softswitch/7.11.2
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, INFO, PRACK, UPDATE, NOTIFY
> Supported: 100rel
> P-Asserted-Identity: "39936646 39936646" 
> <sip:39936646;cpc=ordinary at 192.168.225.2:5060;user=phone>
> Privacy: none
> Content-Type: application/sdp
> Content-Length: 163
> X-Ncx-Service-Info: 
> h450-info=0x000210043a000154010010043b00015503408000;ncx-info=0x407100330801C016653136343A303030303030393732333939333636343601B0020C000100113339393336363436203339393336363436
>
> v=0
> o=10.203.22.10 14111 2 IN IP4 10.203.22.10
> s=SIP Call
> c=IN IP4 10.203.22.10
> t=0 0
> a=sendrecv
> m=audio 8368 RTP/AVP 8
> a=rtpmap:8 PCMA/8000/1
> a=ptime:20
>
> 3) If TOPOH module is used, mask IP address (10.1.1.10) is sent in the 
> second "Record-route" (instead of local host IP).
>
> J5INVITE sip:039988002 at 172.16.60.6 
> <mailto:sip%3A039988002 at 172.16.60.6>;user=phone SIP/2.0
> *Record-Route: 
> <sip:;r2=on;lr;ftag=02e3a8c0-5ff136-t-2;vst=AAAAAHQAAAwLAQkICnABBXIfCAQABwYWGAlHRktAB0VYWV5edXNlcj1waG9uZQ-->
> Record-Route: 
> <sip:10.1.1.10;line=sr-N6IAzBFwMJZfWJZ6MGZwMx1LMBu5oB1dNB1EpSthH.yLg.WrzSMAO.KEgBFlWJu4O.VXphW4Hjt0Pjt0mtt0Pjtw.FtaC4IxoqtGPIregqW0jjtGpuI9a4tdmtenpFtGMtggKu3ugRa3.EfBCBtw3jNspKYaOm4*>
> *Via: SIP/2.0/UDP 172.16.60.70;branch=z9hG4bK7bff.5c4d0c12.0
> Via: SIP/2.0/UDP 
> 10.1.1.10;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.qLOBF6zGZLMBj7MBvuMx3AMB1jmxuqC93X3heroEWvH9vsCFN43qdAMxyAMxyAMxyAWRgEM.M63EMAzR3u3lpq3RV4MxprWRjuzRaBg.cw3RMAz.PLzSM*
> Max-Forwards: 68
> From: "39936646 39936646" 
> <sip:39936646;cpc=ordinary at 192.168.225.2:5060;user=phone>;tag=02e3a8c0-5ff136-t-2
> To: <sip:039988002 at 172.16.60.6 
> <mailto:sip%3A039988002 at 172.16.60.6>;user=phone>
> Call-ID: 3fe92128-02e3a8c0-00010c15 at 192.168.225.2 
> <mailto:3fe92128-02e3a8c0-00010c15 at 192.168.225.2>
> CSeq: 2 INVITE
> Contact: 
> <sip:10.1.1.10;line=sr-N6IAzBMsz.M6WBP6PxFsMJZfWBc7MBVuOBV-W.y6MxV*>
> User-Agent: NetCentrex CCS Softswitch/7.11.2
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, INFO, PRACK, UPDATE, NOTIFY
> Supported: 100rel
> P-Asserted-Identity: "39936646 39936646" 
> <sip:39936646;cpc=ordinary at 192.168.225.2:5060;user=phone>
> Privacy: none
> Content-Type: application/sdp
> Content-Length: 163
> X-Ncx-Service-Info: 
> h450-info=0x0002100434000154010010043500015503408000;ncx-info=0x407100330801C016653136343A303030303030393732333939333636343601B0020C000100113339393336363436203339393336363436
>
> v=0
> o=10.203.22.10 14090 2 IN IP
>
> Thank you,
>
> Julia
>
> -----Original Message-----
> From: Julia [mailto:juliabo at gmail.com]
> Sent: Thursday, January 31, 2013 2:03 PM
> To: 'miconda at gmail.com'; 'SIP Router - Kamailio (OpenSER) and SIP 
> Express Router (SER) -Users Mailing List'
> Subject: RE: [SR-Users] How to rewrite "tu" in CANCEL message ?
>
> Thank you,
>
> we will try to test it.
>
> -----Original Message-----
>
> From: Daniel-Constantin Mierla [mailto:miconda at gmail.com]
>
> Sent: Thursday, January 31, 2013 1:57 PM
>
> To: Julia; 'SIP Router - Kamailio (OpenSER) and SIP Express Router 
> (SER) -Users Mailing List'
>
> Subject: Re: [SR-Users] How to rewrite "tu" in CANCEL message ?
>
> 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-22767Hamburg / 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 -
>

-- 
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 -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130208/1b161fb1/attachment-0001.htm>


More information about the sr-users mailing list