Hi Klaus,<br><br>For me the same problem , But problem in&nbsp; Bye message , openser system didn't recieve the Bye request from the UAC's.....<br><br>When its connected Behind the NAT with Different networks...<br>IN local network its&nbsp; really fine...
<br><br>that means Not working in outside the world..<br><br><div><span class="gmail_quote">On 8/2/06, <b class="gmail_sendername">Klaus Darilion</b> &lt;<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Carsten!<br><br>First I would differ between ACK and CANCEL.<br><br>
If you use statefull forwarding, then it is sufficient to just t_relay,<br>as tm will take care of hop-by-hop canceling. There is no need to<br>rewrite the R-URI. There is only one problem: If the INVITE processing<br>takes more time, than it may happen that the CANCEL hits the tm module
<br>before the tm module created a transaction. Thus, I discard CANCEL<br>without existing transactions.<br><br>ACK: There are 3 kinds of possible ACK.<br>1. stateless, e.g. if you use sl_send_reply(&quot;404&quot;,&quot;&quot;), then the client
<br>will send a &quot;stateless&quot; ACK. This ACK will be absorbed by openser as<br>soon as it is received and will never enter the routing logic. Thus, we<br>do not have to care about them.<br><br>2. statefull, sucessful call: The INVITE was answered with 200, thus the
<br>caller sends an ACK to the callee. This ACK is in-dialog, and thus<br>should be routed by the loose_route block (no need to rewrite any URI)<br><br>3. statefull, unsuccessful call: The call was rejected or cancelled.<br>
Thus, we have hop-by-hop ACKs. Thus, the ACK must be handled to the tm<br>moudle, which takes care of it (no need to rewrite any URI).<br><br>here is how I handle ACK and CANCEL. I did not had any issues with this<br>(running now since 1 year).
<br><br><br>&nbsp;&nbsp; if ( is_method(&quot;CANCEL&quot;) &amp;&amp; !t_check_trans() ) {<br>&nbsp;&nbsp;&nbsp;&nbsp; # CANCEL without matching INVITE transaction, ignore<br>&nbsp;&nbsp;&nbsp;&nbsp; # may happen if the INVITE is slower than the CANCEL<br>&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;ignore the CANCEL, as the client will retransmit it, and maybe
<br>next time<br>&nbsp;&nbsp;&nbsp;&nbsp; # the INVITE transaction is already created<br>&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_WARN&quot;,&quot;$ci CANCEL without matching transaction ... ignore<br>and discard.\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; route(8);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # disable mediaproxy (needs to see valid CANCEL requests)
<br>&nbsp;&nbsp; force_send_socket(<a href="http://83.136.32.160:5060">83.136.32.160:5060</a>);&nbsp;&nbsp;# force port 5060 as sending port<br>&nbsp;&nbsp; if ( is_method(&quot;CANCEL&quot;) ) {<br>&nbsp;&nbsp;&nbsp;&nbsp; # CANCEL with matching INVITE transaction, just
<br>&nbsp;&nbsp;&nbsp;&nbsp; # t_relay<br>&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_INFO&quot;,&quot;$ci CANCEL with matching transaction ... t_relay.\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<br>&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; # check every message for Remote-Party-Id: header and remove it
<br>&nbsp;&nbsp; if (is_present_hf(&quot;Remote-Party-ID&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_INFO&quot;, &quot;$ci Remote-Party-ID header present ...removing\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp; remove_hf(&quot;Remote-Party-ID&quot;);<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; if (loose_route()) {
<br>&nbsp;&nbsp;&nbsp;&nbsp; # loose route requests are not authenticated<br>&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_INFO&quot;,&quot;$ci beginning loose_route processing...\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp; route(32);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# handle in-dialog requests<br>&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; if ( is_method(&quot;ACK&quot;) ) {
<br>&nbsp;&nbsp;&nbsp;&nbsp; if ( t_check_trans() ) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # non loose-route, but stateful ACK; must be an ACK after a 487<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_INFO&quot;,&quot;$ci local end-to-end ACK for an existent INVITE<br>transaction detected ...t_relay()\n&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<br>&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_WARN&quot;,&quot;$ci ACK without matching transaction ... ignore<br>and discard.\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; if ( has_totag() ) {<br>&nbsp;&nbsp;&nbsp;&nbsp; # in-dialog requests should be handled by loose_route
<br>&nbsp;&nbsp;&nbsp;&nbsp; # this should be fixed in the client or in openser<br>&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_ERR&quot;,&quot;$ci in-dialog request was not catched by loose_route<br>block, 403... \n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_ERR&quot;,&quot;$ci this is the complete message:\n&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_ERR&quot;,&quot;$ci $mb\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;403&quot;,&quot;in-dialog request without loose_route is not<br>allowed, this is a bug in the client or in this proxy\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp; exit;
<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; route(7);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # proxy authentication<br><br><br><br>regards<br>Klaus<br><br><br><br><br><br><br><br><br><br><br><br><br>Carsten Bock wrote:<br>&gt; Hi everybody,<br>&gt;<br>&gt; Short question: Are there any best practices regarding the routing of
<br>&gt; ACK Messages?<br>&gt; Currently we have the following logic implemented:<br>&gt;<br>&gt; route {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;[...]<br>&gt;<br>&gt; ##################################################################################################################
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;# Check for Re-Transmissions (not ACK/CANCEL)<br>&gt;<br>&gt; ###############################################################################################################<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;if ((method != &quot;CANCEL&quot;) &amp;&amp; (method != &quot;ACK&quot;)) {
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (t_check_trans()) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log(1, &quot;Re-Transmission detected, message dropped.\n&quot;);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Drop the message silently.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;}
<br>&gt;<br>&gt; ##################################################################################################################<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;# Loose-Routing (RFC3261)<br>&gt;<br>&gt; ###############################################################################################################
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;if (loose_route()) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route(10);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;}; # if (loose_route()) {<br>&gt; ##################################################################################################################
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;# ACK/CANCEL Messages may be relayed<br>&gt;<br>&gt; ###############################################################################################################<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;if ((method == &quot;CANCEL&quot;) || (method == &quot;ACK&quot;)) {
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (uri != myself) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;&nbsp;Und das Paket entsprechend weiterleiten<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!t_relay(&quot;udp:outbound_proxy:outbound_proxy_port&quot;)) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log(1, &quot;Not possible to relay\n&quot;);
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Fehler melden<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sl_reply_error();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;[...]<br>&gt;<br>&gt; ##################################################################################################################
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;# Rest of &quot;normal&quot; Routing logic with number manipulation / Routing<br>&gt; to different Gateways / User Authorization/Authentication<br>&gt;<br>&gt; ###############################################################################################################
<br>&gt;<br>&gt; }<br>&gt;<br>&gt; Is there any other method, to improve the routing of ACK/CANCEL<br>&gt; Messages? I would like to avoid all the number manipulation, checking<br>&gt; and choosing of a proper gateway....
<br>&gt; I thought, this must (somehow) be possible since from a technical<br>&gt; perspective the ACK and CANCEL Message can be associated with a<br>&gt; corresponding INVITE Message (and the corresponding Transaction).<br>
&gt; I've looked in the manual of the TM-Module and found the following example:<br>&gt; if ( is_method(&quot;CANCEL&quot;) ) {<br>&gt; if ( t_check_trans() )<br>&gt; t_relay();<br>&gt; exit;<br>&gt; }<br>&gt; (<a href="http://openser.org/docs/modules/1.1.x/tm.html#AEN460">
http://openser.org/docs/modules/1.1.x/tm.html#AEN460</a>)<br>&gt;<br>&gt; I guess, this example does not mean, that the URI gets rewritten<br>&gt; properly and the CANCEL-/ACK-Message would get properly relayed to the<br>
&gt; destination, where it is supposed to end.<br>&gt; Is there any way to do it best? I've seen, that some clients do proper<br>&gt; loose-routing for ACK-Messages, but not all clients, so this is not a<br>&gt; solution.
<br>&gt; Are there any other suggestions?<br>&gt;<br>&gt; Thanks in advance,<br>&gt;<br>&gt; Carsten<br>&gt;<br>&gt;<br>&gt;<br>&gt; ____________<br>&gt; Virus checked by G DATA AntiVirusKit<br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________
<br>&gt; Users mailing list<br>&gt; <a href="mailto:Users@openser.org">Users@openser.org</a><br>&gt; <a href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users</a><br><br>
<br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openser.org">Users@openser.org</a><br><a href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Thanks and Regards with cheers<br>Sunkara Ravi Prakash (Voip Developer)<br>Hyperion Technology<br>Kondapur, Hi-tech city,<br>Hyderabad.<br><a href="http://www.hyperion-tech.com">
www.hyperion-tech.com</a><br>+91-9985077535