question

z-admin2902 avatar image
z-admin2902 asked z-admin2902 commented

How to make outbound call using in C#

i would like to make outbound from my custom web page (aspx)? How I can make call and do the out bound call? do we have any sample code
topic-default
1 |1000

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

1 Answer

·
benjamin-dean avatar image
benjamin-dean answered z-admin2902 commented
We have a RingCentral C# SDK available:  https://github.com/ringcentral/ringcentral-csharp

It shows usage as something like this (I am not a C# developer, so my code example below may not be correct, and I would recommend you ask any questions you have about using this SDK in the Github Issues for the repository:

//import RingCentral
using RingCentral;  //Initialize Ring Central Client var sdk = new SDK(     "your appKey",     "your appSecret",     "RingCentral apiServer",     "Application Name",     "Application Version");  var authResponse = sdk.Platform.Login(userName, extension, password, true);  var ringoutPostBodyJson = "{\"from\":{\"phoneNumber\":\"\",\"forwardingNumberId\":\"\"},\"to\":{\"phoneNumber\":\"\"},\"callerId\":{\"phoneNumber\":\"\"},\"playPrompt\":false,\"country\":{\"id\":\"\"}}";
var request = new Request("/restapi/v1.0/account/~/extension/~/ringout", ringoutPostBodyJson);
var ringoutResponse = sdk.Platform.Post(request);
1 comment
1 |1000

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

z-admin2902 avatar image z-admin2902 commented ·
I have tried this option, but the call is not going.

It gives the following error on the status of the call:

Cannotreach "Generic Error" is coming up. However i am able to make the call using the Ringcentral desktop application.


0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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