通話の転送
通話の転送は、アクティブなレッグを新しい会話コンテキストに移します。クライアントのコールバックでは、 callId …の間、安定した状態を維持している conversationId 変更点。
一般的な利用例としては、コンタクトセンターでの通話ルーティングや、IVRからエージェントへの引き継ぎなどが挙げられます。
クライアント転送イベント — onCallTransfer
コピー
client.on('callTransfer', (callId, newConversationId) => {
console.log(
`Call ${callId} was transferred to a new conversation ${newConversationId}`
);
});
コピー
client.setCallTransferListener { call, conversationId ->
println("Received Call Transfer for call: $call into the conversation: $conversationId")
}
コピー
client.setCallTransferListener((call, conversationId) -> {
System.out.println("Call " + call + " was transferred to conversation " + conversationId);
return null;
});
コピー
class CallTransferExampleDelegate: NSObject, VGVoiceClientDelegate {
func voiceClient(_ client: VGVoiceClient, didReceiveCallTransferForCall callId: VGCallId, withConversationId conversationId: VGConversationId) {
print("call: \(callId) has been transferred to conversation: \(conversationId)")
}
func voiceClient(_ client: VGVoiceClient, didReceiveHangupForCall callId: VGCallId, withQuality callQuality: VGRTCQuality, reason: VGHangupReason) {}
func voiceClient(_ client: VGVoiceClient, didReceiveInviteForCall callId: VGCallId, from caller: String, with type: VGVoiceChannelType) {}
func voiceClient(_ client: VGVoiceClient, didReceiveInviteCancelForCall callId: VGCallId, with reason: VGVoiceInviteCancelReason) {}
func client(_ client: VGBaseClient, didReceiveSessionErrorWith reason: VGSessionErrorReason) {}
}
コピー
- (void)voiceClient:(VGVoiceClient *)client didReceiveCallTransferForCall:(VGCallId)callId withConversationId:(NSString *)conversationId {
NSLog(@"Call %@ has been transferred to conversation %@", callId, conversationId);
}
州の期待
callId: 変更なしconversationId: 対象の会話に更新しました- メディアセッション:転送フローを通じて継続する
NCCOへの移行
以下の例は、必要なNCCOの構造を示しています。実際の実装は、使用するバックエンド言語やフレームワークによって異なります。
コピー
const transferNcco = [
{
action: 'transfer',
conversation_id: 'CON-destination-conversation-id'
}
];
res.json(transferNcco);
参考: NCCOの移管措置