<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hello all,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">In the documentation of the t_relay_cancel() (TM module) there is an example that reads:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div><div><font face="arial, sans-serif">if (method == CANCEL) {</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre"> </span>if (!t_relay_cancel()) {  # implicit drop if relaying was successful,</font></div>
<div><font face="arial, sans-serif">                                  # nothing to do</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">            </span># corresponding INVITE transaction found but error occurred</font></div>
<div><font face="arial, sans-serif"><span class="" style="white-space:pre">             </span>sl_reply("500", "Internal Server Error");</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">          </span>drop;</font></div>
<div><font face="arial, sans-serif"><span class="" style="white-space:pre">     </span>}</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">      </span># bad luck, corresponding INVITE transaction is missing,</font></div>
<div><font face="arial, sans-serif"><span class="" style="white-space:pre">     </span># do the same as for INVITEs</font></div><div><font face="arial, sans-serif">}</font></div></div><div><font face="arial, sans-serif"><br></font></div>
<div style><span style="font-family:arial,sans-serif">What bothers me is the phrase</span><span style="font-family:arial,sans-serif"> </span><font face="arial, sans-serif">#do the same as or INVITEs, because in RFC(<a href="http://tools.ietf.org/html/rfc3261#section-16.10">http://tools.ietf.org/html/rfc3261#section-16.10</a> ) </font><span style="font-family:arial,sans-serif"> it says:<br>
<br></span><pre class="" style="font-size:1em;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)">If a response context is not found, the element does not have any
knowledge of the request to apply the CANCEL to.  It MUST <b>statelessly</b>
forward the CANCEL request (it may have statelessly forwarded the
associated request previously).</pre><pre class="" style="font-size:1em;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><br></pre><pre class="" style="margin-top:0px;margin-bottom:0px"><font face="arial, sans-serif"><span style="white-space:normal">So aren't we supposed to immediately statelessly forward the CANCEL if t_relay_cancel() did not find the INVITE transaction, instead of doing the same as INVITEs, which could be t_relay() (not stateless)?. Like below:</span></font></pre>
<pre class="" style="margin-top:0px;margin-bottom:0px"><font face="arial, sans-serif"><span style="white-space:normal"><br></span></font></pre><pre class="" style="margin-top:0px;margin-bottom:0px"><div style="font-family:arial;white-space:normal">
<font face="arial, sans-serif">if (method == CANCEL) {</font></div><div style="font-family:arial;white-space:normal"><font face="arial, sans-serif"><span class="" style="white-space:pre">       </span>if (!t_relay_cancel()) {  # implicit drop if relaying was successful,</font></div>
<div style="font-family:arial;white-space:normal"><font face="arial, sans-serif">                                  # nothing to do</font></div><div style="font-family:arial;white-space:normal"><font face="arial, sans-serif"><br>
</font></div><div style="font-family:arial;white-space:normal"><font face="arial, sans-serif"><span class="" style="white-space:pre">             </span># corresponding INVITE transaction found but error occurred</font></div><div style="font-family:arial;white-space:normal">
<font face="arial, sans-serif"><span class="" style="white-space:pre">                </span>sl_reply("500", "Internal Server Error");</font></div><div style="font-family:arial;white-space:normal"><font face="arial, sans-serif"><span class="" style="white-space:pre">           </span>drop;</font></div>
<div style="font-family:arial;white-space:normal"><font face="arial, sans-serif"><span class="" style="white-space:pre">      </span>}</font></div><div style="font-family:arial;white-space:normal"><font face="arial, sans-serif">        </font><span style="font-family:arial,sans-serif"># bad luck, corresponding INVITE transaction is missing,</span></div>
<div style="font-family:arial;white-space:normal"><font face="arial, sans-serif"><span class="" style="white-space:pre">      forward();</span></font></div><div style="font-family:arial;white-space:normal"><span style="font-family:arial,sans-serif">}</span><br>
</div><div style="font-family:arial;white-space:normal"><span style="font-family:arial,sans-serif"><br></span></div><div style="white-space:normal"><font face="arial, sans-serif">Am I correct or am i missing something?</font></div>
<div style="font-family:arial;white-space:normal"><span style="font-family:arial,sans-serif">Thank you in advance,</span></div><div style="font-family:arial;white-space:normal"><span style="font-family:arial,sans-serif">Bill</span></div>
</pre></div></div>