Various configs (see file)

From Ender, 1 Day ago, written in Plain Text, viewed 1 times. This paste will hop the perch in 3 Weeks.
URL https://pastebin.freepbx.org/view/1cc677b8 Embed
Download Paste or View Raw
  1. ;EXTENSIONS_OVERRIDE_FREEPBX.CONF
  2.  
  3. [extensions]
  4. exten => 2001,0,Goto(call-extension,${EXTEN},1)
  5. ; Note the duplication of the hint peername
  6. same => hint,SIP/2001,SIP/2001
  7. exten => 2452,0,Goto(call-extension,${EXTEN},1)
  8. same => hint,SIP/2452,SIP/2452
  9. exten => 2271,0,Goto(call-extension,${EXTEN},1)
  10. same => hint,SIP/2271,SIP/2271
  11. exten => 2861,0,Goto(call-extension,${EXTEN},1)
  12. same => hint,SIP/2861,SIP/2861
  13.  
  14.  
  15. [ext-local]
  16. exten => 2001,hint,SIP/${EXTEN},SIP/${EXTEN}
  17. exten => 2271,hint,SIP/${EXTEN},SIP/${EXTEN}
  18. exten => 2861,hint,SIP/${EXTEN},SIP/${EXTEN}
  19. exten => 2452,hint,SIP/${EXTEN},SIP/${EXTEN}
  20.  
  21. ;SIP_CUSTOM_POST.CONF
  22.  
  23. [cisco](!)
  24. cisco_usecallmanager=yes
  25. cisco_pickupnotify_alert=from,to
  26. cisco_pickupnotify_timer=5
  27. dndbusy=no
  28. rpid_update=yes
  29. rpid_immediate=yes
  30. allowsubscribe=yes
  31. notifyhold=yes
  32.  
  33. [2452](+,cisco)
  34. subscribe=2001@ext-local,2861@ext-local
  35. [2001](+,cisco)
  36. subscribe=2452@ext-local
  37. [2861](+,polycom)
  38. subscribe=2452@ext-local
  39. [2271](+,cisco)
  40. subscribe=2452@ext-local
  41.  
  42. ;EXTENSIONS_CUSTOM.CONF
  43.  
  44. ; ----- External calls, lock codec to prevent video
  45. exten => _9,.,Set(__SIP_CODEC=alaw)
  46. same => next,Goto(outbound-allroutes,${EXTEN},1)
  47.  
  48. ; ----- Feature codes, lock codec to prevent video
  49. exten => _*.,1,Set(__SIP_CODEC=g722)
  50. same => next,Goto(from-internal,${EXTEN},3)
  51.  
  52. ; ----- CISCO custom
  53. [from-internal-custom]
  54. ; ----- Strip the x-cisco-serviceuri- prefix to make handling the cisco events in the dialplan a little simpler
  55. exten => _[x]-cisco-serviceuri-.,1,Goto(${EXTEN:19},1)
  56.  
  57. ; ----- Group Pickup softkey
  58. exten => pickup,1,Pickup()
  59. same => next,Hangup(normal_circuit_congestion)
  60.  
  61. ; ----- BLF Pickup softkey
  62. exten => _blfpickup-.,1,PickupChan(SIP/${EXTEN:10})
  63. same => next,Hangup(normal_circuit_congestion)
  64.  
  65. ; ----- AdHoc call recording softkey
  66. exten => record,1,Answer()
  67. same => next,Wait(0.5)
  68. same => next,Set(CONFBRIDGE(bridge,record_conference)=yes)
  69. same => next,Set(CONFBRIDGE(bridge,record_file)=${RECORD_PEERNAME})
  70. same => next,Set(CONFBRIDGE(user,quiet)=yes)
  71. same => next,ConfBridge(${RECORD_UNIQUEID})
  72. same => next,Hangup(normal_clearing)
  73.  
  74. ; Cisco SIP phones support displaying diversion information
  75. ; ** this part not currently working **
  76. ; exten => forward,SIPAddHeader(Diversion: "${SIPPEER(${PEERNAME},callerid_name)}" <sip:${PEERNAME}@localhost>\;screen=yes\;privacy=off)
  77. ; same => Goto(extensions,${CALLFORWARD},1)
  78.  
  79. [call-extension]
  80. exten => _.,1,Set(PEERNAME=${EXTEN})
  81. ; By manually checking for call-forwarding, the call can be forwarded even if the phone is unregistered
  82. same => next,Set(CALLFORWARD=${SIPPEER(${PEERNAME},callforward)})
  83. same => next,GotoIf($[${LEN(${CALLFORWARD})} != 0]?callforward,1)
  84. same => next,Set(MAILBOX=${SIPPEER(${PEERNAME},mailbox)})
  85. ; Phones can be made to play a different ring using the Alert-Info header, see Ring Tones for examples
  86. same => next,ExecIf($[${LEN(${ALERT_INFO})} != 0]?SIPAddHeader(Alert-Info: <${ALERT_INFO}>))
  87. same => next,Dial(SIP/${PEERNAME},30)
  88. same => next,Goto(${TOLOWER(${DIALSTATUS})},1)
  89.  
  90. ; Check if forwarded to the phone's voicemail extension
  91. exten => callforward,1,GotoIf($[${CALLFORWARD} = ${SIPPEER(${PEERNAME},vmexten)}]?busy,1)
  92. ; Cisco SIP phones support displaying diversion information
  93. same => next,Set(REDIRECTING(from-all,i)="${SIPPEER(${PEERNAME},callerid_name)}" <${SIPPEER(${PEERNAME},callerid_num)}>)
  94. same => next,Set(REDIRECTING(reason,i)=cfu)
  95. same => next,Goto(extensions,${CALLFORWARD},1)
  96.  
  97. ; If ${MAILBOX} is empty send congestion, otherwise go to voicemail extension below
  98. exten => congestion,1,ExecIf($[${LEN(${MAILBOX})} = 0]?Congestion(10))
  99. same => next,Set(GREETING=u)
  100. same => next,Goto(voicemail,1)
  101.  
  102. ; If ${MAILBOX} is empty send busy, otherwise go to voicemail extension below
  103. exten => busy,1,ExecIf($[${LEN(${MAILBOX})} = 0]?Busy(10))
  104. same => next,Set(GREETING=b)
  105. same => next,Goto(voicemail,1)
  106.  
  107. exten => noanswer,1,Goto(congestion,1)
  108. exten => chanunavail,1,Goto(congestion,1)
  109.  
  110. exten => voicemail,1,Answer()
  111. same => next,Wait(0.5)
  112. same => next,VoiceMail(${MAILBOX},${GREETING})
  113. same => next,Hangup(normal_clearing)
  114.  
  115. ; Clear dial group first
  116. exten => 70001,0,Set(DIALGROUP(huntgroup)=)
  117. same => next,Set(PEERNAMES=301&302&303)
  118. same => next,While($[${LEN(${PEERNAMES})} != 0])
  119. same => next,Set(PEERNAME=${SHIFT(PEERNAMES,&)})
  120. ; Check if peer is logged-in to the hunt group and add them to the dial group if they are
  121. same => next,ExecIf($[${SIPPEER(${PEERNAME},huntgroup)} = yes]?Set(DIALGROUP(huntgroup,add)=SIP/${PEERNAME}))
  122. same => next,EndWhile()
  123. ; Send congestion if the dial group is empty
  124. same => next,ExecIf($[${LEN(${DIALGROUP(huntgroup)})} = 0]?Congestion(10))
  125. ; Phones support 'Answered Elsewhere' so the 'c' flag is included
  126. ; Later series need to be logged into the hunt-group and have CISCO_HUNTPILOT set to not record answered calls as missed
  127. same => next,Set(_CISCO_HUNTPILOT="Ring All" <${EXTEN}>)
  128. same => next,Dial(${DIALGROUP(huntgroup)},30,ic)
  129. same => next,Hangup(${HANGUPCAUSE})
  130. ; Clear dial group first
  131. exten => 70002,0,Set(DIALGROUP(huntgroup)=)
  132. same => next,Set(PEERNAMES=301&302&303)
  133. same => next,While($[${LEN(${PEERNAMES})} != 0])
  134. same => next,Set(PEERNAME=${SHIFT(PEERNAMES,&)})
  135. ; Check if peer is logged-in to the hunt group and add them to the dial group if they are
  136. same => next,ExecIf($[${SIPPEER(${PEERNAME},huntgroup)} = yes]?Set(DIALGROUP(huntgroup,add)=SIP/${PEERNAME}))
  137. same => next,EndWhile()
  138. ; Send congestion if the dial group is empty
  139. same => next,ExecIf($[${LEN(${DIALGROUP(huntgroup)})} = 0]?Congestion(10))
  140. ; Phones support 'Answered Elsewhere' so the 'c' flag is included
  141. ; Later series need to be logged into the hunt-group and have CISCO_HUNTPILOT set to not record answered calls as missed
  142. same => next,Set(_CISCO_HUNTPILOT="Ring All" <${EXTEN}>)
  143. same => next,Dial(${DIALGROUP(huntgroup)},30,ic)
  144. same => next,Hangup(${HANGUPCAUSE})
  145. ; Clear dial group first
  146. exten => 70003,0,Set(DIALGROUP(huntgroup)=)
  147. same => next,Set(PEERNAMES=301&302&303)
  148. same => next,While($[${LEN(${PEERNAMES})} != 0])
  149. same => next,Set(PEERNAME=${SHIFT(PEERNAMES,&)})
  150. ; Check if peer is logged-in to the hunt group and add them to the dial group if they are
  151. same => next,ExecIf($[${SIPPEER(${PEERNAME},huntgroup)} = yes]?Set(DIALGROUP(huntgroup,add)=SIP/${PEERNAME}))
  152. same => next,EndWhile()
  153. ; Send congestion if the dial group is empty
  154. same => next,ExecIf($[${LEN(${DIALGROUP(huntgroup)})} = 0]?Congestion(10))
  155. ; Phones support 'Answered Elsewhere' so the 'c' flag is included
  156. ; Later series need to be logged into the hunt-group and have CISCO_HUNTPILOT set to not record answered calls as missed
  157. same => next,Set(_CISCO_HUNTPILOT="Ring All" <${EXTEN}>)
  158. same => next,Dial(${DIALGROUP(huntgroup)},30,ic)
  159. same => next,Hangup(${HANGUPCAUSE})
  160. ; Clear dial group first
  161. exten => 20011,0,Set(DIALGROUP(huntgroup)=)
  162. same => next,Set(PEERNAMES=301&302&303)
  163. same => next,While($[${LEN(${PEERNAMES})} != 0])
  164. same => next,Set(PEERNAME=${SHIFT(PEERNAMES,&)})
  165. ; Check if peer is logged-in to the hunt group and add them to the dial group if they are
  166. same => next,ExecIf($[${SIPPEER(${PEERNAME},huntgroup)} = yes]?Set(DIALGROUP(huntgroup,add)=SIP/${PEERNAME}))
  167. same => next,EndWhile()
  168. ; Send congestion if the dial group is empty
  169. same => next,ExecIf($[${LEN(${DIALGROUP(huntgroup)})} = 0]?Congestion(10))
  170. ; Phones support 'Answered Elsewhere' so the 'c' flag is included
  171. ; Later series need to be logged into the hunt-group and have CISCO_HUNTPILOT set to not record answered calls as missed
  172. same => next,Set(_CISCO_HUNTPILOT="Ring All" <${EXTEN}>)
  173. same => next,Dial(${DIALGROUP(huntgroup)},30,ic)
  174. same => next,Hangup(${HANGUPCAUSE})
  175. ; Clear dial group first
  176. exten => 20012,0,Set(DIALGROUP(huntgroup)=)
  177. same => next,Set(PEERNAMES=301&302&303)
  178. same => next,While($[${LEN(${PEERNAMES})} != 0])
  179. same => next,Set(PEERNAME=${SHIFT(PEERNAMES,&)})
  180. ; Check if peer is logged-in to the hunt group and add them to the dial group if they are
  181. same => next,ExecIf($[${SIPPEER(${PEERNAME},huntgroup)} = yes]?Set(DIALGROUP(huntgroup,add)=SIP/${PEERNAME}))
  182. same => next,EndWhile()
  183. ; Send congestion if the dial group is empty
  184. same => next,ExecIf($[${LEN(${DIALGROUP(huntgroup)})} = 0]?Congestion(10))
  185. ; Phones support 'Answered Elsewhere' so the 'c' flag is included
  186. ; Later series need to be logged into the hunt-group and have CISCO_HUNTPILOT set to not record answered calls as missed
  187. same => next,Set(_CISCO_HUNTPILOT="Ring All" <${EXTEN}>)
  188. same => next,Dial(${DIALGROUP(huntgroup)},30,ic)
  189. same => next,Hangup(${HANGUPCAUSE})
  190. ; Clear dial group first
  191. exten => 20013,0,Set(DIALGROUP(huntgroup)=)
  192. same => next,Set(PEERNAMES=301&302&303)
  193. same => next,While($[${LEN(${PEERNAMES})} != 0])
  194. same => next,Set(PEERNAME=${SHIFT(PEERNAMES,&)})
  195. ; Check if peer is logged-in to the hunt group and add them to the dial group if they are
  196. same => next,ExecIf($[${SIPPEER(${PEERNAME},huntgroup)} = yes]?Set(DIALGROUP(huntgroup,add)=SIP/${PEERNAME}))
  197. same => next,EndWhile()
  198. ; Send congestion if the dial group is empty
  199. same => next,ExecIf($[${LEN(${DIALGROUP(huntgroup)})} = 0]?Congestion(10))
  200. ; Phones support 'Answered Elsewhere' so the 'c' flag is included
  201. ; Later series need to be logged into the hunt-group and have CISCO_HUNTPILOT set to not record answered calls as missed
  202. same => next,Set(_CISCO_HUNTPILOT="Ring All" <${EXTEN}>)
  203. same => next,Dial(${DIALGROUP(huntgroup)},30,ic)
  204. same => next,Hangup(${HANGUPCAUSE})
  205. ; Clear dial group first
  206. exten => 24521,0,Set(DIALGROUP(huntgroup)=)
  207. same => next,Set(PEERNAMES=301&302&303)
  208. same => next,While($[${LEN(${PEERNAMES})} != 0])
  209. same => next,Set(PEERNAME=${SHIFT(PEERNAMES,&)})
  210. ; Check if peer is logged-in to the hunt group and add them to the dial group if they are
  211. same => next,ExecIf($[${SIPPEER(${PEERNAME},huntgroup)} = yes]?Set(DIALGROUP(huntgroup,add)=SIP/${PEERNAME}))
  212. same => next,EndWhile()
  213. ; Send congestion if the dial group is empty
  214. same => next,ExecIf($[${LEN(${DIALGROUP(huntgroup)})} = 0]?Congestion(10))
  215. ; Phones support 'Answered Elsewhere' so the 'c' flag is included
  216. ; Later series need to be logged into the hunt-group and have CISCO_HUNTPILOT set to not record answered calls as missed
  217. same => next,Set(_CISCO_HUNTPILOT="Ring All" <${EXTEN}>)
  218. same => next,Dial(${DIALGROUP(huntgroup)},30,ic)
  219. same => next,Hangup(${HANGUPCAUSE})
  220. ; Clear dial group first
  221. exten => 24522,0,Set(DIALGROUP(huntgroup)=)
  222. same => next,Set(PEERNAMES=301&302&303)
  223. same => next,While($[${LEN(${PEERNAMES})} != 0])
  224. same => next,Set(PEERNAME=${SHIFT(PEERNAMES,&)})
  225. ; Check if peer is logged-in to the hunt group and add them to the dial group if they are
  226. same => next,ExecIf($[${SIPPEER(${PEERNAME},huntgroup)} = yes]?Set(DIALGROUP(huntgroup,add)=SIP/${PEERNAME}))
  227. same => next,EndWhile()
  228. ; Send congestion if the dial group is empty
  229. same => next,ExecIf($[${LEN(${DIALGROUP(huntgroup)})} = 0]?Congestion(10))
  230. ; Phones support 'Answered Elsewhere' so the 'c' flag is included
  231. ; Later series need to be logged into the hunt-group and have CISCO_HUNTPILOT set to not record answered calls as missed
  232. same => next,Set(_CISCO_HUNTPILOT="Ring All" <${EXTEN}>)
  233. same => next,Dial(${DIALGROUP(huntgroup)},30,ic)
  234. same => next,Hangup(${HANGUPCAUSE})
  235. ; Clear dial group first
  236. exten => 24523,0,Set(DIALGROUP(huntgroup)=)
  237. same => next,Set(PEERNAMES=301&302&303)
  238. same => next,While($[${LEN(${PEERNAMES})} != 0])
  239. same => next,Set(PEERNAME=${SHIFT(PEERNAMES,&)})
  240. ; Check if peer is logged-in to the hunt group and add them to the dial group if they are
  241. same => next,ExecIf($[${SIPPEER(${PEERNAME},huntgroup)} = yes]?Set(DIALGROUP(huntgroup,add)=SIP/${PEERNAME}))
  242. same => next,EndWhile()
  243. ; Send congestion if the dial group is empty
  244. same => next,ExecIf($[${LEN(${DIALGROUP(huntgroup)})} = 0]?Congestion(10))
  245. ; Phones support 'Answered Elsewhere' so the 'c' flag is included
  246. ; Later series need to be logged into the hunt-group and have CISCO_HUNTPILOT set to not record answered calls as missed
  247. same => next,Set(_CISCO_HUNTPILOT="Ring All" <${EXTEN}>)
  248. same => next,Dial(${DIALGROUP(huntgroup)},30,ic)
  249. same => next,Hangup(${HANGUPCAUSE})
  250.  
  251. [paging]
  252. ; Only allow one page at a time
  253. exten => 7255,1,Set(GROUP()=paging)
  254. same => next,ExecIf($[${GROUP_COUNT(paging)} != 1]?Busy(10))
  255. ; Multicast audio mode is enabled using the m() option
  256. same => next,SIPCiscoPage(2452&2001,oad(From ${CALLERID(number)}))
  257. same => next,Hangup(normal_clearing)
  258.  
  259. exten => _blfpickup-.,1,PickupChan(SIP/${EXTEN:10})
  260. same => next,Hangup(normal_circuit_congestion)
  261.  
  262.  
  263. exten => record,1,Answer()
  264. same => next,Wait(0.5)
  265. same => next,Set(CONFBRIDGE(bridge,record_conference)=yes)
  266. same => next,Set(CONFBRIDGE(bridge,record_file)=${RECORD_PEERNAME})
  267. same => next,Set(CONFBRIDGE(user,quiet)=yes)
  268. ; Other channel variables available are ${RECORD_CHANNEL} and ${RECORD_DIRECTION}.
  269. same => next,ConfBridge(${RECORD_UNIQUEID})
  270. same => next,Hangup(normal_clearing)
  271.  
  272. exten => _7,1,Set(_CISCO_AUTOANSWER=yes)
  273. same => next,Page(SIP/2001&SIP/2452,sni,30)
  274.  
  275. [app-blfpickup]
  276. include => app-pickup-custom
  277. exten => _[x]-cisco-serviceuri-blfpickup-.,1,Macro(user-callerid,)
  278. exten => _[x]-cisco-serviceuri-blfpickup-.,n,Set(PICKUP_EXTEN=${AMPUSER})
  279. exten => _[x]-cisco-serviceuri-blfpickup-.,n,Pickup(${EXTEN:29}&${EXTEN:29}@PICKUPMARK)
  280. exten => _[x]-cisco-serviceuri-blfpickup-.,n,Hangup
  281.  
  282. ;SIP_CUSTOM.CONF
  283. [extension](!)
  284. type=friend
  285. context=extensions
  286. host=dynamic
  287. trustrpid=no
  288. parkinglot=default
  289. allowsubscribe=yes
  290. notifyhold=no
  291. callcounter=yes
  292. videosupport=no
  293. disallow=all
  294. allow=g722,ulaw,alaw,g729
  295.  
  296. [cisco-usecallmanager](!,extension)
  297. transport=tcp
  298. nat=no
  299. directmedia=no
  300. sendrpid=rpid
  301. rpid_update=yes
  302. rpid_immediate=yes
  303. send_diversion=yes
  304. dndbusy=yes
  305. cisco_usecallmanager=yes
  306. cisco_pickupnotify_alert=from,to
  307. cisco_pickupnotify_timer=5
  308. cisco_keep_conference=no
  309. cisco_multiadmin_conference=yes
  310. huntgroup_default=no

Reply to "Various configs (see file)"

Here you can reply to the paste above