Notification is not coming up in C#
Tags: sdk
Aug 29, 2016 at 1:51pm • 4 replies • 0 likes
z-admin
I am able to register the sandbox account using the C#. I can also able to send the SMS messages through my C# API. However for the incoming call events, Incoming SMS events the notification is not raising.
sample code below:
sdk = new SDK(appKey, appSecret, SDK.Server.Sandbox, "CMC CTI Test", "");
var platform = sdk.Platform;
sdk.Platform.Login(phoneNumber, "", password, false);
sub = sdk.CreateSubscription();
sub.NotificationEvent += (sender, e) => {
Console.WriteLine(e.Message);
};
sub.Register();
4 Answers
Because you didn't add any event filters for sms and call events. Please check the sample code posted by Dean.
Notifications in sandbox don't work reliably, so even you add the event filters, you might still have issues.
We are moving away to GitHub and Stackoverflow so it's better for you to post your questions there.
Notifications in sandbox don't work reliably, so even you add the event filters, you might still have issues.
We are moving away to GitHub and Stackoverflow so it's better for you to post your questions there.
0
This seems like an appropriate issue to post in the issue tracker in Github for the repository of the C# SDK: https://github.com/ringcentral/ringcentral-csharp-client/issues.
0
Hi Benjamin,
Thank you for sharing the information. I have downloaded and verified that test applications and getting this below error on
private RestClient rc; (Unable to resolve the symbol RestClient)
rc.Restapi().Subscription.New (Unable to resolve the symbol Restapi)
I was checking all references added properly and i downloaded the required packages from Nuget Manager.
Thanks.
Thank you for sharing the information. I have downloaded and verified that test applications and getting this below error on
private RestClient rc; (Unable to resolve the symbol RestClient)
rc.Restapi().Subscription.New (Unable to resolve the symbol Restapi)
I was checking all references added properly and i downloaded the required packages from Nuget Manager.
Thanks.
0
Are you using the latest version of the C# SDK from Github?
https://github.com/ringcentral/ringcentral-csharp-client
Looking at your sample code, I do not see where you've added the event filters, and it appears you may be on an older or unofficial version of the RingCentral C# SDK.
Here is the code sample provided in the README.md for Subscriptions which appears slightly different from yours:
Looking at your sample code, I do not see where you've added the event filters, and it appears you may be on an older or unofficial version of the RingCentral C# SDK.
Here is the code sample provided in the README.md for Subscriptions which appears slightly different from yours:
var subscription = rc.Restapi().Subscription().New(); subscription.EventFilters.Add("/restapi/v1.0/account/~/extension/~/message-store"); subscription.EventFilters.Add("/restapi/v1.0/account/~/extension/~/presence"); subscription.ConnectEvent += (sender, args) => { Console.WriteLine("Connected:"); Console.WriteLine(args.Message); }; subscription.NotificationEvent += (sender, args) => { Console.WriteLine("Notification:"); Console.WriteLine(args.Message); }; subscription.ErrorEvent += (sender, args) => { Console.WriteLine("Error:"); Console.WriteLine(args.Message); }; subscription.Register();
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