<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div><table style="width: 907px; height: 2409px;" border="0" cellpadding="0" cellspacing="0"><tbody>
<tr>
<!-- Begin PNphpBB2 Attachment Mod -->
<td class="genmed" valign="bottom" height="40"><span class="postbody"></span><span class="gensmall"></span>Hello<br><br>I am having a prob handling the CANCEL in this scenario<br><br>Kamailio 1.4 doing basic load balancing with LCR module.<br>Calling party makes a call, sends it to Kamailio, Kamailio looks up the destination gw and sends the call to the dest IP.<br>I am using statefull mode and loose routing.<br><br>The calling party makes the call and while it is ringing it hangs up. Kamailio receives the CANCEL and forward it to the dest IP, it receives the 487 from dest IP and pass it back to the calling party.<br>This is when it gets weird. The calling party sends the ACK to the 487 and it looks like the proxy [kamailio] ignores it and keep sending the 487 to the calling party.<br><br>Calling party IP: 192.168.1.200<br>kamailio[proxy]: 192.168.1.50<br>dest IP: 192.168.11<br><br>PLease see below a tethereal output and my config file.<br>I would
 appreciate any help to help me fix this prob.<br><br><br><br>[root@proxy1 ~]# tethereal -i eth1 -S -w /root/call-with-cancel3.pcap udp port 5060<br>Running as user "root" and group "root". This could be dangerous.<br>Capturing on eth1<br>0.000000 192.168.1.200 -&gt; 192.168.1.50 SIP/SDP Request: INVITE sip:664050495179280@192.168.1.50, with session description<br>0.000702 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 100 Giving a try<br>0.000774 192.168.1.50 -&gt; 192.168.1.11 SIP/SDP Request: INVITE sip:664050495179280@192.168.1.11:5060;transport=udp, with session description<br>0.044219 192.168.1.11 -&gt; 192.168.1.50 SIP Status: 100 Trying<br>0.731527 192.168.1.11 -&gt; 192.168.1.50 SIP/SDP Status: 183 Session Progress, with session description<br>0.731585 192.168.1.50 -&gt; 192.168.1.200 SIP/SDP Status: 183 Session Progress, with session description<br>1.869161 192.168.1.200 -&gt; 192.168.1.50 SIP Request: CANCEL
 sip:664050495179280@192.168.1.50<br>1.869626 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 200 canceling<br>1.869738 192.168.1.50 -&gt; 192.168.1.11 SIP Request: CANCEL sip:664050495179280@192.168.1.11:5060;transport=udp<br>1.869942 192.168.1.11 -&gt; 192.168.1.50 SIP Status: 487 Request Terminated<br>1.869946 192.168.1.11 -&gt; 192.168.1.50 SIP Status: 200 OK<br>1.870243 192.168.1.50 -&gt; 192.168.1.11 SIP Request: ACK sip:664050495179280@192.168.1.11:5060;transport=udp<br>1.870273 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 487 Request Terminated<br>1.871112 192.168.1.200 -&gt; 192.168.1.50 SIP Request: ACK sip:664050495179280@192.168.1.50<br>2.317041 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 487 Request Terminated<br>3.317025 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 487 Request Terminated<br>5.317028 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 487 Request Terminated<br>9.317036 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 487 Request
 Terminated<br>13.317043 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 487 Request Terminated<br>17.317049 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 487 Request Terminated<br>21.317057 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 487 Request Terminated<br>25.317064 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 487 Request Terminated<br>29.317071 192.168.1.50 -&gt; 192.168.1.200 SIP Status: 487 Request Terminated<br>23 packets captured<br><br><br><br>This is my routing logic:<br><br><br><br>####### Routing Logic ########<br><br># main routing logic<br>route{<br>xlog("L_INFO", "mylog: starting_main_logic.\n");<br><br>if (!mf_process_maxfwd_header("10")) {<br>sl_send_reply("483","Too Many Hops");<br>xlog("L_INFO","mylog: Too Many Hops.\n");<br>exit;<br>};<br>if (msg:len &gt;= 2048 ) {<br>sl_send_reply("513", "Message too big");<br>xlog("L_INFO","mylog: Message too big.\n");<br>exit;<br>};<br><br><br>if (!method=="REGISTER")
 {<br>record_route();<br>xlog("L_INFO","mylog: Recording Route. Method: [$rm].\n");<br>}<br><br>if (loose_route()) {<br># mark routing logic in request<br>append_hf("P-hint: rr-enforced\r\n");<br>xlog("L_INFO","mylog: Loose Route section. Method: [$rm].\n");<br>route(1);<br>};<br><br><br>if (method=="INVITE") {<br>if (!load_gws()) {<br>sl_send_reply("503", "Unable to load gateways");<br>exit;<br>}<br>if(!next_gw()){<br>sl_send_reply("503", "Unable to find a gateway");<br>exit;<br>}<br>route(1);<br>}<br><br>#CANCEL processing<br>if (is_method("CANCEL")) {<br>if (t_check_trans()) t_relay();<br>exit;<br>}<br><br><br>}<br>route[1] {<br>xlog("L_INFO","mylog: Route 1 section. Method [$rm].");<br>if (!t_relay()) {<br>xlog("L_INFO","mylog: Route 1 section. T_Relay failed. Method [$rm].");<br>sl_reply_error();<br>};<br>exit;<br>}<br><br></td></tr></tbody></table></div></div><br>



      </body></html>