extensions.ael 73 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184
  1. globals
  2. {
  3. static=yes;
  4. writeprotect=yes;
  5. CONSOLE=Console/dsp; // Console interface for demo
  6. IAXINFO=murf:tlhfckoct; // IAXtel username/password
  7. FWDNUMBER=544788 ; // your calling number
  8. FWDCIDNAME="Joe-Worker"; // your caller id
  9. FWDPASSWORD=zingledoodle ; // your password
  10. FWDRINGS=Zap/6 ; // the phone to ring
  11. FWDVMBOX=1 ; // the VM box for this user
  12. }
  13. macro std-exten( ext , dev )
  14. {
  15. Dial(${dev}/${ext},20);
  16. switch(${DIALSTATUS})
  17. {
  18. case BUSY:
  19. Voicemail(b${ext});
  20. break;
  21. case NOANSWER:
  22. Voicemail(u${ext});
  23. break;
  24. case ANSWER:
  25. break;
  26. default:
  27. Voicemail(u${ext});
  28. }
  29. catch a {
  30. VoiceMailMain(${ext});
  31. }
  32. }
  33. macro std-priv-exten_1( dev, ext , timeout, opts, torcont, dontcont )
  34. {
  35. Dial(${dev},${timeout},${opts});
  36. NoOp(${DIALSTATUS} was chosen);
  37. switch(${DIALSTATUS})
  38. {
  39. case TORTURE:
  40. goto ${torcont}|s|begin;
  41. break;
  42. case DONTCALL:
  43. goto ${dontcont}|s|begin;
  44. break;
  45. case BUSY:
  46. Voicemail(b${ext});
  47. break;
  48. case ANSWER:
  49. break;
  50. case NOANSWER:
  51. Voicemail(u${ext});
  52. break;
  53. default:
  54. Voicemail(u${ext});
  55. }
  56. }
  57. macro std-priv-exten_2( dev, ext , timeout, opts, torcont, dontcont )
  58. {
  59. Dial(${dev},${timeout},${opts});
  60. NoOp(${DIALSTATUS} was chosen);
  61. switch(${DIALSTATUS})
  62. {
  63. case TORTURE:
  64. goto ${torcont}|s|begin;
  65. break;
  66. case DONTCALL:
  67. goto ${dontcont}|s|begin;
  68. break;
  69. case BUSY:
  70. Voicemail(b${ext});
  71. break;
  72. case ANSWER:
  73. break;
  74. case NOANSWER:
  75. Voicemail(u${ext});
  76. break;
  77. default:
  78. Voicemail(u${ext});
  79. }
  80. }
  81. macro std-priv-exten_3( dev, ext , timeout, opts, torcont, dontcont )
  82. {
  83. Dial(${dev},${timeout},${opts});
  84. NoOp(${DIALSTATUS} was chosen);
  85. switch(${DIALSTATUS})
  86. {
  87. case TORTURE:
  88. goto ${torcont}|s|begin;
  89. break;
  90. case DONTCALL:
  91. goto ${dontcont}|s|begin;
  92. break;
  93. case BUSY:
  94. Voicemail(b${ext});
  95. break;
  96. case ANSWER:
  97. break;
  98. case NOANSWER:
  99. Voicemail(u${ext});
  100. break;
  101. default:
  102. Voicemail(u${ext});
  103. }
  104. }
  105. macro std-priv-exten_4( dev, ext , timeout, opts, torcont, dontcont )
  106. {
  107. Dial(${dev},${timeout},${opts});
  108. NoOp(${DIALSTATUS} was chosen);
  109. switch(${DIALSTATUS})
  110. {
  111. case TORTURE:
  112. goto ${torcont}|s|begin;
  113. break;
  114. case DONTCALL:
  115. goto ${dontcont}|s|begin;
  116. break;
  117. case BUSY:
  118. Voicemail(b${ext});
  119. break;
  120. case ANSWER:
  121. break;
  122. case NOANSWER:
  123. Voicemail(u${ext});
  124. break;
  125. default:
  126. Voicemail(u${ext});
  127. }
  128. }
  129. macro std-priv-exten_5( dev, ext , timeout, opts, torcont, dontcont )
  130. {
  131. Dial(${dev},${timeout},${opts});
  132. NoOp(${DIALSTATUS} was chosen);
  133. switch(${DIALSTATUS})
  134. {
  135. case TORTURE:
  136. goto ${torcont}|s|begin;
  137. break;
  138. case DONTCALL:
  139. goto ${dontcont}|s|begin;
  140. break;
  141. case BUSY:
  142. Voicemail(b${ext});
  143. break;
  144. case ANSWER:
  145. break;
  146. case NOANSWER:
  147. Voicemail(u${ext});
  148. break;
  149. default:
  150. Voicemail(u${ext});
  151. }
  152. }
  153. macro std-priv-exten_6( dev, ext , timeout, opts, torcont, dontcont )
  154. {
  155. Dial(${dev},${timeout},${opts});
  156. NoOp(${DIALSTATUS} was chosen);
  157. switch(${DIALSTATUS})
  158. {
  159. case TORTURE:
  160. goto ${torcont}|s|begin;
  161. break;
  162. case DONTCALL:
  163. goto ${dontcont}|s|begin;
  164. break;
  165. case BUSY:
  166. Voicemail(b${ext});
  167. break;
  168. case ANSWER:
  169. break;
  170. case NOANSWER:
  171. Voicemail(u${ext});
  172. break;
  173. default:
  174. Voicemail(u${ext});
  175. }
  176. }
  177. macro std-priv-exten_7( dev, ext , timeout, opts, torcont, dontcont )
  178. {
  179. Dial(${dev},${timeout},${opts});
  180. NoOp(${DIALSTATUS} was chosen);
  181. switch(${DIALSTATUS})
  182. {
  183. case TORTURE:
  184. goto ${torcont}|s|begin;
  185. break;
  186. case DONTCALL:
  187. goto ${dontcont}|s|begin;
  188. break;
  189. case BUSY:
  190. Voicemail(b${ext});
  191. break;
  192. case ANSWER:
  193. break;
  194. case NOANSWER:
  195. Voicemail(u${ext});
  196. break;
  197. default:
  198. Voicemail(u${ext});
  199. }
  200. }
  201. macro std-priv-exten_8( dev, ext , timeout, opts, torcont, dontcont )
  202. {
  203. Dial(${dev},${timeout},${opts});
  204. NoOp(${DIALSTATUS} was chosen);
  205. switch(${DIALSTATUS})
  206. {
  207. case TORTURE:
  208. goto ${torcont}|s|begin;
  209. break;
  210. case DONTCALL:
  211. goto ${dontcont}|s|begin;
  212. break;
  213. case BUSY:
  214. Voicemail(b${ext});
  215. break;
  216. case ANSWER:
  217. break;
  218. case NOANSWER:
  219. Voicemail(u${ext});
  220. break;
  221. default:
  222. Voicemail(u${ext});
  223. }
  224. }
  225. macro std-priv-exten_9( dev, ext , timeout, opts, torcont, dontcont )
  226. {
  227. Dial(${dev},${timeout},${opts});
  228. NoOp(${DIALSTATUS} was chosen);
  229. switch(${DIALSTATUS})
  230. {
  231. case TORTURE:
  232. goto ${torcont}|s|begin;
  233. break;
  234. case DONTCALL:
  235. goto ${dontcont}|s|begin;
  236. break;
  237. case BUSY:
  238. Voicemail(b${ext});
  239. break;
  240. case ANSWER:
  241. break;
  242. case NOANSWER:
  243. Voicemail(u${ext});
  244. break;
  245. default:
  246. Voicemail(u${ext});
  247. }
  248. }
  249. macro std-priv-exten_10( dev, ext , timeout, opts, torcont, dontcont )
  250. {
  251. Dial(${dev},${timeout},${opts});
  252. NoOp(${DIALSTATUS} was chosen);
  253. switch(${DIALSTATUS})
  254. {
  255. case TORTURE:
  256. goto ${torcont}|s|begin;
  257. break;
  258. case DONTCALL:
  259. goto ${dontcont}|s|begin;
  260. break;
  261. case BUSY:
  262. Voicemail(b${ext});
  263. break;
  264. case ANSWER:
  265. break;
  266. case NOANSWER:
  267. Voicemail(u${ext});
  268. break;
  269. default:
  270. Voicemail(u${ext});
  271. }
  272. }
  273. macro std-priv-exten_11( dev, ext , timeout, opts, torcont, dontcont )
  274. {
  275. Dial(${dev},${timeout},${opts});
  276. NoOp(${DIALSTATUS} was chosen);
  277. switch(${DIALSTATUS})
  278. {
  279. case TORTURE:
  280. goto ${torcont}|s|begin;
  281. break;
  282. case DONTCALL:
  283. goto ${dontcont}|s|begin;
  284. break;
  285. case BUSY:
  286. Voicemail(b${ext});
  287. break;
  288. case ANSWER:
  289. break;
  290. case NOANSWER:
  291. Voicemail(u${ext});
  292. break;
  293. default:
  294. Voicemail(u${ext});
  295. }
  296. }
  297. macro std-priv-exten_12( dev, ext , timeout, opts, torcont, dontcont )
  298. {
  299. Dial(${dev},${timeout},${opts});
  300. NoOp(${DIALSTATUS} was chosen);
  301. switch(${DIALSTATUS})
  302. {
  303. case TORTURE:
  304. goto ${torcont}|s|begin;
  305. break;
  306. case DONTCALL:
  307. goto ${dontcont}|s|begin;
  308. break;
  309. case BUSY:
  310. Voicemail(b${ext});
  311. break;
  312. case ANSWER:
  313. break;
  314. case NOANSWER:
  315. Voicemail(u${ext});
  316. break;
  317. default:
  318. Voicemail(u${ext});
  319. }
  320. }
  321. macro std-priv-exten_13( dev, ext , timeout, opts, torcont, dontcont )
  322. {
  323. Dial(${dev},${timeout},${opts});
  324. NoOp(${DIALSTATUS} was chosen);
  325. switch(${DIALSTATUS})
  326. {
  327. case TORTURE:
  328. goto ${torcont}|s|begin;
  329. break;
  330. case DONTCALL:
  331. goto ${dontcont}|s|begin;
  332. break;
  333. case BUSY:
  334. Voicemail(b${ext});
  335. break;
  336. case ANSWER:
  337. break;
  338. case NOANSWER:
  339. Voicemail(u${ext});
  340. break;
  341. default:
  342. Voicemail(u${ext});
  343. }
  344. }
  345. macro std-priv-exten_14( dev, ext , timeout, opts, torcont, dontcont )
  346. {
  347. Dial(${dev},${timeout},${opts});
  348. NoOp(${DIALSTATUS} was chosen);
  349. switch(${DIALSTATUS})
  350. {
  351. case TORTURE:
  352. goto ${torcont}|s|begin;
  353. break;
  354. case DONTCALL:
  355. goto ${dontcont}|s|begin;
  356. break;
  357. case BUSY:
  358. Voicemail(b${ext});
  359. break;
  360. case ANSWER:
  361. break;
  362. case NOANSWER:
  363. Voicemail(u${ext});
  364. break;
  365. default:
  366. Voicemail(u${ext});
  367. }
  368. }
  369. macro std-priv-exten_15( dev, ext , timeout, opts, torcont, dontcont )
  370. {
  371. Dial(${dev},${timeout},${opts});
  372. NoOp(${DIALSTATUS} was chosen);
  373. switch(${DIALSTATUS})
  374. {
  375. case TORTURE:
  376. goto ${torcont}|s|begin;
  377. break;
  378. case DONTCALL:
  379. goto ${dontcont}|s|begin;
  380. break;
  381. case BUSY:
  382. Voicemail(b${ext});
  383. break;
  384. case ANSWER:
  385. break;
  386. case NOANSWER:
  387. Voicemail(u${ext});
  388. break;
  389. default:
  390. Voicemail(u${ext});
  391. }
  392. }
  393. macro std-priv-exten_16( dev, ext , timeout, opts, torcont, dontcont )
  394. {
  395. Dial(${dev},${timeout},${opts});
  396. NoOp(${DIALSTATUS} was chosen);
  397. switch(${DIALSTATUS})
  398. {
  399. case TORTURE:
  400. goto ${torcont}|s|begin;
  401. break;
  402. case DONTCALL:
  403. goto ${dontcont}|s|begin;
  404. break;
  405. case BUSY:
  406. Voicemail(b${ext});
  407. break;
  408. case ANSWER:
  409. break;
  410. case NOANSWER:
  411. Voicemail(u${ext});
  412. break;
  413. default:
  414. Voicemail(u${ext});
  415. }
  416. }
  417. macro std-priv-exten_17( dev, ext , timeout, opts, torcont, dontcont )
  418. {
  419. Dial(${dev},${timeout},${opts});
  420. NoOp(${DIALSTATUS} was chosen);
  421. switch(${DIALSTATUS})
  422. {
  423. case TORTURE:
  424. goto ${torcont}|s|begin;
  425. break;
  426. case DONTCALL:
  427. goto ${dontcont}|s|begin;
  428. break;
  429. case BUSY:
  430. Voicemail(b${ext});
  431. break;
  432. case ANSWER:
  433. break;
  434. case NOANSWER:
  435. Voicemail(u${ext});
  436. break;
  437. default:
  438. Voicemail(u${ext});
  439. }
  440. }
  441. macro std-priv-exten_18( dev, ext , timeout, opts, torcont, dontcont )
  442. {
  443. Dial(${dev},${timeout},${opts});
  444. NoOp(${DIALSTATUS} was chosen);
  445. switch(${DIALSTATUS})
  446. {
  447. case TORTURE:
  448. goto ${torcont}|s|begin;
  449. break;
  450. case DONTCALL:
  451. goto ${dontcont}|s|begin;
  452. break;
  453. case BUSY:
  454. Voicemail(b${ext});
  455. break;
  456. case ANSWER:
  457. break;
  458. case NOANSWER:
  459. Voicemail(u${ext});
  460. break;
  461. default:
  462. Voicemail(u${ext});
  463. }
  464. }
  465. macro std-priv-exten_19( dev, ext , timeout, opts, torcont, dontcont )
  466. {
  467. Dial(${dev},${timeout},${opts});
  468. NoOp(${DIALSTATUS} was chosen);
  469. switch(${DIALSTATUS})
  470. {
  471. case TORTURE:
  472. goto ${torcont}|s|begin;
  473. break;
  474. case DONTCALL:
  475. goto ${dontcont}|s|begin;
  476. break;
  477. case BUSY:
  478. Voicemail(b${ext});
  479. break;
  480. case ANSWER:
  481. break;
  482. case NOANSWER:
  483. Voicemail(u${ext});
  484. break;
  485. default:
  486. Voicemail(u${ext});
  487. }
  488. }
  489. macro std-priv-exten_20( dev, ext , timeout, opts, torcont, dontcont )
  490. {
  491. Dial(${dev},${timeout},${opts});
  492. NoOp(${DIALSTATUS} was chosen);
  493. switch(${DIALSTATUS})
  494. {
  495. case TORTURE:
  496. goto ${torcont}|s|begin;
  497. break;
  498. case DONTCALL:
  499. goto ${dontcont}|s|begin;
  500. break;
  501. case BUSY:
  502. Voicemail(b${ext});
  503. break;
  504. case ANSWER:
  505. break;
  506. case NOANSWER:
  507. Voicemail(u${ext});
  508. break;
  509. default:
  510. Voicemail(u${ext});
  511. }
  512. }
  513. macro std-priv-exten_21( dev, ext , timeout, opts, torcont, dontcont )
  514. {
  515. Dial(${dev},${timeout},${opts});
  516. NoOp(${DIALSTATUS} was chosen);
  517. switch(${DIALSTATUS})
  518. {
  519. case TORTURE:
  520. goto ${torcont}|s|begin;
  521. break;
  522. case DONTCALL:
  523. goto ${dontcont}|s|begin;
  524. break;
  525. case BUSY:
  526. Voicemail(b${ext});
  527. break;
  528. case ANSWER:
  529. break;
  530. case NOANSWER:
  531. Voicemail(u${ext});
  532. break;
  533. default:
  534. Voicemail(u${ext});
  535. }
  536. }
  537. macro std-priv-exten_22( dev, ext , timeout, opts, torcont, dontcont )
  538. {
  539. Dial(${dev},${timeout},${opts});
  540. NoOp(${DIALSTATUS} was chosen);
  541. switch(${DIALSTATUS})
  542. {
  543. case TORTURE:
  544. goto ${torcont}|s|begin;
  545. break;
  546. case DONTCALL:
  547. goto ${dontcont}|s|begin;
  548. break;
  549. case BUSY:
  550. Voicemail(b${ext});
  551. break;
  552. case ANSWER:
  553. break;
  554. case NOANSWER:
  555. Voicemail(u${ext});
  556. break;
  557. default:
  558. Voicemail(u${ext});
  559. }
  560. }
  561. macro std-priv-exten_23( dev, ext , timeout, opts, torcont, dontcont )
  562. {
  563. Dial(${dev},${timeout},${opts});
  564. NoOp(${DIALSTATUS} was chosen);
  565. switch(${DIALSTATUS})
  566. {
  567. case TORTURE:
  568. goto ${torcont}|s|begin;
  569. break;
  570. case DONTCALL:
  571. goto ${dontcont}|s|begin;
  572. break;
  573. case BUSY:
  574. Voicemail(b${ext});
  575. break;
  576. case ANSWER:
  577. break;
  578. case NOANSWER:
  579. Voicemail(u${ext});
  580. break;
  581. default:
  582. Voicemail(u${ext});
  583. }
  584. }
  585. macro std-priv-exten_24( dev, ext , timeout, opts, torcont, dontcont )
  586. {
  587. Dial(${dev},${timeout},${opts});
  588. NoOp(${DIALSTATUS} was chosen);
  589. switch(${DIALSTATUS})
  590. {
  591. case TORTURE:
  592. goto ${torcont}|s|begin;
  593. break;
  594. case DONTCALL:
  595. goto ${dontcont}|s|begin;
  596. break;
  597. case BUSY:
  598. Voicemail(b${ext});
  599. break;
  600. case ANSWER:
  601. break;
  602. case NOANSWER:
  603. Voicemail(u${ext});
  604. break;
  605. default:
  606. Voicemail(u${ext});
  607. }
  608. }
  609. macro std-priv-exten_25( dev, ext , timeout, opts, torcont, dontcont )
  610. {
  611. Dial(${dev},${timeout},${opts});
  612. NoOp(${DIALSTATUS} was chosen);
  613. switch(${DIALSTATUS})
  614. {
  615. case TORTURE:
  616. goto ${torcont}|s|begin;
  617. break;
  618. case DONTCALL:
  619. goto ${dontcont}|s|begin;
  620. break;
  621. case BUSY:
  622. Voicemail(b${ext});
  623. break;
  624. case ANSWER:
  625. break;
  626. case NOANSWER:
  627. Voicemail(u${ext});
  628. break;
  629. default:
  630. Voicemail(u${ext});
  631. }
  632. }
  633. macro std-priv-exten_26( dev, ext , timeout, opts, torcont, dontcont )
  634. {
  635. Dial(${dev},${timeout},${opts});
  636. NoOp(${DIALSTATUS} was chosen);
  637. switch(${DIALSTATUS})
  638. {
  639. case TORTURE:
  640. goto ${torcont}|s|begin;
  641. break;
  642. case DONTCALL:
  643. goto ${dontcont}|s|begin;
  644. break;
  645. case BUSY:
  646. Voicemail(b${ext});
  647. break;
  648. case ANSWER:
  649. break;
  650. case NOANSWER:
  651. Voicemail(u${ext});
  652. break;
  653. default:
  654. Voicemail(u${ext});
  655. }
  656. }
  657. macro std-priv-exten_27( dev, ext , timeout, opts, torcont, dontcont )
  658. {
  659. Dial(${dev},${timeout},${opts});
  660. NoOp(${DIALSTATUS} was chosen);
  661. switch(${DIALSTATUS})
  662. {
  663. case TORTURE:
  664. goto ${torcont}|s|begin;
  665. break;
  666. case DONTCALL:
  667. goto ${dontcont}|s|begin;
  668. break;
  669. case BUSY:
  670. Voicemail(b${ext});
  671. break;
  672. case ANSWER:
  673. break;
  674. case NOANSWER:
  675. Voicemail(u${ext});
  676. break;
  677. default:
  678. Voicemail(u${ext});
  679. }
  680. }
  681. macro std-priv-exten_28( dev, ext , timeout, opts, torcont, dontcont )
  682. {
  683. Dial(${dev},${timeout},${opts});
  684. NoOp(${DIALSTATUS} was chosen);
  685. switch(${DIALSTATUS})
  686. {
  687. case TORTURE:
  688. goto ${torcont}|s|begin;
  689. break;
  690. case DONTCALL:
  691. goto ${dontcont}|s|begin;
  692. break;
  693. case BUSY:
  694. Voicemail(b${ext});
  695. break;
  696. case ANSWER:
  697. break;
  698. case NOANSWER:
  699. Voicemail(u${ext});
  700. break;
  701. default:
  702. Voicemail(u${ext});
  703. }
  704. }
  705. macro std-priv-exten_29( dev, ext , timeout, opts, torcont, dontcont )
  706. {
  707. Dial(${dev},${timeout},${opts});
  708. NoOp(${DIALSTATUS} was chosen);
  709. switch(${DIALSTATUS})
  710. {
  711. case TORTURE:
  712. goto ${torcont}|s|begin;
  713. break;
  714. case DONTCALL:
  715. goto ${dontcont}|s|begin;
  716. break;
  717. case BUSY:
  718. Voicemail(b${ext});
  719. break;
  720. case ANSWER:
  721. break;
  722. case NOANSWER:
  723. Voicemail(u${ext});
  724. break;
  725. default:
  726. Voicemail(u${ext});
  727. }
  728. }
  729. macro std-priv-exten_30( dev, ext , timeout, opts, torcont, dontcont )
  730. {
  731. Dial(${dev},${timeout},${opts});
  732. NoOp(${DIALSTATUS} was chosen);
  733. switch(${DIALSTATUS})
  734. {
  735. case TORTURE:
  736. goto ${torcont}|s|begin;
  737. break;
  738. case DONTCALL:
  739. goto ${dontcont}|s|begin;
  740. break;
  741. case BUSY:
  742. Voicemail(b${ext});
  743. break;
  744. case ANSWER:
  745. break;
  746. case NOANSWER:
  747. Voicemail(u${ext});
  748. break;
  749. default:
  750. Voicemail(u${ext});
  751. }
  752. }
  753. macro std-priv-exten_31( dev, ext , timeout, opts, torcont, dontcont )
  754. {
  755. Dial(${dev},${timeout},${opts});
  756. NoOp(${DIALSTATUS} was chosen);
  757. switch(${DIALSTATUS})
  758. {
  759. case TORTURE:
  760. goto ${torcont}|s|begin;
  761. break;
  762. case DONTCALL:
  763. goto ${dontcont}|s|begin;
  764. break;
  765. case BUSY:
  766. Voicemail(b${ext});
  767. break;
  768. case ANSWER:
  769. break;
  770. case NOANSWER:
  771. Voicemail(u${ext});
  772. break;
  773. default:
  774. Voicemail(u${ext});
  775. }
  776. }
  777. macro std-priv-exten_32( dev, ext , timeout, opts, torcont, dontcont )
  778. {
  779. Dial(${dev},${timeout},${opts});
  780. NoOp(${DIALSTATUS} was chosen);
  781. switch(${DIALSTATUS})
  782. {
  783. case TORTURE:
  784. goto ${torcont}|s|begin;
  785. break;
  786. case DONTCALL:
  787. goto ${dontcont}|s|begin;
  788. break;
  789. case BUSY:
  790. Voicemail(b${ext});
  791. break;
  792. case ANSWER:
  793. break;
  794. case NOANSWER:
  795. Voicemail(u${ext});
  796. break;
  797. default:
  798. Voicemail(u${ext});
  799. }
  800. }
  801. macro std-priv-exten_33( dev, ext , timeout, opts, torcont, dontcont )
  802. {
  803. Dial(${dev},${timeout},${opts});
  804. NoOp(${DIALSTATUS} was chosen);
  805. switch(${DIALSTATUS})
  806. {
  807. case TORTURE:
  808. goto ${torcont}|s|begin;
  809. break;
  810. case DONTCALL:
  811. goto ${dontcont}|s|begin;
  812. break;
  813. case BUSY:
  814. Voicemail(b${ext});
  815. break;
  816. case ANSWER:
  817. break;
  818. case NOANSWER:
  819. Voicemail(u${ext});
  820. break;
  821. default:
  822. Voicemail(u${ext});
  823. }
  824. }
  825. macro std-priv-exten_34( dev, ext , timeout, opts, torcont, dontcont )
  826. {
  827. Dial(${dev},${timeout},${opts});
  828. NoOp(${DIALSTATUS} was chosen);
  829. switch(${DIALSTATUS})
  830. {
  831. case TORTURE:
  832. goto ${torcont}|s|begin;
  833. break;
  834. case DONTCALL:
  835. goto ${dontcont}|s|begin;
  836. break;
  837. case BUSY:
  838. Voicemail(b${ext});
  839. break;
  840. case ANSWER:
  841. break;
  842. case NOANSWER:
  843. Voicemail(u${ext});
  844. break;
  845. default:
  846. Voicemail(u${ext});
  847. }
  848. }
  849. macro std-priv-exten_35( dev, ext , timeout, opts, torcont, dontcont )
  850. {
  851. Dial(${dev},${timeout},${opts});
  852. NoOp(${DIALSTATUS} was chosen);
  853. switch(${DIALSTATUS})
  854. {
  855. case TORTURE:
  856. goto ${torcont}|s|begin;
  857. break;
  858. case DONTCALL:
  859. goto ${dontcont}|s|begin;
  860. break;
  861. case BUSY:
  862. Voicemail(b${ext});
  863. break;
  864. case ANSWER:
  865. break;
  866. case NOANSWER:
  867. Voicemail(u${ext});
  868. break;
  869. default:
  870. Voicemail(u${ext});
  871. }
  872. }
  873. macro std-priv-exten_36( dev, ext , timeout, opts, torcont, dontcont )
  874. {
  875. Dial(${dev},${timeout},${opts});
  876. NoOp(${DIALSTATUS} was chosen);
  877. switch(${DIALSTATUS})
  878. {
  879. case TORTURE:
  880. goto ${torcont}|s|begin;
  881. break;
  882. case DONTCALL:
  883. goto ${dontcont}|s|begin;
  884. break;
  885. case BUSY:
  886. Voicemail(b${ext});
  887. break;
  888. case ANSWER:
  889. break;
  890. case NOANSWER:
  891. Voicemail(u${ext});
  892. break;
  893. default:
  894. Voicemail(u${ext});
  895. }
  896. }
  897. macro std-priv-exten_37( dev, ext , timeout, opts, torcont, dontcont )
  898. {
  899. Dial(${dev},${timeout},${opts});
  900. NoOp(${DIALSTATUS} was chosen);
  901. switch(${DIALSTATUS})
  902. {
  903. case TORTURE:
  904. goto ${torcont}|s|begin;
  905. break;
  906. case DONTCALL:
  907. goto ${dontcont}|s|begin;
  908. break;
  909. case BUSY:
  910. Voicemail(b${ext});
  911. break;
  912. case ANSWER:
  913. break;
  914. case NOANSWER:
  915. Voicemail(u${ext});
  916. break;
  917. default:
  918. Voicemail(u${ext});
  919. }
  920. }
  921. macro std-priv-exten_38( dev, ext , timeout, opts, torcont, dontcont )
  922. {
  923. Dial(${dev},${timeout},${opts});
  924. NoOp(${DIALSTATUS} was chosen);
  925. switch(${DIALSTATUS})
  926. {
  927. case TORTURE:
  928. goto ${torcont}|s|begin;
  929. break;
  930. case DONTCALL:
  931. goto ${dontcont}|s|begin;
  932. break;
  933. case BUSY:
  934. Voicemail(b${ext});
  935. break;
  936. case ANSWER:
  937. break;
  938. case NOANSWER:
  939. Voicemail(u${ext});
  940. break;
  941. default:
  942. Voicemail(u${ext});
  943. }
  944. }
  945. macro std-priv-exten_39( dev, ext , timeout, opts, torcont, dontcont )
  946. {
  947. Dial(${dev},${timeout},${opts});
  948. NoOp(${DIALSTATUS} was chosen);
  949. switch(${DIALSTATUS})
  950. {
  951. case TORTURE:
  952. goto ${torcont}|s|begin;
  953. break;
  954. case DONTCALL:
  955. goto ${dontcont}|s|begin;
  956. break;
  957. case BUSY:
  958. Voicemail(b${ext});
  959. break;
  960. case ANSWER:
  961. break;
  962. case NOANSWER:
  963. Voicemail(u${ext});
  964. break;
  965. default:
  966. Voicemail(u${ext});
  967. }
  968. }
  969. macro std-priv-exten_40( dev, ext , timeout, opts, torcont, dontcont )
  970. {
  971. Dial(${dev},${timeout},${opts});
  972. NoOp(${DIALSTATUS} was chosen);
  973. switch(${DIALSTATUS})
  974. {
  975. case TORTURE:
  976. goto ${torcont}|s|begin;
  977. break;
  978. case DONTCALL:
  979. goto ${dontcont}|s|begin;
  980. break;
  981. case BUSY:
  982. Voicemail(b${ext});
  983. break;
  984. case ANSWER:
  985. break;
  986. case NOANSWER:
  987. Voicemail(u${ext});
  988. break;
  989. default:
  990. Voicemail(u${ext});
  991. }
  992. }
  993. macro std-priv-exten_41( dev, ext , timeout, opts, torcont, dontcont )
  994. {
  995. Dial(${dev},${timeout},${opts});
  996. NoOp(${DIALSTATUS} was chosen);
  997. switch(${DIALSTATUS})
  998. {
  999. case TORTURE:
  1000. goto ${torcont}|s|begin;
  1001. break;
  1002. case DONTCALL:
  1003. goto ${dontcont}|s|begin;
  1004. break;
  1005. case BUSY:
  1006. Voicemail(b${ext});
  1007. break;
  1008. case ANSWER:
  1009. break;
  1010. case NOANSWER:
  1011. Voicemail(u${ext});
  1012. break;
  1013. default:
  1014. Voicemail(u${ext});
  1015. }
  1016. }
  1017. macro std-priv-exten_42( dev, ext , timeout, opts, torcont, dontcont )
  1018. {
  1019. Dial(${dev},${timeout},${opts});
  1020. NoOp(${DIALSTATUS} was chosen);
  1021. switch(${DIALSTATUS})
  1022. {
  1023. case TORTURE:
  1024. goto ${torcont}|s|begin;
  1025. break;
  1026. case DONTCALL:
  1027. goto ${dontcont}|s|begin;
  1028. break;
  1029. case BUSY:
  1030. Voicemail(b${ext});
  1031. break;
  1032. case ANSWER:
  1033. break;
  1034. case NOANSWER:
  1035. Voicemail(u${ext});
  1036. break;
  1037. default:
  1038. Voicemail(u${ext});
  1039. }
  1040. }
  1041. macro std-priv-exten_43( dev, ext , timeout, opts, torcont, dontcont )
  1042. {
  1043. Dial(${dev},${timeout},${opts});
  1044. NoOp(${DIALSTATUS} was chosen);
  1045. switch(${DIALSTATUS})
  1046. {
  1047. case TORTURE:
  1048. goto ${torcont}|s|begin;
  1049. break;
  1050. case DONTCALL:
  1051. goto ${dontcont}|s|begin;
  1052. break;
  1053. case BUSY:
  1054. Voicemail(b${ext});
  1055. break;
  1056. case ANSWER:
  1057. break;
  1058. case NOANSWER:
  1059. Voicemail(u${ext});
  1060. break;
  1061. default:
  1062. Voicemail(u${ext});
  1063. }
  1064. }
  1065. macro std-priv-exten_44( dev, ext , timeout, opts, torcont, dontcont )
  1066. {
  1067. Dial(${dev},${timeout},${opts});
  1068. NoOp(${DIALSTATUS} was chosen);
  1069. switch(${DIALSTATUS})
  1070. {
  1071. case TORTURE:
  1072. goto ${torcont}|s|begin;
  1073. break;
  1074. case DONTCALL:
  1075. goto ${dontcont}|s|begin;
  1076. break;
  1077. case BUSY:
  1078. Voicemail(b${ext});
  1079. break;
  1080. case ANSWER:
  1081. break;
  1082. case NOANSWER:
  1083. Voicemail(u${ext});
  1084. break;
  1085. default:
  1086. Voicemail(u${ext});
  1087. }
  1088. }
  1089. macro std-priv-exten_45( dev, ext , timeout, opts, torcont, dontcont )
  1090. {
  1091. Dial(${dev},${timeout},${opts});
  1092. NoOp(${DIALSTATUS} was chosen);
  1093. switch(${DIALSTATUS})
  1094. {
  1095. case TORTURE:
  1096. goto ${torcont}|s|begin;
  1097. break;
  1098. case DONTCALL:
  1099. goto ${dontcont}|s|begin;
  1100. break;
  1101. case BUSY:
  1102. Voicemail(b${ext});
  1103. break;
  1104. case ANSWER:
  1105. break;
  1106. case NOANSWER:
  1107. Voicemail(u${ext});
  1108. break;
  1109. default:
  1110. Voicemail(u${ext});
  1111. }
  1112. }
  1113. macro std-priv-exten_46( dev, ext , timeout, opts, torcont, dontcont )
  1114. {
  1115. Dial(${dev},${timeout},${opts});
  1116. NoOp(${DIALSTATUS} was chosen);
  1117. switch(${DIALSTATUS})
  1118. {
  1119. case TORTURE:
  1120. goto ${torcont}|s|begin;
  1121. break;
  1122. case DONTCALL:
  1123. goto ${dontcont}|s|begin;
  1124. break;
  1125. case BUSY:
  1126. Voicemail(b${ext});
  1127. break;
  1128. case ANSWER:
  1129. break;
  1130. case NOANSWER:
  1131. Voicemail(u${ext});
  1132. break;
  1133. default:
  1134. Voicemail(u${ext});
  1135. }
  1136. }
  1137. macro std-priv-exten_47( dev, ext , timeout, opts, torcont, dontcont )
  1138. {
  1139. Dial(${dev},${timeout},${opts});
  1140. NoOp(${DIALSTATUS} was chosen);
  1141. switch(${DIALSTATUS})
  1142. {
  1143. case TORTURE:
  1144. goto ${torcont}|s|begin;
  1145. break;
  1146. case DONTCALL:
  1147. goto ${dontcont}|s|begin;
  1148. break;
  1149. case BUSY:
  1150. Voicemail(b${ext});
  1151. break;
  1152. case ANSWER:
  1153. break;
  1154. case NOANSWER:
  1155. Voicemail(u${ext});
  1156. break;
  1157. default:
  1158. Voicemail(u${ext});
  1159. }
  1160. }
  1161. macro std-priv-exten_48( dev, ext , timeout, opts, torcont, dontcont )
  1162. {
  1163. Dial(${dev},${timeout},${opts});
  1164. NoOp(${DIALSTATUS} was chosen);
  1165. switch(${DIALSTATUS})
  1166. {
  1167. case TORTURE:
  1168. goto ${torcont}|s|begin;
  1169. break;
  1170. case DONTCALL:
  1171. goto ${dontcont}|s|begin;
  1172. break;
  1173. case BUSY:
  1174. Voicemail(b${ext});
  1175. break;
  1176. case ANSWER:
  1177. break;
  1178. case NOANSWER:
  1179. Voicemail(u${ext});
  1180. break;
  1181. default:
  1182. Voicemail(u${ext});
  1183. }
  1184. }
  1185. macro std-priv-exten_49( dev, ext , timeout, opts, torcont, dontcont )
  1186. {
  1187. Dial(${dev},${timeout},${opts});
  1188. NoOp(${DIALSTATUS} was chosen);
  1189. switch(${DIALSTATUS})
  1190. {
  1191. case TORTURE:
  1192. goto ${torcont}|s|begin;
  1193. break;
  1194. case DONTCALL:
  1195. goto ${dontcont}|s|begin;
  1196. break;
  1197. case BUSY:
  1198. Voicemail(b${ext});
  1199. break;
  1200. case ANSWER:
  1201. break;
  1202. case NOANSWER:
  1203. Voicemail(u${ext});
  1204. break;
  1205. default:
  1206. Voicemail(u${ext});
  1207. }
  1208. }
  1209. macro std-priv-exten_50( dev, ext , timeout, opts, torcont, dontcont )
  1210. {
  1211. Dial(${dev},${timeout},${opts});
  1212. NoOp(${DIALSTATUS} was chosen);
  1213. switch(${DIALSTATUS})
  1214. {
  1215. case TORTURE:
  1216. goto ${torcont}|s|begin;
  1217. break;
  1218. case DONTCALL:
  1219. goto ${dontcont}|s|begin;
  1220. break;
  1221. case BUSY:
  1222. Voicemail(b${ext});
  1223. break;
  1224. case ANSWER:
  1225. break;
  1226. case NOANSWER:
  1227. Voicemail(u${ext});
  1228. break;
  1229. default:
  1230. Voicemail(u${ext});
  1231. }
  1232. }
  1233. macro std-priv-exten_51( dev, ext , timeout, opts, torcont, dontcont )
  1234. {
  1235. Dial(${dev},${timeout},${opts});
  1236. NoOp(${DIALSTATUS} was chosen);
  1237. switch(${DIALSTATUS})
  1238. {
  1239. case TORTURE:
  1240. goto ${torcont}|s|begin;
  1241. break;
  1242. case DONTCALL:
  1243. goto ${dontcont}|s|begin;
  1244. break;
  1245. case BUSY:
  1246. Voicemail(b${ext});
  1247. break;
  1248. case ANSWER:
  1249. break;
  1250. case NOANSWER:
  1251. Voicemail(u${ext});
  1252. break;
  1253. default:
  1254. Voicemail(u${ext});
  1255. }
  1256. }
  1257. macro std-priv-exten_52( dev, ext , timeout, opts, torcont, dontcont )
  1258. {
  1259. Dial(${dev},${timeout},${opts});
  1260. NoOp(${DIALSTATUS} was chosen);
  1261. switch(${DIALSTATUS})
  1262. {
  1263. case TORTURE:
  1264. goto ${torcont}|s|begin;
  1265. break;
  1266. case DONTCALL:
  1267. goto ${dontcont}|s|begin;
  1268. break;
  1269. case BUSY:
  1270. Voicemail(b${ext});
  1271. break;
  1272. case ANSWER:
  1273. break;
  1274. case NOANSWER:
  1275. Voicemail(u${ext});
  1276. break;
  1277. default:
  1278. Voicemail(u${ext});
  1279. }
  1280. }
  1281. macro std-priv-exten_53( dev, ext , timeout, opts, torcont, dontcont )
  1282. {
  1283. Dial(${dev},${timeout},${opts});
  1284. NoOp(${DIALSTATUS} was chosen);
  1285. switch(${DIALSTATUS})
  1286. {
  1287. case TORTURE:
  1288. goto ${torcont}|s|begin;
  1289. break;
  1290. case DONTCALL:
  1291. goto ${dontcont}|s|begin;
  1292. break;
  1293. case BUSY:
  1294. Voicemail(b${ext});
  1295. break;
  1296. case ANSWER:
  1297. break;
  1298. case NOANSWER:
  1299. Voicemail(u${ext});
  1300. break;
  1301. default:
  1302. Voicemail(u${ext});
  1303. }
  1304. }
  1305. macro std-priv-exten_54( dev, ext , timeout, opts, torcont, dontcont )
  1306. {
  1307. Dial(${dev},${timeout},${opts});
  1308. NoOp(${DIALSTATUS} was chosen);
  1309. switch(${DIALSTATUS})
  1310. {
  1311. case TORTURE:
  1312. goto ${torcont}|s|begin;
  1313. break;
  1314. case DONTCALL:
  1315. goto ${dontcont}|s|begin;
  1316. break;
  1317. case BUSY:
  1318. Voicemail(b${ext});
  1319. break;
  1320. case ANSWER:
  1321. break;
  1322. case NOANSWER:
  1323. Voicemail(u${ext});
  1324. break;
  1325. default:
  1326. Voicemail(u${ext});
  1327. }
  1328. }
  1329. macro std-priv-exten_55( dev, ext , timeout, opts, torcont, dontcont )
  1330. {
  1331. Dial(${dev},${timeout},${opts});
  1332. NoOp(${DIALSTATUS} was chosen);
  1333. switch(${DIALSTATUS})
  1334. {
  1335. case TORTURE:
  1336. goto ${torcont}|s|begin;
  1337. break;
  1338. case DONTCALL:
  1339. goto ${dontcont}|s|begin;
  1340. break;
  1341. case BUSY:
  1342. Voicemail(b${ext});
  1343. break;
  1344. case ANSWER:
  1345. break;
  1346. case NOANSWER:
  1347. Voicemail(u${ext});
  1348. break;
  1349. default:
  1350. Voicemail(u${ext});
  1351. }
  1352. }
  1353. macro std-priv-exten_56( dev, ext , timeout, opts, torcont, dontcont )
  1354. {
  1355. Dial(${dev},${timeout},${opts});
  1356. NoOp(${DIALSTATUS} was chosen);
  1357. switch(${DIALSTATUS})
  1358. {
  1359. case TORTURE:
  1360. goto ${torcont}|s|begin;
  1361. break;
  1362. case DONTCALL:
  1363. goto ${dontcont}|s|begin;
  1364. break;
  1365. case BUSY:
  1366. Voicemail(b${ext});
  1367. break;
  1368. case ANSWER:
  1369. break;
  1370. case NOANSWER:
  1371. Voicemail(u${ext});
  1372. break;
  1373. default:
  1374. Voicemail(u${ext});
  1375. }
  1376. }
  1377. macro std-priv-exten_57( dev, ext , timeout, opts, torcont, dontcont )
  1378. {
  1379. Dial(${dev},${timeout},${opts});
  1380. NoOp(${DIALSTATUS} was chosen);
  1381. switch(${DIALSTATUS})
  1382. {
  1383. case TORTURE:
  1384. goto ${torcont}|s|begin;
  1385. break;
  1386. case DONTCALL:
  1387. goto ${dontcont}|s|begin;
  1388. break;
  1389. case BUSY:
  1390. Voicemail(b${ext});
  1391. break;
  1392. case ANSWER:
  1393. break;
  1394. case NOANSWER:
  1395. Voicemail(u${ext});
  1396. break;
  1397. default:
  1398. Voicemail(u${ext});
  1399. }
  1400. }
  1401. macro std-priv-exten_58( dev, ext , timeout, opts, torcont, dontcont )
  1402. {
  1403. Dial(${dev},${timeout},${opts});
  1404. NoOp(${DIALSTATUS} was chosen);
  1405. switch(${DIALSTATUS})
  1406. {
  1407. case TORTURE:
  1408. goto ${torcont}|s|begin;
  1409. break;
  1410. case DONTCALL:
  1411. goto ${dontcont}|s|begin;
  1412. break;
  1413. case BUSY:
  1414. Voicemail(b${ext});
  1415. break;
  1416. case ANSWER:
  1417. break;
  1418. case NOANSWER:
  1419. Voicemail(u${ext});
  1420. break;
  1421. default:
  1422. Voicemail(u${ext});
  1423. }
  1424. }
  1425. macro std-priv-exten_59( dev, ext , timeout, opts, torcont, dontcont )
  1426. {
  1427. Dial(${dev},${timeout},${opts});
  1428. NoOp(${DIALSTATUS} was chosen);
  1429. switch(${DIALSTATUS})
  1430. {
  1431. case TORTURE:
  1432. goto ${torcont}|s|begin;
  1433. break;
  1434. case DONTCALL:
  1435. goto ${dontcont}|s|begin;
  1436. break;
  1437. case BUSY:
  1438. Voicemail(b${ext});
  1439. break;
  1440. case ANSWER:
  1441. break;
  1442. case NOANSWER:
  1443. Voicemail(u${ext});
  1444. break;
  1445. default:
  1446. Voicemail(u${ext});
  1447. }
  1448. }
  1449. macro std-priv-exten_60( dev, ext , timeout, opts, torcont, dontcont )
  1450. {
  1451. Dial(${dev},${timeout},${opts});
  1452. NoOp(${DIALSTATUS} was chosen);
  1453. switch(${DIALSTATUS})
  1454. {
  1455. case TORTURE:
  1456. goto ${torcont}|s|begin;
  1457. break;
  1458. case DONTCALL:
  1459. goto ${dontcont}|s|begin;
  1460. break;
  1461. case BUSY:
  1462. Voicemail(b${ext});
  1463. break;
  1464. case ANSWER:
  1465. break;
  1466. case NOANSWER:
  1467. Voicemail(u${ext});
  1468. break;
  1469. default:
  1470. Voicemail(u${ext});
  1471. }
  1472. }
  1473. macro std-priv-exten_61( dev, ext , timeout, opts, torcont, dontcont )
  1474. {
  1475. Dial(${dev},${timeout},${opts});
  1476. NoOp(${DIALSTATUS} was chosen);
  1477. switch(${DIALSTATUS})
  1478. {
  1479. case TORTURE:
  1480. goto ${torcont}|s|begin;
  1481. break;
  1482. case DONTCALL:
  1483. goto ${dontcont}|s|begin;
  1484. break;
  1485. case BUSY:
  1486. Voicemail(b${ext});
  1487. break;
  1488. case ANSWER:
  1489. break;
  1490. case NOANSWER:
  1491. Voicemail(u${ext});
  1492. break;
  1493. default:
  1494. Voicemail(u${ext});
  1495. }
  1496. }
  1497. macro std-priv-exten_62( dev, ext , timeout, opts, torcont, dontcont )
  1498. {
  1499. Dial(${dev},${timeout},${opts});
  1500. NoOp(${DIALSTATUS} was chosen);
  1501. switch(${DIALSTATUS})
  1502. {
  1503. case TORTURE:
  1504. goto ${torcont}|s|begin;
  1505. break;
  1506. case DONTCALL:
  1507. goto ${dontcont}|s|begin;
  1508. break;
  1509. case BUSY:
  1510. Voicemail(b${ext});
  1511. break;
  1512. case ANSWER:
  1513. break;
  1514. case NOANSWER:
  1515. Voicemail(u${ext});
  1516. break;
  1517. default:
  1518. Voicemail(u${ext});
  1519. }
  1520. }
  1521. macro std-priv-exten_63( dev, ext , timeout, opts, torcont, dontcont )
  1522. {
  1523. Dial(${dev},${timeout},${opts});
  1524. NoOp(${DIALSTATUS} was chosen);
  1525. switch(${DIALSTATUS})
  1526. {
  1527. case TORTURE:
  1528. goto ${torcont}|s|begin;
  1529. break;
  1530. case DONTCALL:
  1531. goto ${dontcont}|s|begin;
  1532. break;
  1533. case BUSY:
  1534. Voicemail(b${ext});
  1535. break;
  1536. case ANSWER:
  1537. break;
  1538. case NOANSWER:
  1539. Voicemail(u${ext});
  1540. break;
  1541. default:
  1542. Voicemail(u${ext});
  1543. }
  1544. }
  1545. macro std-priv-exten_64( dev, ext , timeout, opts, torcont, dontcont )
  1546. {
  1547. Dial(${dev},${timeout},${opts});
  1548. NoOp(${DIALSTATUS} was chosen);
  1549. switch(${DIALSTATUS})
  1550. {
  1551. case TORTURE:
  1552. goto ${torcont}|s|begin;
  1553. break;
  1554. case DONTCALL:
  1555. goto ${dontcont}|s|begin;
  1556. break;
  1557. case BUSY:
  1558. Voicemail(b${ext});
  1559. break;
  1560. case ANSWER:
  1561. break;
  1562. case NOANSWER:
  1563. Voicemail(u${ext});
  1564. break;
  1565. default:
  1566. Voicemail(u${ext});
  1567. }
  1568. }
  1569. macro std-priv-exten_65( dev, ext , timeout, opts, torcont, dontcont )
  1570. {
  1571. Dial(${dev},${timeout},${opts});
  1572. NoOp(${DIALSTATUS} was chosen);
  1573. switch(${DIALSTATUS})
  1574. {
  1575. case TORTURE:
  1576. goto ${torcont}|s|begin;
  1577. break;
  1578. case DONTCALL:
  1579. goto ${dontcont}|s|begin;
  1580. break;
  1581. case BUSY:
  1582. Voicemail(b${ext});
  1583. break;
  1584. case ANSWER:
  1585. break;
  1586. case NOANSWER:
  1587. Voicemail(u${ext});
  1588. break;
  1589. default:
  1590. Voicemail(u${ext});
  1591. }
  1592. }
  1593. macro std-priv-exten_66( dev, ext , timeout, opts, torcont, dontcont )
  1594. {
  1595. Dial(${dev},${timeout},${opts});
  1596. NoOp(${DIALSTATUS} was chosen);
  1597. switch(${DIALSTATUS})
  1598. {
  1599. case TORTURE:
  1600. goto ${torcont}|s|begin;
  1601. break;
  1602. case DONTCALL:
  1603. goto ${dontcont}|s|begin;
  1604. break;
  1605. case BUSY:
  1606. Voicemail(b${ext});
  1607. break;
  1608. case ANSWER:
  1609. break;
  1610. case NOANSWER:
  1611. Voicemail(u${ext});
  1612. break;
  1613. default:
  1614. Voicemail(u${ext});
  1615. }
  1616. }
  1617. macro std-priv-exten_67( dev, ext , timeout, opts, torcont, dontcont )
  1618. {
  1619. Dial(${dev},${timeout},${opts});
  1620. NoOp(${DIALSTATUS} was chosen);
  1621. switch(${DIALSTATUS})
  1622. {
  1623. case TORTURE:
  1624. goto ${torcont}|s|begin;
  1625. break;
  1626. case DONTCALL:
  1627. goto ${dontcont}|s|begin;
  1628. break;
  1629. case BUSY:
  1630. Voicemail(b${ext});
  1631. break;
  1632. case ANSWER:
  1633. break;
  1634. case NOANSWER:
  1635. Voicemail(u${ext});
  1636. break;
  1637. default:
  1638. Voicemail(u${ext});
  1639. }
  1640. }
  1641. macro std-priv-exten_68( dev, ext , timeout, opts, torcont, dontcont )
  1642. {
  1643. Dial(${dev},${timeout},${opts});
  1644. NoOp(${DIALSTATUS} was chosen);
  1645. switch(${DIALSTATUS})
  1646. {
  1647. case TORTURE:
  1648. goto ${torcont}|s|begin;
  1649. break;
  1650. case DONTCALL:
  1651. goto ${dontcont}|s|begin;
  1652. break;
  1653. case BUSY:
  1654. Voicemail(b${ext});
  1655. break;
  1656. case ANSWER:
  1657. break;
  1658. case NOANSWER:
  1659. Voicemail(u${ext});
  1660. break;
  1661. default:
  1662. Voicemail(u${ext});
  1663. }
  1664. }
  1665. macro std-priv-exten_69( dev, ext , timeout, opts, torcont, dontcont )
  1666. {
  1667. Dial(${dev},${timeout},${opts});
  1668. NoOp(${DIALSTATUS} was chosen);
  1669. switch(${DIALSTATUS})
  1670. {
  1671. case TORTURE:
  1672. goto ${torcont}|s|begin;
  1673. break;
  1674. case DONTCALL:
  1675. goto ${dontcont}|s|begin;
  1676. break;
  1677. case BUSY:
  1678. Voicemail(b${ext});
  1679. break;
  1680. case ANSWER:
  1681. break;
  1682. case NOANSWER:
  1683. Voicemail(u${ext});
  1684. break;
  1685. default:
  1686. Voicemail(u${ext});
  1687. }
  1688. }
  1689. macro std-priv-exten_70( dev, ext , timeout, opts, torcont, dontcont )
  1690. {
  1691. Dial(${dev},${timeout},${opts});
  1692. NoOp(${DIALSTATUS} was chosen);
  1693. switch(${DIALSTATUS})
  1694. {
  1695. case TORTURE:
  1696. goto ${torcont}|s|begin;
  1697. break;
  1698. case DONTCALL:
  1699. goto ${dontcont}|s|begin;
  1700. break;
  1701. case BUSY:
  1702. Voicemail(b${ext});
  1703. break;
  1704. case ANSWER:
  1705. break;
  1706. case NOANSWER:
  1707. Voicemail(u${ext});
  1708. break;
  1709. default:
  1710. Voicemail(u${ext});
  1711. }
  1712. }
  1713. macro std-priv-exten_71( dev, ext , timeout, opts, torcont, dontcont )
  1714. {
  1715. Dial(${dev},${timeout},${opts});
  1716. NoOp(${DIALSTATUS} was chosen);
  1717. switch(${DIALSTATUS})
  1718. {
  1719. case TORTURE:
  1720. goto ${torcont}|s|begin;
  1721. break;
  1722. case DONTCALL:
  1723. goto ${dontcont}|s|begin;
  1724. break;
  1725. case BUSY:
  1726. Voicemail(b${ext});
  1727. break;
  1728. case ANSWER:
  1729. break;
  1730. case NOANSWER:
  1731. Voicemail(u${ext});
  1732. break;
  1733. default:
  1734. Voicemail(u${ext});
  1735. }
  1736. }
  1737. macro std-priv-exten_72( dev, ext , timeout, opts, torcont, dontcont )
  1738. {
  1739. Dial(${dev},${timeout},${opts});
  1740. NoOp(${DIALSTATUS} was chosen);
  1741. switch(${DIALSTATUS})
  1742. {
  1743. case TORTURE:
  1744. goto ${torcont}|s|begin;
  1745. break;
  1746. case DONTCALL:
  1747. goto ${dontcont}|s|begin;
  1748. break;
  1749. case BUSY:
  1750. Voicemail(b${ext});
  1751. break;
  1752. case ANSWER:
  1753. break;
  1754. case NOANSWER:
  1755. Voicemail(u${ext});
  1756. break;
  1757. default:
  1758. Voicemail(u${ext});
  1759. }
  1760. }
  1761. macro std-priv-exten_73( dev, ext , timeout, opts, torcont, dontcont )
  1762. {
  1763. Dial(${dev},${timeout},${opts});
  1764. NoOp(${DIALSTATUS} was chosen);
  1765. switch(${DIALSTATUS})
  1766. {
  1767. case TORTURE:
  1768. goto ${torcont}|s|begin;
  1769. break;
  1770. case DONTCALL:
  1771. goto ${dontcont}|s|begin;
  1772. break;
  1773. case BUSY:
  1774. Voicemail(b${ext});
  1775. break;
  1776. case ANSWER:
  1777. break;
  1778. case NOANSWER:
  1779. Voicemail(u${ext});
  1780. break;
  1781. default:
  1782. Voicemail(u${ext});
  1783. }
  1784. }
  1785. macro std-priv-exten( dev, ext , timeout, opts, torcont, dontcont )
  1786. {
  1787. Dial(${dev},${timeout},${opts});
  1788. NoOp(${DIALSTATUS} was chosen);
  1789. switch(${DIALSTATUS})
  1790. {
  1791. case TORTURE:
  1792. goto ${torcont}|s|begin;
  1793. break;
  1794. case DONTCALL:
  1795. goto ${dontcont}|s|begin;
  1796. break;
  1797. case BUSY:
  1798. Voicemail(b${ext});
  1799. break;
  1800. case ANSWER:
  1801. break;
  1802. case NOANSWER:
  1803. Voicemail(u${ext});
  1804. break;
  1805. default:
  1806. Voicemail(u${ext});
  1807. }
  1808. }
  1809. macro fillcidname()
  1810. {
  1811. if( "${CALLERID(num)}" = "" ) // nothing to work with, quit!!!
  1812. return;
  1813. Set(cidn=${DB(cidname/${CALLERID(num)})});
  1814. if( "${CALLERID(name)}" != "" )
  1815. {
  1816. if( ("${cidn}" = "Privacy Manager" & "${CALLERID(name)}" != "Privacy Manager") | "${cidn}" = "" ) // if the entry isn't in the database,
  1817. // or if an entry exists, and it's "Privacy Manager", empty, (or add other useless possibilities).
  1818. {
  1819. Set(DB(cidname/${CALLERID(num)})=${CALLERID(name)}); // then set or override what's in the DB
  1820. }
  1821. }
  1822. // Now, we fill in the callerid info from the incoming entry, if it's stuff worth using
  1823. // Ignore fundamentally semi-anonymous information from local cell phones
  1824. // if the db has an entry for this number, and it's not a canned string from a cell phone company
  1825. if( ( "${cidn}" != "" ) & ( "${CALLERID(name)}" = ""
  1826. | "${CALLERID(name)}" = "CODY,WY "
  1827. | "${CALLERID(name)}" = "POWELL,WY "
  1828. | "${CALLERID(name)}" = "WIRELESS CALLER"
  1829. | "${CALLERID(name)}" = "SUBSCRIBER,WIRE"
  1830. | "${CALLERID(name)}" = "CELLULAR ONE"
  1831. | "${CALLERID(name)}" = "Cellular One Customer"
  1832. | "${CALLERID(name)}" = "CELLULAR ONE "
  1833. | "${CALLERID(name)}" = "Privacy Manager"
  1834. | "${CALLERID(name)}" = "RIVERTON,WY "
  1835. | "${CALLERID(name)}" = "BASIN,WY "
  1836. | "${CALLERID(name)}" = "BILLINGS,MT "
  1837. | "${CALLERID(name)}" = "PROVO,UT "
  1838. | "${CALLERID(name)}" = "TOLL FREE " ) ) // put stuff in the above, that the phone company tends to put in your callerid,
  1839. // that you would rather override with DB info
  1840. // there's no way to guess them all, but you can get the most popular ones...
  1841. // why cell phones can't do CID like everybody else, ....?
  1842. {
  1843. Set(CALLERID(name)=${cidn}); // Override what the phone company provides with what's in the DB for this number.
  1844. }
  1845. }
  1846. macro ciddial(dialnum, lookup, waittime, dialopts, ddev)
  1847. {
  1848. Set(cidnu=${CALLERID(num)});
  1849. Set(cidn=${DB(cidname/${lookup})});
  1850. Set(CALLERID(name)=${cidn});
  1851. Dial(${ddev}/${dialnum}|${waittime}|${dialopts});
  1852. if( "${DIALSTATUS}" = "CHANUNAVAIL" )
  1853. {
  1854. BackGround(try_voip);
  1855. CALLERID(num)=7075679201;
  1856. Dial(SIP/1${lookup}@tctwest,${waittime},${dialopts});
  1857. if( "${DIALSTATUS}" = "CHANUNAVAIL" )
  1858. {
  1859. BackGround(try_cell);
  1860. CALLERID(num)=${cidnu}; // put the original number back
  1861. Dial(Zap/2/${lookup},${waittime},${dialopts});
  1862. }
  1863. }
  1864. }
  1865. macro ciddial3(dialnum, lookup, waittime, dialopts, ddev)
  1866. {
  1867. Set(cidnu=${CALLERID(num)});
  1868. Set(cidn=${DB(cidname/${lookup})});
  1869. Set(CALLERID(name)=${cidn});
  1870. Dial(${ddev}/${dialnum}|${waittime}|${dialopts});
  1871. if( "${DIALSTATUS}" = "CHANUNAVAIL" )
  1872. {
  1873. BackGround(try_cell);
  1874. Dial(Zap/2/${lookup},${waittime},${dialopts});
  1875. }
  1876. }
  1877. macro ciddial2(dialnum, lookup, waittime, dialopts, ddev) // give priority to tctwest, then the ZAP in emergencies
  1878. {
  1879. Set(cidn=${DB(cidname/${lookup})});
  1880. Set(cidnu=${CALLERID(num)});
  1881. Set(CALLERID(name)=${cidn});
  1882. Set(CALLERID(num)=7075679201);
  1883. Dial(SIP/1${lookup}@tctwest,${waittime},${dialopts});
  1884. if( "${DIALSTATUS}" = "CHANUNAVAIL" )
  1885. {
  1886. Set(CALLERID(num)=${cidnu}); // put the original number back
  1887. BackGround(try_zap);
  1888. Dial(${ddev}/${dialnum},${waittime}|${dialopts});
  1889. if( "${DIALSTATUS}" = "CHANUNAVAIL" )
  1890. {
  1891. BackGround(try_cell);
  1892. Dial(Zap/2/${lookup},${waittime},${dialopts});
  1893. }
  1894. }
  1895. }
  1896. macro callerid-liar()
  1897. {
  1898. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/priv-callerintros/LIAR.gsm&);
  1899. Background(priv-liar); // Script: OOOps! Sorry! I don't allow men with ski masks pulled over their
  1900. // faces to get in the front door, and unidentified callers won't fair
  1901. // any better. You entered *MY* phone number. That won't work.
  1902. // If you are telemarketing, cross me off the list, and don't call again.
  1903. // If you did this by mistake, forgive my defenses, and call again.
  1904. // Alternate: (priv-liar2)
  1905. // Script: You have chosen to try to deceive my system and withold your CallerID,
  1906. // by entering my own phone number as YOUR CallerID. I find this
  1907. // offensive because you are being dishonest. I will not do business nor
  1908. // waste my time talking to anyone who is less than honest and forthcoming.
  1909. // Take me off your call list and do not call me again.
  1910. Hangup();
  1911. }
  1912. macro callerid-bad()
  1913. {
  1914. mycid=${CALLERID(num)}:"1([0-9]+)";
  1915. Set(CALLERID(num)=${mycid});
  1916. Wait(0);
  1917. }
  1918. context privacyManagerFailed {
  1919. s => {
  1920. begin:
  1921. Background(PrivManInstructions); // Script: OOps, that didn't go well. You need to enter *your* area code, and *your* 7 digit
  1922. // phone number, for a total of 10 digits, or you'll be handed over to the monkeys. Let's
  1923. // try this again, and hopefully you can get past our front-line defenses!
  1924. PrivacyManager();
  1925. if( "${PRIVACYMGRSTATUS}" = "FAILED" )
  1926. {
  1927. Background(tt-allbusy);
  1928. Background(tt-somethingwrong);
  1929. Background(tt-monkeysintro);
  1930. Background(tt-monkeys);
  1931. Background(tt-weasels);
  1932. Hangup();
  1933. }
  1934. else
  1935. {
  1936. goto homeline|s|postPriv;
  1937. }
  1938. }
  1939. }
  1940. // Some comments
  1941. // Some more comments
  1942. context homeline {
  1943. s => {
  1944. begin:
  1945. Answer();
  1946. Set(repeatcount=0);
  1947. Zapateller(nocallerid);
  1948. PrivacyManager();
  1949. if( "${PRIVACYMGRSTATUS}" = "FAILED" )
  1950. {
  1951. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/privmanfailed.gsm);
  1952. &std-priv-exten(Zap/3r1&Zap/5r1,2,25,mtw,telemarket,telemarket);
  1953. Hangup();
  1954. return;
  1955. // goto privacyManagerFailed|s|begin;
  1956. }
  1957. postPriv:
  1958. &fillcidname();
  1959. Set(CONFCIDNA=${CALLERID(name)});
  1960. Set(CONFCIDNU=${CALLERID(num)});
  1961. AGI(callall);
  1962. AGI(submit-announce.agi);
  1963. if( "${CALLERID(num)}" : "1" )
  1964. {
  1965. &callerid-bad();
  1966. }
  1967. if( "${CALLERID(num)}" = "7077577685" & "${CALLERID(name)}" : "Privacy Manager" )
  1968. {
  1969. &callerid-liar();
  1970. }
  1971. TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&);
  1972. Set(lds=${DB(playlds/${CALLERID(num)})});
  1973. if( "${lds}" = "1" )
  1974. {
  1975. SetMusicOnHold(mohlds);
  1976. }
  1977. direct=${DB(DirectCall/${CALLERID(num)})};
  1978. if( "${direct}" != "" & ${direct} != 0 )
  1979. {
  1980. verbose(direct is XXX#${direct}XXXX);
  1981. Playback(greetings/direct); // Welcome to the Murphy residence. This system will automatically try to connect you to...
  1982. Playback(/var/spool/asterisk/voicemail/default/${direct}/greet);
  1983. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  1984. TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/${direct}/greet.wav&);
  1985. switch(${direct})
  1986. {
  1987. case 1: //Steve
  1988. &std-priv-exten(Zap/6r3&Sip/murf,1,25,mpA(beep)tw,telemarket,telemarket);
  1989. goto s|loopback;
  1990. case 2: //Sonya
  1991. &std-priv-exten(Zap/3r1&Zap/5r1,2,25,mtw,telemarket,telemarket);
  1992. goto s|loopback;
  1993. default: // all the kids
  1994. Set(z=${direct}-2);
  1995. goto homeline-kids|${z}|1;
  1996. }
  1997. }
  1998. loopback:
  1999. ifTime(*|*|20-25|dec)
  2000. {
  2001. Playback(greetings/christmas);
  2002. }
  2003. else ifTime(*|*|31|dec)
  2004. {
  2005. Playback(greetings/newyear);
  2006. }
  2007. else ifTime(*|*|1|jan)
  2008. {
  2009. Playback(greetings/newyear);
  2010. }
  2011. else ifTime(*|*|14|feb)
  2012. {
  2013. Playback(greetings/valentines);
  2014. }
  2015. else ifTime(*|*|17|mar)
  2016. {
  2017. Playback(greetings/stPat);
  2018. }
  2019. else ifTime(*|*|31|oct)
  2020. {
  2021. Playback(greetings/halloween);
  2022. }
  2023. else ifTime(*|mon|15-21|jan)
  2024. {
  2025. Playback(greetings/mlkDay);
  2026. }
  2027. else ifTime(*|thu|22-28|nov)
  2028. {
  2029. Playback(greetings/thanksgiving);
  2030. }
  2031. else ifTime(*|mon|25-31|may)
  2032. {
  2033. Playback(greetings/memorial);
  2034. }
  2035. else ifTime(*|mon|1-7|sep)
  2036. {
  2037. Playback(greetings/labor);
  2038. }
  2039. else ifTime(*|mon|15-21|feb)
  2040. {
  2041. Playback(greetings/president);
  2042. }
  2043. else ifTime(*|sun|8-14|may)
  2044. {
  2045. Playback(greetings/mothers);
  2046. }
  2047. else ifTime(*|sun|15-21|jun)
  2048. {
  2049. Playback(greetings/fathers);
  2050. }
  2051. else
  2052. {
  2053. Playback(greetings/hello); // None of the above? Just a plain hello will do
  2054. }
  2055. Background(murphy-homeline-intro1); // Script: Hello-- Welcome to the Murphy's! If you already know what
  2056. // option you want, you don't have to wait for this entire spiel-- just
  2057. // have at it.
  2058. // If you are calling because this number is on a list of some sort, dial 6.
  2059. // If you want Sonya, dial 1.
  2060. // If you want one of the kids, dial 2.
  2061. // If you want Steve, dial 3.
  2062. // to play with your introduction, dial 5.
  2063. // If we don't seem to be giving you the time of day, try 7.
  2064. // Have a good day!
  2065. }
  2066. 1 => { // Sonya
  2067. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  2068. TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/2/greet.wav&);
  2069. &std-priv-exten(Zap/3r1&Zap/5r1,2,25,mtw,telemarket,telemarket);
  2070. goto s|loopback;
  2071. }
  2072. 2 => { // Kids
  2073. goto homeline-kids|s|begin;
  2074. }
  2075. 21 => {
  2076. Dial(IAX2/seaniax,20,T);
  2077. }
  2078. 3 => { // Steve
  2079. &std-priv-exten(Zap/6r3&Sip/murf,1,25,mpA(beep)tw,telemarket,telemarket);
  2080. goto s|loopback;
  2081. }
  2082. 4 => { // Voicemail
  2083. VoicemailMain();
  2084. goto s|loopback;
  2085. }
  2086. 5 => { // play with intro
  2087. goto home-introduction|s|begin;
  2088. }
  2089. 6 => { // Telemarketers
  2090. goto telemarket|s|begin;
  2091. }
  2092. 7 => { // time of day, riddle
  2093. agi(tts-riddle.agi);
  2094. Background(gsm/what-time-it-is2);
  2095. SayUnixTime();
  2096. goto s|loopback;
  2097. }
  2098. 792 => { // Page All
  2099. goto pageall|s|begin;
  2100. }
  2101. 793 => { // check the tone recognition
  2102. Read(zz,,0,,1,0);
  2103. SayDigits(${zz});
  2104. }
  2105. t => {
  2106. Set(repeatcount=${repeatcount} + 1);
  2107. if( ${repeatcount} < 3 )
  2108. {
  2109. goto s|loopback; // just loopback isn't enough
  2110. }
  2111. Hangup();
  2112. }
  2113. i => {
  2114. Background(invalid);
  2115. goto s|loopback;
  2116. }
  2117. o => {
  2118. Congestion();
  2119. }
  2120. fax => {
  2121. Dial(Zap/4);
  2122. }
  2123. }
  2124. // Some comments
  2125. // Some more comments
  2126. context pageall {
  2127. s => {
  2128. begin:
  2129. AGI(callall);
  2130. MeetMe(5555,dtqp);
  2131. MeetMeAdmin(5555,K);
  2132. Hangup();
  2133. }
  2134. h => {
  2135. begin:
  2136. MeetMeAdmin(5555,K);
  2137. Background(conf-muted);
  2138. Hangup();
  2139. }
  2140. }
  2141. // Some comments
  2142. // Some more comments
  2143. context add-to-conference {
  2144. start => {
  2145. NoCDR();
  2146. MeetMe(5555,dmqp);
  2147. }
  2148. h => {
  2149. Hangup();
  2150. }
  2151. }
  2152. context home-introduction {
  2153. s => {
  2154. begin:
  2155. Background(intro-options); // Script: To hear your Introduction, dial 1.
  2156. // to record a new introduction, dial 2.
  2157. // to return to the main menu, dial 3.
  2158. // to hear what this is all about, dial 4.
  2159. }
  2160. 1 => {
  2161. Playback(priv-callerintros/${CALLERID(num)});
  2162. goto s|begin;
  2163. }
  2164. 2 => {
  2165. goto home-introduction-record|s|begin;
  2166. }
  2167. 3 => {
  2168. goto homeline|s|loopback;
  2169. }
  2170. 4 => {
  2171. Playback(intro-intro); // Script:
  2172. // This may seem a little strange, but it really is a neat
  2173. // thing, both for you and for us. I've taped a short introduction
  2174. // for many of the folks who normally call us. Using the Caller ID
  2175. // from each incoming call, the system plays the introduction
  2176. // for that phone number over a speaker, just as the call comes in.
  2177. // This helps the folks
  2178. // here in the house more quickly determine who is calling.
  2179. // and gets the right ones to gravitate to the phone.
  2180. // You can listen to, and record a new intro for your phone number
  2181. // using this menu.
  2182. goto s|begin;
  2183. }
  2184. t => {
  2185. goto s|begin;
  2186. }
  2187. i => {
  2188. Background(invalid);
  2189. goto s|begin;
  2190. }
  2191. o => {
  2192. goto s|begin;
  2193. }
  2194. }
  2195. context home-introduction-record {
  2196. s => {
  2197. begin:
  2198. Background(intro-record-choices); // Script:
  2199. // If you want some advice about recording your
  2200. // introduction, dial 1.
  2201. // otherwise, dial 2, and introduce yourself after
  2202. // the beep.
  2203. }
  2204. 1 => {
  2205. Playback(intro-record);
  2206. // Your introduction should be short and sweet and crisp.
  2207. // Your introduction will be limited to 10 seconds.
  2208. // This is NOT meant to be a voice mail message, so
  2209. // please, don't say anything about why you are calling.
  2210. // After we are done making the recording, your introduction
  2211. // will be saved for playback.
  2212. // If you are the only person that would call from this number,
  2213. // please state your name. Otherwise, state your business
  2214. // or residence name instead. For instance, if you are
  2215. // friend of the family, say, Olie McPherson, and both
  2216. // you and your kids might call here a lot, you might
  2217. // say: "This is the distinguished Olie McPherson Residence!"
  2218. // If you are the only person calling, you might say this:
  2219. // "This is the illustrious Kermit McFrog! Pick up the Phone, someone!!"
  2220. // If you are calling from a business, you might pronounce a more sedate introduction,like,
  2221. // "Fritz from McDonalds calling.", or perhaps the more original introduction:
  2222. // "John, from the Park County Morgue. You stab 'em, we slab 'em!".
  2223. // Just one caution: the kids will hear what you record every time
  2224. // you call. So watch your language!
  2225. // I will begin recording after the tone.
  2226. // When you are done, hit the # key. Gather your thoughts and get
  2227. // ready. Remember, the # key will end the recording, and play back
  2228. // your intro. Good Luck, and Thank you!"
  2229. goto 2|begin;
  2230. }
  2231. 2 => {
  2232. begin:
  2233. Background(intro-start);
  2234. // OK, here we go! After the beep, please give your introduction.
  2235. Background(beep);
  2236. Record(priv-callerintros/${CALLERID(num)}:gsm,3);
  2237. Background(priv-callerintros/${CALLERID(num)});
  2238. goto home-introduction|s|begin;
  2239. }
  2240. t => {
  2241. goto s|begin;
  2242. }
  2243. i => {
  2244. Background(invalid);
  2245. goto s|begin;
  2246. }
  2247. o => {
  2248. goto s|begin;
  2249. }
  2250. }
  2251. context homeline-kids {
  2252. s => {
  2253. begin:
  2254. Background(murphy-homeline-kids); // Which Kid? 1=Sean, 2:Eric, 3:Ryan, 4:Kyle, 5:Amber, 6:Alex, 7:Neal
  2255. }
  2256. 1 => { // SEAN
  2257. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  2258. TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/3/greet.wav&);
  2259. // &std-priv-exten(Zap/3r2&Zap/5r2,3,35,mtw,telemarket,telemarket);
  2260. &std-priv-exten(IAX2/seaniax&Zap/5r2,3,35,mtw,telemarket,telemarket);
  2261. goto homeline|s|loopback;
  2262. }
  2263. 2 => { // ERIC
  2264. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  2265. TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&);
  2266. Voicemail(u4);
  2267. goto homeline|s|loopback;
  2268. // SetMusicOnHold(erics);
  2269. // TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  2270. // TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&);
  2271. // &std-priv-exten(Zap/3r2&Zap/5r2,4,35,mtw,telemarket,telemarket);
  2272. // goto homeline|s|loopback;
  2273. }
  2274. 3 => { // RYAN
  2275. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  2276. TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/5/greet.wav&);
  2277. &std-priv-exten(Zap/3r2&Zap/5r2,5,35,mtw,telemarket,telemarket);
  2278. goto homeline|s|loopback;
  2279. }
  2280. 4 => { // KYLE
  2281. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  2282. TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/6/greet.wav&);
  2283. &std-priv-exten(Zap/3r2&Zap/5r2,6,35,mtw,telemarket,telemarket);
  2284. goto homeline|s|loopback;
  2285. }
  2286. 5 => {
  2287. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  2288. TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/7/greet.wav&);
  2289. &std-priv-exten(Zap/3r2&Zap/5r2,7,35,mtw,telemarket,telemarket);
  2290. goto homeline|s|loopback;
  2291. }
  2292. 6 => {
  2293. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  2294. TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/8/greet.wav&);
  2295. &std-priv-exten(Zap/3r2&Zap/5r2,8,35,mtw,telemarket,telemarket);
  2296. goto homeline|s|loopback;
  2297. }
  2298. 7 => {
  2299. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  2300. TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/9/greet.wav&);
  2301. &std-priv-exten(Zap/3r2&Zap/5r2,9,35,mtw,telemarket,telemarket);
  2302. goto homeline|s|loopback;
  2303. }
  2304. t => {
  2305. goto s|begin;
  2306. }
  2307. i => {
  2308. Background(invalid);
  2309. goto s|begin;
  2310. }
  2311. o => {
  2312. goto s|begin;
  2313. }
  2314. }
  2315. context voipworkline {
  2316. s => {
  2317. begin:
  2318. Answer();
  2319. TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&);
  2320. goto workline|s|loopback;
  2321. }
  2322. 7075679201 => {
  2323. Answer();
  2324. TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&);
  2325. goto workline|s|loopback;
  2326. }
  2327. }
  2328. context workline {
  2329. s => {
  2330. begin:
  2331. Answer();
  2332. Wait(1);
  2333. Set(repeatcount=0);
  2334. Zapateller(nocallerid);
  2335. // PrivacyManager();
  2336. // if( "${PRIVACYMGRSTATUS}" = "FAILED" )
  2337. // {
  2338. // goto privacyManagerFailed|s|begin;
  2339. // }
  2340. &fillcidname();
  2341. TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&);
  2342. loopback:
  2343. Background(greetings/greeting); //script: Hello
  2344. Background(murphy-office-intro1); //script: welcome to Steve Murphy's office. If you are dialing
  2345. // this number because it was on a calling list of any sort, dial 6.
  2346. // Otherwise, dial 1, and hopefully, you will reach Steve.
  2347. }
  2348. 1 => {
  2349. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
  2350. TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/1/greet.wav&);
  2351. &std-priv-exten(Zap/6&Sip/murf,1,30,mtw,telemarket,telemarket);
  2352. goto s|loopback;
  2353. }
  2354. 4 => {
  2355. VoicemailMain();
  2356. goto s|loopback;
  2357. }
  2358. 6 => {
  2359. goto telemarket|s|begin;
  2360. }
  2361. 793 => { // check the tone recognition
  2362. Read(zz,,0,,1,0);
  2363. SayDigits(${zz});
  2364. }
  2365. t => {
  2366. repeatcount=${repeatcount} + 1;
  2367. if( ${repeatcount} < 3 )
  2368. {
  2369. goto s|loopback; // just loopback isn't enough
  2370. }
  2371. Hangup();
  2372. }
  2373. i => {
  2374. Background(invalid);
  2375. goto s|loopback;
  2376. }
  2377. o => {
  2378. Congestion();
  2379. }
  2380. fax => {
  2381. Answer();
  2382. Dial(Zap/4);
  2383. }
  2384. }
  2385. context dialFWD {
  2386. ignorepat => 8;
  2387. ignorepat => 9;
  2388. _83. => {
  2389. Set(CALLERID(name)=${FWDCIDNAME});
  2390. Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2},60,r);
  2391. Congestion();
  2392. }
  2393. _82NXX => {
  2394. Set(CALLERID(name)=${FWDCIDNAME});
  2395. Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2},60,r);
  2396. Congestion();
  2397. }
  2398. _92NXX => {
  2399. Set(CALLERID(name)=${FWDCIDNAME});
  2400. Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2},60,r);
  2401. Congestion();
  2402. }
  2403. }
  2404. context dialiaxtel {
  2405. ignorepat => 8;
  2406. ignorepat => 9;
  2407. _81700NXXXXXX => {
  2408. Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel);
  2409. }
  2410. _81800NXXXXXX => {
  2411. Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel);
  2412. }
  2413. _91700NXXXXXX => {
  2414. Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel);
  2415. }
  2416. _91800NXXXXXX => {
  2417. Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel);
  2418. }
  2419. }
  2420. context dialgoiax {
  2421. ignorepat => 9;
  2422. _93. => {
  2423. Set(CALLERID(name)="Joe Worker");
  2424. Dial(IAX2/878201007658:stickyfinger295@server1.goiax.com/${EXTEN:2},60,r);
  2425. Congestion();
  2426. }
  2427. }
  2428. context homefirst {
  2429. ignorepat => 9;
  2430. _91NXXNXXXXXX => {
  2431. &ciddial(${EXTEN:1},${EXTEN:2},30,TW,Zap/1);
  2432. }
  2433. _9754XXXX => {
  2434. &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2435. }
  2436. _9574XXXX => {
  2437. &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2438. }
  2439. _9202XXXX => {
  2440. &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2441. }
  2442. _9219XXXX => {
  2443. &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2444. }
  2445. _9254XXXX => {
  2446. &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2447. }
  2448. _9716XXXX => {
  2449. &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2450. }
  2451. _9NXXXXXX => {
  2452. &ciddial(1707${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2453. }
  2454. _9011. => {
  2455. &ciddial(${EXTEN:1},${EXTEN:1},30,TW,Zap/1);
  2456. }
  2457. _9911 => {
  2458. Dial(Zap/1/911,30,T);
  2459. }
  2460. _9411 => {
  2461. Dial(Zap/1/411,30,T);
  2462. }
  2463. }
  2464. context workfirst {
  2465. ignorepat => 9;
  2466. _91NXXNXXXXXX => {
  2467. &ciddial2(${EXTEN:1},${EXTEN:2},30,TW,Zap/1);
  2468. }
  2469. _9754XXXX => {
  2470. &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2471. }
  2472. _9574XXXX => {
  2473. &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2474. }
  2475. _9202XXXX => {
  2476. &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2477. }
  2478. _9219XXXX => {
  2479. &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2480. }
  2481. _9254XXXX => {
  2482. &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2483. }
  2484. _9716XXXX => {
  2485. &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2486. }
  2487. _9NXXXXXX => {
  2488. &ciddial2(1707${EXTEN:1},707${EXTEN:1},30,TW,Zap/1);
  2489. }
  2490. _9911 => {
  2491. Dial(Zap/1/911,30,T);
  2492. }
  2493. _9411 => {
  2494. Dial(Zap/1/411,30,T);
  2495. }
  2496. }
  2497. context force_cell {
  2498. ignorepat => 8;
  2499. _81NXXNXXXXXX => {
  2500. &ciddial(${EXTEN:1}#,${EXTEN:2},30,TW,Zap/2);
  2501. }
  2502. _8754XXXX => {
  2503. &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2);
  2504. }
  2505. _8574XXXX => {
  2506. &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2);
  2507. }
  2508. _8202XXXX => {
  2509. &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2);
  2510. }
  2511. _8219XXXX => {
  2512. &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2);
  2513. }
  2514. _8254XXXX => {
  2515. &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2);
  2516. }
  2517. _8716XXXX => {
  2518. &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2);
  2519. }
  2520. _8NXXXXXX => {
  2521. &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2);
  2522. }
  2523. _8911 => {
  2524. Dial(Zap/1/911|30|T);
  2525. }
  2526. _8411 => {
  2527. Dial(Zap/1/411|30|T);
  2528. }
  2529. }
  2530. context force_home {
  2531. ignorepat => 8;
  2532. _81NXXNXXXXXX => {
  2533. &ciddial3(${EXTEN:1}#,${EXTEN:2},30,TW,Zap/1);
  2534. }
  2535. _8754XXXX => {
  2536. &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1);
  2537. }
  2538. _8574XXXX => {
  2539. &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1);
  2540. }
  2541. _8202XXXX => {
  2542. &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1);
  2543. }
  2544. _8219XXXX => {
  2545. &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1);
  2546. }
  2547. _8254XXXX => {
  2548. &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1);
  2549. }
  2550. _8716XXXX => {
  2551. &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1);
  2552. }
  2553. _8NXXXXXX => {
  2554. &ciddial3(1707${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1);
  2555. }
  2556. _8911 => {
  2557. Dial(Zap/1/911|30|T);
  2558. }
  2559. _8411 => {
  2560. Dial(Zap/1/411|30|T);
  2561. }
  2562. }
  2563. context homeext {
  2564. ignorepat => 8;
  2565. ignorepat => 9;
  2566. includes {
  2567. parkedcalls;
  2568. homefirst;
  2569. force_cell;
  2570. }
  2571. s => {
  2572. loopback:
  2573. Wait(0);
  2574. }
  2575. 1 => {
  2576. &std-priv-exten(Zap/3&Zap/5,2,35,mtw,telemarket,telemarket);
  2577. goto s|loopback;
  2578. }
  2579. 2 => {
  2580. &std-priv-exten(Zap/6&Zap/5,1,35,mpA(beep3)Tt,telemarket,telemarket);
  2581. goto s|loopback;
  2582. }
  2583. 4 => {
  2584. VoicemailMain();
  2585. }
  2586. 5 => {
  2587. Record(recording:gsm);
  2588. Background(recording);
  2589. }
  2590. 6 => {
  2591. Background(recording);
  2592. }
  2593. 760 => {
  2594. DateTime();
  2595. goto s|loopback;
  2596. }
  2597. 761 => {
  2598. Record(announcement:gsm);
  2599. TrySystem(/usr/bin/play /var/lib/asterisk/sounds/announcement.gsm&);
  2600. goto s|loopback;
  2601. }
  2602. 762 => {
  2603. agi(tts-riddle.agi);
  2604. Background(gsm/what-time-it-is2);
  2605. SayUnixTime();
  2606. goto s|loopback;
  2607. }
  2608. 763 => {
  2609. Set(CALLERID(num)=);
  2610. Dial(Zap/6r3,35,mptA(beep3)); //results: it should ALWAYS ask for an intro; the intro should not be left behind
  2611. Hangup();
  2612. }
  2613. 764 => {
  2614. Set(CALLERID(num)=);
  2615. Dial(Zap/6r3,35,mptnA(beep3)); //results: Don't save the intro; shouldn't anyway if no callerid
  2616. Hangup();
  2617. }
  2618. 765 => {
  2619. Set(CALLERID(num)=);
  2620. Dial(Zap/6r3,35,mptNA(beep3)); //results: Don't screen if there's CALLERID; it should screen the call.
  2621. Hangup();
  2622. }
  2623. 766 => {
  2624. Dial(Zap/6r3,35,mptNA(beep3)); //results: Don't screen if there's CALLERID; it should screen the call.
  2625. Hangup();
  2626. }
  2627. 767 => {
  2628. Dial(Zap/6r3,35,mptnA(beep3)); //results: Don't save the intro; the interesting case, because callerID should be present.
  2629. Hangup();
  2630. }
  2631. 769 => {
  2632. Playtones(dial);
  2633. Wait(2);
  2634. Playtones(busy);
  2635. Wait(2);
  2636. Playtones(ring);
  2637. Wait(2);
  2638. Playtones(congestion);
  2639. Wait(2);
  2640. Playtones(callwaiting);
  2641. Wait(2);
  2642. Playtones(dialrecall);
  2643. Wait(2);
  2644. Playtones(record);
  2645. Wait(2);
  2646. Playtones(info);
  2647. Wait(5);
  2648. Hangup();
  2649. }
  2650. 790 => {
  2651. MeetMe(790,p);
  2652. }
  2653. 792 => {
  2654. goto pageall|s|begin;
  2655. }
  2656. 795 => {
  2657. AGI(wakeup.agi);Congestion();
  2658. }
  2659. 544716 => { // Incoming call from FWD
  2660. TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&);
  2661. goto s|loopback;
  2662. }
  2663. i => {
  2664. Background(invalid);
  2665. goto s|loopback;
  2666. }
  2667. o => {
  2668. goto s|loopback;
  2669. }
  2670. t => {
  2671. Congestion();
  2672. }
  2673. }
  2674. context fromvmhome {
  2675. 1 => {
  2676. Dial(Zap/6&Sip/murf|20|Tt);
  2677. }
  2678. 2 => {
  2679. Dial(Zap/3&Zap/5|20|Tt);
  2680. }
  2681. _707202XXXX => {
  2682. &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2683. }
  2684. _707219XXXX => {
  2685. &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2686. }
  2687. _707254XXXX => {
  2688. &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2689. }
  2690. _707716XXXX => {
  2691. &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2692. }
  2693. _707754XXXX => {
  2694. &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2695. }
  2696. _707574XXXX => {
  2697. &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2698. }
  2699. _NXXNXXXXXX => {
  2700. &ciddial(1${EXTEN},${EXTEN},30,TW,Zap/1);
  2701. }
  2702. _1NXXNXXXXXX => { // HAND DIALING
  2703. &ciddial(${EXTEN},${EXTEN:1},30,TW,Zap/1);
  2704. }
  2705. _754XXXX => {
  2706. &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1);
  2707. }
  2708. _574XXXX => {
  2709. &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1);
  2710. }
  2711. _NXXXXXX => {
  2712. &ciddial(1707${EXTEN},707${EXTEN},30,TW,Zap/1);
  2713. }
  2714. _911 => {
  2715. &ciddial(911,911,30,TW,Zap/1);
  2716. }
  2717. _411 => {
  2718. &ciddial(411,411,30,TW,Zap/1);
  2719. }
  2720. }
  2721. context fromvmwork {
  2722. 1 => {
  2723. Dial(Zap/6&Sip/murf|20|Tt);
  2724. }
  2725. 2 => {
  2726. Dial(Zap/3&Zap/5|20|Tt);
  2727. }
  2728. _707202XXXX => {
  2729. &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2730. }
  2731. _707219XXXX => {
  2732. &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2733. }
  2734. _707254XXXX => {
  2735. &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2736. }
  2737. _707716XXXX => {
  2738. &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2739. }
  2740. _707754XXXX => {
  2741. &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2742. }
  2743. _707574XXXX => {
  2744. &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2745. }
  2746. _NXXNXXXXXX => {
  2747. &ciddial(1${EXTEN},${EXTEN},30,TW,Zap/1);
  2748. }
  2749. _1NXXNXXXXXX => { // HAND DIALING
  2750. &ciddial(${EXTEN},${EXTEN:1},30,TW,Zap/1);
  2751. }
  2752. _754XXXX => {
  2753. &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1);
  2754. }
  2755. _574XXXX => {
  2756. &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1);
  2757. }
  2758. _NXXXXXX => {
  2759. &ciddial(1707${EXTEN},707${EXTEN},30,TW,Zap/1);
  2760. }
  2761. 911 => {
  2762. &ciddial(911,911,30,TW,Zap/1);
  2763. }
  2764. 411 => {
  2765. &ciddial(411,411,30,TW,Zap/1);
  2766. }
  2767. }
  2768. context fromSeanUniden {
  2769. includes
  2770. {
  2771. parkedcalls;
  2772. }
  2773. 21 => {
  2774. Dial(IAX2/seaniax,20,T);
  2775. }
  2776. _707202XXXX => {
  2777. &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2778. }
  2779. _707219XXXX => {
  2780. &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2781. }
  2782. _707254XXXX => {
  2783. &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2784. }
  2785. _707716XXXX => {
  2786. &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2787. }
  2788. _707754XXXX => {
  2789. &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2790. }
  2791. _707574XXXX => {
  2792. &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1);
  2793. }
  2794. _NXXNXXXXXX => {
  2795. &ciddial(1${EXTEN},${EXTEN},30,TW,Zap/1);
  2796. }
  2797. _1NXXNXXXXXX => {
  2798. &ciddial(${EXTEN},${EXTEN:1},30,TW,Zap/1);
  2799. }
  2800. _754XXXX => {
  2801. &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1);
  2802. }
  2803. _574XXXX => {
  2804. &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1);
  2805. }
  2806. _NXXXXXX => {
  2807. &ciddial(1707${EXTEN},707${EXTEN},30,TW,Zap/1);
  2808. }
  2809. 911 => {
  2810. &ciddial(911,911,30,TW,Zap/1);
  2811. }
  2812. 411 => {
  2813. &ciddial(411,411,30,TW,Zap/1);
  2814. }
  2815. }
  2816. context workext {
  2817. ignorepat => 8;
  2818. ignorepat => 9;
  2819. includes {
  2820. parkedcalls;
  2821. workfirst;
  2822. force_home;
  2823. dialFWD;
  2824. dialiaxtel;
  2825. dialgoiax;
  2826. }
  2827. s => {
  2828. loopback:
  2829. Wait(0);
  2830. }
  2831. 1 => {
  2832. Dial(Zap/3&Zap/5,20,tT);
  2833. }
  2834. 2 => {
  2835. Dial(Zap/5&Zap/6,20,tT);
  2836. }
  2837. 21 => {
  2838. Dial(IAX2/seaniax,20,T);
  2839. }
  2840. 22 => {
  2841. Set(CALLERID(num)=1234567890);
  2842. Set(CALLERID(name)=TestCaller);
  2843. Dial(Zap/5,20,mP()A(beep)tw);
  2844. NoOp(here is dialstatus: ${DIALSTATUS}...);
  2845. goto s|loopback;
  2846. }
  2847. 4 => {
  2848. VoicemailMain();
  2849. goto s|loopback;
  2850. }
  2851. 5 => {
  2852. Record(recording:gsm);
  2853. Background(recording);
  2854. }
  2855. 6 => {
  2856. ZapBarge();
  2857. }
  2858. 760 => {
  2859. DateTime();
  2860. goto s|loopback;
  2861. }
  2862. 761 => {
  2863. ZapBarge();
  2864. goto s|loopback;
  2865. }
  2866. 765 => {
  2867. Playback(demo-echotest);
  2868. Echo();
  2869. Playback(demo-echodone);
  2870. goto s|loopback;
  2871. }
  2872. 766 => {
  2873. Festival(The other thing to watch is neuro-electronics: the ability to interface technology with our neural system: My wife: Sigrid: has had a cochlear implant since 1996. This once profoundly deaf person now uses the phone: recognizes accents: and listens to movies and recorded books.);
  2874. goto s|loopback;
  2875. }
  2876. 767 => {
  2877. agi(tts-riddle.agi);
  2878. Background(gsm/what-time-it-is2);
  2879. SayUnixTime();
  2880. goto s|loopback;
  2881. }
  2882. 768 => {
  2883. agi(tts-computer.agi);
  2884. }
  2885. 771 => {
  2886. eagi(eagi-test);
  2887. agi(my-agi-test);
  2888. }
  2889. 772 => {
  2890. agi(wakeup.agi);
  2891. }
  2892. 775 => {
  2893. if( ${EXTEN}=${EXTEN} )
  2894. {
  2895. BackGround(digits/1);
  2896. }
  2897. else
  2898. {
  2899. BackGround(digits/0);
  2900. }
  2901. if( ${EXTEN}=${LANGUAGE} )
  2902. {
  2903. BackGround(digits/1);
  2904. }
  2905. else
  2906. {
  2907. BackGround(digits/0);
  2908. }
  2909. BackGround(digits/2);
  2910. }
  2911. 776 => {
  2912. Set(TEST=00359889811777);
  2913. if( ${TEST}= 00359889811777 )
  2914. {
  2915. BackGround(digits/1);
  2916. }
  2917. else
  2918. {
  2919. BackGround(digits/0);
  2920. }
  2921. if( ${TEST}= 00359889811888 )
  2922. {
  2923. BackGround(digits/1);
  2924. }
  2925. else
  2926. {
  2927. BackGround(digits/0);
  2928. }
  2929. Hangup();
  2930. }
  2931. 790 => {
  2932. MeetMe(790,p);
  2933. }
  2934. 792 => {
  2935. goto pageall|s|begin;
  2936. }
  2937. 793 => {
  2938. #include "include1.ael2"
  2939. }
  2940. 795 => {
  2941. AGI(wakeup.agi);
  2942. Congestion();
  2943. }
  2944. 797 => {
  2945. Set(CONFCIDNA=${CALLERID(name)});
  2946. Set(CONFCIDNU=${CALLERID(num)});
  2947. AGI(callall);
  2948. AGI(submit-announce.agi);
  2949. Hangup();
  2950. }
  2951. }
  2952. context wakeup {
  2953. 3 => {
  2954. Dial(Zap/3|30);
  2955. }
  2956. 4 => {
  2957. Dial(Zap/4|30);
  2958. }
  2959. 5 => {
  2960. Dial(Zap/5|30);
  2961. }
  2962. 6 => {
  2963. Dial(Zap/6|30);
  2964. }
  2965. 99 => {
  2966. Dial(IAX2/murfiaxphone|30);
  2967. }
  2968. 97 => {
  2969. Dial(IAX2/ryaniax|30);
  2970. }
  2971. 94 => {
  2972. Dial(IAX2/seaniax|30);
  2973. }
  2974. }
  2975. context announce-all {
  2976. s => {
  2977. begin:
  2978. MeetMe(5555,dtqp);
  2979. MeetMeAdmin(5555,K);
  2980. Hangup();
  2981. }
  2982. h => {
  2983. MeetMeAdmin(5555,K);
  2984. Hangup();
  2985. }
  2986. }
  2987. // now include the telemarketer torture scripts!
  2988. #include "telemarket_torture.ael2"