[asterisk-users] Running System() after call completion, not in 'h'?

Tim Nelson tnelson at rockbochs.com
Tue Aug 31 09:52:27 CDT 2010


Greetings all-

I have some dialplan code on an Asterisk 1.2.x box that basically dials a call, then after call completion, runs a command via System(). However, I'm finding that roughly 5% of the time, the System() command never executes and seems to be on specific destinations. Simplified/paraphrased example:

exten => 1,1,Set(VARIABLE=SOMEVALUE)
exten => 1,n,Dial(SIP/somepeer/1234567980)
exten => 1,n,System(/bin/bash /root/bin/somescript.sh ${VARIABLE}

It almost seems to be related to how fast the destination 'hangs up' and whether or not the dialplan has time to run the System command before jumping to 'h'.

I have to believe there is a better way to do this, possibly using DeadAGI?

All suggestions welcome. Thank you!

--Tim




More information about the asterisk-users mailing list