AcceptCallEarlyMedia

Metreos.CallControl.AcceptCallEarlyMedia

Summary

Accepts an incoming call, indicating to the remote endpoint that the called party is present and may subsequently answer. This will also setup a one way media session from CUAE to the caller.

Usage

When a call is inbound to an script via IncomingCall, the call is in a ringing state and a script can choose to do one of 5 things: AcceptCallEarlyMedia, AcceptCall, AnswerCall, Redirect, RejectCall, or simply do nothing with the call. The practical use of AcceptCallEarlyMedia is to establish a one way media session from media engine to the caller which can be used to play a message. After the call to AcceptCallEarlyMedia the application can decide to answer or reject the call.

In case of failure response for the AcceptCallEarlyMedia the application does not need to terminate the call. The application look at the FailReason result parameter and process accordingly.

From the perspective of the script instance initiated by the incoming call, the telephony protocol of the call has already been chosen by the time IncomingCall has been fired. However, any call created by the application via MakeCall or Barge will use the protocol configured on the application partition of the script instance. See Call Routing for more information on how the application server interfaces with the outside world for the routing of calls.

Remarks

If a call is received over SIP with remote media information and Reserve Media Early is set to true on the partition of the script instance instance then if the application calls AcceptCallEarlyMedia API then it will reserves the resources on media engine for the call.

The application server automatically uses ReserveConnection, with the end result of a valid ConnectionId being made available in the ConnectionId result data. This ConnectionId can then be used by the Media Control API.

AcceptCallEarlyMedia API does not setup the transmit side of the media for the media engine. To setup the transmit side of the media for the media engine the application needs to call GetRemoteMedia> and CreateConnection APIs.

When the call is ended by either party, the ConnectionId is destroyed automatically by the application server.

The script does not have direct control over which media engine is used when accepting the call. The media engine used to process the audio connection is determined by the current Media Resource Group on the current application partition.

The Call Control API makes every effort to abstract the complexities of the underlying telephony protocol; however, one should consult the Call Control Feature Matrix to understand what Call Control actions and action parameters are valid for each of the four supported protocols. One can set installation and deployment guidelines based on the Call Control actions and action parameters that an application uses the Call Control Feature Matrix makes developing such guidelines feasible.

Action Parameters
Parameter Name.NET TypeDefaultDescription
CallId *System.StringIndicates the call to accept with AcceptCallEarlyMedia.
TimeoutSystem.Int32The Timeout property specifies to the Application Runtime Environment how long to wait for a response from the provider for the current action. The ReturnValue returned in this case is 'Timeout'. The value must be a literal value in milliseconds.
Result Data
Parameter Name.NET TypeDescription
CallIdSystem.StringIndicates the call for which the one way media path is setup. This is always the same value passed in as the CallId action parameter.
MmsIdSystem.UInt32Unique identifier used to identify the media engine in control of this connection. A common use for this ID is to ensure that other connections which will ultimately be conferenced with this connection are all created on the same media engine. This correlation is necessary because all connections in a single conference must all reside on the same media engine. This field will only be populated if the partition of the script instance is configured to Reserve Media Early.
ConnectionIdSystem.StringUnique identifier used to identify this connection in all subsequent Media Control API operations. Before using with most Media Control actions, this connection must still be fully connected with CreateConnection or by answering the call. This field will only be populated if the partition of the script instance is configured to Reserve Media Early.
MediaRxIPSystem.StringThe IP address that the Rx RTP stream must be sent to for this connection. This field will only be populated if the partition of the script instance is configured to Reserve Media Early.
MediaRxPortSystem.UInt32The IP address that the Rx RTP stream must be sent to for this connection. This field will only be populated if the partition of the script instance is configured to Reserve Media Early.
FailReasonSystem.StringIndicates the reason for failure of the execution of this API. Valid values are as follows:
NoFail

Indicates that the API call is successful.

RemoteMediaNotAvailable

Indicates that media information of the remote side is not available and so could not setup media session from the media engine. The call may not need to be terminated for this condition and it can be followed by AnswerCall, RejectCall, etc.

EarlyMediaNotSet

Indicates that Reserve Media Early is not set to true on the partition of the script instance and so media session would not be setup. The call may not need to be terminated for this condition and it can be followed by AnswerCall, RejectCall, etc.

InternalError

Indicates that API execution failed due to some error conditions and the call should be terminated.

Branch Conditions 

Success

No description.

Failure

No description.

Timeout

No description.