Examples
Redirect Call to a new RCML
curl -X POST https://v1.api19.com/call/2012-04-24/Accounts/ACCOUNT_SID/Calls/CALL_SID.json \
-d 'Url=http://mycompany.com/api19/demos/dialalice.xml' \
-u 'API_Token'
Redirect Call to a new RCML and connect both call legs
curl -X POST https://v1.api19.com/call/2012-04-24/Accounts/ACCOUNT_SID/Calls/CALL_SID.json \
-d 'Url=http://mycompany.com/tcml/demos/conference.xml' \
-d 'MoveConnectedCallLeg=true' \
-u 'API_Token'
Terminate In Progress call
curl -X POST https://v1.api19.com/call/2012-04-24/Accounts/ACCOUNT_SID/Calls/CALL_SID.json \
-d 'Status=completed' \
-u 'API_Token'Terminate Ringing call
Modifying Live Calls - Example
In order to accomplish this, you need to create a client called Alice
Start a SIP phone and register Alice
From the terminal run the following curl command
Make sure Alice is using the port 5061
The "From=" could be any number of your choice
The Url is the default sample example provided with CallAPI.
Modifying a Live Call
Notice the "sid": "CAfa51b104354440b09213d04752f50271", This Call ID is what you must use to interact with the current call. You can now redirect the current call to another application as shown below Notice that the Call ID is referenced The call will now be redirected to the Url specified(hello-play.xml).
You can still redirect the current call back to the previous application
You can still redirect the current call back to the previous application
You can Mute/unMute an in progress call as shown bellow
Last updated