cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3340
Views
5
Helpful
11
Replies

Customize Gadget Missing Call Start Event

tauqeer.nasir1
Level 4
Level 4

Dear,

I have developed a custom gadget for call transfer and wrapup. I have deployed that gadget via third party gadget on UCCX and facing some issues. I am using call start handler to show the gadget on call landing and push the wrapup code on call end event on my custom DB. I am facing some issues randomly to appearing that gadget. Sometimes gadget misses the callStart event and not appear at all and still waiting for the call. Even I have few more gadget and the behavior is same, all gadget missed the callStart event.

Can anyone help me to sort out the issue or tell me if i am doing something wrong?

Thanks in advance.

1 Accepted Solution

Accepted Solutions

Hi Touqeer,

What version of UCCX are you using? The format of your JS file makes me think it is 10.6 or below. If this is not the case, please follow this blog to convert your gadget to the right version.

Also, please add more logging into your gadget so that you have more details when you need to debug the issue when it isn't work. And when adding logging, please use clientLogs.log() instead of console.log.

Other than that, based off of looking at the code, it looks correct to me.

I would suggest using the browser's developer tools and set a breakpoint to see exactly where the issue is.

Thanx,

Denise

View solution in original post

11 Replies 11

dekwan
Cisco Employee
Cisco Employee

Hi Touqeer,

What do you mean by the callStart event? Do you mean the 1st dialog event you get when a new call is made/received? Are you using the finesse.js? How are you getting these events?

Thanx,

Denise

Hi Denise,

Thank you for your reply on it. Please find my answer inline.

What do you mean by the callStart event? Do you mean the 1st dialog event you get when a new call is made/received?

Ans: Yes, I mean the 1st dialog event when a new call arrives.


Are you using the finesse.js?

Ans: yes, I am using finesse.js for getting call events.


How are you getting these events?

I am getting these events by using finesse.js. Please look the following code.


handleNewDialog = function(dialog) {

  render(dialog);

  numDialogs++;

    },

render = function (dialog) {

  paramAtStart(dialog);

    },

paramAtStart() function is in another javascript file included in that gadget. Following is the code:

function paramAtStart(dialog)

{

  $('#myModal').show();

  var callvars = new Array();

  if( dialog == null ){

  // giving default values to call variables.

  _DNIS = "11";

  _SG = "BB";

  }

  else{

  callvars = dialog.getMediaProperties();

  _DNIS = callvars["callVariable3"];

  _SG = callvars["callVariable4"];

  }

  console.log("WrapUpGadget: Calling Web Service with DNIS: "+ _DNIS + ", SG:" + _SG);

  if(_DNIS == null || _SG == null || _DNIS == undefined || _SG == undefined )

  {

  console.log("DNIS:" + _DNIS + "SG:" + _SG);

  _DNIS = "11";

  _SG = "BB";

  }

  getCodesforDNISonStart(_DNIS, _SG);

  console.log("WrapUpGadget: Showing Model");

}

Thank You

Touqeer

Hi Touqeer,

What version of UCCX are you using? The format of your JS file makes me think it is 10.6 or below. If this is not the case, please follow this blog to convert your gadget to the right version.

Also, please add more logging into your gadget so that you have more details when you need to debug the issue when it isn't work. And when adding logging, please use clientLogs.log() instead of console.log.

Other than that, based off of looking at the code, it looks correct to me.

I would suggest using the browser's developer tools and set a breakpoint to see exactly where the issue is.

Thanx,

Denise

Dear Denise,

Thank you for your response. I want to clear one thing here we have 11.0 version of uccx. Is it creating problem or issue we are facing due to version incompatibility?

Hi,

Yes, it is most likely causing the issue you are seeing. The changes are very minimal to make it work for 11.0. You just need to follow the blog.

Thanx,

Denise

Dear Denise,

Can you please tell me which function is called on call received?

Hi,

handleNewDialog is called when there is a new call.

Thanx,

Denise

Hi,

Thank you for your response. handleNewDialog is called once agent reserved, is there any other handler called once call received by the agent?

Hi,

That is incorrect. handleNewDialog is called when the agent gets the call. The events come back to back so the agent goes to reserve state seconds before or after the dialog event.

Thanx,

Denise

Hi,

Can you please more elaborate " handleNewDialog is called when the agent gets the call"? Is this handler call on call arrives or on call attend. If on call arrives, then which handler we can use when call attend by an agent?
I have tested and noticed this event occurs once call arrives on finesse not when agent answer the call.

Thanks

Touqeer

Hi Touqeer,

As you already tested, handleNewDialog is called when the call arrives on Finesse and not when the agent answers the call.

In the handleNewDialog, you need to add a handler for when the dialog gets changed, something like this:

     dialog.addHandler('change', _processCall);

This is the method that gets called when there is any change to the dialog, such as when the agent answers the call.

Thanx,

Denise

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: