SHARE
TWEET

Untitled

a guest Mar 20th, 2016 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UPDATED:
  2.  
  3. [from-queue]
  4. include => from-queue-custom
  5. exten => 111,1,Goto(from-internal,${QAGENT},1)
  6.  
  7. exten => _X!,1,Set(QAGENT=${EXTEN})
  8. exten => _X!,n,Goto(${NODEST},1)
  9.  
  10. ;--== end of [from-queue] ==--;
  11.  
  12.  
  13. ORIGINAL:
  14. ;--------------------------------------------------------------------------------;
  15. ;          Do NOT edit this file as it is auto-generated by FreePBX.             ;
  16. ;--------------------------------------------------------------------------------;
  17. ; For information on adding additional paramaters to this file, please visit the ;
  18. ; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
  19. ; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
  20. ; is totally deliberate.                                                         ;
  21. ;--------------------------------------------------------------------------------;
  22. [globals]
  23. MIXMON_BEEP =
  24. QUEDEVSTATE = TRUE
  25. QUEUETOGGLE = *45
  26. QUEUEPAUSETOGGLE = *46
  27. DYNAMIC_FEATURES = apprecord
  28. INTERCOMCODE = *80
  29. ASTETCDIR = /etc/asterisk
  30. ASTMODDIR = /usr/lib/asterisk/modules
  31. ASTVARLIBDIR = /var/lib/asterisk
  32. ASTAGIDIR = /var/lib/asterisk/agi-bin
  33. ASTSPOOLDIR = /var/spool/asterisk
  34. ASTRUNDIR = /var/run/asterisk
  35. ASTLOGDIR = /var/log/asterisk
  36. CWINUSEBUSY = 1
  37. AMPMGRUSER = admin
  38. AMPMGRPASS = efef34ttdsa3
  39. ASTMANAGERHOST = localhost
  40. AMPDBENGINE = mysql
  41. AMPDBHOST = localhost
  42. AMPDBNAME = asterisk
  43. AMPDBUSER = freepbxuser
  44. AMPDBPASS = ee914d04b542d8b7e1cc1d81d68c63b8
  45. VMX_CONTEXT = from-internal
  46. VMX_PRI = 1
  47. VMX_TIMEDEST_CONTEXT =
  48. VMX_TIMEDEST_EXT = dovm
  49. VMX_TIMEDEST_PRI = 1
  50. VMX_LOOPDEST_CONTEXT =
  51. VMX_LOOPDEST_EXT = dovm
  52. VMX_LOOPDEST_PRI = 1
  53. MIXMON_DIR =
  54. MIXMON_POST =
  55. DIAL_OPTIONS = Ttr
  56. TRUNK_OPTIONS = Tt
  57. TRUNK_RING_TIMER = 300
  58. MIXMON_FORMAT = wav
  59. REC_POLICY = caller
  60. RINGTIMER_DEFAULT = 15
  61. TRANSFER_CONTEXT = from-internal-xfer
  62. ASTVERSION = 13.7.2
  63. ASTCHANDAHDI = 1
  64. NULL = ""
  65. OUT_1 = DAHDI/g0
  66. OUTCID_1 =
  67. OUTMAXCHANS_1 =
  68. OUTFAIL_1 =
  69. OUTPREFIX_1 =
  70. OUTDISABLE_1 = off
  71. OUTKEEPCID_1 =
  72. FORCEDOUTCID_1 =
  73. PREFIX_TRUNK_1 =
  74. OUT_2 = SIP/flowroute1
  75. OUTCID_2 = TestSIP
  76. OUTMAXCHANS_2 =
  77. OUTFAIL_2 =
  78. OUTPREFIX_2 =
  79. OUTDISABLE_2 = off
  80. OUTKEEPCID_2 = off
  81. FORCEDOUTCID_2 =
  82. PREFIX_TRUNK_2 = 1
  83. ALLOW_SIP_ANON = yes
  84. #include globals_custom.conf
  85.  
  86. ;end of [globals]
  87.  
  88. [sub-record-cancel]
  89. include => sub-record-cancel-custom
  90. exten => s,1,Return()
  91.  
  92. ;--== end of [sub-record-cancel] ==--;
  93.  
  94.  
  95. [sub-record-check]
  96. include => sub-record-check-custom
  97. exten => s,1,GotoIf($[${LEN(${FROMEXTEN})}]?initialized)
  98. exten => s,n,Set(__REC_STATUS=INITIALIZED)
  99. exten => s,n,Set(NOW=${EPOCH})
  100. exten => s,n,Set(__DAY=${STRFTIME(${NOW},,%d)})
  101. exten => s,n,Set(__MONTH=${STRFTIME(${NOW},,%m)})
  102. exten => s,n,Set(__YEAR=${STRFTIME(${NOW},,%Y)})
  103. exten => s,n,Set(__TIMESTR=${YEAR}${MONTH}${DAY}-${STRFTIME(${NOW},,%H%M%S)})
  104. exten => s,n,Set(__FROMEXTEN=${IF($[${LEN(${AMPUSER})}]?${AMPUSER}:${IF($[${LEN(${REALCALLERIDNUM})}]?${REALCALLERIDNUM}:unknown)})})
  105. exten => s,n,Set(__MON_FMT=${IF($["${MIXMON_FORMAT}"="wav49"]?WAV:${MIXMON_FORMAT})})
  106. exten => s,n(initialized),Noop(Recordings initialized)
  107. exten => s,n,ExecIf($[!${LEN(${ARG3})}]?Set(ARG3=dontcare))
  108. exten => s,n,Set(REC_POLICY_MODE_SAVE=${REC_POLICY_MODE})
  109. exten => s,n,ExecIf($["${BLINDTRANSFER}${ATTENDEDTRANSFER}" != ""]?Set(REC_STATUS=NO))
  110. exten => s,n(next),GotoIf($[${LEN(${ARG1})}]?checkaction)
  111. exten => s,n(recorderror),Playback(something-terribly-wrong,error)
  112. exten => s,n,Hangup
  113. exten => s,n(checkaction),GotoIf($[${DIALPLAN_EXISTS(sub-record-check,${ARG1})}]?sub-record-check,${ARG1},1)
  114. exten => s,n,Noop(Generic ${ARG1} Recording Check - ${FROMEXTEN} ${ARG2})
  115. exten => s,n,Gosub(recordcheck,1(${ARG3},${ARG1},${ARG2}))
  116. exten => s,n,Return()
  117.  
  118. exten => recordcheck,1,Noop(Starting recording check against ${ARG1})
  119. exten => recordcheck,n,Goto(${ARG1})
  120. exten => recordcheck,n(dontcare),Return()
  121. exten => recordcheck,n(always),Noop(Detected legacy "always" entry. Mapping to "force")
  122. exten => recordcheck,n(force),Set(__REC_POLICY_MODE=FORCE)
  123. exten => recordcheck,n,GotoIf($["${REC_STATUS}"!="RECORDING"]?startrec)
  124. exten => recordcheck,n,Return()
  125. exten => recordcheck,n(delayed),Noop(Detected legacy "delayed" entry. Mapping to "yes")
  126. exten => recordcheck,n(yes),ExecIf($["${REC_POLICY_MODE}" = "NEVER" | "${REC_POLICY_MODE}" = "NO" | "${REC_STATUS}" = "RECORDING"]?Return())
  127. exten => recordcheck,n,Set(__REC_POLICY_MODE=YES)
  128. exten => recordcheck,n,Goto(startrec)
  129. exten => recordcheck,n(no),Set(__REC_POLICY_MODE=NO)
  130. exten => recordcheck,n,Return()
  131. exten => recordcheck,n(never),Set(__REC_POLICY_MODE=NEVER)
  132. exten => recordcheck,n,Goto(stoprec)
  133. exten => recordcheck,n(startrec),Noop(Starting recording: ${ARG2}, ${ARG3})
  134. exten => recordcheck,n,Set(AUDIOHOOK_INHERIT(MixMonitor)=yes)
  135. exten => recordcheck,n,Set(__CALLFILENAME=${ARG2}-${ARG3}-${FROMEXTEN}-${TIMESTR}-${UNIQUEID})
  136. exten => recordcheck,n,MixMonitor(${MIXMON_DIR}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}.${MON_FMT},ai(LOCAL_MIXMON_ID)${MIXMON_BEEP},${MIXMON_POST})
  137. exten => recordcheck,n,Set(__MIXMON_ID=${LOCAL_MIXMON_ID})
  138. exten => recordcheck,n,Set(__RECORD_ID=${CHANNEL(name)})
  139. exten => recordcheck,n,Set(__REC_STATUS=RECORDING)
  140. exten => recordcheck,n,Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT})
  141. exten => recordcheck,n,Return()
  142. exten => recordcheck,n(stoprec),Noop(Stopping recording: ${ARG2}, ${ARG3})
  143. exten => recordcheck,n,Set(__REC_STATUS=STOPPED)
  144. exten => recordcheck,n,System(/var/lib/asterisk/bin/stoprecording.php "${CHANNEL(name)}")
  145. exten => recordcheck,n,Return()
  146.  
  147. exten => out,1,Noop(Outbound Recording Check from ${FROMEXTEN} to ${ARG2})
  148. exten => out,n,Set(RECMODE=${DB(AMPUSER/${FROMEXTEN}/recording/out/external)})
  149. exten => out,n,ExecIf($[!${LEN(${RECMODE})} | "${RECMODE}" = "dontcare"]?Goto(routewins))
  150. exten => out,n,ExecIf($["${ARG3}" = "never" | "${ARG3}" = "force"]?Goto(routewins))
  151. exten => out,n(extenwins),Gosub(recordcheck,1(${RECMODE},out,${ARG2}))
  152. exten => out,n,Return()
  153. exten => out,n(routewins),Gosub(recordcheck,1(${ARG3},out,${ARG2}))
  154. exten => out,n,Return()
  155.  
  156. exten => in,1,Noop(Inbound Recording Check to ${ARG2})
  157. exten => in,n,Set(FROMEXTEN=unknown)
  158. exten => in,n,ExecIf($[${LEN(${CALLERID(num)})}]?Set(FROMEXTEN=${CALLERID(num)}))
  159. exten => in,n,Gosub(recordcheck,1(${ARG3},in,${ARG2}))
  160. exten => in,n,Return()
  161.  
  162. exten => exten,1,Noop(Exten Recording Check between ${FROMEXTEN} and ${ARG2})
  163. exten => exten,n,Set(CALLTYPE=${IF($[${LEN(${FROM_DID})}]?external:internal)})
  164. exten => exten,n,ExecIf(${LEN(${CALLTYPE_OVERRIDE})}?Set(CALLTYPE=${CALLTYPE_OVERRIDE}))
  165. exten => exten,n,Set(CALLEE=${DB(AMPUSER/${ARG2}/recording/in/${CALLTYPE})})
  166. exten => exten,n,ExecIf($[!${LEN(${CALLEE})}]?Set(CALLEE=dontcare))
  167. exten => exten,n,GotoIf($["${CALLTYPE}"="external"]?callee)
  168. exten => exten,n,GotoIf($["${CALLEE}"="dontcare"]?caller)
  169. exten => exten,n,ExecIf($[${LEN(${DB(AMPUSER/${FROMEXTEN}/recording/priority)})}]?Set(CALLER_PRI=${DB(AMPUSER/${FROMEXTEN}/recording/priority)}):Set(CALLER_PRI=0))
  170. exten => exten,n,ExecIf($[${LEN(${DB(AMPUSER/${ARG2}/recording/priority)})}]?Set(CALLEE_PRI=${DB(AMPUSER/${ARG2}/recording/priority)}):Set(CALLEE_PRI=0))
  171. exten => exten,n,GotoIf($["${CALLER_PRI}"="${CALLEE_PRI}"]?${REC_POLICY}:${IF($[${CALLER_PRI}>${CALLEE_PRI}]?caller:callee)})
  172. exten => exten,n(callee),Gosub(recordcheck,1(${CALLEE},${CALLTYPE},${ARG2}))
  173. exten => exten,n,Return()
  174. exten => exten,n(caller),Set(RECMODE=${DB(AMPUSER/${FROMEXTEN}/recording/out/internal)})
  175. exten => exten,n,ExecIf($[!${LEN(${RECMODE})}]?Set(RECMODE=dontcare))
  176. exten => exten,n,ExecIf($["${RECMODE}"="dontcare"]?Set(RECMODE=${CALLEE}))
  177. exten => exten,n,Gosub(recordcheck,1(${RECMODE},${CALLTYPE},${ARG2}))
  178. exten => exten,n,Return()
  179.  
  180. exten => conf,1,Noop(Conference Recording Check ${FROMEXTEN} to ${ARG2})
  181. exten => conf,n,Gosub(recconf,1(${ARG2},${ARG2},${ARG3}))
  182. exten => conf,n,Return()
  183.  
  184. exten => page,1,Noop(Paging Recording Check ${FROMEXTEN} to ${ARG2})
  185. exten => page,n,GosubIf($["${REC_POLICY_MODE}"="always"]?recconf,1(${ARG2},${FROMEXTEN},${ARG3}))
  186. exten => page,n,Return()
  187.  
  188. exten => recconf,1,Noop(Setting up recording: ${ARG1}, ${ARG2}, ${ARG3})
  189. exten => recconf,n,Set(__CALLFILENAME=${IF($[${CONFBRIDGE_INFO(parties,${ARG2})}]?${DB(RECCONF/${ARG2})}:${ARG1}-${ARG2}-${ARG3}-${TIMESTR}-${UNIQUEID})})
  190. exten => recconf,n,ExecIf($[!${CONFBRIDGE_INFO(parties,${ARG2})}]?Set(DB(RECCONF/${ARG2})=${CALLFILENAME}))
  191. exten => recconf,n,Set(CONFBRIDGE(bridge,record_file)=${MIXMON_DIR}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}.${MON_FMT})
  192. exten => recconf,n,ExecIf($["${ARG3}"!="always"]?Return())
  193. exten => recconf,n,Set(CONFBRIDGE(bridge,record_conference)=yes)
  194. exten => recconf,n,Set(__REC_STATUS=RECORDING)
  195. exten => recconf,n,Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT})
  196. exten => recconf,n,Return()
  197.  
  198. exten => recq,1,Noop(Setting up recording: ${ARG1}, ${ARG2}, ${ARG3})
  199. exten => recq,n,Set(AUDIOHOOK_INHERIT(MixMonitor)=yes)
  200. exten => recq,n,Set(MONITOR_FILENAME=${MIXMON_DIR}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME})
  201. exten => recq,n,MixMonitor(${MONITOR_FILENAME}.${MON_FMT},${MONITOR_OPTIONS}${MIXMON_BEEP},${MIXMON_POST})
  202. exten => recq,n,Set(__REC_STATUS=RECORDING)
  203. exten => recq,n,Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT})
  204. exten => recq,n,Return()
  205.  
  206. exten => parking,1,Noop(User ${ARG2} picked up a parked call)
  207. exten => parking,n,Set(USER=${ARG2})
  208. exten => parking,n,ExecIf($[!${LEN(${ARG2})}]?Set(USER=unknown))
  209. exten => parking,n,Set(RECMODE=${DB(AMPUSER/${ARG2}/recording/out/internal)})
  210. exten => parking,n,ExecIf($[!${LEN(${RECMODE})}]?Set(RECMODE=dontcare))
  211. exten => parking,n,Gosub(recordcheck,1(${RECMODE},parked,${USER}))
  212. exten => parking,n,Return()
  213.  
  214. ;--== end of [sub-record-check] ==--;
  215.  
  216.  
  217. [macro-one-touch-record]
  218. include => macro-one-touch-record-custom
  219. exten => s,1,Set(ONETOUCH_REC_SCRIPT_STATUS=)
  220. exten => s,n,System(/var/lib/asterisk/bin/one_touch_record.php "${CHANNEL(name)}")
  221. exten => s,n,Noop(ONETOUCH_REC_SCRIPT_STATUS: [${ONETOUCH_REC_SCRIPT_STATUS}])
  222. exten => s,n,ExecIf($["${REC_STATUS}"="RECORDING"]?Playback(beep))
  223. exten => s,n,ExecIf($["${REC_STATUS}"="STOPPED"]?Playback(beep&beep))
  224. exten => s,n,ExecIf($["${ONETOUCH_REC_SCRIPT_STATUS:0:6}"="DENIED"]?Playback(access-denied))
  225. exten => s,n,MacroExit()
  226.  
  227. ;--== end of [macro-one-touch-record] ==--;
  228.  
  229.  
  230. [ext-featurecodes]
  231. include => ext-featurecodes-custom
  232. exten => 555,1,Goto(from-internal,555,1)
  233.  
  234. exten => 7777,1,Goto(from-internal,7777,1)
  235.  
  236. exten => 888,1,Goto(from-internal,888,1)
  237.  
  238. exten => *43,1,Goto(from-internal,*43,1)
  239.  
  240. exten => *60,1,Goto(from-internal,*60,1)
  241.  
  242. exten => *98,1,Goto(from-internal,*98,1)
  243.  
  244. ;--== end of [ext-featurecodes] ==--;
  245.  
  246.  
  247. [app-calltrace]
  248. include => app-calltrace-custom
  249. exten => *69,1,Goto(app-calltrace-perform,s,1)
  250.  
  251. ;--== end of [app-calltrace] ==--;
  252.  
  253.  
  254. [app-calltrace-perform]
  255. include => app-calltrace-perform-custom
  256. exten => s,1,Answer
  257. exten => s,n,Wait(1)
  258. exten => s,n,Macro(user-callerid,)
  259. exten => s,n,Playback(info-about-last-call&telephone-number)
  260. exten => s,n,Set(lastcaller=${DB(CALLTRACE/${AMPUSER})})
  261. exten => s,n,GotoIf($[ $[ "${lastcaller}" = "" ] | $[ "${lastcaller}" = "unknown" ] ]?noinfo)
  262. exten => s,n,SayDigits(${lastcaller})
  263. exten => s,n,Set(TIMEOUT(digit)=3)
  264. exten => s,n,Set(TIMEOUT(response)=7)
  265. exten => s,n,Background(to-call-this-number&press-1)
  266. exten => s,n,Goto(fin)
  267. exten => s,n(noinfo),Playback(from-unknown-caller)
  268. exten => s,n,Macro(hangupcall,)
  269. exten => s,n(fin),Noop(Waiting for input)
  270. exten => s,n,WaitExten(60,)
  271. exten => s,n,Playback(sorry-youre-having-problems&goodbye)
  272.  
  273. exten => 1,1,Goto(from-internal,${lastcaller},1)
  274.  
  275. exten => i,1,Playback(vm-goodbye)
  276. exten => i,n,Macro(hangupcall,)
  277.  
  278. exten => t,1,Playback(vm-goodbye)
  279. exten => t,n,Macro(hangupcall,)
  280.  
  281. ;--== end of [app-calltrace-perform] ==--;
  282.  
  283.  
  284. [app-echo-test]
  285. include => app-echo-test-custom
  286. exten => *43,1,Answer
  287. exten => *43,n,Macro(user-callerid,)
  288. exten => *43,n,Wait(1)
  289. exten => *43,n,Background(demo-echotest,,,app-echo-test-echo)
  290. exten => *43,n,Goto(app-echo-test-echo,1,1)
  291.  
  292. ;--== end of [app-echo-test] ==--;
  293.  
  294.  
  295. [app-echo-test-echo]
  296. include => app-echo-test-echo-custom
  297. exten => _[0-9#*],1,Echo()
  298. exten => _[0-9#*],n,Playback(demo-echodone)
  299. exten => _[0-9#*],n,Hangup
  300.  
  301. ;--== end of [app-echo-test-echo] ==--;
  302.  
  303.  
  304. [app-speakextennum]
  305. include => app-speakextennum-custom
  306. exten => *65,1,Answer
  307. exten => *65,n,Wait(1)
  308. exten => *65,n,Macro(user-callerid,)
  309. exten => *65,n,GotoIf($[${DIALPLAN_EXISTS(app-speakextennum,${CHANNEL(language)},1)}]?app-speakextennum,${CHANNEL(language)},1:app-speakextennum,en,1)
  310.  
  311. exten => en,1,Playback(your)
  312. exten => en,n,Playback(extension)
  313. exten => en,n,Playback(number)
  314. exten => en,n,Playback(is)
  315. exten => en,n,SayDigits(${AMPUSER})
  316. exten => en,n,Wait(2)
  317. exten => en,n,Hangup
  318.  
  319. exten => fr,1,Playback(your)
  320. exten => fr,n,Playback(extension)
  321. exten => fr,n,Playback(is2)
  322. exten => fr,n,SayDigits(${AMPUSER})
  323. exten => fr,n,Wait(2)
  324. exten => fr,n,Hangup
  325.  
  326. exten => ja,1,Playback(your)
  327. exten => ja,n,Playback(extension)
  328. exten => ja,n,Playback(jp-wa)
  329. exten => ja,n,SayDigits(${AMPUSER})
  330. exten => ja,n,Wait(2)
  331. exten => ja,n,Hangup
  332.  
  333. ;--== end of [app-speakextennum] ==--;
  334.  
  335.  
  336. [sub-hr12format]
  337. include => sub-hr12format-custom
  338. exten => s,1,GotoIf($[${DIALPLAN_EXISTS(sub-hr12format,${CHANNEL(language)},1)}]?sub-hr12format,${CHANNEL(language)},1:sub-hr12format,en,1)
  339. exten => s,n,GotoIf($[${DIALPLAN_EXISTS(sub-hr12format,${CHANNEL(language)},1)}]?${CHANNEL(language)},1:en,1)
  340.  
  341. exten => en,1,Playback(at-tone-time-exactly)
  342. exten => en,n,SayUnixTime(${FutureTime},,IM 'and' S 'seconds' p)
  343. exten => en,n,Return()
  344. exten => en,n,Playback(at-tone-time-exactly)
  345. exten => en,n,SayUnixTime(${FutureTime},,IM 'and' S 'seconds' p)
  346. exten => en,n,Return()
  347.  
  348. exten => fr,1,Playback(at-tone-time-exactly)
  349. exten => fr,n,SayUnixTime(${FutureTime},,IMSp)
  350. exten => fr,n,Return()
  351. exten => fr,n,Playback(at-tone-time-exactly)
  352. exten => fr,n,SayUnixTime(${FutureTime},,IMSp)
  353. exten => fr,n,Return()
  354.  
  355. exten => de,1,Playback(at-tone-time-exactly)
  356. exten => de,n,SayUnixTime(${FutureTime},,IMSp)
  357. exten => de,n,Return()
  358. exten => de,n,Playback(at-tone-time-exactly)
  359. exten => de,n,SayUnixTime(${FutureTime},,IMSp)
  360. exten => de,n,Return()
  361.  
  362. exten => ja,1,Playback(at-tone-time-exactly)
  363. exten => ja,n,SayUnixTime(${FutureTime},,pIMS)
  364. exten => ja,n,Return()
  365. exten => ja,n,Playback(at-tone-time-exactly)
  366. exten => ja,n,SayUnixTime(${FutureTime},,pIMS)
  367. exten => ja,n,Return()
  368.  
  369. ;--== end of [sub-hr12format] ==--;
  370.  
  371.  
  372. [app-speakingclock]
  373. include => app-speakingclock-custom
  374. exten => *60,1,Macro(user-callerid,)
  375. exten => *60,n,Answer
  376. exten => *60,n,Wait(1)
  377. exten => *60,n,Set(NumLoops=0)
  378. exten => *60,n(start),Set(FutureTime=$[${EPOCH} + 8])
  379. exten => *60,n,Set(FutureTimeMod=$[${FutureTime} % 10])
  380. exten => *60,n,Set(FutureTime=$[${FutureTime} - ${FutureTimeMod} + 10])
  381. exten => *60,n,Gosub(sub-hr12format,s,1())
  382. exten => *60,n(waitloop),Set(TimeLeft=$[${FutureTime} - ${EPOCH}])
  383. exten => *60,n,GotoIf($[${TimeLeft} < 1]?playbeep)
  384. exten => *60,n,Wait(1)
  385. exten => *60,n,Goto(waitloop)
  386. exten => *60,n(playbeep),Playback(beep)
  387. exten => *60,n,Wait(5)
  388. exten => *60,n,Set(NumLoops=$[${NumLoops} + 1])
  389. exten => *60,n,GotoIf($[${NumLoops} < 5]?start)
  390. exten => *60,n,Playback(goodbye)
  391. exten => *60,n,Hangup
  392.  
  393. ;--== end of [app-speakingclock] ==--;
  394.  
  395.  
  396. [sub-hr24format]
  397. include => sub-hr24format-custom
  398. exten => s,1,GotoIf($[${DIALPLAN_EXISTS(sub-hr24format,${CHANNEL(language)},1)}]?${CHANNEL(language)},1:en,1)
  399.  
  400. exten => en,1,Playback(at-tone-time-exactly)
  401. exten => en,n,SayUnixTime(${FutureTime},,kM 'and' S 'seconds')
  402. exten => en,n,Return()
  403.  
  404. exten => fr,1,Playback(at-tone-time-exactly)
  405. exten => fr,n,SayUnixTime(${FutureTime},,kMS)
  406. exten => fr,n,Return()
  407.  
  408. exten => de,1,Playback(at-tone-time-exactly)
  409. exten => de,n,SayUnixTime(${FutureTime},,kMS)
  410. exten => de,n,Return()
  411.  
  412. exten => ja,1,Playback(at-tone-time-exactly)
  413. exten => ja,n,SayUnixTime(${FutureTime},,kMS)
  414. exten => ja,n,Return()
  415.  
  416. ;--== end of [sub-hr24format] ==--;
  417.  
  418.  
  419. [app-queue-toggle]
  420. include => app-queue-toggle-custom
  421. exten => s,1(start),Answer
  422. exten => s,n,Wait(1)
  423. exten => s,n,Macro(user-callerid,)
  424. exten => s,n,Set(QUEUEUSER=${IF($[${LEN(${QUEUEUSER})}>0]?${QUEUEUSER}:${AMPUSER})})
  425. exten => s,n,Set(QUEUESTAT=LOGGEDOUT)
  426. exten => s,n,AGI(queue_devstate.agi,getqueues,${QUEUEUSER})
  427. exten => s,n,GotoIf($["${QUEUESTAT}" = "LOGGEDOUT"]?activate)
  428. exten => s,n,GotoIf($["${QUEUESTAT}" = "LOGGEDIN"]?deactivate)
  429. exten => s,n,GotoIf($["${QUEUESTAT}" = "STATIC"]?static:end)
  430. exten => s,n(deactivate),Noop(Agent Logged out)
  431. exten => s,n,Macro(toggle-del-agent,)
  432. exten => s,n(logout),Set(STATE=NOT_INUSE)
  433. exten => s,n,Gosub(sstate,1())
  434. exten => s,n,Playback(agent-loggedoff)
  435. exten => s,n,Macro(hangupcall,)
  436. exten => s,n(activate),Noop(Agent Logged In)
  437. exten => s,n,Macro(toggle-add-agent,)
  438. exten => s,n,GotoIf($["${QAGENT_UNAUTHORIZED}"="1"]?logout)
  439. exten => s,n,Set(STATE=INUSE)
  440. exten => s,n,Gosub(sstate,1())
  441. exten => s,n,Playback(agent-loginok)
  442. exten => s,n,SayDigits(${QUEUEUSER})
  443. exten => s,n,Macro(hangupcall,)
  444. exten => s,n(static),Noop(User is a Static Agent)
  445. exten => s,n,Set(STATE=INUSE)
  446. exten => s,n,Gosub(sstate,1())
  447. exten => s,n,Playback(agent-loginok)
  448. exten => s,n,Macro(hangupcall,)
  449.  
  450. exten => sstate,1,Set(DEVICES=${DB(AMPUSER/${QUEUEUSER}/device)})
  451. exten => sstate,n,GotoIf($["${DEVICES}" = "" ]?return)
  452. exten => sstate,n,Set(LOOPCNT=${FIELDQTY(DEVICES,&)})
  453. exten => sstate,n,Set(ITER=1)
  454. exten => sstate,n(begin),Set(DEVICE_STATE(Custom:QUEUE${CUT(DEVICES,&,${ITER})}*${QUEUENO})=${STATE})
  455. exten => sstate,n,Set(ITER=$[${ITER} + 1])
  456. exten => sstate,n,GotoIf($[${ITER} <= ${LOOPCNT}]?begin)
  457. exten => sstate,n(return),Return()
  458.  
  459. ;--== end of [app-queue-toggle] ==--;
  460.  
  461.  
  462. [app-all-queue-toggle]
  463. include => app-all-queue-toggle-custom
  464. exten => s,1(start),Answer
  465. exten => s,n,Wait(1)
  466. exten => s,n,Macro(user-callerid,)
  467. exten => s,n,AGI(queue_devstate.agi,getall,${AMPUSER})
  468. exten => s,n,GotoIf($["${QUEUESTAT}" = "NOQUEUES"]?skip)
  469. exten => s,n,Set(TOGGLE_MACRO=${IF($["${QUEUESTAT}"="LOGGEDOUT"]?toggle-add-agent:toggle-del-agent)})
  470. exten => s,n,Set(STATE=${IF($["${QUEUESTAT}"="LOGGEDOUT"]?INUSE:NOT_INUSE)})
  471. exten => s,n,Set(LOOPCNTALL=${FIELDQTY(USERQUEUES,-)})
  472. exten => s,n,Set(ITERALL=1)
  473. exten => s,n(begin),Set(QUEUENO=${CUT(USERQUEUES,-,${ITERALL})})
  474. exten => s,n,Set(ITERALL=$[${ITERALL}+1])
  475. exten => s,n,Macro(${TOGGLE_MACRO},)
  476. exten => s,n,Gosub(app-queue-toggle,sstate,1())
  477. exten => s,n,GotoIf($[${ITERALL} <= ${LOOPCNTALL}]?begin)
  478. exten => s,n(skip),ExecIf($["${QUEUESTAT}"="LOGGEDIN" | "${QUEUESTAT}"="NOQUEUES"]?Playback(agent-loggedoff))
  479. exten => s,n,ExecIf($["${QUEUESTAT}"="LOGGEDOUT"]?Playback(agent-loginok))
  480. exten => s,n,ExecIf($["${QUEUESTAT}"="LOGGEDOUT"]?SayDigits(${AMPUSER}))
  481. exten => s,n,Macro(hangupcall,)
  482.  
  483. ;--== end of [app-all-queue-toggle] ==--;
  484.  
  485.  
  486. [macro-toggle-del-agent]
  487. include => macro-toggle-del-agent-custom
  488. exten => s,1,Macro(user-callerid,SKIPTTL,)
  489. exten => s,n,Set(QUEUEUSER=${IF($[${LEN(${QUEUEUSER})}>0]?${QUEUEUSER}:${AMPUSER})})
  490. exten => s,n,Set(QUEUEUSERCIDNAME=${DB(AMPUSER/${QUEUEUSER}/cidname)})
  491. exten => s,n,RemoveQueueMember(${QUEUENO},Local/${QUEUEUSER}@from-queue/n)
  492. exten => s,n,RemoveQueueMember(${QUEUENO},Local/${QUEUEUSER}@from-internal/n)
  493. exten => s,n,UserEvent(RefreshQueue)
  494. exten => s,n,QueueLog(${QUEUENO},MANAGER,${IF($[${LEN(${QUEUEUSERCIDNAME})}>0]?${QUEUEUSERCIDNAME}:${QUEUEUSER})},REMOVEMEMBER,)
  495. exten => s,n,MacroExit()
  496.  
  497. ;--== end of [macro-toggle-del-agent] ==--;
  498.  
  499.  
  500. [macro-toggle-add-agent]
  501. include => macro-toggle-add-agent-custom
  502. exten => s,1,Macro(user-callerid,SKIPTTL,)
  503. exten => s,n,Set(QUEUEUSER=${IF($[${LEN(${QUEUEUSER})}>0]?${QUEUEUSER}:${AMPUSER})})
  504. exten => s,n,Set(QUEUEUSERCIDNAME=${DB(AMPUSER/${QUEUEUSER}/cidname)})
  505. exten => s,n,GotoIf($["${DB(QPENALTY/${QUEUENO}/dynmemberonly)}" = "yes" & ${DB_EXISTS(QPENALTY/${QUEUENO}/agents/${QUEUEUSER})} != 1]?invalid)
  506. exten => s,n,ExecIf($["${DB(AMPUSER/${QUEUEUSER}/queues/qnostate)}" != "ignorestate"]?AddQueueMember(${QUEUENO},Local/${QUEUEUSER}@from-queue/n,${DB(QPENALTY/${QUEUENO}/agents/${QUEUEUSER})},,${QUEUEUSERCIDNAME},hint:${QUEUEUSER}@ext-local))
  507. exten => s,n,ExecIf($["${DB(AMPUSER/${QUEUEUSER}/queues/qnostate)}" = "ignorestate"]?AddQueueMember(${QUEUENO},Local/${QUEUEUSER}@from-queue/n,${DB(QPENALTY/${QUEUENO}/agents/${QUEUEUSER})},,${QUEUEUSERCIDNAME}))
  508. exten => s,n,UserEvent(AgentLogin,Agent: ${QUEUEUSER})
  509. exten => s,n,QueueLog(${QUEUENO},MANAGER,${IF($[${LEN(${QUEUEUSERCIDNAME})}>0]?${QUEUEUSERCIDNAME}:${QUEUEUSER})},ADDMEMBER,)
  510. exten => s,n,MacroExit()
  511. exten => s,n(invalid),Playback(pbx-invalid)
  512. exten => s,n,Set(QAGENT_UNAUTHORIZED=1)
  513. exten => s,n,MacroExit()
  514.  
  515. ;--== end of [macro-toggle-add-agent] ==--;
  516.  
  517.  
  518. [app-queue-pause-toggle]
  519. include => app-queue-pause-toggle-custom
  520. exten => s,1(start),Answer
  521. exten => s,n,Wait(1)
  522. exten => s,n,Macro(user-callerid,)
  523. exten => s,n,Set(QUEUEUSER=${IF($[${LEN(${ARG2})}>0]?${ARG2}:${AMPUSER})})
  524. exten => s,n,Set(MEMBR=Local/${QUEUEUSER}@from-queue/n)
  525. exten => s,n,Set(PAUSE_STATE=${QUEUE_MEMBER(${ARG1},paused,${MEMBR})})
  526. exten => s,n,Set(QUEUE_MEMBER(${ARG1},paused,${MEMBR})=${IF($[${PAUSE_STATE}]?0:1)})
  527. exten => s,n,Playback(dictate/pause&${IF($[${PAUSE_STATE}]?de-activated:activated)})
  528. exten => s,n,ExecIf($[${ARG2}]?Return())
  529. exten => s,n,Macro(hangupcall,)
  530.  
  531. ;--== end of [app-queue-pause-toggle] ==--;
  532.  
  533.  
  534. [app-all-queue-pause-toggle]
  535. include => app-all-queue-pause-toggle-custom
  536. exten => s,1(start),Answer
  537. exten => s,n,Wait(1)
  538. exten => s,n,Macro(user-callerid,)
  539. exten => s,n,AGI(queue_devstate.agi,toggle-pause-all,${AMPUSER})
  540. exten => s,n,Playback(dictate/pause&${IF($[${TOGGLEPAUSED}]?activated:de-activated)})
  541. exten => s,n,Macro(hangupcall,)
  542.  
  543. ;--== end of [app-all-queue-pause-toggle] ==--;
  544.  
  545.  
  546. [ext-queues]
  547. include => ext-queues-custom
  548. exten => 111,1,Macro(user-callerid,)
  549. exten => 111,n,Answer
  550. exten => 111,n,Macro(blkvm-set,reset)
  551. exten => 111,n,ExecIf($["${REGEX("(M[(]auto-blkvm[)])" ${DIAL_OPTIONS})}" != "1"]?Set(_DIAL_OPTIONS=${DIAL_OPTIONS}M(auto-blkvm)))
  552. exten => 111,n,Set(__NODEST=${EXTEN})
  553. exten => 111,n,Set(QCIDPP=${IF($[${LEN(${VQ_CIDPP})}>0]?${VQ_CIDPP}: )})
  554. exten => 111,n,Set(VQ_CIDPP=)
  555. exten => 111,n,ExecIf($["${QCIDPP}"!=""]?Macro(prepend-cid,${QCIDPP}))
  556. exten => 111,n,Set(QAINFO=${IF($[${LEN(${VQ_AINFO})}>0]?${VQ_AINFO}: )})
  557. exten => 111,n,Set(VQ_AINFO=)
  558. exten => 111,n,ExecIf($["${QAINFO}"!=""]?Set(__ALERT_INFO=${QAINFO}))
  559. exten => 111,n,Set(QJOINMSG=${IF($[${LEN(${VQ_JOINMSG})}>0]?${IF($["${VQ_JOINMSG}"!="0"]?${VQ_JOINMSG}: )}: )})
  560. exten => 111,n,Set(VQ_JOINMSG=)
  561. exten => 111,n,Set(QRETRY=${IF($[${LEN(${VQ_RETRY})}>0]?${VQ_RETRY}: )})
  562. exten => 111,n,Set(VQ_RETRY=)
  563. exten => 111,n(qoptions),Set(QOPTIONS=${IF($[${LEN(${VQ_OPTIONS})}>0]?${VQ_OPTIONS}:t)}${QCANCELMISSED}${QRINGOPTS}${QRETRY})
  564. exten => 111,n,Set(VQ_OPTIONS=)
  565. exten => 111,n(qgosub),Set(QGOSUB=${IF($[${LEN(${VQ_GOSUB})}>0]?${VQ_GOSUB}:${QGOSUB})})
  566. exten => 111,n,Set(VQ_GOSUB=)
  567. exten => 111,n(qagi),Set(QAGI=${IF($[${LEN(${VQ_AGI})}>0]?${VQ_AGI}:${QAGI})})
  568. exten => 111,n,Set(VQ_AGI=)
  569. exten => 111,n(qrule),Set(QRULE=${IF($[${LEN(${VQ_RULE})}>0]?${IF($["${VQ_RULE}"!="0"]?${VQ_RULE}: )}:${QRULE})})
  570. exten => 111,n,Set(VQ_RULE=)
  571. exten => 111,n(qposition),Set(QPOSITION=${IF($[${LEN(${VQ_POSITION})}>0]?${VQ_POSITION}:${QPOSITION})})
  572. exten => 111,n,Set(VQ_POSITION=)
  573. exten => 111,n,Gosub(sub-record-check,s,1(q,111,dontcare))
  574. exten => 111,n,Set(__CWIGNORE=TRUE)
  575. exten => 111,n,ExecIf($["${QJOINMSG}"!=""]?Playback(${QJOINMSG}, ))
  576. exten => 111,n,QueueLog(111,${UNIQUEID},NONE,DID,${FROM_DID})
  577. exten => 111,n,Set(QAANNOUNCE=${IF($[${LEN(${VQ_AANNOUNCE})}>0]?${IF($["${VQ_AANNOUNCE}"!="0"]?${VQ_AANNOUNCE}: )}: )})
  578. exten => 111,n,Set(VQ_AANNOUNCE=)
  579. exten => 111,n,Set(QMOH=${IF($["${VQ_MOH}"!=""]?${VQ_MOH}: )})
  580. exten => 111,n,Set(VQ_MOH=)
  581. exten => 111,n,ExecIf($["${QMOH}"!=""]?Set(__MOHCLASS=${QMOH}))
  582. exten => 111,n,ExecIf($["${MOHCLASS}"!=""]?Set(CHANNEL(musicclass)=${MOHCLASS}))
  583. exten => 111,n,Set(QMAXWAIT=${IF($[${LEN(${VQ_MAXWAIT})}>0]?${VQ_MAXWAIT}: )})
  584. exten => 111,n,Set(VQ_MAXWAIT=)
  585. exten => 111,n,Set(QUEUENUM=111)
  586. exten => 111,n,Set(QUEUEJOINTIME=${EPOCH})
  587. exten => 111,n(qcall),Queue(111,${QOPTIONS},,${QAANNOUNCE},${QMAXWAIT},${QAGI},,${QGOSUB},${QRULE},${QPOSITION})
  588. exten => 111,n,Macro(blkvm-clr,)
  589. exten => 111,n,Gosub(sub-record-cancel,s,1())
  590. exten => 111,n,Set(__NODEST=)
  591. exten => 111,n,Set(_QUEUE_PRIO=0)
  592. exten => 111,n,Set(__CWIGNORE=)
  593. exten => 111,n,Set(QDEST=${VQ_DEST})
  594. exten => 111,n,Set(VQ_DEST=)
  595. exten => 111,n(gotodest),GotoIf($["${QDEST}"=""]?from-did-direct,1,1:${CUT(QDEST,^,1)},${CUT(QDEST,^,2)},${CUT(QDEST,^,3)})
  596.  
  597. exten => 111*,1,Macro(agent-add,111,)
  598.  
  599. exten => 111**,1,Macro(agent-del,111)
  600.  
  601. exten => *45111,1,Set(QUEUENO=111)
  602. exten => *45111,n,Goto(app-queue-toggle,s,start)
  603.  
  604. exten => *46111,1,Gosub(app-queue-pause-toggle,s,1(111))
  605.  
  606. exten => _*45X*XXX,1,Set(QUEUENO=${EXTEN:5:3})
  607. exten => _*45X*XXX,n,Set(QUEUEUSER=${EXTEN:3:1})
  608. exten => _*45X*XXX,n,Goto(app-queue-toggle,s,start)
  609. exten => _*45X*XXX,hint,Custom:QUEUE${EXTEN:3}
  610.  
  611. exten => *45,1,Goto(app-all-queue-toggle,s,start)
  612.  
  613. exten => _*45*X.,1,Goto(app-all-queue-toggle,s,start)
  614.  
  615. exten => _*45*X,1,Goto(app-all-queue-toggle,s,start)
  616.  
  617. exten => *46,1,Goto(app-all-queue-pause-toggle,s,1)
  618.  
  619. exten => _*46*X.,1,Goto(app-all-queue-pause-toggle,s,1)
  620.  
  621. exten => _*46*X,1,Goto(app-all-queue-pause-toggle,s,1)
  622.  
  623. exten => h,1,Macro(hangupcall,)
  624.  
  625. ;--== end of [ext-queues] ==--;
  626.  
  627.  
  628. [from-queue]
  629. include => from-queue-custom
  630. exten => 111,1,Goto(from-internal,${QAGENT},1)
  631.  
  632. exten => _.,1,Set(QAGENT=${EXTEN})
  633. exten => _.,n,Goto(${NODEST},1)
  634.  
  635. ;--== end of [from-queue] ==--;
  636.  
  637.  
  638. [app-queue-caller-count]
  639. include => app-queue-caller-count-custom
  640. exten => s,1,Answer
  641. exten => s,n,Wait(1)
  642. exten => s,n,Set(QUEUES=${ARG1})
  643. exten => s,n,Set(COUNT=0)
  644. exten => s,n,Set(LOOPCNT=${FIELDQTY(QUEUES,&)})
  645. exten => s,n,Set(ITER=1)
  646. exten => s,n(begin1),Set(QUEUE=${CUT(QUEUES,&,${ITER})})
  647. exten => s,n,Set(COUNT=$[${COUNT} + ${QUEUE_WAITING_COUNT(${QUEUE})}])
  648. exten => s,n(end1),Set(ITER=$[${ITER} + 1])
  649. exten => s,n,GotoIf($[${ITER} <= ${LOOPCNT}]?begin1)
  650. exten => s,n,SayNumber(${COUNT},f)
  651. exten => s,n,Playback(queue-quantity2)
  652. exten => s,n,Return()
  653.  
  654. ;--== end of [app-queue-caller-count] ==--;
  655.  
  656.  
  657. [from-queue-exten-internal]
  658. include => from-queue-exten-internal-custom
  659. include => from-queue-exten-only
  660. include => from-internal
  661. exten => foo,1,Noop(bar)
  662.  
  663. ;--== end of [from-queue-exten-internal] ==--;
  664.  
  665.  
  666. [from-queue-exten-only]
  667. include => from-queue-exten-only-custom
  668. exten => 1,1,Set(RingGroupMethod=none)
  669. exten => 1,n,Set(QDOPTS=${IF($["${CALLER_DEST}"!=""]?g)}${IF($["${AGENT_DEST}"!=""]?F(${AGENT_DEST}))})
  670. exten => 1,n(checkrecord),Set(CALLTYPE_OVERRIDE=external)
  671. exten => 1,n,ExecIf($[!${LEN(${FROMEXTEN})}]?Set(FROMEXTEN=${IF(${LEN(${NODEST})}?${NODEST}:external)}))
  672. exten => 1,n,Gosub(sub-record-check,s,1(exten,1,))
  673. exten => 1,n,Macro(dial-one,,${DIAL_OPTIONS}${QDOPTS},1)
  674. exten => 1,n,GotoIf($["${CALLER_DEST}"!=""]?${CUT(CALLER_DEST,^,1)},${CUT(CALLER_DEST,^,2)},${CUT(CALLER_DEST,^,3)})
  675. exten => 1,n,Hangup
  676.  
  677. exten => 2,1,Set(RingGroupMethod=none)
  678. exten => 2,n,Set(QDOPTS=${IF($["${CALLER_DEST}"!=""]?g)}${IF($["${AGENT_DEST}"!=""]?F(${AGENT_DEST}))})
  679. exten => 2,n(checkrecord),Set(CALLTYPE_OVERRIDE=external)
  680. exten => 2,n,ExecIf($[!${LEN(${FROMEXTEN})}]?Set(FROMEXTEN=${IF(${LEN(${NODEST})}?${NODEST}:external)}))
  681. exten => 2,n,Gosub(sub-record-check,s,1(exten,2,))
  682. exten => 2,n,Macro(dial-one,,${DIAL_OPTIONS}${QDOPTS},2)
  683. exten => 2,n,GotoIf($["${CALLER_DEST}"!=""]?${CUT(CALLER_DEST,^,1)},${CUT(CALLER_DEST,^,2)},${CUT(CALLER_DEST,^,3)})
  684. exten => 2,n,Hangup
  685.  
  686. exten => 3,1,Set(RingGroupMethod=none)
  687. exten => 3,n,Set(QDOPTS=${IF($["${CALLER_DEST}"!=""]?g)}${IF($["${AGENT_DEST}"!=""]?F(${AGENT_DEST}))})
  688. exten => 3,n(checkrecord),Set(CALLTYPE_OVERRIDE=external)
  689. exten => 3,n,ExecIf($[!${LEN(${FROMEXTEN})}]?Set(FROMEXTEN=${IF(${LEN(${NODEST})}?${NODEST}:external)}))
  690. exten => 3,n,Gosub(sub-record-check,s,1(exten,3,))
  691. exten => 3,n,Macro(dial-one,,${DIAL_OPTIONS}${QDOPTS},3)
  692. exten => 3,n,GotoIf($["${CALLER_DEST}"!=""]?${CUT(CALLER_DEST,^,1)},${CUT(CALLER_DEST,^,2)},${CUT(CALLER_DEST,^,3)})
  693. exten => 3,n,Hangup
  694.  
  695. exten => 4,1,Set(RingGroupMethod=none)
  696. exten => 4,n,Set(QDOPTS=${IF($["${CALLER_DEST}"!=""]?g)}${IF($["${AGENT_DEST}"!=""]?F(${AGENT_DEST}))})
  697. exten => 4,n(checkrecord),Set(CALLTYPE_OVERRIDE=external)
  698. exten => 4,n,ExecIf($[!${LEN(${FROMEXTEN})}]?Set(FROMEXTEN=${IF(${LEN(${NODEST})}?${NODEST}:external)}))
  699. exten => 4,n,Gosub(sub-record-check,s,1(exten,4,))
  700. exten => 4,n,Macro(dial-one,,${DIAL_OPTIONS}${QDOPTS},4)
  701. exten => 4,n,GotoIf($["${CALLER_DEST}"!=""]?${CUT(CALLER_DEST,^,1)},${CUT(CALLER_DEST,^,2)},${CUT(CALLER_DEST,^,3)})
  702. exten => 4,n,Hangup
  703.  
  704. exten => 5,1,Set(RingGroupMethod=none)
  705. exten => 5,n,Set(QDOPTS=${IF($["${CALLER_DEST}"!=""]?g)}${IF($["${AGENT_DEST}"!=""]?F(${AGENT_DEST}))})
  706. exten => 5,n(checkrecord),Set(CALLTYPE_OVERRIDE=external)
  707. exten => 5,n,ExecIf($[!${LEN(${FROMEXTEN})}]?Set(FROMEXTEN=${IF(${LEN(${NODEST})}?${NODEST}:external)}))
  708. exten => 5,n,Gosub(sub-record-check,s,1(exten,5,))
  709. exten => 5,n,Macro(dial-one,,${DIAL_OPTIONS}${QDOPTS},5)
  710. exten => 5,n,GotoIf($["${CALLER_DEST}"!=""]?${CUT(CALLER_DEST,^,1)},${CUT(CALLER_DEST,^,2)},${CUT(CALLER_DEST,^,3)})
  711. exten => 5,n,Hangup
  712.  
  713. exten => 6,1,Set(RingGroupMethod=none)
  714. exten => 6,n,Set(QDOPTS=${IF($["${CALLER_DEST}"!=""]?g)}${IF($["${AGENT_DEST}"!=""]?F(${AGENT_DEST}))})
  715. exten => 6,n(checkrecord),Set(CALLTYPE_OVERRIDE=external)
  716. exten => 6,n,ExecIf($[!${LEN(${FROMEXTEN})}]?Set(FROMEXTEN=${IF(${LEN(${NODEST})}?${NODEST}:external)}))
  717. exten => 6,n,Gosub(sub-record-check,s,1(exten,6,))
  718. exten => 6,n,Macro(dial-one,,${DIAL_OPTIONS}${QDOPTS},6)
  719. exten => 6,n,GotoIf($["${CALLER_DEST}"!=""]?${CUT(CALLER_DEST,^,1)},${CUT(CALLER_DEST,^,2)},${CUT(CALLER_DEST,^,3)})
  720. exten => 6,n,Hangup
  721.  
  722. exten => h,1,Macro(hangupcall,)
  723.  
  724. ;--== end of [from-queue-exten-only] ==--;
  725.  
  726.  
  727. [macro-agent-add]
  728. include => macro-agent-add-custom
  729. exten => lang-playback,1,GosubIf($[${DIALPLAN_EXISTS(app-queue-caller-count,${CHANNEL(language)})}]?app-queue-caller-count,${CHANNEL(language)},${ARG1}():app-queue-caller-count,en,${ARG1}())
  730. exten => lang-playback,n,Return()
  731.  
  732. exten => s,1,Wait(1)
  733. exten => s,n,Set(QUEUENO=${ARG1})
  734. exten => s,n,Macro(user-callerid,SKIPTTL)
  735. exten => s,n(a3),Read(CALLBACKNUM,agent-login,,,,)
  736. exten => s,n,GotoIf($[${LEN(${CALLBACKNUM})}=0]?a5:a7)
  737. exten => s,n(a5),Set(CALLBACKNUM=${IF($[${LEN(${AMPUSER})}=0]?${CALLERID(number)}:${AMPUSER})})
  738. exten => s,n,Set(THISDEVICE=${DB(DEVICE/${REALCALLERIDNUM}/dial)})
  739. exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a3)
  740. exten => s,n(a7),GotoIf($["${CALLBACKNUM}" = "${QUEUENO}"]?invalid)
  741. exten => s,n,GotoIf($["${ARG3}" = "EXTEN" & ${DB_EXISTS(AMPUSER/${CALLBACKNUM}/cidname)} = 0]?invalid)
  742. exten => s,n,GotoIf($["${DB(QPENALTY/${QUEUENO}/dynmemberonly)}" = "yes" & ${DB_EXISTS(QPENALTY/${QUEUENO}/agents/${CALLBACKNUM})} != 1]?invalid)
  743. exten => s,n,ExecIf($["${QREGEX}" != ""]?GotoIf($["${REGEX("${QREGEX}" ${CALLBACKNUM})}" = "0"]?invalid))
  744. exten => s,n,ExecIf($["${ARG2}" != ""]?Authenticate(${ARG2}))
  745. exten => s,n,Set(STATE=INUSE)
  746. exten => s,n,Gosub(app-queue-toggle,sstate,1())
  747. exten => s,n,ExecIf($[${DB_EXISTS(AMPUSER/${CALLBACKNUM}/cidname)} = 1 & "${DB(AMPUSER/${CALLBACKNUM}/queues/qnostate)}" != "ignorestate"]?AddQueueMember(${QUEUENO},Local/${CALLBACKNUM}@from-queue/n,${DB(QPENALTY/${QUEUENO}/agents/${CALLBACKNUM})},,${DB(AMPUSER/${CALLBACKNUM}/cidname)},hint:${CALLBACKNUM}@ext-local))
  748. exten => s,n,ExecIf($[${DB_EXISTS(AMPUSER/${CALLBACKNUM}/cidname)} = 1 & "${DB(AMPUSER/${CALLBACKNUM}/queues/qnostate)}" = "ignorestate"]?AddQueueMember(${QUEUENO},Local/${CALLBACKNUM}@from-queue/n,${DB(QPENALTY/${QUEUENO}/agents/${CALLBACKNUM})},,${DB(AMPUSER/${CALLBACKNUM}/cidname)}))
  749. exten => s,n,ExecIf($[${DB_EXISTS(AMPUSER/${CALLBACKNUM}/cidname)} = 0]?AddQueueMember(${QUEUENO},Local/${CALLBACKNUM}@from-queue/n,${DB(QPENALTY/${QUEUENO}/agents/${CALLBACKNUM})}))
  750. exten => s,n,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})
  751. exten => s,n,Wait(1)
  752. exten => s,n,Gosub(app-queue-caller-count,lang-playback,1(hook_0))
  753. exten => s,n,Hangup
  754. exten => s,n,MacroExit()
  755. exten => s,n(invalid),Playback(pbx-invalid)
  756. exten => s,n,Goto(a3)
  757.  
  758. exten => en,1(hook_0),Playback(agent-loginok&with&extension)
  759. exten => en,n,SayDigits(${CALLBACKNUM})
  760. exten => en,n,Return()
  761.  
  762. exten => ja,1(hook_0),Playback(extension)
  763. exten => ja,n,SayDigits(${CALLBACKNUM})
  764. exten => ja,n,Playback(jp-kara&agent-loginok)
  765. exten => ja,n,Return()
  766.  
  767. ;--== end of [macro-agent-add] ==--;
  768.  
  769.  
  770. [macro-agent-del]
  771. include => macro-agent-del-custom
  772. exten => s,1,Wait(1)
  773. exten => s,n,Set(QUEUENO=${ARG1})
  774. exten => s,n,Macro(user-callerid,SKIPTTL)
  775. exten => s,n(a3),Read(CALLBACKNUM,agent-logoff,,,,)
  776. exten => s,n,GotoIf($[${LEN(${CALLBACKNUM})}=0]?a5:a7)
  777. exten => s,n(a5),Set(CALLBACKNUM=${IF($[${LEN(${AMPUSER})}=0]?${CALLERID(number)}:${AMPUSER})})
  778. exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a3)
  779. exten => s,n,Set(STATE=NOT_INUSE)
  780. exten => s,n,Gosub(app-queue-toggle,sstate,1())
  781. exten => s,n(a7),RemoveQueueMember(${QUEUENO},Local/${CALLBACKNUM}@from-queue/n)
  782. exten => s,n,RemoveQueueMember(${QUEUENO},Local/${CALLBACKNUM}@from-internal/n)
  783. exten => s,n,UserEvent(RefreshQueue)
  784. exten => s,n,Wait(1)
  785. exten => s,n,Playback(agent-loggedoff)
  786. exten => s,n,Hangup
  787.  
  788. ;--== end of [macro-agent-del] ==--;
  789.  
  790.  
  791. [systemrecording-gui]
  792. include => systemrecording-gui-custom
  793. exten => dorecord,1,Record(${RECFILE}.wav,,,k)
  794.  
  795. exten => h,1,System(touch ${RECFILE}.finished)
  796. exten => h,n(exit),Hangup
  797.  
  798. ;--== end of [systemrecording-gui] ==--;
  799.  
  800.  
  801. [macro-systemrecording]
  802. include => macro-systemrecording-custom
  803. exten => s,1,GotoIf($["${ARG2}" = ""]?invalid)
  804. exten => s,n,Set(TMPLANG=${CHANNEL(language)})
  805. exten => s,n,Set(RECFILE=${TMPLANG}/${ARG2})
  806. exten => s,n,Set(LISTEN=docheck)
  807. exten => s,n,ExecIf($["${ARG3}" != ""]?Authenticate(${ARG3}))
  808. exten => s,n,Goto(${ARG1},1)
  809.  
  810. exten => dorecord,1,Set(TMPRECFILE=${RECFILE}-TMP)
  811. exten => dorecord,n,Background(say-temp-msg-prs-pound,,${CHANNEL(language)})
  812. exten => dorecord,n,Record(${TMPRECFILE}.wav,,,k)
  813. exten => dorecord,n,Set(LISTEN=dochecknolanguage)
  814. exten => dorecord,n,Goto(confmenu,1)
  815.  
  816. exten => dochecknolanguage,1,Playback(beep)
  817. exten => dochecknolanguage,n(dc_start),Background(${TMPRECFILE},m,,macro-systemrecording)
  818. exten => dochecknolanguage,n,Wait(1)
  819. exten => dochecknolanguage,n,Goto(confmenu,1)
  820.  
  821. exten => docheck,1,Playback(beep)
  822. exten => docheck,n(dc_start),Background(${RECFILE},m,${CHANNEL(language)},macro-systemrecording)
  823. exten => docheck,n,Wait(1)
  824. exten => docheck,n,Goto(confmenu,1)
  825.  
  826. exten => confmenu,1,Background(to-listen-to-it&press-1&to-accept-recording&press-2&to-rerecord-it&press-star&language&press-3,m,${CHANNEL(language)},macro-systemrecording)
  827. exten => confmenu,n,Read(RECRESULT,,1,,,4)
  828. exten => confmenu,n,GotoIf($["x${RECRESULT}"="x*"]?dorecord,1)
  829. exten => confmenu,n,GotoIf($["x${RECRESULT}"="x1"]?${LISTEN},2)
  830. exten => confmenu,n,GotoIf($["x${RECRESULT}"="x2"]?doaccept,1)
  831. exten => confmenu,n,GotoIf($["x${RECRESULT}"="x3"]?switchlang,1)
  832. exten => confmenu,n,Goto(1)
  833.  
  834. exten => doaccept,1,Set(EXISTS=${STAT(e,${ASTVARLIBDIR}/sounds/${TMPRECFILE}.wav)})
  835. exten => doaccept,n,Noop(${EXISTS})
  836. exten => doaccept,n,GotoIf($["${EXISTS}" != "1"]?exit)
  837. exten => doaccept,n,System(touch ${ASTVARLIBDIR}/sounds/${RECFILE}.finished)
  838. exten => doaccept,n,GotoIf($["x${TMPRECFILE}"="x"]?exit)
  839. exten => doaccept,n,System(mv ${ASTVARLIBDIR}/sounds/${TMPRECFILE}.wav ${ASTVARLIBDIR}/sounds/${RECFILE}.wav)
  840. exten => doaccept,n,Set(TMPRECFILE=${RECFILE})
  841. exten => doaccept,n(exit),Playback(auth-thankyou)
  842. exten => doaccept,n,Goto(confmenu,1)
  843.  
  844. exten => switchlang,1,Playback(language&is-set-to)
  845. exten => switchlang,n,SayAlpha(${TMPLANG})
  846. exten => switchlang,n,Playback(after-the-tone)
  847. exten => switchlang,n,Background(press-1)
  848. exten => switchlang,n,SayAlpha(en)
  849. exten => switchlang,n,Playback(beep)
  850. exten => switchlang,n,Read(LANGRESULT,,1,,,4)
  851. exten => switchlang,n,ExecIf($["x${LANGRESULT}"="x1"]?Set(TMPLANG=en))
  852. exten => switchlang,n,Set(RECFILE=${TMPLANG}/${ARG2})
  853. exten => switchlang,n,Playback(language&is-set-to)
  854. exten => switchlang,n,SayAlpha(${TMPLANG})
  855. exten => switchlang,n,Goto(confmenu,1)
  856.  
  857. exten => invalid,1,Playback(pm-invalid-option)
  858. exten => invalid,n,Hangup
  859.  
  860. exten => 1,1,Goto(${LISTEN},dc_start)
  861.  
  862. exten => 2,1,Goto(doaccept,1)
  863.  
  864. exten => 3,1,Goto(switchlang,1)
  865.  
  866. exten => *,1,Goto(dorecord,1)
  867.  
  868. exten => t,1,Playback(goodbye)
  869. exten => t,n,Hangup
  870.  
  871. exten => i,1,Playback(pm-invalid-option)
  872. exten => i,n,Goto(confmenu,1)
  873.  
  874. exten => h,1,System(touch ${ASTVARLIBDIR}/sounds/${RECFILE}.finished)
  875. exten => h,n,GotoIf($["x${TMPRECFILE}"="x"]?exit)
  876. exten => h,n,System(mv ${ASTVARLIBDIR}/sounds/${TMPRECFILE}.wav ${ASTVARLIBDIR}/sounds/${CHANNEL(language)}/${RECFILE}.wav)
  877. exten => h,n(exit),Hangup
  878.  
  879. ;--== end of [macro-systemrecording] ==--;
  880.  
  881.  
  882. [vm-callme]
  883. include => vm-callme-custom
  884. exten => s,1,Answer
  885. exten => s,n,Wait(1)
  886. exten => s,n(repeat),Background(${MSG}&silence/2&vm-repeat&vm-starmain)
  887. exten => s,n,WaitExten(15,)
  888.  
  889. exten => 5,1,Goto(s,repeat)
  890.  
  891. exten => #,1,Playback(vm-goodbye)
  892. exten => #,n,Hangup
  893.  
  894. exten => *,1,Macro(get-vmcontext,${MBOX})
  895. exten => *,n,VoiceMailMain(${MBOX}@${VMCONTEXT},s)
  896.  
  897. exten => i,1,Playback(pm-invalid-option)
  898. exten => i,n,Goto(s,repeat)
  899.  
  900. exten => t,1,Playback(vm-goodbye)
  901. exten => t,n,Hangup
  902.  
  903. exten => h,1,Hangup
  904.  
  905. ;--== end of [vm-callme] ==--;
  906.  
  907.  
  908. [app-dialvm]
  909. include => app-dialvm-custom
  910. exten => *98,1,Macro(user-callerid,)
  911. exten => *98,n,Answer
  912. exten => *98,n(start),Wait(1)
  913. exten => *98,n,Noop(app-dialvm: Asking for mailbox)
  914. exten => *98,n,Read(MAILBOX,vm-login,,,3,2)
  915. exten => *98,n(check),Noop(app-dialvm: Got Mailbox ${MAILBOX})
  916. exten => *98,n,Macro(get-vmcontext,${MAILBOX})
  917. exten => *98,n,Set(VMBOXEXISTSSTATUS=${IF(${VM_INFO(${MAILBOX}@${VMCONTEXT},exists)}?SUCCESS:FAILED)})
  918. exten => *98,n,GotoIf($["${VMBOXEXISTSSTATUS}" = "SUCCESS"]?good:bad)
  919. exten => *98,n,Macro(hangupcall,)
  920. exten => *98,n(good),Noop(app-dialvm: Good mailbox ${MAILBOX}@${VMCONTEXT})
  921. exten => *98,n,VoiceMailMain(${MAILBOX}@${VMCONTEXT})
  922. exten => *98,n,GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?playret)
  923. exten => *98,n,Macro(hangupcall,)
  924. exten => *98,n(bad),Noop(app-dialvm: BAD mailbox ${MAILBOX}@${VMCONTEXT})
  925. exten => *98,n,Wait(1)
  926. exten => *98,n,Noop(app-dialvm: Asking for password so people can't probe for existence of a mailbox)
  927. exten => *98,n,Read(FAKEPW,vm-password,,,3,2)
  928. exten => *98,n,Noop(app-dialvm: Asking for mailbox again)
  929. exten => *98,n,Read(MAILBOX,vm-incorrect-mailbox,,,3,2)
  930. exten => *98,n,Goto(check)
  931. exten => *98,n,Macro(hangupcall,)
  932. exten => *98,n(playret),Playback(beep&you-will-be-transfered-menu&silence/1)
  933. exten => *98,n,Goto(${IVR_CONTEXT},return,1)
  934.  
  935. exten => _dvm.,1,Answer
  936. exten => _dvm.,n,Wait(1)
  937. exten => _dvm.,n,Macro(get-vmcontext,${EXTEN:3})
  938. exten => _dvm.,n,VoiceMailMain(${EXTEN:3}@${VMCONTEXT})
  939. exten => _dvm.,n,GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?${IVR_CONTEXT},return,1)
  940. exten => _dvm.,n,Macro(hangupcall,)
  941.  
  942. exten => _*98X.,hint,MWI:${EXTEN:3}@${DB(AMPUSER/${EXTEN:3}/voicemail)}
  943. ;--== end of [app-dialvm] ==--;
  944.  
  945.  
  946. [app-vmmain]
  947. include => app-vmmain-custom
  948. exten => *97,1,Answer
  949. exten => *97,n,Wait(1)
  950. exten => *97,n,Macro(user-callerid,)
  951. exten => *97,n,Macro(get-vmcontext,${AMPUSER})
  952. exten => *97,n(check),Set(VMBOXEXISTSSTATUS=${IF(${VM_INFO(${AMPUSER}@${VMCONTEXT},exists)}?SUCCESS:FAILED)})
  953. exten => *97,n,GotoIf($["${VMBOXEXISTSSTATUS}" = "SUCCESS"]?mbexist)
  954. exten => *97,n,VoiceMailMain()
  955. exten => *97,n,GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?playret)
  956. exten => *97,n,Macro(hangupcall,)
  957. exten => *97,check+101(mbexist),GotoIf($["${DB(AMPUSER/${AMPUSER}/novmpw)}"!=""]?novmpw:vmpw)
  958. exten => *97,n(novmpw),Noop(Verifying channel ${CHANNEL} is actually ${AMPUSER})
  959. exten => *97,n,GotoIf($["${REGEX("^${DB(DEVICE/${AMPUSER}/dial)}-[0-9a-fx]+$" ${CHANNEL})}"!="1"]?vmpws)
  960. exten => *97,n,VoiceMailMain(${AMPUSER}@${VMCONTEXT},s)
  961. exten => *97,n,Goto(vmend)
  962. exten => *97,n(vmpws),Noop(Channel ${CHANNEL} is NOT ${AMPUSER} forcing VM Password)
  963. exten => *97,n(vmpw),VoiceMailMain(${AMPUSER}@${VMCONTEXT})
  964. exten => *97,n,Goto(vmend)
  965. exten => *97,n(vmend),GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?playret)
  966. exten => *97,n,Macro(hangupcall,)
  967. exten => *97,n(playret),Playback(beep&you-will-be-transfered-menu&silence/1)
  968. exten => *97,n,Goto(${IVR_CONTEXT},return,1)
  969.  
  970. ;--== end of [app-vmmain] ==--;
  971.  
  972.  
  973. [app-userlogonoff]
  974. include => app-userlogonoff-custom
  975. exten => *12,1,Macro(user-logoff,)
  976. exten => *12,n(hook_off),Hangup
  977.  
  978. exten => *11,1,Macro(user-logon,)
  979. exten => *11,n(hook_on_1),Hangup
  980.  
  981. exten => _*11.,1,Macro(user-logon,${EXTEN:3},)
  982. exten => _*11.,n(hook_on_2),Hangup
  983.  
  984. ;--== end of [app-userlogonoff] ==--;
  985.  
  986.  
  987. [macro-dial]
  988. include => macro-dial-custom
  989. exten => s,1,Noop(Blind Transfer: ${BLINDTRANSFER}, Attended Transfer: ${ATTENDEDTRANSFER}, User: ${AMPUSER}, Alert Info: ${ALERT_INFO})
  990. exten => s,n,ExecIf($["${ALERT_INFO}"="" & ${LEN(${AMPUSER})}!=0 & ${LEN(${BLINDTRANSFER})}=0 & ${LEN(${ATTENDEDTRANSFER})}=0]?Set(ALERT_INFO=))
  991. exten => s,n,ExecIf($[${LEN(${BLINDTRANSFER})}!=0]?Set(ALERT_INFO=))
  992. exten => s,n,ExecIf($[${LEN(${ATTENDEDTRANSFER})}!=0]?Set(ALERT_INFO=))
  993. exten => s,n,GotoIf($["${MOHCLASS}" = ""]?dial)
  994. exten => s,n,Set(CHANNEL(musicclass)=${MOHCLASS})
  995. exten => s,n(dial),AGI(dialparties.agi)
  996. exten => s,n,Noop(Returned from dialparties with no extensions to call and DIALSTATUS: ${DIALSTATUS})
  997. exten => s,n+2(normdial),Dial(${ds}b(func-apply-sipheaders^s^1),)
  998. exten => s,n,Set(DIALSTATUS=${IF($["${DIALSTATUS_CW}"!="" ]?${DIALSTATUS_CW}:${DIALSTATUS})})
  999. exten => s,n,GosubIf($[("${SCREEN}" != "" & ("${DIALSTATUS}" = "TORTURE" | "${DIALSTATUS}" = "DONTCALL"))  | "${DIALSTATUS}" = "ANSWER"]?${DIALSTATUS},1())
  1000. exten => s,20(huntdial),Noop(Returned from dialparties with hunt groups to dial )
  1001. exten => s,n,Set(HuntLoop=0)
  1002. exten => s,n(a22),GotoIf($[${HuntMembers} >= 1]?a30)
  1003. exten => s,n,Noop(Returning there are no members left in the hunt group to ring)
  1004. exten => s,n+2(a30),Set(HuntMember=HuntMember${HuntLoop})
  1005. exten => s,n,GotoIf($[$["${CALLTRACE_HUNT}" != "" ] & $[$["${RingGroupMethod}" = "hunt" ] | $["${RingGroupMethod}" = "firstavailable"] | $["${RingGroupMethod}" = "firstnotonphone"]]]?a32:a35)
  1006. exten => s,n(a32),Set(CT_EXTEN=${CUT(FILTERED_DIAL,,$[${HuntLoop} + 1])})
  1007. exten => s,n,Set(DB(CALLTRACE/${CT_EXTEN})=${CALLTRACE_HUNT})
  1008. exten => s,n,Goto(s,a42)
  1009. exten => s,n(a35),GotoIf($[$["${CALLTRACE_HUNT}" != "" ] & $["${RingGroupMethod}" = "memoryhunt" ]]?a36:a50)
  1010. exten => s,n(a36),Set(CTLoop=0)
  1011. exten => s,n(a37),GotoIf($[${CTLoop} > ${HuntLoop}]?a42)
  1012. exten => s,n,Set(CT_EXTEN=${CUT(FILTERED_DIAL,,$[${CTLoop} + 1])})
  1013. exten => s,n,Set(DB(CALLTRACE/${CT_EXTEN})=${CALLTRACE_HUNT})
  1014. exten => s,n,Set(CTLoop=$[1 + ${CTLoop}])
  1015. exten => s,n,Goto(s,a37)
  1016. exten => s,n(a42),Dial(${${HuntMember}}${ds},)
  1017. exten => s,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?ANSWER,1)
  1018. exten => s,n,Set(HuntLoop=$[1 + ${HuntLoop}])
  1019. exten => s,n,GotoIf($[$[$["foo${RingGroupMethod}" != "foofirstavailable"] & $["foo${RingGroupMethod}" != "foofirstnotonphone"]] | $["foo${DialStatus}" = "fooBUSY"]]?a46)
  1020. exten => s,n,Set(HuntMembers=0)
  1021. exten => s,n(a46),Set(HuntMembers=$[${HuntMembers} - 1])
  1022. exten => s,n,Goto(s,a22)
  1023. exten => s,n(a50),Noop(Deleting: CALLTRACE/${CT_EXTEN} ${DB_DELETE(CALLTRACE/${CT_EXTEN})})
  1024. exten => s,n,Goto(s,a42)
  1025.  
  1026. exten => NOANSWER,1,Macro(vm,${SCREEN_EXTEN},BUSY,${IVR_RETVM})
  1027. exten => NOANSWER,n,GotoIf($["${IVR_RETVM}" != "RETURN" | "${IVR_CONTEXT}" = ""]?bye)
  1028. exten => NOANSWER,n,Return()
  1029. exten => NOANSWER,n(bye),Macro(hangupcall,)
  1030.  
  1031. exten => TORTURE,1,Goto(app-blackhole,musiconhold,1)
  1032. exten => TORTURE,n,Macro(hangupcall,)
  1033.  
  1034. exten => DONTCALL,1,Answer
  1035. exten => DONTCALL,n,Wait(1)
  1036. exten => DONTCALL,n,Zapateller()
  1037. exten => DONTCALL,n,Playback(ss-noservice)
  1038. exten => DONTCALL,n,Macro(hangupcall,)
  1039.  
  1040. exten => ANSWER,1,Noop(Call successfully answered - Hanging up now)
  1041. exten => ANSWER,n,Macro(hangupcall,)
  1042.  
  1043. exten => h,1,Macro(hangupcall,)
  1044.  
  1045. ;--== end of [macro-dial] ==--;
  1046.  
  1047.  
  1048. [ext-local-confirm]
  1049. include => ext-local-confirm-custom
  1050. exten => _LC-.,1,Dial(${DB(DEVICE/${EXTEN:3}/dial)},${RT},${DIAL_OPTIONS}M(auto-confirm^${RG_IDX})b(func-apply-sipheaders^s^1))
  1051.  
  1052. ;--== end of [ext-local-confirm] ==--;
  1053.  
  1054.  
  1055. [findmefollow-ringallv2]
  1056. include => findmefollow-ringallv2-custom
  1057. exten => _FMPR-.,1,Set(CDR_PROP(disable)=true)
  1058. exten => _FMPR-.,n,Set(RingGroupMethod=)
  1059. exten => _FMPR-.,n,Set(USE_CONFIRMATION=)
  1060. exten => _FMPR-.,n,Set(RINGGROUP_INDEX=)
  1061. exten => _FMPR-.,n,Macro(simple-dial,${EXTEN:5},${FMREALPRERING})
  1062. exten => _FMPR-.,n,ExecIf($["${DIALSTATUS}" = "BUSY"]?Set(SHARED(FM_DND,${FMUNIQUE})=DND))
  1063. exten => _FMPR-.,n,Hangup
  1064.  
  1065. exten => _FMGL-.,1,Set(CDR_PROP(disable)=true)
  1066. exten => _FMGL-.,n,Set(ENDLOOP=$[${EPOCH} + ${FMPRERING} + 2])
  1067. exten => _FMGL-.,n(start),GotoIf($["${SHARED(FM_DND,${FMUNIQUE})}" = "DND"]?dodnd)
  1068. exten => _FMGL-.,n,Wait(1)
  1069. exten => _FMGL-.,n,GotoIf($[${EPOCH} < ${ENDLOOP}]?start)
  1070. exten => _FMGL-.,n,Set(SHARED(FM_DND,${FMUNIQUE})=)
  1071. exten => _FMGL-.,n(dodial),Macro(dial,${FMGRPTIME},${DIAL_OPTIONS},${EXTEN:5})
  1072. exten => _FMGL-.,n,Hangup
  1073. exten => _FMGL-.,n+10(dodnd),Set(SHARED(FM_DND,${FMUNIQUE})=)
  1074. exten => _FMGL-.,n,GotoIf($["${FMPRIME}" = "FALSE"]?dodial)
  1075. exten => _FMGL-.,n,Hangup
  1076.  
  1077. ;--== end of [findmefollow-ringallv2] ==--;
  1078.  
  1079.  
  1080. [app-pickup]
  1081. include => app-pickup-custom
  1082. exten => _**.,1,Macro(user-callerid,)
  1083. exten => _**.,n,Set(PICKUP_EXTEN=${AMPUSER})
  1084. exten => _**.,n,Pickup(${EXTEN:2}&${EXTEN:2}@PICKUPMARK)
  1085. exten => _**.,n,Hangup
  1086.  
  1087. exten => _***80.,1,Macro(user-callerid,)
  1088. exten => _***80.,n,Set(PICKUP_EXTEN=${AMPUSER})
  1089. exten => _***80.,n,Pickup(${EXTEN:5}&${EXTEN:5}@PICKUPMARK)
  1090. exten => _***80.,n,Hangup
  1091.  
  1092. ;--== end of [app-pickup] ==--;
  1093.  
  1094.  
  1095. [app-chanspy]
  1096. include => app-chanspy-custom
  1097. exten => 555,1,Macro(user-callerid,)
  1098. exten => 555,n,Answer
  1099. exten => 555,n,Wait(1)
  1100. exten => 555,n,ChanSpy()
  1101. exten => 555,n,Hangup
  1102.  
  1103. ;--== end of [app-chanspy] ==--;
  1104.  
  1105.  
  1106. [ext-test]
  1107. include => ext-test-custom
  1108. exten => 7777,1,Macro(user-callerid,)
  1109. exten => 7777,n,Goto(from-pstn,${EXTEN},1)
  1110.  
  1111. exten => h,1,Macro(hangupcall,)
  1112.  
  1113. ;--== end of [ext-test] ==--;
  1114.  
  1115.  
  1116. [ext-did]
  1117. include => ext-did-custom
  1118. include => ext-did-0001
  1119. include => ext-did-0002
  1120. exten => foo,1,Noop(bar)
  1121.  
  1122. ;--== end of [ext-did] ==--;
  1123.  
  1124.  
  1125. [ext-did-0001]
  1126. include => ext-did-0001-custom
  1127. exten => s,1,ExecIf($["${FROM_DID}" = ""]?Set(__FROM_DID=${EXTEN}))
  1128. exten => s,n,Set(CDR(did)=${FROM_DID})
  1129. exten => s,n,ExecIf($[ "${CALLERID(name)}" = "" ] ?Set(CALLERID(name)=${CALLERID(num)}))
  1130. exten => s,n,Set(CHANNEL(musicclass)=default)
  1131. exten => s,n,Set(__MOHCLASS=default)
  1132. exten => s,n,Set(__REVERSAL_REJECT=FALSE)
  1133. exten => s,n,GotoIf($["${REVERSAL_REJECT}"!="TRUE"]?post-reverse-charge)
  1134. exten => s,n,GotoIf($["${CHANNEL(reversecharge)}"="1"]?macro-hangupcall)
  1135. exten => s,n(post-reverse-charge),Noop()
  1136. exten => s,n,Set(__CALLINGNAMEPRES_SV=${CALLERID(name-pres)})
  1137. exten => s,n,Set(__CALLINGNUMPRES_SV=${CALLERID(num-pres)})
  1138. exten => s,n,Set(CALLERID(name-pres)=allowed_not_screened)
  1139. exten => s,n,Set(CALLERID(num-pres)=allowed_not_screened)
  1140. exten => s,n,Set(__ALERT_INFO= )
  1141. exten => s,n(did-cid-hook),Noop(CallerID Entry Point)
  1142. exten => s,n(dest-ext),Goto(from-did-direct,5,1)
  1143.  
  1144. ;--== end of [ext-did-0001] ==--;
  1145.  
  1146.  
  1147. [ext-did-catchall]
  1148. include => ext-did-catchall-custom
  1149. exten => _.,1,Noop(Catch-All DID Match - Found ${EXTEN} - You probably want a DID for this.)
  1150. exten => _.,n,Log(WARNING,Friendly Scanner from ${CUT(CUT(SIP_HEADER(Via), ,2),:,1)})
  1151. exten => _.,n,Set(__FROM_DID=${EXTEN})
  1152. exten => _.,n,Goto(ext-did,s,1)
  1153.  
  1154. ;--== end of [ext-did-catchall] ==--;
  1155.  
  1156.  
  1157. [ext-local]
  1158. include => ext-local-custom
  1159. exten => 1,1,Set(__RINGTIMER=${IF($["${DB(AMPUSER/1/ringtimer)}" > "0"]?${DB(AMPUSER/1/ringtimer)}:${RINGTIMER_DEFAULT})})
  1160. exten => 1,n,Macro(exten-vm,novm,1,0,0,0)
  1161. exten => 1,n(dest),Set(__PICKUPMARK=)
  1162. exten => 1,n,Goto(${IVR_CONTEXT},return,1)
  1163. exten => 1,hint,SIP/1,CustomPresence:1
  1164.  
  1165. exten => 2,1,Set(__RINGTIMER=${IF($["${DB(AMPUSER/2/ringtimer)}" > "0"]?${DB(AMPUSER/2/ringtimer)}:${RINGTIMER_DEFAULT})})
  1166. exten => 2,n,Macro(exten-vm,novm,2,0,0,0)
  1167. exten => 2,n(dest),Set(__PICKUPMARK=)
  1168. exten => 2,n,Goto(${IVR_CONTEXT},return,1)
  1169. exten => 2,hint,SIP/2,CustomPresence:2
  1170.  
  1171. exten => 3,1,Set(__RINGTIMER=${IF($["${DB(AMPUSER/3/ringtimer)}" > "0"]?${DB(AMPUSER/3/ringtimer)}:${RINGTIMER_DEFAULT})})
  1172. exten => 3,n,Macro(exten-vm,novm,3,0,0,0)
  1173. exten => 3,n(dest),Set(__PICKUPMARK=)
  1174. exten => 3,n,Goto(${IVR_CONTEXT},return,1)
  1175. exten => 3,hint,PJSIP/3,CustomPresence:3
  1176.  
  1177. exten => 4,1,Set(__RINGTIMER=${IF($["${DB(AMPUSER/4/ringtimer)}" > "0"]?${DB(AMPUSER/4/ringtimer)}:${RINGTIMER_DEFAULT})})
  1178. exten => 4,n,Macro(exten-vm,novm,4,0,0,0)
  1179. exten => 4,n(dest),Set(__PICKUPMARK=)
  1180. exten => 4,n,Goto(${IVR_CONTEXT},return,1)
  1181. exten => 4,hint,PJSIP/4,CustomPresence:4
  1182.  
  1183. exten => 5,1,Set(__RINGTIMER=${IF($["${DB(AMPUSER/5/ringtimer)}" > "0"]?${DB(AMPUSER/5/ringtimer)}:${RINGTIMER_DEFAULT})})
  1184. exten => 5,n,Macro(exten-vm,novm,5,0,0,0)
  1185. exten => 5,n(dest),Set(__PICKUPMARK=)
  1186. exten => 5,n,Goto(${IVR_CONTEXT},return,1)
  1187. exten => 5,hint,PJSIP/5,CustomPresence:5
  1188.  
  1189. exten => 6,1,Set(__RINGTIMER=${IF($["${DB(AMPUSER/6/ringtimer)}" > "0"]?${DB(AMPUSER/6/ringtimer)}:${RINGTIMER_DEFAULT})})
  1190. exten => 6,n,Macro(exten-vm,novm,6,0,0,0)
  1191. exten => 6,n(dest),Set(__PICKUPMARK=)
  1192. exten => 6,n,Goto(${IVR_CONTEXT},return,1)
  1193. exten => 6,hint,PJSIP/6,CustomPresence:6
  1194.  
  1195. exten => vmret,1,GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?playret)
  1196. exten => vmret,n,Hangup
  1197. exten => vmret,n(playret),Playback(exited-vm-will-be-transfered&silence/1)
  1198. exten => vmret,n,Goto(${IVR_CONTEXT},return,1)
  1199.  
  1200. exten => h,1,Macro(hangupcall,)
  1201.  
  1202. exten => *801,hint,SIP/1,CustomPresence:1
  1203. exten => *802,hint,SIP/2,CustomPresence:2
  1204. exten => *803,hint,PJSIP/3,CustomPresence:3
  1205. exten => *804,hint,PJSIP/4,CustomPresence:4
  1206. exten => *805,hint,PJSIP/5,CustomPresence:5
  1207. exten => *806,hint,PJSIP/6,CustomPresence:6
  1208. ;--== end of [ext-local] ==--;
  1209.  
  1210.  
  1211. [from-did-direct-ivr]
  1212. include => from-did-direct-ivr-custom
  1213. exten => 1,1,Macro(blkvm-clr,)
  1214. exten => 1,n,Set(__NODEST=)
  1215. exten => 1,n,Goto(from-did-direct,1,1)
  1216.  
  1217. exten => 2,1,Macro(blkvm-clr,)
  1218. exten => 2,n,Set(__NODEST=)
  1219. exten => 2,n,Goto(from-did-direct,2,1)
  1220.  
  1221. exten => 3,1,Macro(blkvm-clr,)
  1222. exten => 3,n,Set(__NODEST=)
  1223. exten => 3,n,Goto(from-did-direct,3,1)
  1224.  
  1225. exten => 4,1,Macro(blkvm-clr,)
  1226. exten => 4,n,Set(__NODEST=)
  1227. exten => 4,n,Goto(from-did-direct,4,1)
  1228.  
  1229. exten => 5,1,Macro(blkvm-clr,)
  1230. exten => 5,n,Set(__NODEST=)
  1231. exten => 5,n,Goto(from-did-direct,5,1)
  1232.  
  1233. exten => 6,1,Macro(blkvm-clr,)
  1234. exten => 6,n,Set(__NODEST=)
  1235. exten => 6,n,Goto(from-did-direct,6,1)
  1236.  
  1237. ;--== end of [from-did-direct-ivr] ==--;
  1238.  
  1239.  
  1240. [ext-trunk]
  1241. include => ext-trunk-custom
  1242. exten => 1,1,Set(TDIAL_STRING=DAHDI/g0)
  1243. exten => 1,n,Set(DIAL_TRUNK=1)
  1244. exten => 1,n,Goto(ext-trunk,tdial,1)
  1245.  
  1246. exten => 2,1,Set(TDIAL_STRING=SIP/flowroute1)
  1247. exten => 2,n,Set(DIAL_TRUNK=2)
  1248. exten => 2,n,Goto(ext-trunk,tdial,1)
  1249.  
  1250. exten => tdial,1,Set(OUTBOUND_GROUP=OUT_${DIAL_TRUNK})
  1251. exten => tdial,n,GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}" = ""]?nomax)
  1252. exten => tdial,n,GotoIf($[${GROUP_COUNT(OUT_${DIAL_TRUNK})} >= ${OUTMAXCHANS_${DIAL_TRUNK}}]?hangit)
  1253. exten => tdial,n(nomax),ExecIf($["${CALLINGNAMEPRES_SV}" != ""]?Set(CALLERPRES(name-pres)=${CALLINGNAMEPRES_SV}))
  1254. exten => tdial,n,ExecIf($["${CALLINGNUMPRES_SV}" != ""]?Set(CALLERPRES(num-pres)=${CALLINGNUMPRES_SV}))
  1255. exten => tdial,n,Set(DIAL_NUMBER=${FROM_DID})
  1256. exten => tdial,n,GosubIf($["${PREFIX_TRUNK_${DIAL_TRUNK}}" != ""]?sub-flp-${DIAL_TRUNK},s,1())
  1257. exten => tdial,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER})
  1258. exten => tdial,n,Set(DIAL_TRUNK_OPTIONS=${IF($["${DB_EXISTS(TRUNK/${DIAL_TRUNK}/dialopts)}" = "1"]?${DB_RESULT}:${TRUNK_OPTIONS})})
  1259. exten => tdial,n,Dial(${TDIAL_STRING}/${OUTNUM}${TDIAL_SUFFIX},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS})
  1260. exten => tdial,n,Set(CALLERID(number)=${CALLERID(number):0:40})
  1261. exten => tdial,n,Set(CALLERID(name)=${CALLERID(name):0:40})
  1262. exten => tdial,n(hangit),Hangup
  1263.  
  1264. ;--== end of [ext-trunk] ==--;
  1265.  
  1266.  
  1267. [from-trunk-sip-flowroute1]
  1268. include => from-trunk-sip-flowroute1-custom
  1269. exten => _.,1,Set(GROUP()=OUT_2)
  1270. exten => _.,n,Goto(from-trunk,${EXTEN},1)
  1271.  
  1272. ;--== end of [from-trunk-sip-flowroute1] ==--;
  1273.  
  1274.  
  1275. [sub-flp-2]
  1276. include => sub-flp-2-custom
  1277. exten => s,1,ExecIf($[${REGEX("^[2-9][0-9][0-9][2-9][0-9][0-9][0-9][0-9][0-9][0-9]$" ${DIAL_NUMBER})} = 1]?Set(TARGET_FLP_2=1${DIAL_NUMBER}))
  1278. exten => s,n,GotoIf($[${LEN(${TARGET_FLP_2})} != 0]?match)
  1279. exten => s,n,Return()
  1280. exten => s,n(match),Set(DIAL_NUMBER=${TARGET_FLP_2})
  1281. exten => s,n,Return()
  1282.  
  1283. ;--== end of [sub-flp-2] ==--;
  1284.  
  1285.  
  1286. [macro-prepend-cid]
  1287. include => macro-prepend-cid-custom
  1288. exten => s,1,GotoIf($["${RGPREFIX}" = ""]?REPCID)
  1289. exten => s,n,GotoIf($["${RGPREFIX}" != "${CALLERID(name):0:${LEN(${RGPREFIX})}}"]?REPCID)
  1290. exten => s,n,Set(CALLERID(name)=${CALLERID(name):${LEN(${RGPREFIX})}})
  1291. exten => s,n,Set(_RGPREFIX=)
  1292. exten => s,n(REPCID),Set(_RGPREFIX=${ARG1})
  1293. exten => s,n,Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)})
  1294.  
  1295. ;--== end of [macro-prepend-cid] ==--;
  1296.  
  1297.  
  1298. [outbound-allroutes]
  1299. include => outbound-allroutes-custom
  1300. include => outrt-1 ; AOutbound
  1301. exten => foo,1,Noop(bar)
  1302.  
  1303. ;--== end of [outbound-allroutes] ==--;
  1304.  
  1305.  
  1306. [outrt-1] ; AOutbound
  1307. include => outrt-1-custom
  1308. exten => _NXXNXXXXXX,1,Macro(user-callerid,LIMIT,EXTERNAL,)
  1309. exten => _NXXNXXXXXX,n,Gosub(sub-record-check,s,1(out,${EXTEN},dontcare))
  1310. exten => _NXXNXXXXXX,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
  1311. exten => _NXXNXXXXXX,n,ExecIf($["${KEEPCID}"!="TRUE" & ${LEN(${DB(AMPUSER/${AMPUSER}/outboundcid)})}=0 & ${LEN(${TRUNKCIDOVERRIDE})}=0]?Set(TRUNKCIDOVERRIDE=OutboundTest))
  1312. exten => _NXXNXXXXXX,n,Set(_NODEST=)
  1313. exten => _NXXNXXXXXX,n,Macro(dialout-trunk,2,1${EXTEN},,off)
  1314. exten => _NXXNXXXXXX,n,Macro(dialout-trunk,1,1${EXTEN},,off)
  1315. exten => _NXXNXXXXXX,n,Macro(outisbusy,)
  1316.  
  1317. ;--== end of [outrt-1] ==--;
  1318.  
  1319.  
  1320. [app-blackhole]
  1321. include => app-blackhole-custom
  1322. exten => hangup,1,Noop(Blackhole Dest: Hangup)
  1323. exten => hangup,n,Hangup
  1324.  
  1325. exten => zapateller,1,Noop(Blackhole Dest: Play SIT Tone)
  1326. exten => zapateller,n,Answer
  1327. exten => zapateller,n,Zapateller()
  1328.  
  1329. exten => musiconhold,1,Noop(Blackhole Dest: Put caller on hold forever)
  1330. exten => musiconhold,n,Answer
  1331. exten => musiconhold,n,MusicOnHold()
  1332.  
  1333. exten => congestion,1,Noop(Blackhole Dest: Congestion)
  1334. exten => congestion,n,Progress
  1335. exten => congestion,n,Playtones(congestion)
  1336. exten => congestion,n,Congestion(20)
  1337. exten => congestion,n,Hangup
  1338.  
  1339. exten => busy,1,Noop(Blackhole Dest: Busy)
  1340. exten => busy,n,Progress
  1341. exten => busy,n,Busy(20)
  1342. exten => busy,n,Hangup
  1343.  
  1344. exten => ring,1,Noop(Blackhole Dest: Ring)
  1345. exten => ring,n,Answer
  1346. exten => ring,n,Playtones(ring)
  1347. exten => ring,n,Wait(300)
  1348. exten => ring,n,Hangup
  1349.  
  1350. exten => no-service,1,Noop(Blackhole Dest: No service)
  1351. exten => no-service,n,Answer
  1352. exten => no-service,n,Wait(1)
  1353. exten => no-service,n,Zapateller()
  1354. exten => no-service,n,Playback(ss-noservice)
  1355. exten => no-service,n,Hangup
  1356.  
  1357. ;--== end of [app-blackhole] ==--;
  1358.  
  1359.  
  1360. [bad-number]
  1361. include => bad-number-custom
  1362. exten => _X.,1,ResetCDR()
  1363. exten => _X.,n,NoCDR()
  1364. exten => _X.,n,Progress
  1365. exten => _X.,n,Wait(1)
  1366. exten => _X.,n,Progress
  1367. exten => _X.,n,Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer)
  1368. exten => _X.,n,Wait(1)
  1369. exten => _X.,n,Congestion(20)
  1370. exten => _X.,n,Hangup
  1371.  
  1372. ;--== end of [bad-number] ==--;
  1373.  
  1374.  
  1375. [sub-presencestate-display]
  1376. include => sub-presencestate-display-custom
  1377. exten => s,1,Goto(state-${TOLOWER(${PRESENCE_STATE(CustomPresence:${ARG1},value)})},1)
  1378.  
  1379. exten => state-available,1,Set(PRESENCESTATE_DISPLAY=(Available))
  1380. exten => state-available,n,Return()
  1381.  
  1382. exten => state-chat,1,Set(PRESENCESTATE_DISPLAY=(Chatty))
  1383. exten => state-chat,n,Return()
  1384.  
  1385. exten => state-away,1,Set(PRESENCESTATE_DISPLAY=(Away))
  1386. exten => state-away,n,Return()
  1387.  
  1388. exten => state-dnd,1,Set(PRESENCESTATE_DISPLAY=(DND))
  1389. exten => state-dnd,n,Return()
  1390.  
  1391. exten => state-xa,1,Set(PRESENCESTATE_DISPLAY=(Extended Away))
  1392. exten => state-xa,n,Return()
  1393.  
  1394. exten => state-unavailable,1,Set(PRESENCESTATE_DISPLAY=(Unavailable))
  1395. exten => state-unavailable,n,Return()
  1396.  
  1397. exten => _state-.,1,Set(PRESENCESTATE_DISPLAY=)
  1398. exten => _state-.,n,Return()
  1399.  
  1400. exten => state-,1,Set(PRESENCESTATE_DISPLAY=)
  1401. exten => state-,n,Return()
  1402.  
  1403. ;--== end of [sub-presencestate-display] ==--;
  1404.  
  1405.  
  1406. [macro-confirm]
  1407. include => macro-confirm-custom
  1408. exten => s,1,Set(LOOPCOUNT=0)
  1409. exten => s,n,Set(__MACRO_RESULT=ABORT)
  1410. exten => s,n,Set(MSG1=${IF($["${ARG1}${ALT_CONFIRM_MSG}"=""]?incoming-call-1-accept-2-decline:${IF($[${LEN(${ALT_CONFIRM_MSG})}>0]?${ALT_CONFIRM_MSG}:${ARG1})})})
  1411. exten => s,n(start),Background(${MSG1},m,${CHANNEL(language)},macro-confirm)
  1412. exten => s,n,Read(INPUT,,1,,,4)
  1413. exten => s,n,GotoIf($[${LEN(${INPUT})} > 0]?${INPUT},1:t,1)
  1414.  
  1415. exten => 1,1,GotoIf($["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}"="0" & "${SHARED(ANSWER_STATUS,${FORCE_CONFIRM})}"=""]?toolate,1)
  1416. exten => 1,n,Noop(Deleting: RG/${ARG3}/${UNIQCHAN} ${DB_DELETE(RG/${ARG3}/${UNIQCHAN})})
  1417. exten => 1,n,Macro(blkvm-clr,)
  1418. exten => 1,n,Set(SHARED(ANSWER_STATUS,${FORCE_CONFIRM})=)
  1419. exten => 1,n(skip),Set(__MACRO_RESULT=)
  1420. exten => 1,n,ExecIf($[("${MOHCLASS}"!="default") & ("${MOHCLASS}"!="")]?Set(CHANNEL(musicclass)=${MOHCLASS}))
  1421. exten => 1,n(exitopt1),MacroExit()
  1422.  
  1423. exten => 2,1,Goto(noanswer,1)
  1424.  
  1425. exten => 3,1,SayDigits(${CALLCONFIRMCID})
  1426. exten => 3,n,GotoIf($["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}"="0" & "${SHARED(ANSWER_STATUS,${FORCE_CONFIRM})}"=""]?toolate,1:s,start)
  1427.  
  1428. exten => t,1,GotoIf($["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}"="0" & "${SHARED(ANSWER_STATUS,${FORCE_CONFIRM})}"=""]?toolate,1)
  1429. exten => t,n,Set(LOOPCOUNT=$[ ${LOOPCOUNT} + 1 ])
  1430. exten => t,n,GotoIf($[ ${LOOPCOUNT} < 5 ]?s,start:noanswer,1)
  1431.  
  1432. exten => _X,1,Background(invalid,m,${CHANNEL(language)},macro-confirm)
  1433. exten => _X,n,GotoIf($["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}"="0" | "${SHARED(ANSWER_STATUS,${FORCE_CONFIRM})}"=""]?toolate,1)
  1434. exten => _X,n,Set(LOOPCOUNT=$[ ${LOOPCOUNT} + 1 ])
  1435. exten => _X,n,GotoIf($[ ${LOOPCOUNT} < 5 ]?s,start:noanswer,1)
  1436.  
  1437. exten => noanswer,1,Set(__MACRO_RESULT=ABORT)
  1438. exten => noanswer,n(exitnoanswer),MacroExit()
  1439.  
  1440. exten => toolate,1,Set(MSG2=${IF($["foo${ARG2}" != "foo"]?${ARG2}:"incoming-call-no-longer-avail")})
  1441. exten => toolate,n,Playback(${MSG2})
  1442. exten => toolate,n,Set(__MACRO_RESULT=ABORT)
  1443. exten => toolate,n(exittoolate),MacroExit()
  1444.  
  1445. exten => h,1,Macro(hangupcall,)
  1446.  
  1447. ;--== end of [macro-confirm] ==--;
  1448.  
  1449.  
  1450. [macro-auto-confirm]
  1451. include => macro-auto-confirm-custom
  1452. exten => s,1,Set(__MACRO_RESULT=)
  1453. exten => s,n,Set(CFIGNORE=)
  1454. exten => s,n,Set(MASTER_CHANNEL(CFIGNORE)=)
  1455. exten => s,n,Set(FORWARD_CONTEXT=from-internal)
  1456. exten => s,n,Set(MASTER_CHANNEL(FORWARD_CONTEXT)=from-internal)
  1457. exten => s,n,Macro(blkvm-clr,)
  1458. exten => s,n,Noop(Deleting: RG/${ARG1}/${UNIQCHAN} ${DB_DELETE(RG/${ARG1}/${UNIQCHAN})})
  1459. exten => s,n,ExecIf($[!${REGEX("[^0-9]" ${DIALEDPEERNUMBER})} && "${DB(AMPUSER/${AMPUSER}/cidname)}" != ""]?Set(MASTER_CHANNEL(CONNECTEDLINE(num))=${DIALEDPEERNUMBER}))
  1460. exten => s,n,ExecIf($[!${REGEX("[^0-9]" ${DIALEDPEERNUMBER})} && "${DB(AMPUSER/${AMPUSER}/cidname)}" != ""]?Set(MASTER_CHANNEL(CONNECTEDLINE(name))=${DB(AMPUSER/${DIALEDPEERNUMBER}/cidname)}))
  1461.  
  1462. ;--== end of [macro-auto-confirm] ==--;
  1463.  
  1464.  
  1465. [macro-auto-blkvm]
  1466. include => macro-auto-blkvm-custom
  1467. exten => s,1,Set(__MACRO_RESULT=)
  1468. exten => s,n,Set(CFIGNORE=)
  1469. exten => s,n,Set(MASTER_CHANNEL(CFIGNORE)=)
  1470. exten => s,n,Set(FORWARD_CONTEXT=from-internal)
  1471. exten => s,n,Set(MASTER_CHANNEL(FORWARD_CONTEXT)=from-internal)
  1472. exten => s,n,Macro(blkvm-clr,)
  1473. exten => s,n,ExecIf($[!${REGEX("[^0-9]" ${DIALEDPEERNUMBER})} && "${DB(AMPUSER/${AMPUSER}/cidname)}" != ""]?Set(MASTER_CHANNEL(CONNECTEDLINE(num))=${DIALEDPEERNUMBER}))
  1474. exten => s,n,ExecIf($[!${REGEX("[^0-9]" ${DIALEDPEERNUMBER})} && "${DB(AMPUSER/${AMPUSER}/cidname)}" != ""]?Set(MASTER_CHANNEL(CONNECTEDLINE(name))=${DB(AMPUSER/${DIALEDPEERNUMBER}/cidname)}))
  1475.  
  1476. ;--== end of [macro-auto-blkvm] ==--;
  1477.  
  1478.  
  1479. [sub-pincheck]
  1480. include => sub-pincheck-custom
  1481. exten => s,1,Authenticate(${ARG3},)
  1482. exten => s,n,ResetCDR()
  1483. exten => s,n,Return()
  1484.  
  1485. ;--== end of [sub-pincheck] ==--;
  1486.  
  1487.  
  1488. [macro-dialout-trunk]
  1489. include => macro-dialout-trunk-custom
  1490. exten => s,1,Set(DIAL_TRUNK=${ARG1})
  1491. exten => s,n,GosubIf($[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]?sub-pincheck,s,1())
  1492. exten => s,n,GotoIf($["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]?disabletrunk,1)
  1493. exten => s,n,Set(DIAL_NUMBER=${ARG2})
  1494. exten => s,n,Set(DIAL_TRUNK_OPTIONS=${DIAL_OPTIONS})
  1495. exten => s,n,Set(OUTBOUND_GROUP=OUT_${DIAL_TRUNK})
  1496. exten => s,n,GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}foo" = "foo"]?nomax)
  1497. exten => s,n,GotoIf($[ ${GROUP_COUNT(OUT_${DIAL_TRUNK})} >= ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull)
  1498. exten => s,n(nomax),GotoIf($["${INTRACOMPANYROUTE}" = "YES"]?skipoutcid)
  1499. exten => s,n,Set(DIAL_TRUNK_OPTIONS=${IF($["${DB_EXISTS(TRUNK/${DIAL_TRUNK}/dialopts)}" = "1"]?${DB_RESULT}:${TRUNK_OPTIONS})})
  1500. exten => s,n,Macro(outbound-callerid,${DIAL_TRUNK})
  1501. exten => s,n(skipoutcid),GosubIf($["${PREFIX_TRUNK_${DIAL_TRUNK}}" != ""]?sub-flp-${DIAL_TRUNK},s,1())
  1502. exten => s,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER})
  1503. exten => s,n,Set(custom=${CUT(OUT_${DIAL_TRUNK},:,1)})
  1504. exten => s,n,ExecIf($["${MOHCLASS}"!="default" & "${MOHCLASS}"!="" & "${FORCE_CONFIRM}"="" ]?Set(DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}))
  1505. exten => s,n,ExecIf($["${FORCE_CONFIRM}"!="" ]?Set(DIAL_TRUNK_OPTIONS=${DIAL_TRUNK_OPTIONS}M(confirm)))
  1506. exten => s,n(gocall),Macro(dialout-trunk-predial-hook,)
  1507. exten => s,n,GotoIf($["${PREDIAL_HOOK_RET}" = "BYPASS"]?bypass,1)
  1508. exten => s,n,ExecIf($["${DB(AMPUSER/${AMPUSER}/cidname)}" != ""]?Set(CONNECTEDLINE(num,i)=${DIAL_NUMBER}))
  1509. exten => s,n,ExecIf($[$["${DB(AMPUSER/${AMPUSER}/cidname)}" != ""] & $["${CALLERID(name)}"!="hidden"]]?Set(CONNECTEDLINE(name,i)=CID:${CALLERID(number)}))
  1510. exten => s,n,ExecIf($[$["${DB(AMPUSER/${AMPUSER}/cidname)}" != ""] & $["${CALLERID(name)}"="hidden"]]?Set(CONNECTEDLINE(name,i)=CID:(Hidden)${CALLERID(number)}))
  1511. exten => s,n,GotoIf($["${custom}" = "AMP"]?customtrunk)
  1512. exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM}${OUT_${DIAL_TRUNK}_SUFFIX},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS})
  1513. exten => s,n,Noop(Dial failed for some reason with DIALSTATUS = ${DIALSTATUS} and HANGUPCAUSE = ${HANGUPCAUSE})
  1514. exten => s,n,GotoIf($["${ARG4}" = "on"]?continue,1:s-${DIALSTATUS},1)
  1515. exten => s,n(customtrunk),Set(pre_num=${CUT(OUT_${DIAL_TRUNK},$,1)})
  1516. exten => s,n,Set(the_num=${CUT(OUT_${DIAL_TRUNK},$,2)})
  1517. exten => s,n,Set(post_num=${CUT(OUT_${DIAL_TRUNK},$,3)})
  1518. exten => s,n,GotoIf($["${the_num}" = "OUTNUM"]?outnum:skipoutnum)
  1519. exten => s,n(outnum),Set(the_num=${OUTNUM})
  1520. exten => s,n(skipoutnum),Dial(${pre_num:4}${the_num}${post_num},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS})
  1521. exten => s,n,Noop(Dial failed for some reason with DIALSTATUS = ${DIALSTATUS} and HANGUPCAUSE = ${HANGUPCAUSE})
  1522. exten => s,n,GotoIf($["${ARG4}" = "on"]?continue,1:s-${DIALSTATUS},1)
  1523. exten => s,n(chanfull),Noop(max channels used up)
  1524.  
  1525. exten => s-BUSY,1,Noop(Dial failed due to trunk reporting BUSY - giving up)
  1526. exten => s-BUSY,n,Playtones(busy)
  1527. exten => s-BUSY,n,Busy(20)
  1528.  
  1529. exten => s-ANSWER,1,Noop(Call successfully answered - Hanging up now)
  1530. exten => s-ANSWER,n,Macro(hangupcall,)
  1531.  
  1532. exten => s-NOANSWER,1,Noop(Dial failed due to trunk reporting NOANSWER - giving up)
  1533. exten => s-NOANSWER,n,Progress
  1534. exten => s-NOANSWER,n,Playback(number-not-answering,noanswer)
  1535. exten => s-NOANSWER,n,Congestion(20)
  1536.  
  1537. exten => s-INVALIDNMBR,1,Noop(Dial failed due to trunk reporting Address Incomplete - giving up)
  1538. exten => s-INVALIDNMBR,n,Progress
  1539. exten => s-INVALIDNMBR,n,Playback(ss-noservice,noanswer)
  1540. exten => s-INVALIDNMBR,n,Busy(20)
  1541.  
  1542. exten => s-CHANGED,1,Noop(Dial failed due to trunk reporting Number Changed - giving up)
  1543. exten => s-CHANGED,n,Playtones(busy)
  1544. exten => s-CHANGED,n,Busy(20)
  1545.  
  1546. exten => _s-.,1,Set(RC=${IF($[${ISNULL(${HANGUPCAUSE})}]?0:${HANGUPCAUSE})})
  1547. exten => _s-.,n,Goto(${RC},1)
  1548.  
  1549. exten => 17,1,Goto(s-BUSY,1)
  1550.  
  1551. exten => 18,1,Goto(s-NOANSWER,1)
  1552.  
  1553. exten => 22,1,Goto(s-CHANGED,1)
  1554.  
  1555. exten => 23,1,Goto(s-CHANGED,1)
  1556.  
  1557. exten => 1,1,Goto(s-INVALIDNMBR,1)
  1558.  
  1559. exten => 28,1,Goto(s-INVALIDNMBR,1)
  1560.  
  1561. exten => _X,1,Goto(continue,1)
  1562.  
  1563. exten => _X.,1,Goto(continue,1)
  1564.  
  1565. exten => continue,1(noreport),Noop(TRUNK Dial failed due to ${DIALSTATUS} HANGUPCAUSE: ${HANGUPCAUSE} - failing through to other trunks)
  1566. exten => continue,n,ExecIf($["${AMPUSER}"!="" ]?Set(CALLERID(number)=${AMPUSER}))
  1567.  
  1568. exten => disabletrunk,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} DISABLED - falling through to next trunk)
  1569.  
  1570. exten => bypass,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} BYPASSING because dialout-trunk-predial-hook)
  1571.  
  1572. exten => h,1,Macro(hangupcall,)
  1573.  
  1574. ;--== end of [macro-dialout-trunk] ==--;
  1575.  
  1576.  
  1577. [macro-privacy-mgr]
  1578. include => macro-privacy-mgr-custom
  1579. exten => s,1,Set(KEEPCID=${CALLERID(num)})
  1580. exten => s,n,Set(TESTCID=${IF($["${CALLERID(num):0:1}"="+"]?${MATH(1+${CALLERID(num):1})}:${MATH(1+${CALLERID(num)})})})
  1581. exten => s,n,ExecIf($[${LEN(${TESTCID})}=0]?Set(CALLERID(num)=))
  1582. exten => s,n,PrivacyManager(${ARG1},${ARG2})
  1583. exten => s,n,GotoIf($["${PRIVACYMGRSTATUS}"="FAILED"]?fail)
  1584. exten => s,n,GosubIf($["${CALLED_BLACKLIST}"="1"]?app-blacklist-check,s,1())
  1585. exten => s,n,Set(CALLERID(num-pres)=allowed_passed_screen)
  1586. exten => s,n,MacroExit()
  1587. exten => s,n(fail),Noop(STATUS: ${PRIVACYMGRSTATUS} CID: ${CALLERID(num)} ${CALLERID(name)} CALLPRES: ${CALLLINGPRES})
  1588. exten => s,n,Playback(sorry-youre-having-problems&goodbye)
  1589. exten => s,n,Playtones(congestion)
  1590. exten => s,n,Congestion(20)
  1591.  
  1592. exten => h,1,Hangup
  1593.  
  1594. ;--== end of [macro-privacy-mgr] ==--;
  1595.  
  1596.  
  1597. [macro-user-callerid]
  1598. include => macro-user-callerid-custom
  1599. exten => lang-playback,1,GosubIf($[${DIALPLAN_EXISTS(macro-user-callerid,${CHANNEL(language)})}]?macro-user-callerid,${CHANNEL(language)},${ARG1}():macro-user-callerid,en,${ARG1}())
  1600. exten => lang-playback,n,Return()
  1601.  
  1602. exten => s,1,Set(TOUCH_MONITOR=${UNIQUEID})
  1603. exten => s,n,Set(AMPUSER=${IF($["${AMPUSER}" = ""]?${CALLERID(number)}:${AMPUSER})})
  1604. exten => s,n,GotoIf($["${CUT(CHANNEL,@,2):5:5}"="queue" | ${LEN(${AMPUSERCIDNAME})}]?report)
  1605. exten => s,n,ExecIf($["${REALCALLERIDNUM:1:2}" = ""]?Set(REALCALLERIDNUM=${CALLERID(number)}))
  1606. exten => s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)})
  1607. exten => s,n,GotoIf($["${AMPUSER}" = "none"]?limit)
  1608. exten => s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)})
  1609. exten => s,n,GotoIf($["${AMPUSERCIDNAME:1:2}" = ""]?report)
  1610. exten => s,n,Set(AMPUSERCID=${IF($["${ARG2}" != "EXTERNAL" & "${DB_EXISTS(AMPUSER/${AMPUSER}/cidnum)}" = "1"]?${DB_RESULT}:${AMPUSER})})
  1611. exten => s,n,Set(__DIAL_OPTIONS=${IF($["${DB_EXISTS(AMPUSER/${AMPUSER}/dialopts)}" = "1"]?${DB_RESULT}:${DIAL_OPTIONS})})
  1612. exten => s,n,Set(CALLERID(all)="${AMPUSERCIDNAME}" <${AMPUSERCID}>)
  1613. exten => s,n,GotoIf($["${ARG1}"="LIMIT" & ${LEN(${AMPUSER})} & ${DB_EXISTS(AMPUSER/${AMPUSER}/concurrency_limit)} & ${DB(AMPUSER/${AMPUSER}/concurrency_limit)}>0 & ${GROUP_COUNT(${AMPUSER}@concurrency_limit)}>=${DB(AMPUSER/${AMPUSER}/concurrency_limit)}]?limit)
  1614. exten => s,n,ExecIf($["${ARG1}"="LIMIT" & ${LEN(${AMPUSER})}]?Set(GROUP(concurrency_limit)=${AMPUSER}))
  1615. exten => s,n(report),GotoIf($[ "${ARG1}" = "SKIPTTL" | "${ARG1}" = "LIMIT" ]?continue)
  1616. exten => s,n(report2),Set(__TTL=${IF($["foo${TTL}" = "foo"]?64:$[ ${TTL} - 1 ])})
  1617. exten => s,n,GotoIf($[ ${TTL} > 0 ]?continue)
  1618. exten => s,n,Wait(${RINGTIMER})
  1619. exten => s,n,Answer
  1620. exten => s,n,Wait(1)
  1621. exten => s,n,Gosub(macro-user-callerid,lang-playback,1(hook_0))
  1622. exten => s,n,Macro(hangupcall,)
  1623. exten => s,n(limit),Answer
  1624. exten => s,n,Wait(1)
  1625. exten => s,n,Gosub(macro-user-callerid,lang-playback,1(hook_1))
  1626. exten => s,n,Macro(hangupcall,)
  1627. exten => s,n,Congestion(20)
  1628. exten => s,n(continue),Set(CALLERID(number)=${CALLERID(number):0:40})
  1629. exten => s,n,Set(CALLERID(name)=${CALLERID(name):0:40})
  1630. exten => s,n,Set(CDR(cnum)=${CALLERID(num)})
  1631. exten => s,n,Set(CDR(cnam)=${CALLERID(name)})
  1632. exten => s,n,Set(CHANNEL(language)=${MASTER_CHANNEL(CHANNEL(language))})
  1633.  
  1634. exten => h,1,Macro(hangupcall,)
  1635.  
  1636. exten => en,1(hook_0),Playback(im-sorry&an-error-has-occured&with&call-forwarding)
  1637. exten => en,n,Return()
  1638. exten => en,n(hook_1),Playback(beep&im-sorry&your&simul-call-limit-reached&goodbye)
  1639. exten => en,n,Return()
  1640.  
  1641. exten => ja,1(hook_0),Playback(im-sorry&call-forwarding&jp-no&an-error-has-occured)
  1642. exten => ja,n,Return()
  1643. exten => ja,n(hook_1),Playback(beep&im-sorry&simul-call-limit-reached)
  1644. exten => ja,n,Return()
  1645.  
  1646. ;--== end of [macro-user-callerid] ==--;
  1647.  
  1648.  
  1649. [macro-outbound-callerid]
  1650. include => macro-outbound-callerid-custom
  1651. exten => s,1,ExecIf($["${CALLINGNAMEPRES_SV}" != ""]?Set(CALLERPRES(name-pres)=${CALLINGNAMEPRES_SV}))
  1652. exten => s,n,ExecIf($["${CALLINGNUMPRES_SV}" != ""]?Set(CALLERPRES(num-pres)=${CALLINGNUMPRES_SV}))
  1653. exten => s,n,ExecIf($["${REALCALLERIDNUM:1:2}" = ""]?Set(REALCALLERIDNUM=${CALLERID(number)}))
  1654. exten => s,n(start),GotoIf($[ $["${REALCALLERIDNUM}" = ""] | $["${KEEPCID}" != "TRUE"] | $["${OUTKEEPCID_${ARG1}}" = "on"] ]?normcid)
  1655. exten => s,n,Set(USEROUTCID=${REALCALLERIDNUM})
  1656. exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}" = "foo"]?bypass)
  1657. exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${AMPUSER}/outboundcid)})
  1658. exten => s,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)})
  1659. exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}})
  1660. exten => s,n,GotoIf($["${EMERGENCYROUTE:1:2}" = "" | "${EMERGENCYCID:1:2}" = ""]?trunkcid)
  1661. exten => s,n,Set(CALLERID(all)=${EMERGENCYCID})
  1662. exten => s,n,Set(CDR(outbound_cnum)=${CALLERID(num)})
  1663. exten => s,n,Set(CDR(outbound_cnam)=${CALLERID(name)})
  1664. exten => s,n(exit),MacroExit()
  1665. exten => s,n(trunkcid),ExecIf($[${LEN(${TRUNKOUTCID})} != 0]?Set(CALLERID(all)=${TRUNKOUTCID}))
  1666. exten => s,n(usercid),ExecIf($[${LEN(${USEROUTCID})} != 0]?Set(CALLERID(all)=${USEROUTCID}))
  1667. exten => s,n,ExecIf($[${LEN(${TRUNKCIDOVERRIDE})} != 0 | ${LEN(${FORCEDOUTCID_${ARG1}})} != 0]?Set(CALLERID(all)=${IF($[${LEN(${FORCEDOUTCID_${ARG1}})}=0]?${TRUNKCIDOVERRIDE}:${FORCEDOUTCID_${ARG1}})}))
  1668. exten => s,n(hidecid),ExecIf($["${CALLERID(name)}"="hidden"]?Set(CALLERPRES(name-pres)=prohib_passed_screen))
  1669. exten => s,n,ExecIf($["${CALLERID(name)}"="hidden"]?Set(CALLERPRES(num-pres)=prohib_passed_screen))
  1670. exten => s,n,Set(CDR(outbound_cnum)=${CALLERID(num)})
  1671. exten => s,n,Set(CDR(outbound_cnam)=${CALLERID(name)})
  1672.  
  1673. ;--== end of [macro-outbound-callerid] ==--;
  1674.  
  1675.  
  1676. [from-zaptel]
  1677. include => from-zaptel-custom
  1678. include => from-dahdi
  1679. exten => foo,1,Noop(bar)
  1680.  
  1681. ;--== end of [from-zaptel] ==--;
  1682.  
  1683.  
  1684. [from-dahdi]
  1685. include => from-dahdi-custom
  1686. exten => _X.,1,Set(DID=${EXTEN})
  1687. exten => _X.,n,Goto(s,1)
  1688.  
  1689. exten => s,1,Noop(Entering from-dahdi with DID == ${DID})
  1690. exten => s,n,Ringing()
  1691. exten => s,n,Set(DID=${IF($["${DID}"= ""]?s:${DID})})
  1692. exten => s,n,Noop(DID is now ${DID})
  1693. exten => s,n,GotoIf($["${CHANNEL:0:5}"="DAHDI"]?dahdiok:checkzap)
  1694. exten => s,n(checkzap),GotoIf($["${CHANNEL:0:3}"="Zap"]?zapok:neither)
  1695. exten => s,n(neither),Goto(from-pstn,${DID},1)
  1696. exten => s,n,Macro(Hangupcall,dummy)
  1697. exten => s,n(dahdiok),Noop(Is a DAHDi Channel)
  1698. exten => s,n,Set(CHAN=${CHANNEL:6})
  1699. exten => s,n,Set(CHAN=${CUT(CHAN,-,1)})
  1700. exten => s,n,Macro(from-dahdi-${CHAN},${DID},1)
  1701. exten => s,n,Noop(Returned from Macro from-dahdi-${CHAN})
  1702. exten => s,n,Goto(from-pstn,${DID},1)
  1703. exten => s,n(zapok),Noop(Is a Zaptel Channel)
  1704. exten => s,n,Set(CHAN=${CHANNEL:4})
  1705. exten => s,n,Set(CHAN=${CUT(CHAN,-,1)})
  1706. exten => s,n,Macro(from-dahdi-${CHAN},${DID},1)
  1707. exten => s,n,Noop(Returned from Macro from-dahdi-${CHAN})
  1708. exten => s,n,Goto(from-pstn,${DID},1)
  1709.  
  1710. ;--== end of [from-dahdi] ==--;
  1711.  
  1712.  
  1713. [macro-dial-confirm]
  1714. include => macro-dial-confirm-custom
  1715. exten => s,1,Set(DB(RG/${ARG4}/${CHANNEL})=RINGING)
  1716. exten => s,n,Set(__UNIQCHAN=${CHANNEL})
  1717. exten => s,n,Set(USE_CONFIRMATION=TRUE)
  1718. exten => s,n,Set(RINGGROUP_INDEX=${ARG4})
  1719. exten => s,n,Set(FORCE_CONFIRM=)
  1720. exten => s,n,Set(ARG4=)
  1721. exten => s,n,Macro(dial,${ARG1},${ARG2},${ARG3})
  1722. exten => s,n,Noop(Deleting: RG/${RINGGROUP_INDEX}/${CHANNEL} ${DB_DELETE(RG/${RINGGROUP_INDEX}/${CHANNEL})})
  1723. exten => s,n,Set(USE_CONFIRMATION=)
  1724. exten => s,n,Set(RINGGROUP_INDEX=)
  1725.  
  1726. ;--== end of [macro-dial-confirm] ==--;
  1727.  
  1728.  
  1729. [macro-setmusic]
  1730. include => macro-setmusic-custom
  1731. exten => s,1,Set(CHANNEL(musicclass)=${ARG1})
  1732.  
  1733. ;--== end of [macro-setmusic] ==--;
  1734.  
  1735.  
  1736. [macro-block-cf]
  1737. include => macro-block-cf-custom
  1738. exten => _X.,1,Hangup
  1739.  
  1740. exten => s-ANSWER,1,Noop(Call successfully answered - Hanging up now)
  1741. exten => s-ANSWER,n,Macro(hangupcall,)
  1742.  
  1743. ;--== end of [macro-block-cf] ==--;
  1744.  
  1745.  
  1746. [macro-vm]
  1747. include => macro-vm-custom
  1748. exten => s,1,Macro(user-callerid,SKIPTTL)
  1749. exten => s,n,Set(VMGAIN=${IF($["foo${VM_GAIN}"!="foo"]?"g(${VM_GAIN})": )})
  1750. exten => s,n,Macro(blkvm-check,)
  1751. exten => s,n,GotoIf($["${GOSUB_RETVAL}" != "TRUE"]?vmx,1)
  1752. exten => s,n,Hangup
  1753.  
  1754. exten => vmx,1,Set(MEXTEN=${ARG1})
  1755. exten => vmx,n,Set(MMODE=${ARG2})
  1756. exten => vmx,n,Set(RETVM=${ARG3})
  1757. exten => vmx,n,Set(MODE=${IF($["${MMODE}"="BUSY"]?busy:unavail)})
  1758. exten => vmx,n,Macro(get-vmcontext,${MEXTEN})
  1759. exten => vmx,n,Set(MODE=${IF($[(${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/temp.wav)} = 1) || (${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/temp.WAV)} = 1)]?temp:${MODE})})
  1760. exten => vmx,n,Noop(MODE IS: ${MODE})
  1761. exten => vmx,n,GotoIf($["${DB(AMPUSER/${MEXTEN}/vmx/${MODE}/state)}" != "enabled"]?chknomsg)
  1762. exten => vmx,n,Set(VM_OPTS=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/timeout)}" = "1"]?${DB_RESULT}:${VM_OPTS})})
  1763. exten => vmx,n(chknomsg),GotoIf($["${MMODE}"="NOMESSAGE"]?s-${MMODE},1)
  1764. exten => vmx,n,GotoIf($["${MMODE}" != "DIRECTDIAL"]?notdirect)
  1765. exten => vmx,n,Set(MODE=${IF($["${REGEX("[b]" ${VM_DDTYPE})}" = "1"]?busy:${MODE})})
  1766. exten => vmx,n(notdirect),Noop(Checking if ext ${MEXTEN} is enabled: ${DB(AMPUSER/${MEXTEN}/vmx/${MODE}/state)})
  1767. exten => vmx,n,GotoIf($["${DB(AMPUSER/${MEXTEN}/vmx/${MODE}/state)}" != "enabled"]?s-${MMODE},1)
  1768. exten => vmx,n,GotoIf($[(${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/temp.wav)} = 1) || (${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/temp.WAV)} = 1)]?tmpgreet)
  1769. exten => vmx,n,GotoIf($[(${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/${MODE}.wav)} = 0) && (${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/${MODE}.WAV)} = 0)]?nofile)
  1770. exten => vmx,n,Set(VMX_TIMEOUT=)
  1771. exten => vmx,n,Set(VMX_REPEAT=)
  1772. exten => vmx,n,Set(VMX_LOOPS=)
  1773. exten => vmx,n,Set(LOOPCOUNT=0)
  1774. exten => vmx,n,Set(VMX_REPEAT=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/repeat)}" = "1"]?${DB_RESULT}:${VMX_REPEAT})})
  1775. exten => vmx,n(vmxtime),Set(VMX_TIMEOUT=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timeout)}" = "1"]?${DB_RESULT}:${VMX_TIMEOUT})})
  1776. exten => vmx,n(vmxloops),Set(VMX_LOOPS=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loops)}" = "1"]?${DB_RESULT}:${VMX_LOOPS})})
  1777. exten => vmx,n(vmxanswer),Answer
  1778. exten => vmx,n(loopstart),Read(ACTION,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/${MODE},1,skip,${VMX_REPEAT},${VMX_TIMEOUT})
  1779. exten => vmx,n,GotoIf($["${EXISTS(${ACTION})}" = "1"]?checkopt)
  1780. exten => vmx,n(noopt),Noop(Timeout: going to timeout dest)
  1781. exten => vmx,n,Set(VMX_OPTS=${DB(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/timeout)})
  1782. exten => vmx,n(chktime),GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timedest/ext)}" = "0"]?dotime)
  1783. exten => vmx,n,Set(VMX_TIMEDEST_EXT=${DB_RESULT})
  1784. exten => vmx,n,Set(VMX_TIMEDEST_CONTEXT=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timedest/context)}" = "1"]?${DB_RESULT}:${VMX_TIMEDEST_CONTEXT})})
  1785. exten => vmx,n(timepri),Set(VMX_TIMEDEST_PRI=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timedest/pri)}" = "1"]?${DB_RESULT}:${VMX_TIMEDEST_PRI})})
  1786. exten => vmx,n(dotime),Goto(${VMX_TIMEDEST_CONTEXT},${VMX_TIMEDEST_EXT},${VMX_TIMEDEST_PRI})
  1787. exten => vmx,n(checkopt),GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/${ACTION}/ext)}" = "1"]?doopt)
  1788. exten => vmx,n,GotoIf($["${ACTION}" = "0"]?o,1)
  1789. exten => vmx,n,GotoIf($["${ACTION}" = "*"]?adef,1)
  1790. exten => vmx,n,Set(LOOPCOUNT=$[${LOOPCOUNT} + 1])
  1791. exten => vmx,n,GotoIf($["${LOOPCOUNT}" > "${VMX_LOOPS}"]?toomany)
  1792. exten => vmx,n,Playback(pm-invalid-option&please-try-again)
  1793. exten => vmx,n,Goto(loopstart)
  1794. exten => vmx,n(toomany),Noop(Too Many invalid entries, got to invalid dest)
  1795. exten => vmx,n,Set(VMX_OPTS=${VMX_OPTS_LOOP})
  1796. exten => vmx,n,Set(VMX_OPTS=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/loops)}" = "1"]?${DB_RESULT}:${VMX_OPTS})})
  1797. exten => vmx,n(chkloop),GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loopdest/ext)}" = "0"]?doloop)
  1798. exten => vmx,n,Set(VMX_LOOPDEST_EXT=${DB_RESULT})
  1799. exten => vmx,n,Set(VMX_LOOPDEST_CONTEXT=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loopdest/context)}" = "1"]?${DB_RESULT}:${VMX_LOOPDEST_CONTEXT})})
  1800. exten => vmx,n(looppri),Set(VMX_LOOPDEST_PRI=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loopdest/pri)}" = "1"]?${DB_RESULT}:${VMX_LOOPDEST_PRI})})
  1801. exten => vmx,n(doloop),Goto(${VMX_LOOPDEST_CONTEXT},${VMX_LOOPDEST_EXT},${VMX_LOOPDEST_PRI})
  1802. exten => vmx,n(doopt),Noop(Got a valid option: ${DB_RESULT})
  1803. exten => vmx,n,Set(VMX_EXT=${DB_RESULT})
  1804. exten => vmx,n,GotoIf($["${VMX_EXT}" != "dovm"]?getdest)
  1805. exten => vmx,n(vmxopts),Set(VMX_OPTS=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/dovm)}" = "1"]?${DB_RESULT}:${VMX_OPTS_DOVM})})
  1806. exten => vmx,n(vmxdovm),Goto(dovm,1)
  1807. exten => vmx,n(getdest),Set(VMX_CONTEXT=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/${ACTION}/context)}" = "1"]?${DB_RESULT}:${VMX_CONTEXT})})
  1808. exten => vmx,n(vmxpri),Set(VMX_PRI=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/${ACTION}/pri)}" = "1"]?${DB_RESULT}:${VMX_PRI})})
  1809. exten => vmx,n(vmxgoto),Goto(${VMX_CONTEXT},${VMX_EXT},${VMX_PRI})
  1810. exten => vmx,n(nofile),Noop(File for mode: ${MODE} does not exist, SYSTEMSTATUS: ${SYSTEMSTATUS}, going to normal voicemail)
  1811. exten => vmx,n,Goto(s-${MMODE},1)
  1812. exten => vmx,n(tmpgreet),Noop(Temporary Greeting Detected, going to normal voicemail)
  1813. exten => vmx,n,Goto(s-${MMODE},1)
  1814.  
  1815. exten => dovm,1,Noop(VMX Timeout - go to voicemail)
  1816. exten => dovm,n,VoiceMail(${MEXTEN}@${VMCONTEXT},${VMX_OPTS}${VMGAIN})
  1817. exten => dovm,n,Goto(exit-${VMSTATUS},1)
  1818.  
  1819. exten => s-BUSY,1,Noop(BUSY voicemail)
  1820. exten => s-BUSY,n,Macro(get-vmcontext,${MEXTEN})
  1821. exten => s-BUSY,n,VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}b${VMGAIN})
  1822. exten => s-BUSY,n,Goto(exit-${VMSTATUS},1)
  1823.  
  1824. exten => s-NOMESSAGE,1,Noop(NOMESSAGE (beep only) voicemail)
  1825. exten => s-NOMESSAGE,n,Macro(get-vmcontext,${MEXTEN})
  1826. exten => s-NOMESSAGE,n,VoiceMail(${MEXTEN}@${VMCONTEXT},s${VM_OPTS}${VMGAIN})
  1827. exten => s-NOMESSAGE,n,Goto(exit-${VMSTATUS},1)
  1828.  
  1829. exten => s-INSTRUCT,1,Noop(NOMESSAGE (beeb only) voicemail)
  1830. exten => s-INSTRUCT,n,Macro(get-vmcontext,${MEXTEN})
  1831. exten => s-INSTRUCT,n,VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}${VMGAIN})
  1832. exten => s-INSTRUCT,n,Goto(exit-${VMSTATUS},1)
  1833.  
  1834. exten => s-DIRECTDIAL,1,Noop(DIRECTDIAL voicemail)
  1835. exten => s-DIRECTDIAL,n,Macro(get-vmcontext,${MEXTEN})
  1836. exten => s-DIRECTDIAL,n,VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}${VM_DDTYPE}${VMGAIN})
  1837. exten => s-DIRECTDIAL,n,Goto(exit-${VMSTATUS},1)
  1838.  
  1839. exten => _s-.,1,Macro(get-vmcontext,${MEXTEN})
  1840. exten => _s-.,n,VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}u${VMGAIN})
  1841. exten => _s-.,n,Goto(exit-${VMSTATUS},1)
  1842.  
  1843. exten => o,1,Playback(one-moment-please)
  1844. exten => o,n,GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/0/ext)}" = "0"]?doopdef)
  1845. exten => o,n,Set(VMX_OPDEST_EXT=${DB_RESULT})
  1846. exten => o,n(opcontext),Set(VMX_OPDEST_CONTEXT=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/0/context)}" = "1"]?${DB_RESULT}:${VMX_CONTEXT})})
  1847. exten => o,n(oppri),Set(VMX_OPDEST_PRI=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/0/pri)}" = "1"]?${DB_RESULT}:${VMX_PRI})})
  1848. exten => o,n,Goto(${VMX_OPDEST_CONTEXT},${VMX_OPDEST_EXT},${VMX_OPDEST_PRI})
  1849. exten => o,n(doopdef),GotoIf($["x${OPERATOR_XTN}"="x"]?nooper:from-internal,${OPERATOR_XTN},1)
  1850. exten => o,n(nooper),GotoIf($["x${FROM_DID}"="x"]?nodid)
  1851. exten => o,n,Dial(Local/${FROM_DID}@from-pstn,)
  1852. exten => o,n,Macro(hangup,)
  1853. exten => o,n(nodid),Dial(Local/s@from-pstn,)
  1854. exten => o,n,Macro(hangup,)
  1855.  
  1856. exten => a,1,Macro(get-vmcontext,${MEXTEN})
  1857. exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/novmstar)}" = "1"]?s,1)
  1858. exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/*/ext)}" = "0"]?adef,1)
  1859. exten => a,n,Set(VMX_ADEST_EXT=${DB_RESULT})
  1860. exten => a,n(acontext),Set(VMX_ADEST_CONTEXT=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/*/context)}" = "1"]?${DB_RESULT}:${VMX_CONTEXT})})
  1861. exten => a,n(apri),Set(VMX_ADEST_PRI=${IF($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/*/pri)}" = "1"]?${DB_RESULT}:${VMX_PRI})})
  1862. exten => a,n,Goto(${VMX_ADEST_CONTEXT},${VMX_ADEST_EXT},${VMX_ADEST_PRI})
  1863.  
  1864. exten => adef,1,VoiceMailMain(${MEXTEN}@${VMCONTEXT})
  1865. exten => adef,n,GotoIf($["${RETVM}" = "RETURN"]?exit-RETURN,1)
  1866. exten => adef,n,Hangup
  1867.  
  1868. exten => exit-FAILED,1,Playback(im-sorry&an-error-has-occured)
  1869. exten => exit-FAILED,n,GotoIf($["${RETVM}" = "RETURN"]?exit-RETURN,1)
  1870. exten => exit-FAILED,n,Hangup
  1871.  
  1872. exten => exit-SUCCESS,1,GotoIf($["${RETVM}" = "RETURN"]?exit-RETURN,1)
  1873. exten => exit-SUCCESS,n,Playback(goodbye)
  1874. exten => exit-SUCCESS,n,Hangup
  1875.  
  1876. exten => exit-USEREXIT,1,GotoIf($["${RETVM}" = "RETURN"]?exit-RETURN,1)
  1877. exten => exit-USEREXIT,n,Playback(goodbye)
  1878. exten => exit-USEREXIT,n,Hangup
  1879.  
  1880. exten => exit-RETURN,1,Noop(Returning From Voicemail because macro)
  1881.  
  1882. exten => t,1,Hangup
  1883.  
  1884. ;--== end of [macro-vm] ==--;
  1885.  
  1886.  
  1887. [macro-exten-vm]
  1888. include => macro-exten-vm-custom
  1889. exten => s,1,Macro(user-callerid,)
  1890. exten => s,n,Set(RingGroupMethod=none)
  1891. exten => s,n,Set(__EXTTOCALL=${ARG2})
  1892. exten => s,n,Set(__PICKUPMARK=${ARG2})
  1893. exten => s,n,Set(RT=${IF($["${ARG1}"!="novm" | "${DB(CFU/${EXTTOCALL})}"!="" | "${DB(CFB/${EXTTOCALL})}"!="" | "${ARG3}"="1" | "${ARG4}"="1" | "${ARG5}"="1"]?${RINGTIMER}:)})
  1894. exten => s,n(checkrecord),Gosub(sub-record-check,s,1(exten,${EXTTOCALL},dontcare))
  1895. exten => s,n,GotoIf($["${AMPUSER}"=""|${LEN(${FROM_DID})}|"${DB(AMPUSER/${EXTTOCALL}/answermode)}"!="intercom"|${LEN(${BLINDTRANSFER})}|"${EXTENSION_STATE(${EXTTOCALL})}"!="NOT_INUSE"|"${CC_RECALL}"!=""]?macrodial)
  1896. exten => s,n,Set(INTERCOM_EXT_DOPTIONS=${DIAL_OPTIONS})
  1897. exten => s,n,Set(INTERCOM_RETURN=TRUE)
  1898. exten => s,n,Gosub(ext-intercom,*80${EXTTOCALL},1())
  1899. exten => s,n,Set(INTERCOM_RETURN=)
  1900. exten => s,n,Set(INTERCOM_EXT_DOPTIONS=)
  1901. exten => s,n(macrodial),GosubIf($["${INTERCOM_CALL}"="TRUE" & ${LEN(${BLINDTRANSFER})}]?clrheader,1())
  1902. exten => s,n,Macro(dial-one,${RT},${DIAL_OPTIONS},${EXTTOCALL})
  1903. exten => s,n,Set(SV_DIALSTATUS=${DIALSTATUS})
  1904. exten => s,n(calldocfu),GosubIf($[("${SV_DIALSTATUS}"="NOANSWER"|"${SV_DIALSTATUS}"="CHANUNAVAIL") & "${DB(CFU/${EXTTOCALL})}"!="" & "${SCREEN}"=""]?docfu,1())
  1905. exten => s,n(calldocfb),GosubIf($["${SV_DIALSTATUS}"="BUSY" & "${DB(CFB/${EXTTOCALL})}"!="" & "${SCREEN}"=""]?docfb,1())
  1906. exten => s,n,Set(DIALSTATUS=${SV_DIALSTATUS})
  1907. exten => s,n,ExecIf($[("${DIALSTATUS}"="NOANSWER"&"${ARG3}"="1")|("${DIALSTATUS}"="BUSY"&"${ARG4}"="1")|("${DIALSTATUS}"="CHANUNAVAIL"&"${ARG5}"="1")]?MacroExit())
  1908. exten => s,n,GotoIf($["${ARG1}"="novm"]?s-${DIALSTATUS},1)
  1909. exten => s,n,Macro(vm,${ARG1},${DIALSTATUS},${IVR_RETVM})
  1910.  
  1911. exten => docfu,1(docfu),ExecIf($["${DB(AMPUSER/${EXTTOCALL}/cfringtimer)}"="-1"|("${ARG1}"="novm"&"${ARG3}"="1")]?StackPop())
  1912. exten => docfu,n,GotoIf($["${DB(AMPUSER/${EXTTOCALL}/cfringtimer)}"="-1"|("${ARG1}"="novm"&"${ARG3}"="1")]?from-internal,${DB(CFU/${EXTTOCALL})},1)
  1913. exten => docfu,n,Set(RTCF=${IF($["${DB(AMPUSER/${EXTTOCALL}/cfringtimer)}"="0"]?${RT}:${DB(AMPUSER/${EXTTOCALL}/cfringtimer)})})
  1914. exten => docfu,n,Dial(Local/${DB(CFU/${EXTTOCALL})}@from-internal/n,${RTCF},${DIAL_OPTIONS})
  1915. exten => docfu,n,Return()
  1916.  
  1917. exten => docfb,1(docfu),ExecIf($["${DB(AMPUSER/${EXTTOCALL}/cfringtimer)}"="-1"|("${ARG1}"="novm"&"${ARG4}"="1")]?StackPop())
  1918. exten => docfb,n,GotoIf($["${DB(AMPUSER/${EXTTOCALL}/cfringtimer)}"="-1"|("${ARG1}"="novm"&"${ARG4}"="1")]?from-internal,${DB(CFB/${EXTTOCALL})},1)
  1919. exten => docfb,n,Set(RTCF=${IF($["${DB(AMPUSER/${EXTTOCALL}/cfringtimer)}"="0"]?${RT}:${DB(AMPUSER/${EXTTOCALL}/cfringtimer)})})
  1920. exten => docfb,n,Dial(Local/${DB(CFB/${EXTTOCALL})}@from-internal/n,${RTCF},${DIAL_OPTIONS})
  1921. exten => docfb,n,Return()
  1922.  
  1923. exten => clrheader,1,ExecIf($[${LEN(${SIPURI})}&"${SIPURI}"="${SIP_URI_OPTIONS}"]?Set(SIP_URI_OPTIONS=))
  1924. exten => clrheader,n,ExecIf($[${LEN(${ALERTINFO})}]?SIPRemoveHeader(${ALERTINFO}))
  1925. exten => clrheader,n,ExecIf($[${LEN(${CALLINFO})}]?SIPRemoveHeader(${CALLINFO}))
  1926. exten => clrheader,n,Return()
  1927.  
  1928. exten => s-BUSY,1,GotoIf($["${IVR_RETVM}"="RETURN" & "${IVR_CONTEXT}"!=""]?exit,1)
  1929. exten => s-BUSY,n,Playtones(busy)
  1930. exten => s-BUSY,n,Busy(20)
  1931.  
  1932. exten => _s-!,1,GotoIf($["${IVR_RETVM}"="RETURN" & "${IVR_CONTEXT}"!=""]?exit,1)
  1933. exten => _s-!,n,Playtones(congestion)
  1934. exten => _s-!,n,Congestion(10)
  1935.  
  1936. exten => exit,1,Playback(beep&line-busy-transfer-menu&silence/1)
  1937. exten => exit,n,MacroExit()
  1938.  
  1939. ;--== end of [macro-exten-vm] ==--;
  1940.  
  1941.  
  1942. [macro-simple-dial]
  1943. include => macro-simple-dial-custom
  1944. exten => s,1,Set(__EXTTOCALL=${ARG1})
  1945. exten => s,n,Set(RT=${ARG2})
  1946. exten => s,n,Set(CFUEXT=${DB(CFU/${EXTTOCALL})})
  1947. exten => s,n,Set(CFBEXT=${DB(CFB/${EXTTOCALL})})
  1948. exten => s,n,Set(CWI_TMP=${CWIGNORE})
  1949. exten => s,n(macrodial),Macro(dial-one,${RT},${DIAL_OPTIONS},${EXTTOCALL})
  1950. exten => s,n,Set(__CWIGNORE=${CWI_TMP})
  1951. exten => s,n,Set(PR_DIALSTATUS=${DIALSTATUS})
  1952. exten => s,n(calldocfu),GosubIf($["${PR_DIALSTATUS}"="NOANSWER" & "${CFUEXT}"!=""]?docfu,1())
  1953. exten => s,n(calldocfb),GosubIf($["${PR_DIALSTATUS}"="BUSY" & "${CFBEXT}"!=""]?docfb,1())
  1954. exten => s,n,Set(DIALSTATUS=${PR_DIALSTATUS})
  1955. exten => s,n,Goto(s-${DIALSTATUS},1)
  1956.  
  1957. exten => docfu,1,GotoIf($["${DB(AMPUSER/${CFUEXT}/device)}" = "" ]?chlocal)
  1958. exten => docfu,n,Dial(Local/${CFUEXT}@ext-local,${RT},${DIAL_OPTIONS})
  1959. exten => docfu,n,Return()
  1960. exten => docfu,n(chlocal),Dial(Local/${CFUEXT}@from-internal/n,${RT},${DIAL_OPTIONS})
  1961. exten => docfu,n,Return()
  1962.  
  1963. exten => docfb,1,GotoIf($["${DB(AMPUSER/${CFBEXT}/device)}" = "" ]?chlocal)
  1964. exten => docfb,n,Dial(Local/${CFBEXT}@ext-local,${RT},${DIAL_OPTIONS})
  1965. exten => docfb,n,Return()
  1966. exten => docfb,n(chlocal),Dial(Local/${CFBEXT}@from-internal/n,${RT},${DIAL_OPTIONS})
  1967. exten => docfb,n,Return()
  1968.  
  1969. exten => _s-.,1,Noop(Extension is reporting ${EXTEN})
  1970.  
  1971. ;--== end of [macro-simple-dial] ==--;
  1972.  
  1973.  
  1974. [originate-skipvm]
  1975. include => originate-skipvm-custom
  1976. exten => _.X,1,Macro(blkvm-set,)
  1977. exten => _.X,n,Goto(from-internal,${EXTEN},1)
  1978.  
  1979. ;--== end of [originate-skipvm] ==--;
  1980.  
  1981.  
  1982. [macro-blkvm-setifempty]
  1983. include => macro-blkvm-setifempty-custom
  1984. exten => s,1,GotoIf($[!${EXISTS(${BLKVM_CHANNEL})}]?init)
  1985. exten => s,n,Set(GOSUB_RETVAL=${SHARED(BLKVM,${BLKVM_CHANNEL})})
  1986. exten => s,n,MacroExit()
  1987. exten => s,n(init),Set(__BLKVM_CHANNEL=${CHANNEL})
  1988. exten => s,n,Set(SHARED(BLKVM,${BLKVM_CHANNEL})=TRUE)
  1989. exten => s,n,Set(GOSUB_RETVAL=TRUE)
  1990. exten => s,n,MacroExit()
  1991.  
  1992. ;--== end of [macro-blkvm-setifempty] ==--;
  1993.  
  1994.  
  1995. [macro-blkvm-set]
  1996. include => macro-blkvm-set-custom
  1997. exten => s,1,ExecIf($[!${EXISTS(${BLKVM_CHANNEL})} | "{ARG1}" = "reset"]?Set(__BLKVM_CHANNEL=${CHANNEL}))
  1998. exten => s,n,Set(SHARED(BLKVM,${BLKVM_CHANNEL})=TRUE)
  1999. exten => s,n,Set(GOSUB_RETVAL=TRUE)
  2000. exten => s,n,MacroExit()
  2001.  
  2002. ;--== end of [macro-blkvm-set] ==--;
  2003.  
  2004.  
  2005. [macro-blkvm-clr]
  2006. include => macro-blkvm-clr-custom
  2007. exten => s,1,Set(SHARED(BLKVM,${BLKVM_CHANNEL})=)
  2008. exten => s,n,Set(GOSUB_RETVAL=)
  2009. exten => s,n,MacroExit()
  2010.  
  2011. ;--== end of [macro-blkvm-clr] ==--;
  2012.  
  2013.  
  2014. [macro-blkvm-check]
  2015. include => macro-blkvm-check-custom
  2016. exten => s,1,Set(GOSUB_RETVAL=${SHARED(BLKVM,${BLKVM_CHANNEL})})
  2017. exten => s,n,ExecIf($["${GOSUB_RETVAL}"="" & "${CC_RECALL}"="1"]?Set(GOSUB_RETVAL=TRUE))
  2018. exten => s,n,MacroExit()
  2019.  
  2020. ;--== end of [macro-blkvm-check] ==--;
  2021.  
  2022.  
  2023. [macro-hangupcall]
  2024. include => macro-hangupcall-custom
  2025. exten => s,1(start),GotoIf($["${USE_CONFIRMATION}"="" | "${RINGGROUP_INDEX}"="" | "${CHANNEL}"!="${UNIQCHAN}"]?theend)
  2026. exten => s,n(delrgi),Noop(Deleting: RG/${RINGGROUP_INDEX}/${CHANNEL} ${DB_DELETE(RG/${RINGGROUP_INDEX}/${CHANNEL})})
  2027. exten => s,n(theend),ExecIf($["${ONETOUCH_RECFILE}"!="" & "${CDR(recordingfile)}"=""]?Set(CDR(recordingfile)=${ONETOUCH_RECFILE}))
  2028. exten => s,n,Hangup
  2029. exten => s,n,MacroExit()
  2030.  
  2031. ;--== end of [macro-hangupcall] ==--;
  2032.  
  2033.  
  2034. [macro-dial-one]
  2035. include => macro-dial-one-custom
  2036. exten => s,1,Set(DEXTEN=${ARG3})
  2037. exten => s,n,Set(DIALSTATUS_CW=)
  2038. exten => s,n,GosubIf($["${FROM_DID}"!="" & "${SCREEN}"="" & "${DB(AMPUSER/${DEXTEN}/screen)}"!=""]?screen,1())
  2039. exten => s,n,GosubIf($["${DB(CF/${DEXTEN})}"!=""]?cf,1())
  2040. exten => s,n,GotoIf($["${DEXTEN:-1}"="#" | "${DB(DND/${DEXTEN})}"=""]?skip1)
  2041. exten => s,n,Set(DEXTEN=)
  2042. exten => s,n,Set(DIALSTATUS=BUSY)
  2043. exten => s,n(skip1),GotoIf($["${DEXTEN}"=""]?nodial)
  2044. exten => s,n,GotoIf($["${DEXTEN:-1}"="#"]?continue)
  2045. exten => s,n,Set(EXTHASCW=${IF($["${CWIGNORE}"!=""]? :${DB(CW/${DEXTEN})})})
  2046. exten => s,n,GotoIf($["${EXTHASCW}"="" | "${DB(CFB/${DEXTEN})}"!="" | "${DB(CFU/${DEXTEN})}"!=""]?next1:cwinusebusy)
  2047. exten => s,n(next1),GotoIf($["${DB(CFU/${DEXTEN})}"!="" & ("${EXTENSION_STATE(${DEXTEN})}"="UNAVAILABLE" | "${EXTENSION_STATE(${DEXTEN})}"="UNKNOWN")]?docfu:skip3)
  2048. exten => s,n(docfu),Set(DEXTEN=)
  2049. exten => s,n,Set(DIALSTATUS=NOANSWER)
  2050. exten => s,n,Goto(nodial)
  2051. exten => s,n(skip3),GotoIf($["${EXTHASCW}"="" | "${DB(CFB/${DEXTEN})}"!=""]?next2:continue)
  2052. exten => s,n(next2),GotoIf($["${EXTENSION_STATE(${DEXTEN})}"="NOT_INUSE" | "${EXTENSION_STATE(${DEXTEN})}"="UNAVAILABLE" | "${EXTENSION_STATE(${DEXTEN})}"="UNKNOWN"]?continue)
  2053. exten => s,n,ExecIf($["${DB(CFB/${DEXTEN})}"!="" & "${CFIGNORE}"=""]?Set(DIALSTATUS=BUSY))
  2054. exten => s,n,GotoIf($["${EXTHASCW}"!="" | "${DEXTEN:-1}"="#"]?cwinusebusy)
  2055. exten => s,n,Set(DEXTEN=)
  2056. exten => s,n,Set(DIALSTATUS=BUSY)
  2057. exten => s,n,Goto(nodial)
  2058. exten => s,n(cwinusebusy),GotoIf($["${EXTHASCW}"!="" & "${CWINUSEBUSY}"="true"]?next3:continue)
  2059. exten => s,n(next3),ExecIf($["${EXTENSION_STATE(${DEXTEN})}"!="UNAVAILABLE" & "${EXTENSION_STATE(${DEXTEN})}"!="NOT_INUSE" & "${EXTENSION_STATE(${DEXTEN})}"!="UNKNOWN"]?Set(DIALSTATUS_CW=BUSY))
  2060. exten => s,n(continue),GotoIf($["${DEXTEN}"=""]?nodial)
  2061. exten => s,n,GosubIf($["${DEXTEN:-1}"!="#"]?dstring,1():dlocal,1())
  2062. exten => s,n,GotoIf($[${LEN(${DSTRING})}=0]?nodial)
  2063. exten => s,n,GotoIf($["${DEXTEN:-1}"="#"]?skiptrace)
  2064. exten => s,n,GosubIf($[${REGEX("^[\+]?[0-9]+$" ${CALLERID(number)})} = 1]?ctset,1():ctclear,1())
  2065. exten => s,n(skiptrace),Set(D_OPTIONS=${IF($["${NODEST}"!="" & ${REGEX("(M[(]auto-blkvm[)])" ${ARG2})} != 1]?${ARG2}M(auto-blkvm):${ARG2})})
  2066. exten => s,n,Noop(Blind Transfer: ${BLINDTRANSFER}, Attended Transfer: ${ATTENDEDTRANSFER}, User: ${AMPUSER}, Alert Info: ${ALERT_INFO})
  2067. exten => s,n,ExecIf($["${ALERT_INFO}"="" & ${LEN(${AMPUSER})}!=0 & ${LEN(${BLINDTRANSFER})}=0 & ${LEN(${ATTENDEDTRANSFER})}=0]?Set(ALERT_INFO=))
  2068. exten => s,n,ExecIf($[${LEN(${BLINDTRANSFER})}!=0]?Set(ALERT_INFO=))
  2069. exten => s,n,ExecIf($[${LEN(${ATTENDEDTRANSFER})}!=0]?Set(ALERT_INFO=))
  2070. exten => s,n,GosubIf($["${ALERT_INFO}"!="" & "${ALERT_INFO}"!=" "]?func-set-sipheader,s,1(Alert-Info,${ALERT_INFO}))
  2071. exten => s,n,ExecIf($["${MOHCLASS}"!=""]?Set(CHANNEL(musicclass)=${MOHCLASS}))
  2072. exten => s,n,GosubIf($["${QUEUEWAIT}"!=""]?qwait,1())
  2073. exten => s,n,Set(__CWIGNORE=${CWIGNORE})
  2074. exten => s,n,Set(__KEEPCID=TRUE)
  2075. exten => s,n,GotoIf($["${USEGOTO}"="1"]?usegoto,1)
  2076. exten => s,n,GotoIf($["${DB(AMPUSER/${EXTTOCALL}/cidname)}" = "" || "${DB(AMPUSER/${AMPUSER}/cidname)}" = ""]?godial)
  2077. exten => s,n,Gosub(sub-presencestate-display,s,1(${EXTTOCALL}))
  2078. exten => s,n,Set(CONNECTEDLINE(name,i)=${DB(AMPUSER/${EXTTOCALL}/cidname)}${PRESENCESTATE_DISPLAY})
  2079. exten => s,n,Set(CONNECTEDLINE(num)=${EXTTOCALL})
  2080. exten => s,n,Set(D_OPTIONS=${D_OPTIONS}I)
  2081. exten => s,n(godial),Macro(dialout-one-predial-hook,)
  2082. exten => s,n,Dial(${DSTRING},${ARG1},${D_OPTIONS}b(func-apply-sipheaders^s^1))
  2083. exten => s,n,ExecIf($["${DIALSTATUS}"="ANSWER" & "${CALLER_DEST}"!=""]?MacroExit())
  2084. exten => s,n,ExecIf($["${DIALSTATUS_CW}"!=""]?Set(DIALSTATUS=${DIALSTATUS_CW}))
  2085. exten => s,n,GosubIf($[("${SCREEN}"!=""&("${DIALSTATUS}"="TORTURE"|"${DIALSTATUS}"="DONTCALL"))|"${DIALSTATUS}"="ANSWER"]?s-${DIALSTATUS},1())
  2086. exten => s,n,MacroExit()
  2087. exten => s,n(nodial),ExecIf($["${DIALSTATUS}" = ""]?Set(DIALSTATUS=NOANSWER))
  2088. exten => s,n,Noop(Returned from dial-one with nothing to call and DIALSTATUS: ${DIALSTATUS})
  2089. exten => s,n,MacroExit()
  2090.  
  2091. exten => h,1,Macro(hangupcall,)
  2092.  
  2093. exten => usegoto,1,Set(USEGOTO=)
  2094. exten => usegoto,n,Goto(from-internal,${DSTRING},1)
  2095.  
  2096. exten => screen,1,GotoIf($["${DB(AMPUSER/${DEXTEN}/screen)}"!="nomemory" | "${CALLERID(number)}"=""]?memory)
  2097. exten => screen,n,ExecIf($[${REGEX("^[0-9a-zA-Z ]+$" ${CALLERID(number)})} = 1]?System(rm -f ${ASTVARLIBDIR}/sounds/priv-callerintros/${CALLERID(number)}.*))
  2098. exten => screen,n(memory),Set(__SCREEN=${DB(AMPUSER/${DEXTEN}/screen)})
  2099. exten => screen,n,Set(__SCREEN_EXTEN=${DEXTEN})
  2100. exten => screen,n,Set(ARG2=${ARG2}p)
  2101. exten => screen,n,Return()
  2102.  
  2103. exten => cf,1,Set(CFAMPUSER=${IF($["${AMPUSER}"=""]?${CALLERID(number)}:${AMPUSER})})
  2104. exten => cf,n,ExecIf($["${DB(CF/${DEXTEN})}"="${CFAMPUSER}" | "${DB(CF/${DEXTEN})}"="${REALCALLERIDNUM}" | "${CUT(CUT(BLINDTRANSFER,-,1),/,1)}" = "${DB(CF/${DEXTEN})}" | "${DEXTEN}"="${DB(CF/${DEXTEN})}"]?Return())
  2105. exten => cf,n,ExecIf($["${DB(AMPUSER/${DEXTEN}/cfringtimer)}" != "0" & "${DB(AMPUSER/${DEXTEN}/cfringtimer)}" != ""]?Set(ARG1=${IF($["${DB(AMPUSER/${DEXTEN}/cfringtimer)}"="-1"]? : ${DB(AMPUSER/${DEXTEN}/cfringtimer)})}))
  2106. exten => cf,n,Set(DEXTEN=${IF($["${CFIGNORE}"=""]?"${DB(CF/${DEXTEN})}#": )})
  2107. exten => cf,n,ExecIf($["${DEXTEN}"!=""]?Return())
  2108. exten => cf,n,Set(DIALSTATUS=NOANSWER)
  2109. exten => cf,n,Return()
  2110.  
  2111. exten => qwait,1,ExecIf($["${SAVEDCIDNAME}" = ""]?Set(__SAVEDCIDNAME=${CALLERID(name)}))
  2112. exten => qwait,n,Set(ELAPSED=${MATH($[${EPOCH}+30-${QUEUEWAIT}]/60,int)})
  2113. exten => qwait,n,Set(CALLERID(name)=M${ELAPSED}:${SAVEDCIDNAME})
  2114. exten => qwait,n,Return()
  2115.  
  2116. exten => ctset,1,Set(DB(CALLTRACE/${DEXTEN})=${CALLERID(number)})
  2117. exten => ctset,n,Return()
  2118.  
  2119. exten => ctclear,1,Noop(Deleting: CALLTRACE/${DEXTEN} ${DB_DELETE(CALLTRACE/${DEXTEN})})
  2120. exten => ctclear,n,Return()
  2121.  
  2122. exten => dstring,1,Set(DSTRING=)
  2123. exten => dstring,n,Set(DEVICES=${DB(AMPUSER/${DEXTEN}/device)})
  2124. exten => dstring,n,ExecIf($["${DEVICES}"=""]?Return())
  2125. exten => dstring,n,ExecIf($["${DEVICES:0:1}"="&"]?Set(DEVICES=${DEVICES:1}))
  2126. exten => dstring,n,Set(LOOPCNT=${FIELDQTY(DEVICES,&)})
  2127. exten => dstring,n,Set(ITER=1)
  2128. exten => dstring,n(begin),Set(THISDIAL=${DB(DEVICE/${CUT(DEVICES,&,${ITER})}/dial)})
  2129. exten => dstring,n,GosubIf($["${ASTCHANDAHDI}" = "1"]?zap2dahdi,1())
  2130. exten => dstring,n,GotoIf($["${THISDIAL:0:5}"!="PJSIP"]?docheck)
  2131. exten => dstring,n,Noop(Debug: Found PJSIP Destination ${THISDIAL}, updating with PJSIP_DIAL_CONTACTS)
  2132. exten => dstring,n,Set(THISDIAL=${PJSIP_DIAL_CONTACTS(${THISDIAL:6})})
  2133. exten => dstring,n(docheck),GotoIf($["${THISDIAL}"=""]?skipset)
  2134. exten => dstring,n(doset),Set(DSTRING=${DSTRING}${THISDIAL}&)
  2135. exten => dstring,n(skipset),Set(ITER=$[${ITER}+1])
  2136. exten => dstring,n,GotoIf($[${ITER}<=${LOOPCNT}]?begin)
  2137. exten => dstring,n,ExecIf($["${DSTRING:-1}"!="&"]?Return())
  2138. exten => dstring,n,Set(DSTRING=${DSTRING:0:$[${LEN(${DSTRING})}-1]})
  2139. exten => dstring,n,Return()
  2140.  
  2141. exten => dlocal,1,Set(DSTRING=${IF($["${ARG1}"=""]?${DEXTEN:0:${MATH(${LEN(${DEXTEN})}-1,int)}}:Local/${DEXTEN:0:${MATH(${LEN(${DEXTEN})}-1,int)}}@from-internal/n)})
  2142. exten => dlocal,n,Set(USEGOTO=${IF($["${ARG1}"=""]?1:0)})
  2143. exten => dlocal,n,Return()
  2144.  
  2145. exten => zap2dahdi,1,ExecIf($["${THISDIAL}" = ""]?Return())
  2146. exten => zap2dahdi,n,Set(NEWDIAL=)
  2147. exten => zap2dahdi,n,Set(LOOPCNT2=${FIELDQTY(THISDIAL,&)})
  2148. exten => zap2dahdi,n,Set(ITER2=1)
  2149. exten => zap2dahdi,n(begin2),Set(THISPART2=${CUT(THISDIAL,&,${ITER2})})
  2150. exten => zap2dahdi,n,ExecIf($["${THISPART2:0:3}" = "ZAP"]?Set(THISPART2=DAHDI${THISPART2:3}))
  2151. exten => zap2dahdi,n,Set(NEWDIAL=${NEWDIAL}${THISPART2}&)
  2152. exten => zap2dahdi,n,Set(ITER2=$[${ITER2} + 1])
  2153. exten => zap2dahdi,n,GotoIf($[${ITER2} <= ${LOOPCNT2}]?begin2)
  2154. exten => zap2dahdi,n,Set(THISDIAL=${NEWDIAL:0:$[${LEN(${NEWDIAL})}-1]})
  2155. exten => zap2dahdi,n,Return()
  2156.  
  2157. exten => s-TORTURE,1,Goto(app-blackhole,musiconhold,1)
  2158. exten => s-TORTURE,n,Macro(hangupcall,)
  2159.  
  2160. exten => s-DONTCALL,1,Answer
  2161. exten => s-DONTCALL,n,Wait(1)
  2162. exten => s-DONTCALL,n,Zapateller()
  2163. exten => s-DONTCALL,n,Playback(ss-noservice)
  2164. exten => s-DONTCALL,n,Macro(hangupcall,)
  2165.  
  2166. exten => s-CHANUNAVAIL,1,Macro(vm,${SCREEN_EXTEN},BUSY,${IVR_RETVM})
  2167. exten => s-CHANUNAVAIL,n,ExecIf($["${IVR_RETVM}"!="RETURN" | "${IVR_CONTEXT}"=""]?Hangup())
  2168. exten => s-CHANUNAVAIL,n,Return()
  2169.  
  2170. exten => s-NOANSWER,1,Macro(vm,${SCREEN_EXTEN},BUSY,${IVR_RETVM})
  2171. exten => s-NOANSWER,n,ExecIf($["${IVR_RETVM}"!="RETURN" | "${IVR_CONTEXT}"=""]?Hangup())
  2172. exten => s-NOANSWER,n,Return()
  2173.  
  2174. exten => s-BUSY,1,Macro(vm,${SCREEN_EXTEN},BUSY,${IVR_RETVM})
  2175. exten => s-BUSY,n,ExecIf($["${IVR_RETVM}"!="RETURN" | "${IVR_CONTEXT}"=""]?Hangup())
  2176. exten => s-BUSY,n,Return()
  2177.  
  2178. ;--== end of [macro-dial-one] ==--;
  2179.  
  2180.  
  2181. [func-set-sipheader]
  2182. include => func-set-sipheader-custom
  2183. exten => s,1,Noop(Sip Add Header function called. Adding ${ARG1} = ${ARG2})
  2184. exten => s,n,Set(HASH(_SIPHEADERS,${ARG1})=${ARG2})
  2185. exten => s,n,Return()
  2186.  
  2187. ;--== end of [func-set-sipheader] ==--;
  2188.  
  2189.  
  2190. [func-apply-sipheaders]
  2191. include => func-apply-sipheaders-custom
  2192. exten => s,1,Noop(Applying SIP Headers to channel)
  2193. exten => s,n,Set(SIPHEADERKEYS=${HASHKEYS(SIPHEADERS)})
  2194. exten => s,n,While($["${SET(sipkey=${SHIFT(SIPHEADERKEYS)})}" != ""])
  2195. exten => s,n,Set(sipheader=${HASH(SIPHEADERS,${sipkey})})
  2196. exten => s,n,SIPAddHeader(${sipkey}: ${sipheader})
  2197. exten => s,n,Set(PJSIP_HEADER(add,${sipkey})=${sipheader})
  2198. exten => s,n,EndWhile
  2199. exten => s,n,Return()
  2200.  
  2201. ;--== end of [func-apply-sipheaders] ==--;
  2202.  
  2203.  
  2204. [macro-parked-call]
  2205. include => macro-parked-call-custom
  2206. exten => s,1,Gosub(sub-record-check,s,1(parking,${AMPUSER},${AMPUSER}))
  2207.  
  2208. ;--== end of [macro-parked-call] ==--;
  2209.  
  2210.  
  2211. [from-internal-additional]
  2212. include => from-internal-additional-custom
  2213. include => app-calltrace
  2214. include => app-echo-test
  2215. include => app-speakextennum
  2216. include => app-speakingclock
  2217. include => ext-queues
  2218. include => app-queue-toggle
  2219. include => app-queue-caller-count
  2220. include => app-recordings
  2221. include => app-dialvm
  2222. include => app-vmmain
  2223. include => app-userlogonoff
  2224. include => ext-local-confirm
  2225. include => findmefollow-ringallv2
  2226. include => app-pickup
  2227. include => app-chanspy
  2228. include => ext-test
  2229. include => ext-local
  2230. include => outbound-allroutes
  2231. exten => h,1,Hangup
  2232.  
  2233. ;--== end of [from-internal-additional] ==--;
  2234.  
  2235.  
  2236. [from-internal-noxfer-additional]
  2237. include => from-internal-noxfer-additional-custom
  2238. exten => h,1,Hangup
  2239.  
  2240. ;--== end of [from-internal-noxfer-additional] ==--;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top