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
Calls receive through MAX Agent NICE are not triggering the session subscription
Tags: rest api
Sep 29, 2021 at 12:29pm   •   2 replies  •  0 likes
Jenser Almeida

Topic

Webhooks and notifications


Details

We have built an integration where the users get a ringing -> call active -> hangout notification on our application, plus it creates a record of this call on hours system. This works fine when the user calls or receives a call, to their direct number, through extension, or automatic redirection, after calling the company number.


However, while using the MAX Agent NICE, and receiving a call through this tool, no session webhook notification is received.


Request/Response


I am reproducing a detailed reproduction of the code used to subscribe to the session. This code is using the user oauth previously made authorization. The token is active, and the token refreshing is also being take care by the code, besides not being presented on the below snippet.


``` C#

const string SessionEventFilterUri = "/restapi/v1.0/account/~/extension/~/telephony/sessions";


var subscriptionInfo = await PostCreateSubscriptionAsync(

ringCentralContext,

new()

{

eventFilters = new[] { SessionEventFilterUri },

expiresIn = Convert.ToInt64(TimeSpan.FromDays(365).TotalSeconds),

deliveryMode = new()

{

transportType = "WebHook",

address = UrlBuilder.GetBaseApiUrl() + "webhook/session"

}

},

cancellationToken

).ConfigureAwait(false);


public Task<SubscriptionInfo> PostCreateSubscriptionAsync(

RingCentralContext context,

CreateSubscriptionRequest args,

CancellationToken cancellationToken) =>

_exec.ExecuteAsync(

context,

true,

(restClient, _) => restClient

.Restapi()

.Subscription()

.Post(

args,

new() { cancellationToken = cancellationToken }

),

cancellationToken

);


[DebuggerStepThrough]

private class Executer

{

private readonly RingCentralContextManager ContextManager;


public Executer(RingCentralService ringCentralService) =>

ContextManager = ringCentralService.ContextManager;


public Task ExecuteAsync(

RingCentralContext context,

bool isAccessTokenAuthorization,

Func<RestClient, OAuthToken?, Task> executeAsync,

CancellationToken cancellationToken)

=> ExecuteAsync(

context,

isAccessTokenAuthorization,

async (r, o) =>

{

await executeAsync(r, o).ConfigureAwait(false);

return true;

},

cancellationToken);


public Task<T> ExecuteAsync<T>(

RingCentralContext context,

bool isAccessTokenAuthorization,

Func<RestClient, OAuthToken?, Task<T>> executeAsync,

CancellationToken cancellationToken) =>

// the following code have only retry and token refreshing policy. Besides that, it does call the RingCentral api passed to the delegate param executeAsync

ContextManager

.ExecutionPolicy

.ExecuteAsync(

new PolicyRestClientExecutionContext(context)

{

IsAccessTokenAuthorization = isAccessTokenAuthorization

},

(_, _) => executeAsync(context.RestClient, context.OAuthToken),

cancellationToken);

}


public record RingCentralContext(RestClient RestClient, OAuthToken? OAuthToken);

```


I can confirm that the subscription is active and working, and the session notification is working for the scenarios described at the beginning of this ticket. However, when the call comes through the MAX Agent NICE, no notification is sent.


Steps to reproduce

1. Use MAX Agent NICE

2. Receive a call using the MAX Agent NICE application

3. The Ring Central softphone rings, but no notification is sent to the webhook


Error message

There is no error message, but the user API subscription is not triggered when a call is received through the MAX Agent NICE application.


on Sep 29, 2021 at 1:35pm   •  0 likes

Who build that MAX Agent NICE? Is that a 3rd party app/integration? Can you provide a link to the tool?

on Sep 29, 2021 at 1:38pm   •  0 likes

Hi @Phong Vu , the MAX Agent is from the NICE inContact company, and here are the link to the tool

https://help.nice-incontact.com/content/agent/max/max.htm

1 Answer
answered on Sep 29, 2021 at 1:49pm  

I am not sure how the MAX Agent Nice tool is configured to make a call or place a call to RingCentral number. But it maybe the config is using different user extension than the extension you are monitoring from your Webhooks app. Can you try with the account tel session event to see if you receive any notification at all.

const string SessionEventFilterUri = "/restapi/v1.0/account/~/telephony/sessions";

Let me know.


 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