News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Getting started with API and C# SDK
Tags: sdk
Jul 12, 2016 at 11:11pm   •   2 replies  •  0 likes
sunny

Hi,

Community and Experts.


I am new to the API and SDK. i want to get help and guideline from the experts where to start and which way to follow.

I have downloaded the SDK from the website RCdotNetXDK, i found this is the place where i can start. i am just making a sample application using this SDK. I found that there is functions given in the SDk to send the SMS but there is no option to make an outgoing call . so i added the class in the same way as in SMS


public class RingOutServices {


private const string API_RESOURCE = "/ringout";

private const string API_RESOURCE_DELETE = "/ringout/44";


private ApiClient ApiClient { get; set; }


internal RingOutServices(ApiClient apiClient)

{


this.ApiClient = apiClient;

}


public void MakeCall(RingOutCall call)

{


ApiClient.PostFromExtension(API_RESOURCE, call.ToString());

}


public void CancelCall()

{


ApiClient.DeleteFromExtension(API_RESOURCE_DELETE, "");

}



public void MakeCall(string from, string to, string text,string country)

{


MakeCall (new RingOutCall { Called = new PhoneNumber(to), Calling = new PhoneNumber(from), PlayPromt = text,Country=country });

}

}


and


public class RingOutCall {


public PhoneNumber Called { get; set; }


public PhoneNumber Calling { get; set; }


public string PlayPromt { get; set; }


public string Country { get; set; }


public override string ToString()

{


var obj = JObject.FromObject(new

{


to = from r in new List<string> { this.Called.GetE164() }

select new

{


phoneNumber = r

},

from = new { phoneNumber = Calling.GetE164() },

text = PlayPromt,

country = Country

});


return obj.ToString();

}

}


so i have some questions regarding this :


  1. How to put call on hold?
  2. how to make a conference call while there is call in progress?
  3. How to get notification of an incoming call with the caller id prompt on screen?
  4. how to cancel an outgoing or incoming call?
  5. how to enable disable call recording?

these are some basics questions that i need help so i can start the application. Any help regarding this .. is i am going to the right way? is this the SDK with which i can start?


Waiting for the positive help..


2 Answers
answered on Jul 13, 2016 at 4:01pm  
Hi Sunny,

You are currently using the Community SDK RCdotNetXDK here: https://github.com/vshisterov/RCdotNetXDK

Our official SDK is here as mentioned by Benjamin: https://github.com/ringcentral/ringcentral-csharp

Many of your questions are call control questions in which case our WebRTC capability may be what you're interested in. WebRTC is supported in our JavaScript WebRTC SDK here:

https://github.com/ringcentral/ringcentral-web-phone

Regarding your specific questions:


(1) How to put call on hold?

You cannot use the C# SDK to put a call on hold but you can use our WebRTC capability to do so which is a client-side JS SDK with information here: https://github.com/ringcentral/ringcentral-web-phone#hold-unhold

(2) how to make a conference call while there is call in progress?

Similar to the above, this cannot be done with any C# SDK. For this, ask on our WebRTC SDK project here:

https://github.com/ringcentral/ringcentral-web-phone/issues

(3) How to get notification of an incoming call with the caller id prompt on screen?

To get an event on incoming calls, make a subscription for presence events which will send inbound call events with caller id.

To get a caller id prompt on the screen, you'll need to catch that event and create a display on the screen. A demo is available for JavaScript in the CTI Demo:

https://github.com/ringcentral/ringcentral-js-cti-demo

You can also get information on making subscriptions for C# and JS below. JS is typically used for displaying notifications on the screen if you wish to run the subscription on the client. If you wish to run the subscription on the server using C#, you and send it to the browser using web sockets.

C#: http://ringcentral-csharp.readthedocs.io/en/latest/usage/notifications/Subscriptions/
JS: https://github.com/ringcentral/ringcentral-js#server-side-subscriptions

(4) how to cancel an outgoing or incoming call?

RingCentral has two ways to make calls, RingOut and WebRTC.

Using RingOut, you can issue a DELETE REST API call to the RingOut ID endpoint.

Using WebRTC you can terminate the call using session.terminate which is shown in the WebRTC demo app below:

https://github.com/ringcentral/ringcentral-web-phone/blob/master/demo/index.js#L241

(5) how to enable disable call recording?

You can do this with WebRTC as shown here:

https://github.com/ringcentral/ringcentral-web-phone#start-stop-recording

 0
answered on Jul 13, 2016 at 2:32pm  
I would recommend asking these questions and communicating with the experts who author the C# SDK in the Github Issue tracker for the repository, here: 
https://github.com/ringcentral/ringcentral-csharp/issues

 0



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

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us