Hello
I reread the relevant chapters in the Third edition of “Asterisk: The Definitive Guide”, but didn’t find the answer to explain this behavior.
In the following extension.conf, in the “h” extension…
- The Wait(10) doesn’t wait 10 seconds, but simply just ends the call
- The second line, which calls an AGI script, isn’t run, so I never get to that part
[from_fxo]
exten => s,1,Wait(3)
exten => s,n,Set(CID=${CALLERID(num)})
exten => s,n,Hangup
;Doesn't wait 10s, and doesn't call script
exten => h,1,Wait(10)
exten => h,n,AGI(/var/tmp/myscript.sh,${CID})
Here’s the output from the console:
-- Starting simple switch on 'Zap/1-1'
-- Executing [s@from_fxo:1] Wait("Zap/1-1", "3") in new stack
-- Executing [s@from_fxo:2] Set("Zap/1-1", "CID=123456") in new stack
-- Executing [s@from_fxo:3] Hangup("Zap/1-1", "") in new stack
== Spawn extension (from_fxo, s, 3) exited non-zero on 'Zap/1-1'
-- Executing [h@from_fxo:1] Wait("Zap/1-1", "10") in new stack
== Spawn extension (from_fxo, h, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
The goal is to have Asterisk call me back on my cellphone, so I figured going from the “s” to “h” extension was the right way to do this. Does someone know why Asterisk is behaving that way instead of what I expected?
Thank you.