Jim Gottlieb
2005-Sep-26 18:15 UTC
[Asterisk-Users] system() app changed drastically! How do I use it now?
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
Jim Gottlieb
2005-Sep-26 19:22 UTC
[Asterisk-Users] system() app changed drastically! How do I use it now?
On 2005-09-26 at 18:15, Jim Gottlieb (jimmy@nccom.com) wrote:> 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?OK, I forgot about GotoIf. However, the doc is wrong (or at least incomplete), because it only mentions SUCCESS and FAILURE, but I'm finding SYSTEMSTATUS set to APPERROR. So I'm doing: exten => s,5,GotoIf($["${SYSTEMSTATUS}" = "APPERROR"]?105:6)
Apparently Analagous Threads
- system() app changed drastically! How do I use itnow?
- system() app changed drastically! How do I useit now?
- Inconsistent Behavior in SYSTEMSTATUS After System() Call
- [1.4 - Record] How to tell if user did leave a msg?
- VOICEMAIL : I've tried a lot but mailing through Asterisk is just not working...