Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now


Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Twilio Client間の通話


Calling from one client to another requires that you provide both the incoming and outgoing capabilities in the Capability Token. It also means we can't just use the hard-coded value of "joey" for the client name for the incoming capability. Each client needs to be uniquely addressable by their client name. Assuming the server knows who the client is, it can be sure to provide a unique client name when generating the token.

You will also need a TwiML App SID and have your server application provide this SID to the outgoing capability of the token generator.



        As you may have learned in our Outgoing Calls with Twilio Client guide, your TwiML App needs to be configured to return TwiML that will instruct Twilio how to connect your outbound call. In our case, we want to provide it the client name of another client to call, as opposed to an external phone number. Our server application can then generate the appropriate TwiML <Dial> verb, using the <Client> verb inside of that to indicate we want to call another client.



              What we want to do is have the client make a call to another client. In order to do this, our client needs to pass a parameter to our TwiML App. The parameter can be anything you like, but we'll use "To" to indicate to whom we wish to make a call. In our Outgoing Calls with Twilio Client guide, this was a phone number, but now it will be a client name.



                    To accept a call, you only need to listen for the incoming event. That event will pass you a connection object on which you can call the accept() method.


                          For more about receiving calls with Twilio Client, see our Incoming Calls with Twilio Client guide.

                          David Prothero
                          Rate this page:


                          誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。