このページは役立ちましたか?

FONスクリプトAPI

    目次
    1. 1. Fon Script Interface Overview
    2. 2. Example Application
    3. 3. Prerequisite
    4. 4. How To Configure Run Script
    5. 5. Calling Your Script
    6. 6. Example Script
    7. 7. Compatibility
    8. 8. Languages
    9. 9. Programming Tips
    10. 10. Environment Variables
    11. 11. FON Interface API Reference
      1. 11.1. ANSWER
      2. 11.2. AUTOHANGUP <time>
      3. 11.3. CHANNEL STATUS [<channelname>]
      4. 11.4. EXEC <application> <options>
        1. 11.4.1. AbsoluteTimeout: Set absolute maximum time of call
        2. 11.4.2. AddQueueMember: Dynamically adds queue members
        3. 11.4.3. ADSIProg: Load Asterisk ADSI Scripts into phone
        4. 11.4.4. AGI: Executes an AGI compliant application
        5. 11.4.5. AlarmReceiver: Provide support for receving alarm reports from a burglar or fire alarm panel
        6. 11.4.6. Answer: Answer a channel if ringing
        7. 11.4.7. AppendCDRUserField: Append to the CDR user field
        8. 11.4.8. Authenticate: Authenticate a user
        9. 11.4.9. BackGround: Play a file while awaiting extension
        10. 11.4.10. BackgroundDetect: Background a file with talk detect
        11. 11.4.11. Busy: Indicate the Busy condition
        12. 11.4.12. ChangeMonitor: Change monitoring filename of a channel
        13. 11.4.13. ChanInUse: Checks to see if channel is in use
        14. 11.4.14. ChanIsAvail: Check channel availability
        15. 11.4.15. ChanSpy: Listen to the audio of an active channel
        16. 11.4.16. CheckGroup: Check the channel count of a group against a limit
        17. 11.4.17. Congestion: Indicate the Congestion condition
        18. 11.4.18. ControlPlayback: Play a file with fast forward and rewind
        19. 11.4.19. Curl: Load an external URL
        20. 11.4.20. Cut: Splits a variable's contents using the specified delimiter
        21. 11.4.21. DateTime: Says a specified time in a custom format
        22. 11.4.22. DBdel: Delete a key from the database
        23. 11.4.23. DBdeltree: Delete a family or keytree from the database
        24. 11.4.24. DBget: Retrieve a value from the database
        25. 11.4.25. DBput: Store a value in the database
        26. 11.4.26. DeadAGI: Executes AGI on a hungup channel
        27. 11.4.27. Dial: Place a call and connect to the current channel
        28. 11.4.28. Dictate: Virtual Dictation Machine
        29. 11.4.29. DigitTimeout: Set maximum timeout between digits
        30. 11.4.30. Directory: Provide directory of voicemail extensions
        31. 11.4.31. DISA: DISA (Direct Inward System Access)
        32. 11.4.32. DumpChan: Dump Info About The Calling Channel
        33. 11.4.33. DUNDiLookup: Look up a number with DUNDi
        34. 11.4.34. EAGI: Executes an EAGI compliant application
        35. 11.4.35. Echo: Echo audio read back to the user
        36. 11.4.36. EndWhile: End A While Loop
        37. 11.4.37. EnumLookup: Lookup number in ENUM
        38. 11.4.38. Eval: Evaluates a string
        39. 11.4.39. Exec: Executes internal application
        40. 11.4.40. ExecIf: Conditional exec
        41. 11.4.41. ExecIfTime: Conditional application execution based on the current time
        42. 11.4.42. ExternalIVR: Interfaces with an external IVR application
        43. 11.4.43. Festival: Say text to the user
        44. 11.4.44. Flash: Flashes a Zap Trunk
        45. 11.4.45. FlushQueueStats: Flushes stats for specified queue
        46. 11.4.46. ForkCDR: Forks the Call Data Record
        47. 11.4.47. GetCPEID: Get ADSI CPE ID
        48. 11.4.48. GetGroupCount: Get the channel count of a group
        49. 11.4.49. GetGroupMatchCount: Get the channel count of all groups that match a pattern
        50. 11.4.50. Gosub: Jump to label, saving return address
        51. 11.4.51. GosubIf: Jump to label, saving return address
        52. 11.4.52. Goto: Jump to a particular priority, extension, or context
        53. 11.4.53. GotoIf: Conditional goto
        54. 11.4.54. GotoIfTime: Conditional Goto based on the current time
        55. 11.4.55. Hangup: Hang up the calling channel
        56. 11.4.56. HasNewVoicemail: Conditionally branches to priority + 101 with the right options set
        57. 11.4.57. HasVoicemail: Conditionally branches to priority + 101 with the right options set
        58. 11.4.58. IAX2Provision: Provision a calling IAXy with a given template
        59. 11.4.59. ICES: Encode and stream using 'ices'
        60. 11.4.60. ImportVar: Import a variable from a channel into a new variable
        61. 11.4.61. LookupBlacklist: Look up Caller*ID name/number from blacklist database
        62. 11.4.62. LookupCIDName: Look up CallerID Name from local database
        63. 11.4.63. Macro: Macro Implementation
        64. 11.4.64. MacroExit: Exit From Macro
        65. 11.4.65. MacroIf: Conditional Macro Implementation
        66. 11.4.66. MailboxExists: Check to see if Voicemail mailbox exists
        67. 11.4.67. Math: Performs Mathematical Functions
        68. 11.4.68. MD5: Calculate MD5 checksum
        69. 11.4.69. MD5Check: Check MD5 checksum
        70. 11.4.70. MeetMe: MeetMe conference bridge
        71. 11.4.71. MeetMeAdmin: MeetMe conference Administration
        72. 11.4.72. MeetMeCount: MeetMe participant count
        73. 11.4.73. Milliwatt: Generate a Constant 1000Hz tone at 0dbm (mu-law)
        74. 11.4.74. MixMonitor: Record a call and mix the audio during the recording
        75. 11.4.75. Monitor: Monitor a channel
        76. 11.4.76. MP3Player: Play an MP3 file or stream
        77. 11.4.77. MusicOnHold: Play Music On Hold indefinitely
        78. 11.4.78. NBScat: Play an NBS local stream
        79. 11.4.79. NoCDR: Tell Asterisk to not maintain a CDR for the current call
        80. 11.4.80. NoOp: Do Nothing
        81. 11.4.81. Page: Pages phones
        82. 11.4.82. Park: Park yourself
        83. 11.4.83. ParkAndAnnounce: Park and Announce
        84. 11.4.84. ParkedCall: Answer a parked call
        85. 11.4.85. PauseQueueMember: Pauses a queue member
        86. 11.4.86. Pickup: Directed Call Pickup
        87. 11.4.87. Playback: Play a file
        88. 11.4.88. PlayTones: Play a tone list
        89. 11.4.89. PrivacyManager: Require phone number to be entered, if no CallerID sent
        90. 11.4.90. Progress: Indicate progress
        91. 11.4.91. Queue: Queue a call for a call queue
        92. 11.4.92. Random: Conditionally branches, based upon a probability
        93. 11.4.93. Read: Read a variable
        94. 11.4.94. ReadFile: ReadFile(varname=file,length)
        95. 11.4.95. RealTime: Realtime Data Lookup
        96. 11.4.96. RealTimeUpdate: Realtime Data Rewrite
        97. 11.4.97. Record: Record to a file
        98. 11.4.98. RemoveQueueMember: Dynamically removes queue members
        99. 11.4.99. ResetCDR: Resets the Call Data Record
        100. 11.4.100. ResponseTimeout: Set maximum timeout awaiting response
        101. 11.4.101. Return: Return from gosub routine
        102. 11.4.102. Ringing: Indicate ringing tone
        103. 11.4.103. SayAlpha: Say Alpha
        104. 11.4.104. SayDigits: Say Digits
        105. 11.4.105. SayNumber: Say Number
        106. 11.4.106. SayPhonetic: Say Phonetic
        107. 11.4.107. SayUnixTime: Says a specified time in a custom format
        108. 11.4.108. SendDTMF: Sends arbitrary DTMF digits
        109. 11.4.109. SendImage: Send an image file
        110. 11.4.110. SendText: Send a Text Message
        111. 11.4.111. SendURL: Send a URL
        112. 11.4.112. Set: Set channel variable(s) or function value(s)
        113. 11.4.113. SetAccount: Set the CDR Account Code
        114. 11.4.114. SetAMAFlags: Set the AMA Flags
        115. 11.4.115. SetCallerID: Set CallerID
        116. 11.4.116. SetCallerPres: Set CallerID Presentation
        117. 11.4.117. SetCDRUserField: Set the CDR user field
        118. 11.4.118. SetCIDName: Set CallerID Name
        119. 11.4.119. SetCIDNum: Set CallerID Number
        120. 11.4.120. SetGlobalVar: Set a global variable to a given value
        121. 11.4.121. SetGroup: Set the channel's group
        122. 11.4.122. SetLanguage: Set the channel's preferred language
        123. 11.4.123. SetMusicOnHold: Set default Music On Hold class
        124. 11.4.124. SetRDNIS: Set RDNIS Number
        125. 11.4.125. SetTransferCapability: Set ISDN Transfer Capability
        126. 11.4.126. SetVar: Set channel variable(s)
        127. 11.4.127. SIPAddHeader: Add a SIP header to the outbound call
        128. 11.4.128. SIPDtmfMode: Change the dtmfmode for a SIP call
        129. 11.4.129. SIPGetHeader: Get a SIP header from an incoming call
        130. 11.4.130. SMS: Communicates with SMS service centres and SMS capable analogue phones
        131. 11.4.131. SoftHangup: Soft Hangup Application
        132. 11.4.132. Sort: Sorts a list of keywords and values
        133. 11.4.133. StackPop: Remove one address from gosub stack
        134. 11.4.134. StartMusicOnHold: Play Music On Hold
        135. 11.4.135. StopMonitor: Stop monitoring a channel
        136. 11.4.136. StopMusicOnHold: Stop Playing Music On Hold
        137. 11.4.137. StopPlayTones: Stop playing a tone list
        138. 11.4.138. System: Execute a system command
        139. 11.4.139. TestClient: Execute Interface Test Client
        140. 11.4.140. TestServer: Execute Interface Test Server
        141. 11.4.141. Transfer: Transfer caller to remote extension
        142. 11.4.142. TrySystem: Try executing a system command
        143. 11.4.143. TXTCIDName: Lookup caller name from TXT record
        144. 11.4.144. UnpauseQueueMember: Unpauses a queue member
        145. 11.4.145. UserEvent: Send an arbitrary event to the manager interface
        146. 11.4.146. Verbose: Send arbitrary text to verbose output
        147. 11.4.147. VMAuthenticate: Authenticate with Voicemail passwords
        148. 11.4.148. VoiceMail: Leave a Voicemail message
        149. 11.4.149. VoiceMailMain: Check Voicemail messages
        150. 11.4.150. Wait: Waits for some time
        151. 11.4.151. WaitExten: Waits for an extension to be entered
        152. 11.4.152. WaitForRing: Wait for Ring Application
        153. 11.4.153. WaitForSilence: Waits for a specified amount of silence
        154. 11.4.154. WaitMusicOnHold: Wait, playing Music On Hold
        155. 11.4.155. While: Start A While Loop
        156. 11.4.156. Zapateller: Block telemarketers with SIT
        157. 11.4.157. ZapBarge: Barge in (monitor) Zap channel
        158. 11.4.158. ZapRAS: Executes Zaptel ISDN RAS application
        159. 11.4.159. ZapScan: Scan Zap channels to monitor calls
      5. 11.5. GET DATA <filename> [<timeout> [<max digits>]]
      6. 11.6. GET VARIABLE <variablename>
      7. 11.7. HANGUP [<channelname>]
      8. 11.8. RECEIVE CHAR <timeout>
      9. 11.9. RECORD FILE <filename> <format> <escape digits> <timeout> [BEEP]
      10. 11.10. SAY DIGITS <digit string> <escape digits>
      11. 11.11. SAY NUMBER <number> <escape digits>
      12. 11.12. SEND IMAGE <image>
      13. 11.13. SEND TEXT "<text to send>"
      14. 11.14. SET CALLERID <caller ID specification>
      15. 11.15. SET CONTEXT <new context>
      16. 11.16. SET EXTENSION <new extension>
      17. 11.17. SET PRIORITY <new priority number>
      18. 11.18. SET VARIABLE <variablename> <value>
      19. 11.19. STREAM FILE <filename> <escape digits>
      20. 11.20. TDD MODE <setting>
      21. 11.21. VERBOSE <message> [<level>]
      22. 11.22. WAIT FOR DIGIT <timeout>

    FONスクリプトAPI(FON Script API)は無償提供されていますが、Fonalityのサポート対象になっています。Fonalityのサポートエンジニアは、あなたや第三者が書いた独自のAGIスクリプトに関して、追加開発、修正、トラブルシューティングを行なうことはありません。このページに書かれている内容や、一般的なAGIに関する質問などは受け付けておりませんのでご了承ください。

    1. 1. Fon Script Interface Overview
    2. 2. Example Application
    3. 3. Prerequisite
    4. 4. How To Configure Run Script
    5. 5. Calling Your Script
    6. 6. Example Script
    7. 7. Compatibility
    8. 8. Languages
    9. 9. Programming Tips
    10. 10. Environment Variables
    11. 11. FON Interface API Reference
      1. 11.1. ANSWER
      2. 11.2. AUTOHANGUP <time>
      3. 11.3. CHANNEL STATUS [<channelname>]
      4. 11.4. EXEC <application> <options>
        1. 11.4.1. AbsoluteTimeout: Set absolute maximum time of call
        2. 11.4.2. AddQueueMember: Dynamically adds queue members
        3. 11.4.3. ADSIProg: Load Asterisk ADSI Scripts into phone
        4. 11.4.4. AGI: Executes an AGI compliant application
        5. 11.4.5. AlarmReceiver: Provide support for receving alarm reports from a burglar or fire alarm panel
        6. 11.4.6. Answer: Answer a channel if ringing
        7. 11.4.7. AppendCDRUserField: Append to the CDR user field
        8. 11.4.8. Authenticate: Authenticate a user
        9. 11.4.9. BackGround: Play a file while awaiting extension
        10. 11.4.10. BackgroundDetect: Background a file with talk detect
        11. 11.4.11. Busy: Indicate the Busy condition
        12. 11.4.12. ChangeMonitor: Change monitoring filename of a channel
        13. 11.4.13. ChanInUse: Checks to see if channel is in use
        14. 11.4.14. ChanIsAvail: Check channel availability
        15. 11.4.15. ChanSpy: Listen to the audio of an active channel
        16. 11.4.16. CheckGroup: Check the channel count of a group against a limit
        17. 11.4.17. Congestion: Indicate the Congestion condition
        18. 11.4.18. ControlPlayback: Play a file with fast forward and rewind
        19. 11.4.19. Curl: Load an external URL
        20. 11.4.20. Cut: Splits a variable's contents using the specified delimiter
        21. 11.4.21. DateTime: Says a specified time in a custom format
        22. 11.4.22. DBdel: Delete a key from the database
        23. 11.4.23. DBdeltree: Delete a family or keytree from the database
        24. 11.4.24. DBget: Retrieve a value from the database
        25. 11.4.25. DBput: Store a value in the database
        26. 11.4.26. DeadAGI: Executes AGI on a hungup channel
        27. 11.4.27. Dial: Place a call and connect to the current channel
        28. 11.4.28. Dictate: Virtual Dictation Machine
        29. 11.4.29. DigitTimeout: Set maximum timeout between digits
        30. 11.4.30. Directory: Provide directory of voicemail extensions
        31. 11.4.31. DISA: DISA (Direct Inward System Access)
        32. 11.4.32. DumpChan: Dump Info About The Calling Channel
        33. 11.4.33. DUNDiLookup: Look up a number with DUNDi
        34. 11.4.34. EAGI: Executes an EAGI compliant application
        35. 11.4.35. Echo: Echo audio read back to the user
        36. 11.4.36. EndWhile: End A While Loop
        37. 11.4.37. EnumLookup: Lookup number in ENUM
        38. 11.4.38. Eval: Evaluates a string
        39. 11.4.39. Exec: Executes internal application
        40. 11.4.40. ExecIf: Conditional exec
        41. 11.4.41. ExecIfTime: Conditional application execution based on the current time
        42. 11.4.42. ExternalIVR: Interfaces with an external IVR application
        43. 11.4.43. Festival: Say text to the user
        44. 11.4.44. Flash: Flashes a Zap Trunk
        45. 11.4.45. FlushQueueStats: Flushes stats for specified queue
        46. 11.4.46. ForkCDR: Forks the Call Data Record
        47. 11.4.47. GetCPEID: Get ADSI CPE ID
        48. 11.4.48. GetGroupCount: Get the channel count of a group
        49. 11.4.49. GetGroupMatchCount: Get the channel count of all groups that match a pattern
        50. 11.4.50. Gosub: Jump to label, saving return address
        51. 11.4.51. GosubIf: Jump to label, saving return address
        52. 11.4.52. Goto: Jump to a particular priority, extension, or context
        53. 11.4.53. GotoIf: Conditional goto
        54. 11.4.54. GotoIfTime: Conditional Goto based on the current time
        55. 11.4.55. Hangup: Hang up the calling channel
        56. 11.4.56. HasNewVoicemail: Conditionally branches to priority + 101 with the right options set
        57. 11.4.57. HasVoicemail: Conditionally branches to priority + 101 with the right options set
        58. 11.4.58. IAX2Provision: Provision a calling IAXy with a given template
        59. 11.4.59. ICES: Encode and stream using 'ices'
        60. 11.4.60. ImportVar: Import a variable from a channel into a new variable
        61. 11.4.61. LookupBlacklist: Look up Caller*ID name/number from blacklist database
        62. 11.4.62. LookupCIDName: Look up CallerID Name from local database
        63. 11.4.63. Macro: Macro Implementation
        64. 11.4.64. MacroExit: Exit From Macro
        65. 11.4.65. MacroIf: Conditional Macro Implementation
        66. 11.4.66. MailboxExists: Check to see if Voicemail mailbox exists
        67. 11.4.67. Math: Performs Mathematical Functions
        68. 11.4.68. MD5: Calculate MD5 checksum
        69. 11.4.69. MD5Check: Check MD5 checksum
        70. 11.4.70. MeetMe: MeetMe conference bridge
        71. 11.4.71. MeetMeAdmin: MeetMe conference Administration
        72. 11.4.72. MeetMeCount: MeetMe participant count
        73. 11.4.73. Milliwatt: Generate a Constant 1000Hz tone at 0dbm (mu-law)
        74. 11.4.74. MixMonitor: Record a call and mix the audio during the recording
        75. 11.4.75. Monitor: Monitor a channel
        76. 11.4.76. MP3Player: Play an MP3 file or stream
        77. 11.4.77. MusicOnHold: Play Music On Hold indefinitely
        78. 11.4.78. NBScat: Play an NBS local stream
        79. 11.4.79. NoCDR: Tell Asterisk to not maintain a CDR for the current call
        80. 11.4.80. NoOp: Do Nothing
        81. 11.4.81. Page: Pages phones
        82. 11.4.82. Park: Park yourself
        83. 11.4.83. ParkAndAnnounce: Park and Announce
        84. 11.4.84. ParkedCall: Answer a parked call
        85. 11.4.85. PauseQueueMember: Pauses a queue member
        86. 11.4.86. Pickup: Directed Call Pickup
        87. 11.4.87. Playback: Play a file
        88. 11.4.88. PlayTones: Play a tone list
        89. 11.4.89. PrivacyManager: Require phone number to be entered, if no CallerID sent
        90. 11.4.90. Progress: Indicate progress
        91. 11.4.91. Queue: Queue a call for a call queue
        92. 11.4.92. Random: Conditionally branches, based upon a probability
        93. 11.4.93. Read: Read a variable
        94. 11.4.94. ReadFile: ReadFile(varname=file,length)
        95. 11.4.95. RealTime: Realtime Data Lookup
        96. 11.4.96. RealTimeUpdate: Realtime Data Rewrite
        97. 11.4.97. Record: Record to a file
        98. 11.4.98. RemoveQueueMember: Dynamically removes queue members
        99. 11.4.99. ResetCDR: Resets the Call Data Record
        100. 11.4.100. ResponseTimeout: Set maximum timeout awaiting response
        101. 11.4.101. Return: Return from gosub routine
        102. 11.4.102. Ringing: Indicate ringing tone
        103. 11.4.103. SayAlpha: Say Alpha
        104. 11.4.104. SayDigits: Say Digits
        105. 11.4.105. SayNumber: Say Number
        106. 11.4.106. SayPhonetic: Say Phonetic
        107. 11.4.107. SayUnixTime: Says a specified time in a custom format
        108. 11.4.108. SendDTMF: Sends arbitrary DTMF digits
        109. 11.4.109. SendImage: Send an image file
        110. 11.4.110. SendText: Send a Text Message
        111. 11.4.111. SendURL: Send a URL
        112. 11.4.112. Set: Set channel variable(s) or function value(s)
        113. 11.4.113. SetAccount: Set the CDR Account Code
        114. 11.4.114. SetAMAFlags: Set the AMA Flags
        115. 11.4.115. SetCallerID: Set CallerID
        116. 11.4.116. SetCallerPres: Set CallerID Presentation
        117. 11.4.117. SetCDRUserField: Set the CDR user field
        118. 11.4.118. SetCIDName: Set CallerID Name
        119. 11.4.119. SetCIDNum: Set CallerID Number
        120. 11.4.120. SetGlobalVar: Set a global variable to a given value
        121. 11.4.121. SetGroup: Set the channel's group
        122. 11.4.122. SetLanguage: Set the channel's preferred language
        123. 11.4.123. SetMusicOnHold: Set default Music On Hold class
        124. 11.4.124. SetRDNIS: Set RDNIS Number
        125. 11.4.125. SetTransferCapability: Set ISDN Transfer Capability
        126. 11.4.126. SetVar: Set channel variable(s)
        127. 11.4.127. SIPAddHeader: Add a SIP header to the outbound call
        128. 11.4.128. SIPDtmfMode: Change the dtmfmode for a SIP call
        129. 11.4.129. SIPGetHeader: Get a SIP header from an incoming call
        130. 11.4.130. SMS: Communicates with SMS service centres and SMS capable analogue phones
        131. 11.4.131. SoftHangup: Soft Hangup Application
        132. 11.4.132. Sort: Sorts a list of keywords and values
        133. 11.4.133. StackPop: Remove one address from gosub stack
        134. 11.4.134. StartMusicOnHold: Play Music On Hold
        135. 11.4.135. StopMonitor: Stop monitoring a channel
        136. 11.4.136. StopMusicOnHold: Stop Playing Music On Hold
        137. 11.4.137. StopPlayTones: Stop playing a tone list
        138. 11.4.138. System: Execute a system command
        139. 11.4.139. TestClient: Execute Interface Test Client
        140. 11.4.140. TestServer: Execute Interface Test Server
        141. 11.4.141. Transfer: Transfer caller to remote extension
        142. 11.4.142. TrySystem: Try executing a system command
        143. 11.4.143. TXTCIDName: Lookup caller name from TXT record
        144. 11.4.144. UnpauseQueueMember: Unpauses a queue member
        145. 11.4.145. UserEvent: Send an arbitrary event to the manager interface
        146. 11.4.146. Verbose: Send arbitrary text to verbose output
        147. 11.4.147. VMAuthenticate: Authenticate with Voicemail passwords
        148. 11.4.148. VoiceMail: Leave a Voicemail message
        149. 11.4.149. VoiceMailMain: Check Voicemail messages
        150. 11.4.150. Wait: Waits for some time
        151. 11.4.151. WaitExten: Waits for an extension to be entered
        152. 11.4.152. WaitForRing: Wait for Ring Application
        153. 11.4.153. WaitForSilence: Waits for a specified amount of silence
        154. 11.4.154. WaitMusicOnHold: Wait, playing Music On Hold
        155. 11.4.155. While: Start A While Loop
        156. 11.4.156. Zapateller: Block telemarketers with SIT
        157. 11.4.157. ZapBarge: Barge in (monitor) Zap channel
        158. 11.4.158. ZapRAS: Executes Zaptel ISDN RAS application
        159. 11.4.159. ZapScan: Scan Zap channels to monitor calls
      5. 11.5. GET DATA <filename> [<timeout> [<max digits>]]
      6. 11.6. GET VARIABLE <variablename>
      7. 11.7. HANGUP [<channelname>]
      8. 11.8. RECEIVE CHAR <timeout>
      9. 11.9. RECORD FILE <filename> <format> <escape digits> <timeout> [BEEP]
      10. 11.10. SAY DIGITS <digit string> <escape digits>
      11. 11.11. SAY NUMBER <number> <escape digits>
      12. 11.12. SEND IMAGE <image>
      13. 11.13. SEND TEXT "<text to send>"
      14. 11.14. SET CALLERID <caller ID specification>
      15. 11.15. SET CONTEXT <new context>
      16. 11.16. SET EXTENSION <new extension>
      17. 11.17. SET PRIORITY <new priority number>
      18. 11.18. SET VARIABLE <variablename> <value>
      19. 11.19. STREAM FILE <filename> <escape digits>
      20. 11.20. TDD MODE <setting>
      21. 11.21. VERBOSE <message> [<level>]
      22. 11.22. WAIT FOR DIGIT <timeout>
     

     

    Fon Script Interface Overview

    The FON Script Interface allows software developers and system integrators to extend the functionality of their PBXtra CCE systems by allowing them to create customized extensions to the PBXtra system using a standardized API. This facility allows the creation of custom IVR applications that will impress your friends, and probably get you promoted ;-).

     

    Example Application

    One example of a FON Script application is a store locater. This program would prompt the caller to key in his zip code, and look up a list of stores in a cross reference table of a database. Once the correct store is identified the caller is then automatically connected with the correct store.

     

     

    Prerequisite

    You must have the PBXtra Call Center Edition of the Fonality software in order to use this feature. In CCE it will be shown in your call menu as "Run Script".

     

     

    How To Configure Run Script

    1. Log into your PBXtra Admin Web Interface using your administrative username and password.
    2. Click on the AutoAnswer tab.
    3. Click on the call menu tab.
    4. Add a new Call Sequence named Run Script.
    5. Specify the path to the script in your /var/lib/asterisk/agi-bin/ directory.

    Exmaple:

    my_script.agi
    

    Example for a script listening on a port:

    fon://ip.add.re.ss:port
    

    Note: If you are running PBXtra Core version 1.2.14-fon-o or newer, you can also pass HTTP style arguments to the script like this:

    my_script.agi?extension=${EXTEN}
    

    You can look for them in your script using the environment variables.

     

     

    Calling Your Script

    If you have connected your FON Interface Script to your call menu, you can dial "0" from any of your extensions to reach your main menu, and subsequently reach the AGI for testing. You may also dial in from an external line.

     

     

     

    Example Script

    This example Perl script is available under the GNU GPLv2 or higher License. It demonstrates basic interaction with the PBXtra Core software from your server using the STDOUT file handle. It also shows how to get digit input from your callers.

    #!/usr/bin/perl
    use strict;      # Load the strict pragma to enforce good program form
    use Socket;      # Load the socket library to let us speak TCP/IP
    use Carp;        # Load an error handling library
    use IO::Handle;  # Overload the I/O functions with more appropriate ones
    
    my $port = 4573; # TCP Port number to listen on
    
    $|=1; # Activate auto-flush to disable text buffering in perl
    
    # Setup Variables
    my %AGI;       # Init a hash structure to be used for AGI environment
    my $tests = 0; # A counter for the number of tests that have been run
    my $fail = 0;  # A counter for failure conditions
    my $pass = 0;  # A counter for success conditions
    
    ##############################################################################
    # checkresult: A function to check the return status of a command to 
    #              detect any errors.
    #
    #   Arguments: $res = A result from an AGI command
    #     Returns: none, sets $pass and $fail counters
    ##############################################################################
    sub checkresult {
            my ($res) = @_;
            my $retval;
            $tests++;
            chomp $res;
            if ($res =~ /^200/) {
                    $res =~ /result=(-?\d+)/;
                    if (!length($1)) {
                            print STDERR "FAIL ($res)\n";
                            $fail++;
                    } else {
                            print STDERR "PASS ($1)\n";
                            $pass++;
                    }
            } else {
                    print STDERR "FAIL (unexpected result '$res')\n";
                    $fail++;
            }
    }
    
    # Set up a TCP/IP socket, and bind/listen to it for new connections
    # from the PXBtra Core software (the client)
    socket(SERVER, PF_INET, SOCK_STREAM, 0);
    setsockopt(SERVER, SOL_SOCKET, SO_REUSEADDR, pack("l", 1));
    bind(SERVER, sockaddr_in($port, INADDR_ANY)) || die("can't bind\n");
    listen(SERVER, SOMAXCONN);
    
    # Start the FastAGI/FON request loop
    for(;;) {
            # We will wait for a connection. The accept() call will block until
            # a connection arrives. While processing, connections line up.
            my $raddr = accept(CLIENT, SERVER); # Get the next connection
            my ($s, $p) = sockaddr_in($raddr);  # 
            CLIENT->autoflush(1); # Disable text buffering client connection
            while(<CLIENT>) { # Read all the text sent from the client to the server
                    chomp;    # Eliminate any newlines on the end of the text
                    last unless length($_); # If the line is empty, stop reading
                    if (/^agi_(\w+)\:\s+(.*)$/) { # Look for variables starting with agi_
                            # Set AGI hash keyed by variable name to the value found
                            $AGI{$1} = $2; # $1 is match from first set of parens above
                                           # $2 is match from second set of parens...
                    }
            }
            # Print out a summary of the AGI environment. 
            # Visible in asterisk -r console.
            print STDERR "AGI Environment Dump from $s:$p --\n";
            foreach my $i (sort keys %AGI) {
                    print STDERR " -- $i = $AGI{$i}\n";
            }
    
            # Begin the first test. This plays a sound file, checks the result, and
            # counts the result.
            print STDERR "1.  Testing 'sendfile'...";
            # Tell PBXtra Core (client) to play a sound file to the caller
            print CLIENT "STREAM FILE beep \"\"\n"; 
            my $result = <CLIENT>; # Read data from the PBXtra Core (client)
            &checkresult($result); # Check the output for success/failure
    
            # Ask PBXtra Core to read a number to the caller
            print STDERR "2.  Testing 'saynumber'...";
            print CLIENT "SAY NUMBER 192837465 \"\"\n";
            my $result = <CLIENT>;
            &checkresult($result);
    
            # Ask PBXtra Core to read a number to wait 1 second for a digit
            print STDERR "3.  Testing 'waitdtmf'...";
            print CLIENT "WAIT FOR DIGIT 1000\n"; # Wait 1 sec (1000 ms) for digit
            my $result = <CLIENT>;
            &checkresult($result);
    
            # Ask PBXtra Core to record sound in a file
            print STDERR "4.  Testing 'record'...";
            print CLIENT "RECORD FILE testagi gsm 1234 3000\n";
            my $result = <CLIENT>;
            &checkresult($result);
    
            # Play back the file we recorded
            print STDERR "5.  Testing 'record' playback...";
            print CLIENT "STREAM FILE testagi \"\"\n";
            my $result = <CLIENT>;
            &checkresult($result);
            close(CLIENT);
     
            print STDERR "================== Complete ======================\n";
            print STDERR "$tests tests completed, $pass passed, $fail failed\n";
            print STDERR "==================================================\n";
    }
    

     

     

     

    Compatibility

    The FON interface is 100% interface compatible with FastAGI. You can use any FastAGI development library you wish. The FON Interface for PBXtra Core improves efficiency over AGI, and allows for continued execution of your call menu if you ever have a problem with your FON Interface Script.

     

     

    Languages

    You may write FON Interface Scripts in any language you wish. They must be able to read input on STDIN, write output on STDOUT, and must be able to implement a simple request loop. See the sample script above for a working implementation. Technically speaking the FON Interface Script is a TCP/IP server program. Here are some other programming aids:

    • Erlang
    ErlAst - A multi-threaded FastAGI server written in Erlang which lets you do your call control in Erlang.
    • Python
    StarPy
    • Java
    Asterisk-java FastAGI server allows you to write your AGI scripts in Java.
    Jast Agi
    • Perl
    Asterisk::FastAGI Allows you to easily write FastAGI scripts in Perl.
     

     

    Programming Tips

    Note that each call will occupy your FastAGI server for its duration until you set a context and priority sequence number and exit, allowing the call to continue to flow through your system as indicated. To support multiple callers at once you will want to employ a pre-fork multi-process server or a multi-threaded server to allow multiple calls at once. For Perl, consider the Net::Server::Prefork library.

    If you decide to multi-thread, and you will have a high call volume, be careful. The default stack size is set to 2MB, and you may quickly soak up a lot of memory, and waste a lot of system resources allocating new threads. Consider using a thread pool so you can create all the threads you need at startup.

    NOTE: For performance and stability reasons, please do not consider loading MySQL or any other database engine on the PBXtra server directly. If your application will use a database, then run it on a separate server and connect to it over a socket connection.

     

     

    Environment Variables

    The following environment variables will be available to your FON Interface Script upon execution. Note that the values will be set dynamically based on the channel information on your inbound call.

    • accountcode =
    • callerid = "Fonality" <8773662548>
    • channel = Zap/1-1
    • context = icoming
    • dnid = unknown
    • enhanced = 0.0
    • extension = s
    • language = en
    • network = yes
    • priority = 1
    • rdnis = unknown
    • request = agi://127.0.0.1
    • type = Zap
    • uniqueid = 1096425459.28

     

     

     

    FON Interface API Reference

     

     

    ANSWER

    Purpose Answer channel if not already in answer state.


    Returns -1 on channel failure, or 0 if successful.

     


     

     

     

    AUTOHANGUP <time>

    Purpose Cause the channel to automatically hangup at <time> seconds in the future. If <time> is 0 then the auto-hangup feature is disabled on this channel.


    Returns 0


    Note If the channel is hungup prior to <time> seconds, this setting has no effect.

     


     

     

     

    CHANNEL STATUS [<channelname>]

    Purpose Return the status of the specified channel. If no channel name is specified, return the status of the current channel.


    Returns -1 There is no channel that matches the given <channelname> 0 Channel is down and available 1 Channel is down, but reserved 2 Channel is off hook 3 Digits (or equivalent) have been dialed 4 Line is ringing 5 Remote end is ringing 6 Line is up 7 Line is busy


    Examples CHANNEL STATUS Return the status of the current channel.


    CHANNEL STATUS Zap/9-1 Return the status of channel Zap/9-1


    Note The <channelname> to use is the same as the channel names reported by the Asterisk console 'show channels' command.

     


     

     

     

    EXEC <application> <options>

    Purpose Executes the specified Asterisk <application> with given <options>.


    Returns Whatever the application returns, or -2 on failure to find the application.

    The following list details all of the applications that can be invoked within the PBXtra Core software using the EXEC interface command.

     

     

    AbsoluteTimeout: Set absolute maximum time of call

     
     -- Info about application 'AbsoluteTimeout' -- 
     
     [Synopsis]
     Set absolute maximum time of call
     
     [Description]
       AbsoluteTimeout(seconds): This application will set the absolute maximum
     amount of time permitted for a call. A setting of 0 disables the timeout.
       AbsoluteTimeout has been deprecated in favor of Set(TIMEOUT(absolute)=timeout)
     
    
     

     

    AddQueueMember: Dynamically adds queue members

     
     -- Info about application 'AddQueueMember' -- 
     
     [Synopsis]
     Dynamically adds queue members
     
     [Description]
        AddQueueMember(queuename[|interface[|penalty[|options]]]):
     Dynamically adds interface to an existing queue.
     If the interface is already in the queue and there exists an n+101 priority
     then it will then jump to this priority.  Otherwise it will return an error
     The option string may contain zero or more of the following characters:
            'j' -- jump to +101 priority when appropriate.
       This application sets the following channel variable upon completion:
          AQMSTATUS    The status of the attempt to add a queue member as a 
                          text string, one of
                ADDED | MEMBERALREADY | NOSUCHQUEUE 
     Example: AddQueueMember(techsupport|SIP/3000)
     
    
     

     

    ADSIProg: Load Asterisk ADSI Scripts into phone

     
     -- Info about application 'ADSIProg' -- 
     
     [Synopsis]
     Load Asterisk ADSI Scripts into phone
     
     [Description]
       ADSIProg(script): This application programs an ADSI Phone with the given
     script. If nothing is specified, the default script (asterisk.adsi) is used.
     
    
     

     

    AGI: Executes an AGI compliant application

     
     -- Info about application 'AGI' -- 
     
     [Synopsis]
     Executes an AGI compliant application
     
     [Description]
       [E|Dead]AGI(command|args): Executes an Asterisk Gateway Interface compliant
     program on a channel. AGI allows Asterisk to launch external programs
     written in any language to control a telephony channel, play audio,
     read DTMF digits, etc. by communicating with the AGI protocol on stdin
     and stdout.
     Returns -1 on hangup (except for DeadAGI) or if application requested
      hangup, or 0 on non-hangup exit. 
     Using 'EAGI' provides enhanced AGI, with incoming audio available out of band
     on file descriptor 3
     
     Use the CLI command 'show agi' to list available agi commands
     
    
     

     

    AlarmReceiver: Provide support for receving alarm reports from a burglar or fire alarm panel

     
     -- Info about application 'AlarmReceiver' -- 
     
     [Synopsis]
     Provide support for receving alarm reports from a burglar or fire alarm panel
     
     [Description]
       AlarmReceiver(): Only 1 signalling format is supported at this time: Ademco
     Contact ID. This application should be called whenever there is an alarm
     panel calling in to dump its events. The application will handshake with the
     alarm panel, and receive events, validate them, handshake them, and store them
     until the panel hangs up. Once the panel hangs up, the application will run the
     system command specified by the eventcmd setting in alarmreceiver.conf and pipe
     the events to the standard input of the application. The configuration file also
     contains settings for DTMF timing, and for the loudness of the acknowledgement
     tones.
     
    
     

     

    Answer: Answer a channel if ringing

     
     -- Info about application 'Answer' -- 
     
     [Synopsis]
     Answer a channel if ringing
     
     [Description]
       Answer([delay]): If the call has not been answered, this application will
     answer it. Otherwise, it has no effect on the call. If a delay is specified,
     Asterisk will wait this number of milliseconds before answering the call.
     
    
     

     

    AppendCDRUserField: Append to the CDR user field

     
     -- Info about application 'AppendCDRUserField' -- 
     
     [Synopsis]
     Append to the CDR user field
     
     [Description]
     [Synopsis]
     AppendCDRUserField(value)
     
     [Description]
     AppendCDRUserField(value): Append value to the CDR user field
            The Call Data Record (CDR) user field is an extra field you
            can use for data not stored anywhere else in the record.
            CDR records can be used for billing or storing other arbitrary data
            (I.E. telephone survey responses)
            Also see SetCDRUserField().
     
    
     

     

    Authenticate: Authenticate a user

     
     -- Info about application 'Authenticate' -- 
     
     [Synopsis]
     Authenticate a user
     
     [Description]
       Authenticate(password[|options]): This application asks the caller to enter a
     given password in order to continue dialplan execution. If the password begins
     with the '/' character, it is interpreted as a file which contains a list of
     valid passwords, listed 1 password per line in the file.
       When using a database key, the value associated with the key can be anything.
     Users have three attempts to authenticate before the channel is hung up. If the
     passsword is invalid, the 'j' option is specified, and priority n+101 exists,
     dialplan execution will continnue at this location.
       Options:
          a - Set the channels' account code to the password that is entered
          d - Interpret the given path as database key, not a literal file
          j - Support jumping to n+101 if authentication fails
          m - Interpret the given path as a file which contains a list of account
              codes and password hashes delimited with ':', listed one per line in
              the file. When one of the passwords is matched, the channel will have
              its account code set to the corresponding account code in the file.
          r - Remove the database key upon successful entry (valid with 'd' only)
     
    
     

     

    BackGround: Play a file while awaiting extension

     
     -- Info about application 'BackGround' -- 
     
     [Synopsis]
     Play a file while awaiting extension
     
     [Description]
       Background(filename1[&filename2...][|options[|langoverride][|context]]):
     This application will play the given list of files while waiting for an
     extension to be dialed by the calling channel. To continue waiting for digits
     after this application has finished playing files, the WaitExten application
     should be used. The 'langoverride' option explicity specifies which language
     to attempt to use for the requested sound files. If a 'context' is specified,
     this is the dialplan context that this application will use when exiting to a
     dialed extension.  If one of the requested sound files does not exist, call
    processing will be
     terminated.
       Options:
         s - causes the playback of the message to be skipped
               if the channel is not in the 'up' state (i.e. it
               hasn't been answered yet.) If this happens, the
               application will return immediately.
         n - don't answer the channel before playing the files
         m - only break if a digit hit matches a one digit
               extension in the destination context
     
    
     

     

    BackgroundDetect: Background a file with talk detect

     
     -- Info about application 'BackgroundDetect' -- 
     
     [Synopsis]
     Background a file with talk detect
     
     [Description]
       BackgroundDetect(filename[|sil[|min|[max]]]):  Plays  back  a  given
     filename, waiting for interruption from a given digit (the digit must
     start the beginning of a valid extension, or it will be ignored).
     During the playback of the file, audio is monitored in the receive
     direction, and if a period of non-silence which is greater than 'min' ms
     yet less than 'max' ms is followed by silence for at least 'sil' ms then
     the audio playback is aborted and processing jumps to the 'talk' extension
     if available.  If unspecified, sil, min, and max default to 1000, 100, and
     infinity respectively.
     
    
     

     

    Busy: Indicate the Busy condition

     
     -- Info about application 'Busy' -- 
     
     [Synopsis]
     Indicate the Busy condition
     
     [Description]
       Busy([timeout]): This application will indicate the busy condition to
     the calling channel. If the optional timeout is specified, the calling channel
     will be hung up after the specified number of seconds. Otherwise, this
     application will wait until the calling channel hangs up.
     
    
     

     

    ChangeMonitor: Change monitoring filename of a channel

     
     -- Info about application 'ChangeMonitor' -- 
     
     [Synopsis]
     Change monitoring filename of a channel
     
     [Description]
     ChangeMonitor(filename_base)
     Changes monitoring filename of a channel. Has no effect if the channel is not
    monitored
     The argument is the new filename base to use for monitoring this channel.
     
    
     

     

    ChanInUse: Checks to see if channel is in use

     -= Info about application 'ChanInUse' =-
    
      [Synopsis]
      Checks to see if channel is on a call.
    
      [Description]
        ChanInUse(Location[|[!]Context]):
            Checks to see if the specific channel is on a call, or optionally
            on a call in a specific Context.
            If Context is negated with "!", checks if the channel is on a call
            *not* in the specified Context.
            Jumps to n+101 priority if it is on a call as specified.
            Returns -1 if there is an error.
            Example: ChanInUse(SIP/0004F2123456|neoagent)
    
     

     

    ChanIsAvail: Check channel availability

     
     -- Info about application 'ChanIsAvail' -- 
     
     [Synopsis]
     Check channel availability
     
     [Description]
       ChanIsAvail(Technology/resource[&Technology2/resource2...][|options]): 
     This application will check to see if any of the specified channels are
     available. The following variables will be set by this application:
       ${AVAILCHAN}     - the name of the available channel, if one exists
       ${AVAILORIGCHAN} - the canonical channel name that was used to create the channel
       ${AVAILSTATUS}   - the status code for the available channel
       Options:
         s - Consider the channel unavailable if the channel is in use at all
         j - Support jumping to priority n+101 if no channel is available
     
    
    [dit]

     

    ChanSpy: Listen to the audio of an active channel

     
     -- Info about application 'ChanSpy' -- 
     
     [Synopsis]
     Listen to the audio of an active channel
     
     
     [Description]
       ChanSpy([chanprefix][|options]): This application is used to listen to the
     audio from an active Asterisk channel. This includes the audio coming in and
     out of the channel being spied on. If the 'chanprefix' parameter is specified,
     only channels beginning with this string will be spied upon.
       While Spying, the following actions may be performed:
         - Dialing # cycles the volume level.
         - Dialing * will stop spying and look for another channel to spy on.
         - Dialing a series of digits followed by # builds a channel name to append
           to 'chanprefix'. For example, executing ChanSpy(Agent) and then dialing
           the digits '1234#' while spying will begin spying on the channel,
           'Agent/1234'.
       Options:
         b - Only spy on channels involved in a bridged call.
         g(grp) - Match only channels where their ${SPYGROUP} variable is set to
                  'grp'.
         q - Don't play a beep when beginning to spy on a channel.
         r[(basename)] - Record the session to the monitor spool directory. An
                         optional base for the filename may be specified. The
                         default is 'chanspy'.
         v([value]) - Adjust the initial volume in the range from -4 to 4. A
                      negative value refers to a quieter setting.
     
    
     

     

    CheckGroup: Check the channel count of a group against a limit

     
     -- Info about application 'CheckGroup' -- 
     
     [Synopsis]
     Check the channel count of a group against a limit
     
     [Description]
     Usage: CheckGroup(max[@category][|options])
       Checks that the current number of total channels in the
     current channel's group does not exceed 'max'.  If the number
     does not exceed 'max', we continue to the next step. 
      The option string may contain zero of the following character:
             'j' -- jump to n+101 priority if the number does in fact exceed max,
                   and priority n+101 exists. Execuation then continues at that
                    step, otherwise -1 is returned.
      This application sets the following channel variable upon successful completion:
             CHECKGROUPSTATUS  The status of the check that the current channel's
                               group does not exceed 'max'. It's value is one of
                     OK | OVERMAX 
     
    
     

     

    Congestion: Indicate the Congestion condition

     
     -- Info about application 'Congestion' -- 
     
     [Synopsis]
     Indicate the Congestion condition
     
     [Description]
       Congestion([timeout]): This application will indicate the congenstion
     condition to the calling channel. If the optional timeout is specified, the
     calling channel will be hung up after the specified number of seconds.
     Otherwise, this application will wait until the calling channel hangs up.
     
    
     

     

    ControlPlayback: Play a file with fast forward and rewind

     
     -- Info about application 'ControlPlayback' -- 
     
     [Synopsis]
     Play a file with fast forward and rewind
     
     [Description]
       ControlPlayback(file[|skipms[|ff[|rew[|stop[|pause[|restart|options]]]]]]]):
     This application will play back the given filename. By default, the '*' key
     can be used to rewind, and the '#' key can be used to fast-forward.
     Parameters:
       skipms  - This is number of milliseconds to skip when rewinding or
                 fast-forwarding.
       ff      - Fast-forward when this DTMF digit is received.
       rew     - Rewind when this DTMF digit is received.
       stop    - Stop playback when this DTMF digit is received.
       pause   - Pause playback when this DTMF digit is received.
       restart - Restart playback when this DTMF digit is received.
     Options:
       j - Jump to priority n+101 if the requested file is not found.
     This application sets the following channel variable upon completion:
       CPLAYBACKSTATUS -  This variable contains the status of the attempt as a text
                          string, one of: SUCCESS | USERSTOPPED | ERROR
     
    
     

     

    Curl: Load an external URL

     
     -- Info about application 'Curl' -- 
     
     [Synopsis]
     Load an external URL
     
     [Description]
       Curl(URL[|postdata]): This application will request the specified URL.
     It is mainly used for signalling external applications of an event.
     Parameters:
       URL      - This is the external URL to request.
       postdata - This information will be treated as POST data.
     This application will set the following variable:
       CURL - This variable will contain the resulting page.
     This application has been deprecated in favor of the CURL function.
     
    
     

     

    Cut: Splits a variable's contents using the specified delimiter

     
     -- Info about application 'Cut' -- 
     
     [Synopsis]
     Splits a variable's contents using the specified delimiter
     
     [Description]
       Cut(newvar=varname,delimiter,fieldspec): This applicaiton will split the
     contents of a variable based on the given delimeter and store the result in
     a new variable.
     Parameters:
       newvar    - new variable created from result string
       varname   - variable you want cut
       delimiter - defaults to '-'
       fieldspec - number of the field you want (1-based offset)
                   may also be specified as a range (with -)
                   or group of ranges and fields (with &)
     This application has been deprecated in favor of the CUT function.
     
    
     

     

    DateTime: Says a specified time in a custom format

     
     -- Info about application 'DateTime' -- 
     
     [Synopsis]
     Says a specified time in a custom format
     
     [Description]
     DateTime([unixtime][|[timezone][|format]])
       unixtime: time, in seconds since Jan 1, 1970.  May be negative.
                   defaults to now.
       timezone: timezone, see /usr/share/zoneinfo for a list.
                   defaults to machine default.
       format:   a format the time is to be said in.  See voicemail.conf.
                   defaults to "ABdY 'digits/at' IMp"
     
    
     

     

    DBdel: Delete a key from the database

     
     -- Info about application 'DBdel' -- 
     
     [Synopsis]
     Delete a key from the database
     
     [Description]
       DBdel(family/key): This applicaiton will delete a key from the Asterisk
     database.
     
    
     

     

    DBdeltree: Delete a family or keytree from the database

     
     -- Info about application 'DBdeltree' -- 
     
     [Synopsis]
     Delete a family or keytree from the database
     
     [Description]
       DBdeltree(family[/keytree]): This application will delete a family or keytree
     from the Asterisk database
     
    
     

     

    DBget: Retrieve a value from the database

     
     -- Info about application 'DBget' -- 
     
     [Synopsis]
     Retrieve a value from the database
     
     [Description]
       DBget(varname=family/key[|options]): This application will retrieve a value
     from the Asterisk database and store it in the given variable.
       Options:
         j - Jump to priority n+101 if the requested family/key isn't found.
       This application sets the following channel variable upon completion:
         DBGETSTATUS - This variable will contain the status of the attempt
                       FOUND | NOTFOUND 
       This application has been deprecated in favor of the DB function.
     
    
     

     

    DBput: Store a value in the database

     
     -- Info about application 'DBput' -- 
     
     [Synopsis]
     Store a value in the database
     
     [Description]
       DBput(family/key=value): This application will store the given value in the
     specified location in the Asterisk database.
       This application has been deprecated in favor of the DB function.
     
    
     

     

    DeadAGI: Executes AGI on a hungup channel

     
     -- Info about application 'DeadAGI' -- 
     
     [Synopsis]
     Executes AGI on a hungup channel
     
     [Description]
       [E|Dead]AGI(command|args): Executes an Asterisk Gateway Interface compliant
     program on a channel. AGI allows Asterisk to launch external programs
     written in any language to control a telephony channel, play audio,
     read DTMF digits, etc. by communicating with the AGI protocol on stdin
     and stdout.
     Returns -1 on hangup (except for DeadAGI) or if application requested
      hangup, or 0 on non-hangup exit. 
     Using 'EAGI' provides enhanced AGI, with incoming audio available out of band
     on file descriptor 3
     
     Use the CLI command 'show agi' to list available agi commands
     ]

     

    Dial: Place a call and connect to the current channel

     
     -- Info about application 'Dial' -- 
     
     [Synopsis]
     Place a call and connect to the current channel
     
     [Description]
       Dial(Technology/resource[&Tech2/resource2...][|timeout][|options][|URL]):
     This applicaiton will place calls to one or more specified channels. As soon
     as one of the requested channels answers, the originating channel will be
     answered, if it has not already been answered. These two channels will then
     be active in a bridged call. All other channels that were requested will then
     be hung up.
       Unless there is a timeout specified, the Dial application will wait
     indefinitely until one of the called channels answers, the user hangs up, or
     if all of the called channels are busy or unavailable. Dialplan executing will
     continue if no requested channels can be called, or if the timeout expires.
     
       This application sets the following channel variables upon completion:
         DIALEDTIME   - This is the time from dialing a channel until when it
                        is disconnected.
         ANSWEREDTIME - This is the amount of time for actual call.
         DIALSTATUS   - This is the status of the call:
                        CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL
                        DONTCALL | TORTURE
       For the Privacy and Screening Modes, the DIALSTATUS variable will be set to
     DONTCALL if the called party chooses to send the calling party to the 'Go Away'
     script. The DIALSTATUS variable will be set to TORTURE if the called party
     wants to send the caller to the 'torture' script.
       This application will report normal termination if the originating channel
     hangs up, or if the call is bridged and either of the parties in the bridge
     ends the call.
       The optional URL will be sent to the called party if the channel supports it.
       If the OUTBOUND_GROUP variable is set, all peer channels created by this
     application will be put into that group (as in Set(GROUP()=...).
     
       Options:
         A(x) - Play an announcement to the called party, using 'x' as the file.
         C    - Reset the CDR for this call.
         d    - Allow the calling user to dial a 1 digit extension while waiting for
                a call to be answered. Exit to that extension if it exists in the
                current context, or the context defined in the EXITCONTEXT variable,
                if it exists.
         D([called][:calling]) - Send the specified DTMF strings *after* the called
                party has answered, but before the call gets bridged. The 'called'
                DTMF string is sent to the called party, and the 'calling' DTMF
                string is sent to the calling party. Both parameters can be used
                alone.
         f    - Force the callerid of the *calling* channel to be set as the
                extension associated with the channel using a dialplan 'hint'.
                For example, some PSTNs do not allow CallerID to be set to anything
                other than the number assigned to the caller.
         g    - Proceed with dialplan execution at the current extension if the
                destination channel hangs up.
         G(context^exten^pri) - If the call is answered, transfer the calling party to
                the specified priority and the called party to the specified priority+1.
                Optionally, an extension, or extension and context may be specified. 
                Otherwise, the current extension is used. You cannot use any additional
                action post answer options in conjunction with this option.
         h    - Allow the called party to hang up by sending the '*' DTMF digit.
         H    - Allow the calling party to hang up by hitting the '*' DTMF digit.
         j    - Jump to priority n+101 if all of the requested channels were busy.
         L(x[:y][:z]) - Limit the call to 'x' ms. Play a warning when 'y' ms are
                left. Repeat the warning every 'z' ms. The following special
                variables can be used with this option:
                * LIMIT_PLAYAUDIO_CALLER   yes|no (default yes)
                                           Play sounds to the caller.
                * LIMIT_PLAYAUDIO_CALLEE   yes|no
                                           Play sounds to the callee.
                * LIMIT_TIMEOUT_FILE       File to play when time is up.
                * LIMIT_CONNECT_FILE       File to play when call begins.
                * LIMIT_WARNING_FILE       File to play as warning if 'y' is defined.
                                           The default is to say the time remaining.
         m([class]) - Provide hold music to the calling party until a requested
                channel answers. A specific MusicOnHold class can be
                specified.
         M(x[^arg]) - Execute the Macro for the *called* channel before connecting
                to the calling channel. Arguments can be specified to the Macro
                using '^' as a delimeter. The Macro can set the variable
                MACRO_RESULT to specify the following actions after the Macro is
                finished executing.
                * ABORT        Hangup both legs of the call.
                * CONGESTION   Behave as if line congestion was encountered.
                * BUSY         Behave as if a busy signal was encountered. This will also
                               have the application jump to priority n+101 if the
                               'j' option is set.
                * CONTINUE     Hangup the called party and allow the calling party
                               to continue dialplan execution at the next priority.
                * GOTO:<context>^<exten>^<priority> - Transfer the call to the
                               specified priority. Optionally, an extension, or
                               extension and priority can be specified.
                You cannot use any additional action post answer options in conjunction
                with this option.
         n    - This option is a modifier for the screen/privacy mode. It specifies
                that no introductions are to be saved in the priv-callerintros
                directory.
         N    - This option is a modifier for the screen/privacy mode. It specifies
                that if callerID is present, do not screen the call.
         o    - Specify that the CallerID that was present on the *calling* channel
                be set as the CallerID on the *called* channel. This was the
                behavior of Asterisk 1.0 and earlier.
         p    - This option enables screening mode. This is basically Privacy mode
                without memory.
         P([x]) - Enable privacy mode. Use 'x' as the family/key in the database if
                it is provided. The current extension is used if a database
                family/key is not specified.
         r    - Indicate ringing to the calling party. Pass no audio to the calling
                party until the called channel has answered.
         S(x) - Hang up the call after 'x' seconds *after* the called party has
                answered the call.
         t    - Allow the called party to transfer the calling party by sending the
                DTMF sequence defined in features.conf.
         T    - Allow the calling party to transfer the called party by sending the
                DTMF sequence defined in features.conf.
         w    - Allow the called party to enable recording of the call by sending
                the DTMF sequence defined for one-touch recording in features.conf.
         W    - Allow the calling party to enable recording of the call by sending
                the DTMF sequence defined for one-touch recording in features.conf.
     
    
     

     

    Dictate: Virtual Dictation Machine

     
     -- Info about application 'Dictate' -- 
     
     [Synopsis]
     Virtual Dictation Machine
     
     [Description]
       Dictate([<base_dir>])
     Start dictation machine using optional base dir for files.
     
    
     

     

    DigitTimeout: Set maximum timeout between digits

     
     -- Info about application 'DigitTimeout' -- 
     
     [Synopsis]
     Set maximum timeout between digits
     
     [Description]
       DigitTimeout(seconds): Set the maximum amount of time permitted between
     digits when the user is typing in an extension. When this timeout expires,
     after the user has started to type in an extension, the extension will be
     considered complete, and will be interpreted. Note that if an extension
     typed in is valid, it will not have to timeout to be tested, so typically
     at the expiry of this timeout, the extension will be considered invalid
     (and thus control would be passed to the 'i' extension, or if it doesn't
     exist the call would be terminated). The default timeout is 5 seconds.
       DigitTimeout has been deprecated in favor of Set(TIMEOUT(digit)=timeout)
     
    
     

     

    Directory: Provide directory of voicemail extensions

     
     -- Info about application 'Directory' -- 
     
     [Synopsis]
     Provide directory of voicemail extensions
     
     [Description]
       Directory(vm-context[|dial-context[|options]]): This application will present
     the calling channel with a directory of extensions from which they can search
     by name. The list of names and corresponding extensions is retrieved from the
     voicemail configuration file, voicemail.conf.
       This applicaiton will immediate exit if one of the following DTMF digits are
     received and the extension to jump to exists:
         0 - Jump to the 'o' extension, if it exists.
         * - Jump to the 'a' extension, if it exists.
     
       Parameters:
         vm-context   - This is the context within voicemail.conf to use for the
                        Directory.
         dial-context - This is the dialplan context to use when looking for an
                        extension that the user has selected, or when jumping to the
                        'o' or 'a' extension.
     
       Options:
         f - Allow the caller to enter the first name of a user in the directory
             instead of using the last name.
     
    
     

     

    DISA: DISA (Direct Inward System Access)

     
     -- Info about application 'DISA' -- 
     
     [Synopsis]
     DISA (Direct Inward System Access)
     
     [Description]
     DISA(<numeric passcode>[|<context>]) or disa(<filename>)
     The DISA, Direct Inward System Access, application allows someone from 
     outside the telephone switch (PBX) to obtain an "internal" system 
     dialtone and to place calls from it as if they were placing a call from 
     within the switch.
     DISA plays a dialtone. The user enters their numeric passcode, followed by
     the pound sign (#). If the passcode is correct, the user is then given
     system dialtone on which a call may be placed. Obviously, this type
     of access has SERIOUS security implications, and GREAT care must be
     taken NOT to compromise your security.
     
     There is a possibility of accessing DISA without password. Simply
     exchange your password with "no-password".
     
         Example: exten => s,1,DISA(no-password|local)
     
     Be aware that using this compromises the security of your PBX.
     
     The arguments to this application (in extensions.conf) allow either
     specification of a single global passcode (that everyone uses), or
     individual passcodes contained in a file. It also allow specification
     of the context on which the user will be dialing. If no context is
     specified, the DISA application defaults the context to "disa".
     Presumably a normal system will have a special context set up
     for DISA use with some or a lot of restrictions. 
     
     The file that contains the passcodes (if used) allows specification
     of either just a passcode (defaulting to the "disa" context, or
     passcode|context on each line of the file. The file may contain blank
     lines, or comments starting with "#" or ";". In addition, the
     above arguments may have |new-callerid-string appended to them, to
     specify a new (different) callerid to be used for this call, for
     example: numeric-passcode|context|"My Phone" <(234) 123-4567> or 
     full-pathname-of-passcode-file|"My Phone" <(234) 123-4567>.  Last
     but not least, |mailbox[@context] may be appended, which will cause
     a stutter-dialtone (indication "dialrecall") to be used, if the
     specified mailbox contains any new messages, for example:
     numeric-passcode|context||1234 (w/a changing callerid).  Note that
     in the case of specifying the numeric-passcode, the context must be
     specified if the callerid is specified also.
     
     If login is successful, the application looks up the dialed number in
     the specified (or default) context, and executes it if found.
     If the user enters an invalid extension and extension "i" (invalid) 
     exists in the context, it will be used.
     
    
     

     

    DumpChan: Dump Info About The Calling Channel

     
     -- Info about application 'DumpChan' -- 
     
     [Synopsis]
     Dump Info About The Calling Channel
     
     [Description]
        DumpChan([<min_verbose_level>])
     Displays information on channel and listing of all channel
     variables. If min_verbose_level is specified, output is only
     displayed when the verbose level is currently set to that number
     or greater. 
     
    
     

     

    DUNDiLookup: Look up a number with DUNDi

     
     -- Info about application 'DUNDiLookup' -- 
     
     [Synopsis]
     Look up a number with DUNDi
     
     [Description]
     DUNDiLookup(number[|context[|options]])
           Looks up a given number in the global context specified or in
     the reserved 'e164' context if not specified.  Returns -1 if the channel
     is hungup during the lookup or 0 otherwise.  On completion, the variable
     ${DUNDTECH} and ${DUNDDEST} will contain the technology and destination
     of the appropriate technology and destination to access the number. If no
     answer was found, and the priority n + 101 exists, execution will continue
     at that location. Note that this will only occur if the global priority
     jumping option is enabled in extensions.conf. If the 'b' option is specified,
     the internal DUNDi cache will by bypassed.
     
    
     

     

    EAGI: Executes an EAGI compliant application

     
     -- Info about application 'EAGI' -- 
     
     [Synopsis]
     Executes an EAGI compliant application
     
     [Description]
       [E|Dead]AGI(command|args): Executes an Asterisk Gateway Interface compliant
     program on a channel. AGI allows Asterisk to launch external programs
     written in any language to control a telephony channel, play audio,
     read DTMF digits, etc. by communicating with the AGI protocol on stdin
     and stdout.
     Returns -1 on hangup (except for DeadAGI) or if application requested
      hangup, or 0 on non-hangup exit. 
     Using 'EAGI' provides enhanced AGI, with incoming audio available out of band
     on file descriptor 3
     
     Use the CLI command 'show agi' to list available agi commands
     
    
     

     

    Echo: Echo audio read back to the user

     
     -- Info about application 'Echo' -- 
     
     [Synopsis]
     Echo audio read back to the user
     
     [Description]
       Echo():  Echo audio read from channel back to the channel. 
     User can exit the application by either pressing the '#' key, 
     or hanging up.
     
    
     

     

    EndWhile: End A While Loop

     
     -- Info about application 'EndWhile' -- 
     
     [Synopsis]
     End A While Loop
     
     [Description]
     Usage:  EndWhile()
     Return to the previous called While
     
     
    
     

     

    EnumLookup: Lookup number in ENUM

     
     -- Info about application 'EnumLookup' -- 
     
     [Synopsis]
     Lookup number in ENUM
     
     [Description]
       EnumLookup(exten[|option]):  Looks up an extension via ENUM and sets
     the variable 'ENUM'. For VoIP URIs this variable will 
     look like 'TECHNOLOGY/URI' with the appropriate technology.
     Currently, the enumservices SIP, H323, IAX, IAX2 and TEL are recognized. 
     
     Returns status in the ENUMSTATUS channel variable:
         ERROR        Failed to do a lookup
         <tech>        Technology of the successful lookup: SIP, H323, IAX, IAX2 or TEL
         BADURI        Got URI Asterisk does not understand.
       The option string may contain zero or the following character:
            'j' -- jump to +101 priority if the lookup isn't successful.
                    and jump to +51 priority on a TEL entry.
     
    
     

     

    Eval: Evaluates a string

     
     -- Info about application 'Eval' -- 
     
     [Synopsis]
     Evaluates a string
     
     [Description]
     Usage: Eval(newvar=somestring)
       Normally Asterisk evaluates variables inline.  But what if you want to
     store variable offsets in a database, to be evaluated later?  Eval is
     the answer, by allowing a string to be evaluated twice in the dialplan,
     the first time as part of the normal dialplan, and the second using Eval.
     
    
     

     

    Exec: Executes internal application

     
     -- Info about application 'Exec' -- 
     
     [Synopsis]
     Executes internal application
     
     [Description]
     Usage: Exec(appname(arguments))
       Allows an arbitrary application to be invoked even when not
     hardcoded into the dialplan. To invoke external applications
     see the application System. Returns whatever value the
     app returns or a non-zero value if the app cannot be found.
     
    
     

     

    ExecIf: Conditional exec

     
     -- Info about application 'ExecIf' -- 
     
     [Synopsis]
     Conditional exec
     
     [Description]
     Usage:  ExecIF (<expr>|<app>|<data>)
     If <expr> is true, execute and return the result of <app>(<data>).
     If <expr> is true, but <app> is not found, then the application
     will return a non-zero value.
    
     

     

    ExecIfTime: Conditional application execution based on the current time

     
     -- Info about application 'ExecIfTime' -- 
     
     [Synopsis]
     Conditional application execution based on the current time
     
     [Description]
       ExecIfTime(<times>|<weekdays>|<mdays>|<months>?appname[|appargs]):
     This application will execute the specified dialplan application, with optional
     arguments, if the current time matches the given time specification. Further
     information on the time speicification can be found in examples illustrating
     how to do time-based context includes in the dialplan.
     
    
     

     

    ExternalIVR: Interfaces with an external IVR application

     
     -- Info about application 'ExternalIVR' -- 
     
     [Synopsis]
     Interfaces with an external IVR application
     
     [Description]
       ExternalIVR(command[|arg[|arg...]]): Forks an process to run the supplied command,
     and starts a generator on the channel. The generator's play list is
     controlled by the external application, which can add and clear entries
     via simple commands issued over its stdout. The external application
     will receive all DTMF events received on the channel, and notification
     if the channel is hung up. The application will not be forcibly terminated
     when the channel is hung up.
     See doc/README.externalivr for a protocol specification.
     
    
     

     

    Festival: Say text to the user

     
     -- Info about application 'Festival' -- 
     
     [Synopsis]
     Say text to the user
     
     [Description]
       Festival(text[|intkeys]):  Connect to Festival, send the argument, get back the
    waveform,play it to the user, allowing any given interrupt keys to immediately
    terminate and return
     the value, or 'any' to allow any number back (useful in dialplan)
     
    
     

     

    Flash: Flashes a Zap Trunk

     
     -- Info about application 'Flash' -- 
     
     [Synopsis]
     Flashes a Zap Trunk
     
     [Description]
       Flash(): Sends a flash on a zap trunk.  This is only a hack for
     people who want to perform transfers and such via AGI and is generally
     quite useless oths application will only work on Zap trunks.
     
    
     

     

    FlushQueueStats: Flushes stats for specified queue

     
     -- Info about application 'FlushQueueStats' -- 
     
     [Synopsis]
     Flushes stats for specified queue
     
     [Description]
       FlushQueueStats(queuename):
     Flushes the stats for specified queue.
     Returns -1 if there is an error.
     Example: FlushQueueStats(techsupport)
     
    
     

     

    ForkCDR: Forks the Call Data Record

     
     -- Info about application 'ForkCDR' -- 
     
     [Synopsis]
     Forks the Call Data Record
     
     [Description]
       ForkCDR([options]):  Causes the Call Data Record to fork an additional
     cdr record starting from the time of the fork call
     If the option 'v' is passed all cdr variables will be passed along also.
     
    
     

     

    GetCPEID: Get ADSI CPE ID

     
     -- Info about application 'GetCPEID' -- 
     
     [Synopsis]
     Get ADSI CPE ID
     
     [Description]
       GetCPEID: Obtains and displays ADSI CPE ID and other information in order
     to properly setup zapata.conf for on-hook operations.
     
    
     

     

    GetGroupCount: Get the channel count of a group

     
     -- Info about application 'GetGroupCount' -- 
     
     [Synopsis]
     Get the channel count of a group
     
     [Description]
     Usage: GetGroupCount([groupname][@category])
       Calculates the group count for the specified group, or uses
     the current channel's group if not specifed (and non-empty).
     Stores result in GROUPCOUNT. 
     Note: This application has been deprecated, please use the function
     GROUP_COUNT.
     
    
     

     

    GetGroupMatchCount: Get the channel count of all groups that match a pattern

     
     -- Info about application 'GetGroupMatchCount' -- 
     
     [Synopsis]
     Get the channel count of all groups that match a pattern
     
     [Description]
     Usage: GetGroupMatchCount(groupmatch[@category])
       Calculates the group count for all groups that match the specified
     pattern. Uses standard regular expression matching (see regex(7)).
     Stores result in GROUPCOUNT.  Always returns 0.
     Note: This application has been deprecated, please use the function
     GROUP_MATCH_COUNT.
     
    
     

     

    Gosub: Jump to label, saving return address

     
     -- Info about application 'Gosub' -- 
     
     [Synopsis]
     Jump to label, saving return address
     
     [Description]
     Gosub([[context|]exten|]priority)
       Jumps to the label specified, saving the return address.
     
    
     

     

    GosubIf: Jump to label, saving return address

     
     -- Info about application 'GosubIf' -- 
     
     [Synopsis]
     Jump to label, saving return address
     
     [Description]
     GosubIf(condition?labeliftrue[:labeliffalse])
       If the condition is true, then jump to labeliftrue.  If false, jumps to
     labeliffalse, if specified.  In either case, a jump saves the return point
     in the dialplan, to be returned to with a Return.
     
    
     

     

    Goto: Jump to a particular priority, extension, or context

     
     -- Info about application 'Goto' -- 
     
     [Synopsis]
     Jump to a particular priority, extension, or context
     
     [Description]
       Goto([[context|]extension|]priority): This application will cause the
     calling channel to continue dialplan execution at the specified priority.
     If no specific extension, or extension and context, are specified, then this
     application will jump to the specified priority of the current extension.
       If the attempt to jump to another location in the dialplan is not successful,
     then the channel will continue at the next priority of the current extension.
     
    
     

     

    GotoIf: Conditional goto

     
     -- Info about application 'GotoIf' -- 
     
     [Synopsis]
     Conditional goto
     
     [Description]
       GotoIf(condition?[labeliftrue]:[labeliffalse]): This application will cause
     the calling channel to jump to the specified location in the dialplan based on
     the evaluation of the given condition. The channel will continue at
     'labeliftrue' if the condition is true, or 'labeliffalse' if the condition is
     false. The labels are specified with the same syntax as used within the Goto
     application.  If the label chosen by the condition is omitted, no jump is
     performed, but execution continues with the next priority in the dialplan.
     
    
     

     

    GotoIfTime: Conditional Goto based on the current time

     
     -- Info about application 'GotoIfTime' -- 
     
     [Synopsis]
     Conditional Goto based on the current time
     
     [Description]
       GotoIfTime(<times>|<weekdays>|<mdays>|<months>?[[context|]exten|]priority):
     This application will have the calling channel jump to the speicified location
     int the dialplan if the current time matches the given time specification.
     Further information on the time specification can be found in examples
     illustrating how to do time-based context includes in the dialplan.
     
    
     

     

    Hangup: Hang up the calling channel

     
     -- Info about application 'Hangup' -- 
     
     [Synopsis]
     Hang up the calling channel
     
     [Description]
       Hangup(): This application will hang up the calling channel.
     
    
     

     

    HasNewVoicemail: Conditionally branches to priority + 101 with the right options set

     
     -- Info about application 'HasNewVoicemail' -- 
     
     [Synopsis]
     Conditionally branches to priority + 101 with the right options set
     
     [Description]
     HasNewVoicemail(vmbox[/folder][@context][|varname[|options]])
     Assumes folder 'INBOX' if folder is not specified. Optionally sets <varname> to the
    number of messages
     in that folder.
       The option string may contain zero of the following character:
             'j' -- jump to priority n+101, if there is new voicemail in folder 'folder' or INBOX
       This application sets the following channel variable upon completion:
             HASVMSTATUS                The result of the new voicemail check returned as a text string as
    follows
                     <# of messages in the folder, 0 for NONE>
     
    
     

     

    HasVoicemail: Conditionally branches to priority + 101 with the right options set

     
     -- Info about application 'HasVoicemail' -- 
     
     [Synopsis]
     Conditionally branches to priority + 101 with the right options set
     
     [Description]
     HasVoicemail(vmbox[/folder][@context][|varname[|options]])
       Optionally sets <varname> to the number of messages in that folder.  Assumes
    folder of INBOX if not specified.
       The option string may contain zero or the following character:
             'j' -- jump to priority n+101, if there is voicemail in the folder indicated.
       This application sets the following channel variable upon completion:
             HASVMSTATUS                The result of the voicemail check returned as a text string as follows
                     <# of messages in the folder, 0 for NONE>
     
    
     

     

    IAX2Provision: Provision a calling IAXy with a given template

     
     -- Info about application 'IAX2Provision' -- 
     
     [Synopsis]
     Provision a calling IAXy with a given template
     
     [Description]
       IAX2Provision([template]): Provisions the calling IAXy (assuming
     the calling entity is in fact an IAXy) with the given template or
     default if one is not specified.  Returns -1 on error or 0 on success.
     
    
     

     

    ICES: Encode and stream using 'ices'

     
     -- Info about application 'ICES' -- 
     
     [Synopsis]
     Encode and stream using 'ices'
     
     [Description]
       ICES(config.xml) Streams to an icecast server using ices
     (available separately).  A configuration file must be supplied
     for ices (see examples/asterisk-ices.conf). 
     
    
     

     

    ImportVar: Import a variable from a channel into a new variable

     
     -- Info about application 'ImportVar' -- 
     
     [Synopsis]
     Import a variable from a channel into a new variable
     
     [Description]
       ImportVar(newvar=channelname|variable): This application imports a variable
     from the specified channel (as opposed to the current one) and stores it as
     a variable in the current channel (the channel that is calling this
     application). Variables created by this application have the same inheritance
     properties as those created with the Set application. See the documentation for
     Set for more information.
     
    
     

     

    LookupBlacklist: Look up Caller*ID name/number from blacklist database

     
     -- Info about application 'LookupBlacklist' -- 
     
     [Synopsis]
     Look up Caller*ID name/number from blacklist database
     
     [Description]
       LookupBlacklist(options): Looks up the Caller*ID number on the active
     channel in the Asterisk database (family 'blacklist').  
     The option string may contain the following character:
             'j' -- jump to n+101 priority if the number/name is found in the blacklist
     This application sets the following channel variable upon completion:
             LOOKUPBLSTATUS                The status of the Blacklist lookup as a text string, one of
                     FOUND | NOTFOUND
     Example: exten => 1234,1,LookupBlacklist()
     
    
     

     

    LookupCIDName: Look up CallerID Name from local database

     
     -- Info about application 'LookupCIDName' -- 
     
     [Synopsis]
     Look up CallerID Name from local database
     
     [Description]
       LookupCIDName: Looks up the Caller*ID number on the active
     channel in the Asterisk database (family 'cidname') and sets the
     Caller*ID name.  Does nothing if no Caller*ID was received on the
     channel.  This is useful if you do not subscribe to Caller*ID
     name delivery, or if you want to change the names on some incoming
     calls.
     
    
     

     

    Macro: Macro Implementation

     
     -- Info about application 'Macro' -- 
     
     [Synopsis]
     Macro Implementation
     
     [Description]
       Macro(macroname|arg1|arg2...): Executes a macro using the context
     'macro-<macroname>', jumping to the 's' extension of that context and
     executing each step, then returning when the steps end. 
     The calling extension, context, and priority are stored in ${MACRO_EXTEN}, 
     ${MACRO_CONTEXT} and ${MACRO_PRIORITY} respectively.  Arguments become
     ${ARG1}, ${ARG2}, etc in the macro context.
     If you Goto out of the Macro context, the Macro will terminate and control
     will be returned at the location of the Goto.
     If ${MACRO_OFFSET} is set at termination, Macro will attempt to continue
     at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.
     WARNING: Because of the way Macro is implemented (it executes the priorities
              contained within it via sub-engine), and a fixed per-thread
              memory stack allowance, macros are limited to 7 levels
              of nesting (macro calling macro calling macro, etc.); It
              may be possible that stack-intensive applications in deeply nested
              macros could cause asterisk to crash earlier than this limit.
     
    
     

     

    MacroExit: Exit From Macro

     
     -- Info about application 'MacroExit' -- 
     
     [Synopsis]
     Exit From Macro
     
     [Description]
       MacroExit():
     Causes the currently running macro to exit as if it had
     ended normally by running out of priorities to execute.
     If used outside a macro, will likely cause unexpected
     behavior.
     
    
     

     

    MacroIf: Conditional Macro Implementation

     
     -- Info about application 'MacroIf' -- 
     
     [Synopsis]
     Conditional Macro Implementation
     
     [Description]
       MacroIf(<expr>?macroname_a[|arg1][:macroname_b[|arg1]])
     Executes macro defined in <macroname_a> if <expr> is true
     (otherwise <macroname_b> if provided)
     Arguments and return values as in application macro()
     
    
     

     

    MailboxExists: Check to see if Voicemail mailbox exists

     
     -- Info about application 'MailboxExists' -- 
     
     [Synopsis]
     Check to see if Voicemail mailbox exists
     
     [Description]
       MailboxExists(mailbox[@context][|options]): Check to see if the specified
     mailbox exists. If no voicemail context is specified, the 'default' context
     will be used.
       This application will set the following channel variable upon completion:
         VMBOXEXISTSSTATUS - This will contain the status of the execution of the
                             MailboxExists application. Possible values include:
                             SUCCESS | FAILED
     
       Options:
         j - Jump to priority n+101 if the mailbox is found.
     
    
     

     

    Math: Performs Mathematical Functions

     
     -- Info about application 'Math' -- 
     
     [Synopsis]
     Performs Mathematical Functions
     
     [Description]
     Math(returnvar,<number1><op><number 2>
     
     Perform floating point calculation on number 1 to number 2 and 
     store the result in returnvar.  Valid ops are: 
         +,-,/,*,%,<,>,>=,<=,==
     and behave as their C equivalents.
       This application has been deprecated in favor of the MATH function.
     
    
     

     

    MD5: Calculate MD5 checksum

     
     -- Info about application 'MD5' -- 
     
     [Synopsis]
     Calculate MD5 checksum
     
     [Description]
       MD5(<var>=<string>): Calculates a MD5 checksum on <string>.
     Returns hash value in a channel variable. 
     
    
     

     

    MD5Check: Check MD5 checksum

     
     -- Info about application 'MD5Check' -- 
     
     [Synopsis]
     Check MD5 checksum
     
     [Description]
       MD5Check(<md5hash>|<string>[|options]): Calculates a MD5 checksum on <string>
     and compares it with the hash. Returns 0 if <md5hash> is correct for <string>.
     The option string may contain zero or more of the following characters:
             'j' -- jump to priority n+101 if the hash and string do not match 
     This application sets the following channel variable upon completion:
             CHECKMD5STATUS        The status of the MD5 check, one of the following
                     MATCH | NOMATCH
     
    
     

     

    MeetMe: MeetMe conference bridge

     
     -- Info about application 'MeetMe' -- 
     
     [Synopsis]
     MeetMe conference bridge
     
     [Description]
       MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe
    conference.
     If the conference number is omitted, the user will be prompted to enter
     one. 
     User can exit the conference by hangup, or if the 'p' option is specified, by
    pressing '#'.
     Please note: The Zaptel kernel modules and at least one hardware driver (or ztdummy)
                  must be present for conferencing to operate properly. In addition, the
    chan_zap
                  channel driver must be loaded for the 'i' and 'r' options to operate
    at all.
     
     The option string may contain zero or more of the following characters:
           'a' -- set admin mode
           'A' -- set marked mode
           'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND}
                  Default: conf-background.agi
                  (Note: This does not work with non-Zap channels in the same conference)
           'c' -- announce user(s) count on joining a conference
           'd' -- dynamically add conference
           'D' -- dynamically add conference, prompting for a PIN
           'e' -- select an empty conference
           'E' -- select an empty pinless conference
           'i' -- announce user join/leave
           'm' -- set monitor only mode (Listen only, no talking)
           'M' -- enable music on hold when the conference has a single caller
           'p' -- allow user to exit the conference by pressing '#'
           'P' -- always prompt for the pin even if it is specified
           'q' -- quiet mode (don't play enter/leave sounds)
           'r' -- Record conference (records as ${MEETME_RECORDINGFILE}
                  using format ${MEETME_RECORDINGFORMAT}). Default filename is
                  meetme-conf-rec-${CONFNO}-${UNIQUEID} and the default format is wav.
           's' -- Present menu (user or admin) when '*' is received ('send' to menu)
           't' -- set talk only mode. (Talk only, no listening)
           'T' -- set talker detection (sent to manager interface and meetme list)
           'w[(<secs>)]'
               -- wait until the marked user enters the conference
           'x' -- close the conference when last marked user exits
           'X' -- allow user to exit the conference by entering a valid single
                  digit extension ${MEETME_EXIT_CONTEXT} or the current context
                  if that variable is not defined.
     
    
     

     

    MeetMeAdmin: MeetMe conference Administration

     
     -- Info about application 'MeetMeAdmin' -- 
     
     [Synopsis]
     MeetMe conference Administration
     
     [Description]
       MeetMeAdmin(confno,command[,user]): Run admin command for conference
           'e' -- Eject last user that joined
           'k' -- Kick one user out of conference
           'K' -- Kick all users out of conference
           'l' -- Unlock conference
           'L' -- Lock conference
           'm' -- Unmute conference
           'M' -- Mute conference
           'n' -- Unmute entire conference (except admin)
           'N' -- Mute entire conference (except admin)
     
    
     

     

    MeetMeCount: MeetMe participant count

     
     -- Info about application 'MeetMeCount' -- 
     
     [Synopsis]
     MeetMe participant count
     
     [Description]
       MeetMeCount(confno[|var]): Plays back the number of users in the specified
     MeetMe conference. If var is specified, playback will be skipped and the value
     will be returned in the variable. Upon app completion, MeetMeCount will hangup the
     channel, unless priority n+1 exists, in which case priority progress will continue.
     A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING FUNCTIONALITY.
     
    
     

     

    Milliwatt: Generate a Constant 1000Hz tone at 0dbm (mu-law)

     
     -- Info about application 'Milliwatt' -- 
     
     [Synopsis]
     Generate a Constant 1000Hz tone at 0dbm (mu-law)
     
     [Description]
     Milliwatt(): Generate a Constant 1000Hz tone at 0dbm (mu-law)
     
    
     

     

    MixMonitor: Record a call and mix the audio during the recording

     
     -- Info about application 'MixMonitor' -- 
     
     [Synopsis]
     Record a call and mix the audio during the recording
     
     [Description]
       MixMonitor(<file>.<ext>[|<options>[|<command>]])
     
     Records the audio on the current channel to the specified file.
     If the filename is an absolute path, uses that path, otherwise
     creates the file in the configured monitoring directory from
     asterisk.conf.
     
     Valid options:
      a      - Append to the file instead of overwriting it.
      b      - Only save audio to the file while the channel is bridged.
               Note: does not include conferences.
      v(<x>) - Adjust the heard volume by a factor of <x> (range -4 to 4)
      V(<x>) - Adjust the spoken volume by a factor of <x> (range -4 to 4)
      W(<x>) - Adjust the both heard and spoken volumes by a factor of <x>
              (range -4 to 4)
     
     <command> will be executed when the recording is over
     Any strings matching ^{X} will be unescaped to ${X} and 
     all variables will be evaluated at that time.
     The variable MIXMONITOR_FILENAME will contain the filename used to record.
     
    
     

     

    Monitor: Monitor a channel

     
     -- Info about application 'Monitor' -- 
     
     [Synopsis]
     Monitor a channel
     
     [Description]
     Monitor([file_format[:urlbase]|[fname_base]|[options]]):
     Used to start monitoring a channel. The channel's input and output
     voice packets are logged to files until the channel hangs up or
     monitoring is stopped by the StopMonitor application.
       file_format                optional, if not set, defaults to "wav"
       fname_base                if set, changes the filename used to the one specified.
       options:
         m   - when the recording ends mix the two leg files into one and
               delete the two leg files.  If the variable MONITOR_EXEC is set, the
               application referenced in it will be executed instead of
               soxmix and the raw leg files will NOT be deleted automatically.
               soxmix or MONITOR_EXEC is handed 3 arguments, the two leg files
               and a target mixed file name which is the same as the leg file names
               only without the in/out designator.
               If MONITOR_EXEC_ARGS is set, the contents will be passed on as
               additional arguements to MONITOR_EXEC
               Both MONITOR_EXEC and the Mix flag can be set from the
               administrator interface
     
         b   - Don't begin recording unless a call is bridged to another channel
     
     Returns -1 if monitor files can't be opened or if the channel is already
     monitored, otherwise 0.
     
    
     

     

    MP3Player: Play an MP3 file or stream

     
     -- Info about application 'MP3Player' -- 
     
     [Synopsis]
     Play an MP3 file or stream
     
     [Description]
       MP3Player(location) Executes mpg123 to play the given location,
     which typically would be a filename or a URL. User can exit by pressing
     any key on the dialpad, or by hanging up.
    
     

     

    MusicOnHold: Play Music On Hold indefinitely

     
     -- Info about application 'MusicOnHold' -- 
     
     [Synopsis]
     Play Music On Hold indefinitely
     
     [Description]
     MusicOnHold(class): Plays hold music specified by class.  If omitted, the default
     music source for the channel will be used. Set the default 
     class with the SetMusicOnHold() application.
     Returns -1 on hangup.
     Never returns otherwise.
     
    
     

     

    NBScat: Play an NBS local stream

     
     -- Info about application 'NBScat' -- 
     
     [Synopsis]
     Play an NBS local stream
     
     [Description]
       NBScat: Executes nbscat to listen to the local NBS stream.
     User can exit by pressing any key
     .
    
     

     

    NoCDR: Tell Asterisk to not maintain a CDR for the current call

     
     -- Info about application 'NoCDR' -- 
     
     [Synopsis]
     Tell Asterisk to not maintain a CDR for the current call
     
     [Description]
       NoCDR(): This application will tell Asterisk not to maintain a CDR for the
     current call.
     
    
     

     

    NoOp: Do Nothing

     
     -- Info about application 'NoOp' -- 
     
     [Synopsis]
     Do Nothing
     
     [Description]
       NoOp(): This applicatiion does nothing. However, it is useful for debugging
     purposes. Any text that is provided as arguments to this application can be
     viewed at the Asterisk CLI. This method can be used to see the evaluations of
     variables or functions without having any effect.
    
     

     

    Page: Pages phones

     
     -- Info about application 'Page' -- 
     
     [Synopsis]
     Pages phones
     
     [Description]
     Page(Technology/Resource&Technology2/Resource2[|options])
       Places outbound calls to the given technology / resource and dumps
     them into a conference bridge as muted participants.  The original
     caller is dumped into the conference as a speaker and the room is
     destroyed when the original caller leaves.  Valid options are:
             d - full duplex audio
              q - quiet, do not play beep to caller
     
    
     

     

    Park: Park yourself

     
     -- Info about application 'Park' -- 
     
     [Synopsis]
     Park yourself
     
     [Description]
     Park():Used to park yourself (typically in combination with a supervised
     transfer to know the parking space). This application is always
     registered internally and does not need to be explicitly added
     into the dialplan, although you should include the 'parkedcalls'
     context.
     
    
     

     

    ParkAndAnnounce: Park and Announce

     
     -- Info about application 'ParkAndAnnounce' -- 
     
     [Synopsis]
     Park and Announce
     
     [Description]
       ParkAndAnnounce(announce:template|timeout|dial|[return_context]):
     Park a call into the parkinglot and announce the call over the console.
     announce template: colon separated list of files to announce, the word PARKED
                        will be replaced by a say_digits of the ext the call is parked in
     timeout: time in seconds before the call returns into the return context.
     dial: The app_dial style resource to call to make the announcement. Console/dsp
    calls the console.
     return_context: the goto style label to jump the call back into after timeout.
    default=prio+1
     

    ParkedCall: Answer a parked call

     
     -- Info about application 'ParkedCall' -- 
     
     [Synopsis]
     Answer a parked call
     
     [Description]
     ParkedCall(exten):Used to connect to a parked call.  This application is always
     registered internally and does not need to be explicitly added
     into the dialplan, although you should include the 'parkedcalls'
     context.
     
    
     

     

    PauseQueueMember: Pauses a queue member

     
     -- Info about application 'PauseQueueMember' -- 
     
     [Synopsis]
     Pauses a queue member
     
     [Description]
        PauseQueueMember([queuename]|interface[|options]):
     Pauses (blocks calls for) a queue member.
     The given interface will be paused in the given queue.  This prevents
     any calls from being sent from the queue to the interface until it is
     unpaused with UnpauseQueueMember or the manager interface.  If no
     queuename is given, the interface is paused in every queue it is a
     member of.  If the interface is not in the named queue, or if no queue
     is given and the interface is not in any queue, it will jump to
     priority n+101, if it exists and the appropriate options are set.
     The application will fail if the interface is not found and no extension
     to jump to exists.
     The option string may contain zero or more of the following characters:
            'j' -- jump to +101 priority when appropriate.
       This application sets the following channel variable upon completion:
          PQMSTATUS      The status of the attempt to pause a queue member as a
                          text string, one of
                PAUSED | NOTFOUND
     Example: PauseQueueMember(|SIP/3000)
     
    
     

     

    Pickup: Directed Call Pickup

     
     -- Info about application 'Pickup' -- 
     
     [Synopsis]
     Directed Call Pickup
     
     [Description]
       Pickup(extension[@context]): This application can pickup any ringing channel
     that is calling the specified extension. If no context is specified, the current
     context will be used.
     
    
     

     

    Playback: Play a file

     
     -- Info about application 'Playback' -- 
     
     [Synopsis]
     Play a file
     
     [Description]
       Playback(filename[&filename2...][|option]):  Plays back given filenames (do not put
     extension). Options may also be included following a pipe symbol. The 'skip'
     option causes the playback of the message to be skipped if the channel
     is not in the 'up' state (i.e. it hasn't been  answered  yet). If 'skip' is 
     specified, the application will return immediately should the channel not be
     off hook.  Otherwise, unless 'noanswer' is specified, the channel will
     be answered before the sound is played. Not all channels support playing
     messages while still on hook. If 'j' is specified, the application
     will jump to priority n+101 if present when a file specified to be played
     does not exist.
     This application sets the following channel variable upon completion:
      PLAYBACKSTATUS    The status of the playback attempt as a text string, one of
                    SUCCESS | FAILED
     
    
     

     

    PlayTones: Play a tone list

     
     -- Info about application 'PlayTones' -- 
     
     [Synopsis]
     Play a tone list
     
     [Description]
     PlayTones(arg): Plays a tone list. Execution will continue with the next step
    immediately,
     while the tones continue to play.
     Arg is either the tone name defined in the indications.conf configuration file, or
    a directly
     specified list of frequencies and durations.
     See the sample indications.conf for a description of the specification of a tonelist.
     
     Use the StopPlayTones application to stop the tones playing. 
     
    
     

     

    PrivacyManager: Require phone number to be entered, if no CallerID sent

     
     -- Info about application 'PrivacyManager' -- 
     
     [Synopsis]
     Require phone number to be entered, if no CallerID sent
     
     [Description]
       PrivacyManager([maxretries[|minlength[|options]]]): If no Caller*ID 
     is sent, PrivacyManager answers the channel and asks the caller to
     enter their phone number. The caller is given 3 attempts to do so.
     The application does nothing if Caller*ID was received on the channel.
       Configuration file privacy.conf contains two variables:
        maxretries  default 3  -maximum number of attempts the caller is allowed 
                    to input a callerid.
        minlength   default 10 -minimum allowable digits in the input callerid number.
     If you don't want to use the config file and have an i/o operation with
     every call, you can also specify maxretries and minlength as application
     parameters. Doing so supercedes any values set in privacy.conf.
     The option string may contain the following character: 
       'j' -- jump to n+101 priority after <maxretries> failed attempts to collect
              the minlength number of digits.
     The application sets the following channel variable upon completion: 
     PRIVACYMGRSTATUS  The status of the privacy manager's attempt to collect 
                       a phone number from the user. A text string that is either:
               SUCCESS | FAILED 
     
    
     

     

    Progress: Indicate progress

     
     -- Info about application 'Progress' -- 
     
     [Synopsis]
     Indicate progress
     
     [Description]
       Progress(): This application will request that in-band progress information
     be provided to the calling channel.
     
    
     

     

    Queue: Queue a call for a call queue

     
     -- Info about application 'Queue' -- 
     
     [Synopsis]
     Queue a call for a call queue
     
     [Description]
       Queue(queuename[|options[|URL][|announceoverride][|timeout]]):
     Queues an incoming call in a particular call queue as defined in queues.conf.
     This application will return to the dialplan if the queue does not exist, or
     any of the join options cause the caller to not enter the queue.
     The option string may contain zero or more of the following characters:
           'd' -- data-quality (modem) call (minimum delay).
           'h' -- allow callee to hang up by hitting *.
           'H' -- allow caller to hang up by hitting *.
           'n' -- no retries on the timeout; will exit this application and 
                   go to the next step.
           'r' -- ring instead of playing MOH
           't' -- allow the called user transfer the calling user
           'T' -- to allow the calling user to transfer the call.
           'w' -- allow the called user to write the conversation to disk via Monitor
           'W' -- allow the calling user to write the conversation to disk via Monitor
       In addition to transferring the call, a call may be parked and then picked
     up by another user.
       The optional URL will be sent to the called party if the channel supports
     it.
       The timeout will cause the queue to fail out after a specified number of
     seconds, checked between each queues.conf 'timeout' and 'retry' cycle.
       This application sets the following channel variable upon completion:
           QUEUESTATUS    The status of the call as a text string, one of
                  TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL
     
    
     

     

    Random: Conditionally branches, based upon a probability

     
     -- Info about application 'Random' -- 
     
     [Synopsis]
     Conditionally branches, based upon a probability
     
     [Description]
     Random([probability]:[[context|]extension|]priority)
       probability := INTEGER in the range 1 to 100
     
    
     

     

    Read: Read a variable

     
     -- Info about application 'Read' -- 
     
     [Synopsis]
     Read a variable
     
     [Description]
       Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])
     
     Reads a #-terminated string of digits a certain number of times from the
     user in to the given variable.
       filename   -- file to play before reading digits.
       maxdigits  -- maximum acceptable number of digits. Stops reading after
                     maxdigits have been entered (without requiring the user to
                     press the '#' key).
                     Defaults to 0 - no limit - wait for the user press the '#' key.
                     Any value below 0 means the same. Max accepted value is 255.
       option     -- may be 'skip' to return immediately if the line is not up,
                     or 'noanswer' to read digits even if the line is not up.
       attempts   -- if greater than 1, that many attempts will be made in the 
                     event no data is entered.
       timeout    -- if greater than 0, that value will override the default timeout.
     
     Read should disconnect if the function fails or errors out.
     
    
     

     

    ReadFile: ReadFile(varname=file,length)

     
     -- Info about application 'ReadFile' -- 
     
     [Synopsis]
     ReadFile(varname=file,length)
     
     [Description]
     ReadFile(varname=file,length)
       Varname - Result stored here.
       File - The name of the file to read.
       Length - Maximum number of characters to capture.
     
    
     

     

    RealTime: Realtime Data Lookup

     
     -- Info about application 'RealTime' -- 
     
     [Synopsis]
     Realtime Data Lookup
     
     [Description]
     Use the RealTime config handler system to read data into channel variables.
     RealTime(<family>|<colmatch>|<value>[|<prefix>])
     
     All unique column names will be set as channel variables with optional prefix to
    the name.
     e.g. prefix of 'var_' would make the column 'name' become the variable ${var_name}
     
     
    
     

     

    RealTimeUpdate: Realtime Data Rewrite

     
     -- Info about application 'RealTimeUpdate' -- 
     
     [Synopsis]
     Realtime Data Rewrite
     
     [Description]
     Use the RealTime config handler system to update a value
     RealTimeUpdate(<family>|<colmatch>|<value>|<newcol>|<newval>)
     
     The column <newcol> in 'family' matching column <colmatch>=<value> will be updated
    to <newval>
     
    
     

     

    Record: Record to a file

     
     -- Info about application 'Record' -- 
     
     [Synopsis]
     Record to a file
     
     [Description]
       Record(filename.format|silence[|maxduration][|options])
     
     Records from the channel into a given filename. If the file exists it will
     be overwritten.
     - 'format' is the format of the file type to be recorded (wav, gsm, etc).
     - 'silence' is the number of seconds of silence to allow before returning.
     - 'maxduration' is the maximum recording duration in seconds. If missing
     or 0 there is no maximum.
     - 'options' may contain any of the following letters:
          'a' : append to existing recording rather than replacing
          'n' : do not answer, but record anyway if line not yet answered
          'q' : quiet (do not play a beep tone)
          's' : skip recording if the line is not yet answered
          't' : use alternate '*' terminator key instead of default '#'
     
     If filename contains '%d', these characters will be replaced with a number
     incremented by one each time the file is recorded. 
     
     Use 'show file formats' to see the available formats on your system
     
     User can press '#' to terminate the recording and continue to the next priority.
     
     If the user should hangup during a recording, all data will be lost and the
     application will teminate. 
     
    
     

     

    RemoveQueueMember: Dynamically removes queue members

     
     -- Info about application 'RemoveQueueMember' -- 
     
     [Synopsis]
     Dynamically removes queue members
     
     [Description]
        RemoveQueueMember(queuename[|interface[|options]]):
     Dynamically removes interface to an existing queue
     If the interface is NOT in the queue and there exists an n+101 priority
     then it will then jump to this priority.  Otherwise it will return an error
     The option string may contain zero or more of the following characters:
            'j' -- jump to +101 priority when appropriate.
       This application sets the following channel variable upon completion:
          RQMSTATUS      The status of the attempt to remove a queue member as a
                          text string, one of
                REMOVED | NOTINQUEUE | NOSUCHQUEUE 
     Example: RemoveQueueMember(techsupport|SIP/3000)
     
    
     

     

    ResetCDR: Resets the Call Data Record

     
     -- Info about application 'ResetCDR' -- 
     
     [Synopsis]
     Resets the Call Data Record
     
     [Description]
       ResetCDR([options]):  This application causes the Call Data Record to be
     reset.
       Options:
         w -- Store the current CDR record before resetting it.
         a -- Store any stacked records.
         v -- Save CDR variables.
     
    
     

     

    ResponseTimeout: Set maximum timeout awaiting response

     
     -- Info about application 'ResponseTimeout' -- 
     
     [Synopsis]
     Set maximum timeout awaiting response
     
     [Description]
       ResponseTimeout(seconds): This will set the maximum amount of time permitted
     to wait for an extension to dialed (see the WaitExten application), before the
     timeout occurs. If this timeout is reached, dialplan execution will continue at
     the 't' extension, if it exists.
       ResponseTimeout has been deprecated in favor of Set(TIMEOUT(response)=timeout)
     
    

     

     
     -- Info about application 'RetryDial' -- 
     
     [Synopsis]
     Place a call, retrying on failure allowing optional exit extension.
     
     [Description]
       RetryDial(announce|sleep|retries|dialargs): This application will attempt to
     place a call using the normal Dial application. If no channel can be reached,
     the 'announce' file will be played. Then, it will wait 'sleep' number of
     seconds before retying the call. After 'retires' number of attempts, the
     calling channel will continue at the next priority in the dialplan. If the
     'retries' setting is set to 0, this application will retry endlessly.
       While waiting to retry a call, a 1 digit extension may be dialed. If that
     extension exists in either the context defined in ${EXITCONTEXT} or the current
     one, The call will jump to that extension immediately.
       The 'dialargs' are specified in the same format that arguments are provided
     to the Dial application.
     
    
     

     

    Return: Return from gosub routine

     
     -- Info about application 'Return' -- 
     
     [Synopsis]
     Return from gosub routine
     
     [Description]
     Return()
       Jumps to the last label on the stack, removing it.
    
    

     

    Ringing: Indicate ringing tone

     
     -- Info about application 'Ringing' -- 
     
     [Synopsis]
     Indicate ringing tone
     
     [Description]
       Ringing(): This application will request that the channel indicate a ringing
     tone to the user.
     
    
     

     

    SayAlpha: Say Alpha

     
     -- Info about application 'SayAlpha' -- 
     
     [Synopsis]
     Say Alpha
     
     [Description]
       SayAlpha(string): This application will play the sounds that correspond to
     the letters of the given string.
     
    
     

     

    SayDigits: Say Digits

     
     -- Info about application 'SayDigits' -- 
     
     [Synopsis]
     Say Digits
     
     [Description]
       SayDigits(digits): This application will play the sounds that correspond
     to the digits of the given number. This will use the language that is currently
     set for the channel. See the LANGUAGE function for more information on setting
     the language for the channel.
     
    
     

     

    SayNumber: Say Number

     
     -- Info about application 'SayNumber' -- 
     
     [Synopsis]
     Say Number
     
     [Description]
       SayNumber(digits[,gender]): This application will play the sounds that
     correspond to the given number. Optionally, a gender may be specified.
     This will use the language that is currently set for the channel. See the
     LANGUAGE function for more information on setting the language for the channel.
     
    
     

     

    SayPhonetic: Say Phonetic

     
     -- Info about application 'SayPhonetic' -- 
     
     [Synopsis]
     Say Phonetic
     
     [Description]
       SayPhonetic(string): This application will play the sounds from the phonetic
     alphabet that correspond to the letters in the given string.
     
    
     

     

    SayUnixTime: Says a specified time in a custom format

     
     -- Info about application 'SayUnixTime' -- 
     
     [Synopsis]
     Says a specified time in a custom format
     
     [Description]
     SayUnixTime([unixtime][|[timezone][|format]])
       unixtime: time, in seconds since Jan 1, 1970.  May be negative.
                   defaults to now.
       timezone: timezone, see /usr/share/zoneinfo for a list.
                   defaults to machine default.
       format:   a format the time is to be said in.  See voicemail.conf.
                   defaults to "ABdY 'digits/at' IMp"
     
    
     

     

    SendDTMF: Sends arbitrary DTMF digits

     
     -- Info about application 'SendDTMF' -- 
     
     [Synopsis]
     Sends arbitrary DTMF digits
     
     [Description]
      SendDTMF(digits[|timeout_ms]): Sends DTMF digits on a channel. 
      Accepted digits: 0-9, *#abcd, w (.5s pause)
      The application will either pass the assigned digits or terminate if it
      encounters an error.
     
    
     

     

    SendImage: Send an image file

     
     -- Info about application 'SendImage' -- 
     
     [Synopsis]
     Send an image file
     
     [Description]
       SendImage(filename): Sends an image on a channel. 
     If the channel supports image transport but the image send
     fails, the channel will be hung up. Otherwise, the dialplan
     continues execution.
     The option string may contain the following character:
             'j' -- jump to priority n+101 if the channel doesn't support image transport
     This application sets the following channel variable upon completion:
             SENDIMAGESTATUS                The status is the result of the attempt as a text string, one of
                     OK | NOSUPPORT 
     
    
     

     

    SendText: Send a Text Message

     
     -- Info about application 'SendText' -- 
     
     [Synopsis]
     Send a Text Message
     
     [Description]
       SendText(text[|options]): Sends text to current channel (callee).
     Result of transmission will be stored in the SENDTEXTSTATUS
     channel variable:
           SUCCESS      Transmission succeeded
           FAILURE      Transmission failed
           UNSUPPORTED  Text transmission not supported by channel
     
     At this moment, text is supposed to be 7 bit ASCII in most channels.
     The option string many contain the following character:
     'j' -- jump to n+101 priority if the channel doesn't support
            text transport
     
    
     

     

    SendURL: Send a URL

     
     -- Info about application 'SendURL' -- 
     
     [Synopsis]
     Send a URL
     
     [Description]
       SendURL(URL[|option]): Requests client go to URL (IAX2) or sends the 
     URL to the client (other channels).
     Result is returned in the SENDURLSTATUS channel variable:
         SUCCESS       URL successfully sent to client
         FAILURE       Failed to send URL
         NOLOAD        Clien failed to load URL (wait enabled)
         UNSUPPORTED   Channel does not support URL transport
     
     If the option 'wait' is specified, execution will wait for an
     acknowledgement that the URL has been loaded before continuing
     and will return -1 if the peer is unable to load the URL
     
     Old behaviour (deprecated): 
      If the client does not support Asterisk "html" transport, 
      and there exists a step with priority n + 101, then execution will
      continue at that step.
      Otherwise, execution will continue at the next priority level.
      SendURL only returns 0 if the URL was sent correctly  or if
      the channel does not support HTML transport, and -1 otherwise.
     
    
     

     

    Set: Set channel variable(s) or function value(s)

     
     -- Info about application 'Set' -- 
     
     [Synopsis]
     Set channel variable(s) or function value(s)
     
     [Description]
       Set(name1=value1|name2=value2|..[|options])
     This function can be used to set the value of channel variables or dialplan
     functions. It will accept up to 24 name/value pairs. When setting variables,
     if the variable name is prefixed with _, the variable will be inherited into
     channels created from the current channel. If the variable name is prefixed
     with __, the variable will be inherited into channels created from the current
     channel and all children channels.
       Options:
         g - Set variable globally instead of on the channel
             (applies only to variables, not functions)
     
    
     

     

    SetAccount: Set the CDR Account Code

     
     -- Info about application 'SetAccount' -- 
     
     [Synopsis]
     Set the CDR Account Code
     
     [Description]
       SetAccount([account]): This application will set the channel account code for
     billing purposes.
       SetAccount has been deprecated in favor of the Set(CDR(accountcode)=account).
     
    
     

     

    SetAMAFlags: Set the AMA Flags

     
     -- Info about application 'SetAMAFlags' -- 
     
     [Synopsis]
     Set the AMA Flags
     
     [Description]
       SetAMAFlags([flag]): This channel will set the channel's AMA Flags for billing
     purposes.
     
    
     

     

    SetCallerID: Set CallerID

     
     -- Info about application 'SetCallerID' -- 
     
     [Synopsis]
     Set CallerID
     
     [Description]
       SetCallerID(clid[|a]): Set Caller*ID on a call to a new
     value.  Sets ANI as well if a flag is used. 
     
    
     

     

    SetCallerPres: Set CallerID Presentation

     
     -- Info about application 'SetCallerPres' -- 
     
     [Synopsis]
     Set CallerID Presentation
     
     [Description]
       SetCallerPres(presentation): Set Caller*ID presentation on a call.
       Valid presentations are:
     
           allowed_not_screened    : Presentation Allowed, Not Screened
           allowed_passed_screen   : Presentation Allowed, Passed Screen
           allowed_failed_screen   : Presentation Allowed, Failed Screen
           allowed                 : Presentation Allowed, Network Number
           prohib_not_screened     : Presentation Prohibited, Not Screened
           prohib_passed_screen    : Presentation Prohibited, Passed Screen
           prohib_failed_screen    : Presentation Prohibited, Failed Screen
           prohib                  : Presentation Prohibited, Network Number
           unavailable             : Number Unavailable
     
     
    
     

     

    SetCDRUserField: Set the CDR user field

     
     -- Info about application 'SetCDRUserField' -- 
     
     [Synopsis]
     Set the CDR user field
     
     [Description]
     [Synopsis]
     SetCDRUserField(value)
     
     [Description]
     SetCDRUserField(value): Set the CDR 'user field' to value
            The Call Data Record (CDR) user field is an extra field you
            can use for data not stored anywhere else in the record.
            CDR records can be used for billing or storing other arbitrary data
            (I.E. telephone survey responses)
            Also see AppendCDRUserField().
     
    
     

     

    SetCIDName: Set CallerID Name

     
     -- Info about application 'SetCIDName' -- 
     
     [Synopsis]
     Set CallerID Name
     
     [Description]
       SetCIDName(cname[|a]): Set Caller*ID Name on a call to a new
     value, while preserving the original Caller*ID number.  This is
     useful for providing additional information to the called
     party. 
     SetCIDName has been deprecated in favor of the function
     CALLERID(name)
     
    
     

     

    SetCIDNum: Set CallerID Number

     
     -- Info about application 'SetCIDNum' -- 
     
     [Synopsis]
     Set CallerID Number
     
     [Description]
       SetCIDNum(cnum[|a]): Set Caller*ID Number on a call to a new
     value, while preserving the original Caller*ID name.  This is
     useful for providing additional information to the called
     party. Sets ANI as well if a flag is used.
     SetCIDNum has been deprecated in favor of the function
     CALLERID(number)
     
    
     

     

    SetGlobalVar: Set a global variable to a given value

     
     -- Info about application 'SetGlobalVar' -- 
     
     [Synopsis]
     Set a global variable to a given value
     
     [Description]
       SetGlobalVar(variable=value): This application sets a given global variable to
     the specified value.
     
    
     

     

    SetGroup: Set the channel's group

     
     -- Info about application 'SetGroup' -- 
     
     [Synopsis]
     Set the channel's group
     
     [Description]
     Usage: SetGroup(groupname[@category])
       Sets the channel group to the specified value.  Equivalent to
     Set(GROUP=group).  Always returns 0.
     
    
     

     

    SetLanguage: Set the channel's preferred language

     
     -- Info about application 'SetLanguage' -- 
     
     [Synopsis]
     Set the channel's preferred language
     
     [Description]
       SetLanguage(language): This will set the channel language to the given value.
     This information is used for the syntax in generation of numbers, and to choose
     a sound file in the given language, when it is available.
       For example, if language is set to 'fr' and the file 'demo-congrats' is 
     requested to be played, if the file 'fr/demo-congrats' exists, then
     it will play that file. If not, it will play the normal 'demo-congrats'.
     For some language codes, SetLanguage also changes the syntax of some
     Asterisk functions, like SayNumber.
       SetLanguage has been deprecated in favor of Set(LANGUAGE()=language)
     
    
     

     

    SetMusicOnHold: Set default Music On Hold class

     
     -- Info about application 'SetMusicOnHold' -- 
     
     [Synopsis]
     Set default Music On Hold class
     
     [Description]
     SetMusicOnHold(class): Sets the default class for music on hold for a given
    channel.  When
     music on hold is activated, this class will be used to select which
     music is played.
     
    
     

     

    SetRDNIS: Set RDNIS Number

     
     -- Info about application 'SetRDNIS' -- 
     
     [Synopsis]
     Set RDNIS Number
     
     [Description]
       SetRDNIS(cnum): Set RDNIS Number on a call to a new
     value.
     SetRDNIS has been deprecated in favor of the function
     CALLERID(rdnis)
     
    
     

     

    SetTransferCapability: Set ISDN Transfer Capability

     
     -- Info about application 'SetTransferCapability' -- 
     
     [Synopsis]
     Set ISDN Transfer Capability
     
     [Description]
       SetTransferCapability(transfercapability): Set the ISDN Transfer 
     Capability of a call to a new value.
     Valid Transfer Capabilities are:
     
       SPEECH             : 0x00 - Speech (default, voice calls)
       DIGITAL            : 0x08 - Unrestricted digital information (data calls)
       RESTRICTED_DIGITAL : 0x09 - Restricted digital information
       3K1AUDIO           : 0x10 - 3.1kHz Audio (fax calls)
       DIGITAL_W_TONES    : 0x11 - Unrestricted digital information with
    tones/announcements
       VIDEO              : 0x18 - Video:
     
     
    
     

     

    SetVar: Set channel variable(s)

     
     -- Info about application 'SetVar' -- 
     
     [Synopsis]
     Set channel variable(s)
     
     [Description]
       SetVar(name1=value1|name2=value2|..[|options]): This application has been
     deprecated in favor of using the Set application.
     
    
     

     

    SIPAddHeader: Add a SIP header to the outbound call

     
     -- Info about application 'SIPAddHeader' -- 
     
     [Synopsis]
     Add a SIP header to the outbound call
     
     [Description]
       SIPAddHeader(Header: Content)
     Adds a header to a SIP call placed with DIAL.
     Remember to user the X-header if you are adding non-standard SIP
     headers, like "X-Asterisk-Accountcode:". Use this with care.
     Adding the wrong headers may jeopardize the SIP dialog.
     Always returns 0
     
    
     

     

    SIPDtmfMode: Change the dtmfmode for a SIP call

     
     -- Info about application 'SIPDtmfMode' -- 
     
     [Synopsis]
     Change the dtmfmode for a SIP call
     
     [Description]
     SIPDtmfMode(inband|info|rfc2833): Changes the dtmfmode for a SIP call
     
    
     

     

    SIPGetHeader: Get a SIP header from an incoming call

     
     -- Info about application 'SIPGetHeader' -- 
     
     [Synopsis]
     Get a SIP header from an incoming call
     
     [Description]
       SIPGetHeader(var=headername[|options]): 
     Sets a channel variable to the content of a SIP header
       Options:
         j - Jump to priority n+101 if the requested header isn't found.
       This application sets the following channel variable upon completion:
           SIPGETSTATUS - This variable will contain the status of the attempt
                          FOUND | NOTFOUND
       This application has been deprecated in favor of the SIP_HEADER function.
     
    
     

     

    SMS: Communicates with SMS service centres and SMS capable analogue phones

     
     -- Info about application 'SMS' -- 
     
     [Synopsis]
     Communicates with SMS service centres and SMS capable analogue phones
     
     [Description]
       SMS(name|[a][s]):  SMS handles exchange of SMS data with a call to/from SMS capabale
     phone or SMS PSTN service center. Can send and/or receive SMS messages.
     Works to ETSI ES 201 912 compatible with BT SMS PSTN service in UK
     Typical usage is to use to handle called from the SMS service centre CLI,
     or to set up a call using 'outgoing' or manager interface to connect
     service centre to SMS()
     name is the name of the queue used in /var/spool/asterisk/sms
     Arguments:
      a: answer, i.e. send initial FSK packet.
      s: act as service centre talking to a phone.
     Messages are processed as per text file message queues.
     smsq (a separate software) is a command to generate message
     queues and send messages.
     
    
     

     

    SoftHangup: Soft Hangup Application

     
     -- Info about application 'SoftHangup' -- 
     
     [Synopsis]
     Soft Hangup Application
     
     [Description]
       SoftHangup(Technology/resource|options)
     Hangs up the requested channel.  If there are no channels to hangup,
     the application will report it.
     - 'options' may contain the following letter:
          'a' : hang up all channels on a specified device instead of a single resource
     
    
     

     

    Sort: Sorts a list of keywords and values

     
     -- Info about application 'Sort' -- 
     
     [Synopsis]
     Sorts a list of keywords and values
     
     [Description]
       Sort(newvar=key1:val1[,key2:val2[[...],keyN:valN]]): This application will
     sort the list provided in ascending order. The result will be stored in the
     specified variable name.
       This applicaiton has been deprecated in favor of the SORT function.
     
    
     

     

    StackPop: Remove one address from gosub stack

     
     -- Info about application 'StackPop' -- 
     
     [Synopsis]
     Remove one address from gosub stack
     
     [Description]
     StackPop()
       Removes last label on the stack, discarding it.
     
    
     

     

    StartMusicOnHold: Play Music On Hold

     
     -- Info about application 'StartMusicOnHold' -- 
     
     [Synopsis]
     Play Music On Hold
     
     [Description]
     StartMusicOnHold(class): Starts playing music on hold, uses default music class for
    channel.
     Starts playing music specified by class.  If omitted, the default
     music source for the channel will be used.  Always returns 0.
     
    
     

     

    StopMonitor: Stop monitoring a channel

     
     -- Info about application 'StopMonitor' -- 
     
     [Synopsis]
     Stop monitoring a channel
     
     [Description]
     StopMonitor
     Stops monitoring a channel. Has no effect if the channel is not monitored
     
    
     

     

    StopMusicOnHold: Stop Playing Music On Hold

     
     -- Info about application 'StopMusicOnHold' -- 
     
     [Synopsis]
     Stop Playing Music On Hold
     
     [Description]
     StopMusicOnHold: Stops playing music on hold.
     
    
     

     

    StopPlayTones: Stop playing a tone list

     
     -- Info about application 'StopPlayTones' -- 
     
     [Synopsis]
     Stop playing a tone list
     
     [Description]
     Stop playing a tone list
    
     

     

    System: Execute a system command

     
     -- Info about application 'System' -- 
     
     [Synopsis]
     Execute a system command
     
     [Description]
       System(command): Executes a command  by  using  system(). If the command
     fails, the console should report a fallthrough. 
     Result of execution is returned in the SYSTEMSTATUS channel variable:
        FAILURE        Could not execute the specified command
        SUCCESS        Specified command successfully executed
     
     Old behaviour:
     If the command itself executes but is in error, and if there exists
     a priority n + 101, where 'n' is the priority of the current instance,
     then  the  channel  will  be  setup to continue at that priority level.
     Note that this jump functionality has been deprecated and will only occur
     if the global priority jumping option is enabled in extensions.conf.
     
    
     

     

    TestClient: Execute Interface Test Client

     
     -- Info about application 'TestClient' -- 
     
     [Synopsis]
     Execute Interface Test Client
     
     [Description]
     TestClient(testid): Executes test client with given testid.
     Results stored in /var/log/asterisk/testreports/<testid>-client.txt
    
     

     

    TestServer: Execute Interface Test Server

     
     -- Info about application 'TestServer' -- 
     
     [Synopsis]
     Execute Interface Test Server
     
     [Description]
     TestServer(): Perform test server function and write call report.
     Results stored in /var/log/asterisk/testreports/<testid>-server.txt
    
     

     

    Transfer: Transfer caller to remote extension

     
     -- Info about application 'Transfer' -- 
     
     [Synopsis]
     Transfer caller to remote extension
     
     [Description]
       Transfer([Tech/]dest[|options]):  Requests the remote caller be transferred
     to a given destination. If TECH (SIP, IAX2, LOCAL etc) is used, only
     an incoming call with the same channel technology will be transfered.
     Note that for SIP, if you transfer before call is setup, a 302 redirect
     SIP message will be returned to the caller.
     
     The result of the application will be reported in the TRANSFERSTATUS
     channel variable:
            SUCCESS      Transfer succeeded
            FAILURE      Transfer failed
            UNSUPPORTED  Transfer unsupported by channel driver
     The option string many contain the following character:
     'j' -- jump to n+101 priority if the channel transfer attempt
            fails
     
    
     

     

    TrySystem: Try executing a system command

     
     -- Info about application 'TrySystem' -- 
     
     [Synopsis]
     Try executing a system command
     
     [Description]
       TrySystem(command): Executes a command  by  using  system().
     on any situation.
     Result of execution is returned in the SYSTEMSTATUS channel variable:
        FAILURE        Could not execute the specified command
        SUCCESS        Specified command successfully executed
        APPERROR        Specified command successfully executed, but returned error code
     
     Old behaviour:
     If  the command itself executes but is in error, and if
     there exists a priority n + 101, where 'n' is the priority of the current
     instance, then  the  channel  will  be  setup  to continue at that
     priority level.  Otherwise, System will terminate.
     
    
     

     

    TXTCIDName: Lookup caller name from TXT record

     
     -- Info about application 'TXTCIDName' -- 
     
     [Synopsis]
     Lookup caller name from TXT record
     
     [Description]
       TXTCIDName(<CallerIDNumber>[|options]):  Looks up a Caller Name via DNS and sets
     the variable 'TXTCIDNAME'. TXTCIDName will either be blank
     or return the value found in the TXT record in DNS.
     The option string may contain the following character:
     'j' -- jump to n+101 priority if the lookup fails
     This application sets the following channel variable upon completion:
       TXTCIDNAMESTATUS The status of the lookup as a text string, one of
           SUCCESS | FAILED
     
    
     

     

    UnpauseQueueMember: Unpauses a queue member

     
     -- Info about application 'UnpauseQueueMember' -- 
     
     [Synopsis]
     Unpauses a queue member
     
     [Description]
        UnpauseQueueMember([queuename]|interface[|options]):
     Unpauses (resumes calls to) a queue member.
     This is the counterpart to PauseQueueMember and operates exactly the
     same way, except it unpauses instead of pausing the given interface.
     The option string may contain zero or more of the following characters:
            'j' -- jump to +101 priority when appropriate.
       This application sets the following channel variable upon completion:
          UPQMSTATUS       The status of the attempt to unpause a queue 
                           member as a text string, one of
                 UNPAUSED | NOTFOUND
     Example: UnpauseQueueMember(|SIP/3000)
     
    
     

     

    UserEvent: Send an arbitrary event to the manager interface

     
     -- Info about application 'UserEvent' -- 
     
     [Synopsis]
     Send an arbitrary event to the manager interface
     
     [Description]
       UserEvent(eventname[|body]): Sends an arbitrary event to the
     manager interface, with an optional body representing additional
     arguments.  The format of the event will be:
         Event: UserEvent<specified event name>
         Channel: <channel name>
         Uniqueid: <call uniqueid>
         [body]
     If the body is not specified, only Event, Channel, and Uniqueid fields
     will be present.  Returns 0.
    
     

     

    Verbose: Send arbitrary text to verbose output

     
     -- Info about application 'Verbose' -- 
     
     [Synopsis]
     Send arbitrary text to verbose output
     
     [Description]
     Verbose([<level>|]<message>)
       level must be an integer value.  If not specified, defaults to 0.
     
    
     

     

    VMAuthenticate: Authenticate with Voicemail passwords

     
     -- Info about application 'VMAuthenticate' -- 
     
     [Synopsis]
     Authenticate with Voicemail passwords
     
     [Description]
       VMAuthenticate([mailbox][@context][|options]): This application behaves the
     same way as the Authenticate application, but the passwords are taken from
     voicemail.conf.
       If the mailbox is specified, only that mailbox's password will be considered
     valid. If the mailbox is not specified, the channel variable AUTH_MAILBOX will
     be set with the authenticated mailbox.
     
       Options:
         s - Skip playing the initial prompts.
     
    
     

     

    VoiceMail: Leave a Voicemail message

     
     -- Info about application 'VoiceMail' -- 
     
     [Synopsis]
     Leave a Voicemail message
     
     [Description]
       VoiceMail(mailbox[@context][&mailbox[@context]][...][|options]): This
     application allows the calling party to leave a message for the specified
     list of mailboxes. When multiple mailboxes are specified, the greeting will
     be taken from the first mailbox specified. Dialplan execution will stop if the
     specified mailbox does not exist.
       The Voicemail application will exit if any of the following DTMF digits are
     received:
         0 - Jump to the 'o' extension in the current dialplan context.
         * - Jump to the 'a' extension in the current dialplan context.
       This application will set the following channel variable upon completion:
         VMSTATUS - This indicates the status of the execution of the VoiceMail
                    application. The possible values are:
                    SUCCESS | USEREXIT | FAILED
     
       Options:
         b    - Play the 'busy' greeting to the calling party.
         g(#) - Use the specified amount of gain when recording the voicemail
                message. The units are whole-number decibels (dB).
         s    - Skip the playback of instructions for leaving a message to the
                calling party.
         u    - Play the 'unavailable greeting.
         j    - Jump to priority n+101 if the mailbox is not found or some other
                error occurs.
     
    
     

     

    VoiceMailMain: Check Voicemail messages

     
     -- Info about application 'VoiceMailMain' -- 
     
     [Synopsis]
     Check Voicemail messages
     
     [Description]
       VoiceMailMain([mailbox][@context][|options]): This application allows the
     calling party to check voicemail messages. A specific mailbox, and optional
     corresponding context, may be specified. If a mailbox is not provided, the
     calling party will be prompted to enter one. If a context is not specified,
     the 'default' context will be used.
     
       Options:
         p    - Consider the mailbox parameter as a prefix to the mailbox that
                is entered by the caller.
         g(#) - Use the specified amount of gain when recording a voicemail
                message. The units are whole-number decibels (dB).
         s    - Skip checking the passcode for the mailbox.
     
    
     

     

    Wait: Waits for some time

     
     -- Info about application 'Wait' -- 
     
     [Synopsis]
     Waits for some time
     
     [Description]
       Wait(seconds): This application waits for a specified number of seconds.
     Then, dialplan execution will continue at the next priority.
       Note that the seconds can be passed with fractions of a second. For example,
     '1.5' will ask the application to wait for 1.5 seconds.
     
    
     

     

    WaitExten: Waits for an extension to be entered

     
     -- Info about application 'WaitExten' -- 
     
     [Synopsis]
     Waits for an extension to be entered
     
     [Description]
       WaitExten([seconds][|options]): This application waits for the user to enter
     a new extension for a specified number of seconds.
       Note that the seconds can be passed with fractions of a second. For example,
     '1.5' will ask the application to wait for 1.5 seconds.
       Options:
         m[(x)] - Provide music on hold to the caller while waiting for an extension.
                    Optionally, specify the class for music on hold within parenthesis.
     
    
     

     

    WaitForRing: Wait for Ring Application

     
     -- Info about application 'WaitForRing' -- 
     
     [Synopsis]
     Wait for Ring Application
     
     [Description]
       WaitForRing(timeout)
     Returns 0 after waiting at least timeout seconds. and
     only after the next ring has completed.  Returns 0 on
     success or -1 on hangup
     
    
     

     

    WaitForSilence: Waits for a specified amount of silence

     
     -- Info about application 'WaitForSilence' -- 
     
     [Synopsis]
     Waits for a specified amount of silence
     
     [Description]
       WaitForSilence(x[|y]) Wait for Silence: Waits for up to 'x' 
     milliseconds of silence, 'y' times or 1 if omitted
     Set the channel variable WAITSTATUS with to one of these values:SILENCE - if
    silence of x ms was detectedTIMEOUT - if silence of x ms was not detected.Examples:
       - WaitForSilence(500|2) will wait for 1/2 second of silence, twice
       - WaitForSilence(1000) will wait for 1 second of silence, once
     
    
     

     

    WaitMusicOnHold: Wait, playing Music On Hold

     
     -- Info about application 'WaitMusicOnHold' -- 
     
     [Synopsis]
     Wait, playing Music On Hold
     
     [Description]
     WaitMusicOnHold(delay): Plays hold music specified number of seconds.  Returns 0 when
     done, or -1 on hangup.  If no hold music is available, the delay will
     still occur with no sound.
     
    
     

     

    While: Start A While Loop

     
     -- Info about application 'While' -- 
     
     [Synopsis]
     Start A While Loop
     
     [Description]
     Usage:  While(<expr>)
     Start a While Loop.  Execution will return to this point when
     EndWhile is called until expr is no longer true.
     
    
     

     

    Zapateller: Block telemarketers with SIT

     
     -- Info about application 'Zapateller' -- 
     
     [Synopsis]
     Block telemarketers with SIT
     
     [Description]
       Zapateller(options):  Generates special information tone to block
     telemarketers from calling you.  Options is a pipe-delimited list of
     options.  The following options are available:
     'answer' causes the line to be answered before playing the tone,
     'nocallerid' causes Zapateller to only play the tone if there
     is no callerid information available.  Options should be separated by |
     characters
     
    
     

     

    ZapBarge: Barge in (monitor) Zap channel

     
     -- Info about application 'ZapBarge' -- 
     
     [Synopsis]
     Barge in (monitor) Zap channel
     
     [Description]
       ZapBarge([channel]): Barges in on a specified zap
     channel or prompts if one is not specified.  Returns
     -1 when caller user hangs up and is independent of the
     state of the channel being monitored.
    
     

     

    ZapRAS: Executes Zaptel ISDN RAS application

     
     -- Info about application 'ZapRAS' -- 
     
     [Synopsis]
     Executes Zaptel ISDN RAS application
     
     [Description]
       ZapRAS(args): Executes a RAS server using pppd on the given channel.
     The channel must be a clear channel (i.e. PRI source) and a Zaptel
     channel to be able to use this function (No modem emulation is included).
     Your pppd must be patched to be zaptel aware. Arguments should be
     separated by | characters.
     
    
     

     

    ZapScan: Scan Zap channels to monitor calls

     
     -- Info about application 'ZapScan' -- 
     
     [Synopsis]
     Scan Zap channels to monitor calls
     
     [Description]
       ZapScan([group]) allows a call center manager to monitor Zap channels in
     a convenient way.  Use '#' to select the next channel and use '*' to exit
     Limit scanning to a channel GROUP by setting the option group argument.
     
    

     

     

     

    GET DATA <filename> [<timeout> [<max digits>]]

    Purpose Plays the given file and receives DTMF data. This is similar to STREAM FILE, but this command can accept and return many DTMF digits, while STREAM FILE returns immediately after the first DTMF digit is detected.


    Returns If the command ended due to timeout then the result is of the form

       200 Result=<digits> (timeout)
    

    where <digits> will be zero or more ASCII characters depending on what the user pressed.


    If the command ended because the maximum number of digits were entered then the result is of the form

       200 Result=<digits>
    

    and the number of digits returned will be equal to <max digits>.


    In either case what you get are actual ASCII characters. For example if the user pressed the one key, the three key and then the star key, the result would be

       200 Result=13* (timeout)
    

    This differs from other commands with return DTMF as numbers representing ASCII characters.

     

    Notes Don't give an extension with the filename.

    Asterisk looks for the file to play in /var/lib/asterisk/sounds

    If the user doesn't press any keys then the message plays, there is <timeout> milliseconds of silence then the command ends.

    The user has the opportunity to press a key at any time during the message or the post-message silence. If the user presses a key while the message is playing, the message stops playing. When the first key is pressed a timer starts counting for <timeout> milliseconds. Every time the user presses another key the timer is restarted. The command ends when the counter goes to zero or the maximum number of digits is entered, whichever happens first.

    If you don't specify a time out then a default timeout of 2000 is used following a pressed digit. If no digits are pressed then 6 seconds of silence follow the message.

    If you want to specify <max digits> then you *must* specify a <timeout> as well.

    If you don't specify <max digits> then the user can enter as many digits as they want.

    Pressing the # key has the same effect as the timer running out: the command ends and any previously keyed digits are returned. A side effect of this is that there is no way to read a # key using this command.

     

     


     

     

     

    GET VARIABLE <variablename>

    Purpose Fetch the value of a variable.


    Returns Returns 0 if the variable hasn't been set. Returns 1 followed by the value of the variable in parenthesis if it has been set.


    Example SET VARIABLE Foo "This is a test" 200 result=1 GET VARIABLE Foo 200 result=1 (This is a test)

     

     


     

     

    HANGUP [<channelname>]

    Purpose Hangup the specified channel. If no channel name is given, hang up the current channel.


    Returns If the hangup was successful then the result is 200 result=1

    If no channel matches the <channelname> you specified then the result is 200 result=-1


    Examples HANGUP Hangup the current channel.


    HANGUP Zap/9-1 Hangup channel Zap/9-1


    Notes The <channelname> to use is the same as the channel names reported by the Asterisk console 'show channels' command.

    With power comes responsibility. Hanging up channels other than your own isn't something that is done routinely. If you are not sure why you are doing so, then don't.

     


     

     

     

    RECEIVE CHAR <timeout>

    Purpose Receive a character of text from a connected channel. Waits up to <timeout> milliseconds for a character to arrive, or infinitely if <timeout> is zero.


    Returns If a character is received, returns the ASCII value of the character as a decimal number. For example if the character 'A' is received the result would be

       result=65
    

    If the channel does not support text reception or if the no character arrives in <timeout> milliseconds then the result is

       result=0 (timeout)
    

    On error or failure the result is

       result=-1
    

     

    Note Most channels do not support the reception of text.

     


     

     

     

    RECORD FILE <filename> <format> <escape digits> <timeout> [BEEP]

    Purpose Record sound to a file until an acceptable DTMF digit is received or a specified amount of time has passed. Optionally the file BEEP is played before recording begins.


    Returns The documentation in the code says on hangup the result is -1, however when I tried it the hangup result was

       result=0 (hangup)
    

    If an error occurs then the result is -1. This can happen, for example, if you ask for a non-existent format.

    If the user presses an acceptable escape digit then the result is a number representing the ASCII digit pressed. For example if recording terminated because the user pressed the '2' key the result is

       result=50 (dtmf)
    

     

    Example RECORD FILE foo gsm 123 5000 beep Record sound in gsm format to file 'foo.gsm'. Play a beep before starting to record. Stop recording if user presses '1', '2' or '3', after five seconds of recording, or if the user hangs up.


    Notes Don't put an extension on the filename; the filename extension will be created based on the <format> specified.

    The file will be created in /var/lib/asterisk/sounds


    <format> specifies what kind of file will be recorded. GSM is a commonly used format. To find out what other formats are supported start Asterisk with at a verbosity level of at least 2 (-vvc) and look for the messages that appear saying "== Registered file format <whatever>'. Most but not all registered formats can be used, for example, Asterisk can read but not write files in 'mp3' format.

    If you don't want ANY digits to terminate recording then specify "" instead of a digit string. To change the above example so no digits terminate recording use RECORD FILE foo gsm "" 5000 beep

    <timeout> is the maximum record time in milliseconds, or -1 for no timeout. When this document was written [Nov 2002] I was unable to get <timeout> to work; this command always kept recording until I pressed an escape digit or hung up, as if -1 had been specified for timeout. A patch to correct this has been submitted but has not yet shown up in the CVS tree.

     

     


     

     

    SAY DIGITS <digit string> <escape digits>

    Purpose Say the given digit string, returning early if any of the given DTMF escape digits are received on the channel. If no DTMF digits are to be received specify "" for <escape digits>.


    Returns Zero if playback completes without a digit being received, or the ASCII numerical representation of the digit pressed, or -1 on error or hangup.


    Example SAY DIGITS 123 78#

    The digits 'one', 'two', 'three' are spoken. If the user presses the '7', '8' or '#' key the speaking stops and the command ends. If the user pressed no keys the result would be 200 result=0. If the user pressed the '#' key then the result would be 200 result=35.

     


     

     

     

    SAY NUMBER <number> <escape digits>

    Purpose Say the given number, returning early if any of the given DTMF escape digits are received on the channel. If no DTMF digits are to be accepted specify "" for <escape digits>.


    Returns Zero if playback completes without a digit being received, or the ASCII numerical representation of the digit pressed, or -1 on error or hangup.


    Example SAY NUMBER 123 789

    The phrase 'one hundred twenty three' is spoken. If the user presses the '7', '8' or '9' key the speaking stops and the command ends. If the user pressed no keys the result would be 200 result=0. If the user pressed the '#' key then the result would be 200 result=35.

     


     

     

     

    SEND IMAGE <image>

    Purpose Send the specified image on a channel. The image name should not should not include the extension.


    Returns Zero if the image is sent or if the channel does not support image transmission. Returns -1 only on error or hangup.


    Notes Asterisk looks for the image in /var/lib/asterisk/images

    Most channels do not support the transmission of images.

     

     


     

     

     

    SEND TEXT "<text to send>"

    Purpose Send the given text to the connected channel.


    Returns 0 if text is sent or if the channel does not support text transmission. Returns -1 only on error or hangup.


    Example SEND TEXT "Hello world"


    Note Most channels do not support transmission of text.

     


     

     

     

    SET CALLERID <caller ID specification>

    Purpose Changes the caller ID of the current channel


    Returns Always returns 200 result=1


    Example SET CALLERID "John Smith"<1234567>


    Notes This command will let you take liberties with the <caller ID specification> but the format shown in the example above works well: the name enclosed in double quotes followed immediately by the number inside angle brackets. If there is no name then you can omit it.

    If the name contains no spaces you can omit the double quotes around it.

    The number must follow the name immediately; don't put a space between them.

    The angle brackets around the number are necessary; if you omit them the number will be considered to be part of the name.

     

     


     

     

     

    SET CONTEXT <new context>

    Purpose Sets the context for continuation upon exiting the application.


    Returns Always returns 200 result=0.


    Example SET CONTEXT demo


    Notes Setting the context does NOT automatically reset the extension and the priority; if you want to start at the top of the new context you should set extension and priority yourself.

    If you specify a non-existent context you receive no error indication (the result returned is still 'result=0') but you do get a warning message on the Asterisk console.

     

     


     

     

     

    SET EXTENSION <new extension>

    Purpose Set the extension to be used for continuation upon exiting the application.


    Returns Always returns 200 result=0.


    Example SET EXTENSION 23


    Note Setting the extension does NOT automatically reset the priority. If you want to start with the first priority of the extension you should set the priority yourself.

    If you specify a non-existent extension you receive no error indication (the result returned is still 'result=0') but you do get a warning message on the Asterisk console.

     

     


     

     

     

    SET PRIORITY <new priority number>

    Purpose Set the priority to be used for continuation upon exiting the application.


    Returns Always returns 200 result=0.


    Example SET PRIORITY 5


    Note If you specify a non-existent priority you receive no error indication of any sort: the result returned is still 'result=0' and no warning is issued on the Asterisk console.

     


     

     

     

    SET VARIABLE <variablename> <value>

    Purpose Sets a variable to the specified value. The variables so created can later be used by later using ${<variablename>} in the dialplan.


    Returns Always returns 200 result=1.


    Example SET VARIABLE station zap/3

    Creates a variable named 'station' with the value 'zap/3'.


    Notes Unlike most of Asterisk, variable names are case sensitive. The names 'Foo' and 'foo' refer to two separate and distinct variables.


    If the value being assigned contains spaces then put it inside double quotes.


    If you want double quotes inside the value then you have to escape them. For example to create a variable CID whose value is "John Doe"<555-1212> you could use: SET VARIABLE CID "\"John Doe \"<555-1212>

    Be aware that the language you are using may eat the backslash before it gets passed to Asterisk; you may have to use two backslashes or otherwise tell the language that, yes, you really do want a backslash in the string you are sending.


    These variables live in the channel Asterisk creates when you pickup a phone and as such they are both local and temporary. Variables created in one channel can not be accessed by another channel. When you hang up the phone, the channel is deleted and any variables in that channel are deleted as well.

     

     


     

     

    STREAM FILE <filename> <escape digits>

    Purpose Play the given audio file, allowing playback to be interrupted by a DTMF digit. This command is similar to the GET DATA command but this command returns after the first DTMF digit has been pressed while GET DATA can accumulated any number of digits before returning.


    Returns If playback finished with no acceptable digit being pressed the result is zero. If an acceptable digit was pressed the result is the decimal representation of the pressed digit. If the channel was disconnected or an error occurred the result is -1.


    Example STREAM FILE welcome #

    Plays the file 'welcome'. If the user presses the '#' key the playing stops and the command returns 200 result=35


    Note Don't give an extension with the filename.

    Asterisk looks for the file to play in /var/lib/asterisk/sounds

    Use double quotes if the message should play completely. For example to play audio file 'welcome' without allowing interruption by digits use: STREAM FILE welcome ""

     

     


     

     

     

    TDD MODE <setting>

    Purpose Enable or disable TDD transmission/reception on the current channel.


    Returns 1 if successful or 0 if the channel is not TDD capable.


    Example TDD MODE on


    Note The argument <setting> can be 'on' or 'tdd' to enable tdd mode. It can also be 'mate' which apparently sets some unspecified tdd mode. If it is anything else ('off' for example) then tdd mode is disabled.

     


     

     

     

    VERBOSE <message> [<level>]

    Purpose Sends <message> to the Asterisk console via the 'verbose' message system.


    Returns Always returns 1


    Example VERBOSE Hello 3

    Sends the message "Hello" to the console if the current Asterisk verbosity level is set to 3 or greater.


    Notes <level> is the verbosity level in the range 1 through 4.


    If your message contains spaces, then enclose it in double quotes.


    The Asterisk verbosity system works as follows. The Asterisk user gets to set the desired verbosity at startup time or later using the console 'set verbose' command. Messages are displayed on the console if their verbose level is less than or equal to desired verbosity set by the user. More important messages should have a low verbose level; less important messages should have a high verbose level.

     

     


     

     

     

    WAIT FOR DIGIT <timeout>

    Purpose Waits up to 'timeout' milliseconds for channel to receive a DTMF digit


    Returns -1 on channel failure, 0 if no digit is received in timeout or the numerical value of the ascii of the digit received.


    Note Use -1 for the timeout value if you want the call to wait indefinitely.


    Example WAIT FOR DIGIT 3000

    This page has no content. Enrich Array by contributing.

    このページは役立ちましたか?
    タグ (タグ編集)
    • No tags

    ファイル 0

     
    あなたはコメントを投稿するには ログイン しなければなりません。
    Powered by MindTouch Core