<?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>topic Re: Cannot create SinchClient instance and how to create phone-to-app voice call in Discussion Forum</title>
    <link>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/12697#M320</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have tested the following and this produces ACE and DICE towards my backend&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
"method": "conferenceCallout",
"conferenceCallout": {
"cli": "+46XXXXXXXXX",
"destination": { "type": "number", "endpoint": "46XXXXXXXX" },
"domain": "pstn",
"custom": "conf_test",
"conferenceId":"conf_test",
"moh": "ring2",
"enableAce": true,
"enableDice": true
}
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;Resulting in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Mon, 02 Oct 2023 13:27:27 GMT   Body:    {
  event: 'ace',
  callid: 'XXXXXX-b4ef-4a67-8813-XXXXXXXX',
  timestamp: '2023-10-02T13:27:27Z',
  version: 1,
  custom: 'conf_test',
  applicationKey: 'XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
}

Mon, 02 Oct 2023 13:27:40 GMT   Body:    {
  event: 'dice',
  callid: 'XXXXXX-b4ef-4a67-8813-XXXXXXXX',
  timestamp: '2023-10-02T13:27:40Z',
  reason: 'CALLERHANGUP',
  result: 'ANSWERED',
  version: 1,
  custom: 'conf_test',
  debit: { currencyId: 'USD', amount: 0.293 },
  userRate: { currencyId: 'USD', amount: 0.293 },
  to: { type: 'number', endpoint: '46XXXXXXXX' },
  applicationKey: 'XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
  duration: 13,
  from: '46XXXXXXX'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you confirm you can see any incoming HTTP traffic towards your application server?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is the URL correct / present in the dashboard against the application you are using (has it been accidentally applied to another application you have?)&lt;/P&gt;
&lt;P&gt;Voice -&amp;gt; Apps -&amp;gt; Settings -&amp;gt; Callback URL.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2023 14:21:07 GMT</pubDate>
    <dc:creator>Roland_Ian</dc:creator>
    <dc:date>2023-10-02T14:21:07Z</dc:date>
    <item>
      <title>Cannot create SinchClient instance and how to create phone-to-app voice call</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11496#M163</link>
      <description>&lt;P&gt;I have a problem with SInchClient. Everytime I instantiate a new instance of SinchClient, I get this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Response { type: "cors", url: "https://ocra.api.sinch.com/ocra/v2/applications/.../instances", redirected: false, status: 400, ok: false, statusText: "Bad Request", headers: Headers(2), body: ReadableStream, bodyUsed: false }
​
body: ReadableStream { locked: false }
​
bodyUsed: false
​
headers: Headers { "content-length" → "211", "content-type" → "application/json" }
​
ok: false
​
redirected: false
​
status: 400
​
statusText: "Bad Request"
​
type: "cors"
​
url: "https://ocra.api.sinch.com/ocra/v2/applications/..../instances"
​
&amp;lt;prototype&amp;gt;: ResponsePrototype { clone: clone(), arrayBuffer: arrayBuffer(), blob: blob(), … }
sinch-rtc-min.js:2:460086

{
      "message": "Unable to create instance!",
      "code": 500,
      "domain": 2
}&lt;/PRE&gt;&lt;P&gt;I followed this tutorial: &lt;A href="https://developers.sinch.com/docs/in-app-calling/getting-started/javascript/create-app/" target="_blank" rel="nofollow noopener noreferrer"&gt;Getting started with Sinch In-app Calling for JavaScript SDK&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I also test this &lt;A href="https://github.com/sinch/rtc-reference-applications/tree/master/javascript" target="_blank" rel="nofollow noopener noreferrer"&gt;samples&lt;/A&gt; on my machine and got the same error. Is there a way to fix this? Also, follow-up question. How to call an app in browser using a phone? In the samples above, there's only browser-to-phone call sample.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2023 01:37:13 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11496#M163</guid>
      <dc:creator>leyk</dc:creator>
      <dc:date>2023-04-29T01:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create SinchClient instance and how to create phone-to-app voice call</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11498#M164</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry to hear you are having issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error is usually triggered if you have not used&amp;nbsp;the correct username format when you start the Sinch client. (It must be in base64 urlsafe format)&lt;/P&gt;&lt;P&gt;Please see here:&amp;nbsp;&lt;A href="https://developers.sinch.com/docs/in-app-calling/js/miscellaneous/#restrictions-on-user-ids" target="_blank"&gt;https://developers.sinch.com/docs/in-app-calling/js/miscellaneous/#restrictions-on-user-ids&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Change to the recommended format and try again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2023 18:23:16 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11498#M164</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-04-29T18:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create SinchClient instance and how to create phone-to-app voice call</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11499#M165</link>
      <description>&lt;P&gt;Thanks. It works now. My next problem is how to call my web app using my phone. This &lt;A title="sample" href="https://github.com/sinch/rtc-reference-applications/tree/master/javascript/samples/numbercall" target="_self"&gt;sample&lt;/A&gt; only demonstrates how to call a phone using a web app. Could you give me a procedure on how to call my app using a phone? Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2023 22:54:12 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11499#M165</guid>
      <dc:creator>leyk</dc:creator>
      <dc:date>2023-04-29T22:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create SinchClient instance and how to create phone-to-app voice call</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11501#M166</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You cannot call an InApp SDK client directly, however you can use the Calling API ConferenceCallout to invite the InApp client to a conference as well as a phone (PSTN) participant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can test this immediately with our github php API client conference sample here:&amp;nbsp;&lt;A href="https://github.com/sinch/voice-api-php" target="_blank"&gt;https://github.com/sinch/voice-api-php&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Be sure to change the destination type to username and the endpoint to the InApp client username.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are more samples at the page below in the "Add a participant to a conference" in:&lt;/P&gt;
&lt;UL class="sc-eFegNN sc-dUbtfd KEEQo ovrQq" role="tablist"&gt;
&lt;LI id="react-tabs-64" class="sc-fmBCVi sc-htJRVC ezTlGn dNJAjO react-tabs__tab--selected" tabindex="0" role="tab" aria-selected="true" aria-disabled="false" aria-controls="react-tabs-65"&gt;Node.js&lt;/LI&gt;
&lt;LI id="react-tabs-66" class="sc-fmBCVi sc-htJRVC ezTlGn dNJAjO" role="tab" aria-selected="false" aria-disabled="false" aria-controls="react-tabs-67"&gt;C#&lt;/LI&gt;
&lt;LI id="react-tabs-68" class="sc-fmBCVi sc-htJRVC ezTlGn dNJAjO" role="tab" aria-selected="false" aria-disabled="false" aria-controls="react-tabs-69"&gt;Java&lt;/LI&gt;
&lt;LI id="react-tabs-70" class="sc-fmBCVi sc-htJRVC ezTlGn dNJAjO" role="tab" aria-selected="false" aria-disabled="false" aria-controls="react-tabs-71"&gt;Python&lt;/LI&gt;
&lt;LI id="react-tabs-72" class="sc-fmBCVi sc-htJRVC ezTlGn dNJAjO" role="tab" aria-selected="false" aria-disabled="false" aria-controls="react-tabs-73"&gt;curl&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;A href="https://developers.sinch.com/docs/voice/api-reference/voice/tag/Conferences/#tag/Conferences/operation/Callouts!path=conferenceCallout&amp;amp;t=request" target="_blank"&gt;https://developers.sinch.com/docs/voice/api-reference/voice/tag/Conferences/#tag/Conferences/operation/Callouts!path=conferenceCallout&amp;amp;t=request&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 12:55:27 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11501#M166</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-04-30T12:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create SinchClient instance and how to create phone-to-app voice call</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11502#M167</link>
      <description>&lt;P&gt;Thanks for the response. Is it possible to handle incoming calls using a callback in my back-end? This &lt;A href="https://developers.sinch.com/docs/voice/getting-started/node/incoming-call/" target="_self"&gt;example&lt;/A&gt; only demonstrates a text-to-speech call. I'm wondering if I can just call my virtual number using my phone and then my callback handles the call and connect my phone to my web application. Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 16:30:57 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11502#M167</guid>
      <dc:creator>leyk</dc:creator>
      <dc:date>2023-04-30T16:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create SinchClient instance and how to create phone-to-app voice call</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11503#M168</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can respond with a SVAML connectConf for the incoming PSTN and using the Voice / Calling API ConferenceCallout using to add the InApp client to the same conference.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Regions&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Please be aware both participants must be in the same region for conferences to work. (&lt;A href="https://developers.sinch.com/docs/voice/api-reference/#endpoints" target="_blank"&gt;https://developers.sinch.com/docs/voice/api-reference/#endpoints&lt;/A&gt;).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they are in different regions using the Global redirect URL, then you will have to be specific in the region you state in the SDK API URL and the Voice Calling API URL.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.sinch.com/docs/in-app-calling/overview/#sinch-in-app-global--regional-hostnamesendpoints" target="_blank"&gt;https://developers.sinch.com/docs/in-app-calling/overview/#sinch-in-app-global--regional-hostnamesendpoints&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a sample callback server on our github page in nodejs for experimentation purposes&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sinch/voice-api-webhook-nodejs," target="_blank"&gt;https://github.com/sinch/voice-api-webhook-nodejs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You could use an Axios client to do the callout in the "ice" case statement to achieve ConferenceCallout.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 14:40:39 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/11503#M168</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-05-01T14:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create SinchClient instance and how to create phone-to-app voice call</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/12694#M319</link>
      <description>&lt;P&gt;Hello, Roland_Ian&lt;BR /&gt;I have a problem with &lt;SPAN&gt;ConferenceCallout request.&amp;nbsp;I specify the following parameters: enableAce and enableDice, but they don't work. I don't receive webhooks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 13:05:27 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/12694#M319</guid>
      <dc:creator>valentinpazushko</dc:creator>
      <dc:date>2023-10-02T13:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create SinchClient instance and how to create phone-to-app voice call</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/12697#M320</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have tested the following and this produces ACE and DICE towards my backend&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
"method": "conferenceCallout",
"conferenceCallout": {
"cli": "+46XXXXXXXXX",
"destination": { "type": "number", "endpoint": "46XXXXXXXX" },
"domain": "pstn",
"custom": "conf_test",
"conferenceId":"conf_test",
"moh": "ring2",
"enableAce": true,
"enableDice": true
}
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;Resulting in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Mon, 02 Oct 2023 13:27:27 GMT   Body:    {
  event: 'ace',
  callid: 'XXXXXX-b4ef-4a67-8813-XXXXXXXX',
  timestamp: '2023-10-02T13:27:27Z',
  version: 1,
  custom: 'conf_test',
  applicationKey: 'XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
}

Mon, 02 Oct 2023 13:27:40 GMT   Body:    {
  event: 'dice',
  callid: 'XXXXXX-b4ef-4a67-8813-XXXXXXXX',
  timestamp: '2023-10-02T13:27:40Z',
  reason: 'CALLERHANGUP',
  result: 'ANSWERED',
  version: 1,
  custom: 'conf_test',
  debit: { currencyId: 'USD', amount: 0.293 },
  userRate: { currencyId: 'USD', amount: 0.293 },
  to: { type: 'number', endpoint: '46XXXXXXXX' },
  applicationKey: 'XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
  duration: 13,
  from: '46XXXXXXX'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you confirm you can see any incoming HTTP traffic towards your application server?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is the URL correct / present in the dashboard against the application you are using (has it been accidentally applied to another application you have?)&lt;/P&gt;
&lt;P&gt;Voice -&amp;gt; Apps -&amp;gt; Settings -&amp;gt; Callback URL.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 14:21:07 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/12697#M320</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-10-02T14:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create SinchClient instance and how to create phone-to-app voice call</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/12700#M322</link>
      <description>&lt;P&gt;Perhaps the problem is that I'm using the username in the destination?&lt;BR /&gt;I created a new thread, I suggest moving the discussion&amp;nbsp;&lt;A href="https://community.sinch.com/t5/Discussion-Forum/I-have-an-issue-with-conferenceCallout-enableAce-and-enableDice/td-p/12698" target="_self"&gt;there&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 14:33:37 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/Cannot-create-SinchClient-instance-and-how-to-create-phone-to/m-p/12700#M322</guid>
      <dc:creator>valentinpazushko</dc:creator>
      <dc:date>2023-10-02T14:33:37Z</dc:date>
    </item>
  </channel>
</rss>

