Skip to content

Sinch Voice Application Markup Language (SVAML)

SVAML is a call control markup language developed by Sinch. When your application or server receives a callback event from the Sinch platform, it can respond with a SVAML object to control the voice call. The SVAML object type is defined like this:

instructionsArray of objects(svaml.instruction)

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

actionobject(svaml.action)

The action that will control the call. Each SVAML object can only include one action.

SVAML Quick Reference

A SVAML object is made up of Actions and Instructions. A SVAML object must contain exactly one action but can have as many instructions as necessary.

Actions

ActionFunctionalityICEACEPIE*
hangupEnds the callYesYesYes
continueContinues the callNoYesYes
connectPstnDictates how the PSTN call will be connectedYesNoYes
connectMxpDetermines whether the app-app call will be connectedYesNoNo
connectConfConnects the call to a conferenceYesYesYes
connectSipConnects the call to a SIP serverYesNoYes
connectStreamConnects the call to a Stream/Websocket server - Closed betaYesNoNo
runMenuPlays a menu to the calleeYesYesYes
parkPuts an incoming call on holdYesNoNo
PIE* callbacks

PIE callbacks are not available for DATA calls; only PSTN and SIP calls.

Instructions

Note:

Instructions must always accompany an action and will not work standalone.

InstructionFunctionalityICEACEPIE*
playFilesPlays Interactive Voice Response (IVR) filesYesYesYes
sayPlays a text-to-speech messageYes*YesYes
sendDtmfSend DTMF tonesYesNoYes
setCookieSets a cookie that can be accessed throughout the callYesYesYes
startRecordingStarts call recordingYesYesYes
stopRecordingStops call recordingNoNoYes
answerForces the callee to answer the call.YesNoNo
PIE* callbacks

PIE callbacks are not available for DATA calls; only PSTN and SIP calls.

say* in ICE callbacks

When using the say instruction with ICE callbacks, not all providers will deliver the message to the callee. To ensure the say instruction is heard, use the answer instruction before say, as in the following example:

Example of say instruction in ICE callbacks
instructions: [
    {
      "name": "answer",
    },
    {
      "name": "say",
      "text": "This is a say command issued from an instruction.",
      "locale": "en-US",
     },
]