Click2Client - Call Me button
I modeled Click2Client after a similar WordPress plugin, wp-click2call. My finished project was similar to the original, but did not have the same functionality (namely, the ability for the customer to call the author in one click). Luckily, it's pretty simple to make a similar application very quickly. Here's how:
- Install the wp-click2client plugin
- Create an xml file that looks like this:
[xml title="forward.xml"]
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial callerId='VERIFIED'>
<Number>NUMBERTODIAL</Number>
</Dial>
</Response>
[/xml]
Be sure to replace VERIFIED with a Twilio Verified phone number (preferably in the 11-digit format +11231231234), and NUMBERTODIAL with the number you would like the customer to call (i.e. Sales dept). For more customized behavior, read the documentation. - Upload the XML file: In your WordPress Admin panel sidebar, go to Media->Add New. Upload your xml file, then select Edit and copy the File URL.
- Create a Twilio Application: In your Twilio Account's Apps page, click the "Create TwiML App" button. Name it something, like "WP Click2Client Forward", then paste the File URL from the previous step into the Request URL. Save it, and copy the App's Application Sid (34 digit ID, starts with "AP").
- Make the Click2Client button: Paste the code in where you want the button to show up
[[wp_click2client id="ApplicationSid"]]
Replace ApplicationSid with the Application Sid from the previous step, and that's it! Anyone who presses that button will be immediately connected to your phone through their browser.
See an example.