Hi, With a 1.4.35 or 1.6.1.19, I'm facing this behaviour : - extension 7002 is a SIP hard phone currently configured to forward incoming calls to extension 7003, when a call is unanswered within a 10s time frame - when extension 7001 is calling extension 7002 with a Dial(SIP/7002,20) statement and no one answers, then : - after 10s, Asterisk receives "SIP 302 Moved temporarily" message and enters its dialplan to call 7003, as required, - 10s later (or 20s from the very start), call from 7001 to 7003 is cut and the next statement after Dial(SIP/7002,20) is run. The behaviour I would ideally implement is : - whenever a "SIP 302 Moved temporarily" message is received, timer associated to the original call (the one from 7001 to 7002) is reset to another 20s period Alternatively, I would also to have the first call timer "cancelled". At the moment, I think I would try the following : - before or within the Dial(SIP/7002,20), set an inherited variable with the value of the channel to kill is case the call is forwarded, - when dialplan is (re-)entered check is the call is a forwarded one, - if positive, then soft hangup the second leg of the original call, hoping that this would not introduce undesirable side effects. Do you have any suggestion ? Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100906/d640f8bb/attachment-0001.htm
Kevin P. Fleming
2010-Sep-07 13:53 UTC
[asterisk-users] Dial timeout and SIP 302 Moved Temporarily
On 09/06/2010 10:28 AM, Olivier wrote:> Hi, > > With a 1.4.35 or 1.6.1.19, I'm facing this behaviour : > > - extension 7002 is a SIP hard phone currently configured to forward > incoming calls to extension 7003, when a call is unanswered within a 10s > time frame > > - when extension 7001 is calling extension 7002 with a Dial(SIP/7002,20) > statement and no one answers, then : > - after 10s, Asterisk receives "SIP 302 Moved temporarily" message and > enters its dialplan to call 7003, as required, > - 10s later (or 20s from the very start), call from 7001 to 7003 is cut > and the next statement after Dial(SIP/7002,20) is run. > > The behaviour I would ideally implement is : > - whenever a "SIP 302 Moved temporarily" message is received, timer > associated to the original call (the one from 7001 to 7002) is reset to > another 20s periodThat would change the logic in app_dial quite drastically, as it would have to remember separate timeouts for each of the originally-dialed destinations in case they get forwarded elsewhere. -- Kevin P. Fleming Digium, Inc. | Director of Software Technologies 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA skype: kpfleming | jabber: kfleming at digium.com Check us out at www.digium.com & www.asterisk.org