REST ClientCalling

user_event

View as MarkdownOpen in Claude

Send a custom user-defined event on an active call. User events allow you to pass arbitrary data between call control applications and event handlers. Listeners registered for user events on the RELAY side will receive the payload you send here.

Request

idstringRequiredformat: "uuid"
The unique identifying ID of a existing call.
paramsobjectRequired
An object of parameters that will be utilized by the active command.

Response

Call LegobjectRequired
Returned when the call is a standard PSTN, SIP, or WebRTC call.
OR
Fabric Subscriber Device LegobjectRequired

Returned when the call is a Fabric subscriber device leg. The status field is always null for this type.

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9client.calling.user_event(
10 call_id="call-id-xxx",
11 event={"action": "order.confirmed", "order_id": "ORD-12345", "amount": 49.99},
12)