{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/voice-2.0/sidebars.yaml","oas-docs/voice-2.0/api-reference/voice.yaml":"oas-docs/voice-2.0/api-reference/voice.yaml"},"props":{"metadata":{"markdoc":{"tagList":["connect-mcp","cardSteps","admonition","tabs","tab","partial"]},"product":"Voice v2 (preview)","type":"markdown"},"seo":{"title":"Getting started | Voice API v2 | Sinch","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":"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":"Voice API v2","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-2.0/**/*.md","docs/voice-2.0/**/*.yaml"],"excludeFiles":["docs/voice-2.0/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"]},{"title":"Number Lookup API","description":"The Number Lookup API is designed to provide in-depth information about phone numbers, helping enterprises enhance their communication strategies and prevent fraud. By identifying the type of phone line (for example, mobile, landline, VoIP) and the associated carrier, the API allows businesses to optimize routing, reduce unnecessary costs, and improve customer engagement.","includeFiles":["docs/number-lookup-api-v2/**/*.md","docs/number-lookup-api-v2/**/*.yaml"],"excludeFiles":["docs/number-lookup-api-v2/index.md"]},{"title":"Functions","description":"Serverless compute for voice and messaging. Deploy your code and Sinch routes live calls and messages to it — no infrastructure to run.","includeFiles":["docs/functions/functions/**/*.md","docs/functions/concepts/**/*.md","docs/functions/reference/**/*.md"],"excludeFiles":["docs/functions/functions/index.md"]},{"title":"CLI","description":"One command line for every Sinch API and the full Functions lifecycle — scaffold, run locally, deploy, and manage.","includeFiles":["docs/functions/cli/**/*.md"],"excludeFiles":["docs/functions/cli/index.md"]}]},"description":"Get started with Voice API v2."},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["If you want to use the content of this page with an AI tool, or if you are an AI agent, use the Markdown version of this page: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://developers.sinch.com/docs/voice-2.0/getting-started.md"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["You may also connect to our documentation MCP server by clicking the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connect MCP"]}," button: ",{"$$mdtype":"Tag","name":"ConnectMCP","attributes":{"placement":"bottom","alignment":"start","options":["cursor","vscode","copy"]},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"getting-started","__idx":0},"children":["Getting started"]},{"$$mdtype":"Tag","name":"CardSteps","attributes":{"steps":[{"title":"Step 1","description":"Get your number","icon":"device","link":"#1-get-your-number"},{"title":"Step 2","description":"Get your credentials","icon":"check","link":"#2-get-your-credentials"},{"title":"Step 3","description":"Assign your number","icon":"device","link":"#3-assign-your-number"},{"title":"Step 4","description":"Make a call","icon":"pointer","link":"#4-make-a-call"},{"title":"Step 5","description":"Handle an incoming call","icon":"pointer","link":"#5-handle-an-incoming-call"}]},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success","name":"Account required!"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Using the Voice API v2 requires ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://community.sinch.com/t5/Customer-Dashboard/How-to-sign-up-for-your-free-Sinch-account/ta-p/8058"},"children":["signing up for a free account"]}," on the Sinch Build Dashboard. If you haven't already done so, ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dashboard.sinch.com/signup"},"children":["sign up now"]},"!"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow the steps below to learn how to quickly start making calls using the Sinch Voice API:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-get-your-number","__idx":1},"children":["1. Get your number"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Get your free Sinch testing number."]}," When you sign up for a Sinch Build Dashboard account, you get a free virtual number for testing. You must activate your test number before you can use it. To activate your number, simply click the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dashboard.sinch.com/numbers/buy-numbers?show=get-test-number&redirect=numbers/overview"},"children":["link"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-get-your-credentials","__idx":2},"children":["2. Get your credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then, create your access key. Access keys are used to authenticate calls when using Voice API v2. Access keys are generated in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dashboard.sinch.com/settings/access-keys"},"children":["Sinch Build Dashboard"]},"."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success","name":"You'll need this info later!"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make sure you have your access key, access key secret, and project ID readily available. This information will be required when making the API request to make a phone call. The access key and access key secret must be recorded during access key creation. The project ID can be found on the Sinch Build Dashboard's ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dashboard.sinch.com/settings/project-settings"},"children":["Project Settings"]}," page."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3-assign-your-number","__idx":3},"children":["3. Assign your number"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the Sinch Build dashboard, navigate to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Numbers"]}," section and locate ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dashboard.sinch.com/numbers/your-numbers"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Your virtual numbers"]}]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click on your number to go into the details for that number. Scroll down to the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Voice Configuration"]}," section and click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Edit"]},". There you can select your default service. Make sure to save your settings."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"4-make-a-call","__idx":4},"children":["4. Make a call"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you're ready to get started making a phone call using the Voice API v2."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you already have experience making API requests, you can create an application that makes the phone call in your preferred coding language."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The payload, along with instructions on how to populate placeholder variables, is below. Alternatively, each tab features a guide that will walk you through setting up a simple application in the identified coding language (make sure you bring all the information you gathered during this process!):"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Payload","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To initiate an outbound call, send a POST request to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v2/projects/{projectId}/calls"]}," endpoint. The SVAML payload should be included in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["commands"]}," field:"]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-docs/voice-2.0/api-reference/voice.yaml","operationId":"createCall","language":"Payload","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"json","title":"Payload application/json","source":"{\n  \"commands\": [\n    {\n      \"command\": \"dial\",\n      \"callName\": \"origin\",\n      \"from\": {\n        \"type\": \"PHONE\",\n        \"phone\": {\n          \"number\": \"+15551234567\"\n        }\n      },\n      \"to\": {\n        \"type\": \"PHONE\",\n        \"phone\": {\n          \"number\": \"+15559876543\"\n        }\n      },\n      \"dialTimeoutDurationSeconds\": 30,\n      \"maxCallDurationSeconds\": 3600,\n      \"events\": {\n        \"onAnswer\": [\n          {\n            \"command\": \"messages\",\n            \"messages\": [\n              {\n                \"type\": \"SAY\",\n                \"say\": {\n                  \"text\": \"Hello, your call is now connected.\",\n                  \"voiceName\": \"Emma\"\n                }\n              }\n            ]\n          }\n        ],\n        \"onHangup\": [\n          {\n            \"command\": \"hangup\"\n          }\n        ]\n      }\n    }\n  ]\n}"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The placeholder values included in the payload above are detailed in the table below:"]},{"$$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":"Placeholder value"},"children":["Placeholder value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Your value"},"children":["Your value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{YOUR_Number}"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is your test number that you activated in a previous step."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{YOUR_Destination_number}"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is a number you have verified in the Build dashboard."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you make the request, don't forget to include your project ID, and your access key and secret. Since this guide is intended for testing purposes, you can use your access key and access secret to authenticate using ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/voice-2.0/api-reference/authentication/basic"},"children":["basic authentication"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Congratulations! You have successfully initiated your first outbound call."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Node.js","disable":false,"icon":"/assets/node.js.654f0bdb34ce3c9861f18a2232f306b9ad7cec5a09fb408c04e4cfdeb9bc7db7.83be2fd5.png"},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"make-a-call-with-nodejs","__idx":5},"children":["Make a call with Node.js"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can quickly see how the Voice API works by calling yourself using the API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"what-you-need-to-know-before-you-start","__idx":6},"children":["What you need to know before you start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you can get started, you need the following already set up:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://nodejs.org/en/"},"children":["Node.js"]}," and a familiarity with how to create a new app."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"set-up-your-nodejs-application","__idx":7},"children":["Set up your Node.js application"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First we'll create a Node project using npm. This creates a package.json and the core dependencies necessary to start coding."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create the project, do the following steps:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a project folder to hold your application."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate into the folder you created and open a terminal, then run the following command."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"npm init\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This command adds the node_modules folder and the package.json file. You will be prompted to provide values for the fields. For this tutorial, you can simply accept the default values and press enter at each stage."]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Add the node-fetch package with npm to generate the necessary dependencies."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"npm install 'node-fetch'\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"create-your-file","__idx":8},"children":["Create your file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a new file named ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["index.js"]}," in the project and paste the provided code into the file."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial uses basic authentication for testing purposes. We recommend using OAuth token-based authentication for production."]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-docs/voice-2.0/api-reference/voice.yaml","operationId":"createCall","language":"Node.js","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"javascript","title":"Node.js","source":"import fetch from 'node-fetch';\n\nasync function run() {\n  const query = new URLSearchParams({\n    serviceId: '6e124178-c29d-46a5-943c-5c2ae544aade'\n  }).toString();\n\n  const projectId = 'YOUR_projectId_PARAMETER';\n  const resp = await fetch(\n    `https://voice.api.sinch.com/v2/projects/${projectId}/calls?${query}`,\n    {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/json',\n        'Idempotency-Key': 'stringstringstri',\n        Authorization: 'Basic ' + Buffer.from('<username>:<password>').toString('base64')\n      },\n      body: JSON.stringify({\n        commands: [\n          {\n            command: 'dial',\n            callName: 'origin',\n            from: {\n              type: 'PHONE',\n              phone: {number: '+15551234567'}\n            },\n            to: {\n              type: 'PHONE',\n              phone: {number: '+15559876543'}\n            },\n            dialTimeoutDurationSeconds: 30,\n            maxCallDurationSeconds: 3600,\n            events: {\n              onAnswer: [\n                {\n                  command: 'messages',\n                  messages: [\n                    {\n                      type: 'SAY',\n                      say: {\n                        text: 'Hello, your call is now connected.',\n                        voiceName: 'Emma'\n                      }\n                    }\n                  ]\n                }\n              ],\n              onHangup: [{command: 'hangup'}]\n            }\n          }\n        ]\n      })\n    }\n  );\n\n  const data = await resp.json();\n  console.log(data);\n}\n\nrun();"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This code makes a phone call to a specified number using the Sinch Voice API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fill-in-your-parameters","__idx":9},"children":["Fill in your parameters"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Before you can run the code, you need to update some more values in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Index.js"]}," file so you can connect to your Sinch account. Update the following parameters with your own values:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Your value"},"children":["Your value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["projectId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is your project ID from your dashboard."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Service-Id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is the ID of the service you created."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<username>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access key you created in a previous step."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<password>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access secret for the access key."]}]},{"$$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":["This is your test number that you activated in a previous step and assigned to your Voice service."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is a number you have verified in the Build dashboard."]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save the file."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"run-the-code","__idx":10},"children":["Run the code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can execute the code and make your call. Run the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"node index.js\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should receive a phone call to the number you specified."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Troubleshooting tip"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If after running your app you receive a 5000 error response, you may have forgotten to save your file after adding your authentication values. This is an easy mistake to make! Try saving the file and running the app again."]}]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false,"icon":"/assets/java.6824af01bb61444afca5d11f38a7f067216a83a23e5eac80fd3524a7e7f4e857.83be2fd5.png"},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"make-a-call-with-java","__idx":11},"children":["Make a call with Java"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can quickly see how the Voice API works by calling yourself using the API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"what-you-need-to-know-before-you-start-1","__idx":12},"children":["What you need to know before you start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you can get started, you need the following already set up:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.oracle.com/java/technologies/downloads/"},"children":["JDK 8"]}," or later and a familiarity with how to create a new Java application."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://gradle.org/install/"},"children":["Gradle"]}," and a familiarity with how use the Gradle build tools."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"set-up-your-java-application","__idx":13},"children":["Set up your Java application"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a new folder where you want to keep your app project. Then, open a terminal or command prompt to that location."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a new Java application using Gradle with the following command:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"gradle init\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the prompts, select that you want to create an application, name your project and source package ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app"]},", and then accept the defaults for the rest of the options."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"modify-your-file","__idx":14},"children":["Modify your file"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["App.java"]}," file in your project folder, located in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\\app\\scr\\main\\java\\app"]},". Populate that file code found on this page and save the file."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial uses basic authentication for testing purposes. We recommend using OAuth token-based authentication for production."]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-docs/voice-2.0/api-reference/voice.yaml","operationId":"createCall","language":"Java","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"java","title":"Java","source":"import java.net.*;\nimport java.net.http.*;\nimport java.util.*;\nimport java.nio.charset.StandardCharsets;\nimport java.util.stream.Collectors;\n\npublic class App {\n  public static void main(String[] args) throws Exception {\n    var httpClient = HttpClient.newBuilder().build();\n\n    var payload = String.join(\"\\n\"\n      , \"{\"\n      , \" \\\"commands\\\": [\"\n      , \"  {\"\n      , \"   \\\"command\\\": \\\"dial\\\",\"\n      , \"   \\\"callName\\\": \\\"origin\\\",\"\n      , \"   \\\"from\\\": {\"\n      , \"    \\\"type\\\": \\\"PHONE\\\",\"\n      , \"    \\\"phone\\\": {\"\n      , \"     \\\"number\\\": \\\"+15551234567\\\"\"\n      , \"    }\"\n      , \"   },\"\n      , \"   \\\"to\\\": {\"\n      , \"    \\\"type\\\": \\\"PHONE\\\",\"\n      , \"    \\\"phone\\\": {\"\n      , \"     \\\"number\\\": \\\"+15559876543\\\"\"\n      , \"    }\"\n      , \"   },\"\n      , \"   \\\"dialTimeoutDurationSeconds\\\": 30,\"\n      , \"   \\\"maxCallDurationSeconds\\\": 3600,\"\n      , \"   \\\"events\\\": {\"\n      , \"    \\\"onAnswer\\\": [\"\n      , \"     {\"\n      , \"      \\\"command\\\": \\\"messages\\\",\"\n      , \"      \\\"messages\\\": [\"\n      , \"       {\"\n      , \"        \\\"type\\\": \\\"SAY\\\",\"\n      , \"        \\\"say\\\": {\"\n      , \"         \\\"text\\\": \\\"Hello, your call is now connected.\\\",\"\n      , \"         \\\"voiceName\\\": \\\"Emma\\\"\"\n      , \"        }\"\n      , \"       }\"\n      , \"      ]\"\n      , \"     }\"\n      , \"    ],\"\n      , \"    \\\"onHangup\\\": [\"\n      , \"     {\"\n      , \"      \\\"command\\\": \\\"hangup\\\"\"\n      , \"     }\"\n      , \"    ]\"\n      , \"   }\"\n      , \"  }\"\n      , \" ]\"\n      , \"}\"\n    );\n\n    HashMap<String, String> params = new HashMap<>();\n    params.put(\"serviceId\", \"6e124178-c29d-46a5-943c-5c2ae544aade\");\n\n    var query = params.keySet().stream()\n      .map(key -> key + \"=\" + URLEncoder.encode(params.get(key), StandardCharsets.UTF_8))\n      .collect(Collectors.joining(\"&\"));\n\n    var host = \"https://voice.api.sinch.com\";\n    var projectId = \"YOUR_projectId_PARAMETER\";\n    var pathname = \"/v2/projects/%7BprojectId%7D/calls\";\n    var request = HttpRequest.newBuilder()\n      .POST(HttpRequest.BodyPublishers.ofString(payload))\n      .uri(URI.create(host + pathname + '?' + query))\n      .header(\"Content-Type\", \"application/json\")\n      .header(\"Idempotency-Key\", \"stringstringstri\")\n      .header(\"Authorization\", \"Basic \" + Base64.getEncoder().encodeToString((\"<username>:<password>\").getBytes()))\n      .build();\n\n    var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());\n\n    System.out.println(response.body());\n  }\n}"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This code makes a phone call to a specified number using the Sinch Voice API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fill-in-your-parameters-1","__idx":15},"children":["Fill in your parameters"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Before you can run the code, you need to update some more values in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["App.java"]}," file so you can connect to your Sinch account. Update the following parameters with your own values:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Your value"},"children":["Your value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["projectId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is your project ID from your dashboard."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Service-Id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is the ID of the service you created."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<username>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access key you created in a previous step."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<password>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access secret for the access key."]}]},{"$$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":["This is your test number that you activated in a previous step and assigned to your Voice service."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is a number you have verified in the Build dashboard."]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save the file."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"run-the-code-1","__idx":16},"children":["Run the code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can execute the code and make your call. Run the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"gradle run\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should receive a phone call to the number you specified."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Troubleshooting tip"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If after running your app you receive a 5000 error response, you may have forgotten to save your file after adding your authentication values. This is an easy mistake to make! Try saving the file and running the app again."]}]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":".NET","disable":false,"icon":"/assets/netcore.049770054476f232f2811777ca5a2d44dfaecffa6f88767c9ef4c8be6c70715d.83be2fd5.png"},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"make-a-call-with-net","__idx":17},"children":["Make a call with .NET"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can quickly see how the Voice API works by calling yourself using the API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"what-you-need-to-know-before-you-start-2","__idx":18},"children":["What you need to know before you start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you can get started, you need the following already set up:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dotnet.microsoft.com/download"},"children":["The latest version of .Net Core with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Long Term Support"]}]}," and a familiarity with how to create a new console application."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"set-up-your-net-console-application","__idx":19},"children":["Set up your .NET console application"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a new folder where you want to keep your app project. Then, open a terminal or command prompt to that location."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a new .Net Core console app with the following command:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"dotnet new console\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"modify-your-file-1","__idx":20},"children":["Modify your file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Program.cs"]}," file in your project folder. Replace all of the code with the following code:"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial uses basic authentication for testing purposes. We recommend using OAuth token-based authentication for production."]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-docs/voice-2.0/api-reference/voice.yaml","operationId":"createCall","language":"C#","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"csharp","title":"C#","source":"using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Text;\nusing System.Text.Json;\nusing System.Net.Http.Headers;\n\npublic class Program\n{\n  public static async Task Main()\n  {\n    System.Net.Http.HttpClient client = new()\n    {\n      DefaultRequestHeaders =\n      {\n        {\"Idempotency-Key\", \"stringstringstri\"},\n      }\n    };\n\n    string base64String = Convert.ToBase64String(Encoding.ASCII.GetBytes(\"<username>:<password>\"));\n    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(@\"Basic\", base64String);\n\n    string json = JsonSerializer.Serialize(new\n    {\n      commands = new[] {\n        new {\n          command = \"dial\",\n          callName = \"origin\",\n          from = new {\n            type = \"PHONE\",\n            phone = new {\n              number = \"+15551234567\"\n            }\n          },\n          to = new {\n            type = \"PHONE\",\n            phone = new {\n              number = \"+15559876543\"\n            }\n          },\n          dialTimeoutDurationSeconds = \"30\",\n          maxCallDurationSeconds = \"3600\",\n          events = new {\n            onAnswer = new[] {\n              new {\n                command = \"messages\",\n                messages = new[] {\n                  new {\n                    type = \"SAY\",\n                    say = new {\n                      text = \"Hello, your call is now connected.\",\n                      voiceName = \"Emma\"\n                    }\n                  }\n                },\n              }\n            },\n            onHangup = new[] {\n              new {\n                command = \"hangup\"\n              }\n            },\n          }\n        }\n      },\n    });\n\n    using StringContent postData = new(json, Encoding.UTF8, \"application/json\");\n      var ProjectId = \"YOUR_projectId_PARAMETER\";\n    using HttpResponseMessage request = await client.PostAsync(\"https://voice.api.sinch.com/v2/projects/\" + ProjectId + \"/calls?serviceId=6e124178-c29d-46a5-943c-5c2ae544aade\", postData);\n    string response = await request.Content.ReadAsStringAsync();\n\n    Console.WriteLine(response);\n  }\n}"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This code makes a phone call to a specified number using the Sinch Voice API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fill-in-your-parameters-2","__idx":21},"children":["Fill in your parameters"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Before you can run the code, you need to update some more values in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Program.cs"]}," file so you can connect to your Sinch account. Update the following parameters with your own values:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Your value"},"children":["Your value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ProjectId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is your project ID from your dashboard."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Service-Id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is the ID of the service you created."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<username>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access key you created in a previous step."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<password>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access secret for the access key."]}]},{"$$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":["This is your test number that you activated in a previous step and assigned to your Voice service. Replace the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}," value in the object."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is a number you have verified in the Build dashboard. Replace the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}," value in the object."]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save the file."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"run-the-code-2","__idx":22},"children":["Run the code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before executing your code, you must first compile your application. Execute the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"dotnet build\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can execute the code and make your phone call. Run the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"dotnet run\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should receive a phone call to the number you specified."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Troubleshooting tip"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If after running your app you receive a 5000 error response, you may have forgotten to save your file after adding your authentication values. This is an easy mistake to make! Try saving the file and running the app again."]}]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false,"icon":"/assets/python.b048095ba600cf4f71c73b097ca8e466d4b1a2f8cf00c2a778f2b241619362e8.83be2fd5.png"},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"make-a-call-with-python","__idx":23},"children":["Make a call with Python"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can quickly see how the Voice API works by calling yourself using the API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"what-you-need-to-know-before-you-start-3","__idx":24},"children":["What you need to know before you start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you can get started, you need the following already set up:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.python.org/"},"children":["Python"]}," and a familiarity with how to create a new file."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"set-up-your-python-application","__idx":25},"children":["Set up your Python application"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a new file named ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["make-call.py"]}," and paste the provided code found on this page into the file."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial uses basic authentication for testing purposes. We recommend using OAuth token-based authentication for production."]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-docs/voice-2.0/api-reference/voice.yaml","operationId":"createCall","language":"Python","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"python","title":"Python","source":"import requests\n\nproject_id = \"YOUR_projectId_PARAMETER\"\nurl = \"https://voice.api.sinch.com/v2/projects/\" + project_id + \"/calls\"\n\nquery = {\n  \"serviceId\": \"6e124178-c29d-46a5-943c-5c2ae544aade\"\n}\n\npayload = {\n  \"commands\": [\n    {\n      \"command\": \"dial\",\n      \"callName\": \"origin\",\n      \"from\": {\n        \"type\": \"PHONE\",\n        \"phone\": {\n          \"number\": \"+15551234567\"\n        }\n      },\n      \"to\": {\n        \"type\": \"PHONE\",\n        \"phone\": {\n          \"number\": \"+15559876543\"\n        }\n      },\n      \"dialTimeoutDurationSeconds\": 30,\n      \"maxCallDurationSeconds\": 3600,\n      \"events\": {\n        \"onAnswer\": [\n          {\n            \"command\": \"messages\",\n            \"messages\": [\n              {\n                \"type\": \"SAY\",\n                \"say\": {\n                  \"text\": \"Hello, your call is now connected.\",\n                  \"voiceName\": \"Emma\"\n                }\n              }\n            ]\n          }\n        ],\n        \"onHangup\": [\n          {\n            \"command\": \"hangup\"\n          }\n        ]\n      }\n    }\n  ]\n}\n\nheaders = {\n  \"Content-Type\": \"application/json\",\n  \"Idempotency-Key\": \"stringstringstri\"\n}\n\nresponse = requests.post(url, json=payload, headers=headers, params=query, auth=('<username>','<password>'))\n\ndata = response.json()\nprint(data)"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This code makes a phone call to a specified number using the Sinch Voice API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fill-in-your-parameters-3","__idx":26},"children":["Fill in your parameters"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Before you can run the code, you need to update some more values in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["make-call.py"]}," file so you can connect to your Sinch account. Update the following parameters with your own values:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Your value"},"children":["Your value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["project_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is your project ID from your dashboard."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Service-Id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is the ID of the service you created."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<username>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access key you created in a previous step."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<password>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access secret for the access key."]}]},{"$$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":["This is your test number that you activated in a previous step and assigned to your Voice service."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is a number you have verified in the Build dashboard."]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save the file."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"run-the-code-3","__idx":27},"children":["Run the code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can execute the code and make your call. Run the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"python make-call.py\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should receive a phone call to the number you specified."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Troubleshooting tip"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If after running your app you receive a 5000 error response, you may have forgotten to save your file after adding your authentication values. This is an easy mistake to make! Try saving the file and running the app again."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"5-handle-an-incoming-call","__idx":28},"children":["5. Handle an incoming call"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also call the phone number assigned to your Voice service and handle that incoming call. The Voice API v2 can respond to incoming calls in one of two ways:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sending an event to the webhook configured on your Voice service when a call is received"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Configuring static SVAML code to your Voice service which triggers when a call is received."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Since setting up your own server to listen for incoming requests can be a bit intensive, this guide will show you how to configure your Voice service with static SVAML code."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you already have experience making API requests, you can create an application that updates your service in your preferred coding language."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The payload, along with instructions on how to populate placeholder variables, is below. Alternatively, each tab features a guide that will walk you through setting up a simple application in the identified coding language (make sure you bring all the information you gathered during this process!):"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Payload","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To update your service with static SVAML, send a PATCH request to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v2/projects/{projectId}/services/{serviceId}"]}," endpoint. You will update the call behavior of the service as shown below:"]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-docs/voice-2.0/api-reference/voice.yaml","operationId":"updateService","exampleKey":"staticExample","language":"Payload","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"json","title":"Payload application/json","source":"{\n  \"description\": \"Service with static SVAML\",\n  \"callBehavior\": {\n    \"type\": \"STATIC\",\n    \"static\": {\n      \"callName\": \"incoming\",\n      \"commands\": [\n        {\n          \"command\": \"answer\"\n        },\n        {\n          \"command\": \"messages\",\n          \"messages\": [\n            {\n              \"type\": \"SAY\",\n              \"say\": {\n                \"text\": \"Your call is working fine! This call will be disconnected.\",\n                \"voiceName\": \"Emma\"\n              }\n            }\n          ],\n          \"events\": {\n            \"onFinish\": [\n              {\n                \"command\": \"hangup\"\n              }\n            ]\n          }\n        }\n      ]\n    }\n  }\n}"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you make the request, don't forget to include your project ID, and your access key and secret. Since this guide is intended for testing purposes, you can use your access key and access secret to authenticate using ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/voice-2.0/api-reference/authentication/basic"},"children":["basic authentication"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now that you've updated your service, call the phone number assigned to your Voice service. The call should be answered and you'll hear the text of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SAY"]}," command in the SVAML."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Node.js","disable":false,"icon":"/assets/node.js.654f0bdb34ce3c9861f18a2232f306b9ad7cec5a09fb408c04e4cfdeb9bc7db7.83be2fd5.png"},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"handle-an-incoming-call-with-nodejs","__idx":29},"children":["Handle an incoming call with Node.js"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can quickly see how the Voice API works by handling incoming calls using the API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"what-you-need-to-know-before-you-start-4","__idx":30},"children":["What you need to know before you start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you can get started, you need the following already set up:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://nodejs.org/en/"},"children":["Node.js"]}," and a familiarity with how to create a new app."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"set-up-your-nodejs-application-1","__idx":31},"children":["Set up your Node.js application"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First we'll create a Node project using npm. This creates a package.json and the core dependencies necessary to start coding."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create the project, do the following steps:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a project folder to hold your application."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate into the folder you created and open a terminal, then run the following command."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"npm init\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This command adds the node_modules folder and the package.json file. You will be prompted to provide values for the fields. For this tutorial, you can simply accept the default values and press enter at each stage."]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Add the node-fetch package with npm to generate the necessary dependencies."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"npm install 'node-fetch'\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"create-your-file-1","__idx":32},"children":["Create your file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a new file named ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["index.js"]}," in the project and paste the provided code into the file."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial uses basic authentication for testing purposes. We recommend using OAuth token-based authentication for production."]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-docs/voice-2.0/api-reference/voice.yaml","operationId":"updateService","exampleKey":"staticExample","language":"Node.js","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"javascript","title":"Node.js","source":"import fetch from 'node-fetch';\n\nasync function run() {\n  const projectId = 'YOUR_projectId_PARAMETER';\n  const serviceId = 'YOUR_serviceId_PARAMETER';\n  const resp = await fetch(\n    `https://voice.api.sinch.com/v2/projects/${projectId}/services/${serviceId}`,\n    {\n      method: 'PATCH',\n      headers: {\n        'Content-Type': 'application/json',\n        'Idempotency-Key': 'stringstringstri',\n        Authorization: 'Basic ' + Buffer.from('<username>:<password>').toString('base64')\n      },\n      body: JSON.stringify({\n        description: 'Service with static SVAML',\n        callBehavior: {\n          type: 'STATIC',\n          static: {\n            callName: 'incoming',\n            commands: [\n              {command: 'answer'},\n              {\n                command: 'messages',\n                messages: [\n                  {\n                    type: 'SAY',\n                    say: {\n                      text: 'Your call is working fine! This call will be disconnected.',\n                      voiceName: 'Emma'\n                    }\n                  }\n                ],\n                events: {\n                  onFinish: [{command: 'hangup'}]\n                }\n              }\n            ]\n          }\n        }\n      })\n    }\n  );\n\n  const data = await resp.json();\n  console.log(data);\n}\n\nrun();"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This code updates your service by adding static SVAML to the call behavior using the Sinch Voice API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fill-in-your-parameters-4","__idx":33},"children":["Fill in your parameters"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Before you can run the code, you need to update some more values in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Index.js"]}," file so you can connect to your Sinch account. Update the following parameters with your own values:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Your value"},"children":["Your value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["projectId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is your project ID from your dashboard."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<username>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access key you created in a previous step."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<password>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access secret for the access key."]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save the file."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"run-the-code-4","__idx":34},"children":["Run the code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can execute the code and update your service. Run the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"node index.js\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should receive a response detailing your updated service."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"call-your-sinch-number","__idx":35},"children":["Call your Sinch number"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can call the phone number you've assigned to your Voice service. The call should be answered and you'll hear a message played."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false,"icon":"/assets/java.6824af01bb61444afca5d11f38a7f067216a83a23e5eac80fd3524a7e7f4e857.83be2fd5.png"},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"handle-an-incoming-call-with-java","__idx":36},"children":["Handle an incoming call with Java"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can quickly see how the Voice API works by handling incoming calls using the API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"what-you-need-to-know-before-you-start-5","__idx":37},"children":["What you need to know before you start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you can get started, you need the following already set up:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.oracle.com/java/technologies/downloads/"},"children":["JDK 8"]}," or later and a familiarity with how to create a new Java application."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://gradle.org/install/"},"children":["Gradle"]}," and a familiarity with how use the Gradle build tools."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"set-up-your-java-application-1","__idx":38},"children":["Set up your Java application"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a new folder where you want to keep your app project. Then, open a terminal or command prompt to that location."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a new Java application using Gradle with the following command:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"gradle init\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the prompts, select that you want to create an application, name your project and source package ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app"]},", and then accept the defaults for the rest of the options."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"modify-your-file-2","__idx":39},"children":["Modify your file"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["App.java"]}," file in your project folder, located in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\\app\\scr\\main\\java\\app"]},". Populate that file code found on this page and save the file."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial uses basic authentication for testing purposes. We recommend using OAuth token-based authentication for production."]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-docs/voice-2.0/api-reference/voice.yaml","operationId":"updateService","exampleKey":"staticExample","language":"Java","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"java","title":"Java","source":"import java.net.*;\nimport java.net.http.*;\nimport java.util.*;\n\npublic class App {\n  public static void main(String[] args) throws Exception {\n    var httpClient = HttpClient.newBuilder().build();\n\n    var payload = String.join(\"\\n\"\n      , \"{\"\n      , \" \\\"description\\\": \\\"Service with static SVAML\\\",\"\n      , \" \\\"callBehavior\\\": {\"\n      , \"  \\\"type\\\": \\\"STATIC\\\",\"\n      , \"  \\\"static\\\": {\"\n      , \"   \\\"callName\\\": \\\"incoming\\\",\"\n      , \"   \\\"commands\\\": [\"\n      , \"    {\"\n      , \"     \\\"command\\\": \\\"answer\\\"\"\n      , \"    },\"\n      , \"    {\"\n      , \"     \\\"command\\\": \\\"messages\\\",\"\n      , \"     \\\"messages\\\": [\"\n      , \"      {\"\n      , \"       \\\"type\\\": \\\"SAY\\\",\"\n      , \"       \\\"say\\\": {\"\n      , \"        \\\"text\\\": \\\"Your call is working fine! This call will be disconnected.\\\",\"\n      , \"        \\\"voiceName\\\": \\\"Emma\\\"\"\n      , \"       }\"\n      , \"      }\"\n      , \"     ],\"\n      , \"     \\\"events\\\": {\"\n      , \"      \\\"onFinish\\\": [\"\n      , \"       {\"\n      , \"        \\\"command\\\": \\\"hangup\\\"\"\n      , \"       }\"\n      , \"      ]\"\n      , \"     }\"\n      , \"    }\"\n      , \"   ]\"\n      , \"  }\"\n      , \" }\"\n      , \"}\"\n    );\n\n    var host = \"https://voice.api.sinch.com\";\n    var projectId = \"YOUR_projectId_PARAMETER\";\n    var serviceId = \"YOUR_serviceId_PARAMETER\";\n    var pathname = \"/v2/projects/%7BprojectId%7D/services/%7BserviceId%7D\";\n    var request = HttpRequest.newBuilder()\n      .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(payload))\n      .uri(URI.create(host + pathname ))\n      .header(\"Content-Type\", \"application/json\")\n      .header(\"Idempotency-Key\", \"stringstringstri\")\n      .header(\"Authorization\", \"Basic \" + Base64.getEncoder().encodeToString((\"<username>:<password>\").getBytes()))\n      .build();\n\n    var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());\n\n    System.out.println(response.body());\n  }\n}"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This code updates your service by adding static SVAML to the call behavior using the Sinch Voice API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fill-in-your-parameters-5","__idx":40},"children":["Fill in your parameters"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Before you can run the code, you need to update some more values in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["App.java"]}," file so you can connect to your Sinch account. Update the following parameters with your own values:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Your value"},"children":["Your value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["projectId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is your project ID from your dashboard."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<username>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access key you created in a previous step."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<password>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access secret for the access key."]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save the file."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"run-the-code-5","__idx":41},"children":["Run the code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can execute the code and update your service. Run the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"gradle run\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should receive a response detailing your updated service."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"call-your-sinch-number-1","__idx":42},"children":["Call your Sinch number"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can call the phone number you've assigned to your Voice service. The call should be answered and you'll hear a message played."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":".NET","disable":false,"icon":"/assets/netcore.049770054476f232f2811777ca5a2d44dfaecffa6f88767c9ef4c8be6c70715d.83be2fd5.png"},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"handle-an-incoming-call-with-net","__idx":43},"children":["Handle an incoming call with .NET"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can quickly see how the Voice API works by handling incoming calls using the API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"what-you-need-to-know-before-you-start-6","__idx":44},"children":["What you need to know before you start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you can get started, you need the following already set up:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dotnet.microsoft.com/download"},"children":["The latest version of .Net Core with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Long Term Support"]}]}," and a familiarity with how to create a new console application."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"set-up-your-net-console-application-1","__idx":45},"children":["Set up your .NET console application"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a new folder where you want to keep your app project. Then, open a terminal or command prompt to that location."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a new .Net Core console app with the following command:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"dotnet new console\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"modify-your-file-3","__idx":46},"children":["Modify your file"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Program.cs"]}," file in your project folder. Replace all of the code with the following code:"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial uses basic authentication for testing purposes. We recommend using OAuth token-based authentication for production."]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-docs/voice-2.0/api-reference/voice.yaml","operationId":"updateService","exampleKey":"staticExample","language":"C#","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"csharp","title":"C#","source":"using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Text;\nusing System.Text.Json;\nusing System.Net.Http.Headers;\n\npublic class Program\n{\n  public static async Task Main()\n  {\n    System.Net.Http.HttpClient client = new()\n    {\n      DefaultRequestHeaders =\n      {\n        {\"Idempotency-Key\", \"stringstringstri\"},\n      }\n    };\n\n    string base64String = Convert.ToBase64String(Encoding.ASCII.GetBytes(\"<username>:<password>\"));\n    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(@\"Basic\", base64String);\n\n    string json = JsonSerializer.Serialize(new\n    {\n      description = \"Service with static SVAML\",\n      callBehavior = new {\n        type = \"STATIC\",\n        static = new {\n          callName = \"incoming\",\n          commands = new[] {\n            new {\n              command = \"answer\"\n            },\n            new {\n              command = \"messages\",\n              messages = new[] {\n                new {\n                  type = \"SAY\",\n                  say = new {\n                    text = \"Your call is working fine! This call will be disconnected.\",\n                    voiceName = \"Emma\"\n                  }\n                }\n              },\n              events = new {\n                onFinish = new[] {\n                  new {\n                    command = \"hangup\"\n                  }\n                },\n              }\n            }\n          },\n        }\n      }\n    });\n\n    using StringContent postData = new(json, Encoding.UTF8, \"application/json\");\n      var ProjectId = \"YOUR_projectId_PARAMETER\";\n      var ServiceId = \"YOUR_serviceId_PARAMETER\";\n    using HttpResponseMessage request = await client.PatchAsync(\"https://voice.api.sinch.com/v2/projects/\" + ProjectId + \"/services/\" + ServiceId, postData);\n    string response = await request.Content.ReadAsStringAsync();\n\n    Console.WriteLine(response);\n  }\n}"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This code updates your service by adding static SVAML to the call behavior using the Sinch Voice API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fill-in-your-parameters-6","__idx":47},"children":["Fill in your parameters"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Before you can run the code, you need to update some more values in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Program.cs"]}," file so you can connect to your Sinch account. Update the following parameters with your own values:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Your value"},"children":["Your value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ProjectId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is your project ID from your dashboard."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<username>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access key you created in a previous step."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<password>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access secret for the access key."]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save the file."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"run-the-code-6","__idx":48},"children":["Run the code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before executing your code, you must first compile your application. Execute the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"dotnet build\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can execute the code and update your Voice service. Run the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"dotnet run\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should receive a response detailing your updated service."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"call-your-sinch-number-2","__idx":49},"children":["Call your Sinch number"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can call the phone number you've assigned to your Voice service. The call should be answered and you'll hear a message played."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false,"icon":"/assets/python.b048095ba600cf4f71c73b097ca8e466d4b1a2f8cf00c2a778f2b241619362e8.83be2fd5.png"},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"handle-an-incoming-call-with-python","__idx":50},"children":["Handle an incoming call with Python"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can quickly see how the Voice API works by handling incoming calls using the API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"what-you-need-to-know-before-you-start-7","__idx":51},"children":["What you need to know before you start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you can get started, you need the following already set up:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.python.org/"},"children":["Python"]}," and a familiarity with how to create a new file."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"set-up-your-python-application-1","__idx":52},"children":["Set up your Python application"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a new file named ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["update-service.py"]}," and paste the provided code found on this page into the file."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial uses basic authentication for testing purposes. We recommend using OAuth token-based authentication for production."]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-docs/voice-2.0/api-reference/voice.yaml","operationId":"updateService","exampleKey":"staticExample","language":"Python","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"python","title":"Python","source":"import requests\n\nproject_id = \"YOUR_projectId_PARAMETER\"\nservice_id = \"YOUR_serviceId_PARAMETER\"\nurl = \"https://voice.api.sinch.com/v2/projects/\" + project_id + \"/services/\" + service_id\n\npayload = {\n  \"description\": \"Service with static SVAML\",\n  \"callBehavior\": {\n    \"type\": \"STATIC\",\n    \"static\": {\n      \"callName\": \"incoming\",\n      \"commands\": [\n        {\n          \"command\": \"answer\"\n        },\n        {\n          \"command\": \"messages\",\n          \"messages\": [\n            {\n              \"type\": \"SAY\",\n              \"say\": {\n                \"text\": \"Your call is working fine! This call will be disconnected.\",\n                \"voiceName\": \"Emma\"\n              }\n            }\n          ],\n          \"events\": {\n            \"onFinish\": [\n              {\n                \"command\": \"hangup\"\n              }\n            ]\n          }\n        }\n      ]\n    }\n  }\n}\n\nheaders = {\n  \"Content-Type\": \"application/json\",\n  \"Idempotency-Key\": \"stringstringstri\"\n}\n\nresponse = requests.patch(url, json=payload, headers=headers, auth=('<username>','<password>'))\n\ndata = response.json()\nprint(data)"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This code updates your service by adding static SVAML to the call behavior using the Sinch Voice API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fill-in-your-parameters-7","__idx":53},"children":["Fill in your parameters"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Before you can run the code, you need to update some more values in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["update-service.py"]}," file so you can connect to your Sinch account. Update the following parameters with your own values:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Your value"},"children":["Your value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["project_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is your project ID from your dashboard."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<username>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access key you created in a previous step."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<password>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access secret for the access key."]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save the file."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"run-the-code-7","__idx":54},"children":["Run the code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can execute the code and update your service. Run the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"python update-service.py\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should receive a response detailing your updated service."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"call-your-sinch-number-3","__idx":55},"children":["Call your Sinch number"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you can call the phone number you've assigned to your Voice service. The call should be answered and you'll hear a message played."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":56},"children":["Next steps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now that you know how to make an outbound call and handle an incoming call, you can start to build more complex solutions. Check out the following guides to see what you can do with Voice API v2:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/voice-2.0/tutorials/outbound-tts"},"children":["Outbound Text to speech Appointment Reminder"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/voice-2.0/tutorials/amd"},"children":["Voicemail detection and webhooks"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/voice-2.0/tutorials/voice-relay"},"children":["Agentic Voice Relay"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"additional-resources","__idx":57},"children":["Additional resources"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/voice-2.0/api-reference/voice"},"children":["View the whole API Reference"]},"."]}]},"headings":[{"value":"Getting started","id":"getting-started","depth":1},{"value":"1. Get your number","id":"1-get-your-number","depth":2},{"value":"2. Get your credentials","id":"2-get-your-credentials","depth":2},{"value":"3. Assign your number","id":"3-assign-your-number","depth":2},{"value":"4. Make a call","id":"4-make-a-call","depth":2},{"value":"Make a call with Node.js","id":"make-a-call-with-nodejs","depth":3},{"value":"What you need to know before you start","id":"what-you-need-to-know-before-you-start","depth":4},{"value":"Set up your Node.js application","id":"set-up-your-nodejs-application","depth":4},{"value":"Create your file","id":"create-your-file","depth":4},{"value":"Fill in your parameters","id":"fill-in-your-parameters","depth":4},{"value":"Run the code","id":"run-the-code","depth":4},{"value":"Make a call with Java","id":"make-a-call-with-java","depth":3},{"value":"What you need to know before you start","id":"what-you-need-to-know-before-you-start-1","depth":4},{"value":"Set up your Java application","id":"set-up-your-java-application","depth":4},{"value":"Modify your file","id":"modify-your-file","depth":4},{"value":"Fill in your parameters","id":"fill-in-your-parameters-1","depth":4},{"value":"Run the code","id":"run-the-code-1","depth":4},{"value":"Make a call with .NET","id":"make-a-call-with-net","depth":3},{"value":"What you need to know before you start","id":"what-you-need-to-know-before-you-start-2","depth":4},{"value":"Set up your .NET console application","id":"set-up-your-net-console-application","depth":4},{"value":"Modify your file","id":"modify-your-file-1","depth":4},{"value":"Fill in your parameters","id":"fill-in-your-parameters-2","depth":4},{"value":"Run the code","id":"run-the-code-2","depth":4},{"value":"Make a call with Python","id":"make-a-call-with-python","depth":3},{"value":"What you need to know before you start","id":"what-you-need-to-know-before-you-start-3","depth":4},{"value":"Set up your Python application","id":"set-up-your-python-application","depth":4},{"value":"Fill in your parameters","id":"fill-in-your-parameters-3","depth":4},{"value":"Run the code","id":"run-the-code-3","depth":4},{"value":"5. Handle an incoming call","id":"5-handle-an-incoming-call","depth":2},{"value":"Handle an incoming call with Node.js","id":"handle-an-incoming-call-with-nodejs","depth":3},{"value":"What you need to know before you start","id":"what-you-need-to-know-before-you-start-4","depth":4},{"value":"Set up your Node.js application","id":"set-up-your-nodejs-application-1","depth":4},{"value":"Create your file","id":"create-your-file-1","depth":4},{"value":"Fill in your parameters","id":"fill-in-your-parameters-4","depth":4},{"value":"Run the code","id":"run-the-code-4","depth":4},{"value":"Call your Sinch number","id":"call-your-sinch-number","depth":4},{"value":"Handle an incoming call with Java","id":"handle-an-incoming-call-with-java","depth":3},{"value":"What you need to know before you start","id":"what-you-need-to-know-before-you-start-5","depth":4},{"value":"Set up your Java application","id":"set-up-your-java-application-1","depth":4},{"value":"Modify your file","id":"modify-your-file-2","depth":4},{"value":"Fill in your parameters","id":"fill-in-your-parameters-5","depth":4},{"value":"Run the code","id":"run-the-code-5","depth":4},{"value":"Call your Sinch number","id":"call-your-sinch-number-1","depth":4},{"value":"Handle an incoming call with .NET","id":"handle-an-incoming-call-with-net","depth":3},{"value":"What you need to know before you start","id":"what-you-need-to-know-before-you-start-6","depth":4},{"value":"Set up your .NET console application","id":"set-up-your-net-console-application-1","depth":4},{"value":"Modify your file","id":"modify-your-file-3","depth":4},{"value":"Fill in your parameters","id":"fill-in-your-parameters-6","depth":4},{"value":"Run the code","id":"run-the-code-6","depth":4},{"value":"Call your Sinch number","id":"call-your-sinch-number-2","depth":4},{"value":"Handle an incoming call with Python","id":"handle-an-incoming-call-with-python","depth":3},{"value":"What you need to know before you start","id":"what-you-need-to-know-before-you-start-7","depth":4},{"value":"Set up your Python application","id":"set-up-your-python-application-1","depth":4},{"value":"Fill in your parameters","id":"fill-in-your-parameters-7","depth":4},{"value":"Run the code","id":"run-the-code-7","depth":4},{"value":"Call your Sinch number","id":"call-your-sinch-number-3","depth":4},{"value":"Next steps","id":"next-steps","depth":2},{"value":"Additional resources","id":"additional-resources","depth":2}],"frontmatter":{"seo":{"title":"Getting started | Voice API v2 | Sinch","description":"Get started with Voice API v2."},"markdown":{"toc":{"header":"Test","depth":2}},"disableRating":true,"steps":[{"title":"Step 1","description":"Get your number","icon":"device","link":"#1-get-your-number"},{"title":"Step 2","description":"Get your credentials","icon":"check","link":"#2-get-your-credentials"},{"title":"Step 3","description":"Assign your number","icon":"device","link":"#3-assign-your-number"},{"title":"Step 4","description":"Make a call","icon":"pointer","link":"#4-make-a-call"},{"title":"Step 5","description":"Handle an incoming call","icon":"pointer","link":"#5-handle-an-incoming-call"}]},"lastModified":"2026-08-31T20:08:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/voice-2.0/getting-started","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}