In order to call, what should i do?.

  • 1
  • Question
  • Updated 1 year ago
Hello,

I am using the https://github.com/ringcentral/ringcentral-csharp-client c# SDK.

i am beginer of ringcentral.
i have done about ringout, but i can't receive voice bitween myapp of sandbox and other phone.
-------------------------
 var requestBody = new
            {
                from = new { phoneNumber = phoneNumber },
                to = new { phoneNumber = toNum },
                playPrompt = "false",
                country = new { id = "1" }
            };
                        
           _RingOutInfo = await extension.Ringout().Post(requestBody);  
----------------------------
when this funcion was called, client soft phon was ringing.
Now what is the next step?
In order to call, what should i do?.
  1.   i 'd like to call using ringcentral c#
  2.   how to Accept Incoming Call.
  3.  how to Create SIP registration of a device/application:
i want you to help me.
Photo of Phan Phan

Phan Phan

  • 82 Points 75 badge 2x thumb

Posted 1 year ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,132 Points 5k badge 2x thumb
As far as I can tell. Ringout is not the same as "call". When you do a ringout, there will be an intermediate phone number to call both the from number and the to number. And if both of them pick up the phone, they are connected via the intermediate number. 

Ref: http://ringcentral-api-docs.readthedocs.io/en/latest/ring_out/

If you want to do a test Ringout, you'd better have access to both the from number and the to number.

I don't think C# can make a direct call because it's not a phone. Maybe you are interested in https://github.com/ringcentral/ringcentral-web-phone if you want to make calls programmatically.
Photo of Eugene

Eugene

  • 210 Points 100 badge 2x thumb
Hi Tyler,
I mention my meaning again.
I'm developing demo using C#.
This is a app demo screenshot using C#.

There is a number called (408)333-9978 for <to number> field.
I clicked <call> button.




Then softphone for (408)333-9978 ring.



I click <Answer> button.
At this moment, I can't hear anything, I can't process for phone.

For this, what API will I use?
To select microphone, what api will I use?

I checked https://github.com/ringcentral/ringcentral-web-phone.
It used SIP.JS.

Regards.
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,132 Points 5k badge 2x thumb
As far as I can tell, it's impossible to answer the call with C#.  As I explained, both the from number and to number ring, and both of them should be picked up in order to say something. 

C# invokes Ringout API to initiate a "call", and the "from" and "to" for the call are two phones (either hardware phone or soft phone). But neither of them is your C# app. You C# app is acting like an agent, just to invoke the Ringout api to connect these two phones. 

Frankly speaking, I don't know how to make your C# app a soft phone. I don't think it is possible because I created the C# SDK. The only way to create a soft phone that I am aware of is https://github.com/ringcentral/ringcentral-web-phone.
(Edited)
Photo of Eugene

Eugene

  • 210 Points 100 badge 2x thumb
Hi Tyler,
Thanks for your message.

I wanted to develop like ringcentral for desktop app using c# sdk.

I have a C# Windows Desktop database application that needs to be integrated with RingCentral.

I expect to: Receive Signal that there is an incoming call with Caller ID info, Place a call, Receive Call, Text in/out, and download Call Recording upon 'OnHook' event.

My deliverable will be a c# .net application that connects to newly programmed .DLL.

My Demo will be used as an example for working with your DLL. 

My existing RMX/DevExpress application must be able to call the functions in DLL thereby communicating directly with Ring Central.

1) Is it impossible?

2) For permission of my sandbox account, there is a VOIP.
How can I implement this using c#?

Kind Regards.
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,132 Points 5k badge 2x thumb
I need to turn to others for help. Because something is out of my knowledge. RingCentral for Desktop is not based on Rest API we provide and it doesn't use any of the SDKs. I need to ask my colleagues to get more technical details. Please stay tuned.
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,132 Points 5k badge 2x thumb
Some one told me it was possible to embed CEF https://bitbucket.org/chromiumembedded/cef and use webrtc to build a softphone. 

I am pretty sure that RingCentral Rest API doesn't support placing call(other than Ringout which is not the same as call) and receiving call.

To receive call you need softphone, webphone or physical phone.  RingCentral desktop app uses SIP directly. But we don't support customers doing the same.
(Edited)
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,132 Points 5k badge 2x thumb
If you can get C# + CEF work together. We have a good project here: https://github.com/ringcentral/ringcentral-js-widget

With this project, you can have a full featured phone app (including but not limited to: place call, receive call, SMS, Fax...etc.) in 10 minutes. 
Photo of Eugene

Eugene

  • 210 Points 100 badge 2x thumb
Hi Tyler,
Thanks for your message.

If I use c# + CEF and source for https://github.com/ringcentral/ringcentral-js-widget and make demo,
can I make DLL from these sources?

The type of C# Project is ASP.NET at this time?

Kind Regards.
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,190 Points 5k badge 2x thumb
I don't quite understand your question. Especially "can I make DLL from these source".

https://github.com/ringcentral/ringcentral-js-widget is a JavaScript project.
Photo of Eugene

Eugene

  • 210 Points 100 badge 2x thumb
Hi Tyler,
Thanks for your message.

I mean, My main goal is to implement the API to my existing RMX/DevExpress application. It run on Azure.

For this, first of all I think I have to build c# demo and make DLL, and integrate DLL to Azure. ( That is my idea, I'm not sure my idea is right. )

At this time, can I make DLL when I use this Javascript widget project?

If no, would you give me solution how I build API?

My API running on Azure should monitor something at RingCentral or get a notification via a webhook to know a call was just completed and the API will download the wav file(call recording).

Kind Regards.
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,190 Points 5k badge 2x thumb
Your screenshot seems like a WinForm application. So my suggestion is for Desktop apps only. I have no experience with Azure.
Photo of Eugene

Eugene

  • 210 Points 100 badge 2x thumb
Hello Tylor,

I've tried to launch this project on local.
https://github.com/ringcentral/ringcentral-js-widget

I created a file named api-config.js in folder dev-server, added following codes:


export default {
appKey: 'XXXXXXXXX',
appSecret: 'XXXXXXXXXXXXX',
server: 'https://platform.devtest.ringcentral.com',
};

In terminal, I ran command.

It show error like screenshot.
Would you help?


Kind Regards
(Edited)
Photo of Eugene

Eugene

  • 210 Points 100 badge 2x thumb
Hi Tylor



Would you teach me what I will add for OAuth Redirect URI?

Kind Regards
Photo of Eugene

Eugene

  • 210 Points 100 badge 2x thumb
Hi Tylor,
How can I remove appkey and secret key?

Regards
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,190 Points 5k badge 2x thumb
Just edit your comment and remove them.
Photo of Embbnux Ji

Embbnux Ji

  • 120 Points 100 badge 2x thumb
Hi Eugene,
Glad that you try widget library.
I have a demo to show how to use the RingCentral widget library. https://github.com/embbnux/ringcentral-widget-demo 
Hope it will help.
Thanks
Photo of Eugene

Eugene

  • 210 Points 100 badge 2x thumb
Hi Tylor,



Would you see this screenshot?

I'd like to delete 2 items I mentioned in screenshot in my previous comments.

But I can't edit my comment.

Would you send me screenshot and teach me in details?

Sorry for bothering you.

Kind Regards
Photo of Tyler Long

Tyler Long, Official Rep

  • 6,858 Points 5k badge 2x thumb
I thought you had the permission to edit your own comment but it seems that you don't.

I have asked my colleagues to help, please stay tuned.
Photo of Phan Phan

Phan Phan

  • 82 Points 75 badge 2x thumb
Hi Tylor,
I am using the https://github.com/ringcentral/ringcentral-csharp-client c# SDK.
I have a question.
can I record using sdk, when calling.?
After the call is completed, i am going to download recorded wav file.
i am sure you can help me.
kind Regards.
Photo of Tyler Long

Tyler Long, Official Rep

  • 6,858 Points 5k badge 2x thumb
Hi Phan, Let's create a new topic to continue. This one has been too long and it's off topic.
Photo of Eugene

Eugene

  • 210 Points 100 badge 2x thumb
Thanks, Tyler.