Skip to content

Instantly share code, notes, and snippets.

@allisonburtch
Created March 24, 2013 20:28
Show Gist options
  • Save allisonburtch/5233375 to your computer and use it in GitHub Desktop.
Save allisonburtch/5233375 to your computer and use it in GitHub Desktop.
[acb551]
exten => s,1,Wait(1)
exten => s,n,AGI(googletts.agi, "Welcome to smartify Allison's dumbphone. To hear the number of unread emails, press 1")
exten => s,n,WaitExten(3)
exten => 1,1,Goto(acb551_unread,s,1)
exten => s,n,Wait(1)
[acb551_unread]
exten => s,1,Answer()
exten => s,n,Set(new_emails=${SHELL(/home/acb551/asterisk_agi/email.rb)})
exten => s,n,Wait(1)
exten => s,n,AGI(googletts.agi, "You have ${new_emails} unread emails.")
exten => s,n,AGI(googletts.agi, "That's right. ${new_emails} unread emails.")
exten => s,n,Wait(1)
exten => s,n,AGI(googletts.agi, "To listen to these emails, press two")
exten => s,n,WaitExten(4)
exten => 2,1,Goto(acb551_email_listen,s,2)
exten => s,n,Wait(1)
[acb551_email_listen]
exten => s,2,Answer()
exten => s,n,Set(email_from=${SHELL(/home/acb551/asterisk_agi/email.rb)})
exten => s,n,AGI(googletts.agi, "Your first email is from ${email_from}")
exten => s,n,WaitExten(4)
[acb551_songs]
exten => ans,1,Background(/home/acb551/asterisk_sounds/realintro)
exten => ans,n,WaitExten(2)
exten => ans,n,Goto(acb551_songs,ans,1)
exten => 1,1,Goto(acb551_songs,sec1,1)
exten => 2,1,Goto(acb551_songs,sec2,1)
exten => 3,1,Goto(acb551_songs,sec3,1)
exten => 4,1,Goto(acb551_songs,sec4,1)
exten => sec1,1,Background(/home/acb551/asterisk_sounds/intro)
exten => sec1,n,Goto(acb551_songs,sec1,1)
exten => sec2,1,Background(/home/acb551/asterisk_sounds/mmbop)
exten => sec2,n,Goto(acb551_songs,sec2,1)
exten => sec3,1,Background(/home/acb551/asterisk_sounds/apple)
exten => sec3,n,Goto(acb551_songs,sec3,1)
exten => sec4,1,Background(/home/acb551/asterisk_sounds/scrubs)
exten => sec4,n,Goto(acb551_songs,sec4,1)
[acb551_sip]
exten => s,1,Goto(acb551_sip,1,1);
exten => _X,1,Answer();
exten => _1NXXNXXXXXX,1,Dial(SIP/flowroute/${EXTEN},30,r)
[acb551_iax]
exten => s,1,Goto(acb551_iax,1,1);
exten => _X,1,Answer();
exten => _X,n,Goto(itp-redial,s,1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment