Hello everyone! When using `TransferSIPParticipant...
# telephony
e
Hello everyone! When using
TransferSIPParticipantRequest
for a cold transfer or
CreateSIPParticipantRequest
for a warm transfer, is it possible to preserve and pass the original caller's phone number? The issue is that the
From
number currently shows the previous agent's number, not the caller's. I need a way to include the original caller's number in the request payload or metadata so that the new agent receiving the call can see the correct phone number. Thanks
r
Copy code
create_request = api.CreateSIPParticipantRequest(
    sip_trunk_id=sip_trunk_id,
    sip_call_to=target_phone_number,
    sip_number=original_from_number,   # <- Pass the original caller ID here
    room_name=room_name,
    participant_identity=supervisor_identity,
    play_dialtone=True,
    hide_phone_number=False,
    krisp_enabled=True,
    wait_until_answered=True,
)
https://kb.livekit.io/articles/8118805435-preserving-caller-id-during-sip-transfers-in-livekit-agents
e
I'm getting this error: {"action": "transfer_call", "message": "Error transferring the call to +639851179433"}' TwirpError(code=permission_denied, message=twirp error unknown: unexpected status from INVITE response: sip status: 403: Caller ID is unauthorized. A Valid Caller ID is either a DID you have purchased from Twilio or a verified Caller ID., status=403, metadata={'error_details': 'CAcSrQF1bmV4cGVjdGVkIHN0YXR1cyBmcm9tIElOVklURSByZXNwb25zZTogc2lwIHN0YXR1czogNDAzOiBDYWxsZXIgSUQgaXMgdW5hdXRob3JpemVkLiBBIFZhbGlkIENhbGxlciBJRCBpcyBlaXRoZXIgYSBESUQgeW91IGhhdmUgcHVyY2hhc2VkIGZyb20gVHdpbGlvIG9yIGEgdmVyaWZpZWQgQ2FsbGVyIElELhqiAQoldHlwZS5nb29nbGVhcGlzLmNvbS9saXZla2l0LlNJUFN0YXR1cxJ5CJMDEnRDYWxsZXIgSUQgaXMgdW5hdXRob3JpemVkLiBBIFZhbGlkIENhbGxlciBJRCBpcyBlaXRoZXIgYSBESUQgeW91IGhhdmUgcHVyY2hhc2VkIGZyb20gVHdpbGlvIG9yIGEgdmVyaWZpZWQgQ2FsbGVyIElELg==', 'sip_status': 'Caller ID is unauthorized. A Valid Caller ID is either a DID you have purchased from Twilio or a verified Caller ID.', 'sip_status_code': '403'})
r
Check with Twilio
That error comes from them
e
But the sip_number is not required to be twilio did, right?
r
Depends on Twilio's rules. Some SIP providers support no other do not. See the note in the doc I sent:
Copy code
Ensure that your SIP trunk provider allows arbitrary caller ID (ANI) passthrough. Some providers may restrict the caller ID to verified numbers.
But either way that is outside of LiveKit control.
e
Okay, thank you!
l
hey @enough-nest-60267, I too am facing this exact issue and struggling to find a solution. Did you find a workaround? Or any other communication platform apart from Twilio?
e
Hi @lively-horse-90722 , You can use this sip_number to preserve the original caller's number, but it only working on twilio, I'm still having issue on other telephony