Twilio referURL - SIP Refer - refer to Twilio Flex

27 Views Asked by At

I have a scenario where by using Twilio studio I have created an IVR flow where user dial the Twilio DID which is associated with Twilio Studio flow. When customer press 1, according to my studio flow I am triggering a TwiML by using "Add Twiml Redirect" widget where I have used the Dial Verb to send the call on a third party Sip gateway using SIP URI. Call is successfully hitting the third party gateway.

Now if user press 2 after dialing the Twilio DID, the call is going towards Twilio Flex where agents online can answer the call. this is working fine as well.

My first question is when I send the call to a third party Sip gateway, I need to mention the referURL against Dial verb so Third party gateway can use this information when SIP Refer method is triggered. I don't know which referURL I should mention as I need the same call to be terminated using Twilio Flex so agent can answer. Following is a flow.

Twilio DID -> DTMF 1 passed -> Twilio sends the call to 3rd party SIP server -> 3rd Party SIP server sends the SIP Refer -> Twilio receive SIP Refer and sends the call to Agent queue.

Please not I have a flow with DTMF 1 to send the call to 3rd party Sip gateway and DTMF 2 to send the call to Flex Agent. These are working fine. Only issue is with SIP Refer, I want to pass SIP refer referURL against dial verb for Flex Agent Queue.

0

There are 0 best solutions below