Skip to content

kelvl/twilio-call-transfer-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Twilio Call Transfer Example

Contrived but short example on how to create series of browser softphones using Twilio, Twilio Client's APIs and transfer incoming PSTN calls between them.


####Requirements

Documentation

This project exposes 3 different endpoints

/client/<client_name>

Displays a page with a Twilio Client under the client name: <client_name>

Calls directed to the client named, <client_name> will ring the browser showing this page.

The following TwiML calls the Twilio Client on /client/alice

<Response>
    <Dial>
        <Client>alice</Client>
    </Dial>
</Response>
/incoming_voice_url/<client_name>

Used as the Voice URL for your Twilio Number to forward all calls made to that number to the designated <client_name>

/transfer_call/<from_client>/to/<to_client>

Called within a Javascript AJAX call to transfer the current call from <from_client> to <to_client>


Installation

  1. Clone the repository
  2. Edit TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN
  3. Added http://<server>/incoming_voice_url/alice as your phone number's Voice URL in the Twilio Dashboard
  4. Open 2 browser windows to http://<server>/client/alice and http://<server>/client/bob
  5. Call in to your Twilio number and Alice's browser phone will ring and click on the transfer to Bob button.

About

Twilio Client Call Transfer Example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages