{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/functions/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["partial"]},"type":"markdown"},"seo":{"title":"Developer Documentation","siteUrl":"https://developers.sinch.com","llmstxt":{"title":"Sinch Developer Documentation","description":"LLMs.txt containing a map of all the documentation files for Sinch.","sections":[{"title":"SMS API","description":"The SMS API allows you to send and receive SMS messages with a few easy steps. You can also send bulk SMS messages to multiple customers using the Sinch SMS service.","includeFiles":["docs/sms/**/*.md","docs/sms/**/*.yaml"],"excludeFiles":["docs/sms/index.md"]},{"title":"Numbers API","description":"The Numbers API enables you to search for, view, and activate numbers. It's considered a precursor to other APIs in the Sinch product family. The numbers API can be used in tandem with any of our APIs that perform messaging or calling.","includeFiles":["docs/numbers/**/*.md","docs/numbers/**/*.yaml"],"excludeFiles":["docs/numbers/index.md"]},{"title":"Conversation API","description":"Send and receive messages globally on many popular channels with ease and confidence when using Sinch's Conversation API. Conversation API is the preferred API for sending mobile messages on SMS and other social channels with Sinch. It is a simple API with unified error messages, consistent request payloads, and common webhook payloads that are channel-agnostic.","includeFiles":["docs/conversation/**/*.md","docs/conversation/**/*.yaml"],"excludeFiles":["docs/conversation/index.md"]},{"title":"Voice API","description":"The Voice API works as a big telephony switch. The Voice API handles incoming phone calls (also known as incoming call “legs”), sets up outgoing phone calls (or outgoing call “legs”), and bridges the two. The incoming call leg may come in over a data connection (from a smartphone or web application using the Sinch SDKs) or through a local phone number (from the PSTN network). Similarly, the outgoing call leg can be over data (to another smartphone or web application using the Sinch SDKs) or the PSTN network.","includeFiles":["docs/voice/**/*.md","docs/voice/**/*.yaml"],"excludeFiles":["docs/voice/index.md"]},{"title":"Verification API","description":"The Verification API is a platform for phone number verification. It consists of the API and different software development kits (the Sinch SDKs) that you integrate with your smartphone or web application and cloud based back-end services. Together they enable SMS, Flashcall, Phone Call and Data verification in your application.","includeFiles":["docs/verification/**/*.md","docs/verification/**/*.yaml"],"excludeFiles":["docs/verification/index.md"]},{"title":"Provisioning API","description":"Provisioning API allows you to programmatically set up your senders, accounts and templates on your favorite messaging platforms on the Conversation API. For now, you can create your first WhatsApp channel through Meta's Embedded sign up, you can configure your first SMS App and configure your webhooks. As development continues, we will be adding the most commonly used channels.","includeFiles":["docs/provisioning-api/**/*.md","docs/provisioning-api/**/*.json"],"excludeFiles":["docs/provisioning-api/index.md"]},{"title":"Elastic SIP Trunking API","description":"With Elastic SIP Trunking you can create and manage your SIP trunks and phone numbers programmatically.","includeFiles":["docs/est/**/*.md","docs/est/**/*.yaml"],"excludeFiles":["docs/est/index.md"]},{"title":"Fax API","description":"Send and receive HIPAA compliant faxes on our modern fax platform using our developer-friendly API.","includeFiles":["docs/fax/**/*.md","docs/fax/**/*.yaml"],"excludeFiles":["docs/fax/index.md"]},{"title":"In-app Voice and Video SDK","description":"The In-app Voice and Video SDK enables you to add voice and video calling capabilities directly into your mobile or web application using the Sinch SDKs.","includeFiles":["docs/in-app-calling/**/*.md"],"excludeFiles":["docs/in-app-calling/index.md"]}],"hide":false,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"svaml-cheat-sheet","__idx":0},"children":["SVAML cheat sheet"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The actions and instructions you will actually use. Node.js uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IceSvamlBuilder"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PieSvamlBuilder"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AceSvamlBuilder"]},". C# uses the equivalent ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["*Builder"]}," classes with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".Instructions.*"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".Action.*"]}," accessors."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["concept"]}," of SVAML (what it is, when it matters), see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#"},"children":["the SVAML concept page"]},". For the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["authoritative spec"]},", see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/voice/api-reference/svaml/"},"children":["developers.sinch.com/docs/voice/api-reference/svaml"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"the-three-builders","__idx":1},"children":["The three builders"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Builder"},"children":["Builder"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Where used"},"children":["Where used"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Available actions"},"children":["Available actions"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Ice*"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ice"]}," handler"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Full set: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hangup"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectPstn/Sip/Mxp/Conf/Agent"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["runMenu"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["park"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["continue"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Pie*"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pie"]}," handler"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Same as ICE except no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["park"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["answer"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Ace*"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ace"]}," handler"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["continue"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hangup"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every builder chain ends with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".build()"]}," (Node) or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".Build()"]}," (C#)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"instructions--things-to-do-before-the-action","__idx":2},"children":["Instructions — things to do before the action"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"say--text-to-speech","__idx":3},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["say"]}," — text to speech"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Node\n.say('Welcome to Acme Corp!')\n.say('Bonjour!', 'fr-FR')\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"// C#\n.Instructions.Say(\"Welcome to Acme Corp!\")\n.Instructions.Say(\"Bonjour!\", \"fr-FR\")\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Default locale: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["en-US"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"play--playfiles--play-audio","__idx":4},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["play"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["playFiles"]}," — play audio"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Node\n.play('https://example.com/greeting.mp3')\n.playFiles(['file1.wav', 'file2.wav'], 'en-US')\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"// C#\n.Instructions.PlayFiles(new[] { \"file1.wav\", \"file2.wav\" }, \"en-US\")\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"setcookie--persist-a-value-across-callbacks","__idx":5},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setCookie"]}," — persist a value across callbacks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Store a string that survives between ICE, PIE, ACE callbacks on the same call."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":".setCookie('language', 'en-US')\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":".Instructions.SetCookie(\"language\", \"en-US\")\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"senddtmf--send-tones-after-connecting","__idx":6},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sendDtmf"]}," — send tones after connecting"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":".sendDtmf('1234#')\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":".Instructions.SendDtmf(\"1234#\")\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"startrecording--stoprecording","__idx":7},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startRecording"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stopRecording"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Node\n.startRecording({\n  destinationUrl: 'https://my-server.com/recordings',\n  format: 'mp3',\n  notificationEvents: true,\n})\n.stopRecording()\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"// C#\n.Instructions.StartRecording(new StartRecordingOptions {\n    DestinationUrl = \"https://my-server.com/recordings\",\n    Format = \"mp3\",\n    NotificationEvents = true,\n})\n.Instructions.StopRecording()\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"actions--what-the-call-does","__idx":8},"children":["Actions — what the call does"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"hangup","__idx":9},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hangup"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"return new IceSvamlBuilder().say('Goodbye!').hangup().build();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"return Ok(new IceSvamletBuilder().Instructions.Say(\"Goodbye!\").Action.Hangup().Build());\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"continue","__idx":10},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["continue"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Let the call proceed to the next callback."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":".continue()\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":".Action.Continue()\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"connectpstn--connect-to-a-phone-number","__idx":11},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectPstn"]}," — connect to a phone number"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Node — simple\n.connectPstn('+15551234567')\n\n// Node — with options (all IntelliSense-discoverable)\n.connectPstn('+15551234567', {\n  cli: data.cli,            // show caller's number\n  maxDuration: 3600,\n  timeout: 30,\n  enableAce: true,          // fire ACE when answered\n  enableDice: true,\n  amd: { enabled: true },   // answering machine detection\n  indications: 'us',\n})\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"// C# — simple\n.Action.ConnectPstn(\"+15551234567\")\n\n// C# — with options\n.Action.ConnectPstn(\"+15551234567\", new ConnectPstnOptions {\n    Cli = data.Cli,\n    MaxDuration = 3600,\n    ConnectTimeout = 30,\n    Indications = \"us\",\n})\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"connectsip--connect-to-a-sip-uri","__idx":12},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectSip"]}," — connect to a SIP URI"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":".connectSip('sip:alice@sip.example.com', {\n  cli: '+15551234567',\n  headers: { 'X-Custom-Header': 'value' },\n})\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":".Action.ConnectSip(\"sip:alice@sip.example.com\", new ConnectSipOptions {\n    Cli = \"+15551234567\",\n    Transport = \"TLS\",\n    Headers = new Dictionary<string, string> { [\"X-Custom\"] = \"value\" },\n})\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"connectconf--join-a-conference","__idx":13},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectConf"]}," — join a conference"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":".connectConf('room-42', { moh: 'music', enableDice: true })\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":".Action.ConnectConf(\"room-42\", new ConnectConfOptions { MusicOnHold = \"music\" })\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"connectmxp--connect-to-a-sinch-sdk-user","__idx":14},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectMxp"]}," — connect to a Sinch SDK user"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":".connectMxp('alice')\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":".Action.ConnectMxp(\"alice\")\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"connectagent--connect-to-an-ai-voice-agent","__idx":15},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectAgent"]}," — connect to an AI voice agent"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import { AgentProvider } from '@sinch/functions-runtime';\n\n.connectAgent(AgentProvider.ElevenLabs, 'agent_abc123', { suppressCallbacks: true })\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"using SinchFunctions.AI;\n\n.Action.ConnectAgent(AgentProvider.ElevenLabs, \"agent_abc123\", new ConnectAgentOptions {\n    SuppressCallbacks = true,\n})\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"park--put-the-caller-on-hold","__idx":16},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["park"]}," — put the caller on hold"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ICE only. Not available on PIE."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":".park('Your call is important to us. Please hold.', { maxDuration: 600 })\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":".Action.Park(\"Your call is important to us. Please hold.\", new ParkOptions { MaxDuration = 600 })\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"runmenu--run-an-ivr-menu-pie-fires-after","__idx":17},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["runMenu"]}," — run an IVR menu (PIE fires after)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import { createMenu, MenuTemplates } from '@sinch/functions-runtime';\n\n// Template\n.runMenu(MenuTemplates.business('Acme Corp'))\n\n// Custom\nconst menu = createMenu()\n  .prompt('Press 1 for sales, press 2 for support.')\n  .option('1', 'return(sales)')\n  .option('2', 'return(support)')\n  .maxDigits(1)\n  .timeout(8000)\n  .build();\n.runMenu(menu)\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"// Template\n.Action.RunMenu(MenuTemplates.Business(\"Acme Corp\"))\n\n// Custom\nvar menu = new MenuBuilder()\n    .Prompt(\"Press 1 for sales, press 2 for support.\")\n    .Option(\"1\", \"return(sales)\")\n    .Option(\"2\", \"return(support)\")\n    .MaxDigits(1)\n    .Timeout(8000)\n    .Build();\n.Action.RunMenu(menu)\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"menu-option-action-values","__idx":18},"children":["Menu option action values"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Action syntax"},"children":["Action syntax"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Result in PIE ( menuResult.value )"},"children":["Result in PIE (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["menuResult.value"]},")"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'return'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The DTMF digit pressed."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'return(sales)'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'sales'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'menu(submenu)'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Navigates to another menu; PIE fires after submenu"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pre-built-menu-templates","__idx":19},"children":["Pre-built menu templates"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Import from the runtime package. Available in both languages unless noted."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Template"},"children":["Template"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What it does"},"children":["What it does"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Returns"},"children":["Returns"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["business(companyName?)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sales (1), Support (2), Operator (0)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'sales'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'support'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'operator'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["yesNo(question?)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes/No confirmation"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'yes'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'no'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language(languages?)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Language selection"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["language value strings"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["afterHours(name?, hours?)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["After-hours message"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'voicemail'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'website'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'emergency'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recordingConsent()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Recording consent prompt"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'consent'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'no_consent'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["numericInput(prompt, digits?)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Collect multi-digit input (Node only)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["the entered digits"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CallbackRequest(waitTime?)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Hold or callback (C# only)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'hold'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'callback'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustomerService()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4-option customer service (C# only)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'billing'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'technical'"]},", …"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SatisfactionSurvey()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Post-call survey (C# only)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'excellent'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'good'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'fair'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'poor'"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"dont","__idx":20},"children":["Don't"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Don't"]}," return raw JSON objects from voice handlers — always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".build()"]}," through a builder."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Don't"]}," call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".build()"]}," without setting an action — it throws."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Don't"]}," add instructions after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".build()"]}," — the builder is frozen."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Don't"]}," use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AceSvamlBuilder"]}," to connect calls — ACE only supports ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["continue"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hangup"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Don't"]}," use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["park"]}," in a PIE response — ICE only."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related","__idx":21},"children":["Related"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#"},"children":["SVAML concept"]}," — what SVAML is, why builders"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#"},"children":["Voice callbacks"]}," — which callbacks return SVAML and when"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/voice/api-reference/svaml/"},"children":["developers.sinch.com SVAML spec"]}," — full specification with every option"]}]}]},"headings":[{"value":"SVAML cheat sheet","id":"svaml-cheat-sheet","depth":1},{"value":"The three builders","id":"the-three-builders","depth":2},{"value":"Instructions — things to do before the action","id":"instructions--things-to-do-before-the-action","depth":2},{"value":"say — text to speech","id":"say--text-to-speech","depth":3},{"value":"play / playFiles — play audio","id":"play--playfiles--play-audio","depth":3},{"value":"setCookie — persist a value across callbacks","id":"setcookie--persist-a-value-across-callbacks","depth":3},{"value":"sendDtmf — send tones after connecting","id":"senddtmf--send-tones-after-connecting","depth":3},{"value":"startRecording / stopRecording","id":"startrecording--stoprecording","depth":3},{"value":"Actions — what the call does","id":"actions--what-the-call-does","depth":2},{"value":"hangup","id":"hangup","depth":3},{"value":"continue","id":"continue","depth":3},{"value":"connectPstn — connect to a phone number","id":"connectpstn--connect-to-a-phone-number","depth":3},{"value":"connectSip — connect to a SIP URI","id":"connectsip--connect-to-a-sip-uri","depth":3},{"value":"connectConf — join a conference","id":"connectconf--join-a-conference","depth":3},{"value":"connectMxp — connect to a Sinch SDK user","id":"connectmxp--connect-to-a-sinch-sdk-user","depth":3},{"value":"connectAgent — connect to an AI voice agent","id":"connectagent--connect-to-an-ai-voice-agent","depth":3},{"value":"park — put the caller on hold","id":"park--put-the-caller-on-hold","depth":3},{"value":"runMenu — run an IVR menu (PIE fires after)","id":"runmenu--run-an-ivr-menu-pie-fires-after","depth":3},{"value":"Menu option action values","id":"menu-option-action-values","depth":2},{"value":"Pre-built menu templates","id":"pre-built-menu-templates","depth":2},{"value":"Don't","id":"dont","depth":2},{"value":"Related","id":"related","depth":2}],"frontmatter":{"seo":{"title":""}},"lastModified":"2026-04-15T14:23:23.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/functions/reference/svaml-cheatsheet","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}