This document describes all webhook events sent by the Asterisk AMI listener. Your webhook endpoint will receive HTTP GET requests with query parameters for each call event.
Webhook URL format:
<https://your-endpoint.com/webhook/voip?event=EVENT_TYPE&uniqueid=XXX&callerid=XXX&>...
startDescription: A new call has been initiated. A channel has been created in Asterisk.
When it fires: Immediately when someone dials a number (outbound) or when an incoming call arrives (inbound).
Use case: Create a new call record in your database.
| Parameter | Type | Description | Example |
|---|---|---|---|
event |
string | Always start |
start |
uniqueid |
string | Unique call identifier | 1706012345.123 |
callerid |
string | Caller's number or extension | 100 or 0612345678 |
extension |
string | Internal extension (if applicable) | 100 |
channel |
string | Full Asterisk channel name | PJSIP/100-00000001 |
dialed |
string | Number that was dialed | 0612345678 |
channel_state |
string | Initial channel state | Down or Ring |
Example request:
GET /webhook/voip?event=start&uniqueid=1706012345.123&callerid=100&extension=100&channel=PJSIP%2F100-00000001&dialed=0612345678&channel_state=Down
ringingDescription: The destination phone is now ringing.
When it fires: When Asterisk starts ringing the destination number.
Use case: Update UI to show "Ringing..." status.
| Parameter | Type | Description | Example |
|---|---|---|---|
event |
string | Always ringing |
ringing |
uniqueid |
string | Unique call identifier | 1706012345.123 |
callerid |
string | Caller's number | 100 |
extension |
string | Caller's extension | 100 |
channel |
string | Caller's channel | PJSIP/100-00000001 |
dialed |
string | Number dialed | 0612345678 |
dest_channel |
string | Destination channel | PJSIP/trunk-00000002 |
dest_callerid |
string | Destination number | 0612345678 |
dest_uniqueid |
string | Destination unique ID | 1706012345.124 |
dialstring |
string | Dial string used | 0612345678@trunk |