Why do I receive an answered event when I start an outbound call? Why do I receive an answered event when I start an outbound call?

Why do I receive an answered event when I start an outbound call?

Nexmo Support

Symptom

When I start an outbound in-app Voice call I receive 'member:joined', 'rtc:answered', 'leg:status:update answered' events.

Applies To

  • Voice API
  • Outbound Calls

Resolution

In order for an app user to send and receive audio, the user must be joined as a member to a conversation. When you start an outbound call, the SDK automatically joins the user as a member to the conversation and negotiates media with the Vonage platform. It is necessary to join the user at this stage of the call to ensure any audio is relayed to the app user appropriately. For example, if you are performing an outbound call with the following NCCO:

[
{
"action": "connect",
"from": "VONAGE_LVN",
"endpoint": [
{
"type": "phone",
"number": "PHONE_NUMBER"
}
]
}
]

The app user would expect to experience ringing tone or any network-generated messages by the far end operator. The same logic applies if you have a talk or stream action before connecting to a phone endpoint.