Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###GENERAL COMMANDS###
- #Add menu to different context
- exten => 999,1,Answer()
- exten => 999,2,Goto(menu,999,1)
- #Open asterisk console
- asterisk -r
- #show all asterisk help, you can enter more words like "help core" to narrow down search
- help
- #shows configured extensions and their status
- sip show peers
- #shows defined sip users
- sip show users
- #Shows all sip extensions currently signed in
- sip show registry
- #restart asterisk service
- core reload
- #shows how asterisk interprets your dialplan in extensions.conf
- dialplan show
- #set verbosity to 10, to see how transactions are occurring for troubleshooting
- core set verbose 10
- #####SIP.CONF######
- #define the password you need to register a phone as a sip user
- secret=password
- #define where you want to drop into your extensions.conf for the user when they call
- context=lab2
- #Defines what codec is allowed, this one lets you recreate your call in wireshark!
- allow=ulaw
- #Define a username
- [username]
- #####EXTENSIONS.CONF
- #varibles
- s = Start variable, basically filler, if someone types in a wrong extensions you get dropped here automatically
- n = Adds onto the previous priority
- e.g.
- exten => s,1,Answer()
- exten => s,n,Background(enter-ext-of-person)
- Then n would = 2
- i=invalid extension, you get dropped here if the context does not account for the wrong extension
- t= timeout, if the person does not enter an extension then get dropped here
- #Answer command, answers an incoming call
- exten => <extension>,priority,Answer()
- e.g.
- exten => 3001,1,Answer()
- #Dial command, dials a SIP user
- exten => <extension>,<priority>,Dial(SIP/username,timeout)
- e.g.
- exten => 3001,2,Dial(SIP/3001,10)
- #Playback a sound file from /var/lib/asterisk/sounds, this file will keep playing
- exten => 3001,3,Playback(sound-file-here)
- #Set a voicemail up, where it's (voicemail account @ context in voicemail.conf)
- exten => 3001,4,VoiceMail(3001@lab2)
- #Close the circuit/hang up
- exten => 3001,5,Hangup()
- #Play sound in the background
- exten => 999,1,Background(enter-ext-of-person)
- #Wait for the input of an extension
- exten => 999,1,WaitExten() ;
- #Playback the digit entered, change the 1 for 2, 2 for 3, etc.
- exten => 1,1,Playback(digits/1)
- #Direct the dial plan to go to the next context
- e.g. Starting at [menu], I want to go to the [internal] context at extension 3001, priority 1
- exten => 1,2,Goto(internal,3001,1)
- ####VOICEMAIL.CONF#####
- #First, define a context for the voicemail settings (in extensions.conf, remember they do 3001@lab2? That lab2 goes here)
- [lab2]
- #Then, define the mailbox, the pin number they use to access it, name, email, etc.
- #Mailbox => Pin number, name, email address
- 3002 => 3002,Peter Iv,peteriv@mohawkcollege.ca
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement