Provider
Synchronous
No Custom Parameters
Answers an incoming call, indicating to the remote endpoint that the called party is willing to participate in the call.
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: AnswerCall, AcceptCall, Redirect, Reject, or simply do nothing with the call. The practical use of Answer is to establish a call and media connection with a remote endpoint, essentially bringing a script into a telephony conversation and opening up the ability to utilize the other actions and events in the Call Control and Media Control APIs.
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 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.
As soon as a call is answered, a number of unsolicited events can potentially occur. These are GotDigits, RemoteHangup, StartTx, StopTx, and StartRx.
An audio connection between the called destination and media engine is created automatically when one uses Answer. The application server automatically uses ReserveConnection and CreateConnection while the call is being established with the remote endpoint, with the end result of a valid ConnectionId result data parameter. This ConnectionId can then be used by the Media Control API.
When the call is hung up 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 answering the call, unless MmsId is specified. In the case that MmsId is not specified, 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.
The Reserve Media Early configuration on the script instance partition specifies whether a media engine connection should be provisioned with ReserveConnection as soon as the call is initiated, or if the application server should wait to until the media negotiation phase of the call ensues before reserving the connection. The media negotiation phase often comes as the call is answered by the remote endpoint, but can also come before. Due to the small amount of time AnswerCall usually takes to complete, Reserve Media Early is less important compared to the impact it has on MakeCall.
| Parameter Name | .NET Type | Default | Description |
|---|---|---|---|
| CallId * | System.String | Indicates the call to answer with AnswerCall. | |
| DisplayName | System.String | A free string which describes the initiator of the call. Not all telephony protocols support this field; please consult the Call Control Feature Matrix. | |
| MmsId | System.UInt32 | The ID of the media engine to create the connection on.
If no MmsId is specified when using AnswerCall, a media engine with the most available resources is dynamically selected from the Media Resource Group
associated with the partition of the script instance from which AnswerCall is invoked. | |
| ProxyDTMFCallId | System.String | The CallId to establish a proxy relationship with. Any digits received on one call leg will be proxied to the other. | |
| WaitForMedia | Metreos.AppServer.TelephonyManager.WaitMedia | Indicates what degree of media negotiation must be established before the call is considered answered. An answered call results in the successful completion of the AnswerCall action. Valid values are as follows:
| |
| Conference | System.Boolean | Indicates that this call is to be placed in a conference. If a ConferenceId is not specified or is set to 0, then a new conference is created on the media engine and the ConferenceId is the unique identifier for that new conference (assuming WaitForMedia is the default TxRx). If a ConferenceId is specified, then the connection created for this call is moved into the existing conference as soon as the media channels for the call have been fully established. | |
| ConferenceId | System.String | The ConferenceId of the conference to add this call to. Specify no value or 0 if this is to be a new conference. This field is ignored if Conference is false. | |
| Hairpin | System.Boolean | Indicates that the new conference should be optimized for two parties. 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. | |
| Timeout | System.Int32 | The 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. |
| Parameter Name | .NET Type | Description |
|---|---|---|
| CallId | System.String | Indicates the call that was accepted. This is always the same value passed in as the CallId action parameter. |
| MmsId | System.UInt32 | Unique 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. |
| ConnectionId | System.String | Unique identifier used to identify this connection in all subsequent Media Control API operations. This connection may not be fully connected, and therefore not ready to use in most Media Control API by the time it is returned to the script if WaitForMedia is not the default TxRx. |
| ConferenceId | System.String | Unique identifier for the conference that this connection was placed in. This field is valid only if Conference was specified as true in the action. In the case that Conference was set to true, and if the ConferenceId action parameter was specified, this event parameter will be that same value. If the ConferenceId action parameter was not specified, then this will be a new ID for the new conference. |
| MediaTxIP | System.String | The IP address that the media engine connection should send audio to. This field can only be relied on if WaitForMedia has been set to a value of Tx or TxRx. However, regardless if this field is available as a result data parameter, the application server will associate the correct value for this parameter to the connection created for this call when it becomes available at the protocol layer. |
| MediaTxPort | System.UInt32 | The port that the media engine connection should send audio to. This field can only be relied on if WaitForMedia has been set to a value of Tx or TxRx. However, regardless if this field is available as a result data parameter, the application server will associate the correct value for this parameter to the connection created for this call when it becomes available at the protocol layer. |
| MediaTxCodec | System.String | The codec that the media engine connection should use when sending audio. This field can only be relied on if WaitForMedia has been set to a value of Tx or TxRx. However, regardless if this field is available as a result data parameter, the application server will associate the correct value for this parameter to the connection created for this call when it becomes available at the protocol layer. |
| MediaTxFramesize | System.UInt32 | The framesize that the media engine connection should use when sending audio. This field can only be relied on if WaitForMedia has been set to a value of Tx or TxRx. However, regardless if this field is available as a result data parameter, the application server will associate the correct value for this parameter to the connection created for this call when it becomes available at the protocol layer. |
| MediaRxIP | System.String | The IP address chosen by the application server for the Rx RTP stream for this connection. This field can only be relied on if WaitForMedia has been set to a value of Rx or TxRx. However, regardless if this field is available as a result data parameter, the application server will associate the correct value for this parameter to the connection created for this call when it becomes available at the protocol layer. |
| MediaRxPort | System.UInt32 | The port chosen by the application server for the Rx RTP stream for this connection. This field can only be relied on if WaitForMedia has been set to a value of Rx or TxRx. However, regardless if this field is available as a result data parameter, the application server will associate the correct value for this parameter to the connection created for this call when it becomes available at the protocol layer. |
| MediaRxCodec | System.String | The codec chosen by the application server for the Rx RTP stream for this connection. This field can only be relied on if WaitForMedia has been set to a value of Rx or TxRx. However, regardless if this field is available as a result data parameter, the application server will associate the correct value for this parameter to the connection created for this call when it becomes available at the protocol layer. |
| MediaRxFramesize | System.UInt32 | The framesize chosen by the application server for the Rx RTP stream for this connection. This field can only be relied on if WaitForMedia has been set to a value of Rx or TxRx. However, regardless if this field is available as a result data parameter, the application server will associate the correct value for this parameter to the connection created for this call when it becomes available at the protocol layer. |
Branch Conditions
No description.
No description.
No description.