extensions.ael 73 KB

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