Advertisement
Guest User

extensions.conf

a guest
Oct 21st, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.17 KB | None | 0 0
  1. ;!
  2. ;! Automatically generated configuration file
  3. ;! Filename: extensions.conf (/etc/asterisk/extensions.conf)
  4. ;! Generator: Manager
  5. ;! Creation Date: Fri Oct 19 14:21:22 2012
  6. ;!
  7. ; extensions.conf - the Asterisk dial plan
  8. ;
  9. ; Static extension configuration file, used by
  10. ; the pbx_config module. This is where you configure all your
  11. ; inbound and outbound calls in Asterisk.
  12. ;
  13. ; This configuration file is reloaded
  14. ; - With the "dialplan reload" command in the CLI
  15. ; - With the "reload" command (that reloads everything) in the CLI
  16.  
  17. ;
  18. ; The "General" category is for certain variables.
  19. ;
  20. [general]
  21. ;
  22. ; If static is set to no, or omitted, then the pbx_config will rewrite
  23. ; this file when extensions are modified. Remember that all comments
  24. ; made in the file will be lost when that happens.
  25. ;
  26. ; XXX Not yet implemented XXX
  27. ;
  28. static = yes
  29. ;
  30. ; if static=yes and writeprotect=no, you can save dialplan by
  31. ; CLI command "dialplan save" too
  32. ;
  33. writeprotect = no
  34. ;
  35. ; If autofallthrough is set, then if an extension runs out of
  36. ; things to do, it will terminate the call with BUSY, CONGESTION
  37. ; or HANGUP depending on Asterisk's best guess. This is the default.
  38. ;
  39. ; If autofallthrough is not set, then if an extension runs out of
  40. ; things to do, Asterisk will wait for a new extension to be dialed
  41. ; (this is the original behavior of Asterisk 1.0 and earlier).
  42. ;
  43. ;autofallthrough=no
  44. ;
  45. ;
  46. ;
  47. ; If extenpatternmatchnew is set (true, yes, etc), then a new algorithm that uses
  48. ; a Trie to find the best matching pattern is used. In dialplans
  49. ; with more than about 20-40 extensions in a single context, this
  50. ; new algorithm can provide a noticeable speedup.
  51. ; With 50 extensions, the speedup is 1.32x
  52. ; with 88 extensions, the speedup is 2.23x
  53. ; with 138 extensions, the speedup is 3.44x
  54. ; with 238 extensions, the speedup is 5.8x
  55. ; with 438 extensions, the speedup is 10.4x
  56. ; With 1000 extensions, the speedup is ~25x
  57. ; with 10,000 extensions, the speedup is 374x
  58. ; Basically, the new algorithm provides a flat response
  59. ; time, no matter the number of extensions.
  60. ;
  61. ; By default, the old pattern matcher is used.
  62. ;
  63. ; ****This is a new feature! *********************
  64. ; The new pattern matcher is for the brave, the bold, and
  65. ; the desperate. If you have large dialplans (more than about 50 extensions
  66. ; in a context), and/or high call volume, you might consider setting
  67. ; this value to "yes" !!
  68. ; Please, if you try this out, and are forced to return to the
  69. ; old pattern matcher, please report your reasons in a bug report
  70. ; on https://issues.asterisk.org. We have made good progress in providing
  71. ; something compatible with the old matcher; help us finish the job!
  72. ;
  73. ; This value can be switched at runtime using the cli command "dialplan set extenpatternmatchnew true"
  74. ; or "dialplan set extenpatternmatchnew false", so you can experiment to your hearts content.
  75. ;
  76. ;extenpatternmatchnew=no
  77. ;
  78. ; If clearglobalvars is set, global variables will be cleared
  79. ; and reparsed on a dialplan reload, or Asterisk reload.
  80. ;
  81. ; If clearglobalvars is not set, then global variables will persist
  82. ; through reloads, and even if deleted from the extensions.conf or
  83. ; one of its included files, will remain set to the previous value.
  84. ;
  85. ; NOTE: A complication sets in, if you put your global variables into
  86. ; the AEL file, instead of the extensions.conf file. With clearglobalvars
  87. ; set, a "reload" will often leave the globals vars cleared, because it
  88. ; is not unusual to have extensions.conf (which will have no globals)
  89. ; load after the extensions.ael file (where the global vars are stored).
  90. ; So, with "reload" in this particular situation, first the AEL file will
  91. ; clear and then set all the global vars, then, later, when the extensions.conf
  92. ; file is loaded, the global vars are all cleared, and then not set, because
  93. ; they are not stored in the extensions.conf file.
  94. ;
  95. clearglobalvars = no
  96. ;
  97. ; User context is where entries from users.conf are registered. The
  98. ; default value is 'default'
  99. ;
  100. ;userscontext=default
  101. ;
  102. ; You can include other config files, use the #include command
  103. ; (without the ';'). Note that this [globals]
  104. FEATURES =
  105. DIALOPTIONS =
  106. RINGTIME = 20
  107. FOLLOWMEOPTIONS =
  108. PAGING_HEADER = Intercom
  109. [default]
  110. [macro-stdexten]
  111. exten = s,1,Set(__DYNAMIC_FEATURES=${FEATURES})
  112. exten = s,2,Set(ORIG_ARG1=${ARG1})
  113. exten = s,3,GotoIf($["${FOLLOWME_${ARG1}}" = "1"]?6:4)
  114. exten = s,4,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
  115. exten = s,5,Goto(s-${DIALSTATUS},1)
  116. exten = s,6,Macro(stdexten-followme,${ARG1},${ARG2})
  117. exten = s-NOANSWER,1,Voicemail(${ORIG_ARG1},u)
  118. exten = s-NOANSWER,2,Goto(default,s,1)
  119. exten = s-BUSY,1,Voicemail(${ORIG_ARG1},b)
  120. exten = s-BUSY,2,Goto(default,s,1)
  121. exten = _s-.,1,Goto(s-NOANSWER,1)
  122. exten = a,1,VoicemailMain(${ORIG_ARG1})
  123. [macro-stdexten-followme]
  124. exten = s,1,Answer
  125. exten = s,2,Set(ORIG_ARG1=${ARG1})
  126. exten = s,3,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
  127. exten = s,4,Set(__FMCIDNUM=${CALLERID(num)})
  128. exten = s,5,Set(__FMCIDNAME=${CALLERID(name)})
  129. exten = s,6,Followme(${ORIG_ARG1},${FOLLOWMEOPTIONS})
  130. exten = s,7,Voicemail(${ORIG_ARG1},u)
  131. exten = s-NOANSWER,1,Voicemail(${ORIG_ARG1},u)
  132. exten = s-BUSY,1,Voicemail(${ORIG_ARG1},b)
  133. exten = s-BUSY,2,Goto(default,s,1)
  134. exten = _s-.,1,Goto(s-NOANSWER,1)
  135. exten = a,1,VoicemailMain(${ORIG_ARG1})
  136. [macro-pagingintercom]
  137. exten = s,1,SIPAddHeader(Alert-Info: ${PAGING_HEADER})
  138. exten = s,2,Page(${ARG1},${ARG2})
  139. exten = s,3,Hangup
  140. [conferences]
  141. [ringgroups]
  142.  
  143.  
  144. exten = 6400,1,Goto(ringroups-custom-1,s,1)
  145. exten = 6401,1,Goto(ringroups-custom-2,s,1)
  146.  
  147. [queues]
  148. [voicemenus]
  149. [voicemailgroups]
  150. [directory]
  151. [page_an_extension]
  152. [pagegroups]
  153. [asterisk_guitools]
  154. exten = executecommand,1,System(${command})
  155. exten = executecommand,n,Hangup()
  156. exten = record_vmenu,1,Answer
  157. exten = record_vmenu,n,Playback(vm-intro)
  158. exten = record_vmenu,n,Record(${var1},0,500,k)
  159. exten = record_vmenu,n,Playback(vm-saved)
  160. exten = record_vmenu,n,Playback(vm-goodbye)
  161. exten = record_vmenu,n,Hangup
  162. exten = play_file,1,Answer
  163. exten = play_file,n,Playback(${var1})
  164. exten = play_file,n,Hangup
  165. [macro-local-callingrule-cid-0.1]
  166. exten = s,1,Set(CALLERID(all)=${IF($[${LEN(${ARG4})} > 2]?${ARG4}:)})
  167. exten = s,n,Goto(${ARG1},${ARG2},${ARG3})
  168. [macro-trunkdial-failover-0.3]
  169. exten = s,1,GotoIf($[${LEN(${FMCIDNUM})} > 6]?1-fmsetcid,1)
  170. exten = s,n,GotoIf($[${LEN(${GLOBAL_OUTBOUNDCIDNAME})} > 1]?1-setgbobname,1)
  171. exten = s,n,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:)})
  172. exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${ARG5})} > 2]?${ARG5}:)})
  173. exten = s,n,GotoIf($[${LEN(${CALLERID(num)})} > 6]?1-dial,1)
  174. exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 6]?${CID_${ARG3}}:${GLOBAL_OUTBOUNDCID})})
  175. exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${ARG5})} > 2]?${ARG5}:)})
  176. exten = s,n,Goto(1-dial,1)
  177. exten = 1-setgbobname,1,Set(CALLERID(name)=${GLOBAL_OUTBOUNDCIDNAME})
  178. exten = 1-setgbobname,n,Goto(s,3)
  179. exten = 1-fmsetcid,1,Set(CALLERID(num)=${FMCIDNUM})
  180. exten = 1-fmsetcid,n,Set(CALLERID(name)=${FMCIDNAME})
  181. exten = 1-fmsetcid,n,Goto(s,4)
  182. exten = 1-dial,1,Dial(${ARG1})
  183. exten = 1-dial,n,Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1)
  184. exten = 1-CHANUNAVAIL,1,Dial(${ARG2})
  185. exten = 1-CHANUNAVAIL,n,Hangup()
  186. exten = 1-CONGESTION,1,Dial(${ARG2})
  187. exten = 1-CONGESTION,n,Hangup()
  188. exten = 1-out,1,Hangup()
  189. [globals]
  190. FEATURES =
  191. DIALOPTIONS =
  192. RINGTIME = 20
  193. FOLLOWMEOPTIONS =
  194. PAGING_HEADER = Intercom
  195. trunk_1 = DAHDI/g1
  196. group_1 = DAHDI/g1
  197. timeinterval_caallcenter = *,mon-fri,*,*
  198. timeinterval_day = *,mon-fri,*,*
  199.  
  200. [queue-member-manager]
  201. exten = handle_member,1,Verbose(2, Looping through queues to log in or out queue members)
  202. exten = handle_member,n,Set(thisActiveMember=${CHANNEL(channeltype)}/${CHANNEL(peername)})
  203. exten = handle_member,n,Set(queue_field=2)
  204. exten = handle_member,n,Set(thisQueueXtn=${CUT(QUEUES,\,,${queue_field})})
  205. exten = handle_member,n,While($[${EXISTS(${thisQueueXtn})}])
  206. exten = handle_member,n,Macro(member-loginlogout)
  207. exten = handle_member,n,Set(queue_field=$[${queue_field} + 1])
  208. exten = handle_member,n,Set(thisQueueXtn=${CUT(QUEUES,\,,${queue_field})})
  209. exten = handle_member,n,EndWhile()
  210. [macro-member-loginlogout]
  211. exten = s,1,Verbose(2, Logging queue member in or out of the request queue)
  212. exten = s,n,Set(thisQueue=${thisQueueXtn})
  213. exten = s,n,Set(queueMembers=${QUEUE_MEMBER_LIST(${thisQueue})})
  214. exten = s,n,Set(field=1)
  215. exten = s,n,Set(logged_in=0)
  216. exten = s,n,Set(thisQueueMember=${CUT(queueMembers,\,,${field})})
  217. exten = s,n,While($[${EXISTS(${thisQueueMember})}])
  218. exten = s,n,GotoIf($["${thisQueueMember}" != "${thisActiveMember}"]?check_next)
  219. exten = s,n,Set(logged_in=1)
  220. exten = s,n,ExitWhile()
  221. exten = s,n(check_next),Set(field=$[${field} + 1])
  222. exten = s,n,Set(thisQueueMember=${CUT(queueMembers,\,,${field})})
  223. exten = s,n,EndWhile()
  224. exten = s,n,MacroIf($[${logged_in} = 0]?q_login:q_logout)
  225. [macro-q_login]
  226. exten = s,1,Verbose(2, Logging ${thisActiveMember} into the ${thisQueue} queue)
  227. exten = s,n,AddQueueMember(${thisQueue},${thisActiveMember})
  228. exten = s,n,Playback(silence/1)
  229. exten = s,n,ExecIf($["${AQMSTATUS}" = "ADDED"]?Playback(agent-loginok):Playback(an-error-has-occurred))
  230. [macro-q_logout]
  231. exten = s,1,Verbose(2, Logged ${thisActiveMember} out of ${thisQueue} queue)
  232. exten = s,n,RemoveQueueMember(${thisQueue},${thisActiveMember})
  233. exten = s,n,Playback(silence/1)
  234. exten = s,n,ExecIf($["${RQMSTATUS}" = "REMOVED"]?Playback(agent-loggedoff):Playback(an-error-has-occurred))
  235.  
  236.  
  237. [CallingRule_extensions]
  238. exten = o,1,Goto(default,6000,1)
  239. exten = _#6XXX,1,Set(MBOX=${EXTEN:1}@default)
  240. exten = _#6XXX,n,VoiceMail(${MBOX})
  241. exten = a,1,VoicemailMain(${MBOX})
  242. exten = 6100,1,VoiceMailMain(${CALLERID(num)}@default)
  243.  
  244. [CallingRule_landline]
  245. exten = X,1,Macro(trunkdial-failover-0.3,${group_1}/${EXTEN:0},,trunk_1,,gas line)
  246.  
  247. [CallingRule_safcom]
  248. exten = _07XXXXXXXX,1,Macro(trunkdial-failover-0.3,${group_1}/${EXTEN:0},,trunk_1,)
  249. [DLPN_safcomgsm]
  250. include = CallingRule_extensions
  251. include = CallingRule_landline
  252. include = CallingRule_safcom
  253. include = default
  254. include = parkedcalls
  255. include = conferences
  256. include = ringgroups
  257. include = voicemenus
  258. include = queues
  259. include = voicemailgroups
  260. include = directory
  261. include = pagegroups
  262. include = page_an_extension
  263.  
  264. [DID_trunk_1_timeinterval_caallcenter]
  265.  
  266. [DID_trunk_1_default]
  267. [DID_trunk_1_timeinterval_callcenter]
  268. exten = s,1,ExecIf($[ "${CALLERID(num)}"="" ]?SetCallerPres(unavailable))
  269. exten = s,2,ExecIf($[ "${CALLERID(num)}"="" ]?Set(CALLERID(all)=unknown <0000000>))
  270. exten = s,3,Goto(ringroups-custom-1,s,1
  271.  
  272. [DID_trunk_1]
  273. include = DID_trunk_1_timeinterval_day,${timeinterval_day}
  274. include = DID_trunk_1_timeinterval_caallcenter,${timeinterval_caallcenter}
  275. include = DID_trunk_1_timeinterval_caallcenter,${timeinterval_caallcenter}
  276. include = DID_trunk_1_default
  277.  
  278. [DID_trunk_1_timeinterval_day]
  279. exten = s,1,ExecIf($[ "${CALLERID(num)}"="" ]?SetCallerPres(unavailable))
  280. exten = s,2,ExecIf($[ "${CALLERID(num)}"="" ]?Set(CALLERID(all)=unknown <0000000>))
  281. exten = s,3,Goto(ringroups-custom-2,s,1)
  282. [ringroups-custom-2]
  283. exten = s,1,NoOp(callc2)
  284. exten = s,n,Dial(SIP/6006,7,${DIALOPTIONS}i)
  285. exten = s,n,Dial(SIP/6004,7,${DIALOPTIONS}i)
  286. exten = s,n,Dial(SIP/6010,7,${DIALOPTIONS}i)
  287. exten = s,n,Goto(default,6004,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement