cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't do outbound call via SInchClient

leyk
Contributor

Hello. I'm trying the app-to-phone sample.

 

Call disconnected immediately and got this response:

 

POST
https://ocra.api.sinch.com/ocra/v2/calls
[HTTP/2 500 Internal Server Error 181ms]


error Object { code: 500, message: "Unable to connect call", reference: "dbec3c22-aec7-4dd5-b758-312210e9c7cf" }

 

I put my app key and secret to their respective inputs. I use my firstname as userId. I use my virtual number(UK) as caller identifier and use my verified phone number(PH) to be called.

 

How to fix this? Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Leyk!

 

Please see my amended solution above about adding the number you are calling to the verified numbers section in your account.

 

Summary

I looking in your logs and the number you are dialing is not listed in your verified numbers:  https://dashboard.sinch.com/numbers/verified-numbers.

 

If you add that destination number and verify it is yours you can make a call to it.

 

Whilst you are using our free test number, any numbers you dial to must be added to the verified numbers or the call will not work. 

 

Once you have added  credit you will be able  to call any destination. 

 

This restriction only exists whilst you have a test number.

 

 

Roland-Ian Clothier, Developer Support Engineer

View solution in original post

4 REPLIES 4

Roland_Ian
Employee
Employee

Hi

 

I looking in your logs and the number you are dialing is not listed in your verified numbers:  https://dashboard.sinch.com/numbers/verified-numbers.

 

If you add that destination number and verify it is yours you can make a call to it.

 

Whilst you are using our free test number, any numbers you dial to must be added to the verified numbers or the call will not work. 

 

Once you have added  credit you will be able  to call any destination. 

 

This restriction only exists whilst you have a test number.

 

 

To summarise

The To number must be your verified number or a valid to number if you have purchased a number 

The From number must be your virtual number, either the test number we gave you for starting to test, or a purchased number.

Running the demo to verify

Run the sinch demo from a webserver as outlined in the github README.md

https://github.com/sinch/rtc-reference-applications/tree/master/javascript#running-locally

 

Select PHONE call after inputting your application key, secret and user id.

 

Screenshot 2023-05-11 at 20.42.47.png

 

Once you have logged in you will be able to input your caller identifier (Cli) then the sinch client will start.

 

Screenshot 2023-05-11 at 20.47.05.png

 

Once you have done this, press START and the phone dialler will be available to make the. call (you can also type the number in if you wish).

 

Screenshot 2023-05-11 at 20.49.37.png

 

When you are done, press the CALL button

Your InApp to PSTN call should connect.

 

Roland-Ian Clothier, Developer Support Engineer

leyk
Contributor

The name that is in the 'From' is my userId. Why the client doesn't use my caller identifier?

The client does this:

"From":"userId", "To":"+123456789"

The client should do this

"From":"callerIdentifier", "To":"+123456789"

 

I tried to put my virtual number prefixed with '+' in the userId textfield and I got an error because '+' is not allowed in a userId text according to this article. I tried removing the '+' and still didn't work. 'cause number should have a '+' prefix. You could see my attempts in my call logs.

 

I put my virtual number in the 'call-identifier' textfield. However, it seems like the client is using the characters in the 'userId' textfield instead of the characters in 'call-identifier' textfield.

Hi Leyk!

 

Please see my amended solution above about adding the number you are calling to the verified numbers section in your account.

 

Summary

I looking in your logs and the number you are dialing is not listed in your verified numbers:  https://dashboard.sinch.com/numbers/verified-numbers.

 

If you add that destination number and verify it is yours you can make a call to it.

 

Whilst you are using our free test number, any numbers you dial to must be added to the verified numbers or the call will not work. 

 

Once you have added  credit you will be able  to call any destination. 

 

This restriction only exists whilst you have a test number.

 

 

Roland-Ian Clothier, Developer Support Engineer

Thanks for details answer, It also help my querry.