[asterisk-users] interactive menu with DTMF tones

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Feb 19 00:25:19 CST 2008


On Monday 18 February 2008 19:04:54 John Von Essen wrote:
> Before I attempt to program a system like this, I wanted to see if: A)
> its possible, and B) its too insanely difficult for a perl developer.
>
> My office building has a dialer on the front door so people can call me
> and gain access. The dialer on the door has a full keypad, and
> basically just rings through to me, when I answer I can talk to the
> person, they talk back, and if I want to let them in I hit 9 on my
> phone - and the system unlocks the door.
>
>
> Here's my dilemma, sometimes people need to get in when I'm not around.
> The dialer can follow me, and go to my cell phone - but I dont always
> answer that.
>
> So I am wondering if its possible to build an interactive prompt/menu
> system so when the dialer rings the number, the interactive system
> runs, user must enter an account number, then pass code, and the system
> verifies, if everything checks out, the system will then send the 9
> tone back through, and the door will open.
>
> Does this sound like something doable? I am very proficient Perl
> developer, but need a push in the right direction.

extensions.conf:
exten => s,1,Answer
exten => s,n,Read(account,account-prompt)
exten => s,n,Read(passcode,passcode-prompt)
exten => s,n,GotoIf(${ODBC_LOOKUP(${account},${passcode})}?granted)
exten => s,n,Playback(denied)
exten => s,n,Hangup
exten => s,n(granted),SendDTMF(123456789)
exten => s,n,Hangup

func_odbc.conf:
[LOOKUP]
dsn=mysql-asterisk
read=SELECT COUNT(*) FROM passcode_table WHERE account='${ARG1}' AND 
passcode='${ARG2}'

-- 
Tilghman



More information about the asterisk-users mailing list