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