Advertisement
Guest User

Untitled

a guest
Mar 17th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.90 KB | None | 0 0
  1. ;--------------------------------------------------------------------------------;
  2. ; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
  3. ; this file must be done via the web gui. There are alternative files to make ;
  4. ; custom modifications, details at: http://freepbx.org/configuration_files ;
  5. ;--------------------------------------------------------------------------------;
  6.  
  7. ;*******************************************************************************
  8. ; AUTO-GENERATED AND CUSOTM USER DIALPLAN INCLUDED HERE *
  9. ;*******************************************************************************
  10.  
  11. ;--------------------------------------------------------------------------------;
  12. ; Customizations to this dialplan should be made in extensions_custom.conf
  13. ; See extensions_custom.conf.sample for an example.
  14. ;
  15. ; If you need to use [macro-dialout-trunk-predial-hook], [ext-did-custom], or
  16. ; [from-internal-custom] for example, place these in this file or they will get overwritten.
  17. ;
  18. ; WARNING ABOUT: #include extensions_override_freepbx.conf
  19. ;
  20. ; This include file is put first to allow the auto-generated dialplan in FreePBX
  21. ; to be overwritten if necessary. Overriding auto-generated dialplan should be done
  22. ; with extreme caution. In almost all cases any custom dialplan SHOULD be put in
  23. ; extensions_custom.conf which will not hurt a FreePBX generated dialplan. In some
  24. ; very rare and custom situations users may have a need to override what FreePBX
  25. ; automatically generates. If so anything in this file will do that. If you come up
  26. ; with situations where you need to modify the existing dialplan or macros, put it
  27. ; here.
  28. ;
  29. #include extensions_override_freepbx.conf
  30. #include extensions_additional.conf
  31. #include extensions_custom.conf
  32. ;--------------------------------------------------------------------------------;
  33.  
  34.  
  35.  
  36. ;*******************************************************************************
  37. ; DIALPLAN OPEN TO THE PUBLIC, USING INBOUND DIDS AND SIMILAR *
  38. ;*******************************************************************************
  39. ;
  40.  
  41. ;-------------------------------------------------------------------------------
  42. ; from-digital:
  43. ;
  44. ; Context to set for PRI's and equivalent
  45. ;
  46. [from-digital]
  47. include => from-pstn
  48. ;-------------------------------------------------------------------------------
  49.  
  50. ;-------------------------------------------------------------------------------
  51. ; from-analog:
  52. ;
  53. ; Context to set for analog DAHDi cards and equivalent
  54. ;
  55. [from-analog]
  56. include => from-dahdi
  57. ;-------------------------------------------------------------------------------
  58.  
  59. ;-------------------------------------------------------------------------------
  60. ; from-trunk:
  61. ;
  62. ; Context is really just an aliax of from-pstn
  63. ;
  64. [from-trunk]
  65. include => from-pstn
  66. ;-------------------------------------------------------------------------------
  67.  
  68. ;-------------------------------------------------------------------------------
  69. ; from-pstn:
  70. ;
  71. ; Entry context for calls from the outside world to hit FreePBX
  72. [from-pstn]
  73. include => from-pstn-custom ; create this context in extensions_custom.conf to include customizations
  74. include => ext-did
  75. include => ext-did-post-custom
  76. include => from-did-direct
  77. include => ext-did-catchall ; THIS MUST COME AFTER ext-did
  78. ;-------------------------------------------------------------------------------
  79.  
  80. ;-------------------------------------------------------------------------------
  81. ; from-pstn-e164-us:
  82. ;
  83. ; The context is designed for providers who send calls in e164 format and is
  84. ; biased towards NPA calls, callerid and dialing rules. It will do the following:
  85. ;
  86. ; DIDs in an NPA e164 format of +1NXXNXXXXXX will be converted to 10 digit DIDs
  87. ;
  88. ; DIDs in any other format will be delivered as they are, including e164 non NPA
  89. ; DIDs which means they will need the full format including the + in the inbound
  90. ; route.
  91. ;
  92. ; CallerID(number) presented in e164 NPA format will be trimmed to a 10 digit CID
  93. ;
  94. ; CallerID(number) presented in e164 non-NPA (country code other than 1) will be
  95. ; reformated from: +<CountryCode><Number> to 011<CountryCode><Number>
  96. ;
  97. [from-pstn-e164-us]
  98. exten => _+1NXXNXXXXXX/_+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
  99. exten => _+1NXXNXXXXXX/_NXXNXXXXXX,2,Goto(from-pstn,${EXTEN:2},1)
  100. exten => _+1NXXNXXXXXX/_+NX.,1,Set(CALLERID(number)=011${CALLERID(number):1})
  101. exten => _+1NXXNXXXXXX/_011NX.,n,Goto(from-pstn,${EXTEN:2},1)
  102. exten => _+1NXXNXXXXXX,1,Goto(from-pstn,${EXTEN:2},1)
  103. exten => _[0-9+]./_+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
  104. exten => _[0-9+]./_1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):1})
  105. exten => _[0-9+]./_NXXNXXXXXX,n,Goto(from-pstn,${EXTEN},1)
  106. exten => _[0-9+]./_+NX.,1,Set(CALLERID(number)=011${CALLERID(number):1})
  107. exten => _[0-9+]./_011NX.,n,Goto(from-pstn,${EXTEN},1)
  108. exten => _[0-9+].,1,Goto(from-pstn,${EXTEN},1)
  109. exten => s/_+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
  110. exten => s/_NXXNXXXXXX,n,Goto(from-pstn,${EXTEN},1)
  111. exten => s/_+NX.,1,Set(CALLERID(number)=011${CALLERID(number):1})
  112. exten => s/_011NX.,n,Goto(from-pstn,${EXTEN},1)
  113. exten => s,1,Goto(from-pstn,${EXTEN},1)
  114. ;-------------------------------------------------------------------------------
  115.  
  116. ;-------------------------------------------------------------------------------
  117. ; from-pstn-to-did:
  118. ;
  119. ; The context is designed for providers who send the DID in the TO: SIP header
  120. ; only. The format of this header is:
  121. ;
  122. ; To: <sip:2125551212@172.31.74.25>
  123. ;
  124. ; So the DID must be extracted between the sip: and the @, which this does
  125. ;
  126. [from-pstn-toheader]
  127. exten => _.,1,NoOp(Attempting to extract DID from SIP To header)
  128. exten => _.,n,gotoif($["${CHANNEL(channeltype)}"="SIP"]?SIP)
  129. exten => _.,n,gotoif($["${CHANNEL(channeltype)}"="PJSIP"]?PJSIP)
  130. exten => _.,n,NoOp(Unable to determine SIP channel type)
  131. exten => _.,n,goto(from-pstn,${EXTEN},1))
  132. exten => _.,n(SIP),Goto(from-pstn,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)
  133. exten => _.,n(PJSIP),Goto(from-pstn,${CUT(CUT(PJSIP_HEADER(read,To),@,1),:,2)},1)
  134.  
  135. ;-------------------------------------------------------------------------------
  136.  
  137. ;-------------------------------------------------------------------------------
  138. ; from-sip-external
  139. ;
  140. ; This context is the default SIP context unless otherwise changed in the SIP
  141. ; Settings module or other sip configuration locations. This context is hit by
  142. ; either anonymous SIP calls or mis-configured SIP trunks when the incoming call
  143. ; can not be matched with a SIP section.
  144. ;
  145.  
  146. [from-sip-external]
  147. exten => _.,1,NoOp(Received incoming SIP connection from unknown peer to ${EXTEN})
  148. exten => _.,n,Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})})
  149. exten => _.,n,Goto(s,1)
  150. ; CallCentric Check
  151. exten => s,1,GotoIf($["${DID}"="17778615919"]?callcentric)
  152. ; Regular Check
  153. exten => s,1,GotoIf($["${ALLOW_SIP_ANON}"="yes"]?checklang:noanonymous)
  154. ; CallCentric DID Code
  155. exten => s,n(callcentric),Set(Var_FROM_DOMAIN=${CUT(CUT(SIP_HEADER(TO),@,2),>,1)})
  156. exten => s,n,GotoIF($["${Var_FROM_DOMAIN}" = "callcentric.com"]?callcentric-next)
  157. exten => s,n,GotoIF($["${Var_FROM_DOMAIN}" = "ss.callcentric.com"]?callcentric-next)
  158. exten => s,n,GotoIF($["${Var_FROM_DOMAIN}" = "66.193.176.35"]?callcentric-next:checklang)
  159. exten => s,n(callcentric-next),Set(Var_TO_DID=${CUT(CUT(SIP_HEADER(TO),@,1),:,2)})
  160. exten => s,n,GotoIF($["${Var_TO_DID}" = ""]?checklang)
  161. exten => s,n,Set(DID=${Var_TO_DID})
  162. ; Regular script continues
  163. exten => s,n(checklang),GotoIf($["${SIPLANG}"=""]?checkcallerid)
  164. exten => s,n(setlanguage),Set(CHANNEL(language)=${SIPLANG})
  165. exten => s,n(checkcallerid),ExecIf($["${CALLERID(number):0:1}" = "1"]?Set(CALLERID(all)="${CALLERID(name)} <${CALLERID(number):1}>"))
  166. exten => s,n,Goto(from-trunk,${DID},1)
  167. exten => s,n(noanonymous),Set(TIMEOUT(absolute)=15)
  168. exten => s,n,Log(WARNING,"Rejecting unknown SIP connection from ${CHANNEL(recvip)}")
  169. exten => s,n,Answer
  170. exten => s,n,Wait(2)
  171. exten => s,n,Playback(ss-noservice)
  172. exten => s,n,Playtones(congestion)
  173. exten => s,n,Congestion(5)
  174. exten => h,1,Hangup
  175. exten => i,1,Hangup
  176. exten => t,1,Hangup
  177. ;-------------------------------------------------------------------------------
  178.  
  179.  
  180.  
  181. ;*******************************************************************************
  182. ; INTERNAL DIALPLAN, NOT OPEN TO THE PUBLIC WORLD *
  183. ;*******************************************************************************
  184. ;
  185.  
  186. ;-------------------------------------------------------------------------------
  187. ; from-internal:
  188. ;
  189. ; Internal dialplan that most internal phones have access to
  190. ;
  191. [from-internal]
  192. include => from-internal-noxfer
  193. include => from-internal-xfer
  194. include => bad-number ; auto-generated
  195. exten => h,1,Macro(hangupcall)
  196. ;-------------------------------------------------------------------------------
  197.  
  198. ;-------------------------------------------------------------------------------
  199. ; from-internal-noxfer:
  200. ;
  201. ; Place to put internal dialplan that should not be accessible during a blind
  202. ; transfer, this context will not be visible during such.
  203. ;
  204. [from-internal-noxfer]
  205. include => from-internal-noxfer-custom
  206. include => from-internal-noxfer-additional ; auto-generated
  207. exten => h,1,Macro(hangupcall)
  208. ;-------------------------------------------------------------------------------
  209.  
  210. ;-------------------------------------------------------------------------------
  211. ; from-internal-xfer:
  212. ;
  213. ; Place to put most internal dialplan, will be visible during normal calls and
  214. ; blind transfers.
  215. ;
  216. [from-internal-xfer]
  217. include => from-internal-custom
  218. include => from-internal-additional ; auto-generated
  219. exten => h,1,Macro(hangupcall)
  220. ;-------------------------------------------------------------------------------
  221.  
  222.  
  223.  
  224. ;*******************************************************************************
  225. ; INTERNAL MACROS & SPECIAL CONTEXTS *
  226. ;*******************************************************************************
  227. ;
  228.  
  229. ;-------------------------------------------------------------------------------
  230. ; from-did-direct:
  231. ;
  232. ; forces ext-findmefollow to take precedence over ext-local. Also exposed to
  233. ; the public side to allow an extension number to be used as an external DID
  234. ; without requiring inbound routes to be created, common in many PRI installations
  235. ; where the last 4 digits are used as the extnension and DIDs are delivered in
  236. ; 4 digit formats.
  237. ;
  238. [from-did-direct]
  239. include => ext-findmefollow
  240. include => ext-local
  241. ;-------------------------------------------------------------------------------
  242.  
  243. ;-------------------------------------------------------------------------------
  244. ; macro-dial has been converted into a function.
  245. ; see core/functions.inc/macro-dial.php
  246. ;-------------------------------------------------------------------------------
  247.  
  248. ;-------------------------------------------------------------------------------
  249. ; macro-get-vmcontext:
  250. ;
  251. ; returns the user's voicemail context
  252. ;
  253. [macro-get-vmcontext]
  254. exten => s,1,Set(VMCONTEXT=${DB(AMPUSER/${ARG1}/voicemail)})
  255. exten => s,2,GotoIf($["foo${VMCONTEXT}" = "foo"]?200:300)
  256. exten => s,200,Set(VMCONTEXT=default)
  257. exten => s,300,NoOp()
  258. ;-------------------------------------------------------------------------------
  259.  
  260. ;-------------------------------------------------------------------------------
  261. ; macro-outisbusy:
  262. ;
  263. ; Moved to extensions_additional
  264. ;-------------------------------------------------------------------------------
  265.  
  266. ;-------------------------------------------------------------------------------
  267. ; macro-dialout-trunk-predial-hook:
  268. ;
  269. ; this macro intentionally left blank so it may be safely overwritten for any custom
  270. ; requirements that an installation may have.
  271. ;
  272. ; the macro is called by macro-dialout-trunk just prior to making a Dial() attempt
  273. ; to a trunk.
  274. ;
  275. ; MACRO RETURN CODE: ${PREDIAL_HOOK_RET}
  276. ; if set to "BYPASS" then this trunk will be skipped
  277. ;
  278. ;
  279. [macro-dialout-trunk-predial-hook]
  280. exten => s,1,MacroExit()
  281. ;-------------------------------------------------------------------------------
  282.  
  283. ;-------------------------------------------------------------------------------
  284. ; macro-dialout-one-predial-hook
  285. ;
  286. ; this macro intentionally left blank so it may be safely overwritten for any custom
  287. ; requirements that an installation may have.
  288. ;
  289. ; the macro is called by macro-dialout-trunk just prior to making a Dial() attempt
  290. ; to an individual extension.
  291. ;
  292. [macro-dialout-one-predial-hook]
  293. exten => s,1,MacroExit()
  294. ;-------------------------------------------------------------------------------
  295.  
  296. ;-------------------------------------------------------------------------------
  297. ; macro-dial-hunt-predial-hook
  298. ;
  299. ; this macro intentionally left blank so it may be safely overwritten for any custom
  300. ; requirements that an installation may have.
  301. ;
  302. ; the macro is called by macro-dial just prior to making a Dial() attempt
  303. ; to an individual extension.
  304. ;
  305. [macro-dial-hunt-predial-hook]
  306. exten => s,1,MacroExit()
  307. ;-------------------------------------------------------------------------------
  308.  
  309. ;-------------------------------------------------------------------------------
  310. ; macro-dial-ringall-predial-hook
  311. ;
  312. ; this macro intentionally left blank so it may be safely overwritten for any custom
  313. ; requirements that an installation may have.
  314. ;
  315. ; the macro is called by macro-dial just prior to making a Dial() attempt
  316. ; to a dial string full of extensions.
  317. ;
  318. [macro-dial-ringall-predial-hook]
  319. exten => s,1,MacroExit()
  320. ;-------------------------------------------------------------------------------
  321.  
  322. ;-------------------------------------------------------------------------------
  323. ; macro-dialout-dundi-predial-hook:
  324. ;
  325. ; this macro intentionally left blank so it may be safely overwritten for any custom
  326. ; requirements that an installation may have.
  327. ;
  328. ; the macro is called by macro-dialout-dundi just prior to making a Dial() attempt
  329. ; to a trunk.
  330. ;
  331. ; MACRO RETURN CODE: ${PREDIAL_HOOK_RET}
  332. ; if set to "BYPASS" then this trunk will be skipped
  333. ;
  334. ;
  335. [macro-dialout-dundi-predial-hook]
  336. exten => s,1,MacroExit()
  337. ;-------------------------------------------------------------------------------
  338.  
  339. ;-------------------------------------------------------------------------------
  340. ; macro-user-logon:
  341. ;
  342. ; Used to log a user onto an adhoc device. Most of the work is done by
  343. ; user_login_out.agi AGI script
  344. ;
  345. [macro-user-logon]
  346. exten => s,1,Set(DEVICETYPE=${DB(DEVICE/${CALLERID(number)}/type)})
  347. exten => s,n,Answer()
  348. exten => s,n,Wait(1)
  349. exten => s,n,GotoIf($["${DEVICETYPE}" = "fixed"]?s-FIXED,1)
  350. ; get user's extension
  351. ;
  352. exten => s,n,Set(AMPUSER=${ARG1})
  353. exten => s,n,GotoIf($["${AMPUSER}" != ""]?gotpass)
  354. exten => s,n(playagain),Read(AMPUSER,please-enter-your-extension-then-press-pound,,,4)
  355. ; get user's password and authenticate
  356. ;
  357. exten => s,n,GotoIf($["${AMPUSER}" = ""]?s-MAXATTEMPTS,1)
  358. exten => s,n(gotpass),GotoIf($["${DB_EXISTS(AMPUSER/${AMPUSER}/password)}" = "0"]?s-NOUSER,1)
  359. exten => s,n,Set(AMPUSERPASS=${DB_RESULT})
  360. exten => s,n,GotoIf($[${LEN(${AMPUSERPASS})} = 0]?s-NOPASSWORD,1)
  361. ; do not continue if the user has already logged onto this device
  362. ;
  363. exten => s,n,Set(DEVICEUSER=${DB(DEVICE/${CALLERID(number)}/user)})
  364. exten => s,n,GotoIf($["${DEVICEUSER}" = "${AMPUSER}"]?s-ALREADYLOGGEDON,1)
  365. exten => s,n,Authenticate(${AMPUSERPASS})
  366. exten => s,n,AGI(user_login_out.agi,login,${CALLERID(number)},${AMPUSER})
  367. exten => s,n,Playback(agent-loginok)
  368.  
  369. exten => s-FIXED,1,NoOp(Device is FIXED and cannot be logged into)
  370. exten => s-FIXED,n,SayDigits(${CALLERID(number)})
  371. exten => s-FIXED,n,Playback(vm-isunavail&vm-goodbye)
  372. exten => s-FIXED,n,Hangup ;TODO should play msg indicated device cannot be logged into
  373.  
  374. exten => s-ALREADYLOGGEDON,1,NoOp(This device has already been logged into by this user)
  375. exten => s-ALREADYLOGGEDON,n,Playback(vm-goodbye)
  376. exten => s-ALREADYLOGGEDON,n,Hangup ;TODO should play msg indicated device is already logged into
  377.  
  378. exten => s-NOPASSWORD,1,NoOp(This extension does not exist or no password is set)
  379. exten => s-NOPASSWORD,n,Playback(pbx-invalid)
  380. exten => s-NOPASSWORD,n,Goto(s,playagain)
  381.  
  382. exten => s-MAXATTEMPTS,1,NoOp(Too many login attempts)
  383. exten => s-MAXATTEMPTS,n,Playback(vm-goodbye)
  384. exten => s-MAXATTEMPTS,n,Hangup
  385.  
  386. exten => s-NOUSER,1,NoOp(Invalid extension ${AMPUSER} entered)
  387. exten => s-NOUSER,n,Playback(pbx-invalid)
  388. exten => s-NOUSER,n,Goto(s,playagain)
  389. ;-------------------------------------------------------------------------------
  390.  
  391. ;-------------------------------------------------------------------------------
  392. ; macro-user-logoff:
  393. ;
  394. ; Used to log a user off of an adhoc device. Most of the work is done by
  395. ; user_login_out.agi AGI script
  396. ;
  397. [macro-user-logoff]
  398. exten => s,1,Set(DEVICETYPE=${DB(DEVICE/${CALLERID(number)}/type)})
  399. exten => s,n,GotoIf($["${DEVICETYPE}" = "fixed"]?s-FIXED,1)
  400. exten => s,n,AGI(user_login_out.agi,logout,${CALLERID(number)})
  401. exten => s,n(done),Playback(agent-loggedoff)
  402.  
  403. exten => s-FIXED,1,NoOp(Device is FIXED and cannot be logged out of)
  404. exten => s-FIXED,n,Playback(an-error-has-occured&vm-goodbye)
  405. exten => s-FIXED,n,Hangup ;TODO should play msg indicated device cannot be logged into
  406. ;-------------------------------------------------------------------------------
  407.  
  408. ;-------------------------------------------------------------------------------
  409. ; default
  410. ;
  411. ; FreePBX does not use the default context. This context is used by asterisk when
  412. ; it has no other information provided and needs to deliver a call. Hitting this means
  413. ; there has been some sort of configuration error, or a potential bug somehwere.
  414. ; This context can be reached from either internal or external sources.
  415. ;
  416. [default]
  417. include => ext-local
  418. exten => s,1,Playback(vm-goodbye)
  419. exten => s,n,Noop(ERROR: FreePBX Does not use the [default] context, confguration error)
  420. exten => s,n,Macro(hangupcall)
  421. ;-------------------------------------------------------------------------------
  422.  
  423.  
  424.  
  425. ;*******************************************************************************
  426. ; DEPRECATED DIALPLAN - THESE WILL BE REMOVED, NOT USED BY FREEPBX *
  427. ;*******************************************************************************
  428. ;
  429.  
  430. ;-------------------------------------------------------------------------------
  431. ; macro-fixcid: [DEPRECATED]
  432. ;
  433. ; For some reason, if I don't run setCIDname, CALLERID(name) will be blank in my AGI
  434. ;
  435. [macro-fixcid]
  436. exten => s,1,Set(CALLERID(name)=${CALLERID(name)})
  437. ;-------------------------------------------------------------------------------
  438.  
  439.  
  440. ;-------------------------------------------------------------------------------
  441. ; macro-sayXXXX: [DEPRECATED]
  442. ;
  443. ; Text-To-Speech related macros
  444. ; These all follow common actions. First try to playback a file "tts/custom-md5"
  445. ; where "md5" is the md5() of whatever is going to be played. If that doesn't exist,
  446. ; try to playback using macro-tts-sayXXXXX (where XXXXX is text/digits/etc, same as
  447. ; the macro below). If that macro exits with MACRO_OFFSET=100, then it's done,
  448. ; otherwise, fallback to the default asterisk method.
  449. ;
  450.  
  451. ;-------------------------------------------------------------------------------
  452. ; macro-saytext: [DEPRECATED]
  453. ;
  454. ; say text is purely for text-to-speech, there is no fallback
  455. ;
  456. [macro-saytext]
  457. exten => s,1,Noop(Trying custom SayText playback for "${ARG1}")
  458. exten => s,n,Playback(tts/custom-${MD5(${ARG1})})
  459. exten => s,n,GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done)
  460. ; call tts-saytext. This should set MACRO_OFFSET=101 if it was successful
  461. exten => s,n(tts),Macro(tts-saytext,${ARG1},${ARG2},${ARG3})
  462. exten => s,n,Noop(No text-to-speech handler for SayText, cannot say "${ARG1}")
  463. exten => s,n,Goto(done)
  464. exten => s,tts+101,Noop(tts handled saytext)
  465. ;-------------------------------------------------------------------------------
  466.  
  467. ;-------------------------------------------------------------------------------
  468. ; macro-sayname: [DEPRECATED]
  469. ;
  470. ; say name is for saying names typically, but fallsback to using SayAlpha
  471. ; (saying the word letter-by-letter)
  472. ;
  473. [macro-sayname]
  474. exten => s,1,Noop(Trying custom SayName playback for "${ARG1}")
  475. exten => s,n,Playback(tts/custom-${MD5(${ARG1})})
  476. exten => s,n,GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done)
  477. ; call tts-sayalpha. This should set MACRO_OFFSET=101 if it was successful
  478. exten => s,n(tts),Macro(tts-sayalpha,${ARG1},${ARG2},${ARG3})
  479. exten => s,n,SayAlpha(${ARG1})
  480. exten => s,n,Goto(done)
  481. exten => s,tts+101,Noop(tts handled sayname)
  482. ;-------------------------------------------------------------------------------
  483.  
  484. ;-------------------------------------------------------------------------------
  485. ; macro-saynumber: [DEPRECATED]
  486. ;
  487. ; Say number is for saying numbers (eg "one thousand forty six")
  488. ;
  489. [macro-saynumber]
  490. exten => s,1,Noop(Trying custom SayNumber playback for "${ARG1}")
  491. exten => s,n,Playback(tts/custom-${MD5(${ARG1})})
  492. exten => s,n,GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done)
  493. ; call tts-saynumber. This should set MACRO_OFFSET=101 if it was successful
  494. exten => s,n(tts),Macro(tts-saynumber,${ARG1},${ARG2},${ARG3})
  495. exten => s,n,SayNumber(${ARG1})
  496. exten => s,n,Goto(done)
  497. exten => s,tts+101,Noop(tts handled saynumber)
  498. ;-------------------------------------------------------------------------------
  499.  
  500. ;-------------------------------------------------------------------------------
  501. ; macro-saydigits: [DEPRECATED]
  502. ;
  503. ; Say digits is for saying digits one-by-one (eg, "one zero four six")
  504. ;
  505. [macro-saydigits]
  506. exten => s,1,Noop(Trying custom SayDigits playback for "${ARG1}")
  507. exten => s,n,Playback(tts/custom-${MD5(${ARG1})})
  508. exten => s,n,GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done)
  509. ; call tts-saydigits. This should set MACRO_OFFSET=101 if it was successful
  510. exten => s,n(tts),Macro(tts-saydigits,${ARG1},${ARG2},${ARG3})
  511. exten => s,n,SayDigits(${ARG1})
  512. exten => s,n,Goto(done)
  513. ;-------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement