<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Hi Chircu,</div><div><br></div><div>Thanks for your reply.</div><div>The 30s just my test value.</div><div>And maybe i didn't discribe my problem clearly.</div><div>I can understand that t_newtran() can create the transaction first , and i already did it before i send the first email.</div><div>But as i said, the caller still can not cancel it, because i don't know how to do it.</div><div>t_cancel_branch() only can be used in onreply_route <span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"> </span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">but at that</span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"> time, callee is offline.</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br></span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">Here is my cancel processing in the route , would you please tell me how can i cancel the invite which still in the while loop?</span></div><div><br></div><div><span style="font-family: "" microsoft="" yahei="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""> # CANCEL processing<br> if (is_method("CANCEL"))<br> {<br> if (t_check_trans()){<br> t_relay();<br> exit;<br> }<br> <br> }</span></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>merlin.li@tsingch.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div><br></div><div>
<div> </div>
<div>Message: 1</div>
<div>Date: Tue, 03 Mar 2015 14:57:32 +0200</div>
<div>From: Liviu Chircu <liviu@opensips.org></div>
<div>Subject: Re: [OpenSIPS-Users] how to cancel an INVITE before the</div>
<div>        callee receive it?</div>
<div>To: users@lists.opensips.org</div>
<div>Message-ID: <54F5AFBC.1000200@opensips.org></div>
<div>Content-Type: text/plain; charset="windows-1252"; Format="flowed"</div>
<div> </div>
<div>Hello merlin,</div>
<div> </div>
<div>First of all, from a user's perspective, a Post-Dial Delay of up to 30 </div>
<div>seconds should be quite annoying. Your SIP logic will also increase the </div>
<div>amount of traffic received by your platform, due to lots of </div>
<div>retransmissions for all failed calls.</div>
<div> </div>
<div>That being said, here is what you should add in order to make it work:</div>
<div> </div>
<div>t_newtran();</div>
<div>...</div>
<div>while (...) {</div>
<div> if (t_was_cancelled()) {</div>
<div> t_reply("487", "Request Cancelled");</div>
<div> exit;</div>
<div> }</div>
<div> ...</div>
<div>}</div>
<div> </div>
<div>Best regards,</div>
<div> </div>
<div>Liviu Chircu</div>
<div>OpenSIPS Developer</div>
<div>http://www.opensips-solutions.com</div>
<div> </div>
<div>On 03.03.2015 10:45, merlin.li@tsingch.com wrote:</div>
<div>> Hi,</div>
<div>></div>
<div>> Or is there a way i can break the while loop in the route block when i </div>
<div>> receive the CANCEL request?</div>
<div>></div>
<div>> ------------------------------------------------------------------------</div>
<div>> merlin.li@tsingch.com</div>
<div>></div>
<div>> *From:* merlin.li@tsingch.com <mailto:merlin.li@tsingch.com></div>
<div>> *Date:* 2015-03-03 16:14</div>
<div>> *To:* users <mailto:users@lists.opensips.org></div>
<div>> *Subject:* how to cancel an INVITE before the callee receive it?</div>
<div>> Hi all,</div>
<div>></div>
<div>> Let me describe my scenario first.</div>
<div>></div>
<div>> if the callee is not online, opensips will wait for 30s.</div>
<div>> During the 30s, if the callee be online, opensips will send the</div>
<div>> invite to it.</div>
<div>></div>
<div>> $avp(timeout) = 30 ;</div>
<div>> while( !lookup("location","m") ){</div>
<div>> if( $avp(timeout)==0 ){</div>
<div>> send_reply("420","Can not find the callee!");</div>
<div>> exit;</div>
<div>> }</div>
<div>> sleep("1");</div>
<div>> $avp(timeout) = $avp(timeout)-1;</div>
<div>> }</div>
<div>></div>
<div>> This works well, the only problem is the caller can not cancel it</div>
<div>> during that 30s</div>
<div>> t_cancel_branch() only can be used in onreply_route, but at that</div>
<div>> time, callee is offline.</div>
<div>></div>
<div>> My question is :</div>
<div>> Is it possible that terminate a request in route block?</div>
<div>></div>
<div>></div>
<div>> ------------------------------------------------------------------------</div>
<div>> merlin.li@tsingch.com</div>
<div>></div>
<div>></div>
<div>></div>
<div>> _______________________________________________</div>
<div>> Users mailing list</div>
<div>> Users@lists.opensips.org</div>
<div>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users</div>
<div> </div>
<div>-------------- next part --------------</div>
<div>An HTML attachment was scrubbed...</div>
<div>URL: <http://lists.opensips.org/pipermail/users/attachments/20150303/a9747213/attachment-0001.htm></div>
<div> </div>
<div>------------------------------</div>
<div> </div>
<div>Message: 2</div>
<div>Date: Tue, 03 Mar 2015 15:15:23 +0200</div>
<div>From: Liviu Chircu <liviu@opensips.org></div>
<div>Subject: Re: [OpenSIPS-Users] how to cancel an INVITE before the</div>
<div>        callee receive it?</div>
<div>To: users@lists.opensips.org</div>
<div>Message-ID: <54F5B3EB.9050808@opensips.org></div>
<div>Content-Type: text/plain; charset="windows-1252"; Format="flowed"</div>
<div> </div>
<div>The previous solution won't work because you can't call </div>
<div>t_was_cancelled() in the main route... You should:</div>
<div> </div>
<div>1) set $T_fr_timeout and $T_fr_inv_timeout to 1</div>
<div>2) t_on_failure(...) [1]</div>
<div>3) t_relay() to a bogus gateway [2]</div>
<div>4) catch the 408 timeout in the failure route. Using an $avp counter, go </div>
<div>back to step 1) until 30 tries have been done. In this failure route, </div>
<div>you may now also use t_was_cancelled().</div>
<div> </div>
<div>[1] : http://www.opensips.org/Documentation/Script-Routes-2-1#toc3</div>
<div>[2] : http://www.opensips.org/html/docs/modules/2.1.x/tm.html#trelay-1</div>
<div> </div>
<div>On 03.03.2015 14:57, Liviu Chircu wrote:</div>
<div>> Hello merlin,</div>
<div>></div>
<div>> First of all, from a user's perspective, a Post-Dial Delay of up to 30 </div>
<div>> seconds should be quite annoying. Your SIP logic will also increase </div>
<div>> the amount of traffic received by your platform, due to lots of </div>
<div>> retransmissions for all failed calls.</div>
<div>></div>
<div>> That being said, here is what you should add in order to make it work:</div>
<div>></div>
<div>> t_newtran();</div>
<div>> ...</div>
<div>> while (...) {</div>
<div>> if (t_was_cancelled()) {</div>
<div>> t_reply("487", "Request Cancelled");</div>
<div>> exit;</div>
<div>> }</div>
<div>> ...</div>
<div>> }</div>
<div>></div>
<div>> Best regards,</div>
<div>> Liviu Chircu</div>
<div>> OpenSIPS Developer</div>
<div>> http://www.opensips-solutions.com</div>
<div>> On 03.03.2015 10:45, merlin.li@tsingch.com wrote:</div>
<div>>> Hi,</div>
<div>>></div>
<div>>> Or is there a way i can break the while loop in the route block when </div>
<div>>> i receive the CANCEL request?</div>
<div>>></div>
<div>>> ------------------------------------------------------------------------</div>
<div>>> merlin.li@tsingch.com</div>
<div>>></div>
<div>>> *From:* merlin.li@tsingch.com <mailto:merlin.li@tsingch.com></div>
<div>>> *Date:* 2015-03-03 16:14</div>
<div>>> *To:* users <mailto:users@lists.opensips.org></div>
<div>>> *Subject:* how to cancel an INVITE before the callee receive it?</div>
<div>>> Hi all,</div>
<div>>></div>
<div>>> Let me describe my scenario first.</div>
<div>>></div>
<div>>> if the callee is not online, opensips will wait for 30s.</div>
<div>>> During the 30s, if the callee be online, opensips will send the</div>
<div>>> invite to it.</div>
<div>>></div>
<div>>> $avp(timeout) = 30 ;</div>
<div>>> while( !lookup("location","m") ){</div>
<div>>> if( $avp(timeout)==0 ){</div>
<div>>> send_reply("420","Can not find the callee!");</div>
<div>>> exit;</div>
<div>>> }</div>
<div>>> sleep("1");</div>
<div>>> $avp(timeout) = $avp(timeout)-1;</div>
<div>>> }</div>
<div>>></div>
<div>>> This works well, the only problem is the caller can not cancel it</div>
<div>>> during that 30s</div>
<div>>> t_cancel_branch() only can be used in onreply_route, but at that</div>
<div>>> time, callee is offline.</div>
<div>>></div>
<div>>> My question is :</div>
<div>>> Is it possible that terminate a request in route block?</div>
<div>>></div>
<div>>></div>
<div>>> ------------------------------------------------------------------------</div>
<div>>> merlin.li@tsingch.com</div>
<div>>></div>
<div>>></div>
<div>>></div>
<div>>> _______________________________________________</div>
<div>>> Users mailing list</div>
<div>>> Users@lists.opensips.org</div>
<div>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users</div>
<div>></div>
<div>></div>
<div>></div>
<div>> _______________________________________________</div>
<div>> Users mailing list</div>
<div>> Users@lists.opensips.org</div>
<div>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users</div>
<div> </div>
<div>-------------- next part --------------</div>
<div>An HTML attachment was scrubbed...</div>
<div>URL: <http://lists.opensips.org/pipermail/users/attachments/20150303/31768207/attachment-0001.htm></div>
<div> </div>
<div>------------------------------</div>
<div> </div>
<div>Message: 3</div>
<div>Date: Tue, 3 Mar 2015 17:02:44 +0100</div>
<div>From: Adri? Vidal <adriavidal@gmail.com></div>
<div>Subject: Re: [OpenSIPS-Users] CDRtool 9.3 web interface</div>
<div>To: OpenSIPS users mailling list <users@lists.opensips.org></div>
<div>Message-ID:</div>
<div>        <CAFYw3-dR_RcmaN=yXsm3gRB2urSWw325ANAcvm+VE_-kaoA15A@mail.gmail.com></div>
<div>Content-Type: text/plain; charset="utf-8"</div>
<div> </div>
<div>2015-03-03 11:30 GMT+01:00 Tijmen de Mes <tijmen@ag-projects.com>:</div>
<div> </div>
<div>> Hi,</div>
<div>></div>
<div>> Clicking on the icons does not work. If you click on the input field you</div>
<div>> should get a date picker.</div>
<div>></div>
<div>> If you don?t get it please take a look at the webbrowsers console if get</div>
<div>> any error or exception.</div>
<div>></div>
<div>> Best regards,</div>
<div>></div>
<div>> Tijmen de Mes</div>
<div>></div>
<div> </div>
<div>I see no input field to click on</div>
<div> </div>
<div>https://www.dropbox.com/s/w55ynwrc1kbps6d/Captura%20de%20pantalla%202015-03-03%2017.02.14.png?dl=0</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div>-- </div>
<div>--</div>
<div>Adri? Vidal</div>
<div> </div>
<div>T. 93 150 31 80 | M 607 28 89 56</div>
<div> </div>
<div>@ adria@gmail.com</div>
<div> </div>
<div>www www.xpreme.net | centralitaip.xpreme.net</div>
<div> </div>
<div>twitter xpreme_it <https://twitter.com/intent/user?screen_name=xpreme_it></div>
<div>-------------- next part --------------</div>
<div>An HTML attachment was scrubbed...</div>
<div>URL: <http://lists.opensips.org/pipermail/users/attachments/20150303/7b382bc0/attachment.htm></div>
<div> </div>
<div>------------------------------</div>
<div> </div>
<div>_______________________________________________</div>
<div>Users mailing list</div>
<div>Users@lists.opensips.org</div>
<div>http://lists.opensips.org/cgi-bin/mailman/listinfo/users</div>
<div> </div>
<div> </div>
<div>End of Users Digest, Vol 80, Issue 6</div>
<div>************************************</div>
</div></blockquote>
</body></html>