Programmable PBX
Want to decide call flow based on caller-id?
Pivot allows calls to be controlled by code running on your web server. This is useful for dynamic interactions such as customers checking account balances, appointment schedules, dating services and so on.
You can utilize information such as the Caller ID of the caller to determine what to do with the call, or prompt the caller for information such as account numbers before taking action on the call.
How Does it Work?
Call comes in
What should we do?
We send an HTTP GET or POST request to your script.
Your script replies
Your web script returns a JSON payload with instructions
Results + what next?
We complete the previous request, send you the results and wait for new instructions.
You reply again
Your script returns a JSON payload with new instructions
What does a request look like?
When a call comes in to a configured Pivot number, we'll make a request to your web script with the following information:
Request | |
URI: | http://your-server.pivot.com/pivot/inboundSupportCall.php |
POST Parameters | |
Language | en-us |
Caller-ID-Number | 99992 |
Caller-ID-Name | 99992 |
Direction | inbound |
Api-Version | 2015-03-01 |
To-Realm | sip.staging.pivot.com |
To | 4999 |
From-Realm | sip.staging.pivot.com |
From | nouser |
Account-ID | b6bcca6222424e2cb41dbc5a572d428e |
Call-ID | 2330c1a8-c42e-11e4-9326-531521883344 |
Headers | None |
What does a response look like?
When responding to the above request, your script might analyze the Caller ID of the caller and decide to identify the caller automatically and play their account balance, then connect them to customer support.
Returned Body
{ "module":"tts", "data":{ "text":"Hello Sally. Your current account balance is 5 dollars and 72 cents. We will now connect you with customer support." }, "children":{ "_":{ "module":"resources", "data":{ "to_did":"+14158867900", "use_local_resources":false } } } }