2017-05-10 9 views
3

Twilio 전화 회의에 대한 기사가 많이 읽 힙니다. 나는 this 링크가있는 회의에 링크에 액세스 할 수있는 사람을 추가 할 수있는 Twilio 회의를 만드는 PHP 함수를 만들었습니다. 그래서 Twilio와 동시에 여러 번호로 전화 걸기에 관한 this 기사를 읽습니다.발신자 Twilio에서 전화 회의에 여러 사람 추가하기

이 문서에서는 동시에 여러 클라이언트 또는 전화 번호로 전화를 거는 방법을 보여줍니다. 그러나 전화를받는 사람은 다른 사람이 전화를 끊을 때 전화를 겁니다.

<?xml version="1.0" encoding="UTF-8"?> 
<Response> 
    <Dial> 
    <Number>877-555-1212</Number> 
    <Number>877-999-1234</Number> 
    <Number>877-123-4567</Number> 
    </Dial> 
</Response> 

이제 제 질문은 전화 회의에 모두 twilio PHP 기능을 추가 할 수 있습니까?

또한 스택 오버플로에 대한 질문이 this인데 다른 점은 TwiML을 사용한다는 것입니다. 그런 다음 모든 클라이언트를 같은 방에 추가하는 기능이 있다고 생각합니다.

$dial->conference('My conference', array(
      'startConferenceOnEnter' => True, 
      'endConferenceOnExit' => True 
      )); 

답변

3

내가 twilio에서 티켓을 오픈, 자사의 개발자 중 하나는 통화 트로프 REST API를하고 동일한 회의 에 있지만 내 안드로이드 응용 프로그램은 그래서 twilML 가리키는 내 경우에 클라이언트 또는 모든 숫자를 추가했다 회의 통화에 발신자를 추가 한 다음 해당 전화 회의에 내 REST 통화를하기로 결정했습니다.

이제 내 경우에 효과가있었습니다.

여기 내 코드

...... 
//some php codes to configure the Twilio and get the from and to caller ids 


//this part belongs to my caller. I added this php file url to my TwiML app 
//so when my user hit the dial button it will sent the caller to this conference room and waits for others. 
$response = new Twiml; 
$dial = $response->dial(); 
$dial->conference('Room 123', array(
       'startConferenceOnEnter' => True, 
       'endConferenceOnExit' => True 
       )); 
print $response; 


//this is the part that make a call other participants and will add them to the same conference room that caller is. 
$call = $client->calls->create(
    "yourClient", "youtwiliophonenumber", 
    array("url" => "http://domain/conference.xml") 
); 

그리고 여기 내 XML 파일

<?xml version="1.0" encoding="UTF-8"?> 
<Response> 
    <Dial> 
    <Conference startConferenceOnEnter="true" endConferenceOnExit="true">Room 123</Conference> 
    </Dial> 
</Response> 
+0

좋은 직장 남자입니다 REST 호출 API를 의 URL이 XML 파일을 추가합니다. 너는 최고야. –