question

larry-durbin1250 avatar image
larry-durbin1250 asked benjamin-dean commented

Ring out issue

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?

ringout
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image
benjamin-dean answered
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
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

larry-durbin1250 avatar image
larry-durbin1250 answered

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"},
}

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image
benjamin-dean answered
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. :)
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image
benjamin-dean answered
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.
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image
benjamin-dean answered
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
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

larry-durbin1250 avatar image
larry-durbin1250 answered benjamin-dean commented

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.


1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image benjamin-dean commented ·
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?
0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys