[asterisk-users] Return without Gosub: stack is empty

Dmitriy Serov serov.d.p at gmail.com
Thu Nov 2 13:25:11 CDT 2017

exten => s,1,NoOp(Dial)
  same => n,NoOp(FirstChannel: ${CHANNEL})
  same => n,Dial(????,60,gF)
  same => n,NoOp(SecondChannel: ${CHANNEL})
  same => n,Return()

exten => s,1,GoSub(sub-out-do-dial,s,1)

In case of the destination channel hangs up in log i see:
ERROR[26570][C-000000e7] app_stack.c: Return without Gosub: stack is empty

Yes. SecondChannel != FirstChannel.
Is it a wrong way to use Dial(g)+Gosub? Or any Dial in sub?

More information about the asterisk-users mailing list