;*********************** ; Sample extensions.conf Configuration File ; For use in the Asterisk Primer Lecture Given by Cory Forsyth on ; Mar 27 2007. ; ; This file is located at /etc/asterisk/extensions.conf ;*********************** ; ; The name of this context is "twitter-incoming", and since it is the name we specified as the default ; context for teliax in sip.conf, calls to our teliax DID will be routed here ; ; NOTE: Different providers have different ways of handling how they drop the incoming call into ; The context. Some put you in the "s" extension (for "start"), others try to route the call ; to an extension matching the number of your DID ; So, if your DID was "4352322390", you might need to have an extension defined like this: ; exten => 4352322390,1,Playback(beep) ... etc. ; Or you might need to include a "1" at the beginning of the extension, like this: ; exten => 4352322390,1,Playback(beep) ... etc. ; ; This is something to keep in mind to try tweaking if you're having trouble receiving inbound calls ; [twitter-incoming] exten => s,1,Playback(beep) ; Play back a beep -- incoming calls usually don't ring, so this should be the first thing you hear exten => s,n,Flite("Hold up while I get your twitter info") ; Flite is a text-to-speech extension to asterisk that comes pre-installed with Trixbox ; It will cause a computerized voice so say the text in quotes exten => s,n,AGI(twitter.agi) ; This launches the AGI, and diaplan execution pauses here until the AGI completes exten => s,n,NoOp("TWITTER_NAME is ${TWITTER_NAME}") ; The AGI will have set a few variables for us. NoOp just prints the statement out to the asterisk ; command line console, very useful for debugging but has no other real use. exten => s,n,NoOp("TWITTER_TEXT is ${TWITTER_TEXT}") ; Note: Asterisk variables are all in this weird syntax ${var_name}, and case matters ; The following three lines just read our twiter messages to us. exten => s,n,Flite("Your twitter friend ${TWITTER_NAME} said ${TWITTER_TEXT} ... ${TWITTER_TIME}") exten => s,n,Flite("Your twitter friend ${TWITTER_NAME1} said ${TWITTER_TEXT1} ... ${TWITTER_TIME1}") exten => s,n,Flite("Your twitter friend ${TWITTER_NAME2} said ${TWITTER_TEXT2} ... ${TWITTER_TIME2}") exten => s,n,Playback(beep) exten => s,n,Hangup