asterisk.adsi 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. ;
  2. ; Asterisk default ADSI script
  3. ;
  4. ;
  5. ; Begin with the preamble requirements
  6. ;
  7. DESCRIPTION "Asterisk PBX" ; Name of vendor
  8. VERSION 0x00 ; Version of stuff
  9. ;SECURITY "_AST" ; Security code
  10. SECURITY 0X9BDBF7AC ; Security code
  11. FDN 0x0000000F ; Descriptor number
  12. ;
  13. ; Flags
  14. ;
  15. FLAG "nocallwaiting"
  16. ;
  17. ; Predefined strings
  18. ;
  19. DISPLAY "titles" IS "** Asterisk PBX **"
  20. DISPLAY "talkingto" IS "Call active." JUSTIFY LEFT
  21. DISPLAY "callname" IS "$Call1p" JUSTIFY LEFT
  22. DISPLAY "callnum" IS "$Call1s" JUSTIFY LEFT
  23. DISPLAY "incoming" IS "Incoming call!" JUSTIFY LEFT
  24. DISPLAY "ringing" IS "Calling... " JUSTIFY LEFT
  25. DISPLAY "callended" IS "Call ended." JUSTIFY LEFT
  26. DISPLAY "missedcall" IS "Missed call." JUSTIFY LEFT
  27. DISPLAY "busy" IS "Busy." JUSTIFY LEFT
  28. DISPLAY "reorder" IS "Reorder." JUSTIFY LEFT
  29. DISPLAY "cwdisabled" IS "Callwait disabled"
  30. DISPLAY "empty" IS "asdf"
  31. ;
  32. ; Begin soft key definitions
  33. ;
  34. KEY "callfwd" IS "CallFwd" OR "Call Forward"
  35. OFFHOOK
  36. VOICEMODE
  37. WAITDIALTONE
  38. SENDDTMF "*60"
  39. GOTO "offHook"
  40. ENDKEY
  41. KEY "vmail_OH" IS "VMail" OR "Voicemail"
  42. OFFHOOK
  43. VOICEMODE
  44. WAITDIALTONE
  45. SENDDTMF "8500"
  46. ENDKEY
  47. KEY "vmail" IS "VMail" OR "Voicemail"
  48. SENDDTMF "8500"
  49. ENDKEY
  50. KEY "backspace" IS "BackSpc" OR "Backspace"
  51. BACKSPACE
  52. ENDKEY
  53. KEY "cwdisable" IS "CWDsble" OR "Disable Call Wait"
  54. SENDDTMF "*70"
  55. SETFLAG "nocallwaiting"
  56. SHOWDISPLAY "cwdisabled" AT 4
  57. TIMERCLEAR
  58. TIMERSTART 1
  59. ENDKEY
  60. KEY "cidblock" IS "CIDBlk" OR "Block Callerid"
  61. SENDDTMF "*67"
  62. SETFLAG "nocallwaiting"
  63. ENDKEY
  64. ;
  65. ; Begin main subroutine
  66. ;
  67. SUB "main" IS
  68. IFEVENT NEARANSWER THEN
  69. CLEAR
  70. SHOWDISPLAY "titles" AT 1 NOUPDATE
  71. SHOWDISPLAY "talkingto" AT 2 NOUPDATE
  72. SHOWDISPLAY "callname" AT 3
  73. SHOWDISPLAY "callnum" AT 4
  74. GOTO "stableCall"
  75. ENDIF
  76. IFEVENT OFFHOOK THEN
  77. CLEAR
  78. CLEARFLAG "nocallwaiting"
  79. CLEARDISPLAY
  80. SHOWDISPLAY "titles" AT 1
  81. SHOWKEYS "vmail"
  82. SHOWKEYS "cidblock"
  83. SHOWKEYS "cwdisable" UNLESS "nocallwaiting"
  84. GOTO "offHook"
  85. ENDIF
  86. IFEVENT IDLE THEN
  87. CLEAR
  88. SHOWDISPLAY "titles" AT 1
  89. SHOWKEYS "vmail_OH"
  90. ENDIF
  91. IFEVENT CALLERID THEN
  92. CLEAR
  93. ; SHOWDISPLAY "titles" AT 1 NOUPDATE
  94. ; SHOWDISPLAY "incoming" AT 2 NOUPDATE
  95. SHOWDISPLAY "callname" AT 3 NOUPDATE
  96. SHOWDISPLAY "callnum" AT 4
  97. ENDIF
  98. IFEVENT RING THEN
  99. CLEAR
  100. SHOWDISPLAY "titles" AT 1 NOUPDATE
  101. SHOWDISPLAY "incoming" AT 2
  102. ENDIF
  103. IFEVENT ENDOFRING THEN
  104. SHOWDISPLAY "missedcall" AT 2
  105. CLEAR
  106. SHOWDISPLAY "titles" AT 1
  107. SHOWKEYS "vmail_OH"
  108. ENDIF
  109. IFEVENT TIMER THEN
  110. CLEAR
  111. SHOWDISPLAY "empty" AT 4
  112. ENDIF
  113. ENDSUB
  114. SUB "offHook" IS
  115. IFEVENT FARRING THEN
  116. CLEAR
  117. SHOWDISPLAY "titles" AT 1 NOUPDATE
  118. SHOWDISPLAY "ringing" AT 2 NOUPDATE
  119. SHOWDISPLAY "callname" at 3 NOUPDATE
  120. SHOWDISPLAY "callnum" at 4
  121. ENDIF
  122. IFEVENT FARANSWER THEN
  123. CLEAR
  124. SHOWDISPLAY "talkingto" AT 2
  125. GOTO "stableCall"
  126. ENDIF
  127. IFEVENT BUSY THEN
  128. CLEAR
  129. SHOWDISPLAY "titles" AT 1 NOUPDATE
  130. SHOWDISPLAY "busy" AT 2 NOUPDATE
  131. SHOWDISPLAY "callname" at 3 NOUPDATE
  132. SHOWDISPLAY "callnum" at 4
  133. ENDIF
  134. IFEVENT REORDER THEN
  135. CLEAR
  136. SHOWDISPLAY "titles" AT 1 NOUPDATE
  137. SHOWDISPLAY "reorder" AT 2 NOUPDATE
  138. SHOWDISPLAY "callname" at 3 NOUPDATE
  139. SHOWDISPLAY "callnum" at 4
  140. ENDIF
  141. ENDSUB
  142. SUB "stableCall" IS
  143. IFEVENT REORDER THEN
  144. SHOWDISPLAY "callended" AT 2
  145. ENDIF
  146. ENDSUB