Caller Id parameter ignored when using the RingOut API

  • 2
  • Problem
  • Updated 5 months ago
  • Solved
  • (Edited)
We are trying to set the outbound callerid number using the RingOut API.  If I view my user record directly in RingCentral I can change the caller id number under RingOut from Web and that works fine.

The issue I'm having is that I'd really love to be able to set it dynamically, and I was excited to see that the RingOut API documentation clearly states that there is a Clid parameter for setting it.  Unfortunately, that parameter seems to get ignored.  Am I missing something?
Photo of Todd

Todd

  • 60 Points
  • frustrated

Posted 3 years ago

  • 2
Photo of VB

VB, Official Rep

  • 1,410 Points 1k badge 2x thumb
Can you raise a ticket by mailing at devsupport@ringcentral.com or open a case at Support and FAQs  on developer portal? 
(Edited)
Photo of Brian Keaney

Brian Keaney

  • 60 Points
Todd, did you solve this? I'm looking to set something like this up.
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,622 Points 5k badge 2x thumb

The Caller Id that is used by the RingOut API is the same as the Service Web extension Caller ID setting for "RingOut from Web" so the API Caller ID is set by Servie Web. The API will validate the Caller ID (to ensure it's a number that's authorized to be used), but won't actually set it as the Caller ID in the RingOut.

We have identified this as a potential issue and have a ticket to rectify this functionality to actually allow the API to set the caller ID when the provided value passes validation.

Photo of Automation USA

Automation USA

  • 1,040 Points 1k badge 2x thumb
Hi Benjamin, being able to set RingOut Caller Id programmatically is also important to our application. 
Any updates on status of ticket to rectify Caller Id functionality in the API?
(Edited)
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,622 Points 5k badge 2x thumb
You can achieve this using our WebRTC implementation (requires creating a developer support case to have WebRTC provisioned) currently.

The ticket for this is still open at this time and is being kicked around for prioritization in a future release, but no official timeline currently available.
Photo of Jeremy Heymann

Jeremy Heymann

  • 100 Points 100 badge 2x thumb
John, does this work for the web soft phone only, at this time, or is it possible to get the webRTC to initiate a call from an IP phone to an outside party, with a specified caller ID?
Photo of John Wang

John Wang, Official Rep

  • 5,278 Points 5k badge 2x thumb
Jeremy, WebRTC only works in the context of a web browser now, so a web phone or a softphone. To use WebRTC as a softphone use a framework to turn a JavaScript app into a native app like a Google Chrome app or an Electron app:


We are looking to support API-based Caller ID with RingOut in the future.
Photo of Automation USA

Automation USA

  • 1,040 Points 1k badge 2x thumb
Hi John,

Any news on the API-based Caller ID front?
(Edited)
Photo of John Wang

John Wang, Official Rep

  • 5,278 Points 5k badge 2x thumb
We are still working on adding Caller ID to the RingOut endpoint directly, however, we do have a beta API to programmatically set the RingOut Caller ID now. To use this, when you make a RingOut API call with a Caller ID value, you would first call the Caller ID endpoint to update the extension setting and then make the RingOut API call.

If you would like to use the update Caller ID endpoint, please contact our devsupport team to get access to this beta API. If you'd like to wait till we support this directly in the RingOut endpoint, I'll post an update when it's ready.
Photo of Automation USA

Automation USA

  • 1,040 Points 1k badge 2x thumb
Thanks John. I'll apply right away.
Photo of Vadim Soluyanov

Vadim Soluyanov

  • 64 Points
Hi,
are there any changes with callerId in API?
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
Hi Vadim,

The caller-ID parameter, when used in the RingOut API, would validate the setting on the service web at the moment.

Meanwhile, as a workaround could you try using the Extension Update Caller ID API and try this scenario ?

Please refer to the below link from our API explorer to know more about the :
Update Extension Caller ID

Once the caller-ID is updated you could initiate a RingOut.
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
Is there a way to set a blocked caller id using RingOut?

The situation I have is our system has two options next to phone numbers in our custom built CRM. "Call Number" and "Call Number (No Caller ID)". I'd like to just pass either a Boolean or something to indicate the call requires using a blocked caller id outgoing.

AK is your solution to basically update the extension caller id just before you call RingOut and then revert it back to what it should be after the RingOut?
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
Interesting. Could you please throw some light on what do you mean by blocked callerId?

If you do not pass the callerId parameter for the RingOut  API, then the default callerId that is set in the service web would be the one that would be reflected in the call:



Also, the above solution that is provided is to update the callerId dynamically just before the RingOut API call and it will not be reverted to what it was before. For that, you would have to change it again using the Update Extension Caller ID
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
What do I mean by blocked call id? I want the caller id that shows the recipient of the call to not see our caller id in some cases (not all the time). In my account I can set the caller id to be blocked as follows:



but by default I want it to be their direct number unless they are coming from our system via the RingOut API and only if they have clicked the "Call Number (No Caller ID)" button in our system.

So when you say: 

If you do not pass the callerId parameter for the RingOut  API, then the default callerId that is set in the service web would be the one that would be reflected in the call:

Does that mean I can pass a caller id and can it be the "Blocked" one? If so how?
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
Yes, certainly you can update the callerID of the extension to 'Blocked'. Kindly, take a look at the API request below: 

HTTP Request
PUT /v1.0/account/~/extension/~/caller-id

HTTP Body
{
  "uri": "https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/caller-id",
"byFeature": [
    {
      "feature": "RingOut",
      "callerId": {
        "type": "Blocked"
      }
    }
  ]
And you can see this being updated in the Service Web under the 'Outbound Caller ID' settings.
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
Thanks AK. That does work to change to a Blocked number but I can't change to a blocked number, RingOut and then change back to PhoneNumber all in one go without the CallerID showing the phone number.

My guess is the outgoing caller id only pulls when you've hit "1" on your phone to make the connection and by that time the extension has already been reverted back to PhoneNumber.

So now I have to monitor the RingOut call status until it's not "Pending" I'm assuming so then once it's completed I can fire off the API call to change the extension Caller ID back to PhoneNumber. What a pain!

It would be a whole lot easier if you guys update the API to allow for pushing the CallerID in the original RingOut call (including the ability to Block) instead of this work around of changing the Caller ID on the extension. Will this be added in the near future?
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
Apologize for any inconvenience that is being caused at the moment and we appreciate your thoughts and findings. 

Well, the good new is that we would have the feature of 'Dynamically updating the callerId' during RingOut API in our very next release. We shall keep you posted on this release soon. 
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
OK thanks.

I'm still waiting to port our numbers so I'll put this part of the integration on the back burner and hope you guys release before we complete the port. 
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
Any update when the next release will be?
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
Hi Lee,

I did check with my Team and per the release timelines, we should have this feature available by October 15th roughly. 

We shall keep you posted with an update on the developer community about the release.
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
Lee,

I will check with the Team and provide an update to you by EOD today. Thanks. 
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
Any update AK? It's roughly October 15th. ;) 
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
FYI for anybody interested. I heard back via email and basically it's not going to happen for a "few weeks."

So I'll be working on coding a work around as I need this by Monday. 
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
Hi Lee,

We apologize for the delay. But our team is working on getting this feature released at the earliest. As we communicated via email, we would also like to convey to our developer community that we will keep you updated once we have this feature available for the RingOut API Endpoint. 
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
Thanks AK.

Unfortunately we already have this feature on our current system we're replacing with RingCentral and my end users enjoy their "easy buttons" and we're due to cut over our system on Monday.

Ah well.. gives me an opportunity to learn more of the API. 
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
So today our phone numbers have been ported and my solution for call out isn't working at intended.

I'm getting a "Resource for parameter [extensionId] is not found" error for any extension other than my own (probably because mine is the main accountid too).

I look up the extension in question (via /restapi/v1.0/account/~/extension/OtherUserExtensionIDHere)
  and sure enough it does not have the "CallOut" feature like my extension does. Is this due to my account not being fully setup yet and do I need to contact my account manager or can I set permissions for this somewhere?

Even another SuperAdmin extension doesn't have permission so I don't think it's something I can even set in Roles.

If I pass in the phone number for the extension but not the extensionid (i.e. ~) then the correct user does get called to connect the call but then MY caller id is shown on the RingOut for their call!
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
Hi Lee,

I'm getting a "Resource for parameter [extensionId] is not found" error for any extension other than my own (probably because mine is the main accountid too).
You are trying to Login ( authorize ) using one extension and trying to initiate the Ringout for another extension by passing in the extensionID

Let's say you have two extensions :

Ext 101 -> User A ( extensionId : 12345678 )
Ext 102 -> User B ( extensionId : 87654321 )

Your API call / calls would be as below :



  1. Login using the Ext 101 ( extensionId : 12345678 )
  2. Make Ringout :
      The Response would be as below :
{
  "errorCode": "CMN-102",
  "message": "Resource for parameter [extensionId] is not found",
  "errors": [
    {
      "errorCode": "CMN-102",
      "message": "Resource for parameter [extensionId] is not found",
      "parameterName": "extensionId"
    }
  ],
  "parameterName": "extensionId"
}

Kindly make sure to use ( ~ ) or the extension ID associated with the User logged in to initiate the Ringout. 

As for the callerID, once we have the release, you could pass in the callerID as a parameter to reflect the same for the call. Meanwhile, you could use the Edit Extension's Caller ID property or you could update the same in Service Web :
https://community.ringcentral.com/ringcentral/topics/how-do-i-change-the-number-that-appears-when-i-...
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
Thanks for the suggestion. I'll check that out and see.
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
I see what you're saying Jeremy but I'd have to put myself in all the groups so I'd get to see the caller id on my extension and move all lines, record new messages on those groups etc.

I'd also have the issue of having to build a queue system for ringout as some users will ringout with their number while others with a blocked and as it's using my extension there is going to be times when people hit the api at the same time (or within a few seconds while the ringout is in process) and RingCentral's current work around of changing the caller id, ring out, change caller id back is a real pain as I have to wait until the user picks up their phone to connect the call (probably solved with the new api version but I need this ASAP).

There is also issues with the call log too which can be solved in various ways but again more work on my part.

This is just too much of a work around and I'll be looking at the node.js sdk instead. It'll probably take me a few days but at this point I'm not going to wait for any API update as it's been weeks as it is and the next release doesn't have the feature I really need. I basically have to replace a bunch of front end UI in my custom CRM instead of just the web service that connects to the phone system to make the call out like it did with our old phone system.

Appreciate the response though. 

It's frustrating as what I wanted to do I think should already be a feature of the API. I don't understand why as the main account holder I can see presence information for an extension, I can change extension information (caller id etc) via the API but I can't trigger a RingOut for an extension without having to have that user authenticate.
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
I've been working with the Javascript SDK (https://github.com/ringcentral/ringcentral-js) today and this will work to replace our call out feature.

Not as seamless as we would like as our end users will need to authenticate with RingCentral but with some UI changes I've made it work with our system.

The demo didn't include a RingOut version but was pretty easy to create based on the MMS example.

Nice thing is the Fax and MMS features are included as demos and something I was going to build into our CRM in the future so now I can kill a few birds with one stone.
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
Good to know Lee :) 

You can find the RingOut Implementation in the README file here 
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
Thanks AK.

Not the best solution for us though.. we've had a ton of support calls as people have issues from popup blockers to not understanding how to log in to the RingCentral account (I know not an API issue but still).

Hopefully once everybody is setup we'll be good to go but this is the exact reason I build everything server side so we're not relying on end users.
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
Apologize for any inconvenience that is being caused at the moment and we appreciate your thoughts and findings. 
Well, the good new is that we would have the feature of 'Dynamically updating the callerId' during RingOut API in our very next release. We shall keep you posted on this release soon. 
Was this implemented? I don't see anything in the change log and there has been no update in 3 months. I'm going to be working on our integration again soon and would like to know if you will ever get this put into the RingOut API. 
Photo of John Wang

John Wang, Official Rep

  • 5,278 Points 5k badge 2x thumb
Our API References was updated with the new API but for some reason it wasn't included in the Changelog. The API Reference section is here:

https://developer.ringcentral.com/api-docs/latest/index.html#!#MakeRingOutCallerInfoRequestFrom

For the RingOut API, you will see that we launched a new endpoint "ring-out" and deprecated the previous "ringout" endpoint. If you use "ring-out", dynamically assigned CallerId will work.

POST /restapi/v1.0/account/{accountId}/extension/{extensionId}/ring-out

A caveat is that the user can only use CallerId numbers they are authorized to use. To get a list of numbers a user can use for CallerId call the extension/phone-number endpoint and filter for phone numbers with the "CallerId" feature.

GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/phone-number

Please try it out!
(Edited)
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
OK great thanks! Yes I was looking at the change log.

My app already authorizes per user (I won't go into how annoying that is) so sounds like I'm good to go back to our app and add additional features so they can set the CallerID.
Photo of Lee

Lee

  • 520 Points 500 badge 2x thumb
So I assume that's a no then?
Photo of John Wang

John Wang, Official Rep

  • 5,278 Points 5k badge 2x thumb
See answer above. This is working with the new endpoint in the API Reference.