question

Jenser Almeida avatar image
Jenser Almeida asked Phong Vu answered

Calls receive through MAX Agent NICE are not triggering the session subscription

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.


rest api
2 comments
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image Phong Vu ♦♦ commented ·

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

0 Likes 0 ·
Jenser Almeida avatar image Jenser Almeida Phong Vu ♦♦ commented ·

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

0 Likes 0 ·

1 Answer

Phong Vu avatar image
Phong Vu answered

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.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys