Last month, a colleague was explaining he was not looking forward to an afternoon of long-distance conference calls. Having recently started using Slack for collaboration with their remote team, they lamented…
I wish I could do my conference calls using Slack!
…which got us thinking.
Recent experiments with IBM Watson Speech-to-Text and Twilio on IBM Bluemix had shown how easy it was to create telephony applications. Slack publishes multiple APIs to help developers build custom “bots” that respond to channel content. Could we create a new Slackbot that let users make phone calls using channel messages?
One month later, Phonebot was born!
What does it do specifically?
- Defines a Slackbot that lets users make phone calls within a Slack channel.
- Converts phone call audio to text and sends to the channel.
- Channel message replies are converted to speech and sent over the phone call.
TL;DR
Full source code for the project is available here. Follow the deployment instructions to run your own version. For technical details on how we built this application, see this detailed tutorial.
Deploying Phonebot
Phonebot is a Node.js application designed for deployment to IBM Bluemix, a Cloud Foundry Platform-as-a-Service instance. Before deploying the application, you will need to:
- Register Slack webhooks to allow the bot to send and receive channel messages.
- Register for Twilio API credentials.
Then run the following CF CLI commands to provision the IBM Bluemix services needed by the application:
$ cf cups twilio -p '{"accountSID":"ACCOUNT_SID","authToken":"TOKEN"}'
Replace the ACCOUNT_SID and TOKEN values with credentials from your Twilio account settings page.
Run the following CF CLI command to register your Slack channel webhooks within IBM Bluemix:
$ cf cups slack_webhooks -p '{"channel_name":"incoming_webhook_url",...}'
Replace the channel_name
and incoming_webhook_url
with the actual values for the channel name and incoming webhooks found at your Slack integrations page. Note: You have to register each channel as a separate property.
Deploy! You’ve now got everything configured! Deploying the application is easy, just run this command:
$ cf push --name your_random_identifier
Modify your_random_identifier
to a name relevant for your Phonebot instance. Once the application has finished deploying, Phonebot will be listening to requests at http://your_random_identifier.mybluemix.net
. Note: This address must match the URL registered with the outgoing webhooks.
That’s it, you’re done! Phonebot should post a message to each registered channel to confirm it’s ready for action.
Using Phonebot
Phonebot will post the following message to each channel successfully registered on startup:
Users can issue @phonebot COMMAND messages to control phone calls directly from the slack channel:
|
For further information about the project, follow the project on Github; upcoming features are listed in the issues page.
Please feel free to ask for new features, report bugs and leave feedback on Github!
The post Phonebot: Conference Calls in Slack using Bluemix and Watson appeared first on Bluemix
The post Phonebot: Conference Calls in Slack using Bluemix and Watson appeared first on Platform as a Service Magazine.