Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. ###GENERAL COMMANDS###
  2. #Add menu to different context
  3. exten => 999,1,Answer()
  4. exten => 999,2,Goto(menu,999,1)
  5.  
  6.  
  7. #Open asterisk console
  8. asterisk -r
  9.  
  10. #show all asterisk help, you can enter more words like "help core" to narrow down search
  11. help
  12.  
  13. #shows configured extensions and their status
  14. sip show peers
  15.  
  16. #shows defined sip users
  17. sip show users
  18.  
  19. #Shows all sip extensions currently signed in
  20. sip show registry
  21.  
  22. #restart asterisk service
  23. core reload
  24.  
  25. #shows how asterisk interprets your dialplan in extensions.conf
  26. dialplan show
  27.  
  28. #set verbosity to 10, to see how transactions are occurring for troubleshooting
  29. core set verbose 10
  30.  
  31.  
  32. #####SIP.CONF######
  33.  
  34. #define the password you need to register a phone as a sip user
  35. secret=password
  36.  
  37. #define where you want to drop into your extensions.conf for the user when they call
  38. context=lab2
  39.  
  40. #Defines what codec is allowed, this one lets you recreate your call in wireshark!
  41. allow=ulaw
  42.  
  43. #Define a username
  44. [username]
  45.  
  46.  
  47. #####EXTENSIONS.CONF
  48.  
  49. #varibles
  50. s = Start variable, basically filler, if someone types in a wrong extensions you get dropped here automatically
  51.  
  52. n = Adds onto the previous priority
  53. e.g.
  54. exten => s,1,Answer()
  55. exten => s,n,Background(enter-ext-of-person)
  56.  
  57. Then n would = 2
  58.  
  59. i=invalid extension, you get dropped here if the context does not account for the wrong extension
  60.  
  61.  
  62. t= timeout, if the person does not enter an extension then get dropped here
  63.  
  64.  
  65.  
  66. #Answer command, answers an incoming call
  67. exten => <extension>,priority,Answer()
  68. e.g.
  69. exten => 3001,1,Answer()
  70.  
  71. #Dial command, dials a SIP user
  72. exten => <extension>,<priority>,Dial(SIP/username,timeout)
  73. e.g.
  74. exten => 3001,2,Dial(SIP/3001,10)
  75.  
  76. #Playback a sound file from /var/lib/asterisk/sounds, this file will keep playing
  77. exten => 3001,3,Playback(sound-file-here)
  78.  
  79. #Set a voicemail up, where it's (voicemail account @ context in voicemail.conf)
  80. exten => 3001,4,VoiceMail(3001@lab2)
  81.  
  82.  
  83. #Close the circuit/hang up
  84. exten => 3001,5,Hangup()
  85.  
  86.  
  87. #Play sound in the background
  88. exten => 999,1,Background(enter-ext-of-person)
  89.  
  90. #Wait for the input of an extension
  91. exten => 999,1,WaitExten() ;
  92.  
  93. #Playback the digit entered, change the 1 for 2, 2 for 3, etc.
  94. exten => 1,1,Playback(digits/1)
  95.  
  96. #Direct the dial plan to go to the next context
  97. e.g. Starting at [menu], I want to go to the [internal] context at extension 3001, priority 1
  98. exten => 1,2,Goto(internal,3001,1)
  99.  
  100.  
  101.  
  102. ####VOICEMAIL.CONF#####
  103.  
  104. #First, define a context for the voicemail settings (in extensions.conf, remember they do 3001@lab2? That lab2 goes here)
  105.  
  106. [lab2]
  107.  
  108. #Then, define the mailbox, the pin number they use to access it, name, email, etc.
  109. #Mailbox => Pin number, name, email address
  110. 3002 => 3002,Peter Iv,peteriv@mohawkcollege.ca
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement