cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
838
Views
0
Helpful
1
Replies

Numerous dial numbers for Quick Dial macro

Louisgronland
Level 1
Level 1

Hi There,

Im relatively new to using the API Language. Im in the process of creating a Support Page for my company.

We are currently using the Touch 10 Devices in room and I wish to have a button, that when selected it dials through to our technicians. Im using the standard "Quick Dial" Macro that is provided through the examples tab on the Macro page.

My issue is that having trouble working out how to use multiple Addresses for the call option. I want it so that after the first number is dialled, if the call is reject by the technician, the call is automatically forward to the next technician in line.

The is the current code it is using,


import xapi from 'xapi';

const numbers = {
  dial_support: 'Insert Technician Webex Address',
};

function dial(number) {
  console.log('dial', number);
  xapi.Command.Dial({ Number: number });
}

function listenToGui() {
  xapi.Event.UserInterface.Extensions.Widget.Action.on((event) => {
    if (event.Type === 'clicked') {
      const number = numbers[event.WidgetId];
      if (number) {
        dial(number);
      }
    }
  });
}

listenToGui();
 
What code is it that im missing in order for it to dial another Address if the first address in line rejects the call or is engaged. 
 
Many Thanks,
Louis.
1 Reply 1

Janos Benyovszki
Cisco Employee
Cisco Employee

@Louisgronland you could try listening to Call related events, for example as shown here https://roomos.cisco.com/xapi/search?search=call&Type=Event . The Call Status https://roomos.cisco.com/xapi/Status.Call[n].Status/?search=dial could also tell you if the call was successful or not, and you could direct your flow accordingly.