Skip to content

Prompt Input Event
Webhook

Request

This callback is triggered as a result of a runMenu action. It can be triggered from either a user pressing a number of DTMF digits, or by the return command.

It's a POST request to the specified calling callback URL. Your application can respond with SVAML logic.

Note: PIE callbacks are not issued for DATA Calls, only PSTN and SIP calls.

Security
Basic or Signed
Bodyapplication/json
eventstring(webhooksEventRequestType)required

Must have the value ice.

ValueDescription
ice

An Incoming Call Event.

Discriminator
callidstring

Used in some types of events, it presents the unique ID assigned to this call.

conferenceIdstring

Used in some types of events, it presents the unique Conference ID assigned to this call.

versioninteger

The current API version.

timestampstring, (date-time)(timeStamp)

The timestamp in UTC format.

Example:"2023-04-21T14:45:51Z"
customstring

A string that can be used to pass custom information related to the call.

applicationKeystring

The unique application key. You can find it in the Sinch dashboard.

callResourceUrlstring

The path of the API resource.

userRateobject(price)
clistring

The number that will be displayed to the recipient of the call. To set your own CLI, you may use your verified number or your Dashboard virtual number and add it to the connectPSTN SVAML response to the Incoming Call Event request. It must be in E.164 format.

toobject(destination)
domainstring(domain)

Can be either pstn for PSTN endpoint or mxp for data (app or web) clients.

Enum ValueDescription
pstn

A call on the Public Switched Telephone Network.

mxp

A data call.

PSTN

A call on the Public Switched Telephone Network.

MXP

A data call.

Example:"pstn"
originationTypestring(domain)

Can be either pstn for PSTN endpoint or mxp for data (app or web) clients.

Enum ValueDescription
pstn

A call on the Public Switched Telephone Network.

mxp

A data call.

PSTN

A call on the Public Switched Telephone Network.

MXP

A data call.

Example:"pstn"
durationinteger

The duration of the call in seconds.

rdnisstring

The redirected dialled number identification service.

callHeadersArray of objects(callHeader)

If the call is initiated by a Sinch SDK client, call headers are the headers specified by the caller client. Read more about call headers here.

POST
pie
Payload

An example of a Prompt Input Event.

{ "event": "pie", "callId": "3b0a7ccd-05e1-4728-bafd-023b77c47784", "timestamp": "2022-03-21T13:14:19Z", "menuResult": { "menuId": "sub", "type": "sequence", "value": "3576", "inputMethod": "dtmf" }, "version": 1, "applicationKey": "3b216e8d-e274-4ff9-ae80-5d11897006b0" }

Responses

The Prompt Input Event (PIE) can accept a valid SVAML object in response.

Bodyapplication/json
instructionsArray of objects(svaml.instruction.pie)

The collection of instructions that can perform various tasks during the call. You can include as many instructions as necessary.

actionobject(svaml.action.pie)
Response

A SVAML response to an Prompt Input Event that plays a message to the callee and then hangs up the call.

{ "instructions": [ { … } ], "action": { "name": "hangup" } }