Alexander Lopez
2005-Sep-26 19:10 UTC
[Asterisk-Users] system() app changed drastically! How do I use itnow?
Try the following: 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,GotoIf($[${SYSTEMSTATUS} = FAILURE]?105:7) exten => s,7,SetAccount(${PIN}) exten => s,8,Newt,pinout-config ; connect them exten => s,105,Playback(5021) ; tell them their PIN is invalid> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com > [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of > Jim Gottlieb > Sent: Monday, September 26, 2005 9:16 PM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] system() app changed drastically! > How do I use itnow? > > 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 > _______________________________________________ > --Bandwidth and Colocation sponsored by Easynews.com -- > > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >
Seemingly Similar Threads
- system() app changed drastically! How do I use it now?
- system() app changed drastically! How do I useit now?
- Inconsistent Behavior in SYSTEMSTATUS After System() Call
- Sprocket Digest + Debug combination broken?
- long return times from System() calls with 1.6.2.6?