Debian Codegraph @

pbx/ael/ael-test/ael-test3/extensions.ael

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