[Asterisk-Users] system() app changed drastically! How do I use
itnow?
Alexander Lopez
alex.lopez at opsys.com
Mon Sep 26 19:10:48 MST 2005
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 at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
> Jim Gottlieb
> Sent: Monday, September 26, 2005 9:16 PM
> To: asterisk-users at 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 at 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
>
>
More information about the asterisk-users
mailing list