fix(voice): thread callSid through agent leg + conference API clients
Required by the stricter server-side call_sid requirements from the previous commit. Without this, agents would fail to join or leave calls because the client side still sent only conversation_id. - TwilioVoiceClient.joinClientCall now forwards callSid as a Device.connect param, which becomes params[:call_sid] on the TwiML webhook. - VoiceAPI.leaveConference takes callSid and passes it as a query param so the DELETE /conference endpoint can resolve the exact call. - useCallSession and FloatingCallWidget pass callSid through.
This commit is contained in:
@@ -42,8 +42,8 @@ export function useCallSession() {
|
||||
);
|
||||
});
|
||||
|
||||
const endCall = async ({ conversationId, inboxId }) => {
|
||||
await VoiceAPI.leaveConference(inboxId, conversationId);
|
||||
const endCall = async ({ conversationId, inboxId, callSid }) => {
|
||||
await VoiceAPI.leaveConference({ inboxId, conversationId, callSid });
|
||||
TwilioVoiceClient.endClientCall();
|
||||
durationTimer.stop();
|
||||
callsStore.clearActiveCall();
|
||||
@@ -66,6 +66,7 @@ export function useCallSession() {
|
||||
await TwilioVoiceClient.joinClientCall({
|
||||
to: joinResponse?.conference_sid,
|
||||
conversationId,
|
||||
callSid,
|
||||
});
|
||||
|
||||
callsStore.setCallActive(callSid);
|
||||
|
||||
Reference in New Issue
Block a user