cisco.uc.cuae.legacy
Class BaseMediaControlServer

java.lang.Object
  extended by cisco.uc.cuae.legacy.BaseMediaControlServer
All Implemented Interfaces:
CuaeCommon, CuaeCommonServer, MediaControl, MediaControlServer, etch.bindings.java.support.ObjSession

public class BaseMediaControlServer
extends java.lang.Object
implements MediaControlServer, etch.bindings.java.support.ObjSession

Base implementation of MediaControlServer, with default method implementations which throw UnsupportedOperationException. Extend this class to provide implementations of messages from the client.

See Also:
ImplMediaControlServer

Nested Class Summary
 
Nested classes/interfaces inherited from interface cisco.uc.cuae.legacy.MediaControl
MediaControl.Action, MediaControl.AdjustmentType, MediaControl.AdjustPlayOptions, MediaControl.AdjustPlayResult, MediaControl.AudioFileEncoding, MediaControl.AudioFileFormat, MediaControl.CreateConferenceOptions, MediaControl.CreateConferenceResult, MediaControl.CreateConnectionOptions, MediaControl.CreateConnectionResult, MediaControl.DeleteConnectionOptions, MediaControl.DeleteConnectionResult, MediaControl.DetectNonSilenceOptions, MediaControl.DetectNonSilenceResult, MediaControl.DetectSilenceOptions, MediaControl.DetectSilenceResult, MediaControl.GatherDigitsOptions, MediaControl.GatherDigitsResult, MediaControl.JoinConferenceOptions, MediaControl.JoinConferenceResult, MediaControl.LeaveConferenceOptions, MediaControl.LeaveConferenceResult, MediaControl.ManageGrammarOptions, MediaControl.ManageGrammarResult, MediaControl.MediaRxCodec, MediaControl.ModifyConnectionOptions, MediaControl.ModifyConnectionResult, MediaControl.PlayOptions, MediaControl.PlayResult, MediaControl.PlayToneOptions, MediaControl.PlayToneResult, MediaControl.RecordOptions, MediaControl.RecordResult, MediaControl.ReserveConnectionOptions, MediaControl.ReserveConnectionResult, MediaControl.SaveDynamicGrammarOptions, MediaControl.SaveDynamicGrammarResult, MediaControl.SendDigitsOptions, MediaControl.SendDigitsResult, MediaControl.SetConfereeAttributeOptions, MediaControl.SetConfereeAttributeResult, MediaControl.StopMediaOperationOptions, MediaControl.StopMediaOperationResult, MediaControl.TerminationCondition, MediaControl.VoiceRecognitionOptions, MediaControl.VoiceRecognitionResult
 
Nested classes/interfaces inherited from interface cisco.uc.cuae.legacy.CuaeCommon
CuaeCommon.CuaeResult
 
Constructor Summary
BaseMediaControlServer()
           
 
Method Summary
 void _sessionControl(java.lang.Object control, java.lang.Object value)
           
 void _sessionNotify(java.lang.Object event)
           
 java.lang.Object _sessionQuery(java.lang.Object query)
           
 MediaControl.AdjustPlayResult adjustPlay(java.lang.String sessionId, java.lang.String connectionId, java.lang.Integer volume, java.lang.Integer speed, MediaControl.AdjustmentType adjustmentType, java.lang.Long toggleType, MediaControl.AdjustPlayOptions options)
          Modifies the properties of a currently executing play operation.
 MediaControl.DetectNonSilenceResult beginDetectNonSilence(java.lang.String sessionId, java.lang.String connectionId, java.lang.Long nonSilenceTime, MediaControl.DetectNonSilenceOptions options, java.lang.Object state)
           
 MediaControl.DetectSilenceResult beginDetectSilence(java.lang.String sessionId, java.lang.String connectionId, java.lang.Long silenceTime, MediaControl.DetectSilenceOptions options, java.lang.Object state)
           
 MediaControl.GatherDigitsResult beginGatherDigits(java.lang.String sessionId, java.lang.String connectionId, MediaControl.GatherDigitsOptions options, java.lang.Object state)
           
 MediaControl.ManageGrammarResult beginManageGrammar(java.lang.String sessionId, java.lang.String connectionId, java.lang.String grammar1, MediaControl.Action action, MediaControl.ManageGrammarOptions options, java.lang.Object state)
           
 MediaControl.PlayResult beginPlay(java.lang.String sessionId, java.lang.String prompt1, java.lang.String connectionId, java.lang.String conferenceId, MediaControl.PlayOptions options, java.lang.Object state)
           
 MediaControl.PlayToneResult beginPlayTone(java.lang.String sessionId, java.lang.String connectionId, java.lang.String conferenceId, java.lang.Long duration, java.lang.Long frequency1, java.lang.Integer amplitude1, java.lang.Long frequency2, java.lang.Integer amplitude2, MediaControl.PlayToneOptions options, java.lang.Object state)
           
 MediaControl.RecordResult beginRecord(java.lang.String sessionId, java.lang.String filename, java.lang.Long expires, MediaControl.RecordOptions options, java.lang.Object state)
           
 MediaControl.VoiceRecognitionResult beginVoiceRecognition(java.lang.String sessionId, java.lang.String connectionId, java.lang.String grammar1, java.lang.String prompt1, java.lang.Boolean voiceBargeIn, java.lang.Boolean cancelOnDigit, MediaControl.VoiceRecognitionOptions options, java.lang.Object state)
           
 MediaControl.CreateConferenceResult createConference(java.lang.String sessionId, java.lang.String connectionId, java.lang.Boolean soundToneOnJoin, MediaControl.CreateConferenceOptions options)
          Creates a conference and places the specified connection into it as the 1st participant.
 MediaControl.CreateConnectionResult createConnection(java.lang.String sessionId, java.lang.String mediaTxIP, java.lang.Long mediaTxPort, java.lang.String connectionId, MediaControl.CreateConnectionOptions options)
          Establishes both Rx and Tx RTP streams for a new or reserved connection on a media engine.
 MediaControl.DeleteConnectionResult deleteConnection(java.lang.String sessionId, java.lang.String connectionId, java.lang.String conferenceId, MediaControl.DeleteConnectionOptions options)
          DeleteConnection can perform one of three distinct operations: release a connection, release a conference and all connections in it, or remove a connection from a conference.
 MediaControl.DetectNonSilenceResult detectNonSilence(java.lang.String sessionId, java.lang.String connectionId, java.lang.Long nonSilenceTime, MediaControl.DetectNonSilenceOptions options)
          DetectNonSilence monitors a connection for an incidence of non-silence.
 MediaControl.DetectSilenceResult detectSilence(java.lang.String sessionId, java.lang.String connectionId, java.lang.Long silenceTime, MediaControl.DetectSilenceOptions options)
          DetectSilence monitors a connection for an incidence of silence.
 MediaControl.GatherDigitsResult gatherDigits(java.lang.String sessionId, java.lang.String connectionId, MediaControl.GatherDigitsOptions options)
          GatherDigits instructs the media engine to watch for DTMF digits on a connection.
 MediaControl.JoinConferenceResult joinConference(java.lang.String sessionId, java.lang.String connectionId, java.lang.String conferenceId, MediaControl.JoinConferenceOptions options)
          Moves a connection into an existing conference.
 MediaControl.LeaveConferenceResult leaveConference(java.lang.String sessionId, java.lang.String connectionId, java.lang.String conferenceId, MediaControl.LeaveConferenceOptions options)
          Removes a connection from a conference.
 MediaControl.ManageGrammarResult manageGrammar(java.lang.String sessionId, java.lang.String connectionId, java.lang.String grammar1, MediaControl.Action action, MediaControl.ManageGrammarOptions options)
          Allows a developer to manually manage grammars on the Nuance OSR server.
 MediaControl.ModifyConnectionResult modifyConnection(java.lang.String sessionId, java.lang.String connectionId, java.lang.String mediaTxIP, java.lang.Long mediaTxPort, MediaControl.ModifyConnectionOptions options)
          Modifies the properties of an existing connection on a media engine.
 MediaControl.PlayResult play(java.lang.String sessionId, java.lang.String prompt1, java.lang.String connectionId, java.lang.String conferenceId, MediaControl.PlayOptions options)
          Initiates playback of the specified audio file and/or plays text-to-speech to the specified connection or conference.
 MediaControl.PlayToneResult playTone(java.lang.String sessionId, java.lang.String connectionId, java.lang.String conferenceId, java.lang.Long duration, java.lang.Long frequency1, java.lang.Integer amplitude1, java.lang.Long frequency2, java.lang.Integer amplitude2, MediaControl.PlayToneOptions options)
          PlayTone generates a tone to a connection or conference.
 MediaControl.RecordResult record(java.lang.String sessionId, java.lang.String filename, java.lang.Long expires, MediaControl.RecordOptions options)
          Records audio from a connection or conference.
 MediaControl.ReserveConnectionResult reserveConnection(java.lang.String sessionId, MediaControl.ReserveConnectionOptions options)
          Provisions a connection on a media engine without establishing the transmit RTP stream.
 MediaControl.SaveDynamicGrammarResult saveDynamicGrammar(java.lang.String sessionId, java.lang.String dynGrammar, java.lang.String dynGrammarName, java.lang.Boolean isScriptBound, MediaControl.SaveDynamicGrammarOptions options)
          Saves the string representation of a grammar to file.
 MediaControl.SendDigitsResult sendDigits(java.lang.String sessionId, java.lang.String connectionId, java.lang.String digits, MediaControl.SendDigitsOptions options)
          SendDigits inserts DTMF digits into the digit buffer for a given connection.
 MediaControl.SetConfereeAttributeResult setConfereeAttribute(java.lang.String sessionId, java.lang.String connectionId, java.lang.String conferenceId, java.lang.Boolean mute, java.lang.Boolean tariffTone, MediaControl.SetConfereeAttributeOptions options)
          Changes one or more properties of a connection in a conference.
 MediaControl.StopMediaOperationResult stopMediaOperation(java.lang.String sessionId, java.lang.String connectionId, java.lang.String operationId, MediaControl.StopMediaOperationOptions options)
          StopMediaOperation has two distinct modes.
 MediaControl.VoiceRecognitionResult voiceRecognition(java.lang.String sessionId, java.lang.String connectionId, java.lang.String grammar1, java.lang.String prompt1, java.lang.Boolean voiceBargeIn, java.lang.Boolean cancelOnDigit, MediaControl.VoiceRecognitionOptions options)
          Applies 1 or more speech grammars with a Nuance OSR server to the specified connection in order to detect phrases being spoken in real-time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseMediaControlServer

public BaseMediaControlServer()
Method Detail

_sessionQuery

public java.lang.Object _sessionQuery(java.lang.Object query)
                               throws java.lang.Exception
Specified by:
_sessionQuery in interface etch.bindings.java.support.ObjSession
Throws:
java.lang.Exception

_sessionControl

public void _sessionControl(java.lang.Object control,
                            java.lang.Object value)
                     throws java.lang.Exception
Specified by:
_sessionControl in interface etch.bindings.java.support.ObjSession
Throws:
java.lang.Exception

_sessionNotify

public void _sessionNotify(java.lang.Object event)
                    throws java.lang.Exception
Specified by:
_sessionNotify in interface etch.bindings.java.support.ObjSession
Throws:
java.lang.Exception

reserveConnection

public MediaControl.ReserveConnectionResult reserveConnection(java.lang.String sessionId,
                                                              MediaControl.ReserveConnectionOptions options)
Description copied from interface: MediaControlServer
Provisions a connection on a media engine without establishing the transmit RTP stream. If 300 seconds elapse and CreateConnection has not been performed on a connection created by ReserveConnection, then the connection will be destroyed automatically by the media engine. For the lifetime of a connection created via ReserveConnection, one RTP resource is used. If a low bitrate codec is used for this connection, then one Enhanced RTP resource is also used in conjuction with the RTP resource for the lifetime of the connection. ReserveConnection is a means to provision a connection on the media engine without specifying transmit information to a remote endpoint. Because the ReserveConnection action does not specify the transmit information, the Tx RTP stream associated with this connection is not operational after the action has successfully completed. Therefore, ReserveConnection is virtually always followed by CreateConnection, which one can use to specify the transmit properties on the connection returned by ReserveConnection. Once CreateConnection has been used successfully, both Rx and Tx have been defined on the connection and audio is flowing between the media engine and the remote endpoint.

Specified by:
reserveConnection in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
options - An object holding all the optional parameters

createConnection

public MediaControl.CreateConnectionResult createConnection(java.lang.String sessionId,
                                                            java.lang.String mediaTxIP,
                                                            java.lang.Long mediaTxPort,
                                                            java.lang.String connectionId,
                                                            MediaControl.CreateConnectionOptions options)
Description copied from interface: MediaControlServer
Establishes both Rx and Tx RTP streams for a new or reserved connection on a media engine. A connection established with CreateConnection should always be deleted by using DeleteConnection. Media connections are a limited resource, and so must be managed carefully. CreateConnection is implicitly invoked by AnswerCall or MakeCall, with the transmit and receive properties automatically set correctly based on the media negotiation for the call. A connection created in this manner is also automatically disconnected when the call is hung up or transferred. For the lifetime of a connection created via ReserveConnection, one RTP resource is used. If a low bitrate codec is used for this connection, then one Enhanced RTP resource is also used in conjuction with the RTP resource for the lifetime of the connection. CreateConnection can be used to either create an entirely new connection on the media engine, or establish transmit properties on a connection previously created by ReserveConnection. To cause the audio stream to send to a multicast IP address, specify a multicast IP address in the MediaTxIP parameter. Note that the Cisco Unified Media Engine

Specified by:
createConnection in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
mediaTxIP - The IP address that the Tx RTP stream will transmit audio to.
mediaTxPort - The port that the Tx RTP stream will transmit audio to.
connectionId - A ConnectionId returned by a previous ReserveConnection action. If no ConnectionId is specified, then an entirely new connection is created.
options - An object holding all the optional parameters

modifyConnection

public MediaControl.ModifyConnectionResult modifyConnection(java.lang.String sessionId,
                                                            java.lang.String connectionId,
                                                            java.lang.String mediaTxIP,
                                                            java.lang.Long mediaTxPort,
                                                            MediaControl.ModifyConnectionOptions options)
Description copied from interface: MediaControlServer
Modifies the properties of an existing connection on a media engine. ModifyConnection can not be used on a connection that has been created by ReserveConnection but has not yet been established with CreateConnection. ModifyConnection is automatically invoked on a connection created by the Call Control API whenever the media properties of a call change, such as when the call is placed on on hold or resumed from hold. This is not true if the call is in a peer-to-peer relationship. ModifyConnection is used to modify the properties of a connection previously established by CreateConnection or by the Call Control API via AnswerCall and MakeCall. If an optional action parameter is not required and you do not specify a value for the parameter, then that property of the connection is left unmodified.

Specified by:
modifyConnection in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - A ConnectionId returned by a previously executed CreateConnection action.
mediaTxIP - The IP address that the Tx RTP stream will transmit audio to.
mediaTxPort - The port that the Tx RTP stream will transmit audio to.
options - An object holding all the optional parameters

deleteConnection

public MediaControl.DeleteConnectionResult deleteConnection(java.lang.String sessionId,
                                                            java.lang.String connectionId,
                                                            java.lang.String conferenceId,
                                                            MediaControl.DeleteConnectionOptions options)
Description copied from interface: MediaControlServer
DeleteConnection can perform one of three distinct operations: release a connection, release a conference and all connections in it, or remove a connection from a conference. DeleteConnection is invoked automatically be the Application Runtime Environment by the Call Control API whenever a call, previously created by AnswerCall or MakeCall, is hung up or transferred (assuming the call is not currently in a peer-to-peer call). When the last connection is removed from a conference, the conference is automatically released. The ConferenceId of that conference is no longer valid after that point, and does not need to be deleted with DeleteConnection. If releasing the resources associated with a connection, then the RTP resource associated with this connection is also released. If the connection was using low bitrate codecs, then one Enhanced RTP resource is also released. If releasing the resources associated with a conference and releasing all the connections currently in the conference, the RTP resource and conference resource (and Enhanced RTP resource, if applicable) of each participant is released. If removing a connection from a conference, then the conference resource associated with this connection is released. If releasing the resources associated with a connection, specify a valid ConnectionId and no ConferenceId. If releasing the resources associated with a conference and releasing all the connections currently in the conference, specify a valid ConferenceId and no ConnectionId. If removing a connection from a conference, specify both a valid ConnectionId to be removed from a valid ConferenceId. If one wanted to destroy a conference but have all connections remain open and connected, then one would have to use the DeleteConnection action for every connection in the conference. Each time the DeleteConnection action is used in such a scenario, one would need to specifying both ConferenceId and the ConnectionId being removed.

Specified by:
deleteConnection in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - The connection to perform the DeleteConnection on.
conferenceId - The conference to perform the DeleteConnection on.
options - An object holding all the optional parameters

setConfereeAttribute

public MediaControl.SetConfereeAttributeResult setConfereeAttribute(java.lang.String sessionId,
                                                                    java.lang.String connectionId,
                                                                    java.lang.String conferenceId,
                                                                    java.lang.Boolean mute,
                                                                    java.lang.Boolean tariffTone,
                                                                    MediaControl.SetConfereeAttributeOptions options)
Description copied from interface: MediaControlServer
Changes one or more properties of a connection in a conference. There are a number of properties unique to a connection in a conference, which can be set as the connection is joined into the conference or when the connection is already in the conference. SetConfereeAttribute is used in the case that the connection is already in a conference. A special consideration for the SetConfereeAttribute is when the action is invoked on a 2-party hairpin conference (a conference that uses no conference resources). The use of Coach or Pupil causes a 2-party hairpin conference to promote to a true conference and therefore use a conference resource per participant. The use of TariffTone while the conference is a 2-party hairpin results in no promotion of the conference and no tariff tone on the connection; however, if the conference is at any time promoted to a true conference, then the tariff tone property is respected as the connection moves to conference. The use of Mute takes effect immediately in a 2-party hairpin conference; there are no special considerations for Mute. Any connection in the conference can be muted or unmuted at anytime. Use the Mute boolean to indicate whether to mute or unmute the connection in the conference. Any connection in the conference can have a tone played at a regular interval, or not, by using the TariffTone boolean field. Coach-Pupil relationships can be created among participants in the conference by using the Coach and Pupil boolean fields. There can only be one coach and pupil per conference. A pupil can not be a coach.

Specified by:
setConfereeAttribute in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - The connection to change conference attributes on.
conferenceId - The conference that contains the ConnectionId specified.
mute - Indicates whether this connection should be muted.
tariffTone - Indicates whether this connection should hear a periodic tone while in a true, on non-hairpinned, conference.
options - An object holding all the optional parameters

play

public MediaControl.PlayResult play(java.lang.String sessionId,
                                    java.lang.String prompt1,
                                    java.lang.String connectionId,
                                    java.lang.String conferenceId,
                                    MediaControl.PlayOptions options)
Description copied from interface: MediaControlServer
Initiates playback of the specified audio file and/or plays text-to-speech to the specified connection or conference. The determination of whether a Prompt is a wav/vox file or a text-to-speech prompt involves a few steps. If a full path is specified as the value of the Prompt, then the media engine will check the OS filesystem to determine if the file exists. If the file exists, it will attempt to play the audio file to the specified connection or conference. If the file does not exist at the specified location, then step 5 is executed. If the a file name is specified as the value of Prompt, with no path information, then the next step is executed. The media engine will concat the base audio path + application directory + locale audio directory + the specified Prompt, and check the OS filesystem to determine if the file exists. If the file exists, it will attempt to then play the audio file to the specified connection or conference. If the file does not exist, the next step is executed. The media engine will then concat the base audio path+ the specified Prompt, and check the OS filesystem to determine if the file exists. If the file exists, it will attempt to then play the audio file to the specified connection or conference. If the file does not exist, then the next step is executed. The media engine considers the Prompt specified as a text-to-speech prompt. The string specified as Prompt will be passed to the text-to-speech engine to be converted to a WAV file. As soon as the WAV file is generated, it is then played to the specified connection or conference. If one plays to a connection while it is in conference, the connection is temporarily taken out of the conference for the duration of the Play. The following properties cover most audio file types that can be played by the media engine: sample rate of 6, 8, 11, sample size of 4, 8, 16, and 2 bit, and encoding types of ulaw, alaw, pcm, adpcm, and g726. Only mono vox and wav files are allowed. If the command plays all prompts successfully to completion, the Play command will result in the Play_Complete event with a TerminationCondition of eod. A Play to a connection or a conference results in a voice resource being utilized until the action results in the Play_Complete event. If a connection is specified as the recepient of the Play, the voice resource attaches to the connection. If a conference is specified as the recepient of the Play, a new connection (which uses a conference resource) is created and added to the conference for the duration of the Play, and the voice resource is attached to that new connection. It is important to understand this behavior, as the ConnectionId result data will always be the connection to which the Play voice resource is attached. In other words, in the case of a Play to a connection, the value of the ConnectionId result data is the same as that specified as an action parameter. In the case of a Play to a conference, the value of the ConnectionId result data is the value of the new connection added to conference which is only a valid value for the duration of the Play. In either case, this result data ConnectionId is what one would later specify in StopMediaOperation. A Play action which specifies a text-to-speech prompt will result in the usage of a text-to-speech resource on the embedded TTS engine. Unlike the voice resource, the text-to-speech resource is not used for the duration of the Play action. Instead, the TTS resource is only used for the amount of time it takes for the embedded TTS engine to generate a wav file for the specified prompt string. A wav file is generated in real-time at the onset of every text-to-speech Play operation. Summary of changes made in Cisco Unified Application Environment 2.4(3): Increased Number of Simultaneous Prompts - One can specify a null () in the Prompt1, Prompt2, and Prompt3 fields. In effect, any number of prompts (within the limits of the Cisco Unified Media Engine) can be specified in any or all of these fields. The Play action allows one to specify up to 3 prompts, which can be either free-formed strings or the names of WAV files. If more than one prompt is specified, the format of the supplied WAV files must all be the same (sample rate, sample size, encoding, mono, file type) and also match the format of generated TTS WAV files, which is a sample rate of 8 kHz, a sample size of 8 bit, and an audio format of PCM. As an example, one can not specify VOX prompts in conjunction with text-to-spech prompts for a single Play action, since the file formats are different. The Play command will fire Play_Complete once all prompts are finished, if a termination condition is satisfied, or if CommandTimeout is reached. If the action fails for any reason, all prompts are cancelled and Play_Failed is fired. The termination condition parameters on the action are a means to create a matrix of reasons that the action should cease playing. In the Play_Complete event, one can use TerminationCondition to determine why the command stopped playing. To see a list of all possible termination conditions, reference the Play_Complete TerminationCondition action parameter.

Specified by:
play in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
prompt1 - A prompt field can be either an audio file name or a free-formed string which will be converted to text-to-speech. It can be specified as a null () or string[] of prompts.
connectionId - The connection to perform the Play on. If specified, ConferenceId must not be specified.
conferenceId - The conference to perform the Play on. If specified, ConnectionId must not be specified.
options - An object holding all the optional parameters

beginPlay

public MediaControl.PlayResult beginPlay(java.lang.String sessionId,
                                         java.lang.String prompt1,
                                         java.lang.String connectionId,
                                         java.lang.String conferenceId,
                                         MediaControl.PlayOptions options,
                                         java.lang.Object state)
Specified by:
beginPlay in interface MediaControlServer

adjustPlay

public MediaControl.AdjustPlayResult adjustPlay(java.lang.String sessionId,
                                                java.lang.String connectionId,
                                                java.lang.Integer volume,
                                                java.lang.Integer speed,
                                                MediaControl.AdjustmentType adjustmentType,
                                                java.lang.Long toggleType,
                                                MediaControl.AdjustPlayOptions options)
Description copied from interface: MediaControlServer
Modifies the properties of a currently executing play operation. Allows one to vary the volume and speed of a play operation as it is executing.

Specified by:
adjustPlay in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - The connection to perform the AdjustPlay on.
volume - If AdjustmentType is absolute, then one can set Volume to a value between -10 and 10. However, if AdjustmentType is relative, then Volume could be between -20 and 20, depending on the value of Volume before the AdjustPlay is executed. Finally, if AdjustmentType is toggle, then the Volume action parameter is ignored.
speed - If AdjustmentType is absolute, then one can set Speed to a value between -10 and 10. However, if AdjustmentType is relative, then Speed could be between -20 and 20, depending on the value of Speed before the AdjustPlay is executed. Finally, if AdjustmentType is toggle, then the Speed action parameter is ignored.
adjustmentType - Indicates how the Volume and Speed values are interpreted. Valid values are absolute, relative, and toggle.
toggleType - If AdjustmentType is toggle, this value indicates how Volume should be toggled; however, Speed is not affected in any way by the use of toggle. A value of 1 toggles Volume between the origin and the last modification to Volume. A value of 2 resets volume to the origin. A value of 3 sets Volume to the last modification to Volume. A value of 4 indicates to put Volume to the origin and also resets the last modification to origin (essentially clearing the history of modifications).
options - An object holding all the optional parameters

voiceRecognition

public MediaControl.VoiceRecognitionResult voiceRecognition(java.lang.String sessionId,
                                                            java.lang.String connectionId,
                                                            java.lang.String grammar1,
                                                            java.lang.String prompt1,
                                                            java.lang.Boolean voiceBargeIn,
                                                            java.lang.Boolean cancelOnDigit,
                                                            MediaControl.VoiceRecognitionOptions options)
Description copied from interface: MediaControlServer
Applies 1 or more speech grammars with a Nuance OSR server to the specified connection in order to detect phrases being spoken in real-time. The following properties cover most allowable audio files that can be played by the media engine: sample rate of 6, 8, 11, sample size of 4, 8, and 16 bit, and encoding types of ulaw, alaw, pcm, and adpcm. Only mono vox and wav files are allowed. A VoiceRecognition to a connection or a conference results in a speech resource being utilized until the action results in the VoiceRecognition_Complete event. The use of prompts still use this same speech resource instead of using an additional voice resource. Summary of changes made in Cisco Unified Application Environment 2.4(3): TTS Support - TTS string support in the Prompt1, Prompt2, and Prompt3 fields. Increased Number of Simultaneous Grammars - One can specify a null () in the Grammar1, Grammar2, and Grammar3 fields. In effect, any number of grammars (within limits of Nuance OSR) can be specified in any or all of these fields. More Mechanisms for Provisioning Grammars - One can associate a grammar with a Cisco Unified Application Designer-built application, which will make it automatically HTTP-accessible and therefore accessible by Nuance OSR. Also, one can create a grammar within an application and save the grammar to a file in an HTTP-accessible location on the Cisco Unified Application Server. Multiple Recognition Results - All scores and meanings returned by Nuance OSR are propogated back in the VoiceRecognition_Complete event in the VR_XMLResult event parameter (not just the highest score and corresponding meaning as before). The VoiceRecognition action allows one to detect pre-defined phrases spoken on a connection. One can also specify TTS strings or audio files to be played to the connection in conjunction with the VoiceRecognition command. Once VoiceRecognition has successfully finished with VoiceRecognition_Complete, one can either extract all result data returned from Nuance OSR, or just extract the top-matched meaning and confidence score from the Meaning and Score event parameters. To help parse through the full result data (not just the top-matched meaning and score), a number of helper actions exist: null - Returns the number of matching results. null - Returns the score and meaning of a result at a specified index. null - Returns any results matching the specified string matching criteria for meaning. null - Returns any results matching the specified criteria for scores. null - Allows one to specify user-defined XPath expressions to allow custom parsing of the results. Two action parameters are unique to VoiceRecognition audio streaming: VoiceBargeIn and CancelOnDigit. VoiceBargeIn, if set to true, will cause any specified prompts to stop playing, although the voice recognition continues until completion. CancelOnDigit, if set to true, will cause the voice recognition command to process the audio received up until the digit push and exit with VoiceRecognition_Complete. The Meaning and Score event parameters are valid to use in this case. The termination condition parameters on the action are a means to create a matrix of reasons that the action should stop successfully.

Specified by:
voiceRecognition in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - The connection to perform the VoiceRecognition on.
grammar1 - A null () or string[]. These files define the grammar rules to use when interpreting the voice input on the connection. For each specified grammar file, there are three potential formats: Static - If you specify just the grammar file name in the Cisco Unified Application Designer, such as grammar1.grxml, and if that grammar file name exists as a Voice Recognition resource in the project, then the VoiceRecognition action will internally convert that grammar1.grxml file to a URI that references the location on the Application Server at which the grammar file can be accessed with HTTP. That URI is ultimately sent to Nuance OSR, which will in turn fetch that grammar file. Dynamic - Dynamic grammar files are grammar files created by the script, while the script is running. Typically one would create the file using the SaveDynamicGrammar, which will return the HTTP URI for that file. The variable containing this HTTP URI would then be supplied as the grammar file name. Builtin - Some grammars are provisioned with Nuance OSR, and it is also possible to provision grammars on Nuance OSR outside of the context of a Cisco Unified Application Environment application. To specify either type of 'builtin' grammar, just specify the grammar file name, such as grammar1.grxml. However, there should be no grammar file associated with your project of the same name.
prompt1 - A prompt field can be either an audio file name or a free-formed string which will be converted to text-to-speech. It can be specified as a null () or string[] of prompts.
voiceBargeIn - Indicates whether the occurrence of voice on the connection should abort any specified prompts.
cancelOnDigit - Indicates to stop the action successfully when a digit is entered, returning the VoiceRecognition_Complete event.
options - An object holding all the optional parameters

beginVoiceRecognition

public MediaControl.VoiceRecognitionResult beginVoiceRecognition(java.lang.String sessionId,
                                                                 java.lang.String connectionId,
                                                                 java.lang.String grammar1,
                                                                 java.lang.String prompt1,
                                                                 java.lang.Boolean voiceBargeIn,
                                                                 java.lang.Boolean cancelOnDigit,
                                                                 MediaControl.VoiceRecognitionOptions options,
                                                                 java.lang.Object state)
Specified by:
beginVoiceRecognition in interface MediaControlServer

manageGrammar

public MediaControl.ManageGrammarResult manageGrammar(java.lang.String sessionId,
                                                      java.lang.String connectionId,
                                                      java.lang.String grammar1,
                                                      MediaControl.Action action,
                                                      MediaControl.ManageGrammarOptions options)
Description copied from interface: MediaControlServer
Allows a developer to manually manage grammars on the Nuance OSR server. Only the VoiceRecognition action is required when building voice recognition-capable applications. ManageGrammar is only for additional control over grammars. If unsure whether or not you should use this action, then we recommend you ignore it, since its use is for optimization, but not core functionality. ManageGrammar allows a developer a way to more tightly control the loading and unloading of grammars. If one knows that a VoiceRecognition action is going to reference a very large grammar, or many grammars at once, there may be a negative performance impact on the Nuance OSR server, resulting in a delay before the voice regcognition operation can truly begin. With ManageGrammar, one can load specific grammars before they are needed to optimize performance. Conversely, grammars can also be unloaded if it is known that they are no longer needed.

Specified by:
manageGrammar in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - The connection to perform the ManageGrammar on.
grammar1 - A null () or string[]. These files define the grammar rules to use when performing the management operation indicated by the Action parameter.. For each specified grammar file, there are three potential formats: Static - If you specify just the grammar file name in the Cisco Unified Application Designer, such as grammar1.grxml, and if that grammar file name exists as a Voice Recognition resource in the project, then the ManageGrammar action will internally convert that grammar1.grxml file to a URI that references the location on the Application Server at which the grammar file can be accessed with HTTP. That URI is ultimately sent to Nuance OSR, which will in turn fetch that grammar file. Dynamic - Dynamic grammar files are grammar files created by the script, while the script is running. Typically one would create the file using the SaveDynamicGrammar, which will return the HTTP URI for that file. The variable containing this HTTP URI would then be supplied as the grammar file name. Builtin - Some grammars are provisioned with Nuance OSR, and it is also possible to provision grammars on Nuance OSR outside of the context of a Cisco Unified Application Environment application. To specify either type of 'builtin' grammar, just specify the grammar file name, such as grammar1.grxml. However, there should be no grammar file associated with your project of the same name.
action - Load - In general, Load would be used in the case that a large grammar should be guaranteed to be loaded before the actual VoiceRecognition operation begins, so that the user experiences minimal delay. Activate - This option should not be used. Deactivate - This option should not be used. Unload - In general, Unload would be used when one knows that a large grammar file no longer has use, and wishes to free up the associated resources on the Nuance OSR server. Default - This option should not be used.
options - An object holding all the optional parameters

beginManageGrammar

public MediaControl.ManageGrammarResult beginManageGrammar(java.lang.String sessionId,
                                                           java.lang.String connectionId,
                                                           java.lang.String grammar1,
                                                           MediaControl.Action action,
                                                           MediaControl.ManageGrammarOptions options,
                                                           java.lang.Object state)
Specified by:
beginManageGrammar in interface MediaControlServer

saveDynamicGrammar

public MediaControl.SaveDynamicGrammarResult saveDynamicGrammar(java.lang.String sessionId,
                                                                java.lang.String dynGrammar,
                                                                java.lang.String dynGrammarName,
                                                                java.lang.Boolean isScriptBound,
                                                                MediaControl.SaveDynamicGrammarOptions options)
Description copied from interface: MediaControlServer
Saves the string representation of a grammar to file. Files created with this action can either be application-bound or script-bound. By being application-bound, the grammar will only be cleaned up when the application is updated or re-installed; therefore putting the responsibility of cleaning up application-bound files to the application. Script-bound files, on the other hand, are created in a folder that exists only for the duration of the script. Once the script ends, the folder is deleted, along with any files within it. If a file already exists of the same name, it will be overwritten by the specified DynGrammar content. The SaveDynamicGrammar action allows a script to dynamically create a grammar as a string, and save it to file in a location on the Cisco Unified Application Server that is HTTP-accessible. The action returns this HTTP-accessible URI, which can then be used by VoiceRecognition and ManageGrammar when specifying the grammar name.

Specified by:
saveDynamicGrammar in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
dynGrammar - The content of the grammar file.
dynGrammarName - The name of the grammar file. If not specified, the file will be automatically named HOUR_MINUTE_SECOND.grxml.
isScriptBound - Determines whether the file is script-bound or application-bound.
options - An object holding all the optional parameters

record

public MediaControl.RecordResult record(java.lang.String sessionId,
                                        java.lang.String filename,
                                        java.lang.Long expires,
                                        MediaControl.RecordOptions options)
Description copied from interface: MediaControlServer
Records audio from a connection or conference. The Record action will analyze the Filename action parameter (if specified) to determine if it is a full path. If it is a full path and assuming the path does indeed exist on the OS filesystem, the Record action will place the recording there. Note that when a full path is specified, the media engine will not automatically expire the file, regardless of the value of the Expires parameter. If the filename is simply a file name (no path), or if it is not specified and the name is generated by the media engine automatically, then the media engine will concat the base audio path and the filename; the Record action will place the recording in this location. The following properties cover most allowable audio file formats that can be recorded by the media engine: sample rate of 6, 8, 11, sample size of 4, 8, and 16 bit, and encoding types of ulaw, alaw, pcm, and adpcm. Only mono vox and wav files are allowed. A Record to a connection or a conference results in a voice resource being utilized until the action results in Record_Complete event. If a connection is specified as the recepient of the Record, the voice resource attaches to the connection. If a conference is specified as the recepient of the Record, a new connection (which uses a conference resource) is created and added to the conference for the duration of the Record, and the voice resource is attached to that new connection. It is important to understand this behavior, as the ConnectionId result data will always be the connection to which the Record voice resource is attached. In other words, in the case of a Record to a connection, the value of the ConnectionId result data is the same as that specified as an action parameter. In the case of a Record to a conference, the value of the ConnectionId result data is the value of the new connection added to conference which is only a valid value for the duration of the Record. In either case, this result data ConnectionId is what one would later specify in StopMediaOperation. The Record action allows one to convert the voice stream of either a single connection or an entire conference into a WAV or VOX file. A connection can be recorded whether it is in or out of a conference. Recorded files are placed into the root of the media engine audio path, which by default is C:\Program Files\Cisco Systems\Unified Application Environment\MediaServer\Audio. The termination condition parameters on the action are a means to create a matrix of reasons that the action should stop successfully. In the Record_Complete event, one can use TerminationCondition to determine why the command stopped recording.

Specified by:
record in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
filename - The name of the audo file to create. If not specified, the media engine will generate a random file name, which is obtainable through either the result data FileName or in the Record_Complete event via the Filename event parameter.
expires - The number of days until the file is automatically deleted from the server. A value of 0 will indicate that the file should never be deleted by the media engine.
options - An object holding all the optional parameters

beginRecord

public MediaControl.RecordResult beginRecord(java.lang.String sessionId,
                                             java.lang.String filename,
                                             java.lang.Long expires,
                                             MediaControl.RecordOptions options,
                                             java.lang.Object state)
Specified by:
beginRecord in interface MediaControlServer

stopMediaOperation

public MediaControl.StopMediaOperationResult stopMediaOperation(java.lang.String sessionId,
                                                                java.lang.String connectionId,
                                                                java.lang.String operationId,
                                                                MediaControl.StopMediaOperationOptions options)
Description copied from interface: MediaControlServer
StopMediaOperation has two distinct modes. It can be used to stop the specific command identified by OperationId, or it can be used to stop all commands executing on a connection. If a media command is stopped with StopMediaOperation, it will cause the TerminationCondition of that action to have a value of userstop. To programmatically stop an ongoing media operation, specify both OperationId and the ConnectionId on which the media operation is executing on. To programmatically stop all media operations on a connection, only specify the ConnectionId parameter and not OperationId.

Specified by:
stopMediaOperation in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - Indicates the connection to stop currently executing media operation(s) on. If one wishes to stop a media operation invoked on a conference, then the ConnectionId to specify in this action parameter is returned as a result data parameter by that media operation.
operationId - Indicates which specific operation on a connection should be cancelled, if specified. If OperationId is specified, then ConnectionId must be specified. This value can be obtained as a result data parameter in the Record, Play, VoiceRecognition, DetectSilence, DetectNonSilence, or GatherDigits action, and so therefore is used to cancel that operation on a connection if that value is specified here.
options - An object holding all the optional parameters

detectSilence

public MediaControl.DetectSilenceResult detectSilence(java.lang.String sessionId,
                                                      java.lang.String connectionId,
                                                      java.lang.Long silenceTime,
                                                      MediaControl.DetectSilenceOptions options)
Description copied from interface: MediaControlServer
DetectSilence monitors a connection for an incidence of silence. DetectSilence will fire DetectSilence_Complete if silence is detected for a continuous amount of time as specified in SilenceTime. A DetectSilence to a connection or a conference results in a voice resource being utilized until the action results in the DetectSilence_Complete event.

Specified by:
detectSilence in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - Indicates the connection to detect silence on.
silenceTime - The amount of continuous silence to observe (in milliseconds) before firing the DetectSilence_Complete event.
options - An object holding all the optional parameters

beginDetectSilence

public MediaControl.DetectSilenceResult beginDetectSilence(java.lang.String sessionId,
                                                           java.lang.String connectionId,
                                                           java.lang.Long silenceTime,
                                                           MediaControl.DetectSilenceOptions options,
                                                           java.lang.Object state)
Specified by:
beginDetectSilence in interface MediaControlServer

detectNonSilence

public MediaControl.DetectNonSilenceResult detectNonSilence(java.lang.String sessionId,
                                                            java.lang.String connectionId,
                                                            java.lang.Long nonSilenceTime,
                                                            MediaControl.DetectNonSilenceOptions options)
Description copied from interface: MediaControlServer
DetectNonSilence monitors a connection for an incidence of non-silence. DetectNonSilence will fire DetectNonSilence_Complete if non-silence is detected for a continuous amount of time as specified in NonSilenceTime. A DetectNonSilence to a connection results in a voice resource being utilized until the action results in the DetectNonSilence_Complete event.

Specified by:
detectNonSilence in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - Indicates the connection to detect silence on.
nonSilenceTime - The amount of continuous non-silence to observe (in milliseconds) before firing the DetectNonSilence_Complete event.
options - An object holding all the optional parameters

beginDetectNonSilence

public MediaControl.DetectNonSilenceResult beginDetectNonSilence(java.lang.String sessionId,
                                                                 java.lang.String connectionId,
                                                                 java.lang.Long nonSilenceTime,
                                                                 MediaControl.DetectNonSilenceOptions options,
                                                                 java.lang.Object state)
Specified by:
beginDetectNonSilence in interface MediaControlServer

createConference

public MediaControl.CreateConferenceResult createConference(java.lang.String sessionId,
                                                            java.lang.String connectionId,
                                                            java.lang.Boolean soundToneOnJoin,
                                                            MediaControl.CreateConferenceOptions options)
Description copied from interface: MediaControlServer
Creates a conference and places the specified connection into it as the 1st participant. All connections in the conference must be fully connected (Tx and Rx conditions both established on the connection; CreateConnection and certain actions in the Call Control API are used to accomplish this. For convenience, a ConnectionId returned from a ReserveConnection can be specified along with the MediaTxIP, MediaTxPort and MediaTxCodec parameters, in which case a CreateConnection does not have to be performed explicitly by the develeoper, since the media engine will automatically fully establish the Tx RTP properties the ConnectionId as the connection is joined to conference. Mute and Monitor have a similar effect to one another; the participant specified by ConnectionId can only hear audio and is unable to send audio to the conference. The difference is that each Mute participant is truly in the conference, and so uses a conference resource; at anytime this participant can be allowed to send audio seamlessly via the use of the SetConfereeAttribute Mute parameter. Monitor participants are not truly in the conference from an internal logic standpoint, and can only transmit audio into the conference by removing their connection from conference, and placing back in with Monitor set to false. One also saves resources by using Monitor over Mute for many participants. Each Monitor participant shares one conference resource, but Mute participants each need a conference resource. AnswerCall and MakeCall both automatically invoke CreateConference or JoinConference if the AnswerCall Conference action parameter or MakeCall Conference action parameter is set to true. Each connection in a conference uses one conference resource. Because this action places one connection into the conference, one conference resource is utilized once this action has succeeded. A conference can not be created with zero connections; there must be one connection in the conference to start. A conference is uniquely identified by the ConferenceId result data parameter returned by CreateConference. In most cases, Hairpin should be set to true (the default) to use the minimum amount of audio resources for a 2-party conference. Specifically, a hairpinned conference does not use any conference resources. However, a hairpin conference will be 'promoted', or converted to a true media conference, if a 3rd participant is added to the conference or if a voice operation is performed on the conference itself. In either case, this will cause each participant and conferenced voice operation to use one conference resource. True conferences also have a slightly increased latency over a hairpinned conference.

Specified by:
createConference in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - Indicates the connection to add to the new conference as the 1st participant on. If MmsId is specified, this ConnectionId must reside on the same media engine.
soundToneOnJoin - Indicates whether a tone is played when each participant joins the conference.
options - An object holding all the optional parameters

joinConference

public MediaControl.JoinConferenceResult joinConference(java.lang.String sessionId,
                                                        java.lang.String connectionId,
                                                        java.lang.String conferenceId,
                                                        MediaControl.JoinConferenceOptions options)
Description copied from interface: MediaControlServer
Moves a connection into an existing conference. All connections in the conference must be fully connected (Tx and Rx conditions both established on the connection; CreateConnection and certain actions in the Call Control API are used to accomplish this. For convenience, a ConnectionId returned from a ReserveConnection can be specified along with the MediaTxIP, MediaTxPort and MediaTxCodec parameters, in which case a CreateConnection does not have to be performed explicitly by the develeoper, since the media engine will automatically fully establish the Tx RTP properties the ConnectionId as the connection is joined to conference. Mute and Monitor have a similar effect to one another; the participant specified by ConnectionId can only hear audio and is unable to send audio to the conference. The difference is that each Mute participant is truly in the conference, and so uses a conference resource; at anytime this participant can be allowed to send audio seamlessly via the use of the SetConfereeAttribute Mute parameter. Monitor participants are not truly in the conference from an internal logic standpoint, and can only transmit audio into the conference by removing their connection from conference, and placing back in with Monitor set to false. One also saves resources by using Monitor over Mute for many participants. Each Monitor participant shares one conference resource, but Mute participants each need a conference resource. AnswerCall and MakeCall both automatically invoke CreateConference or JoinConference if the AnswerCall Conference action parameter or MakeCall Conference action parameter is set to true. Each connection in a conference uses one conference resource. Because this action places one connection into the conference, one conference resource is utilized once this action has succeeded. In most cases, Hairpin should be set to true (the default) to use the minimum amount of audio resources for a 2-party conference. Specifically, a hairpinned conference does not use any conference resources. However, a hairpin conference will be 'promoted', or converted to a true media conference, if a 3rd participant is added to the conference or if a voice operation is performed on the conference itself. In either case, this will cause each participant and conferenced voice operation to use one conference resource. True conferences also have a slightly increased latency over a hairpinned conference.

Specified by:
joinConference in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - Indicates the connection to add to the existing conference as a new participant. If MmsId is specified, this ConnectionId must reside on the same media engine.
conferenceId - The conference to add the connection to.
options - An object holding all the optional parameters

leaveConference

public MediaControl.LeaveConferenceResult leaveConference(java.lang.String sessionId,
                                                          java.lang.String connectionId,
                                                          java.lang.String conferenceId,
                                                          MediaControl.LeaveConferenceOptions options)
Description copied from interface: MediaControlServer
Removes a connection from a conference. When the last connection is removed from a conference, the conference is automatically destroyed. The ConferenceId of that conference is no longer valid after that point. Each connection in a conference uses one conference resource. Because this action removes one connection into the conference, one conference resource is released once this action has succeeded. LeaveConference removes the specified ConnectionId from the ConferenceId.

Specified by:
leaveConference in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - Indicates the connection to remove from the conference.
conferenceId - The conference to remove the connection from.
options - An object holding all the optional parameters

gatherDigits

public MediaControl.GatherDigitsResult gatherDigits(java.lang.String sessionId,
                                                    java.lang.String connectionId,
                                                    MediaControl.GatherDigitsOptions options)
Description copied from interface: MediaControlServer
GatherDigits instructs the media engine to watch for DTMF digits on a connection. The media engine is continuously buffering observed digits for any given connection. GatherDigits considers any digits stored in this digit buffer at the onset of the action for the processing of any specified termination conditions. Once the GatherDigits action has started executing, digits that occur in real-time also fill up the buffer and so can cause the specified termination conditions to be met. For example, if the user pushes 123, and then a GatherDigits operation is executed with a TermCondDigitPattern of 1234 specified, the GatherDigits_Complete event will occur as soon as the user pushes 4. After the GatherDigits_Complete event is fired, the buffer is cleared of all digits. A GatherDigits to a connection or a conference results in a voice resource being utilized until the action results in the GatherDigits_Complete event. If a connection is specified as the recepient of the GatherDigits, the voice resource attaches to the connection. If a conference is specified as the recepient of the GatherDigits, a new connection (which uses a conference resource) is created and added to the conference for the duration of the GatherDigits, and the voice resource is attached to that new connection. It is important to understand this behavior, as the ConnectionId result data will always be the connection to which the GatherDigits voice resource is attached. In other words, in the case of a GatherDigits to a connection, the value of the ConnectionId result data is the same as that specified as an action parameter. In the case of a GatherDigits to a conference, the value of the ConnectionId result data is the value of the new connection added to conference which is only a valid value for the duration of the GatherDigits. In either case, this result data ConnectionId is what one would later specify in StopMediaOperation. GatherDigits allows one to determine which digits were pushed. The termination condition parameters on the action are a means to create a matrix of reasons that the action should stop successfully. In the GatherDigits_Complete event, one can use TerminationCondition to determine why the command stopped gathering digits.

Specified by:
gatherDigits in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - Indicates the connection to GatherDigits on.
options - An object holding all the optional parameters

beginGatherDigits

public MediaControl.GatherDigitsResult beginGatherDigits(java.lang.String sessionId,
                                                         java.lang.String connectionId,
                                                         MediaControl.GatherDigitsOptions options,
                                                         java.lang.Object state)
Specified by:
beginGatherDigits in interface MediaControlServer

sendDigits

public MediaControl.SendDigitsResult sendDigits(java.lang.String sessionId,
                                                java.lang.String connectionId,
                                                java.lang.String digits,
                                                MediaControl.SendDigitsOptions options)
Description copied from interface: MediaControlServer
SendDigits inserts DTMF digits into the digit buffer for a given connection. The Call Control API uses SendDigits whenever a digit is detected in the signaling of a call to fill the buffer of the media engine connection associated with that call. It is not expected that the developer will have much use for the SendDigits action. SendDigits allows one to simulate the occurrence of digits on a connection. Note that using this action does not cause any signaling to occur on the media stream; it is meant to indicate to the Media Engine that a digit has occurred on a particular connection.

Specified by:
sendDigits in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - Indicates the connection to SendDigits to.
digits - The digit(s) to send on the connection.
options - An object holding all the optional parameters

playTone

public MediaControl.PlayToneResult playTone(java.lang.String sessionId,
                                            java.lang.String connectionId,
                                            java.lang.String conferenceId,
                                            java.lang.Long duration,
                                            java.lang.Long frequency1,
                                            java.lang.Integer amplitude1,
                                            java.lang.Long frequency2,
                                            java.lang.Integer amplitude2,
                                            MediaControl.PlayToneOptions options)
Description copied from interface: MediaControlServer
PlayTone generates a tone to a connection or conference. A PlayTone to a connection or a conference results in a voice resource being utilized until the action results in the PlayTone_Complete event. If a connection is specified as the recepient of the PlayTone, the voice resource attaches to the connection. If a conference is specified as the recepient of the PlayTone, a new connection (which uses a conference resource) is created and added to the conference for the duration of the PlayTone, and the voice resource is attached to that new connection. It is important to understand this behavior, as the ConnectionId result data will always be the connection to which the PlayTone voice resource is attached. In other words, in the case of a PlayTone to a connection, the value of the ConnectionId result data is the same as that specified as an action parameter. In the case of a PlayTone to a conference, the value of the ConnectionId result data is the value of the new connection added to conference which is only a valid value for the duration of the PlayTone. In either case, this result data ConnectionId is what one would later specify in StopMediaOperation. PlayTone allows one to mix two frequencies, each with distinct amplitudes, for a specified duration.

Specified by:
playTone in interface MediaControlServer
Parameters:
sessionId - The session Id for this method call
connectionId - The connection to perform the PlayTone on. If specified, ConferenceId must not be specified.
conferenceId - The conference to perform the PlayTone on. If specified, ConnectionId must not be specified.
duration - The length of time to play tone (in milliseconds).
frequency1 - The frequency to be played (in Hz). The valid range is from 200 to 3000.
amplitude1 - The amplitude of the Frequency1 (in dB). The valid Range is from -40 to 0.
frequency2 - The frequency to combine with the first frequency (in Hz). The valid range is from 200 to 3000.
amplitude2 - The amplitude of the Frequency2 (in dB). The valid Range is from -40 to 0.
options - An object holding all the optional parameters

beginPlayTone

public MediaControl.PlayToneResult beginPlayTone(java.lang.String sessionId,
                                                 java.lang.String connectionId,
                                                 java.lang.String conferenceId,
                                                 java.lang.Long duration,
                                                 java.lang.Long frequency1,
                                                 java.lang.Integer amplitude1,
                                                 java.lang.Long frequency2,
                                                 java.lang.Integer amplitude2,
                                                 MediaControl.PlayToneOptions options,
                                                 java.lang.Object state)
Specified by:
beginPlayTone in interface MediaControlServer


Copyright © 2010. All Rights Reserved.