Reputation: 1
I have a phone number and a sip Domain on twilio, i want to transfer the call i receive on the phone number to the domain programatically. the sip domain is also configured to route calls to a webhook that internally attaches a websocket to the call and transfers audio.
based on some event on the phone number call i am transferring the call using Dial like below
twiml = VoiceResponse()
dial: Dial = Dial()
if ccas_caller_id:
dial = Dial(callerId=ccas_caller_id)
dial.sip(
sip_url="sip:yourdomain.sip.twilio.com",
username=username,
password=password,
)
twiml.append(dial)
response = client.calls(ccas_call_sid).update(twiml=str(twiml))
the call fails at this point and in twilio error logs i see 32223,There is no username in the SIP URI when calling a SIP registered endpoint
.
I am pretty new to using SIP, i do not have a SIP infra, and not sure how i can register a dummy user in the sip domain. tried enabling the sip registrations in the domain and sip URI like sip:[email protected]
however it failed with Your TwiML tried to Dial a Twilio SIP Registered User that is not currently registered
what would be the way to make this transfer possible.
with registration enabled i was expecting it to register the user and transfer the call to the domain where it would be routed to the webhook on my server. however it failed without registering the user.
Upvotes: 0
Views: 45