extensions.ael.sample 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // Example AEL config file
  3. //
  4. macro std-exten-ael( ext , dev ) {
  5. Dial(${dev}/${ext},20);
  6. switch(${DIALSTATUS}) {
  7. case BUSY:
  8. Voicemail(b${ext});
  9. break;
  10. default:
  11. Voicemail(u${ext});
  12. };
  13. catch a {
  14. VoiceMailMain(${ext});
  15. return;
  16. };
  17. };
  18. context ael-demo {
  19. s => {
  20. Wait(1);
  21. Answer();
  22. TIMEOUT(digit)=5;
  23. TIMEOUT(response)=10;
  24. restart:
  25. Background(demo-congrats);
  26. instructions:
  27. for (x=0; ${x} < 3; x=${x} + 1) {
  28. Background(demo-instruct);
  29. WaitExten();
  30. };
  31. };
  32. 2 => {
  33. Background(demo-moreinfo);
  34. goto s|instructions;
  35. };
  36. 3 => {
  37. LANGUAGE()=fr;
  38. goto s|restart;
  39. };
  40. 500 => {
  41. Playback(demo-abouttotry);
  42. Dial(IAX2/guest@misery.digium.com);
  43. Playback(demo-nogo);
  44. goto s|instructions;
  45. };
  46. 600 => {
  47. Playback(demo-echotest);
  48. Echo();
  49. Playback(demo-echodone);
  50. goto s|instructions;
  51. };
  52. _1234 => &std-exten-ael(${EXTEN}, "IAX2");
  53. # => {
  54. Playback(demo-thanks);
  55. Hangup();
  56. };
  57. t => jump #;
  58. i => Playback(invalid);
  59. };