Skip to main content
When you make or receive a call through mycpaas, call status changes are delivered to your server in real time. Each time the call transitions to a new state — from initiated, to ringing, to answered, to completed — mycpaas sends an HTTP POST to the StatusCallback URL you configure.

When this webhook fires

mycpaas sends a POST to your StatusCallback URL on every call status transition. You can optionally limit which statuses trigger a notification using the StatusCallbackEvent parameter.

Payload fields

mycpaas sends the following fields as application/x-www-form-urlencoded in the POST body:
CallSid
string
required
A unique identifier for the call (e.g., CA1234567890abcdef). Use this to correlate status updates to a specific call.
CallStatus
string
required
The current status of the call. See the table below for all possible values.

Call status values

StatusDescription
initiatedThe call has been created and mycpaas is preparing to dial.
ringingThe destination phone is ringing.
in-progressThe call was answered and is now active.
completedThe call ended normally.
failedmycpaas could not connect the call due to a network or carrier error.
busyThe destination was busy.
no-answerThe call rang without being answered and timed out.

Configuring StatusCallback

Pass StatusCallback and optionally StatusCallbackEvent when creating a call via the REST API:
curl -X POST https://developer.mycpaas.io/api/laml/2010-04-01/Accounts/ACxxx/Calls.json \
  -u ACxxx:AUTH_TOKEN \
  -d "To=+491234567890" \
  -d "From=+491098765432" \
  -d "Url=https://your-server.example.com/laml/call" \
  -d "StatusCallback=https://your-server.example.com/webhooks/voice" \
  -d "StatusCallbackEvent=completed failed"
StatusCallbackEvent accepts a space-separated list of statuses. Omit it to receive all status transitions.

Raw POST payload example

POST /webhooks/voice HTTP/1.1
Host: your-server.example.com
Content-Type: application/x-www-form-urlencoded

CallSid=CA1234567890abcdef&CallStatus=completed

Handler example

The following Express handler logs each call status update and acknowledges receipt:
import express from 'express';

const app = express();
app.use(express.urlencoded({ extended: false }));

app.post('/webhooks/voice', (req, res) => {
  const { CallSid, CallStatus } = req.body;

  console.log(`Call ${CallSid} status: ${CallStatus}`);

  // No LaML response needed for status callbacks — just acknowledge
  res.status(200).send();
});

app.listen(3000);
Status callbacks are fire-and-forget notifications. You do not need to return LaML XML — mycpaas ignores the response body. Return HTTP 200 promptly to prevent retries.