Ah, again typo, in last line of previous email, i meant to recover loss of few seconds between 200 OK and CANCEL from caller, (not ACK from caller, since ACK establishes a billable call).<div><br></div><div>Thank you.<br><br>
<br><div class="gmail_quote">On Tue, Feb 12, 2013 at 2:54 PM, Muhammad Shahzad <span dir="ltr"><<a href="mailto:shaheryarkh@gmail.com" target="_blank">shaheryarkh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Sorry i didn't see you are setting dialog timeout for sequential INVITE, instead of initial INVITE, so this timeout would actually have no effect on new call, it will effect only established call (e.g. when caller or callee sets call on hold etc.) and when that sequential INVITE comes in the destination has to accept it within 3 seconds, which is OK, since call is already established, only its state being changed.</div>
<div><br></div><div>Secondly, a call is not considered established till ACK arrives from caller party. Since caller never sends ACK, so destination should end call (after 32 seconds per RFC 3261) even if it does not receives CANCEL from caller. And if destination receives CANCEL, then call should end anyway. Such call can not be billed, since it was never established.</div>
<div><br></div><div>From billing the caller prospective, you should start billing upon receiving 200 OK from destination but you must discard it if CANCEL comes from caller instead of ACK. In fact i have seen some billing systems that actually start billing upon receiving ACK from caller, rather 200 OK from destination. To overcome the loss of few seconds (between 200 OK from destination and ACK from caller), they use a different billing head called "connection charges".</div>
<div><br></div><div>Thank you.</div><div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Tue, Feb 12, 2013 at 2:24 PM, M.Khaled W Chehab <span dir="ltr"><<a href="mailto:kchehab@icucall.com" target="_blank">kchehab@icucall.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Please can you show me by code the better way(ensure Cancel) since this is a critical issue and I am relaying the cancel and after that trunk send me more than 8 time 200 Ok ,as is there a way to stop/hangup the call since I receive the cancel from the client <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">2-what do you mean destination must be very quick ( since 200 oK is received the normal reply (ACK) takes millsec or I am wrong ?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Regards<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Muhammad Shahzad [mailto:<a href="mailto:shaheryarkh@gmail.com" target="_blank">shaheryarkh@gmail.com</a>] <br>
<b>Sent:</b> Tuesday, February 12, 2013 3:05 PM<br><b>To:</b> M.Khaled W Chehab<br><b>Cc:</b> <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>; <a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>; <a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>; Muhammad Shahzad<br>
<b>Subject:</b> Re: ACK Timer<u></u><u></u></span></p><div><div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">This may work, only if you create dialog with 'B' flag, also 3 seconds look very short, destination must be very quick to ACK the call.<u></u><u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I think there is a better way to achieve this, you only need to ensure CANCEL is received at destination.<u></u><u></u></p><div><p class="MsoNormal">
<br>Thank you.<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">On Tue, Feb 12, 2013 at 1:45 PM, M.Khaled W Chehab <<a href="mailto:kchehab@icucall.com" target="_blank">kchehab@icucall.com</a>> wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal">Hi ,<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I face a lot of scenarios where the customer send a cancel while the trunk send 200 OK and start the billing from its side ,so the client call will be canceled from his side and goes to the max call duration from my side and trunk side .<u></u><u></u></p>
<p class="MsoNormal">Si I draw this function below <u></u><u></u></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New"">loadmodule "dialog.so"</span><u></u><u></u></p><p class="MsoNormal">
<span style="font-size:9.0pt;font-family:"Courier New"">modparam("dialog", "timeout_avp", "$avp(timeout2)")</span><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal" style="text-autospace:none">
<span style="font-size:9.0pt;font-family:"Courier New"">if (has_totag()) {</span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Courier New""> if ( is_method("INVITE")) {</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Courier New""> $avp(timeout2) = 3; </span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none">
<span style="font-size:9.0pt;font-family:"Courier New""> } else if (is_method("ACK")) {</span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Courier New""> $avp(timeout2) = 3540; </span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Courier New""> }</span><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Do this function effect on my calls or cause any problem<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Regards<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">
Khaled Chehab<u></u><u></u></p><p class="MsoNormal">Senior NGN Engineer<u></u><u></u></p><p class="MsoNormal"><img border="0" width="117" height="75" src="cid:image001.png@01CE0935.158D46E0" alt="Description: icucall"><u></u><u></u></p>
<p class="MsoNormal">Operations Office - Lebanon<u></u><u></u></p><p class="MsoNormal">Office : +961 1 515155 ext 300<u></u><u></u></p><p class="MsoNormal">Mobile : +961 3 045212<u></u><u></u></p><p class="MsoNormal">
E-mail : <a href="mailto:kchehab@icucall.com" target="_blank">kchehab@icucall.com</a><u></u><u></u></p><p class="MsoNormal">MSN ID :<a href="mailto:khalidchehab@hotmail.com" target="_blank">khalidchehab@hotmail.com</a> <u></u><u></u></p>
<p class="MsoNormal">Skype : k_chehab <u></u><u></u></p><p class="MsoNormal">Web Site: <a href="http://www.icucall.com" target="_blank">http://www.icucall.com</a><u></u><u></u></p><p class="MsoNormal"> <a href="http://www.allohi.com" target="_blank">http://www.allohi.com</a><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p></div></div></div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">-- <br><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#888888;background:white">Muhammad Shahzad</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#888888"><br>
<span style="background:white">-----------------------------------</span><br><span style="background:white">CISCO Rich Media Communication Specialist (CRMCS)</span><br><span style="background:white">CISCO Certified Network Associate (CCNA)</span><br>
<span style="background:white">Cell: +49 176 99 83 10 85</span><br><span style="background:white">MSN: </span></span><a href="mailto:shari_786pk@hotmail.com" target="_blank"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1155cc;background:white">shari_786pk@hotmail.com</span></a><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#888888"><br>
<span style="background:white">Email: </span></span><a href="mailto:shaheryarkh@googlemail.com" target="_blank"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1155cc;background:white">shaheryarkh@googlemail.com</span></a> <u></u><u></u></p>
</div></div></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Muhammad Shahzad</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">------------------------------</span><span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">-----</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">CISCO Rich Media Communication Specialist (CRMCS)</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">CISCO Certified Network Associate (CCNA)</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Cell: +49 176 99 83 10 85</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">MSN: </span><a href="mailto:shari_786pk@hotmail.com" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">shari_786pk@hotmail.com</a><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Email: </span><a href="mailto:shaheryarkh@googlemail.com" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">shaheryarkh@googlemail.com</a>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Muhammad Shahzad</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">------------------------------</span><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">-----</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">CISCO Rich Media Communication Specialist (CRMCS)</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">CISCO Certified Network Associate (CCNA)</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Cell: +49 176 99 83 10 85</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">MSN: </span><a href="mailto:shari_786pk@hotmail.com" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)" target="_blank">shari_786pk@hotmail.com</a><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Email: </span><a href="mailto:shaheryarkh@googlemail.com" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)" target="_blank">shaheryarkh@googlemail.com</a>
</div>