[asterisk-users] execute commands after hangup

Jerry Geis geisj at pagestation.com
Fri Apr 27 12:36:59 MST 2007

I have a few commands I wish to run after a hangup.
It looks like only the first 2 commands are run after hangup.

I am using 1.4.3

How can I get the entire loop to run 10 times. ( I know my example just 
has noop's but its an example).

exten => h,1,Set(i=1)
exten => h,n,While($[${i} < 10])
exten => h,n,Noop(jerry)
exten => h,n,Set(i=$[${i} + 1])
exten => h,n,EndWhile
exten => h,n,Noop(jerry)

The only other item to know is this is a call connected to console/dsp.

 << Hangup on console >>
  == Spawn extension (default, 1041, 4) exited non-zero on 
    -- Executing [h at default:1] 
Set("SIP/devcentos64_to_bt610tMM-081febf8", "i=1") in new stack
    -- Executing [h at default:2] 
While("SIP/devcentos64_to_bt610tMM-081febf8", "1") in new stack
  == Spawn extension (default, h, 2) exited non-zero on 



More information about the asterisk-users mailing list