Summary:ASTERISK-14681: 100% CPU after caller hangup when dial are in a loop in a macro
Reporter:Sylvain Boily (sboily_proformatique)Labels:
Date Opened:2009-08-20 02:28:32Date Closed:2011-06-07 14:01:06
Versions:Frequency of
Description:You can reproduce with this dialplan.

Make an incoming call and create a dial to another phone with a macro who make a loop.

When you answer and you heart the loop, the caller hangup the call, Asterisk have 100% CPU. The called continue to heart the loop and Asterisk don't hangup the call.


The dialplan :


exten => 9999,1,Goto(presta,s,1)

exten = s,1,NoOp(incoming call)
exten = s,n,Answer()
exten = s,n,Dial(SIP/mytrunk/12345678,,mM(test^s^1))
exten = s,n,Hangup()

exten = h,1,NoOp(Client hangup ${MACRO_RESULT})
exten = h,n,Hangup()

exten = s,1,NoOp(Macro dial)
exten = s,n,Answer()
exten = s,n,Set(E=)
exten = s,n,While($["${E}" != "1"])
exten = s,n,Read(E,demo-congrats,1)
exten = s,n,NoOp(${E})
exten = s,n,EndWhile()
exten = s,n,MacroExit()
Comments:By: Leif Madsen (lmadsen) 2009-08-20 15:33:21

You have created an infinite loop. I'm not sure why this is a bug. Per russellb on IRC, "We do not have a solution to The Halting Problem to prevent that." Closing this issue as a non-issue.