Advertisement
Guest User

Untitled

a guest
Oct 16th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.46 KB | None | 0 0
  1. ------------------------
  2. firewall rules
  3. ------------------------
  4. -A INPUT -p udp -m udp --dport 5060 -j ACCEPT
  5. -A INPUT -p udp -m udp --dport 10000:19999 -j ACCEPT
  6.  
  7. ------------------------
  8. asterisk.conf
  9. ------------------------
  10. [directories](!)
  11. astetcdir => /etc/asterisk
  12. astmoddir => /usr/lib/asterisk/modules
  13. astvarlibdir => /var/lib/asterisk
  14. astdbdir => /var/lib/asterisk
  15. astkeydir => /var/lib/asterisk
  16. astdatadir => /var/lib/asterisk
  17. astagidir => /var/lib/asterisk/agi-bin
  18. astspooldir => /var/spool/asterisk
  19. astrundir => /var/run/asterisk
  20. astlogdir => /var/log/asterisk
  21. astsbindir => /usr/sbin
  22.  
  23. [options]
  24. ;verbose = 3
  25. ;debug = 3
  26. ;alwaysfork = yes ; Same as -F at startup.
  27. ;nofork = yes ; Same as -f at startup.
  28. ;quiet = yes ; Same as -q at startup.
  29. ;timestamp = yes ; Same as -T at startup.
  30. ;execincludes = yes ; Support #exec in config files.
  31. ;console = yes ; Run as console (same as -c at startup).
  32. ;highpriority = yes ; Run realtime priority (same as -p at
  33. ; startup).
  34. ;initcrypto = yes ; Initialize crypto keys (same as -i at
  35. ; startup).
  36. ;nocolor = yes ; Disable console colors.
  37. ;dontwarn = yes ; Disable some warnings.
  38. ;dumpcore = yes ; Dump core on crash (same as -g at startup).
  39. ;languageprefix = yes ; Use the new sound prefix path syntax.
  40. ;systemname = my_system_name ; Prefix uniqueid with a system name for
  41. ; Global uniqueness issues.
  42. ;autosystemname = yes ; Automatically set systemname to hostname,
  43. ; uses 'localhost' on failure, or systemname if
  44. ; set.
  45. ;mindtmfduration = 80 ; Set minimum DTMF duration in ms (default 80 ms)
  46. ; If we get shorter DTMF messages, these will be
  47. ; changed to the minimum duration
  48. ;maxcalls = 10 ; Maximum amount of calls allowed.
  49. ;maxload = 0.9 ; Asterisk stops accepting new calls if the
  50. ; load average exceed this limit.
  51. ;maxfiles = 1000 ; Maximum amount of openfiles.
  52. ;minmemfree = 1 ; In MBs, Asterisk stops accepting new calls if
  53. ; the amount of free memory falls below this
  54. ; watermark.
  55. ;cache_record_files = yes ; Cache recorded sound files to another
  56. ; directory during recording.
  57. ;record_cache_dir = /tmp ; Specify cache directory (used in conjunction
  58. ; with cache_record_files).
  59. ;transmit_silence = yes ; Transmit silence while a channel is in a
  60. ; waiting state, a recording only state, or
  61. ; when DTMF is being generated. Note that the
  62. ; silence internally is generated in raw signed
  63. ; linear format. This means that it must be
  64. ; transcoded into the native format of the
  65. ; channel before it can be sent to the device.
  66. ; It is for this reason that this is optional,
  67. ; as it may result in requiring a temporary
  68. ; codec translation path for a channel that may
  69. ; not otherwise require one.
  70. ;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of
  71. ; directly.
  72. ;runuser = asterisk ; The user to run as.
  73. ;rungroup = asterisk ; The group to run as.
  74. ;lightbackground = yes ; If your terminal is set for a light-colored
  75. ; background.
  76. ;forceblackbackground = yes ; Force the background of the terminal to be
  77. ; black, in order for terminal colors to show
  78. ; up properly.
  79. ;defaultlanguage = en ; Default language
  80. documentation_language = en_US ; Set the language you want documentation
  81. ; displayed in. Value is in the same format as
  82. ; locale names.
  83. ;hideconnect = yes ; Hide messages displayed when a remote console
  84. ; connects and disconnects.
  85. ;lockconfdir = no ; Protect the directory containing the
  86. ; configuration files (/etc/asterisk) with a
  87. ; lock.
  88. ;stdexten = gosub ; How to invoke the extensions.conf stdexten.
  89. ; macro - Invoke the stdexten using a macro as
  90. ; done by legacy Asterisk versions.
  91. ; gosub - Invoke the stdexten using a gosub as
  92. ; documented in extensions.conf.sample.
  93. ; Default gosub.
  94. ;live_dangerously = no ; Enable the execution of 'dangerous' dialplan
  95. ; functions from external sources (AMI,
  96. ; etc.) These functions (such as SHELL) are
  97. ; considered dangerous because they can allow
  98. ; privilege escalation.
  99. ; Default yes, for backward compatability.
  100.  
  101. ; Changing the following lines may compromise your security.
  102. ;[files]
  103. ;astctlpermissions = 0660
  104. ;astctlowner = root
  105. ;astctlgroup = apache
  106. ;astctl = asterisk.ctl
  107.  
  108. [compat]
  109. pbx_realtime=1.6
  110. res_agi=1.6
  111. app_set=1.6
  112.  
  113. ------------------------
  114. extensions.conf
  115. ------------------------
  116.  
  117. [general]
  118.  
  119.  
  120. [unauthenticated]
  121. ; We currently are not accepting
  122. ; calls from unauthenticated users:
  123. exten => s, 1, Hangup()
  124.  
  125.  
  126. [from-local]
  127. ; Phone 1:
  128. exten => 100, 1, Dial(SIP/phone_1,10)
  129. same => n, VoiceMail(100@default)
  130.  
  131. ; Phone 2:
  132. exten => 101, 1, Dial(SIP/phone_2,10)
  133. same => n, VoiceMail(101@default)
  134.  
  135. ; Voicemail (dial "9<extension>"):
  136. exten => _*1, 1, ExecIf($["${CALLERID(num)}" = "phone_1"]?VoicemailMain(100@default))
  137. same => n, ExecIf($["${CALLERID(num)}" = "phone_2"]?VoicemailMain(101@default))
  138.  
  139. ; Route for outbound numbers:
  140. exten => _NXXNXXXXXX, 1, Goto(to-pstn,${EXTEN},1)
  141.  
  142.  
  143. [to-pstn]
  144. exten => _NXXNXXXXXX, 1, Dial(SIP/${EXTEN}@pstn-proxy,30)
  145.  
  146.  
  147.  
  148.  
  149.  
  150. ------------------------
  151. modules.conf
  152. ------------------------
  153.  
  154. ;
  155. ; Asterisk configuration file
  156. ;
  157. ; Module Loader configuration file
  158. ;
  159.  
  160. [modules]
  161. autoload=yes
  162. ;
  163. ; Any modules that need to be loaded before the Asterisk core has been
  164. ; initialized (just after the logger has been initialized) can be loaded
  165. ; using 'preload'. This will frequently be needed if you wish to map all
  166. ; module configuration files into Realtime storage, since the Realtime
  167. ; driver will need to be loaded before the modules using those configuration
  168. ; files are initialized.
  169. ;
  170. ; An example of loading ODBC support would be:
  171. ;preload => res_odbc.so
  172. ;preload => res_config_odbc.so
  173. ;
  174. ; Uncomment the following if you wish to use the Speech Recognition API
  175. ;preload => res_speech.so
  176. ;
  177. ; If you want Asterisk to fail if a module does not load, then use
  178. ; the "require" keyword. Asterisk will exit with a status code of 2
  179. ; if a required module does not load.
  180. ;
  181. ; require = chan_sip.so
  182. ; If you want you can combine with preload
  183. ; preload-require = res_odbc.so
  184. ;
  185. ; If you want, load the GTK console right away.
  186. ;
  187. noload => pbx_gtkconsole.so
  188. ;load => pbx_gtkconsole.so
  189. ;
  190. load => res_musiconhold.so
  191. ;
  192. ; Load one of: chan_oss, alsa, or console (portaudio).
  193. ; By default, load chan_oss only (automatically).
  194. ;
  195. noload => chan_alsa.so
  196. ;noload => chan_oss.so
  197. noload => chan_console.so
  198. ;
  199.  
  200.  
  201.  
  202.  
  203. ------------------------
  204. rtp.conf
  205. ------------------------
  206.  
  207. [general]
  208. rtpstart=10000
  209. rtpend=19999
  210. dtmftimeout=8000
  211. strictrtp=no
  212.  
  213.  
  214.  
  215.  
  216.  
  217. ------------------------
  218. sip.conf
  219. ------------------------
  220.  
  221. [general]
  222. srvlookup=no
  223. tcpenable=no
  224. context=unauthenticated
  225. udpbindaddr=0.0.0.0
  226. externip=74.74.74.74
  227. localnet=192.168.0.1/255.255.255.0
  228.  
  229. [phone](!)
  230. type=friend
  231. host=dynamic
  232. context=from-local
  233. nat=force_rport,comedia
  234. dtmfmode=auto
  235. disallow=all
  236. allow=ulaw
  237. allow=alaw
  238.  
  239. [pstn-proxy]
  240. type=peer
  241. host=75.75.75.75
  242. context=from-pstn
  243. nat=force_rport,comedia
  244. dtmfmode=auto
  245. disallow=all
  246. allow=ulaw
  247. allow=alaw
  248.  
  249. [phone_1](phone)
  250. secret=password
  251.  
  252. [phone_2](phone)
  253. secret=password
  254.  
  255.  
  256.  
  257.  
  258.  
  259. ------------------------
  260. voicemail.conf
  261. ------------------------
  262.  
  263. [general]
  264. attach=yes
  265.  
  266. [default]
  267. 100 => 1234,Bob Smith,bob@gmail.com
  268. 101 => 4321,Alice Jones,alice@gmail.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement