openwonk
openwonk

Reputation: 15537

Transfer Enqueued Call to Conference Using Twilio

Imagine there is an incoming call currently enqueued via Twilio.

I want to transfer this call a new conference line.

Currently, my app "updates" the call with a redirect URL that responds with the following TwiML.

Unfortunately, it just hangs there, listening to music, and I never enter the conference.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial>
        <Conference endConferenceOnExit="true" startConferenceOnEnter="true" waitUrl="http://example.com/music">
            {{CallSid}}
        </Conference>
    </Dial>
</Response>

Note that the {{CallSid}} is dynamically updated with the call identifier (aka Call SID). Also, I have not tried this with a second phone (because maybe it won't connect to the conference line until there is more than one person?)

Upvotes: 0

Views: 307

Answers (1)

philnash
philnash

Reputation: 73029

Twilio developer evangelist here.

First up, your question in parentheses was indeed correct, a conference will not start with one person in, so will just play the hold music until someone else joins.

Secondly, once you added a second call you were still hearing hold music. However, for the <Conference> identifier, you said you were using the CallSid. That identifier is unique per call leg, so each of your calls would have different CallSids and thus would join different conference calls. To first ensure that this is the issue, I would test your code with a static identifier for the conference (<Conference>Test</Conference> for example). If you can get callers talking together like that, then you will need to find a way to identify a conference independent of the individual CallSids and use that as the identifier so that you can join the calls together.

Let me know if that helps at all.

Upvotes: 1

Related Questions