I had read Twilio documentation about call transfer twilioDoc, StackOverflow and a lot of other stuff related to call transfer too. What I had tried is:
Step 1.
Dial Call from web browser to phone number via javascript params. (call working fine)
params = {
"PhoneNumber": number,
"CallerId": "+1863201xxxx",
"AgentName": "admin",
};
var connection = Twilio.Device.connect(params);
Step 2.
Click the call transfer button and point it to the conference twiml
$conferenceId = $_REQUEST['callsid'];
$statusCallbackUrl = "https://example.net/Welcome/conference_control";
<Response>
<Dial>
<Conference beep="false" statusCallback="<?php echo $statusCallbackUrl; ?>"
statusCallbackEvent="start end join leave mute hold" endConferenceOnExit="true"
startConferenceOnEnter="true">
<?php echo $conferenceId; ?>
</Conference>
</Dial>
</Response>
Note: conferenceId is callID, the call already connected to the client
Step 3.
I dial a participant to dial a conference
$participant = $twilio->conferences($_REQUEST['callsid'])
->participants
->create($caller_id, "+9230641xxx55");
// caller_id is the agent:admin (web client) and the phone number
The call rings to the phone number when he picks only the music plays.
Twilio conference call has only 1 participant don't know why? Why the first active call not converted to a conference call, if not possible then how it will be?