createMeetingDialOut method
Uses the join token and call metadata in a meeting request (From number, To number, and so forth) to initiate an outbound call to a public switched telephone network (PSTN) and join them into a Chime meeting. Also ensures that the From number belongs to the customer.
To play welcome audio or implement an interactive voice response (IVR),
use the CreateSipMediaApplicationCall action with the
corresponding SIP media application ID.
May throw AccessDeniedException.
May throw BadRequestException.
May throw ForbiddenException.
May throw ResourceLimitExceededException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottledClientException.
May throw UnauthorizedClientException.
Parameter fromPhoneNumber :
Phone number used as the caller ID when the remote party receives a call.
Parameter joinToken :
Token used by the Amazon Chime SDK attendee. Call the CreateAttendee
action to get a join token.
Parameter meetingId :
The Amazon Chime SDK meeting ID.
Parameter toPhoneNumber :
Phone number called when inviting someone to a meeting.
Implementation
Future<CreateMeetingDialOutResponse> createMeetingDialOut({
required String fromPhoneNumber,
required String joinToken,
required String meetingId,
required String toPhoneNumber,
}) async {
final $payload = <String, dynamic>{
'FromPhoneNumber': fromPhoneNumber,
'JoinToken': joinToken,
'ToPhoneNumber': toPhoneNumber,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/meetings/${Uri.encodeComponent(meetingId)}/dial-outs',
exceptionFnMap: _exceptionFns,
);
return CreateMeetingDialOutResponse.fromJson(response);
}