I tried with the below code and got the error.
// https://developers.ringcentral.com/my-account.html#/applications // Find your credentials at the above url, set them as environment variables, or enter them below
RestClient rc = new RestClient( Environment.GetEnvironmentVariable("clientId"), Environment.GetEnvironmentVariable("clientSecret"), false );
await rc.Authorize( Environment.GetEnvironmentVariable("username"), Environment.GetEnvironmentVariable("extension"), Environment.GetEnvironmentVariable("password") );
var r = await rc.Restapi().ClientInfo().SipProvision().Post(); // PROCESS RESPONSE
-----------------------------------------------------
{ "errorCode": "SPR-112", "message": "Client edition is not compatible with current Brand", "errors": [ { "errorCode": "SPR-112", "message": "Client edition is not compatible with current Brand" } ] }
Why did you invoke await rc.Restapi().ClientInfo().SipProvision().Post()?
It's for low level SIP and it's probably not what you need.
To get customer phone number, when they call you, you need to create a subscription: https://github.com/ringcentral/RingCentral.Net/blob/master/RingCentral.Tests/SubscriptionTest.cs
And here is the event: https://developers.ringcentral.com/api-reference/Extension-Telephony-Sessions-Event
Hi Tyler,
I checked your sample. But I received the below error. Could you please advise how can I get this off?
Also, I have given all the permissions.
Here is my code snippet
Also, your sample is for Send SMS, Not to Get caller number. It would be great if you can share a sample code that I can use to get the call number when ringing the phone.
Code is almost the same. You just replace the event filter. And parse the response for the number.
it means you authorize your app using extension 1, and try to subscribe to events for extensions 2. But extension 1 and extension 2 don't belong to the same company.