{"templateId":"markdown","sharedDataIds":{},"props":{"metadata":{"markdoc":{"tagList":["admonition","json-schema"]},"product":"Voice","type":"markdown"},"seo":{"title":"connectStream action","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":[]},"description":"Details about the connectStream SVAML action."},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"connectstream","__idx":0},"children":["connectStream"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Important!"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This feature is in closed beta - Please, contact Sinch sales for more details."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Determines how to route a call to a Stream/websocket server."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Available to use in a response to an ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/voice/api-reference/voice/callbacks/ice"},"children":["Incoming Call Event"]}," callback."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"use-cases","__idx":1},"children":["Use cases"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Connect inbound calls via one of the standard voice channels (PSTN, SIP or IN-App) to the new Stream channel",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Reply ICE with connectStream() action."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Connect outbound calls via one of the standard voice channels into a conference room, and add a stream channel into the same conference, to combine 2 or more outbound calls with a stream outbound call.",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Initiate a conferenceCallout to connect a standard voice channel (PSTN, SIP or In-App) into a conference room"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Initiate a customCallout to connect a stream outbound call leg."]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ConnectStream Action example code"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"Json","header":{"controls":{"copy":{}}},"source":"\n{\n  \"action\": {\n    \"name\": \"connectStream\",\n    \"destination\": {\n      \"type\": \"Websocket\",\n      \"endpoint\": \"wss://yourcompany.com/websocket-server\"\n    },\n    \"streamingOptions\": {\n      \"version\": 1,\n      \"sampleRate\": 44100\n    },\n    \"maxDuration\": 3000,\n    \"callHeaders\": [\n      {\n        \"key\": \"foo\",\n        \"value\": \"bar\"\n      },\n      {\n        \"key\": \"baz\",\n        \"value\": \"qux\"\n      }\n    ]\n  }\n}\n","lang":"Json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schema"]}]},{"$$mdtype":"Tag","name":"JsonSchema","attributes":{"schema":{"$ref":"../voice.yaml#/components/schemas/svaml.action.connectStream"},"options":{},"schemaResolved":{"openapi":"3.1.0","components":{"schemas":{"__root":{"$ref":"#/components/schemas/svaml.action.connectStream"},"destinationWebSocket":{"type":"object","description":"Specifies where to route the Stream call.","required":["type","endpoint"],"properties":{"type":{"type":"string","description":"This attribute defines the streaming protocol - currently only `Websocket` is supported.","enum":["Websocket"],"x-enumDescriptions":{"Websocket":"Use websocket stream protocol"},"example":"Websocket"},"endpoint":{"type":"string","description":"The Stream/Websocket server address.","example":"wss://yourcompany.com/websocket-server"}}},"callHeader":{"type":"object","description":"Call Headers can be used to pass custom data from a Sinch SDK client to another, or specified in an ICE response to be made available to the receiving client. Further, if Call Headers is specified they will be available in ICE and DICE events.","properties":{"key":{"type":"string","description":"The call header key of the key value pair."},"value":{"type":"string","description":"The call header value of the key value pair."}}},"svaml.action.connectStream":{"type":"object","description":"Determines how to route a call to a Stream/websocket server. Available to use in a response to an [Incoming Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/callbacks/ice) callback.","required":["name","destination"],"properties":{"name":{"type":"string","description":"The name property. Must have the value `connectStream`.","x-enumDescriptions":{"connectStream":"The `connectStream` action."},"enum":["connectStream"],"default":"connectStream"},"destination":{"$ref":"#/components/schemas/destinationWebSocket"},"streamingOptions":{"type":"object","description":"Optional parameters for the WebSocket stream.","properties":{"version":{"type":"integer","description":"The version of the streaming feature.","example":1},"sampleRate":{"type":"integer","description":"The sample rate for the audio stream in Hz.","example":44100}}},"maxDuration":{"type":"integer","description":"The max duration of the call in seconds (max 14400 seconds). If the call is still connected at that time, it will be automatically disconnected.","example":3600},"callHeaders":{"type":"array","description":"These custom parameters (headers/messages) are sent to your WebSocket server in the initial message when the ConnectStream is established.","items":{"$ref":"#/components/schemas/callHeader"}}}}}}},"schemaResolvedErrors":[]},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After the server response is received Sinch will start to send binary messages and expects to receive binary messages back, encoded with the same CODEC received."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"voice-api-websocket-connection-flow","__idx":2},"children":["Voice API Websocket connection flow"]},{"$$mdtype":"Tag","name":"Mermaid","attributes":{"data-language":"mermaid","diagramSource":"sequenceDiagram\n    autonumber\n    participant sinch as Sinch Platform\n    participant wss as Customer Websocket Server\n    \n    sinch --) wss: WS Connection request\n    wss --) sinch: WS Accepted\n    sinch -) wss: WS text message (command:connect)\n    wss -) sinch: WS text message (command:answer)\n    note over sinch,wss: Audio exchange\n    sinch -) wss: WS binary message : audio\n    wss -) sinch: WS binary message : audio\n    note over sinch,wss: Message exchange\n    rect rgba(255, 241, 38, 1)\n        note right of wss: Clear buffer (VAD / barge-in)\n    end\n    wss -) sinch: WS text message (command:clear)\n\n    rect rgba(255, 241, 38, 1)\n        note right of wss: Send to keep channel open.  <br/>  ie: every 30 secs\n    end\n    wss -) sinch: WS text message (command:heartbeat)\n","diagramHtml":"<div class=\"mermaid\" data-processed=\"true\"><svg aria-roledescription=\"sequence\" role=\"graphics-document document\" viewBox=\"-50 -10 804 893\" style=\"max-width: 804px;\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" id=\"mermaid-1765394200205\"><rect class=\"rect\" height=\"94\" width=\"251\" fill=\"rgba(255, 241, 38, 1)\" y=\"639\" x=\"453\"></rect><rect class=\"rect\" height=\"72\" width=\"251\" fill=\"rgba(255, 241, 38, 1)\" y=\"503\" x=\"453\"></rect><style>#mermaid-1765394200205{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-1765394200205 .error-icon{fill:#552222;}#mermaid-1765394200205 .error-text{fill:#552222;stroke:#552222;}#mermaid-1765394200205 .edge-thickness-normal{stroke-width:2px;}#mermaid-1765394200205 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-1765394200205 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-1765394200205 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-1765394200205 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-1765394200205 .marker{fill:#333333;stroke:#333333;}#mermaid-1765394200205 .marker.cross{stroke:#333333;}#mermaid-1765394200205 svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:16px;}#mermaid-1765394200205 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1765394200205 text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-1765394200205 .actor-line{stroke:grey;}#mermaid-1765394200205 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-1765394200205 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-1765394200205 #arrowhead path{fill:#333;stroke:#333;}#mermaid-1765394200205 .sequenceNumber{fill:white;}#mermaid-1765394200205 #sequencenumber{fill:#333;}#mermaid-1765394200205 #crosshead path{fill:#333;stroke:#333;}#mermaid-1765394200205 .messageText{fill:#333;stroke:none;}#mermaid-1765394200205 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1765394200205 .labelText,#mermaid-1765394200205 .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-1765394200205 .loopText,#mermaid-1765394200205 .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-1765394200205 .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-1765394200205 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-1765394200205 .noteText,#mermaid-1765394200205 .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-1765394200205 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-1765394200205 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-1765394200205 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-1765394200205 .actorPopupMenu{position:absolute;}#mermaid-1765394200205 .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-1765394200205 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1765394200205 .actor-man circle,#mermaid-1765394200205 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-1765394200205 :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}</style><g></g><defs><symbol height=\"24\" width=\"24\" id=\"computer\"><path 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\" transform=\"scale(.5)\"></path></symbol></defs><defs><symbol clip-rule=\"evenodd\" fill-rule=\"evenodd\" id=\"database\"><path 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\" transform=\"scale(.5)\"></path></symbol></defs><defs><symbol height=\"24\" width=\"24\" id=\"clock\"><path 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\" transform=\"scale(.5)\"></path></symbol></defs><g><line stroke=\"#999\" stroke-width=\"0.5px\" class=\"200\" y2=\"827\" x2=\"75\" y1=\"5\" x1=\"75\" id=\"actor0\"></line><g id=\"root-0\"><rect class=\"actor\" ry=\"3\" rx=\"3\" height=\"65\" width=\"150\" stroke=\"#666\" fill=\"#eaeaea\" y=\"0\" x=\"0\"></rect><text style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\" class=\"actor\" alignment-baseline=\"central\" dominant-baseline=\"central\" y=\"32.5\" x=\"75\"><tspan dy=\"0\" x=\"75\">Sinch Platform</tspan></text></g></g><g><line stroke=\"#999\" stroke-width=\"0.5px\" class=\"200\" y2=\"827\" x2=\"438\" y1=\"5\" x1=\"438\" id=\"actor1\"></line><g id=\"root-1\"><rect class=\"actor\" ry=\"3\" rx=\"3\" height=\"65\" width=\"231\" stroke=\"#666\" fill=\"#eaeaea\" y=\"0\" x=\"322.5\"></rect><text style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\" class=\"actor\" alignment-baseline=\"central\" dominant-baseline=\"central\" y=\"32.5\" x=\"438\"><tspan dy=\"0\" x=\"438\">Customer Websocket Server</tspan></text></g></g><defs><marker orient=\"auto\" markerHeight=\"12\" markerWidth=\"12\" markerUnits=\"userSpaceOnUse\" refY=\"5\" refX=\"9\" id=\"arrowhead\"><path d=\"M 0 0 L 10 5 L 0 10 z\"></path></marker></defs><defs><marker refY=\"5\" refX=\"4\" orient=\"auto\" markerHeight=\"8\" markerWidth=\"15\" id=\"crosshead\"><path style=\"stroke-dasharray: 0, 0;\" d=\"M 1,2 L 6,7 M 6,2 L 1,7\" stroke-width=\"1pt\" stroke=\"#000000\" fill=\"none\"></path></marker></defs><defs><marker orient=\"auto\" markerHeight=\"28\" markerWidth=\"20\" refY=\"7\" refX=\"18\" id=\"filled-head\"><path d=\"M 18,7 L9,13 L14,7 L9,1 Z\"></path></marker></defs><defs><marker orient=\"auto\" markerHeight=\"40\" markerWidth=\"60\" refY=\"15\" refX=\"15\" id=\"sequencenumber\"><circle r=\"6\" cy=\"15\" cx=\"15\"></circle></marker></defs><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"413\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"291\" x=\"50\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"296\" x=\"257\"><tspan x=\"257\">Audio exchange</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"413\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"451\" x=\"50\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"456\" x=\"257\"><tspan x=\"257\">Message exchange</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"231\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"523\" x=\"463\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"528\" x=\"579\"><tspan x=\"579\">Clear buffer (VAD / barge-in)</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"64\" width=\"231\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"659\" x=\"463\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"664\" x=\"579\"><tspan x=\"579\">Send to keep channel open.  </tspan></text><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"686\" x=\"579\"><tspan x=\"579\">  ie: every 30 secs</tspan></text></g><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"80\" x=\"257\">WS Connection request</text><line style=\"stroke-dasharray: 3, 3; fill: none;\" marker-start=\"url(#sequencenumber)\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine1\" y2=\"119\" x2=\"438\" y1=\"119\" x1=\"75\"></line><text class=\"sequenceNumber\" text-anchor=\"middle\" font-size=\"12px\" font-family=\"sans-serif\" y=\"123\" x=\"75\">1</text><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"134\" x=\"257\">WS Accepted</text><line style=\"stroke-dasharray: 3, 3; fill: none;\" marker-start=\"url(#sequencenumber)\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine1\" y2=\"173\" x2=\"75\" y1=\"173\" x1=\"438\"></line><text class=\"sequenceNumber\" text-anchor=\"middle\" font-size=\"12px\" font-family=\"sans-serif\" y=\"177\" x=\"438\">2</text><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"188\" x=\"257\">WS text message (command:connect)</text><line style=\"fill: none;\" marker-start=\"url(#sequencenumber)\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"227\" x2=\"438\" y1=\"227\" x1=\"75\"></line><text class=\"sequenceNumber\" text-anchor=\"middle\" font-size=\"12px\" font-family=\"sans-serif\" y=\"231\" x=\"75\">3</text><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"242\" x=\"257\">WS text message (command:answer)</text><line style=\"fill: none;\" marker-start=\"url(#sequencenumber)\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"281\" x2=\"75\" y1=\"281\" x1=\"438\"></line><text class=\"sequenceNumber\" text-anchor=\"middle\" font-size=\"12px\" font-family=\"sans-serif\" y=\"285\" x=\"438\">4</text><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"348\" x=\"257\">WS binary message : audio</text><line style=\"fill: none;\" marker-start=\"url(#sequencenumber)\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"387\" x2=\"438\" y1=\"387\" x1=\"75\"></line><text class=\"sequenceNumber\" text-anchor=\"middle\" font-size=\"12px\" font-family=\"sans-serif\" y=\"391\" x=\"75\">5</text><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"402\" x=\"257\">WS binary message : audio</text><line style=\"fill: none;\" marker-start=\"url(#sequencenumber)\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"441\" x2=\"75\" y1=\"441\" x1=\"438\"></line><text class=\"sequenceNumber\" text-anchor=\"middle\" font-size=\"12px\" font-family=\"sans-serif\" y=\"445\" x=\"438\">6</text><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"590\" x=\"257\">WS text message (command:clear)</text><line style=\"fill: none;\" marker-start=\"url(#sequencenumber)\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"629\" x2=\"75\" y1=\"629\" x1=\"438\"></line><text class=\"sequenceNumber\" text-anchor=\"middle\" font-size=\"12px\" font-family=\"sans-serif\" y=\"633\" x=\"438\">7</text><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"748\" x=\"257\">WS text message (command:heartbeat)</text><line style=\"fill: none;\" marker-start=\"url(#sequencenumber)\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"787\" x2=\"75\" y1=\"787\" x1=\"438\"></line><text class=\"sequenceNumber\" text-anchor=\"middle\" font-size=\"12px\" font-family=\"sans-serif\" y=\"791\" x=\"438\">8</text><g><rect class=\"actor\" ry=\"3\" rx=\"3\" height=\"65\" width=\"150\" stroke=\"#666\" fill=\"#eaeaea\" y=\"807\" x=\"0\"></rect><text style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\" class=\"actor\" alignment-baseline=\"central\" dominant-baseline=\"central\" y=\"839.5\" x=\"75\"><tspan dy=\"0\" x=\"75\">Sinch Platform</tspan></text></g><g><rect class=\"actor\" ry=\"3\" rx=\"3\" height=\"65\" width=\"231\" stroke=\"#666\" fill=\"#eaeaea\" y=\"807\" x=\"322.5\"></rect><text style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\" class=\"actor\" alignment-baseline=\"central\" dominant-baseline=\"central\" y=\"839.5\" x=\"438\"><tspan dy=\"0\" x=\"438\">Customer Websocket Server</tspan></text></g></svg></div>"},"children":["sequenceDiagram\n    autonumber\n    participant sinch as Sinch Platform\n    participant wss as Customer Websocket Server\n    \n    sinch --) wss: WS Connection request\n    wss --) sinch: WS Accepted\n    sinch -) wss: WS text message (command:connect)\n    wss -) sinch: WS text message (command:answer)\n    note over sinch,wss: Audio exchange\n    sinch -) wss: WS binary message : audio\n    wss -) sinch: WS binary message : audio\n    note over sinch,wss: Message exchange\n    rect rgba(255, 241, 38, 1)\n        note right of wss: Clear buffer (VAD / barge-in)\n    end\n    wss -) sinch: WS text message (command:clear)\n\n    rect rgba(255, 241, 38, 1)\n        note right of wss: Send to keep channel open.  <br/>  ie: every 30 secs\n    end\n    wss -) sinch: WS text message (command:heartbeat)\n"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The websocket connection request does not contain any headers. The client is expected to either accept the connection (200 OK) or decline (non-successful HTTP response). If declined, the call is hung up."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the connection is accepted, the server immediately sends a connect command message, containing all the information."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The client is expected to send a command message back to indicate whether the call should be answered or hung up. If answered, the audio streams start."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This flow introduces an extra message with a payload that might be considered to be cleaner. Compared to the previous flow, the customer header names are preserved (not prepended with X-)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The websocket close message, sent from either side, indicates a hangup. This message can contain code and reason."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"connect-message","__idx":3},"children":["Connect message:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"Json","header":{"controls":{"copy":{}}},"source":"{\n    \"command\": \"connect\",\n    \"CallId\": \"...\",\n    \"ApplicationId\": \"...\",\n    \"Headers\": {\n        \"Header1\": \"Value1\",\n        \"ApplicationId\": \"dsfkjhgdfkjghsdfkjg\"\n    }\n}\n","lang":"Json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"customer-message","__idx":4},"children":["Customer message:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"command\": \"answer\"\n}\n-or-\n{\n    \"command\": \"busy\"\n}\n-or-\n{\n    \"command\": \"reject\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Info about Close message and how audio is streamed if the Close message is sent."]}]},{"$$mdtype":"Tag","name":"Mermaid","attributes":{"data-language":"mermaid","diagramSource":"sequenceDiagram\n    participant sinch as Sinch Platform\n    participant wss as Customer Websocket Server\n    \n    sinch --) wss: WS Connection request\n    alt\n        wss --) sinch: WS Accepted (200 ok)\n    else Decline\n        wss --) sinch: WS Respponse (Any other code)\n        rect rgba(255, 0, 0, 1)\n            note right of wss: Stream ended\n        end\n    end\n    sinch -) wss: WS text message (command:connect)\n    rect rgba(0, 247, 16, 1)\n        note right of wss: Contains callHeaders, callId, AppKey, etc.\n    end\n    alt\n        wss -) sinch: WS text message (command:answer)\n    else Send BUSY signal\n        wss -) sinch: WS text message (command:busy)\n        rect rgba(255, 0, 0, 1)\n            note right of wss: Stream ended\n        end\n    else Reject the call\n        wss -) sinch: WS text message (command:reject)\n        rect rgba(255, 0, 0, 1)\n            note right of wss: Stream ended\n        end\n    end\n    note over sinch,wss: Audio exchange\n    sinch -) wss: WS binary message : audio\n    wss -) sinch: WS binary message : audio\n    note over sinch,wss: Message exchange\n    rect rgb(255, 241, 38)\n        note right of wss: Clear buffer (VAD / barge-in)\n    end\n    wss -) sinch: WS text message (command:clear)\n    rect rgb(255, 241, 38)\n        note right of wss: Send to keep channel open.  <br/> If no audio is sent on the channel<br/>  ie: every 30 secs\n    end\n    wss -) sinch: WS text message (command:heartbeat)\n    note over sinch,wss: Ending the call\n    alt Customer ends call\n        wss --) sinch: Websocket close()\n        rect rgba(255, 0, 0, 1)\n            note right of wss: Stream ended\n        end\n    else Sinch ends call\n        wss --) sinch: Websocket close()\n        rect rgba(255, 0, 0, 1)\n            note right of wss: Stream ended\n        end\n    end\n","diagramHtml":"<div class=\"mermaid\" data-processed=\"true\"><svg aria-roledescription=\"sequence\" role=\"graphics-document document\" viewBox=\"-50 -10 897 2044\" style=\"max-width: 897px;\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" id=\"mermaid-1765394200099\"><rect class=\"rect\" height=\"72\" width=\"251\" fill=\"rgba(255, 0, 0, 1)\" y=\"1856\" x=\"453\"></rect><rect class=\"rect\" height=\"72\" width=\"251\" fill=\"rgba(255, 0, 0, 1)\" y=\"1673\" x=\"453\"></rect><rect class=\"rect\" height=\"116\" width=\"287\" fill=\"rgb(255, 241, 38)\" y=\"1340\" x=\"453\"></rect><rect class=\"rect\" height=\"72\" width=\"251\" fill=\"rgb(255, 241, 38)\" y=\"1204\" x=\"453\"></rect><rect class=\"rect\" height=\"72\" width=\"251\" fill=\"rgba(255, 0, 0, 1)\" y=\"900\" x=\"453\"></rect><rect class=\"rect\" height=\"72\" width=\"251\" fill=\"rgba(255, 0, 0, 1)\" y=\"717\" x=\"453\"></rect><rect class=\"rect\" height=\"72\" width=\"344\" fill=\"rgba(0, 247, 16, 1)\" y=\"455\" x=\"453\"></rect><rect class=\"rect\" height=\"72\" width=\"251\" fill=\"rgba(255, 0, 0, 1)\" y=\"309\" x=\"453\"></rect><style>#mermaid-1765394200099{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-1765394200099 .error-icon{fill:#552222;}#mermaid-1765394200099 .error-text{fill:#552222;stroke:#552222;}#mermaid-1765394200099 .edge-thickness-normal{stroke-width:2px;}#mermaid-1765394200099 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-1765394200099 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-1765394200099 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-1765394200099 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-1765394200099 .marker{fill:#333333;stroke:#333333;}#mermaid-1765394200099 .marker.cross{stroke:#333333;}#mermaid-1765394200099 svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:16px;}#mermaid-1765394200099 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1765394200099 text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-1765394200099 .actor-line{stroke:grey;}#mermaid-1765394200099 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-1765394200099 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-1765394200099 #arrowhead path{fill:#333;stroke:#333;}#mermaid-1765394200099 .sequenceNumber{fill:white;}#mermaid-1765394200099 #sequencenumber{fill:#333;}#mermaid-1765394200099 #crosshead path{fill:#333;stroke:#333;}#mermaid-1765394200099 .messageText{fill:#333;stroke:none;}#mermaid-1765394200099 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1765394200099 .labelText,#mermaid-1765394200099 .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-1765394200099 .loopText,#mermaid-1765394200099 .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-1765394200099 .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-1765394200099 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-1765394200099 .noteText,#mermaid-1765394200099 .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-1765394200099 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-1765394200099 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-1765394200099 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-1765394200099 .actorPopupMenu{position:absolute;}#mermaid-1765394200099 .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-1765394200099 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1765394200099 .actor-man circle,#mermaid-1765394200099 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-1765394200099 :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}</style><g></g><defs><symbol height=\"24\" width=\"24\" id=\"computer\"><path 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\" transform=\"scale(.5)\"></path></symbol></defs><defs><symbol clip-rule=\"evenodd\" fill-rule=\"evenodd\" id=\"database\"><path 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\" transform=\"scale(.5)\"></path></symbol></defs><defs><symbol height=\"24\" width=\"24\" id=\"clock\"><path 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\" transform=\"scale(.5)\"></path></symbol></defs><g><line stroke=\"#999\" stroke-width=\"0.5px\" class=\"200\" y2=\"1978\" x2=\"75\" y1=\"5\" x1=\"75\" id=\"actor0\"></line><g id=\"root-0\"><rect class=\"actor\" ry=\"3\" rx=\"3\" height=\"65\" width=\"150\" stroke=\"#666\" fill=\"#eaeaea\" y=\"0\" x=\"0\"></rect><text style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\" class=\"actor\" alignment-baseline=\"central\" dominant-baseline=\"central\" y=\"32.5\" x=\"75\"><tspan dy=\"0\" x=\"75\">Sinch Platform</tspan></text></g></g><g><line stroke=\"#999\" stroke-width=\"0.5px\" class=\"200\" y2=\"1978\" x2=\"438\" y1=\"5\" x1=\"438\" id=\"actor1\"></line><g id=\"root-1\"><rect class=\"actor\" ry=\"3\" rx=\"3\" height=\"65\" width=\"231\" stroke=\"#666\" fill=\"#eaeaea\" y=\"0\" x=\"322.5\"></rect><text style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\" class=\"actor\" alignment-baseline=\"central\" dominant-baseline=\"central\" y=\"32.5\" x=\"438\"><tspan dy=\"0\" x=\"438\">Customer Websocket Server</tspan></text></g></g><defs><marker orient=\"auto\" markerHeight=\"12\" markerWidth=\"12\" markerUnits=\"userSpaceOnUse\" refY=\"5\" refX=\"9\" id=\"arrowhead\"><path d=\"M 0 0 L 10 5 L 0 10 z\"></path></marker></defs><defs><marker refY=\"5\" refX=\"4\" orient=\"auto\" markerHeight=\"8\" markerWidth=\"15\" id=\"crosshead\"><path style=\"stroke-dasharray: 0, 0;\" d=\"M 1,2 L 6,7 M 6,2 L 1,7\" stroke-width=\"1pt\" stroke=\"#000000\" fill=\"none\"></path></marker></defs><defs><marker orient=\"auto\" markerHeight=\"28\" markerWidth=\"20\" refY=\"7\" refX=\"18\" id=\"filled-head\"><path d=\"M 18,7 L9,13 L14,7 L9,1 Z\"></path></marker></defs><defs><marker orient=\"auto\" markerHeight=\"40\" markerWidth=\"60\" refY=\"15\" refX=\"15\" id=\"sequencenumber\"><circle r=\"6\" cy=\"15\" cx=\"15\"></circle></marker></defs><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"231\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"329\" x=\"463\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"334\" x=\"579\"><tspan x=\"579\">Stream ended</tspan></text></g><g><line class=\"loopLine\" y2=\"129\" x2=\"714\" y1=\"129\" x1=\"65\"></line><line class=\"loopLine\" y2=\"391\" x2=\"714\" y1=\"129\" x1=\"714\"></line><line class=\"loopLine\" y2=\"391\" x2=\"714\" y1=\"391\" x1=\"65\"></line><line class=\"loopLine\" y2=\"391\" x2=\"65\" y1=\"129\" x1=\"65\"></line><line style=\"stroke-dasharray: 3, 3;\" class=\"loopLine\" y2=\"213\" x2=\"714\" y1=\"213\" x1=\"65\"></line><polygon class=\"labelBox\" points=\"65,129 115,129 115,142 106.6,149 65,149\"></polygon><text style=\"font-size: 16px; font-weight: 400;\" class=\"labelText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"142\" x=\"90\">alt</text><text style=\"font-size: 16px; font-weight: 400;\" class=\"loopText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"147\" x=\"465\"><tspan x=\"465\"></tspan></text><text style=\"font-size: 16px; font-weight: 400;\" class=\"loopText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"231\" x=\"440\">[Decline]</text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"324\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"475\" x=\"463\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"480\" x=\"625\"><tspan x=\"625\">Contains callHeaders, callId, AppKey, etc.</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"231\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"737\" x=\"463\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"742\" x=\"579\"><tspan x=\"579\">Stream ended</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"231\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"920\" x=\"463\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"925\" x=\"579\"><tspan x=\"579\">Stream ended</tspan></text></g><g><line class=\"loopLine\" y2=\"537\" x2=\"714\" y1=\"537\" x1=\"65\"></line><line class=\"loopLine\" y2=\"982\" x2=\"714\" y1=\"537\" x1=\"714\"></line><line class=\"loopLine\" y2=\"982\" x2=\"714\" y1=\"982\" x1=\"65\"></line><line class=\"loopLine\" y2=\"982\" x2=\"65\" y1=\"537\" x1=\"65\"></line><line style=\"stroke-dasharray: 3, 3;\" class=\"loopLine\" y2=\"621\" x2=\"714\" y1=\"621\" x1=\"65\"></line><line style=\"stroke-dasharray: 3, 3;\" class=\"loopLine\" y2=\"804\" x2=\"714\" y1=\"804\" x1=\"65\"></line><polygon class=\"labelBox\" points=\"65,537 115,537 115,550 106.6,557 65,557\"></polygon><text style=\"font-size: 16px; font-weight: 400;\" class=\"labelText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"550\" x=\"90\">alt</text><text style=\"font-size: 16px; font-weight: 400;\" class=\"loopText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"555\" x=\"465\"><tspan x=\"465\"></tspan></text><text style=\"font-size: 16px; font-weight: 400;\" class=\"loopText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"639\" x=\"440\">[Send BUSY signal]</text><text style=\"font-size: 16px; font-weight: 400;\" class=\"loopText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"822\" x=\"440\">[Reject the call]</text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"413\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"992\" x=\"50\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"997\" x=\"257\"><tspan x=\"257\">Audio exchange</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"413\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"1152\" x=\"50\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1157\" x=\"257\"><tspan x=\"257\">Message exchange</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"231\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"1224\" x=\"463\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1229\" x=\"579\"><tspan x=\"579\">Clear buffer (VAD / barge-in)</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"86\" width=\"267\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"1360\" x=\"463\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1365\" x=\"597\"><tspan x=\"597\">Send to keep channel open.  </tspan></text><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1387\" x=\"597\"><tspan x=\"597\"> If no audio is sent on the channel</tspan></text><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1409\" x=\"597\"><tspan x=\"597\">  ie: every 30 secs</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"413\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"1520\" x=\"50\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1525\" x=\"257\"><tspan x=\"257\">Ending the call</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"231\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"1693\" x=\"463\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1698\" x=\"579\"><tspan x=\"579\">Stream ended</tspan></text></g><g><rect class=\"note\" ry=\"0\" rx=\"0\" height=\"42\" width=\"231\" stroke=\"#666\" fill=\"#EDF2AE\" y=\"1876\" x=\"463\"></rect><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"noteText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1881\" x=\"579\"><tspan x=\"579\">Stream ended</tspan></text></g><g><line class=\"loopLine\" y2=\"1572\" x2=\"714\" y1=\"1572\" x1=\"65\"></line><line class=\"loopLine\" y2=\"1938\" x2=\"714\" y1=\"1572\" x1=\"714\"></line><line class=\"loopLine\" y2=\"1938\" x2=\"714\" y1=\"1938\" x1=\"65\"></line><line class=\"loopLine\" y2=\"1938\" x2=\"65\" y1=\"1572\" x1=\"65\"></line><line style=\"stroke-dasharray: 3, 3;\" class=\"loopLine\" y2=\"1760\" x2=\"714\" y1=\"1760\" x1=\"65\"></line><polygon class=\"labelBox\" points=\"65,1572 115,1572 115,1585 106.6,1592 65,1592\"></polygon><text style=\"font-size: 16px; font-weight: 400;\" class=\"labelText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1585\" x=\"90\">alt</text><text style=\"font-size: 16px; font-weight: 400;\" class=\"loopText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1590\" x=\"465\"><tspan x=\"465\">[Customer ends call]</tspan></text><text style=\"font-size: 16px; font-weight: 400;\" class=\"loopText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1778\" x=\"440\">[Sinch ends call]</text></g><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"80\" x=\"257\">WS Connection request</text><line style=\"stroke-dasharray: 3, 3; fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine1\" y2=\"119\" x2=\"438\" y1=\"119\" x1=\"75\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"159\" x=\"257\">WS Accepted (200 ok)</text><line style=\"stroke-dasharray: 3, 3; fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine1\" y2=\"198\" x2=\"75\" y1=\"198\" x1=\"438\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"260\" x=\"257\">WS Respponse (Any other code)</text><line style=\"stroke-dasharray: 3, 3; fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine1\" y2=\"299\" x2=\"75\" y1=\"299\" x1=\"438\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"406\" x=\"257\">WS text message (command:connect)</text><line style=\"fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"445\" x2=\"438\" y1=\"445\" x1=\"75\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"567\" x=\"257\">WS text message (command:answer)</text><line style=\"fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"606\" x2=\"75\" y1=\"606\" x1=\"438\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"668\" x=\"257\">WS text message (command:busy)</text><line style=\"fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"707\" x2=\"75\" y1=\"707\" x1=\"438\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"851\" x=\"257\">WS text message (command:reject)</text><line style=\"fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"890\" x2=\"75\" y1=\"890\" x1=\"438\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1049\" x=\"257\">WS binary message : audio</text><line style=\"fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"1088\" x2=\"438\" y1=\"1088\" x1=\"75\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1103\" x=\"257\">WS binary message : audio</text><line style=\"fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"1142\" x2=\"75\" y1=\"1142\" x1=\"438\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1291\" x=\"257\">WS text message (command:clear)</text><line style=\"fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"1330\" x2=\"75\" y1=\"1330\" x1=\"438\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1471\" x=\"257\">WS text message (command:heartbeat)</text><line style=\"fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine0\" y2=\"1510\" x2=\"75\" y1=\"1510\" x1=\"438\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1624\" x=\"257\">Websocket close()</text><line style=\"stroke-dasharray: 3, 3; fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine1\" y2=\"1663\" x2=\"75\" y1=\"1663\" x1=\"438\"></line><text style=\"font-size: 16px; font-weight: 400;\" dy=\"1em\" class=\"messageText\" alignment-baseline=\"middle\" dominant-baseline=\"middle\" text-anchor=\"middle\" y=\"1807\" x=\"257\">Websocket close()</text><line style=\"stroke-dasharray: 3, 3; fill: none;\" marker-end=\"url(#filled-head)\" stroke=\"none\" stroke-width=\"2\" class=\"messageLine1\" y2=\"1846\" x2=\"75\" y1=\"1846\" x1=\"438\"></line><g><rect class=\"actor\" ry=\"3\" rx=\"3\" height=\"65\" width=\"150\" stroke=\"#666\" fill=\"#eaeaea\" y=\"1958\" x=\"0\"></rect><text style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\" class=\"actor\" alignment-baseline=\"central\" dominant-baseline=\"central\" y=\"1990.5\" x=\"75\"><tspan dy=\"0\" x=\"75\">Sinch Platform</tspan></text></g><g><rect class=\"actor\" ry=\"3\" rx=\"3\" height=\"65\" width=\"231\" stroke=\"#666\" fill=\"#eaeaea\" y=\"1958\" x=\"322.5\"></rect><text style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\" class=\"actor\" alignment-baseline=\"central\" dominant-baseline=\"central\" y=\"1990.5\" x=\"438\"><tspan dy=\"0\" x=\"438\">Customer Websocket Server</tspan></text></g></svg></div>"},"children":["sequenceDiagram\n    participant sinch as Sinch Platform\n    participant wss as Customer Websocket Server\n    \n    sinch --) wss: WS Connection request\n    alt\n        wss --) sinch: WS Accepted (200 ok)\n    else Decline\n        wss --) sinch: WS Respponse (Any other code)\n        rect rgba(255, 0, 0, 1)\n            note right of wss: Stream ended\n        end\n    end\n    sinch -) wss: WS text message (command:connect)\n    rect rgba(0, 247, 16, 1)\n        note right of wss: Contains callHeaders, callId, AppKey, etc.\n    end\n    alt\n        wss -) sinch: WS text message (command:answer)\n    else Send BUSY signal\n        wss -) sinch: WS text message (command:busy)\n        rect rgba(255, 0, 0, 1)\n            note right of wss: Stream ended\n        end\n    else Reject the call\n        wss -) sinch: WS text message (command:reject)\n        rect rgba(255, 0, 0, 1)\n            note right of wss: Stream ended\n        end\n    end\n    note over sinch,wss: Audio exchange\n    sinch -) wss: WS binary message : audio\n    wss -) sinch: WS binary message : audio\n    note over sinch,wss: Message exchange\n    rect rgb(255, 241, 38)\n        note right of wss: Clear buffer (VAD / barge-in)\n    end\n    wss -) sinch: WS text message (command:clear)\n    rect rgb(255, 241, 38)\n        note right of wss: Send to keep channel open.  <br/> If no audio is sent on the channel<br/>  ie: every 30 secs\n    end\n    wss -) sinch: WS text message (command:heartbeat)\n    note over sinch,wss: Ending the call\n    alt Customer ends call\n        wss --) sinch: Websocket close()\n        rect rgba(255, 0, 0, 1)\n            note right of wss: Stream ended\n        end\n    else Sinch ends call\n        wss --) sinch: Websocket close()\n        rect rgba(255, 0, 0, 1)\n            note right of wss: Stream ended\n        end\n    end\n"]}]},"headings":[{"value":"connectStream","id":"connectstream","depth":1},{"value":"Use cases","id":"use-cases","depth":2},{"value":"Voice API Websocket connection flow","id":"voice-api-websocket-connection-flow","depth":2},{"value":"Connect message:","id":"connect-message","depth":4},{"value":"Customer message:","id":"customer-message","depth":4}],"frontmatter":{"seo":{"title":"connectStream action","description":"Details about the connectStream SVAML action."}},"lastModified":"2025-12-11T00:46:56.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/voice/api-reference/svaml/streams","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}