0
votes

The problem I'm trying to solve is having a Twilio phone number connect to a TwiMl, created within my PHP code, while making an outbound call with the end result having the caller and callee in the conference room together.

To set up the TwiMl I coded:

$response = '<Response>
                <Play>%s</Play>
                    <Dial timeout=\'60\' callerId=\'%s\'>
                        <Conference startConferenceOnEnter="true" endConferenceOnExit="true">
                            conf-test
                        </Conference>
                    </Dial>
            </Response>';

And to connect the callee to the call, I'm trying to use:

$client->account->calls->create(
            +1XXXXXXXXXX, //To
            +1XXXXXXXXXX, //From
            array(
                "url" => ???));

How do I get the URL from the above TwiMl into the url to connect further participants as well as the initial callee? Is this even possible, or am I forced to use a TwiMl bin and use that URL?

1

1 Answers

1
votes

You can pass in TwiML using the below approach,

Pass TwiML with Call Initiation Requests https://www.twilio.com/changelog/pass-twiml-call-initiation-requests