Ring out issue

  • 1
  • Question
  • Updated 2 years ago
  • Answered
We are trying to integrate our internal database with the API so our employees can one-click dial.  I can get the two-legged ring out to work, but it ALWAYS calls the customer's number first no matter if I enter it in the 'from' or 'to' fields.  Are we doing something wrong?
Photo of Larry Durbin

Larry Durbin

  • 90 Points 75 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Benjamin Dean

Benjamin Dean

  • 8,602 Points 5k badge 2x thumb
Hey Larry,

How are you implementing the RingOut code please?

Could you provide it here so I might help you further with this?

If you wanted a quick path forward, you could use the URI Scheme RingOut. This would expect the agent/operator to have RingCentral open and the agent/operator to be authenticated and available.

Here is a tutorial for using the URI Scheme: http://ringcentral.github.io/tutorial/#making-calls-uri-scheme
Photo of Larry Durbin

Larry Durbin

  • 90 Points 75 badge 2x thumb

Hi Benjamin,

We are using the HTTP Post as we need the call to be originated from our employees actual phone (we have had poor performance with the soft phones).

POST /restapi/v1.0/account/~/extension/~/ringout
Content-Type: application/json
Authorization: Bearer <access-token>
{ "from": {"phoneNumber": "13444444"},
"to": {"phoneNumber": "13453443434"},
}

Photo of Benjamin Dean

Benjamin Dean

  • 8,602 Points 5k badge 2x thumb
I'll look into this further today and let you know if I can find out how to define call-leg order by the end of the day.

In the meantime, when you say "We have had poor performance with the soft phones", could you provide some more detailed information and use-case data please? Having this information will help us to identify any possible issues and hopefully to get them resolved. Thanks. :)
Photo of Benjamin Dean

Benjamin Dean

  • 8,602 Points 5k badge 2x thumb
So I tried this and ran into the same issue you did using RingOut, the non-RC number is always dialed first. I've reached out to our engineering team to see if there is a way to define the call-leg-ordering (or to see if I'm missing something here since I too would expect the "from" to be dialed before the "to").

Will report my findings as soon as I have more information.
Photo of Benjamin Dean

Benjamin Dean

  • 8,602 Points 5k badge 2x thumb
I have the answer to the API RingOut issue for establishing the call legs in the order you want, there are two ways (with / without) using the prompt...

To make a RingOut with the 1st leg of the call starting with the "from.phoneNumber", and 2nd leg of call with "to.phoneNumber", here is the request you would make (this WILL prompt the 1st leg of the call to connect to.phoneNumber):

curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" -d "{\"from\":{\"phoneNumber\":\"REPLACE_WITH_YOUR_RING_CENTRAL_USER_NUMBER\",\"forwardingNumberId\":\"\"},\"to\":{\"phoneNumber\":\"REPLACE_WITH_YOUR_DESTINATION_NUMBER\"},\"callerId\":{\"phoneNumber\":\"\"},\"playPrompt\":false,\"country\":{\"id\":\"\"}}" "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/ringout";


To make a RingOut with the 1st leg of the call starting with the "from.phoneNumber", and 2nd leg of call with "to.phoneNumber", here is the request you would make (this will NOT prompt the 1st leg of the call to connect to.phoneNumber):

curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" -d "{\"from\":{\"phoneNumber\":\"REPLACE_WITH_YOUR_RING_CENTRAL_USER_NUMBER\",\"forwardingNumberId\":\"\"},\"to\":{\"phoneNumber\":\"REPLACE_WITH_YOUR_DESTINATION_NUMBER\"},\"callerId\":{\"phoneNumber\":\"\"},\"playPrompt\":true,\"country\":{\"id\":\"\"}}" "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/ringout";

How I resolved my issues making RingOut from authenticated soft phone users via the API

Now, I too was having some issues with my soft phone(s). I figured out what the problem with my account was that prevented me from being able to initiate these calls.

If you look in your Online Account Portal (service.devtest.ringcentral.com) => Phone System => Phones & Devices you can see a list of all the phones (and soft phones) in your account; you can see under each soft phone if there is an authorized computer (the little PC: <hostname>) in the bottom right of each soft phone number's listing.

I had multiple users all competing with the same PC: <hostname> authorization value, and that meant when I logged in as different users on my account to test this (using the API), I kept receiving errors with the RingOut.

So I looked in Online Account Portal => Call Log, and I saw the error message "IP Phone is offline"...but I was logged in...what the?!

That is when I realized that I had to deauthorize all of the users which shared the same hostname value, log out of the soft phone, log back into the soft phone, wait for the e911 prompt (which authorizes your computer for use with that soft phone), and then I saw the right status for the phone number and was able to initiate the RingOut using the API as expected.

Please let me know if this is the issue you experienced, and if this helped you resolve it.

Benjamin
Photo of Larry Durbin

Larry Durbin

  • 90 Points 75 badge 2x thumb

Hi Benjamin,

Here's what I am sending:

{"from":{"phoneNumber":"RingCentralNumber","forwardingNumberId":""},"to":{"phoneNumber":"Destination Number"},"callerId":{"phoneNumber":""},"playPrompt":true,"country":{"id":""}}"

It rings my phone first and then pays a recording "I'm sorry. I cannot hear you.  Goodbye." and then disconnects the call.


Photo of Benjamin Dean

Benjamin Dean

  • 8,582 Points 5k badge 2x thumb
Have you tried setting the playPrompt property to false? When I did this, the call went right through without issue.

Also, have you made sure your audio configurations are accurate?

Could you provide me the Call Log data from your Online Account Portal for these test calls you're placing through the API please sir?