Skip to main content

I have tried calling the Call-Out API with the body parameters, but I keep getting the same error every time.

I have attached my code snippet and the response for reference. I also tried using the deviceId (the relevant line is commented in the code), but the issue persists.

This is my code 

This is response 

Also checked in the documentation for this API but it is saying try with deviceId and tried with the deviceId then it will gives error for deviceId parameter value is inval.

My goal is to call the API using the from and to numbers. Could you please review and let me know why this gives me error this ?

Thanks.

You have to specify the device Id of an online device and the device must be owned by the user extension. You wrote that you use the device Id but in your code the deviceId was commented out. You did not show how and where did you get the deviceId from and if the device is online and belongs to the authenticated user or not.

All in all, read the user devices using this endpoint. Then parse the response to get a device ID, also check the device status to make sure that it’s “online”. Use that device Id to make a call out call.


I have tried with the device id and still get same error. Also tried you said above with the specific device id get from the API. Also checked status is online.

Attached screenshot for your reference

 

 

as you said and the documentation all the things i have added here can you please check and let me know what changes required.

Thanks.


I don’t understand your code. It’s PHP but you call the API passing the body in a weird way that I don’t really understand it. Can you try using the RingCentral PHP SDK? Check out this sample code that calls the ring-out API. Just change it with the call-out endpoint and modify the bodyParams accordingly.


Hi,

I have successfully tested the RingCentral SDK and the call-out API is working. However, I need clarification regarding the “from number” parameter.

When I pass a number of type direct number, the API works fine. But when I try using a softphone number / Desk phone, it doesn’t work.

Can you please clarify why the softphone number is not working in this case, and whether there are any specific requirements or limitations for using it?

Thanks


Hi,

I have successfully tested the RingCentral SDK and the call-out API is working. However, I need clarification regarding the “from number” parameter.

When I pass a number of type direct number, the API works fine. But when I try using a softphone number / Desk phone, it doesn’t work.

Can you please clarify why the softphone number is not working in this case, and whether there are any specific requirements or limitations for using it?

Thanks

The /call-out API only takes the from.deviceId for the first leg. Where did you get the instruction to set the from.phoneNumber?

 


Hi

As I show this is the documentations link where I find softphone.

Also as far as documentation that mentioned device id and SDK example said need to pass from number.

So there is bit confusions in this what need to pass actually.

Also need some idea about why it is not working with the other softphone numbers and working with the direct numbers.

Also I am facing issue with the /restapi/v1.0/client-info/sip-provision endpoint this is not working.

I am using this API with the webphone SDK to call out.

It’s giving me error show below

Thanks.


Hi

As I show this is the documentations link where I find softphone.

Thanks.

That is the /ring-out API. It’s very different from the /call-out API as you asked from your original question “I have tried calling the Call-Out API with the body parameters, but I keep getting the same error every time.”

So which one do you expect to call? And this is the /call-out API reference.


Hi

 Ok, understand that both api is different.

Currently I am facing issue with the /restapi/v1.0/client-info/sip-provision endpoint this is not working.

I am using this API with the webphone SDK to call out.

It’s giving me error show below

error image
​​​​
This is my code where i am using SIP info 

​​​​