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

CVI Appending our company string to another company string

Hello

We had a user try to dial an MS Teams meeting to another company and our CVI string kept being appended to it.  Image is attached.  We have a speed dial for our own CVI string but not sure why the system would be appending it to a manually entered one.   See attached.  Any idea why it is doing this?

1 Reply 1

Wayne DeNardi
VIP Alumni
VIP Alumni

It looks like your end user may be using your local speed dial / macro to dial the CVI at the other site.  If the address is entered in to the normal green dial button dialog, rather than any "Join MS Teams" shortcut you have created, it should work as expected.  There are also modifications you could make to any Macro that you have running to detect any other domain and not append your domain to the dial string.  An example macro that detects an @ is below (note: change "yoursite" to your webex domain):

const xapi = require('xapi');

const KEYBOARD_TYPES = {
      NUMERIC     :   'Numeric'
    , SINGLELINE  :   'SingleLine'
    , PASSWORD    :   'Password'
    , PIN         :   'PIN'
}
const CALL_TYPES = {
      AUDIO     :   'Audio'
    , VIDEO     :   'Video'
}

const DIALPAD_ID = 'panel_1';
const DIALHOSTPIN_ID = 'webexhostpin';

const INROOMCONTROL_WEBEXCONTROL_PANELID = 'panel_1';

/* Use these to check that its a valid number (depending on what you want to allow users to call */
const REGEXP_URLDIALER = /([a-zA-Z0-9@_\-\.]+)/; /*  . Use this one if you want to allow URL dialling */
const REGEXP_NUMERICDIALER =  /^([0-9]{9,13})$/; /* Use this one if you want to limit calls to numeric only. In this example, require number to be between 3 and 10 digits. */

const DIALPREFIX_AUDIO_GATEWAY = '0';
const DIALPOSTFIX_WEBEXURL = '.yoursite@m.webex.com';

var webexnumbertodial = '';
var hostpin = '';
var isInWebexCall = 0;

function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}

xapi.event.on('CallDisconnect', (event) => {
	isInWebexCall = 0;
    });


function showDialPad(text){

         xapi.command("UserInterface Message TextInput Display", {
               InputType: KEYBOARD_TYPES.NUMERIC
             , Placeholder: '10 digit or full dial string'
             , Title: "Microsoft Teams Call"
             , Text: text
             , SubmitText: "Dial"
             , FeedbackId: DIALPAD_ID
         }).catch((error) => { console.error(error); });
}

/* This is the listener for the in-room control panel button that will trigger the dial panel to appear */
xapi.event.on('UserInterface Extensions Panel Clicked', (event) => {
    if(event.PanelId === INROOMCONTROL_WEBEXCONTROL_PANELID){
         showDialPad("Please enter the 10 digit VTC Conference ID:" );
    }
});


xapi.event.on('UserInterface Message TextInput Response', (event) => {
    switch(event.FeedbackId){
        case DIALPAD_ID:
            let regex =REGEXP_NUMERICDIALER; // First check, is it a valid number to dial
            let match = regex.exec(event.Text);
            if (match !== null) {
                let contains_at_regex = /@/;
                let contains_at_in_dialstring = contains_at_regex.exec(event.Text);
                if (contains_at_in_dialstring !== null) {
                    webexnumbertodial = match[1];
                }
                else{
                    webexnumbertodial = match[1];
                    webexnumbertodial = webexnumbertodial + DIALPOSTFIX_WEBEXURL ; // Here we add the default hostname to the SIP number
                }
                 sleep(200).then(() => { //this is a necessary trick to get it working with multiple touch panels to not mess up event-clears from other panels
            });

            }
            else{
                showDialPad("You have entered an invalid number. Please enter the 10 digit VTC Conference ID and try again." );
            }
            break;
    }
          xapi.command("dial", {Number: webexnumbertodial});
}
);

 

Wayne

Please remember to mark helpful responses and to set your question as answered if appropriate.

Getting Started

Welcome to the Webex Community. This is your home to ask questions, share knowledge, and attend live webinars.