When I try to set the outbound callerId property in the RequestBody and submit the request, nothing happens. The call does not even initiate the first leg of the call. If I remove it, everything works fine. Here is how I am calling it using the Java SDK.
MakeRingOutCallerIdInfo ringOutCallId = new MakeRingOutCallerIdInfo();
ringOutCallId.phoneNumber = callerId;
// Set call body
GetRingOutStatusResponse response = null;
// setup the parameters for the API call
MakeRingOutRequest requestBody = new MakeRingOutRequest();
requestBody.from(new MakeRingOutCallerInfoRequestFrom().phoneNumber(from = from.substring(0,2).contains("+1") ? from : "+1"+from));
requestBody.to(new MakeRingOutCallerInfoRequestTo().phoneNumber(to = to.substring(0,2).contains("+1") ? to : "+1"+to));
requestBody.callerId(new MakeRingOutCallerIdInfo().phoneNumber(callerId = callerId.substring(0,2).contains("+1") ? callerId : "+1"+callerId));
requestBody.playPrompt = false;
// Make the call to Ring Central
response = restClient.restapi().account().extension().ringout().post(requestBody);
You can check what callerIDs are allowed to be used for your logged in extension by using this api:
GEThttps://platform.devtest.ringcentral.com/restapi/v1.0/account/accountId/extension/extensionId/caller-id
You can choose one of the numbers from the response list as your callerID for ring-out api.
https://developers.ringcentral.com/api-reference/User-Settings/readExtensionCallerId
I am getting the following error:
{
"errorCode" : "TEL-107",
"message" : "Caller ID: [+1xxxxxxxxxx] is not allowed",
"errors" : [ {
"errorCode" : "TEL-107",
"message" : "Caller ID: [+1xxxxxxxxxx ] is not allowed",
"parameterValue" : "+1xxxxxxxxxx "
} ],
"parameterValue" : "+1xxxxxxxxxx "
}
Did you check if the feature of that phone number?
I got it from the local site's number
Check the API response, it could be something like this if the callerId does not belong to the user
{ "errorCode" : "RNG-102", "message" : "Caller ID should be one of company direct numbers", "errors" : [ { "errorCode" : "RNG-102", "message" : "Caller ID should be one of company direct numbers" } ] }
You then need to read the user phone numbers and detect the number feature to see if it is callerId
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder