[Asterisk-Users] system() app changed drastically! How do I use it now?

Jim Gottlieb jimmy at nccom.com
Mon Sep 26 18:15:42 MST 2005


We upgraded to the latest version of asterisk (because we needed some
newer features), only to find all our PIN applications accepting any
number the caller makes up!

I traced this to the System application completely changing the way it
deals with success or failure of the program it calls.

Previously, if the PIN was completely bogus, we exited with -1, which
caused asterisk to jump to priority n + 101 and we told the caller to
take a hike.  Now, instead it sets $SYSTEMSTATUS to either "SUCCESS" or
"FAILURE".

But since (as far as I know, without using AEL) there is no conditional
branching based on a variable, how am I supposed to use this?

I'd appreciate any ideas.

Thank you.


Here's an example of our one-time PIN setup.
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Read(PIN,87)
exten => s,4,System(/usr/local/bin/pin -c ${PIN}) ; check it
exten => s,5,System(/usr/local/bin/pin -d ${PIN}) ; delete it
exten => s,6,SetAccount(${PIN})
exten => s,7,Newt,pinout-config  ; connect them
exten => s,105,Playback(5021)	 ; tell them their PIN is invalid



More information about the asterisk-users mailing list