Class Execute
java.lang.Object
com.bytedesk.call.esl.client.dptools.Execute
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidanswer()Answers an incoming call or session.ApiCommand(String command, String args) voidMake an attended transfer.voidvoidbreakChannel(boolean all) Cancels currently running application on the given UUID.voidProvides the ability to bridge two endpoints.voidbridgeExport(String key, String value, boolean local) Export a channel variable across a bridge.voidSend a text message to a IM client.voidcngPlc()cng plc is just an app that says to perform plc on any lost packets and execute on originate.voidconference(String name) Start or join a conferencevoidconference(String name, String profile) Start or join a conferencevoidconference(String name, String profile, String pin) Start or join a conferencevoidconference(String name, String profile, String pin, String flags) Start or join a conferencevoidDeflect sends a Refer to the client.voiddelayEcho(long ms) Places the calling channel in delayed loopback mode.voiddetectSpeech(String args) Implements speech recognition.voiddisplaceSession(String path) Displace file.voiddisplaceSession(String path, String flags) Displace file.voiddisplaceSession(String path, String flags, long timeLimitMillis) Displace file.voidProvides the ability to spy on a channel.voidProvides the ability to spy on a channel.voidProvides the ability to spy on a channel.voidProvides the ability to spy on a channel.voidProvides the ability to spy on a channel.voideavesdrop(String uuid, boolean enableDTMF, String groupId, String failedWav, String newChannelWav, String idleWav) Provides the ability to spy on a channel.voidecho()Places the calling channel in loopback mode.voidendlessPlayback(String file) This application is used to play a file endlessly and the playing cannot be stopped externally.voidEval can be used to execute an internal API or simply log some text to the console.voidEvent application can be used to fire aribtrary events.voidexecuteExtension(String extension) execute an extension from within another extension with this dialplan application.voidexecuteExtension(String extension, String dialplan) execute an extension from within another extension with this dialplan application.voidexecuteExtension(String extension, String dialplan, String context) execute an extension from within another extension with this dialplan application.voidExports a channel variable from the A leg to the B leg.voidWhen a fax is detected, the call will be routed to the ext in the contextvoidFlushes DTMFs received on a channel.voidGenerate TGML tones.voidGenerate TGML tones.voidadds/deletes groups to/from the db(internal db or ODBC) and allows calls to these groups in conjunction with the bridge-application.voidhangup()Hangs up a channel, with an optional reason supplied.voidHangs up a channel, with an optional reason supplied.voidinfo()Dumps channel information to console.voidDumps channel information to console.voidAllows one channel to bridge itself to the a or b leg of another call.voidLogs a string of text to the consolevoidLogs a string of text to the consolevoidCreates a directory.private booleanvoidpark()Places a channel "on hold" in the switch, instead of in the phone.voidSpeak a phrase of text using a predefined phrase macro.voidPermits proper answering of multiple simultaneous calls to the same pickup group.playAndDetectSpeech(String file, String engine, String grammer) Play while doing speech recognition.playAndDetectSpeech(String file, String engine, String grammer, String params) Play while doing speech recognition.playAndGetDigits(int min, int max, int tries, int timeout, String terminator, String file, String invalidFile, String regexp, int digitTimeout) Play a prompt and get digits.voidPlays a sound file on the current channel.voidPlays a sound file on the current channel.private voidplaybackControl(String cmd) voidManage the audio being played into a channel from a sound filevoidManage the audio being played into a channel from a sound filevoidplaybackSeek(int samples) Manage the audio being played into a channel from a sound filevoidplaybackSpeed(int step) Manage the audio being played into a channel from a sound filevoidManage the audio being played into a channel from a sound filevoidplaybackVolume(int step) Manage the audio being played into a channel from a sound filevoidequivalent to a SIP status code 183 with SDP.voidSends an event of either type PRESENCE_IN or PRESENCE_OUT.voidSet caller privacy on calls.voidSend DTMF digits after a bridge is successful from the session using the method(s) configured on the endpoint in use. use the character w for a .5 second delay and the character W for a 1 second delay.voidSend DTMF digits after a bridge is successful from the session using the method(s) configured on the endpoint in use. use the character w for a .5 second delay and the character W for a 1 second delay.Read DTMF (touch-tone) digits.voidRecord is used for recording messages, like in a voicemail system.voidrecord(String file, boolean append, boolean wateResources, int timeLimitSeconds, int silenceThreshold, int silenceHits, String recordTile, String recordCopyright, String recordSoftware, String recordArtist, String recordComment, String recordDate, int recordRate) Record is used for recording messages, like in a voicemail system.private voidrecord(String action, String file, int optionalTimeLimitSeconds, int optionalSilenceThreshold, int optionalSilenceHits, boolean wateResources, boolean append, String optionalRecordTile, String optionalRecordCopyright, String optionalRecordSoftware, String optionalRecordArtist, String optionalRecordComment, String optionalRecordDate, int optionalRecordRate) voidrecordSession(String file) Records an entire phone call or session.voidrecordSession(String file, boolean append, boolean wateResources, int timeLimitSeconds, int silenceThreshold, int silenceHits, String recordTile, String recordCopyright, String recordSoftware, String recordArtist, String recordComment, String recordDate, int recordRate) Records an entire phone call or session.voidCan redirect a channel to another endpoint, you must take care to not redirect incompatible channels, as that wont have the desired effect.voidSend SIP session respond code to the SIP device.voidThis causes an 180 Ringing to be sent to the originator.voidThe say application will use the pre-recorded sound files to read or say various things like dates, times, digits, etc.voidThe say application will use the pre-recorded sound files to read or say various things like dates, times, digits, etc.voidschedBroadcast(long seconds, boolean interval, String path, String leg) Schedule future broadcast.voidschedHangup(long seconds, boolean interval) The sched_hangup application allows you to schedule a hangup action for a call, basically to limit call duration.voidschedHangup(long seconds, boolean interval, String cause) The sched_hangup application allows you to schedule a hangup action for a call, basically to limit call duration.voidschedTransfer(long seconds, boolean interval, String extension) Schedule a transfer in the future.voidschedTransfer(long seconds, boolean interval, String extension, String dialPlan) Schedule a transfer in the future.voidschedTransfer(long seconds, boolean interval, String extension, String dialPlan, String context) Schedule a transfer in the future.voidsendDiplay(String message) Sends an info packet with a sipfrag.voidSend DTMF digits from the session using the method(s) configured on the endpoint in use.voidSend DTMF digits from the session using the method(s) configured on the endpoint in use.private CommandResponsesendExeMesg(String app) private CommandResponsesendExeMesg(String app, String args) voidSet a channel variable for the channel calling the application.voidvoidImmediately transfer the calling channel to a new context.voidImmediately transfer the calling channel to a new context.voidImmediately transfer the calling channel to a new context.
-
Field Details
-
api
IModEslApi api -
_uuid
String _uuid
-
-
Constructor Details
-
Execute
-
-
Method Details
-
sendDiplay
Sends an info packet with a sipfrag. If the phone supports it will show message on the display.- Parameters:
message- to display- Throws:
ExecuteException- See Also:
-
answer
Answers an incoming call or session.- Throws:
ExecuteException- See Also:
-
attAnswer
Make an attended transfer.- Parameters:
channelUrl- ex: sofia/default/${attxfer_callthis}- Throws:
ExecuteException- See Also:
-
bindMetaApp
public void bindMetaApp(String key, String leg, String flags, String application, String params) throws ExecuteException - Parameters:
key- the button you want to respond to after the * button is pressed. If you wanted to respond to *1, you would put 1 in place of KEY. You are limited to a single digit.leg- which call leg(s) to listen on. Acceptable parameters are a, b or ab.flags- modifies the behavior. The following flags are available: a - Respond on A leg, b - Respond on B leg, o - Respond on opposite leg, s - Respond on same leg, i - Execute inline, 1 - Unbind this meta_app after it is used one timeapplication- is which application you want to execute.params- are the arguments you want or need to provide to the APPLICATION.- Throws:
ExecuteException- See Also:
-
breakChannel
Cancels currently running application on the given UUID. Dialplan execution proceeds to the next application. Optionally clears all unprocessed events (queued applications) on the channel.- Parameters:
all- clear all unprocessed events (queued applications) on the channel, otherwise just the current application.- Throws:
ExecuteException- See Also:
-
bridge
Provides the ability to bridge two endpoints. Generally used to route an incoming call to one or more endpoints. Multiple endpoints can be dialed simultaneously or sequentially using the comma and pipe delimiters, respectively.- Throws:
ExecuteException- See Also:
-
bridgeExport
Export a channel variable across a bridge. This application differs from export in that it works with *any* kind of bridge, not just a bridge called from the dialplan. For example, bridge_export will export its variables if the leg is uuid_transfer'd whereas export will not- Parameters:
key- channel variable namevalue- channel variable valuelocal- to only export to the B leg false, otherwise true- Throws:
ExecuteException- See Also:
-
chat
Send a text message to a IM client.- Parameters:
proto- ex: sipfrom- ex: 1000@127.0.0.1to- ex: 1001@127.0.0.1message- ex: Hello chat from freeswitch- Throws:
ExecuteException- See Also:
-
cngPlc
cng plc is just an app that says to perform plc on any lost packets and execute on originate. It is like execute on answer, etc. but only for outbound calls during originate.- Throws:
ExecuteException- See Also:
-
conference
Start or join a conference- Throws:
ExecuteException
-
conference
Start or join a conference- Throws:
ExecuteException
-
conference
Start or join a conference- Throws:
ExecuteException
-
conference
public void conference(String name, String profile, String pin, String flags) throws ExecuteException Start or join a conference- Throws:
ExecuteException
-
deflect
Deflect sends a Refer to the client. The deflect application allows FreeSWITCH to be removed from the list of connection hops and tell the originator to reroute the call. When using the deflect application, FreeSWITCH first hangs up the channel and then send a REFER message and a new INVITE message to the originator. The originator, which could be a gateway or sip proxy, should read the INVITE and reroute the call accordingly.- Parameters:
endpoint- SIP URI to contact (with or without "sip:")- Throws:
ExecuteException- See Also:
-
delayEcho
Places the calling channel in delayed loopback mode. It simply returns everything sent, including voice, DTMF, etc but with the specified delay [ms]. It is generally useful for checking if RTP audio path works both ways. Normal echo app can fail when tested on speaker phone. -
detectSpeech
Implements speech recognition.- Parameters:
args-[ ] grammar [ ] grammaron grammaroff grammarsalloff nogrammar param pause resume start_input_timers stop - Throws:
ExecuteException- See Also:
-
displaceSession
Displace file. Plays a file or stream to a channel.- Parameters:
path- any sound format FreeSWITCH supports, wav, local_steam, shout etc.- Throws:
ExecuteException- See Also:
-
displaceSession
Displace file. Plays a file or stream to a channel.- Parameters:
path- any sound format FreeSWITCH supports, wav, local_steam, shout etc.flags- flags to stream, null if none- Throws:
ExecuteException- See Also:
-
displaceSession
public void displaceSession(String path, String flags, long timeLimitMillis) throws ExecuteException Displace file. Plays a file or stream to a channel.- Parameters:
path- any sound format FreeSWITCH supports, wav, local_steam, shout etc.flags- flags to stream, null if nonetimeLimitMillis- optional time limit, 0 for none- Throws:
ExecuteException- See Also:
-
eavesdrop
Provides the ability to spy on a channel. It often referred to as call barge. For persistent spying on a user see Mod_spy. DTMF signals during eavesdrop, 2 to speak with the uuid, 1 to speak with the other half, 3 to engage a three way, 0 to restore eavesdrop, * to next channel.- Parameters:
uuid- uuid of the call or 'all' for all- Throws:
ExecuteException- See Also:
-
eavesdrop
Provides the ability to spy on a channel. It often referred to as call barge. For persistent spying on a user see Mod_spy. DTMF signals during eavesdrop, 2 to speak with the uuid, 1 to speak with the other half, 3 to engage a three way, 0 to restore eavesdrop, * to next channel.- Parameters:
uuid- uuid of the call or 'all' for all- Throws:
ExecuteException- See Also:
-
eavesdrop
Provides the ability to spy on a channel. It often referred to as call barge. For persistent spying on a user see Mod_spy. DTMF signals during eavesdrop, 2 to speak with the uuid, 1 to speak with the other half, 3 to engage a three way, 0 to restore eavesdrop, * to next channel.- Parameters:
uuid- uuid of the call or 'all' for allgroupId- if specified, eavesdrop only works with channels that have an "eavesdrop_group" channel variable set to the same name.- Throws:
ExecuteException- See Also:
-
eavesdrop
public void eavesdrop(String uuid, boolean enableDTMF, String groupId, String failedWav) throws ExecuteException Provides the ability to spy on a channel. It often referred to as call barge. For persistent spying on a user see Mod_spy. DTMF signals during eavesdrop, 2 to speak with the uuid, 1 to speak with the other half, 3 to engage a three way, 0 to restore eavesdrop, * to next channel.- Parameters:
uuid- uuid of the call or 'all' for allgroupId- if specified, eavesdrop only works with channels that have an "eavesdrop_group" channel variable set to the same name.- Throws:
ExecuteException- See Also:
-
eavesdrop
public void eavesdrop(String uuid, boolean enableDTMF, String groupId, String failedWav, String newChannelWav) throws ExecuteException Provides the ability to spy on a channel. It often referred to as call barge. For persistent spying on a user see Mod_spy. DTMF signals during eavesdrop, 2 to speak with the uuid, 1 to speak with the other half, 3 to engage a three way, 0 to restore eavesdrop, * to next channel.- Parameters:
uuid- uuid of the call or 'all' for allgroupId- if specified, eavesdrop only works with channels that have an "eavesdrop_group" channel variable set to the same name.failedWav- ex: /sounds/failed.wavnewChannelWav- ex: /sounds/new_chan_announce.wav- Throws:
ExecuteException- See Also:
-
eavesdrop
public void eavesdrop(String uuid, boolean enableDTMF, String groupId, String failedWav, String newChannelWav, String idleWav) throws ExecuteException Provides the ability to spy on a channel. It often referred to as call barge. For persistent spying on a user see Mod_spy. DTMF signals during eavesdrop, 2 to speak with the uuid, 1 to speak with the other half, 3 to engage a three way, 0 to restore eavesdrop, * to next channel.- Parameters:
uuid- uuid of the call or 'all' for allgroupId- if specified, eavesdrop only works with channels that have an "eavesdrop_group" channel variable set to the same name.failedWav- ex: /sounds/failed.wavnewChannelWav- ex: /sounds/new_chan_announce.wavidleWav- ex: /sounds/idle.wav- Throws:
ExecuteException- See Also:
-
echo
Places the calling channel in loopback mode. It simply returns everything sent, including voice, DTMF, etc. Consider it an "echo test". It is generally useful for checking delay in a call path.- Throws:
ExecuteException- See Also:
-
endlessPlayback
This application is used to play a file endlessly and the playing cannot be stopped externally.- Parameters:
file- to play- Throws:
ExecuteException
-
eval
Eval can be used to execute an internal API or simply log some text to the console.- Parameters:
string- to eval- Throws:
ExecuteException- See Also:
-
event
Event application can be used to fire aribtrary events.- Parameters:
event- to send ex: Event-Subclass=myevent::notify,Event-Name=CUSTOM,key1 =value1,key2=value2- Throws:
ExecuteException- See Also:
-
executeExtension
execute an extension from within another extension with this dialplan application.- Parameters:
extension-- Throws:
ExecuteException- See Also:
-
executeExtension
execute an extension from within another extension with this dialplan application. -
executeExtension
public void executeExtension(String extension, String dialplan, String context) throws ExecuteException execute an extension from within another extension with this dialplan application.- Parameters:
context- (will only be set if optionalDialplan is not null)- Throws:
ExecuteException- See Also:
-
export
Exports a channel variable from the A leg to the B leg. Variables and their values will be replicated in any new channels created from the one export was called.- Parameters:
key- channel variable namevalue- channel variable valuelocal- to only export to the B leg false, otherwise true- Throws:
ExecuteException- See Also:
-
faxDetect
When a fax is detected, the call will be routed to the ext in the context -
flushDTMF
Flushes DTMFs received on a channel. Useful in cases where callers may have entered extra digits in one dialog and you want to flush them out before sending them into another dialog. -
gentones
Generate TGML tones.- Parameters:
tone- ex: Generate a 500ms beep at 800Hz, tone = "%(500,0,800)"- Throws:
ExecuteException- See Also:
-
gentones
Generate TGML tones.- Parameters:
tone- ex: Generate a 500ms beep at 800Hz, tone = "%(500,0,800)"loops- set to a non zero nuber, -1 for infinate loop- Throws:
ExecuteException- See Also:
-
group
adds/deletes groups to/from the db(internal db or ODBC) and allows calls to these groups in conjunction with the bridge-application. Depends on mod_db and mod_dptools.- Parameters:
action- (insert|delete|call )groupName- ex: :01@example.comurl- ex: sofia/gateway/provider/0123456789- Throws:
ExecuteException- See Also:
-
hangup
Hangs up a channel, with an optional reason supplied.- Throws:
ExecuteException- See Also:
-
hangup
Hangs up a channel, with an optional reason supplied.- Parameters:
reason- if not null the hangup reason, ex: USER_BUSY- Throws:
ExecuteException- See Also:
-
info
Dumps channel information to console.- Throws:
ExecuteException- See Also:
-
info
Dumps channel information to console.- Parameters:
level- if not null the level to log. Ex: notice Ex: bridge_pre_execute_bleg_app=info- Throws:
ExecuteException- See Also:
-
intercept
Allows one channel to bridge itself to the a or b leg of another call. The remaining leg of the original call gets hungup- Parameters:
bleg- intercept the b leg of the call- Throws:
ExecuteException
-
log
Logs a string of text to the console -
log
Logs a string of text to the console- Parameters:
level- ex: DEBUG, INFO- Throws:
ExecuteException- See Also:
-
mkdir
Creates a directory. Also creates parent directories by default(When they don't exist).- Throws:
ExecuteException- See Also:
-
park
Places a channel "on hold" in the switch, instead of in the phone. Allows for a number of different options, including: Set caller in a place where the channel won't be hungup on, while waiting for someone to talk to. Generic "hold" mechanism, where you transfer a caller to it. Please note that to retrieve a call that has been "parked", you'll have to bridge to them or transfer the call to a valid location. Also, remember that parking a call does *NOT* supply music on hold or any other media. Park is quite literally a way to put a call in limbo until you you bridge/uuid_bridge or transfer/uuid_transfer it. For a different means of using 'park', see mod_fifo.- Throws:
ExecuteException- See Also:
-
phrase
Speak a phrase of text using a predefined phrase macro. (For more information on TTS see mod_cepstral and OpenMRCP.) See also the speech phrase management page for more information and examples; This command relies on the configuration in the phrases section of the freeswitch.xml file and including xml files in lang/en/*.xml. Following is a sample of phrases management:- Parameters:
macroName- ex: spell, timespec, saydate- Throws:
ExecuteException- See Also:
-
pickup
Permits proper answering of multiple simultaneous calls to the same pickup group.- Throws:
ExecuteException- See Also:
-
playAndDetectSpeech
public String playAndDetectSpeech(String file, String engine, String grammer) throws ExecuteException Play while doing speech recognition. Result is stored in the detect_speech_result channel variable. -
playAndDetectSpeech
public String playAndDetectSpeech(String file, String engine, String grammer, String params) throws ExecuteException Play while doing speech recognition. Result is stored in the detect_speech_result channel variable. -
playAndGetDigits
public String playAndGetDigits(int min, int max, int tries, int timeout, String terminator, String file, String invalidFile, String regexp, int digitTimeout) throws ExecuteException Play a prompt and get digits.- Returns:
- collected digits or null if none
- Throws:
ExecuteException- See Also:
-
playback
Plays a sound file on the current channel. -
playback
Plays a sound file on the current channel.- Parameters:
data- ex: var1=val1,var2=val2 adds specific vars that will be sent in PLAYBACK_START and PLAYBACK_STOP events- Throws:
ExecuteException- See Also:
-
playbackSpeed
Manage the audio being played into a channel from a sound file- Parameters:
step- <+[step]>|<-[step]>- Throws:
ExecuteException- See Also:
-
playbackVolume
Manage the audio being played into a channel from a sound file- Parameters:
step- <+[step]>|<-[step]>- Throws:
ExecuteException- See Also:
-
playbackPause
Manage the audio being played into a channel from a sound file- Throws:
ExecuteException- See Also:
-
playbackTruncate
Manage the audio being played into a channel from a sound file- Throws:
ExecuteException- See Also:
-
playbackRestart
Manage the audio being played into a channel from a sound file- Throws:
ExecuteException- See Also:
-
playbackSeek
Manage the audio being played into a channel from a sound file- Parameters:
samples- <+[samples]>|<-[samples]> Samples are the literally the number of samples in the file to jump forward or backward. In an 8kHz file, 8000 samples would represent one second, in a 16kHz file 16000 samples would be one second, etc- Throws:
ExecuteException- See Also:
-
playbackControl
- Throws:
ExecuteException
-
preAnswer
equivalent to a SIP status code 183 with SDP. (This is the same as cmd Progress in Asterisk.) It establishes media (early media) but does not answer. You can use this for example to send an in-band error message to the caller before disconnecting them (pre_answer, playback, reject with a cause code of xxxx). -
presence
Sends an event of either type PRESENCE_IN or PRESENCE_OUT. Currently, this function is not very useful in conjunction with sofia. This does not affect the presence of hook state for use with BLF either, but sending an event that expresses the user's hook state does.- Parameters:
in- true if in, false if outrpid- ex: dnd, unavailable- Throws:
ExecuteException- See Also:
-
privacy
Set caller privacy on calls.- Parameters:
type- ex: no, yes, name, full, member- Throws:
ExecuteException- See Also:
-
queueDTMF
Send DTMF digits after a bridge is successful from the session using the method(s) configured on the endpoint in use. use the character w for a .5 second delay and the character W for a 1 second delay. -
queueDTMF
Send DTMF digits after a bridge is successful from the session using the method(s) configured on the endpoint in use. use the character w for a .5 second delay and the character W for a 1 second delay.- Parameters:
durationsMillis- ignored if <=0- Throws:
ExecuteException- See Also:
-
read
public String read(int min, int max, String soundFile, long timeout, String terminators) throws ExecuteException Read DTMF (touch-tone) digits.- Parameters:
min- Minimum number of digits to fetch.max- Maximum number of digits to fetch.soundFile- Sound file to play before digits are fetched.timeout- Number of milliseconds to wait on each digitterminators- Digits used to end input if less thandigits have been pressed. (Typically '#') - Returns:
- read string or null
- Throws:
ExecuteException- See Also:
-
record
Record is used for recording messages, like in a voicemail system. This application will record a file to file- Throws:
ExecuteException- See Also:
-
record
public void record(String file, boolean append, boolean wateResources, int timeLimitSeconds, int silenceThreshold, int silenceHits, String recordTile, String recordCopyright, String recordSoftware, String recordArtist, String recordComment, String recordDate, int recordRate) throws ExecuteException Record is used for recording messages, like in a voicemail system. This application will record a file to file- Parameters:
timeLimitSeconds- the maximum duration of the recording.silenceThreshold- is the energy level.wateResources- By default record doesn't send RTP packets. This is generally acceptable, but for longer recordings or depending on the RTP timer of your gateway, your channel may hangup with cause MEDIA_TIMEOUT. Setting this variable will 'waste' bandwidth by sending RTP even during recording. The value can be true/false/. By default the silence factor is 1400 if true silenceHits- how many positive hits on being below that thresh you can tolerate to stop default hits are sample rate * 3 / the number of samples per frame so the default, if missing, is 3.append- append or overwite if file existsrecordTile- store in the file header meta data (provided the file format supports meta headers).recordCopyright- store in the file header meta data (provided the file format supports meta headers).recordSoftware- store in the file header meta data (provided the file format supports meta headers).recordArtist- store in the file header meta data (provided the file format supports meta headers).recordComment- store in the file header meta data (provided the file format supports meta headers).recordDate- store in the file header meta data (provided the file format supports meta headers).recordRate- the sample rate of the recording.- Throws:
ExecuteException- See Also:
-
recordSession
Records an entire phone call or session.- Throws:
ExecuteException- See Also:
-
recordSession
public void recordSession(String file, boolean append, boolean wateResources, int timeLimitSeconds, int silenceThreshold, int silenceHits, String recordTile, String recordCopyright, String recordSoftware, String recordArtist, String recordComment, String recordDate, int recordRate) throws ExecuteException Records an entire phone call or session.- Parameters:
timeLimitSeconds- the maximum duration of the recording.silenceThreshold- is the energy level.wateResources- By default record doesn't send RTP packets. This is generally acceptable, but for longer recordings or depending on the RTP timer of your gateway, your channel may hangup with cause MEDIA_TIMEOUT. Setting this variable will 'waste' bandwidth by sending RTP even during recording. The value can be true/false/. By default the silence factor is 1400 if true silenceHits- how many positive hits on being below that thresh you can tolerate to stop default hits are sample rate * 3 / the number of samples per frame so the default, if missing, is 3.append- append or overwite if file existsrecordTile- store in the file header meta data (provided the file format supports meta headers).recordCopyright- store in the file header meta data (provided the file format supports meta headers).recordSoftware- store in the file header meta data (provided the file format supports meta headers).recordArtist- store in the file header meta data (provided the file format supports meta headers).recordComment- store in the file header meta data (provided the file format supports meta headers).recordDate- store in the file header meta data (provided the file format supports meta headers).recordRate- the sample rate of the recording.- Throws:
ExecuteException- See Also:
-
record
private void record(String action, String file, int optionalTimeLimitSeconds, int optionalSilenceThreshold, int optionalSilenceHits, boolean wateResources, boolean append, String optionalRecordTile, String optionalRecordCopyright, String optionalRecordSoftware, String optionalRecordArtist, String optionalRecordComment, String optionalRecordDate, int optionalRecordRate) throws ExecuteException - Throws:
ExecuteException
-
redirect
Can redirect a channel to another endpoint, you must take care to not redirect incompatible channels, as that wont have the desired effect. Ie if you redirect to a SIP url it should be a SIP channel. By providing a single SIP URI FreeSWITCH will issue a 302 "Moved Temporarily":- Parameters:
endpoint- ex:"sip:foo@bar.com " or "sip:foo@bar.com,sip:foo@end.com"- Throws:
ExecuteException- See Also:
-
respond
Send SIP session respond code to the SIP device.- Parameters:
code- ex: "407" or "480 Try again later"- Throws:
ExecuteException- See Also:
-
ringReady
This causes an 180 Ringing to be sent to the originator. -
say
public void say(String moduleName, String text, String sayType, String sayMethod) throws ExecuteException The say application will use the pre-recorded sound files to read or say various things like dates, times, digits, etc. The say application can read digits and numbers as well as dollar amounts, date/time values and IP addresses. It can also spell out alpha-numeric text, including punctuation marks. There's a transcript of the pre-recorded files in the sources under docs/phrase/phrase_en.xml- Parameters:
moduleName- Module name is usually the channel language, e.g. "en" or "es"sayType- Say type is one of the following NUMBER ITEMS PERSONS MESSAGES CURRENCY TIME_MEASUREMENT CURRENT_DATE CURRENT_TIME CURRENT_DATE_TIME TELEPHONE_NUMBER TELEPHONE_EXTENSION URL IP_ADDRESS EMAIL_ADDRESS POSTAL_ADDRESS ACCOUNT_NUMBER NAME_SPELLED NAME_PHONETIC SHORT_DATE_TIMEsayMethod- Say method is one of the following N/A PRONOUNCED ITERATED COUNTED- Throws:
ExecuteException- See Also:
-
say
public void say(String moduleName, String text, String sayType, String sayMethod, String gender) throws ExecuteException The say application will use the pre-recorded sound files to read or say various things like dates, times, digits, etc. The say application can read digits and numbers as well as dollar amounts, date/time values and IP addresses. It can also spell out alpha-numeric text, including punctuation marks. There's a transcript of the pre-recorded files in the sources under docs/phrase/phrase_en.xml- Parameters:
moduleName- Module name is usually the channel language, e.g. "en" or "es"sayType- Say type is one of the following NUMBER ITEMS PERSONS MESSAGES CURRENCY TIME_MEASUREMENT CURRENT_DATE CURRENT_TIME CURRENT_DATE_TIME TELEPHONE_NUMBER TELEPHONE_EXTENSION URL IP_ADDRESS EMAIL_ADDRESS POSTAL_ADDRESS ACCOUNT_NUMBER NAME_SPELLED NAME_PHONETIC SHORT_DATE_TIMEsayMethod- Say method is one of the following N/A PRONOUNCED ITERATED COUNTEDgender- Say gender is one of the following (For languages with gender-specific grammar, like French and German) FEMININE MASCULINE NEUTER- Throws:
ExecuteException- See Also:
-
schedBroadcast
public void schedBroadcast(long seconds, boolean interval, String path, String leg) throws ExecuteException Schedule future broadcast.- Parameters:
seconds- the epoc time in the future, or the number of seconds in the futureinterval- is the param seconds an epoc time or intervalpath- ex: /tmp/howdy.wavleg- can be aleg,bleg,both- Throws:
ExecuteException
-
schedHangup
The sched_hangup application allows you to schedule a hangup action for a call, basically to limit call duration.- Parameters:
seconds- the epoc time in the future, or the number of seconds in the futureinterval- is the param seconds an epoc time or interval- Throws:
ExecuteException
-
schedHangup
The sched_hangup application allows you to schedule a hangup action for a call, basically to limit call duration.- Parameters:
seconds- the epoc time in the future, or the number of seconds in the futureinterval- is the param seconds an epoc time or intervalcause- ex:allotted_timeout- Throws:
ExecuteException
-
schedTransfer
Schedule a transfer in the future.- Parameters:
seconds- the epoc time in the future, or the number of seconds in the futureinterval- is the param seconds an epoc time or interval- Throws:
ExecuteException- See Also:
-
schedTransfer
public void schedTransfer(long seconds, boolean interval, String extension, String dialPlan) throws ExecuteException Schedule a transfer in the future.- Parameters:
seconds- the epoc time in the future, or the number of seconds in the futureinterval- is the param seconds an epoc time or interval- Throws:
ExecuteException- See Also:
-
schedTransfer
public void schedTransfer(long seconds, boolean interval, String extension, String dialPlan, String context) throws ExecuteException Schedule a transfer in the future.- Parameters:
seconds- the epoc time in the future, or the number of seconds in the futureinterval- is the param seconds an epoc time or interval- Throws:
ExecuteException- See Also:
-
sendDTMF
Send DTMF digits from the session using the method(s) configured on the endpoint in use. Use the character w for a .5 second delay and the character W for a 1 second delay.- Throws:
ExecuteException
-
sendDTMF
Send DTMF digits from the session using the method(s) configured on the endpoint in use. Use the character w for a .5 second delay and the character W for a 1 second delay.- Throws:
ExecuteException
-
set
Set a channel variable for the channel calling the application.- Parameters:
key- channel_variable namevalue- channel_variable value- Throws:
ExecuteException
-
speak
- Throws:
ExecuteException
-
transfer
Immediately transfer the calling channel to a new context. If there happens to be an xml extension namedthen control is "warped" directly to that extension. Otherwise it goes through the entire context checking for a match. -
transfer
Immediately transfer the calling channel to a new context. If there happens to be an xml extension namedthen control is "warped" directly to that extension. Otherwise it goes through the entire context checking for a match. -
transfer
public void transfer(String destinationNumber, String dialplan, String context) throws ExecuteException Immediately transfer the calling channel to a new context. If there happens to be an xml extension namedthen control is "warped" directly to that extension. Otherwise it goes through the entire context checking for a match. -
ApiCommand
-
sendExeMesg
- Throws:
ExecuteException
-
sendExeMesg
- Throws:
ExecuteException
-
nn
-