How to place a successfull ringout ?

  • 1
  • Problem
  • Updated 2 years ago
  • (Edited)
Hello

I am developing a chrome extension, from where trying to perform a outbound ringout using sandbox account.I have added 2 direct numbers in my sandbox account.
As according to rest API i am performing ringout but i am getting error and can not place successfull ringout.

Here is code that what i am passing to ajax call.
var url = 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/ringout';
var data = { "from": {"phoneNumber": "1626*******"},/*from parameter is optional if there is a default number in user's forwarding numbers */
            "to": {"phoneNumber": "1315*******"},  /*to parameter is required */ 
            "playPrompt": true  /*optional field */
           };
var headersArray = [
                     {"name": "Content-Type", "value": "application/json"}, 
                     {"name": "Authorization", "value": "Bearer "+tokenObj.access_token}
                   ];

and i am getting this error:

"{
  "errorCode" : "InvalidParameter",
  "message" : "Unrecognized token 'from': was expecting 'null', 'true', 'false' or NaN\n at line: 1, column: 6",
  "errors" : [ ]
}"
Photo of Akif Akif

Akif Akif

  • 96 Points 75 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,622 Points 5k badge 2x thumb
Have you compared your request format to that used in the RingCentral API Explorer for Make a RingOut Call?
Photo of Akif Akif

Akif Akif

  • 96 Points 75 badge 2x thumb
Thanks for comment, there were two problem 1-i was not added direct number 2-json.stringfy was required to make json string in post body.

After that i got inProgress status but in the next moment when i check status it was "CannotReach" and "GenericError", can you please elborate that how i can solve this and what is the problem happening? 
(Edited)
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,622 Points 5k badge 2x thumb
Several issues can cause those errors, could you please create a developer support case for investigation?

In the meantime, here are a few possible issues to investigate:

1. Has the User/Extension in the Sandbox account been activated and enabled?
2. Have you tried using the main company number as the `from.phoneNumber` as well as the direct number for the extension?
3. Is the extension configured to make Voice calls? You can see this in the Sandbox Online Account Portal (https://service.devtest.ringcentral.com)