<HTML dir=ltr><HEAD><TITLE>Re: [OpenSIPS-Users] do_routing() to rewrite target URI, BYE / CANCEL / ACK ?</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6001.18148" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText14251 dir=ltr><FONT face=Arial color=#000000></FONT><FONT face="Courier New" size=2>Thank you both for your highlight,</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>Under some cirtcumstances, it is possible to have transcation failure, I would still like to forward CANCEL.</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>To protect billing, do you think this could be acceptable :</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New" size=2> if ( is_method("CANCEL")) {<BR> end_media_session();<BR> if ( t_check_trans() ){<BR> t_relay();<BR> }<BR> else{<BR> if(do_routing())<BR> t_relay();<BR> }<BR> exit;<BR> }</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr>
<DIV dir=ltr><FONT face="Courier New" size=2>I will check this webinar as well.</FONT></DIV><FONT face="Courier New" size=2></FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>
<DIV dir=ltr><BR></DIV>
<DIV dir=ltr>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr><FONT face=Tahoma size=2><B>From:</B> users-bounces@lists.opensips.org on behalf of Bogdan-Andrei Iancu<BR><B>Sent:</B> Thu 29/07/2010 4:10 PM<BR><B>To:</B> OpenSIPS users mailling list<BR><B>Subject:</B> Re: [OpenSIPS-Users] do_routing() to rewrite target URI, BYE / CANCEL / ACK ?<BR></FONT><BR></DIV></DIV>
<DIV>
<P><FONT size=2>As Brett said, the routing is explicitly done for initial requests only<BR>- for INVITEs in your case...<BR><BR>See the Routing in SIP webinar :<BR><A href="http://www.opensips.org/Resources/Webinars#toc11">http://www.opensips.org/Resources/Webinars#toc11</A><BR><BR>Regards,<BR>Bogdan<BR><BR>Julien Chavanton wrote:<BR>> Hi, when using Dynamic routing, we call do_routing() to rewrite target<BR>> URI, we can not do it on BYE / CANCEL / ACK ?<BR>> <BR>> Is this a correct way to handle CANCEL, ACK and BYE when using Drouting ?<BR>> <BR>> ....<BR>> if (is_method("CANCEL") || is_method("ACK")){<BR>> if(t_check_trans()){<BR>> t_relay();<BR>> }<BR>> exit;<BR>> }<BR>> else if (is_method("BYE")){<BR>> t_relay();<BR>> exit;<BR>> }<BR>> else{<BR>> if(!do_routing()) {<BR>> sl_send_reply("503", "No destination available");<BR>> exit;<BR>> }<BR>> }<BR>> .....<BR>> ------------------------------------------------------------------------<BR>><BR>> _______________________________________________<BR>> Users mailing list<BR>> Users@lists.opensips.org<BR>> <A href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</A><BR>> <BR><BR><BR>--<BR>Bogdan-Andrei Iancu<BR>OpenSIPS Bootcamp<BR>20 - 24 September 2010, Frankfurt, Germany<BR>www.voice-system.ro<BR><BR><BR>_______________________________________________<BR>Users mailing list<BR>Users@lists.opensips.org<BR><A href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</A><BR></FONT></P></DIV></BODY></HTML>