Receiving outbound call-initiated notification
When performing Outbound calling, VoiceAI Connect usually sends an event to the bot only when the call is answered.
VoiceAI Connect can be configured to send an additional event to bot immediately when the outbound call is initiated.
This event can be used for receiving the call details on the bot in a early stage, so it will have them even in case the call has failed. It includes all the parameters that are sent with the initial event that is sent to the bot.
How do I use it?
To receive the dialoutInitiated
event, the administrator should add the value "dialoutInitiated" to the sendEventsToBot
bot configuration parameter:
The event contains the same data fields as the event sent on Call initiation.
The syntax of the event depend on the bot framework:
This message is sent as a dialoutInitiated
event. The data fields are sent as the value of the event.
Example:
{ "type": "event", "name": "dialoutInitiated", "value": { "vaigConversationId": "daf0c30f-e7a7-4644-b20b-667676b70615", "outboundTarget": "tel:+123456789", "callee": "123456789", "caller": "1-800-111-111", "dialoutMetadata": { "participantName": "Alice" } } }
This message is sent as a dialoutInitiated
event. The data fields are sent as the value of the event.
Example:
{ "type": "event", "name": "dialoutInitiated", "value": { "vaigConversationId": "daf0c30f-e7a7-4644-b20b-667676b70615", "outboundTarget": "tel:+123456789", "callee": "123456789", "caller": "1-800-111-111", "dialoutMetadata": { "participantName": "Alice" } } }
This message is sent as a dialoutInitiated
event. The data fields are sent as the value of the event.
Example:
{ "type": "event", "name": "dialoutInitiated", "value": { "vaigConversationId": "daf0c30f-e7a7-4644-b20b-667676b70615", "outboundTarget": "tel:+123456789", "callee": "123456789", "caller": "1-800-111-111", "dialoutMetadata": { "participantName": "Alice" } } }
This message is sent as a dialoutInitiated
event. The data fields are sent as the value of the event.
Example:
{ "type": "event", "name": "dialoutInitiated", "value": { "vaigConversationId": "daf0c30f-e7a7-4644-b20b-667676b70615", "outboundTarget": "tel:+123456789", "callee": "123456789", "caller": "1-800-111-111", "dialoutMetadata": { "participantName": "Alice" } } }
This message is sent as a dialoutInitiated
event. The data fields are sent as the event parameters.
Example:
{ "queryInput": { "event": { "name": "dialoutInitiated", "parameters": { "vaigConversationId": "daf0c30f-e7a7-4644-b20b-667676b70615", "outboundTarget": "tel:+123456789", "callee": "123456789", "caller": "1-800-111-111", "dialoutMetadata": { "participantName": "Alice" } } } } }
For Dialogflow CX, the data fields are also sent inside the
event-dialoutInitiated
session parameter, and can be used when generating the response text,
by using a syntax such as this:
$session.params.event-dialoutInitiated.callee
This message is sent as a dialoutInitiated
event. The data fields are sent as the event parameters.
Example:
{ "queryInput": { "event": { "name": "dialoutInitiated", "parameters": { "vaigConversationId": "daf0c30f-e7a7-4644-b20b-667676b70615", "outboundTarget": "tel:+123456789", "callee": "123456789", "caller": "1-800-111-111", "dialoutMetadata": { "participantName": "Alice" } } } } }
For Dialogflow ES, the data fields can be used when generating the response text, by using a syntax such as this:
#dialoutInitiated.caller