VoiceChat is a set of APIs to create ad-hoc conferences to be used in the browser. Its built using the Plivo WebSDK and APIs.
- Create a Plivo account
- Create and verify a Heroku account if you don't have one then click the button below.
$ git clone https://github.com/plivo/voicechat.git
Create a Plivo account if you haven't already
Create and verify a Heroku account if you haven't.
$ cd voicechat
$ heroku create {app_name} -s cedar
$ git push heroku master
$ heroku addons:create redistogo:nano --app {app_name}
$ heroku ps:scale web=1
Add Plivo Auth ID and Auth Token to env from the dashboard.
$ heroku config:set PLIVO_AUTH_ID={PLIVO_AUTH_ID}
$ heroku config:set PLIVO_AUTH_TOKEN={PLIVO_AUTH_TOKEN}
Go to {app_name}.herokuapp.com
POST /api/v1/conference/
$ curl -XPOST http://voicechatapi.com/api/v1/conference/
{
"conference_name": "p12ygdwt1",
"conference_url": "http://voicechatapi.com/p12ygdwt1/"
}
POST /api/v1/conference/<conference_name>/
to - The phone number to be called.
clid - The caller id which will be used. (The phone number to be shown in the recipient's phone.)
$ curl -XPOST -d "to={1415123####}&clid={1415123####}" http://voicechatapi.com/api/v1/conference/<conference_name>/
{
"success": True,
"message": "Call has been queued"
}