cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1263
Views
3
Helpful
3
Replies

Finesse - Sometimes the makeCall function does not work.

Valber Carvalho
Level 1
Level 1

I have a Gadget with three principal activities:

1) show two buttons during the wrap up time.

2) write a value in a ecc variable.

3) callback to the customer  if the call was dropped during the conversation clicking on the button during the wrap up time.

Both number 1 and 2 are working fine,

Number 3 the most of time works fine, but sometimes happens an Exception when I click on callback button. 

Seeing the finesse logs I found this exception:

subsystem_exception_info=][tid=http-8080-13][version_number=Unknown product_-1_-1_-1_-1_-1_-1_-1]: Information associated with the following logged exception

0000000038: 192.168.9.232: Aug 23 2016 15:32:58.570 -0300: %CCBU_http-8080-13-3-CONFIG_UTIL_INSTANCE_EXCEPTION: %[exception=java.lang.Exception][request_method=Agent - Getting columns for manageCall]: An error has occurred when obtaining the config util instance

0000000039: 192.168.9.232: Aug 23 2016 15:32:58.570 -0300: %CCBU_http-8080-13-3-EXCEPTION_INFO: %[build_date=Dec 31, 1969 9:00 PM][build_type=rel][exception=java.lang.Exception

  at com.cisco.ccbu.finesse.util.ConfigUtil.getLayoutJSON(ConfigUtil.java:342)

  at com.cisco.ccbu.finesse.util.ConfigUtil.getConfig(ConfigUtil.java:189)

Anybody could help me with this issue, please?

It is my first time with Gadget.

Thank you,

Best Regards

Valber Carvalho

1 Accepted Solution

Accepted Solutions

dekwan
Cisco Employee
Cisco Employee

Hi Valber,

Unfortunately I couldn't find the exception that you had pasted in the attached Finesse logs. But, looking at your gadget code, I think I know what the problem is. In the makeCall method, you first set the state to NOT_READY, then you make the call. This makes sense because you can't make a call in READY state. The problem is, the user.setState method is asynchronous because it only executes the change agent state REST API (which gives an asynchronous event). So, when it gets to the user.makeCall method, it may not be in NOT_READY state yet.

  /**

      * Make a call to the number

      */

    makeCall : function (number) {

      user.setState(states.NOT_READY);

      // Example of the user make call method

      user.makeCall(number, {

      success: makeCallSuccess,

      error: makeCallError

      });

      // incrementa contador em até 3 tentativas para callback.

      callback = callback + 1;

    },

So, you probably want to poll the user's state (user.getState) for a set timeperiod and make sure it is in NOT_READY before calling the user.makeCall method.

If that still doesn't work, please reproduce the problem, click the "Send Error report" on the desktop, then grab the logs again.

Thanx,

Denise

View solution in original post

3 Replies 3

dekwan
Cisco Employee
Cisco Employee

Hi Valber,

Unfortunately I couldn't find the exception that you had pasted in the attached Finesse logs. But, looking at your gadget code, I think I know what the problem is. In the makeCall method, you first set the state to NOT_READY, then you make the call. This makes sense because you can't make a call in READY state. The problem is, the user.setState method is asynchronous because it only executes the change agent state REST API (which gives an asynchronous event). So, when it gets to the user.makeCall method, it may not be in NOT_READY state yet.

  /**

      * Make a call to the number

      */

    makeCall : function (number) {

      user.setState(states.NOT_READY);

      // Example of the user make call method

      user.makeCall(number, {

      success: makeCallSuccess,

      error: makeCallError

      });

      // incrementa contador em até 3 tentativas para callback.

      callback = callback + 1;

    },

So, you probably want to poll the user's state (user.getState) for a set timeperiod and make sure it is in NOT_READY before calling the user.makeCall method.

If that still doesn't work, please reproduce the problem, click the "Send Error report" on the desktop, then grab the logs again.

Thanx,

Denise

Hi Denise,

Your answer was very important for me.

After that, I did some changes in my code.

1) When an Agent click on the button to callback, I invoke the setState function firstly passing 'NOT_READY' as parameter. Yesterday, I was invoking makeCall function.

2) Into handleUserLoad a created a condition to check if the agent is on 'NOT_READY' current status. If the condition is true, I invoke the makeCall function.

I did some tests and the issue disappeared.

Thank you so much for your time and your  tip.

Valber Carvalho,

Hi Valber,

You're welcome. Yes, that was the other way to go. I was going to suggest it, but I wasn't sure if your gadget was doing something else where you didn't want to tie the makeCall with the handleUserLoad. But looks like you figured it out and got it working.

Thanx,

Denise