Cool.  So in theory, i should just be able to place<br><br>t_check_trans(); <br><br>right inline in my script in place of all my incorrect logic and it will just take care of everything, right?  If I am reading this correctly, I don&#39;t even need to conditionally check to see the result as I am only concerned about the retransmission scenario and the t_check_trans() call will break/exit the script...<br>
<br>Thanks for your help.<br><br><div class="gmail_quote">On Mon, Aug 30, 2010 at 1:28 PM, Uriel Rozenbaum <span dir="ltr">&lt;<a href="mailto:uriel.rozenbaum@gmail.com">uriel.rozenbaum@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br>
<br>
Check t_check_trans() from tm module.<br>
<br>
It does all on its own<br>
<br>
<a href="http://kamailio.org/docs/modules/1.5.x/tm.html#id2509242" target="_blank">http://kamailio.org/docs/modules/1.5.x/tm.html#id2509242</a><br>
<br>
Cheers,<br>
Uriel<br>
<div><div></div><div class="h5"><br>
On Mon, Aug 30, 2010 at 2:19 PM, Geoffrey Mina &lt;<a href="mailto:geoffreymina@gmail.com">geoffreymina@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt; I have a question about what the proper way to handle a duplicate<br>
&gt; presentation of an INVITE is.  On occasion I am seeing some packet loss<br>
&gt; and/or timing issues which are causing some of my end-points to retransmit<br>
&gt; the INVITE.  Here is what I am doing in the most basic sense:<br>
&gt;<br>
&gt;<br>
&gt; ITSP (Bandwidth.com) --&gt; INVITE --&gt; KAMAILIO --&gt; DISPATCHER --&gt; Asterisk<br>
&gt; (B2BUA)<br>
&gt;<br>
&gt;<br>
&gt; I am seeing Bandwidth.com send an INVITE which I already received.   I keep<br>
&gt; track of all running transactions in a htable which has a key of<br>
&gt;<br>
&gt; $ci::$cs::$ft (as per RFC 3261).<br>
&gt;<br>
&gt; If I get an invite for something which already has a key in the hashmap, I<br>
&gt; am currently sending a  &quot;482 Loop Detected&quot;, but I don&#39;t think that is<br>
&gt; correct as it causes the whole call to tear down instead of letting it<br>
&gt; continue and assuring Bandwidth.com that I received the initial INVITE and<br>
&gt; am currently working on it.<br>
&gt;<br>
&gt; This is what I am currently doing:<br>
&gt;<br>
&gt;     ##<br>
&gt;     ## Check to make sure we don&#39;t already have an active<br>
&gt;     ## transaction for this call-id, c-seq, and from-tag<br>
&gt;     ## RFC3261 - 8.2.2.2<br>
&gt;     ##<br>
&gt;     ## We are going to add a key for this unique record if one<br>
&gt;     ## doesn&#39;t already exist.  The key automatically times out<br>
&gt;     ## after 30 seconds, so we need not worry about cleanup<br>
&gt;     ##<br>
&gt;     if($sht(loop_check=&gt;$ci::$cs::$ft) == null){<br>
&gt;         xlog(&quot;L_INFO&quot;,&quot;No transaction found, adding to our hashtable\n&quot;);<br>
&gt;            $sht(loop_check=&gt;$ci::$cs::$ft) = 1;<br>
&gt;     }else{<br>
&gt;            xlog(&quot;L_ERR&quot;,&quot;Loop Detected: $ci::$cs::$ft\n&quot;);<br>
&gt;         sl_send_reply(&quot;482&quot;,&quot;Loop Detected - Duplicate Session<br>
&gt; Presentation&quot;);<br>
&gt;            exit;<br>
&gt;     }<br>
&gt;<br>
&gt; Can I just swallow the second INVITE and do an exit; in my script?<br>
&gt; Should I do an sl_send_reply(100,&quot;Trying&quot;)?<br>
&gt;<br>
&gt; Any advice would be greatly appreciated.<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>