<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article What is a callback in the Sinch Voice world? in Voice API</title>
    <link>https://community.sinch.com/t5/Voice-API/What-is-a-callback-in-the-Sinch-Voice-world/ta-p/10250</link>
    <description>&lt;H2 class="lia-message-template-symptoms-zone"&gt;What’s a callback?&lt;/H2&gt;
&lt;DIV class="lia-message-template-solution-zone"&gt;
&lt;P&gt;When using the Sinch Voice platform in many use cases a callback server will be required to control the flow of a call.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Why do I need a callback server?&lt;/H2&gt;
&lt;P&gt;This is for you to be able to have control over certain elements, such as: authorising calls, routing calls, setting a cli (calling line identifier) to the receiving user.&amp;nbsp; It is mandatory to have a callback server for calling a PSTN destination&lt;/P&gt;
&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;
&lt;H2&gt;What do I need to implement a callback server?&lt;/H2&gt;
&lt;P&gt;You will need an application server that can parse incoming HTTP POST requests and return HTTP POST responses with SVAML commands (json) in the HTTP body.&amp;nbsp; Some example callback severs can be found here: &lt;A href="https://github.com/sinch/voice-samples" target="_blank" rel="noopener"&gt;Sinch Github voice samples&lt;/A&gt; or for simple testing you can use a service such as &lt;A href="https://webhook.site" target="_blank" rel="noopener"&gt;https://webhook.site&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Where do I configure my callback server URL?&lt;/H2&gt;
&lt;P&gt;You configure your application server URL in the Sinch Dashboard Voice &amp;amp; Video -&amp;gt; Apps -&amp;gt; In-app Voice &amp;amp; Video SDKs -&amp;gt; Callback URL.&lt;/P&gt;
&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;
&lt;H2&gt;What is SVAML?&lt;/H2&gt;
&lt;P&gt;SVAML is a call control markup language developed by Sinch. When your application or server receives a&amp;nbsp;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callback-API/" target="_blank" rel="noopener"&gt;callback event&lt;/A&gt;&amp;nbsp;from the Sinch &lt;SPAN&gt;Voice&lt;/SPAN&gt; platform, it can respond with a&amp;nbsp;&lt;EM&gt;SVAML object&lt;/EM&gt;&amp;nbsp;to control the voice call. &lt;SPAN&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/svaml/" target="_blank" rel="noopener"&gt;https://developers.sinch.com/docs/voice/api-reference/svaml/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;What are the call events you send?&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callback-API/#tag/Callback-API/operation/ice" target="_self"&gt;ICE&lt;/A&gt; (Incoming Call Event)&amp;nbsp; A call has been initiated, what action do you want to take?&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callback-API/#tag/Callback-API/operation/ace" target="_self"&gt;ACE&lt;/A&gt; (Answered Call Event). Callback triggered by an the callee answering&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callback-API/#tag/Callback-API/operation/pie" target="_self"&gt;PIE&lt;/A&gt; (Prompt Input Event). Callback triggered by a runMenu action.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callback-API/#tag/Callback-API/operation/dice" target="_self"&gt;DICE&lt;/A&gt; (Disconnect Call Event) The call has ended, here is the summary.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;
&lt;H2&gt;Callback Diagram&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;The figure below illustrates the lifecycle of a call and shows where both callbacks and REST API calls are located or can be made.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2022-11-16 at 09.37.49.png" style="width: 862px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/2280iCF7B2B41E70C826E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-11-16 at 09.37.49.png" alt="Screenshot 2022-11-16 at 09.37.49.png" /&gt;&lt;/span&gt;&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Developer documentation related to callbacks:&amp;nbsp;&amp;nbsp;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/callbacks" target="_blank" rel="noopener"&gt;https://developers.sinch.com/docs/voice/api-reference/callbacks&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 16 Nov 2022 15:25:55 GMT</pubDate>
    <dc:creator>Roland_Ian</dc:creator>
    <dc:date>2022-11-16T15:25:55Z</dc:date>
    <item>
      <title>What is a callback in the Sinch Voice world?</title>
      <link>https://community.sinch.com/t5/Voice-API/What-is-a-callback-in-the-Sinch-Voice-world/ta-p/10250</link>
      <description>&lt;H2 class="lia-message-template-symptoms-zone"&gt;What’s a callback?&lt;/H2&gt;
&lt;DIV class="lia-message-template-solution-zone"&gt;
&lt;P&gt;When using the Sinch Voice platform in many use cases a callback server will be required to control the flow of a call.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Why do I need a callback server?&lt;/H2&gt;
&lt;P&gt;This is for you to be able to have control over certain elements, such as: authorising calls, routing calls, setting a cli (calling line identifier) to the receiving user.&amp;nbsp; It is mandatory to have a callback server for calling a PSTN destination&lt;/P&gt;
&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;
&lt;H2&gt;What do I need to implement a callback server?&lt;/H2&gt;
&lt;P&gt;You will need an application server that can parse incoming HTTP POST requests and return HTTP POST responses with SVAML commands (json) in the HTTP body.&amp;nbsp; Some example callback severs can be found here: &lt;A href="https://github.com/sinch/voice-samples" target="_blank" rel="noopener"&gt;Sinch Github voice samples&lt;/A&gt; or for simple testing you can use a service such as &lt;A href="https://webhook.site" target="_blank" rel="noopener"&gt;https://webhook.site&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Where do I configure my callback server URL?&lt;/H2&gt;
&lt;P&gt;You configure your application server URL in the Sinch Dashboard Voice &amp;amp; Video -&amp;gt; Apps -&amp;gt; In-app Voice &amp;amp; Video SDKs -&amp;gt; Callback URL.&lt;/P&gt;
&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;
&lt;H2&gt;What is SVAML?&lt;/H2&gt;
&lt;P&gt;SVAML is a call control markup language developed by Sinch. When your application or server receives a&amp;nbsp;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callback-API/" target="_blank" rel="noopener"&gt;callback event&lt;/A&gt;&amp;nbsp;from the Sinch &lt;SPAN&gt;Voice&lt;/SPAN&gt; platform, it can respond with a&amp;nbsp;&lt;EM&gt;SVAML object&lt;/EM&gt;&amp;nbsp;to control the voice call. &lt;SPAN&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/svaml/" target="_blank" rel="noopener"&gt;https://developers.sinch.com/docs/voice/api-reference/svaml/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;What are the call events you send?&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callback-API/#tag/Callback-API/operation/ice" target="_self"&gt;ICE&lt;/A&gt; (Incoming Call Event)&amp;nbsp; A call has been initiated, what action do you want to take?&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callback-API/#tag/Callback-API/operation/ace" target="_self"&gt;ACE&lt;/A&gt; (Answered Call Event). Callback triggered by an the callee answering&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callback-API/#tag/Callback-API/operation/pie" target="_self"&gt;PIE&lt;/A&gt; (Prompt Input Event). Callback triggered by a runMenu action.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callback-API/#tag/Callback-API/operation/dice" target="_self"&gt;DICE&lt;/A&gt; (Disconnect Call Event) The call has ended, here is the summary.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;
&lt;H2&gt;Callback Diagram&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;The figure below illustrates the lifecycle of a call and shows where both callbacks and REST API calls are located or can be made.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2022-11-16 at 09.37.49.png" style="width: 862px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/2280iCF7B2B41E70C826E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-11-16 at 09.37.49.png" alt="Screenshot 2022-11-16 at 09.37.49.png" /&gt;&lt;/span&gt;&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Developer documentation related to callbacks:&amp;nbsp;&amp;nbsp;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/callbacks" target="_blank" rel="noopener"&gt;https://developers.sinch.com/docs/voice/api-reference/callbacks&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 16 Nov 2022 15:25:55 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Voice-API/What-is-a-callback-in-the-Sinch-Voice-world/ta-p/10250</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2022-11-16T15:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: What is a callback in the Sinch Voice world?</title>
      <link>https://community.sinch.com/t5/Voice-API/What-is-a-callback-in-the-Sinch-Voice-world/tac-p/11278#M20</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I created an account and obtained a demo number using a test app.&amp;nbsp; I completed the setup of a sample from &lt;/SPAN&gt;&lt;A href="https://github.com/sinch/voice-api-webhook-nodejs" target="_new"&gt;https://github.com/sinch/voice-api-webhook-nodejs.&lt;/A&gt;&lt;SPAN&gt; Then, on the 'apps-&amp;gt;settings' page, upon clicking 'Test a callback URL', I received an error 400. Additionally, there seems to be an issue with the GET method in the code. Could someone please guide me in resolving these issues?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 08:30:44 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Voice-API/What-is-a-callback-in-the-Sinch-Voice-world/tac-p/11278#M20</guid>
      <dc:creator>tulsiwdv</dc:creator>
      <dc:date>2023-04-03T08:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: What is a callback in the Sinch Voice world?</title>
      <link>https://community.sinch.com/t5/Voice-API/What-is-a-callback-in-the-Sinch-Voice-world/tac-p/11282#M21</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A id="link_11" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.sinch.com/t5/user/viewprofilepage/user-id/3429" target="_self" aria-label="View Profile of tulsiwdv"&gt;&lt;SPAN class=""&gt;tulsiwdv&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for using our code samples!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There was a missing&amp;nbsp;&lt;FONT face="terminal,monaco"&gt;req&lt;/FONT&gt; parameter in&amp;nbsp; the &lt;FONT face="terminal,monaco"&gt;app.get&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please clone the repo again, to receive the fix, or make this change to get the GET function to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;From&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;app.get('/', (res) =&amp;gt; {
res.send('GET Pong!');
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;app.get('/', (req, res) =&amp;gt; {
res.send('GET Pong!');
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest to look in your ngrok you will see the 200OK&amp;nbsp; arriving even thought he dashboard reports 400 error&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-04-03 at 12.36.04.png" style="width: 385px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/2953i9FD1D869D05C5D56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-04-03 at 12.36.04.png" alt="Screenshot 2023-04-03 at 12.36.04.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let us know how you proceed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Roland-Ian&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 10:40:30 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Voice-API/What-is-a-callback-in-the-Sinch-Voice-world/tac-p/11282#M21</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-04-03T10:40:30Z</dc:date>
    </item>
  </channel>
</rss>

