Push notification in a single application for all the subscribed extensions

  • 1
  • Question
  • Updated 2 years ago
  • (Edited)
Hello Team,

I have a simple application that would run on the server. I would like to achieve the below using this application.

  1. Subscribe for all the extensions using the single account
  2. Once subscribed I would like to receive the notifications(call) for each extension on this application
  3. I would then like to filter each notification based on the extension number and accordingly send the call details using my software on the call center rep's desktop.
  4. So basically RingCentral's desktop app will run on every agent's desktop but my notification application will run only on one server where it should be able to receive all the call notifications .
  5. After the above I would send the call details received from the notification app to my CRM web app running on the call center rep's  machine.
I hope the above is clear, the whole idea is to make call center representatives
receive the call notifications in real time without running the subscription apps on their respective machines. 

I am using C# SDK.

Please let me know if the above is possible to do, if yes then how can we achieve it using the C# SDK.

Thanks.
Photo of Z Admin

Z Admin

  • 440 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,152 Points 5k badge 2x thumb
I am not familiar with call center. Is a call center rep in charge of multiple call center agents?

For C# SDK to monitor all the notifications for all the extensions, please check the doc here: http://ringcentral-csharp.readthedocs.io/en/latest/usage/notifications/Subscriptions/ and scroll down to the bottom.

Once your application get the notifications, you can filter them and do whatever to them based on your needs.
Photo of Z Admin

Z Admin

  • 440 Points 250 badge 2x thumb
Hello Tyler,

Thanks for the reply. I checked the above link but still i have question.

Consider i have 20 call center agents using the ring central desktop app. whenever they dial or receive a call will it  be possible to receive the notifications on a single app which has subscribed for all the agents , i know a filtering would be needed based on extension id but would just like to be sure on this. 

Thanks.
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,152 Points 5k badge 2x thumb
Yes it is possible.  You just setup subscription for all the 20 extensions and you will get notifications on a single app. And in order to monitor all the extensions, you might need to authorize your app with the admin account. Any more question please reply.
Photo of Z Admin

Z Admin

  • 440 Points 250 badge 2x thumb
thanks for the answer, i just need to get the list of all the extensions and then subscribe them from my app thereafter i will start receiving the notifications for all the extensions on the same app correct?
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb
Yes, all within the same application.
Photo of Z Admin

Z Admin

  • 440 Points 250 badge 2x thumb
thanks for the reply it is really helpful.
Now i am trying to subscribe for multiple extensions,  i am using the below code but it is not working, am i doing something wrong . Is there another way to subscribe for multiple extensions in c#. i have just pasted the line where i am adding the filter as rest of the code is well known by you guys.  Please help.

subscription.EventFilters.Add("[/restapi/v1.0/account/~/extension/138705004/presence. " + "/restapi/v1.0/account/~/extension/138797004/presence]");

Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb
You need to escape the double quotes properly, and use a comma to separate array elements in JSON.

Try using this instead:

"[\"/restapi/v1.0/account/~/extension/138705004/presence\",\"/restapi/v1.0/account/~/extension/138797004/presence\"]"

If that doesn't work, please share the response (with headers) you are receiving.

Let me know if the above change resolves the problem.
(Edited)
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,152 Points 5k badge 2x thumb
Please post your question here: https://github.com/ringcentral/ringcentral-csharp/issues since it if about the C# programming language.

EventFilters is List<string> so you just add the two items in your code sample one by one.
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,152 Points 5k badge 2x thumb
Please read this thread https://github.com/ringcentral/ringcentral-csharp/issues/54

Scroll down to the bottom and there is a fully working demo with detailed instructions.