{"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":"voice-callbacks","__idx":0},"children":["Voice callbacks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Voice callbacks are HTTP POST requests that Sinch sends to your function when something happens during a phone call. Your function responds with ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#"},"children":["SVAML"]}," to control what happens next."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are four events. They describe the lifecycle of a call."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"lifecycle","__idx":1},"children":["Lifecycle"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"inbound-call-with-a-menu","__idx":2},"children":["Inbound call with a menu"]},{"$$mdtype":"Tag","name":"Mermaid","attributes":{"data-language":"mermaid","diagramSource":"sequenceDiagram\n    autonumber\n    participant Caller\n    participant Sinch as Sinch Voice Platform\n    participant Fn as Your Function\n\n    Caller->>Sinch: Dial Sinch number\n    Sinch->>Fn: ICE callback\n    Fn-->>Sinch: SVAML (say + runMenu)\n    Sinch->>Caller: Speak prompt\n    Caller->>Sinch: Press DTMF digit\n    Sinch->>Fn: PIE callback\n    Fn-->>Sinch: SVAML (connectPstn)\n    Sinch->>Caller: Connect the call\n    Note over Caller,Sinch: Call in progress\n    Caller->>Sinch: Hang up\n    Sinch->>Fn: DICE callback\n    Fn-->>Sinch: (informational, no response)\n","diagramHtml":"<div class=\"mermaid\" data-processed=\"true\"><svg id=\"mermaid-1776276540692\" width=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" style=\"max-width: 743.5px;\" viewBox=\"-50 -10 743.5 817\" role=\"graphics-document document\" aria-roledescription=\"sequence\"><g><rect x=\"493.5\" y=\"731\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Fn\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"568.5\" y=\"763.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"568.5\" dy=\"0\">Your Function</tspan></text></g><g><rect x=\"200\" y=\"731\" fill=\"#eaeaea\" stroke=\"#666\" width=\"173\" height=\"65\" name=\"Sinch\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"286.5\" y=\"763.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"286.5\" dy=\"0\">Sinch Voice Platform</tspan></text></g><g><rect x=\"0\" y=\"731\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Caller\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"75\" y=\"763.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"75\" dy=\"0\">Caller</tspan></text></g><g><line id=\"actor2\" x1=\"568.5\" y1=\"65\" x2=\"568.5\" y2=\"731\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Fn\"></line><g id=\"root-2\"><rect x=\"493.5\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Fn\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"568.5\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"568.5\" dy=\"0\">Your Function</tspan></text></g></g><g><line id=\"actor1\" x1=\"286.5\" y1=\"65\" x2=\"286.5\" y2=\"731\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Sinch\"></line><g id=\"root-1\"><rect x=\"200\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"173\" height=\"65\" name=\"Sinch\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"286.5\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"286.5\" dy=\"0\">Sinch Voice Platform</tspan></text></g></g><g><line id=\"actor0\" x1=\"75\" y1=\"65\" x2=\"75\" y2=\"731\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Caller\"></line><g id=\"root-0\"><rect x=\"0\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Caller\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"75\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"75\" dy=\"0\">Caller</tspan></text></g></g><style>#mermaid-1776276540692{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-1776276540692 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-1776276540692 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-1776276540692 .error-icon{fill:#552222;}#mermaid-1776276540692 .error-text{fill:#552222;stroke:#552222;}#mermaid-1776276540692 .edge-thickness-normal{stroke-width:1px;}#mermaid-1776276540692 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-1776276540692 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-1776276540692 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-1776276540692 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-1776276540692 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-1776276540692 .marker{fill:#333333;stroke:#333333;}#mermaid-1776276540692 .marker.cross{stroke:#333333;}#mermaid-1776276540692 svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:16px;}#mermaid-1776276540692 p{margin:0;}#mermaid-1776276540692 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1776276540692 text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-1776276540692 .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-1776276540692 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-1776276540692 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-1776276540692 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-1776276540692 #arrowhead path{fill:#333;stroke:#333;}#mermaid-1776276540692 .sequenceNumber{fill:white;}#mermaid-1776276540692 #sequencenumber{fill:#333;}#mermaid-1776276540692 #crosshead path{fill:#333;stroke:#333;}#mermaid-1776276540692 .messageText{fill:#333;stroke:none;}#mermaid-1776276540692 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1776276540692 .labelText,#mermaid-1776276540692 .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-1776276540692 .loopText,#mermaid-1776276540692 .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-1776276540692 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-1776276540692 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-1776276540692 .noteText,#mermaid-1776276540692 .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-1776276540692 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-1776276540692 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-1776276540692 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-1776276540692 .actorPopupMenu{position:absolute;}#mermaid-1776276540692 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-1776276540692 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1776276540692 .actor-man circle,#mermaid-1776276540692 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-1776276540692 :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}</style><g></g><defs><symbol id=\"computer\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"></path></symbol></defs><defs><symbol id=\"database\" fill-rule=\"evenodd\" clip-rule=\"evenodd\"><path transform=\"scale(.5)\" d=\"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\"></path></symbol></defs><defs><symbol id=\"clock\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\"></path></symbol></defs><defs><marker id=\"arrowhead\" refX=\"7.9\" refY=\"5\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M -1 0 L 10 5 L 0 10 z\"></path></marker></defs><defs><marker id=\"crosshead\" markerWidth=\"15\" markerHeight=\"8\" orient=\"auto\" refX=\"4\" refY=\"4.5\"><path fill=\"none\" stroke=\"#000000\" stroke-width=\"1pt\" d=\"M 1,2 L 6,7 M 6,2 L 1,7\" style=\"stroke-dasharray: 0, 0;\"></path></marker></defs><defs><marker id=\"filled-head\" refX=\"15.5\" refY=\"7\" markerWidth=\"20\" markerHeight=\"28\" orient=\"auto\"><path d=\"M 18,7 L9,13 L14,7 L9,1 Z\"></path></marker></defs><defs><marker id=\"sequencenumber\" refX=\"15\" refY=\"15\" markerWidth=\"60\" markerHeight=\"40\" orient=\"auto\"><circle cx=\"15\" cy=\"15\" r=\"6\"></circle></marker></defs><g><rect x=\"50\" y=\"507\" fill=\"#EDF2AE\" stroke=\"#666\" width=\"261.5\" height=\"42\" class=\"note\"></rect><text x=\"181\" y=\"512\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"noteText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\"><tspan x=\"181\">Call in progress</tspan></text></g><text x=\"179\" y=\"80\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Dial Sinch number</text><line x1=\"76\" y1=\"119\" x2=\"282.5\" y2=\"119\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"76\" y1=\"119\" x2=\"76\" y2=\"119\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"76\" y=\"123\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">1</text><text x=\"426\" y=\"134\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">ICE callback</text><line x1=\"287.5\" y1=\"173\" x2=\"564.5\" y2=\"173\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"287.5\" y1=\"173\" x2=\"287.5\" y2=\"173\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"287.5\" y=\"177\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">2</text><text x=\"429\" y=\"188\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">SVAML (say + runMenu)</text><line x1=\"567.5\" y1=\"227\" x2=\"290.5\" y2=\"227\" class=\"messageLine1\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><line x1=\"567.5\" y1=\"227\" x2=\"567.5\" y2=\"227\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"567.5\" y=\"231\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">3</text><text x=\"182\" y=\"242\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Speak prompt</text><line x1=\"285.5\" y1=\"281\" x2=\"79\" y2=\"281\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"285.5\" y1=\"281\" x2=\"285.5\" y2=\"281\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"285.5\" y=\"285\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">4</text><text x=\"179\" y=\"296\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Press DTMF digit</text><line x1=\"76\" y1=\"335\" x2=\"282.5\" y2=\"335\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"76\" y1=\"335\" x2=\"76\" y2=\"335\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"76\" y=\"339\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">5</text><text x=\"426\" y=\"350\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">PIE callback</text><line x1=\"287.5\" y1=\"389\" x2=\"564.5\" y2=\"389\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"287.5\" y1=\"389\" x2=\"287.5\" y2=\"389\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"287.5\" y=\"393\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">6</text><text x=\"429\" y=\"404\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">SVAML (connectPstn)</text><line x1=\"567.5\" y1=\"443\" x2=\"290.5\" y2=\"443\" class=\"messageLine1\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><line x1=\"567.5\" y1=\"443\" x2=\"567.5\" y2=\"443\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"567.5\" y=\"447\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">7</text><text x=\"182\" y=\"458\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Connect the call</text><line x1=\"285.5\" y1=\"497\" x2=\"79\" y2=\"497\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"285.5\" y1=\"497\" x2=\"285.5\" y2=\"497\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"285.5\" y=\"501\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">8</text><text x=\"179\" y=\"564\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Hang up</text><line x1=\"76\" y1=\"603\" x2=\"282.5\" y2=\"603\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"76\" y1=\"603\" x2=\"76\" y2=\"603\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"76\" y=\"607\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">9</text><text x=\"426\" y=\"618\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">DICE callback</text><line x1=\"287.5\" y1=\"657\" x2=\"564.5\" y2=\"657\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"287.5\" y1=\"657\" x2=\"287.5\" y2=\"657\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"287.5\" y=\"661\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">10</text><text x=\"429\" y=\"672\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">(informational, no response)</text><line x1=\"567.5\" y1=\"711\" x2=\"290.5\" y2=\"711\" class=\"messageLine1\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><line x1=\"567.5\" y1=\"711\" x2=\"567.5\" y2=\"711\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"567.5\" y=\"715\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">11</text></svg></div>"},"children":["sequenceDiagram\n    autonumber\n    participant Caller\n    participant Sinch as Sinch Voice Platform\n    participant Fn as Your Function\n\n    Caller->>Sinch: Dial Sinch number\n    Sinch->>Fn: ICE callback\n    Fn-->>Sinch: SVAML (say + runMenu)\n    Sinch->>Caller: Speak prompt\n    Caller->>Sinch: Press DTMF digit\n    Sinch->>Fn: PIE callback\n    Fn-->>Sinch: SVAML (connectPstn)\n    Sinch->>Caller: Connect the call\n    Note over Caller,Sinch: Call in progress\n    Caller->>Sinch: Hang up\n    Sinch->>Fn: DICE callback\n    Fn-->>Sinch: (informational, no response)\n"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"outbound-call-with-amd","__idx":3},"children":["Outbound call with AMD"]},{"$$mdtype":"Tag","name":"Mermaid","attributes":{"data-language":"mermaid","diagramSource":"sequenceDiagram\n    autonumber\n    participant You as Your code\n    participant Sinch as Sinch Voice Platform\n    participant Callee\n    participant Fn as Your Function\n\n    You->>Sinch: context.voice.callouts.custom(...)\n    Sinch->>Callee: Ring\n    Callee->>Sinch: Answer\n    Sinch->>Fn: ACE callback (with AMD result)\n    Fn-->>Sinch: continue (if human) or hangup (if machine)\n    Note over Callee,Sinch: Call in progress\n    Callee->>Sinch: Hang up\n    Sinch->>Fn: DICE callback\n","diagramHtml":"<div class=\"mermaid\" data-processed=\"true\"><svg id=\"mermaid-1776276540771\" width=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" style=\"max-width: 973.5px;\" viewBox=\"-50 -10 973.5 601\" role=\"graphics-document document\" aria-roledescription=\"sequence\"><g><rect x=\"723.5\" y=\"515\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Fn\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"798.5\" y=\"547.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"798.5\" dy=\"0\">Your Function</tspan></text></g><g><rect x=\"523.5\" y=\"515\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Callee\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"598.5\" y=\"547.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"598.5\" dy=\"0\">Callee</tspan></text></g><g><rect x=\"300.5\" y=\"515\" fill=\"#eaeaea\" stroke=\"#666\" width=\"173\" height=\"65\" name=\"Sinch\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"387\" y=\"547.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"387\" dy=\"0\">Sinch Voice Platform</tspan></text></g><g><rect x=\"0\" y=\"515\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"You\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"75\" y=\"547.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"75\" dy=\"0\">Your code</tspan></text></g><g><line id=\"actor3\" x1=\"798.5\" y1=\"65\" x2=\"798.5\" y2=\"515\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Fn\"></line><g id=\"root-3\"><rect x=\"723.5\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Fn\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"798.5\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"798.5\" dy=\"0\">Your Function</tspan></text></g></g><g><line id=\"actor2\" x1=\"598.5\" y1=\"65\" x2=\"598.5\" y2=\"515\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Callee\"></line><g id=\"root-2\"><rect x=\"523.5\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Callee\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"598.5\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"598.5\" dy=\"0\">Callee</tspan></text></g></g><g><line id=\"actor1\" x1=\"387\" y1=\"65\" x2=\"387\" y2=\"515\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Sinch\"></line><g id=\"root-1\"><rect x=\"300.5\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"173\" height=\"65\" name=\"Sinch\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"387\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"387\" dy=\"0\">Sinch Voice Platform</tspan></text></g></g><g><line id=\"actor0\" x1=\"75\" y1=\"65\" x2=\"75\" y2=\"515\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"You\"></line><g id=\"root-0\"><rect x=\"0\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"You\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"75\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"75\" dy=\"0\">Your code</tspan></text></g></g><style>#mermaid-1776276540771{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-1776276540771 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-1776276540771 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-1776276540771 .error-icon{fill:#552222;}#mermaid-1776276540771 .error-text{fill:#552222;stroke:#552222;}#mermaid-1776276540771 .edge-thickness-normal{stroke-width:1px;}#mermaid-1776276540771 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-1776276540771 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-1776276540771 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-1776276540771 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-1776276540771 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-1776276540771 .marker{fill:#333333;stroke:#333333;}#mermaid-1776276540771 .marker.cross{stroke:#333333;}#mermaid-1776276540771 svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:16px;}#mermaid-1776276540771 p{margin:0;}#mermaid-1776276540771 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1776276540771 text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-1776276540771 .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-1776276540771 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-1776276540771 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-1776276540771 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-1776276540771 #arrowhead path{fill:#333;stroke:#333;}#mermaid-1776276540771 .sequenceNumber{fill:white;}#mermaid-1776276540771 #sequencenumber{fill:#333;}#mermaid-1776276540771 #crosshead path{fill:#333;stroke:#333;}#mermaid-1776276540771 .messageText{fill:#333;stroke:none;}#mermaid-1776276540771 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1776276540771 .labelText,#mermaid-1776276540771 .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-1776276540771 .loopText,#mermaid-1776276540771 .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-1776276540771 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-1776276540771 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-1776276540771 .noteText,#mermaid-1776276540771 .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-1776276540771 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-1776276540771 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-1776276540771 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-1776276540771 .actorPopupMenu{position:absolute;}#mermaid-1776276540771 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-1776276540771 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1776276540771 .actor-man circle,#mermaid-1776276540771 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-1776276540771 :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}</style><g></g><defs><symbol id=\"computer\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"></path></symbol></defs><defs><symbol id=\"database\" fill-rule=\"evenodd\" clip-rule=\"evenodd\"><path transform=\"scale(.5)\" d=\"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\"></path></symbol></defs><defs><symbol id=\"clock\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\"></path></symbol></defs><defs><marker id=\"arrowhead\" refX=\"7.9\" refY=\"5\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M -1 0 L 10 5 L 0 10 z\"></path></marker></defs><defs><marker id=\"crosshead\" markerWidth=\"15\" markerHeight=\"8\" orient=\"auto\" refX=\"4\" refY=\"4.5\"><path fill=\"none\" stroke=\"#000000\" stroke-width=\"1pt\" d=\"M 1,2 L 6,7 M 6,2 L 1,7\" style=\"stroke-dasharray: 0, 0;\"></path></marker></defs><defs><marker id=\"filled-head\" refX=\"15.5\" refY=\"7\" markerWidth=\"20\" markerHeight=\"28\" orient=\"auto\"><path d=\"M 18,7 L9,13 L14,7 L9,1 Z\"></path></marker></defs><defs><marker id=\"sequencenumber\" refX=\"15\" refY=\"15\" markerWidth=\"60\" markerHeight=\"40\" orient=\"auto\"><circle cx=\"15\" cy=\"15\" r=\"6\"></circle></marker></defs><g><rect x=\"362\" y=\"345\" fill=\"#EDF2AE\" stroke=\"#666\" width=\"261.5\" height=\"42\" class=\"note\"></rect><text x=\"493\" y=\"350\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"noteText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\"><tspan x=\"493\">Call in progress</tspan></text></g><text x=\"230\" y=\"80\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">context.voice.callouts.custom(...)</text><line x1=\"76\" y1=\"119\" x2=\"383\" y2=\"119\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"76\" y1=\"119\" x2=\"76\" y2=\"119\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"76\" y=\"123\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">1</text><text x=\"491\" y=\"134\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Ring</text><line x1=\"388\" y1=\"173\" x2=\"594.5\" y2=\"173\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"388\" y1=\"173\" x2=\"388\" y2=\"173\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"388\" y=\"177\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">2</text><text x=\"494\" y=\"188\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Answer</text><line x1=\"597.5\" y1=\"227\" x2=\"391\" y2=\"227\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"597.5\" y1=\"227\" x2=\"597.5\" y2=\"227\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"597.5\" y=\"231\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">3</text><text x=\"591\" y=\"242\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">ACE callback (with AMD result)</text><line x1=\"388\" y1=\"281\" x2=\"794.5\" y2=\"281\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"388\" y1=\"281\" x2=\"388\" y2=\"281\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"388\" y=\"285\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">4</text><text x=\"594\" y=\"296\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">continue (if human) or hangup (if machine)</text><line x1=\"797.5\" y1=\"335\" x2=\"391\" y2=\"335\" class=\"messageLine1\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><line x1=\"797.5\" y1=\"335\" x2=\"797.5\" y2=\"335\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"797.5\" y=\"339\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">5</text><text x=\"494\" y=\"402\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Hang up</text><line x1=\"597.5\" y1=\"441\" x2=\"391\" y2=\"441\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"597.5\" y1=\"441\" x2=\"597.5\" y2=\"441\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"597.5\" y=\"445\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">6</text><text x=\"591\" y=\"456\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">DICE callback</text><line x1=\"388\" y1=\"495\" x2=\"794.5\" y2=\"495\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><line x1=\"388\" y1=\"495\" x2=\"388\" y2=\"495\" stroke-width=\"0\" marker-start=\"url(#sequencenumber)\"></line><text x=\"388\" y=\"499\" font-family=\"sans-serif\" font-size=\"12px\" text-anchor=\"middle\" class=\"sequenceNumber\">7</text></svg></div>"},"children":["sequenceDiagram\n    autonumber\n    participant You as Your code\n    participant Sinch as Sinch Voice Platform\n    participant Callee\n    participant Fn as Your Function\n\n    You->>Sinch: context.voice.callouts.custom(...)\n    Sinch->>Callee: Ring\n    Callee->>Sinch: Answer\n    Sinch->>Fn: ACE callback (with AMD result)\n    Fn-->>Sinch: continue (if human) or hangup (if machine)\n    Note over Callee,Sinch: Call in progress\n    Callee->>Sinch: Hang up\n    Sinch->>Fn: DICE callback\n"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Most functions only implement ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ice"]},". You only need ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pie"]}," if you run menus, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ace"]}," if you bridge or make outbound calls, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dice"]}," if you want to log or clean up when calls end."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ice--incoming-call-event","__idx":4},"children":["ICE — Incoming Call Event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fires when a phone call reaches one of your Sinch phone numbers. This is where most of your work happens — greet the caller, run a menu, connect them somewhere, start a recording, etc."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-you-get","__idx":5},"children":["What you get"]},{"$$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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What it is"},"children":["What it is"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callid"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique call ID. Use this as a cache key for call state."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cli"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Caller's phone number (E.164 format)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to.endpoint"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Sinch number they dialed."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to.type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'number'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'username'"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'sip'"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["domain"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'pstn'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'mxp'"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'sip'"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["originationType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Origin type — usually ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'pstn'"]}," for phone calls."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["custom"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom data, if the call was initiated with any."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timestamp"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 8601 timestamp."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-you-return","__idx":6},"children":["What you return"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A SVAML response. Most common patterns:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Node.js\nreturn new IceSvamlBuilder()\n  .say('Welcome to Acme Corp.')\n  .runMenu(MenuTemplates.business('Acme Corp'))\n  .build();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"// C#\nreturn Ok(new IceSvamletBuilder()\n    .Instructions.Say(\"Welcome to Acme Corp.\")\n    .Action.RunMenu(MenuTemplates.Business(\"Acme Corp\"))\n    .Build());\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ace--answered-call-event","__idx":7},"children":["ACE — Answered Call Event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fires when a call ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["you initiated"]}," is answered by the other side. This is relevant for outbound calling or when your ICE response bridged the call somewhere with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectPstn"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enableAce: true"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-you-get-1","__idx":8},"children":["What you get"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The call ID plus an optional AMD (Answering Machine Detection) result if it was enabled."]},{"$$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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What it is"},"children":["What it is"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callid"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Same call ID as the ICE that started this call."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amd.status"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'human'"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'machine'"]}," if AMD was enabled."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amd.reason"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Why AMD chose that status."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amd.duration"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How long AMD took to decide (milliseconds)."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-you-return-1","__idx":9},"children":["What you return"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Usually ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["continue"]}," (let the call proceed) or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hangup"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"async ace(context, data) {\n  if (data.amd?.status === 'machine') {\n    return new AceSvamlBuilder().hangup().build();\n  }\n  return new AceSvamlBuilder()\n    .say('Hello! You have a message from Acme Corp.')\n    .continue()\n    .build();\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"csharp","header":{"controls":{"copy":{}}},"source":"public override async Task<IActionResult> Ace(AceCallbackModel data)\n{\n    if (data.Amd?.Status == \"machine\")\n        return Ok(new AceSvamletBuilder().Action.Hangup().Build());\n\n    return Ok(new AceSvamletBuilder()\n        .Instructions.Say(\"Hello! You have a message from Acme Corp.\")\n        .Action.Continue()\n        .Build());\n}\n","lang":"csharp"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pie--prompt-input-event","__idx":10},"children":["PIE — Prompt Input Event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fires when a menu you started with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["runMenu"]}," completes — the caller pressed a key, the menu timed out, or they hung up during it."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-you-get-2","__idx":11},"children":["What you get"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The call ID plus a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["menuResult"]}," describing what happened."]},{"$$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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What it is"},"children":["What it is"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["menuResult.menuId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the menu that completed (you set this in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["runMenu"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["menuResult.type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'return'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'sequence'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'timeout'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'hangup'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'invalidinput'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["menuResult.value"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The option's action value, or the entered digit sequence."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["menuResult.inputMethod"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'dtmf'"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'voice'"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"result-types","__idx":12},"children":["Result types"]},{"$$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":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$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":["Caller selected an option. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value"]}," is the option's action value."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sequence"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Caller entered multi-digit input. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value"]}," is the digit string."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timeout"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Caller didn't respond in time."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hangup"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Caller hung up during the menu."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invalidinput"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Caller pressed a key not mapped to any option."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-you-return-2","__idx":13},"children":["What you return"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Another SVAML response. You can run another menu, connect the call, say a message, or hang up."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"async pie(context, data) {\n  const result = data.menuResult;\n\n  if (result?.type === 'timeout' || result?.type === 'hangup') {\n    return new PieSvamlBuilder().say('Goodbye!').hangup().build();\n  }\n\n  switch (result?.value) {\n    case 'sales':\n      return new PieSvamlBuilder().say('Connecting you to sales.').connectPstn('+15551111111').build();\n    case 'support':\n      return new PieSvamlBuilder().say('Connecting you to support.').connectPstn('+15552222222').build();\n    default:\n      return new PieSvamlBuilder().say('Invalid selection. Please try again.').continue().build();\n  }\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"dice--disconnected-call-event","__idx":14},"children":["DICE — Disconnected Call Event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fires when the call ends. Informational only — there is nothing to control at this point, so you just log, clean up cached state, bill, or update analytics."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-you-get-3","__idx":15},"children":["What you get"]},{"$$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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What it is"},"children":["What it is"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callid"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Call ID."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["duration"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Call duration in seconds."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reason"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Why the call ended — see below."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Call result — see below."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Originating number."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to.endpoint"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Destination."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"reason-values","__idx":16},"children":["Reason values"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'N/A'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'TIMEOUT'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'CALLERHANGUP'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'CALLEEHANGUP'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'BLOCKED'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'NOCREDITPARTNER'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'GENERALERROR'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'CANCEL'"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"result-values","__idx":17},"children":["Result values"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'N/A'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'ANSWERED'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'BUSY'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'NOANSWER'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'FAILED'"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-you-return-3","__idx":18},"children":["What you return"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Nothing meaningful. Node functions return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},", C# returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Ok()"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"async dice(context, data) {\n  const cli = await context.cache.get<string>(`call:${data.callid}:cli`);\n  context.log?.info(`Call from ${cli} ended after ${data.duration}s (${data.result})`);\n  await context.cache.delete(`call:${data.callid}:cli`);\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"a-complete-example","__idx":19},"children":["A complete example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A voice IVR that greets the caller, runs a menu, routes them to a department, and logs the call on disconnect."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Node.js\nimport type { VoiceFunction } from '@sinch/functions-runtime';\nimport { IceSvamlBuilder, PieSvamlBuilder, AceSvamlBuilder, MenuTemplates } from '@sinch/functions-runtime';\n\nexport default {\n  async ice(context, data) {\n    await context.cache.set(`call:${data.callid}:cli`, data.cli ?? 'unknown', 3600);\n    return new IceSvamlBuilder()\n      .say('Thank you for calling Acme Corp.')\n      .runMenu(MenuTemplates.business('Acme Corp'))\n      .build();\n  },\n\n  async pie(context, data) {\n    const { type, value } = data.menuResult ?? {};\n    if (type === 'timeout' || type === 'hangup') {\n      return new PieSvamlBuilder().say('Goodbye!').hangup().build();\n    }\n    const dest = { sales: '+15551111111', support: '+15552222222' }[value ?? ''];\n    return dest\n      ? new PieSvamlBuilder().say(`Connecting you to ${value}.`).connectPstn(dest).build()\n      : new PieSvamlBuilder().say('Invalid selection.').continue().build();\n  },\n\n  async ace(context, data) {\n    return data.amd?.status === 'machine'\n      ? new AceSvamlBuilder().hangup().build()\n      : new AceSvamlBuilder().continue().build();\n  },\n\n  async dice(context, data) {\n    const cli = await context.cache.get<string>(`call:${data.callid}:cli`);\n    console.log(`Call from ${cli} ended (${data.result}, ${data.duration}s)`);\n    await context.cache.delete(`call:${data.callid}:cli`);\n  },\n} satisfies VoiceFunction;\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"notify-events","__idx":20},"children":["Notify events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Besides the four callbacks above, Sinch also sends ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notify"]}," events for administrative things (recording notifications, etc.). You handle them the same way — export a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notify"]}," function (Node) or override ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Notify"]}," (C#)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"webhook-protection","__idx":21},"children":["Webhook protection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Voice callbacks can be signed by Sinch and validated by your function. Controlled by the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WEBHOOK_PROTECTION"]}," environment variable:"]},{"$$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":"Mode"},"children":["Mode"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Behavior"},"children":["Behavior"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'never'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No validation. Development only."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'deploy'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Validate in production, skip in development. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Default."]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'always'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Always validate."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In C# it is also exposed as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Security:WebhookProtection"]}," in configuration."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Legacy alias."]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PROTECT_VOICE_CALLBACKS"]}," (and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Security:ProtectVoiceCallbacks"]}," in C#) still work as fallback names for compatibility with older functions. Prefer the canonical names above for new code."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related","__idx":22},"children":["Related"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#"},"children":["SVAML"]}," — the JSON format voice handlers return"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/functions/reference/svaml-cheatsheet"},"children":["SVAML cheat sheet"]}," — the most-used actions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/voice/api-reference/voice-callbacks/"},"children":["Sinch Voice Callbacks spec"]}," — full field reference on developers.sinch.com"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#"},"children":["Handlers"]}," — how Sinch maps URLs to your handlers"]}]}]},"headings":[{"value":"Voice callbacks","id":"voice-callbacks","depth":1},{"value":"Lifecycle","id":"lifecycle","depth":2},{"value":"Inbound call with a menu","id":"inbound-call-with-a-menu","depth":3},{"value":"Outbound call with AMD","id":"outbound-call-with-amd","depth":3},{"value":"ICE — Incoming Call Event","id":"ice--incoming-call-event","depth":2},{"value":"What you get","id":"what-you-get","depth":3},{"value":"What you return","id":"what-you-return","depth":3},{"value":"ACE — Answered Call Event","id":"ace--answered-call-event","depth":2},{"value":"What you get","id":"what-you-get-1","depth":3},{"value":"What you return","id":"what-you-return-1","depth":3},{"value":"PIE — Prompt Input Event","id":"pie--prompt-input-event","depth":2},{"value":"What you get","id":"what-you-get-2","depth":3},{"value":"Result types","id":"result-types","depth":3},{"value":"What you return","id":"what-you-return-2","depth":3},{"value":"DICE — Disconnected Call Event","id":"dice--disconnected-call-event","depth":2},{"value":"What you get","id":"what-you-get-3","depth":3},{"value":"Reason values","id":"reason-values","depth":3},{"value":"Result values","id":"result-values","depth":3},{"value":"What you return","id":"what-you-return-3","depth":3},{"value":"A complete example","id":"a-complete-example","depth":2},{"value":"Notify events","id":"notify-events","depth":2},{"value":"Webhook protection","id":"webhook-protection","depth":2},{"value":"Related","id":"related","depth":2}],"frontmatter":{"seo":{"title":""}},"lastModified":"2026-04-15T14:23:23.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/functions/concepts/voice-callbacks","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}