2c2698e4c56bde16bdef1c85282d28cb466d1e21
[motion2.git] / server / services / agi / vertices.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xaa3f=['TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','gotoif','condition','no\x20condition\x20configured','true','false','gotoiftime','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20interval\x20configured','IFTIME\x20%s\x20%s','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','ispeechTTS','ispeech\x20TTS\x20is\x20unreachable','login','findBy','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','no\x20find\x20by\x20configured','math','Enter\x20in\x20MATH\x20(%s)\x20block','operation','no\x20operation\x20configured','math\x20%s','%s[%s]','variable\x20%s[key]\x20set','menu','Enter\x20in\x20MENU\x20(%s)\x20block','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause','pause_id','playback','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20selected','no\x20queue\x20found','indexOf','toLowerCase','QUEUE','gosub','position','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','%s/recordings/%s.%s','RECORDING_SAVENAME','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','Response:','inspect','no\x20variable\x20selected\x20for\x20the\x20response','%s_STATUS_CODE','200','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','number','sayphonetic','sayPhonetic','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','no\x20mail\x20account\x20configured','Smtp','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','user','bcc','subject','service','host','port','secure','authentication','auth','pass','account_id','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','sendSMS','sms_account_id','getSmsAccount','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','Answer','Skipped\x20Answer','subproject','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','no\x20subproject\x20selected','arg_1','agi://%s/square,\x22%s\x22,\x22%s\x22','AGI','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20no\x20stored','google_cloud_tts','apiKey','no\x20apiKey\x20configured','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','Google\x20Cloud\x20TTS\x20is\x20unreachable','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','voicemail','VOICEMAIL','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','join','exports','path','util','shelljs','odbc','mustache','request-promise','agi','../../config/environment/shared','/var/opt/motion2/server/files','rawHeaders','rawBody','getsecretdigits','channel','rpc','prototype','getVariable','getVariableById','then','catch','getVoiceQueue','getVoiceQueueById','getSquareProject','getSquareProjectById','getSquareOdbc','dsn','getUser','getUserById','name','getTrunk','getTrunkById','getSound','getSoundById','getSoundPath','getMailAccount','getMailAccountById','sendMailMessage','getIntervals','getIntervalById','IntervalId','interval','Intervals','format','%s/sounds/converted/%s','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccountById','createSmsMessage','createSquareDetailsReport','uniqueid','label','agicommand','createSquareRecording','callerid','calleridname','context','extension','priority','accountcode','file','createSquareMessage','createCmContact','log','in\x20createcmcontact','dialTimezone','isNil','VALUE\x20TZ','CALLERID(dialTimezone)','getContactByPhone','phone','RETVALRPC','isEmpty','callback_','random','lastName','list_id','scheduledAt','callback','Callback\x20scheduled\x20at\x20','toString','callback_priority','getPause','getPauseById','agentPause','agent','agentUnpause','agentLogout','agentLogin','internal','%s/%s@from-sip/n','LOCAL','exec','trim','googleCloudTTS','google_cloud_tts_text_type','text','languageCode','en-US','ssmlGender','MALE','audioEncoding','MP3','googleTTS','google_tts_language','restAPI','url','method','timeout','includes','POST','PUT','toUpperCase','body','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','computedVariables','sync','render','stringify','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','statusMessage','message','500\x20-\x20Internal\x20Server\x20Error','options','googleDialogflow','key','dialogflow_language','sestekNDA','speed','ispeechASR','ispeech_asr_language','model','aws_access_key_id','aws_secret_access_key','aws_polly_region','aws_polly_voice','Amy','aws_text_type','awsLex','aws_bot_name','googleASR','google_asr_language','tildeASR','appid','uri','clone','hasOwnProperty','isString','replaceObjectAllVariables','replaceAllVariables','recursiveNodeIndex','isArray','saveRestApiResult','setVariable','%s.%s','replaceall\x20init','split','nextbracket','length','replaceAll','extra','replaceall\x20end','getAndSetVariable','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','isConfigured','maxRetry','retry','mrcpsynth','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','noop','MRCPSynth','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','grammar','MRCPRecog','MRCP_RECOG_CONFIDENCE','RECOG_INPUT()','RECOG_INSTANCE()','Enter\x20in\x20AGI\x20(%s)\x20block','command','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','wait','answer','enter\x20in\x20callbackblock','Enter\x20in\x20CALLBACK\x20(%s)\x20block','no\x20list\x20selected','delay','add','minutes','before\x20createcmcontact','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Executed\x20command\x20%s\x20%s','lumenvoxtts','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','no\x20text\x20configured','sestektts','lumenvoxasr','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','no\x20grammar\x20configured','RECOG_CONFIDENCE()','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','sestekasr','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_CONFIDENCE','SESTEK_ASR_TRANSCRIPT','SESTEK_ASR_INSTANCE','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20database\x20selected','no\x20odbc\x20database\x20found','no\x20query\x20configured','replace','getQueryOdbc','variable_id','forEach','keys','%s[%s][%s]','%s_ROWS_COUNT','variable\x20%s\x20set','dial','debug','sip_id','no\x20user\x20found','DIAL','SIP/%s','opts','Executed\x20command\x20%s','dialogflow','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','bot','Trying\x20Dialogflow:\x20%s','out','Dialogflow\x20Result\x20%s','speech','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','no\x20ndauth\x20url\x20configured','username','password','no\x20password\x20configured','ndassistant_url','Trying\x20SestekNDA:\x20%s','audiofile','Sestek\x20NDA\x20%s\x20file\x20created','unlink','SestekNDA\x20Result\x20%s','SestekNDA\x20is\x20unreachable','Enter\x20in\x20END\x20(%s)\x20block','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','no\x20trunk\x20found','trunk_name','SIP/%s/%s','Enter\x20in\x20FINALLY\x20(%s)\x20block','finally','no\x20file\x20audio\x20selected','file_id','no\x20file\x20audio\x20found','no\x20variable\x20selected\x20for\x20the\x20result','getData','response','mindigit','maxdigit','no\x20variable\x20found','hiddendigitsnum','hiddendigitspos','first','substr','generate','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','Trying\x20aws\x20Polly\x20%s','awsPolly','aws\x20Polly\x20%s\x20file\x20created','streamFile','.wav','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','AWS_LEX_%s','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','no\x20key\x20configured','wav','%s/recordings/%s','beep','NOBEEP','recordFile','intKey','google\x20%s\x20file\x20created','GOOGLE_ASR_%s','no\x20appid\x20configured','appsecret','no\x20appsecret\x20configured','tilde\x20%s\x20file\x20created'];(function(_0x4fbfd9,_0x3ab91a){var _0x31dc94=function(_0x11e53b){while(--_0x11e53b){_0x4fbfd9['push'](_0x4fbfd9['shift']());}};_0x31dc94(++_0x3ab91a);}(_0xaa3f,0x95));var _0xfaa3=function(_0x444b29,_0x127582){_0x444b29=_0x444b29-0x0;var _0x428314=_0xaa3f[_0x444b29];return _0x428314;};'use strict';var fs=require('fs');var path=require(_0xfaa3('0x0'));var util=require(_0xfaa3('0x1'));var _=require('lodash');var sh=require(_0xfaa3('0x2'));var odbc=require(_0xfaa3('0x3'))();var rs=require('randomstring');var moment=require('moment');var Mustache=require(_0xfaa3('0x4'));var rp=require(_0xfaa3('0x5'));var logger=require('../../config/logger')(_0xfaa3('0x6'));var config=require('../../config/environment');var shared=require(_0xfaa3('0x7'));var scripts=require('./scripts');var FILES_PATH=_0xfaa3('0x8');var recursiveMapAttributes=[_0xfaa3('0x9'),_0xfaa3('0xa')];var verticesWithRetry=['menu','getdigits',_0xfaa3('0xb')];var AGIVertices=function(_0x27f678,_0x2a7856,_0x5091ac){this[_0xfaa3('0xc')]=_0x27f678;this[_0xfaa3('0xd')]=_0x2a7856;this['mailRpc']=_0x5091ac;};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xf')]=function(_0xe0f5ed,_0x527b37){this[_0xfaa3('0xd')][_0xfaa3('0x10')](_0xe0f5ed)[_0xfaa3('0x11')](function(_0x18ee95){_0x527b37(null,_0x18ee95?_0x18ee95['name']:![]);})[_0xfaa3('0x12')](function(_0x1ea8ed){_0x527b37(_0x1ea8ed);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x13')]=function(_0x1720bb,_0x408854){this['rpc'][_0xfaa3('0x14')](_0x1720bb)[_0xfaa3('0x11')](function(_0x39812b){_0x408854(null,_0x39812b?_0x39812b['name']:![]);})[_0xfaa3('0x12')](function(_0xdcb52){_0x408854(_0xdcb52);});};AGIVertices['prototype'][_0xfaa3('0x15')]=function(_0x5856c1,_0x5d0552){this['rpc'][_0xfaa3('0x16')](_0x5856c1)[_0xfaa3('0x11')](function(_0xd732ce){_0x5d0552(null,_0xd732ce?_0xd732ce['name']:![]);})['catch'](function(_0x54c96f){_0x5d0552(_0x54c96f);});};AGIVertices['prototype'][_0xfaa3('0x17')]=function(_0x4d3833,_0x1f893d){this['rpc']['getSquareOdbcById'](_0x4d3833)['then'](function(_0x13305e){_0x1f893d(null,_0x13305e?_0x13305e[_0xfaa3('0x18')]:![]);})[_0xfaa3('0x12')](function(_0xdf7a71){_0x1f893d(_0xdf7a71);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x19')]=function(_0x4e264f,_0x1daa2d){this[_0xfaa3('0xd')][_0xfaa3('0x1a')](_0x4e264f)[_0xfaa3('0x11')](function(_0x602eab){_0x1daa2d(null,_0x602eab?_0x602eab[_0xfaa3('0x1b')]:![]);})[_0xfaa3('0x12')](function(_0x62fcd7){_0x1daa2d(_0x62fcd7);});};AGIVertices['prototype'][_0xfaa3('0x1c')]=function(_0x38636a,_0x5000ec){this['rpc'][_0xfaa3('0x1d')](_0x38636a)['then'](function(_0xdba825){_0x5000ec(null,_0xdba825?_0xdba825['name']:![]);})[_0xfaa3('0x12')](function(_0x19b6f4){_0x5000ec(_0x19b6f4);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x1e')]=function(_0x255eda,_0x2fb407){var _0xa756cb=this;this['rpc'][_0xfaa3('0x1f')](_0x255eda)[_0xfaa3('0x11')](function(_0xf65fe0){_0x2fb407(null,_0xf65fe0?_0xa756cb[_0xfaa3('0x20')](_0xf65fe0['save_name']):![]);})['catch'](function(_0x830564){_0x2fb407(_0x830564);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x21')]=function(_0x26d0da,_0x591b3a){this[_0xfaa3('0xd')][_0xfaa3('0x22')](_0x26d0da)[_0xfaa3('0x11')](function(_0x4c4494){_0x591b3a(null,_0x4c4494?_0x4c4494:![]);})[_0xfaa3('0x12')](function(_0x13dc00){_0x591b3a(_0x13dc00);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x23')]=function(_0x51ff50,_0x1e5deb,_0xd7aab8){this['mailRpc'][_0xfaa3('0x23')](_0x51ff50,_0x1e5deb)[_0xfaa3('0x11')](function(){_0xd7aab8(null);})[_0xfaa3('0x12')](function(_0x3d2af3){_0xd7aab8(_0x3d2af3);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x24')]=function(_0x285dcb,_0x4ffb79){this[_0xfaa3('0xd')][_0xfaa3('0x25')](_0x285dcb)['then'](function(_0x21a496){if(_0x21a496){if(_0x21a496[_0xfaa3('0x26')]){_0x4ffb79(null,[_0x21a496[_0xfaa3('0x27')]]);}else{_0x4ffb79(null,_['map'](_0x21a496[_0xfaa3('0x28')],_0xfaa3('0x27')));}}else{_0x4ffb79(null,![]);}})['catch'](function(_0x5dc127){_0x4ffb79(_0x5dc127);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x20')]=function(_0x224622){return util[_0xfaa3('0x29')](_0xfaa3('0x2a'),FILES_PATH,_0x224622);};AGIVertices[_0xfaa3('0xe')]['getQueryOdbc']=function(_0x56461f,_0x5c107c,_0x22ff28){odbc[_0xfaa3('0x2b')](_0x56461f,function(_0x5ae36e){if(_0x5ae36e){logger[_0xfaa3('0x2c')](_0xfaa3('0x2d'),_0x5ae36e);_0x22ff28(_0x5ae36e);}else{logger[_0xfaa3('0x2e')](_0xfaa3('0x2f'));odbc[_0xfaa3('0x30')](_0x5c107c,function(_0x3407fc,_0x2a7b80){if(_0x3407fc){logger[_0xfaa3('0x2e')](_0xfaa3('0x31'),_0x5c107c);_0x22ff28(_0x3407fc);}else{logger[_0xfaa3('0x2e')](_0xfaa3('0x32'),_0x5c107c);odbc[_0xfaa3('0x33')](function(_0x45f01f){if(_0x45f01f){logger[_0xfaa3('0x2c')](_0xfaa3('0x34'),_0x45f01f);}_0x22ff28(null,_0x2a7b80);});}});}});};AGIVertices['prototype']['getSmsAccount']=function(_0x3b69d2,_0x44aa6c){this[_0xfaa3('0xd')][_0xfaa3('0x35')](_0x3b69d2)['then'](function(_0x13cb73){_0x44aa6c(null,_0x13cb73?_0x13cb73:![]);})[_0xfaa3('0x12')](function(_0x4650f0){_0x44aa6c(_0x4650f0);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x36')]=function(_0x2b7fd0,_0x3c1dff){this[_0xfaa3('0xd')][_0xfaa3('0x36')](_0x2b7fd0)[_0xfaa3('0x11')](function(_0xd54211){_0x3c1dff(null,_0xd54211);})[_0xfaa3('0x12')](function(_0x150b49){_0x3c1dff(_0x150b49);});};AGIVertices[_0xfaa3('0xe')]['createSquareDetailsReport']=function(_0x2b1db7,_0x149d27,_0x16dd72){this[_0xfaa3('0xd')][_0xfaa3('0x37')]({'uniqueid':this[_0xfaa3('0xc')][_0xfaa3('0x38')],'node':_0x2b1db7[_0xfaa3('0x39')],'application':_0x2b1db7[_0xfaa3('0x3a')],'data':_0x149d27||null,'project_name':this[_0xfaa3('0xc')]['arg_1'],'callerid':this['channel']['callerid']})[_0xfaa3('0x11')](function(_0x592f9a){if(_0x16dd72){_0x16dd72(null,_0x592f9a);}})[_0xfaa3('0x12')](function(_0x13125e){if(_0x16dd72){_0x16dd72(_0x13125e);}});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x3b')]=function(_0x25b148,_0x454912,_0x366f6e,_0x4d999b){this[_0xfaa3('0xd')][_0xfaa3('0x3b')]({'uniqueid':this['channel'][_0xfaa3('0x38')],'callerid':this['channel'][_0xfaa3('0x3c')],'calleridname':this[_0xfaa3('0xc')][_0xfaa3('0x3d')],'context':this[_0xfaa3('0xc')][_0xfaa3('0x3e')],'extension':this['channel'][_0xfaa3('0x3f')],'priority':this[_0xfaa3('0xc')][_0xfaa3('0x40')],'accountcode':this[_0xfaa3('0xc')][_0xfaa3('0x41')],'dnid':this[_0xfaa3('0xc')]['dnid'],'projectName':this['channel']['arg_1'],'saveName':_0x454912,'filename':_0x25b148[_0xfaa3('0x42')]||_0x454912,'savePath':_0x366f6e})[_0xfaa3('0x11')](function(_0x28bdb9){_0x4d999b(null,_0x28bdb9);})[_0xfaa3('0x12')](function(_0x132557){_0x4d999b(_0x132557);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x43')]=function(_0x1b9355,_0x36465b,_0x154626){this[_0xfaa3('0xd')][_0xfaa3('0x43')]({'uniqueid':this[_0xfaa3('0xc')][_0xfaa3('0x38')],'body':_0x1b9355,'direction':_0x36465b})['then'](function(_0x525f75){if(_0x154626){_0x154626(null,_0x525f75);}})[_0xfaa3('0x12')](function(_0x1253cd){if(_0x154626){_0x154626(_0x1253cd);}});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x44')]=function(_0x5641ed,_0xa3cd71){console[_0xfaa3('0x45')](_0xfaa3('0x46'),_0x5641ed);console['log']('in\x20createcmcontact\x20callback',_0xa3cd71);var _0x4ee5bb=0x0;if(_['has'](_0x5641ed,_0xfaa3('0x47'))){if(!_[_0xfaa3('0x48')](_0x5641ed[_0xfaa3('0x47')])){var _0x54d2d2=_0x5641ed['dialTimezone'];console[_0xfaa3('0x45')](_0xfaa3('0x49'),_0x54d2d2);if(_0x5641ed[_0xfaa3('0x47')]==_0xfaa3('0x4a')){this[_0xfaa3('0xd')][_0xfaa3('0x4b')]({'phone':_0x5641ed[_0xfaa3('0x4c')]})['then'](function(_0x472dc2){console[_0xfaa3('0x45')](_0xfaa3('0x4d'),_0x472dc2);_0xa3cd71(null,_0x472dc2);});}else{console[_0xfaa3('0x45')]('TZ\x20found\x20in\x20shared:',shared[_0x54d2d2]);}}}this[_0xfaa3('0xd')][_0xfaa3('0x44')]({'firstName':_[_0xfaa3('0x4e')](_0x5641ed[_0xfaa3('0x1b')])||_[_0xfaa3('0x48')](_0x5641ed['name'])?_0xfaa3('0x4f')+Math[_0xfaa3('0x50')]():_0x5641ed[_0xfaa3('0x1b')],'lastName':_[_0xfaa3('0x4e')](_0x5641ed[_0xfaa3('0x51')])||_[_0xfaa3('0x48')](_0x5641ed[_0xfaa3('0x51')])?null:_0x5641ed[_0xfaa3('0x51')],'phone':_0x5641ed[_0xfaa3('0x4c')],'ListId':_0x5641ed[_0xfaa3('0x52')],'scheduledat':_0x5641ed[_0xfaa3('0x53')],'callbackUniqueid':this['channel'][_0xfaa3('0x38')],'tags':_0xfaa3('0x54'),'description':_0xfaa3('0x55')+_0x5641ed[_0xfaa3('0x53')][_0xfaa3('0x56')](),'priority':_0x5641ed[_0xfaa3('0x57')]})[_0xfaa3('0x11')](function(_0x4d0feb){_0xa3cd71(null,_0x4d0feb);})[_0xfaa3('0x12')](function(_0x5b2a81){_0xa3cd71(_0x5b2a81);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x58')]=function(_0x11e497,_0x327c7a){this[_0xfaa3('0xd')][_0xfaa3('0x59')](_0x11e497)[_0xfaa3('0x11')](function(_0x294dd0){_0x327c7a(null,_0x294dd0?_0x294dd0[_0xfaa3('0x1b')]:![]);})[_0xfaa3('0x12')](function(_0x2be27c){_0x327c7a(_0x2be27c);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x5a')]=function(_0x58230f,_0x2a8237,_0x424452){var _0x4e7514={'role':_0xfaa3('0x5b')};_0x4e7514[_0x58230f]=this[_0xfaa3('0xc')][_0xfaa3('0x3c')];this['rpc'][_0xfaa3('0x5a')](_0x4e7514,_0x2a8237,this[_0xfaa3('0xc')][_0xfaa3('0x38')])[_0xfaa3('0x11')](function(_0x461c2c){_0x424452(null,_[_0xfaa3('0x48')](_0x461c2c)?![]:!![]);})[_0xfaa3('0x12')](function(_0x4d75ec){logger[_0xfaa3('0x2c')](_0x4d75ec);_0x424452(null,![]);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x5c')]=function(_0x57b717,_0x1c7fa3){var _0x2fb068={'role':_0xfaa3('0x5b')};_0x2fb068[_0x57b717]=this[_0xfaa3('0xc')]['callerid'];this[_0xfaa3('0xd')]['agentUnpause'](_0x2fb068)[_0xfaa3('0x11')](function(_0x2bab29){_0x1c7fa3(null,_[_0xfaa3('0x48')](_0x2bab29)?![]:!![]);})['catch'](function(_0x19869){logger['error'](_0x19869);_0x1c7fa3(null,![]);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x5d')]=function(_0x5ebd5a,_0x5da38f){var _0x272927={'role':_0xfaa3('0x5b')};_0x272927[_0x5ebd5a]=this[_0xfaa3('0xc')][_0xfaa3('0x3c')];this[_0xfaa3('0xd')][_0xfaa3('0x5d')](_0x272927)['then'](function(_0x3ea040){_0x5da38f(null,_[_0xfaa3('0x48')](_0x3ea040)?![]:!![]);})[_0xfaa3('0x12')](function(_0x47be12){logger['error'](_0x47be12);_0x5da38f(null,![]);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x5e')]=function(_0x2b8337,_0x591439){var _0x3cc244={'role':_0xfaa3('0x5b')};_0x3cc244[_0x2b8337]=this[_0xfaa3('0xc')][_0xfaa3('0x3c')];var _0x1732c6=_0x2b8337!=_0xfaa3('0x5f')?util[_0xfaa3('0x29')](_0xfaa3('0x60'),_0xfaa3('0x61'),this[_0xfaa3('0xc')]['callerid']):undefined;this[_0xfaa3('0xd')][_0xfaa3('0x5e')](_0x3cc244,_0x1732c6)[_0xfaa3('0x11')](function(_0x4b3cc8){_0x591439(null,_[_0xfaa3('0x48')](_0x4b3cc8)?![]:!![]);})[_0xfaa3('0x12')](function(_0xdad92c){logger[_0xfaa3('0x2c')](_0xdad92c);_0x591439(null,![]);});};AGIVertices['prototype']['shellCommand']=function(_0x1409e8,_0x419619){sh[_0xfaa3('0x62')](_[_0xfaa3('0x63')](_0x1409e8),function(_0x954255,_0x325828){var _0x21dfbe=_0x325828['replace'](/(\r\n|\n|\r)/gm,'');_0x419619(null,_0x21dfbe);});};AGIVertices['prototype'][_0xfaa3('0x64')]=function(_0x5da61f,_0x27d204){scripts[_0xfaa3('0x64')](_0x5da61f['apiKey'],_0x5da61f[_0xfaa3('0x65')]||_0xfaa3('0x66'),_0x5da61f[_0xfaa3('0x66')],_0x5da61f[_0xfaa3('0x67')]||_0xfaa3('0x68'),_0x5da61f[_0xfaa3('0x69')]||_0xfaa3('0x6a'),_0x5da61f[_0xfaa3('0x6b')]||_0xfaa3('0x6c'))[_0xfaa3('0x11')](function(_0x565bf5){_0x27d204(null,_0x565bf5);})[_0xfaa3('0x12')](function(_0x453d92){_0x27d204(_0x453d92);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x6d')]=function(_0x2f7832,_0x396613){scripts[_0xfaa3('0x6d')](_0x2f7832['text'],_0x2f7832[_0xfaa3('0x6e')]||'en',0x1)[_0xfaa3('0x11')](function(_0x46e9ce){_0x396613(null,_0x46e9ce);})[_0xfaa3('0x12')](function(_0x5ed8f6){_0x396613(_0x5ed8f6);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x6f')]=function(_0x2a3e25,_0x24b35d){var _0x552be2={'uri':_0x2a3e25[_0xfaa3('0x70')],'method':_0x2a3e25[_0xfaa3('0x71')],'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x2a3e25[_0xfaa3('0x72')])==='number'&&parseInt(_0x2a3e25['timeout'])>=0x1?parseInt(_0x2a3e25[_0xfaa3('0x72')])*0x3e8:0x5*0x3e8};if(_[_0xfaa3('0x73')]([_0xfaa3('0x74'),_0xfaa3('0x75')],_0x552be2[_0xfaa3('0x71')][_0xfaa3('0x76')]())){try{_0x552be2[_0xfaa3('0x77')]=_0x2a3e25['rawBody']?JSON[_0xfaa3('0x78')](_0x2a3e25[_0xfaa3('0xa')]):{};}catch(_0x5d0767){logger['error'](_0xfaa3('0x79'),_0x5d0767);}}try{_0x552be2[_0xfaa3('0x7a')]=_0x2a3e25[_0xfaa3('0x9')]?JSON[_0xfaa3('0x78')](_0x2a3e25[_0xfaa3('0x9')]):{};}catch(_0x3d8e3b){logger['error']('An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function',_0x3d8e3b);}if(_0x2a3e25[_0xfaa3('0x7b')]){try{var _0x27e556=require(_0x2a3e25[_0xfaa3('0x7b')])[_0xfaa3('0x7c')](this,_0x552be2);_0x552be2['uri']=Mustache[_0xfaa3('0x7d')](_0x2a3e25[_0xfaa3('0x70')],_0x27e556,{},['$$','$$']);if(_0x552be2[_0xfaa3('0x7a')]){_0x552be2['headers']=JSON[_0xfaa3('0x78')](Mustache['render'](JSON[_0xfaa3('0x7e')](_0x552be2[_0xfaa3('0x7a')]),_0x27e556,{},['$$','$$']));}if(_0x552be2[_0xfaa3('0x77')]){_0x552be2[_0xfaa3('0x77')]=JSON[_0xfaa3('0x78')](Mustache[_0xfaa3('0x7d')](JSON[_0xfaa3('0x7e')](_0x552be2[_0xfaa3('0x77')]),_0x27e556,{},['$$','$$']));}}catch(_0x48b541){logger['error'](_0xfaa3('0x7f'),_0x48b541);}}rp(_0x552be2)[_0xfaa3('0x11')](function(_0x1a6ab3){var _0x238998={'statusCode':_0x1a6ab3[_0xfaa3('0x80')]||0xc8,'statusMessage':_0x1a6ab3[_0xfaa3('0x81')]||'OK','headers':_0x1a6ab3[_0xfaa3('0x7a')]||{},'body':_0x1a6ab3[_0xfaa3('0x77')]||{}};_0x24b35d(null,_0x238998);})[_0xfaa3('0x12')](function(_0x29a060){var _0x4f577c={'statusCode':_0x29a060[_0xfaa3('0x80')]||0x1f4,'statusMessage':_0x29a060[_0xfaa3('0x82')]||_0xfaa3('0x83'),'headers':_0x29a060[_0xfaa3('0x84')][_0xfaa3('0x7a')]||{},'body':_0x29a060[_0xfaa3('0x84')]['body']||{}};_0x24b35d(null,_0x4f577c);});};AGIVertices['prototype'][_0xfaa3('0x85')]=function(_0x399aba,_0x2acc18){scripts['googleDialogflow'](this[_0xfaa3('0xc')]['uniqueid'],_0x399aba[_0xfaa3('0x86')],_0x399aba['text'],_0x399aba[_0xfaa3('0x87')]||'en')['then'](function(_0xe5f36c){_0x2acc18(null,_0xe5f36c);})[_0xfaa3('0x12')](function(_0x148173){_0x2acc18(_0x148173);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x88')]=function(_0x530c17,_0xf165){scripts[_0xfaa3('0x88')](this[_0xfaa3('0xc')],_0x530c17)[_0xfaa3('0x11')](function(_0x4db735){_0xf165(null,_0x4db735);})[_0xfaa3('0x12')](function(_0x521d0a){_0xf165(_0x521d0a);});};AGIVertices[_0xfaa3('0xe')]['ispeechTTS']=function(_0x1cfadc,_0x5890c1){scripts['ispeechTTS'](_0x1cfadc[_0xfaa3('0x86')],_0x1cfadc['text'],_0x1cfadc['ispeech_tts_language']||_0xfaa3('0x68'),_0x1cfadc[_0xfaa3('0x89')])[_0xfaa3('0x11')](function(_0x52adfd){_0x5890c1(null,_0x52adfd);})[_0xfaa3('0x12')](function(_0x2166ef){_0x5890c1(_0x2166ef);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x8a')]=function(_0x482a8d,_0xccc575,_0x2a4b48){scripts[_0xfaa3('0x8a')](_0xccc575,_0x482a8d['key'],_0x482a8d[_0xfaa3('0x8b')]||_0xfaa3('0x68'),this['isConfigured'](_0x482a8d[_0xfaa3('0x8c')])?_0x482a8d[_0xfaa3('0x8c')]:undefined)[_0xfaa3('0x11')](function(_0x391c20){_0x2a4b48(null,_0x391c20);})[_0xfaa3('0x12')](function(_0x1a0a15){_0x2a4b48(_0x1a0a15);});};AGIVertices[_0xfaa3('0xe')]['awsPolly']=function(_0x1b3fa9,_0x204f0a){scripts['awsPolly'](_0x1b3fa9[_0xfaa3('0x8d')],_0x1b3fa9[_0xfaa3('0x8e')],_0x1b3fa9[_0xfaa3('0x8f')],_0x1b3fa9[_0xfaa3('0x90')]||_0xfaa3('0x91'),_0x1b3fa9[_0xfaa3('0x66')],_0x1b3fa9[_0xfaa3('0x92')]||_0xfaa3('0x66'))['then'](function(_0x5a8005){_0x204f0a(null,_0x5a8005);})[_0xfaa3('0x12')](function(_0x5ac7a0){_0x204f0a(_0x5ac7a0);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x93')]=function(_0x14241e,_0x2eab9a){scripts[_0xfaa3('0x93')](this['channel'][_0xfaa3('0x38')],_0x14241e[_0xfaa3('0x8d')],_0x14241e[_0xfaa3('0x8e')],_0x14241e['aws_lex_region'],_0x14241e[_0xfaa3('0x66')],_0x14241e[_0xfaa3('0x94')])[_0xfaa3('0x11')](function(_0x1b9671){_0x2eab9a(null,_0x1b9671);})[_0xfaa3('0x12')](function(_0x7703e5){_0x2eab9a(_0x7703e5);});};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x95')]=function(_0x2b384c,_0x24d657,_0x51d490){scripts[_0xfaa3('0x95')](_0x24d657,_0x2b384c['key'],_0x2b384c[_0xfaa3('0x96')]||_0xfaa3('0x68'))[_0xfaa3('0x11')](function(_0x4fc698){_0x51d490(null,_0x4fc698);})[_0xfaa3('0x12')](function(_0x690f7c){_0x51d490(_0x690f7c);});};AGIVertices['prototype'][_0xfaa3('0x97')]=function(_0x3d4735,_0x1f8127,_0x22e879){scripts[_0xfaa3('0x97')](_0x1f8127,_0x3d4735[_0xfaa3('0x98')],_0x3d4735['appsecret'],_0x3d4735[_0xfaa3('0x99')])['then'](function(_0x5dea93){_0x22e879(null,_0x5dea93);})[_0xfaa3('0x12')](function(_0x3530c6){_0x22e879(_0x3530c6);});};AGIVertices[_0xfaa3('0xe')]['clear']=function(_0x83eaaf){var _0x33a3ba=_[_0xfaa3('0x73')](verticesWithRetry,_0x83eaaf['agicommand'])?_0x83eaaf:_[_0xfaa3('0x9a')](_0x83eaaf);for(var _0x572d63 in _0x33a3ba){if(_0x33a3ba[_0xfaa3('0x9b')](_0x572d63)){if(_0x33a3ba[_0x572d63]&&_[_0xfaa3('0x9c')](_0x33a3ba[_0x572d63])){if(_[_0xfaa3('0x73')](recursiveMapAttributes,_0x572d63)){_0x33a3ba[_0x572d63]=this[_0xfaa3('0x9d')](_0x33a3ba[_0x572d63]);}else{_0x33a3ba[_0x572d63]=this[_0xfaa3('0x9e')](_0x33a3ba[_0x572d63]);}}}}return _0x33a3ba;};AGIVertices[_0xfaa3('0xe')]['recursiveNodeIndex']=function(_0x277f4c){for(var _0x550bde in _0x277f4c){if(_0x277f4c['hasOwnProperty'](_0x550bde)){if(_['isPlainObject'](_0x277f4c[_0x550bde])){this[_0xfaa3('0x9f')](_0x277f4c[_0x550bde]);}else if(_[_0xfaa3('0xa0')](_0x277f4c[_0x550bde])){for(var _0x38c77b=0x0;_0x38c77b<_0x277f4c[_0x550bde]['length'];_0x38c77b++){this[_0xfaa3('0x9f')](_0x277f4c[_0x550bde][_0x38c77b]);}}else if(_[_0xfaa3('0x9c')](_0x277f4c[_0x550bde])){_0x277f4c[_0x550bde]=this[_0xfaa3('0x9e')](_0x277f4c[_0x550bde]);}}}};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xa1')]=function(_0x1fa7ad,_0x3bfd93){for(var _0x561515 in _0x1fa7ad){if(_0x1fa7ad[_0xfaa3('0x9b')](_0x561515)){if(_['isPlainObject'](_0x1fa7ad[_0x561515])){if(!_[_0xfaa3('0x4e')](_0x1fa7ad[_0x561515])){this['saveRestApiResult'](_0x1fa7ad[_0x561515],util[_0xfaa3('0x29')]('%s.%s',_0x3bfd93,_0x561515));}}else if(_['isArray'](_0x1fa7ad[_0x561515])){for(var _0x444957=0x0;_0x444957<_0x1fa7ad[_0x561515]['length'];_0x444957++){this[_0xfaa3('0xa1')](_0x1fa7ad[_0x561515][_0x444957],util['format']('%s.%s',_0x3bfd93,_0x561515+'['+_0x444957+']'));}}else{if(!_['isNil'](_0x1fa7ad[_0x561515])){this[_0xfaa3('0xc')][_0xfaa3('0xa2')](util[_0xfaa3('0x29')](_0xfaa3('0xa3'),_0x3bfd93,_0x561515),_0x1fa7ad[_0x561515]);}}}}};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x9d')]=function(_0x564fbf){try{var _0x12171f=JSON[_0xfaa3('0x78')](_0x564fbf);this[_0xfaa3('0x9f')](_0x12171f);return JSON[_0xfaa3('0x7e')](_0x12171f);}catch(_0x4776ff){return this[_0xfaa3('0x9e')](_0x564fbf);}};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x9e')]=function(_0x14d93f){console['log'](_0xfaa3('0xa4'),_0x14d93f);var _0x991eb1=_0x14d93f[_0xfaa3('0xa5')]('{');for(var _0x3583ac=0x1;_0x3583ac<_0x991eb1['length'];_0x3583ac+=0x1){var _0x8e9921=_0x991eb1[_0x3583ac][_0xfaa3('0xa5')]('}');console[_0xfaa3('0x45')](_0xfaa3('0xa6'),_0x8e9921);if(_0x8e9921[_0xfaa3('0xa7')]>0x1){_0x14d93f=_0x14d93f[_0xfaa3('0xa8')]('{'+_0x8e9921[0x0]+'}',this[_0xfaa3('0xc')][_0xfaa3('0xf')](_0x8e9921[0x0])[_0xfaa3('0xa9')]||_0x8e9921[0x0]);}}if(_0x991eb1['length']===0x1){return _0x14d93f['toString']();}console[_0xfaa3('0x45')](_0xfaa3('0xaa'),_0x14d93f);return this['replaceAllVariables'](_0x14d93f);};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xab')]=function(_0x38fe9b,_0x449aed){var _0xa79d9c=this[_0xfaa3('0xc')][_0xfaa3('0xf')](_0x38fe9b);if(_0xa79d9c[_0xfaa3('0xac')]===-0x1){return _0xa79d9c;}logger['info'](util['format'](_0xfaa3('0xad'),_0x449aed,_0xa79d9c[_0xfaa3('0xa9')]));return this[_0xfaa3('0xc')]['setVariable'](_0x449aed,_0xa79d9c[_0xfaa3('0xa9')]);};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xae')]=function(_0x400f99){return _0x400f99&&_0x400f99!=='0'&&_0x400f99!=='-1'&&_0x400f99!=='';};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xaf')]=function(_0x3dc0c6){this[_0xfaa3('0x37')]['sync'](this,_0x3dc0c6,'-');_0x3dc0c6[_0xfaa3('0xb0')]=_0x3dc0c6[_0xfaa3('0xaf')];return{'code':0xc8,'result':'-'};};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xb1')]=function(_0x298402){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0xb2'),_0x298402[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x298402[_0xfaa3('0x66')])){return this['channel'][_0xfaa3('0xb3')]('no\x20text\x20configured');}var _0x4be1f9='\x22'+_0x298402['text']+'\x22';if(this['isConfigured'](_0x298402[_0xfaa3('0x84')])){_0x4be1f9+=','+_0x298402['options'];}var _0x547260=this[_0xfaa3('0xc')]['exec'](_0xfaa3('0xb4'),_0x4be1f9);if(_0x547260[_0xfaa3('0xac')]===-0x1){return _0x547260;}return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0xb5'),_0x4be1f9));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xb6')]=function(_0x2205b6){logger[_0xfaa3('0x2e')](util['format'](_0xfaa3('0xb7'),_0x2205b6[_0xfaa3('0x39')]));if(!this['isConfigured'](_0x2205b6[_0xfaa3('0xb8')])){return this['channel']['noop']('no\x20grammar\x20configured');}var _0x4c8433=_0x2205b6[_0xfaa3('0xb8')];if(this['isConfigured'](_0x2205b6['options'])){_0x4c8433+=','+_0x2205b6[_0xfaa3('0x84')];}var _0x40d522=this['channel'][_0xfaa3('0x62')](_0xfaa3('0xb9'),_0x4c8433);if(_0x40d522[_0xfaa3('0xac')]===-0x1){return _0x40d522;}var _0x39ef9a=this['getAndSetVariable']('RECOG_CONFIDENCE()',_0xfaa3('0xba'));if(_0x39ef9a['result']===-0x1){return _0x39ef9a;}var _0x58f1b2=this['getAndSetVariable'](_0xfaa3('0xbb'),'MRCP_RECOG_TRANSCRIPT');if(_0x58f1b2[_0xfaa3('0xac')]===-0x1){return _0x58f1b2;}var _0x3b63a5=this[_0xfaa3('0xab')](_0xfaa3('0xbc'),'MRCP_RECOG_INSTANCE');if(_0x3b63a5[_0xfaa3('0xac')]===-0x1){return _0x3b63a5;}return this['channel'][_0xfaa3('0xb3')](util[_0xfaa3('0x29')]('Executed\x20command\x20MRCPRecog\x20%s',_0x4c8433));};AGIVertices['prototype'][_0xfaa3('0x6')]=function(_0x404387){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0xbd'),_0x404387['label']));return this[_0xfaa3('0xc')][_0xfaa3('0x6')]([_0x404387[_0xfaa3('0xbe')],_0x404387['args']]);};AGIVertices[_0xfaa3('0xe')]['answer']=function(_0x10027f){logger[_0xfaa3('0x2e')](util['format'](_0xfaa3('0xbf'),_0x10027f[_0xfaa3('0x39')]));if(this[_0xfaa3('0xae')](_0x10027f[_0xfaa3('0x72')])){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0xc0'),_0x10027f[_0xfaa3('0x72')]));var _0x2872f2=this['channel'][_0xfaa3('0xc1')](_0x10027f[_0xfaa3('0x72')]);if(_0x2872f2['result']===-0x1){return _0x2872f2;}}return this[_0xfaa3('0xc')][_0xfaa3('0xc2')]();};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x54')]=function(_0x95f0b3){console[_0xfaa3('0x45')](_0xfaa3('0xc3'),_0x95f0b3);logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0xc4'),_0x95f0b3[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x95f0b3[_0xfaa3('0x52')])){return this['channel'][_0xfaa3('0x2c')](_0x95f0b3,_0xfaa3('0xc5'));}_0x95f0b3['scheduledAt']=moment();if(this[_0xfaa3('0xae')](_0x95f0b3[_0xfaa3('0xc6')])){_0x95f0b3[_0xfaa3('0x53')]=moment()[_0xfaa3('0xc7')](_0x95f0b3[_0xfaa3('0xc6')],_0xfaa3('0xc8'));}if(!this[_0xfaa3('0xae')](_0x95f0b3[_0xfaa3('0x57')])){_0x95f0b3[_0xfaa3('0x57')]=0x2;}console['log'](_0xfaa3('0xc9'),_0x95f0b3);this[_0xfaa3('0x44')][_0xfaa3('0x7c')](this,_0x95f0b3);return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0xca'),_0x95f0b3[_0xfaa3('0x4c')],_0x95f0b3[_0xfaa3('0x52')],_0x95f0b3[_0xfaa3('0x53')]));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xcb')]=function(_0x2a54c4){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block',_0x2a54c4['label']));var _0x3fd99c=this[_0xfaa3('0xc')][_0xfaa3('0x62')](_0x2a54c4['application'],_0x2a54c4[_0xfaa3('0x84')]);if(_0x3fd99c['result']===-0x1){return _0x3fd99c;}return this['channel']['noop'](util['format'](_0xfaa3('0xcc'),_0x2a54c4['application'],_0x2a54c4[_0xfaa3('0x84')]));};AGIVertices['prototype'][_0xfaa3('0xcd')]=function(_0x202cfe){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0xce'),_0x202cfe[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x202cfe['text'])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0xcf'));}var _0x21415c='\x22'+_0x202cfe[_0xfaa3('0x66')]+'\x22';if(this['isConfigured'](_0x202cfe['options'])){_0x21415c+=','+_0x202cfe[_0xfaa3('0x84')];}var _0x19973c=this['channel']['exec'](_0xfaa3('0xb4'),_0x21415c);if(_0x19973c['result']===-0x1){return _0x19973c;}return this[_0xfaa3('0xc')]['noop'](util['format'](_0xfaa3('0xb5'),_0x21415c));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xd0')]=function(_0x468a9e){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('Enter\x20in\x20SESTEKTTS\x20(%s)\x20block',_0x468a9e[_0xfaa3('0x39')]));if(!this['isConfigured'](_0x468a9e['text'])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0xcf'));}var _0x28d58b='\x22'+_0x468a9e[_0xfaa3('0x66')]+'\x22';if(this['isConfigured'](_0x468a9e['options'])){_0x28d58b+=','+_0x468a9e['options'];}var _0x4d2ca6=this['channel']['exec'](_0xfaa3('0xb4'),_0x28d58b);if(_0x4d2ca6[_0xfaa3('0xac')]===-0x1){return _0x4d2ca6;}return this['channel'][_0xfaa3('0xb3')](util[_0xfaa3('0x29')]('Executed\x20command\x20MRCPSynth\x20%s',_0x28d58b));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xd1')]=function(_0x95a5da){logger[_0xfaa3('0x2e')](util['format'](_0xfaa3('0xd2'),_0x95a5da[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x95a5da['grammar'])){return this['channel'][_0xfaa3('0xb3')](_0xfaa3('0xd3'));}var _0x5d14cb=_0x95a5da['grammar'];if(this[_0xfaa3('0xae')](_0x95a5da[_0xfaa3('0x84')])){_0x5d14cb+=','+_0x95a5da['options'];}var _0x350e99=this[_0xfaa3('0xc')][_0xfaa3('0x62')]('MRCPRecog',_0x5d14cb);if(_0x350e99[_0xfaa3('0xac')]===-0x1){return _0x350e99;}var _0x5cacdd=this[_0xfaa3('0xab')](_0xfaa3('0xd4'),'LUMENVOX_ASR_CONFIDENCE');if(_0x5cacdd['result']===-0x1){return _0x5cacdd;}var _0x4d8748=this[_0xfaa3('0xab')](_0xfaa3('0xbb'),_0xfaa3('0xd5'));if(_0x4d8748[_0xfaa3('0xac')]===-0x1){return _0x4d8748;}var _0x37b2a2=this[_0xfaa3('0xab')](_0xfaa3('0xbc'),_0xfaa3('0xd6'));if(_0x37b2a2[_0xfaa3('0xac')]===-0x1){return _0x37b2a2;}return this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0xd7'),_0x5d14cb));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xd8')]=function(_0x4bea3d){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0xd9'),_0x4bea3d[_0xfaa3('0x39')]));if(!this['isConfigured'](_0x4bea3d[_0xfaa3('0xb8')])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0xd3'));}var _0x22741b=_0x4bea3d[_0xfaa3('0xb8')];if(this[_0xfaa3('0xae')](_0x4bea3d[_0xfaa3('0x84')])){_0x22741b+=','+_0x4bea3d[_0xfaa3('0x84')];}var _0x389173=this[_0xfaa3('0xc')][_0xfaa3('0x62')](_0xfaa3('0xb9'),_0x22741b);if(_0x389173[_0xfaa3('0xac')]===-0x1){return _0x389173;}var _0x46b72a=this['getAndSetVariable']('RECOG_CONFIDENCE()',_0xfaa3('0xda'));if(_0x46b72a[_0xfaa3('0xac')]===-0x1){return _0x46b72a;}var _0x584542=this[_0xfaa3('0xab')](_0xfaa3('0xbb'),_0xfaa3('0xdb'));if(_0x584542['result']===-0x1){return _0x584542;}var _0x4bc7b6=this[_0xfaa3('0xab')](_0xfaa3('0xbc'),_0xfaa3('0xdc'));if(_0x4bc7b6['result']===-0x1){return _0x4bc7b6;}return this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0xd7'),_0x22741b));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xdd')]=function(_0x5d020a){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0xde'),_0x5d020a[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x5d020a[_0xfaa3('0xdf')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x5d020a,_0xfaa3('0xe0'));}var _0xa8f2cb=this[_0xfaa3('0x17')][_0xfaa3('0x7c')](this,_0x5d020a['odbc_id']);if(!_0xa8f2cb){return this['channel'][_0xfaa3('0x2c')](_0x5d020a,_0xfaa3('0xe1'));}if(!this[_0xfaa3('0xae')](_0x5d020a[_0xfaa3('0x30')])){return this[_0xfaa3('0xc')]['error'](_0x5d020a,_0xfaa3('0xe2'));}var _0x11c8aa=_0x5d020a['query'][_0xfaa3('0xe3')](/(\r\n|\n|\r)/gm,'\x20');this['channel'][_0xfaa3('0xb3')](util['format']('query:\x20%s',_0x11c8aa));var _0x34c1cf=this[_0xfaa3('0xe4')][_0xfaa3('0x7c')](this,_0xa8f2cb,_0x11c8aa);this[_0xfaa3('0x37')][_0xfaa3('0x7c')](this,_0x5d020a,_0x11c8aa);if(!this[_0xfaa3('0xae')](_0x5d020a[_0xfaa3('0xe5')])){return this['channel'][_0xfaa3('0xb3')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x152433=this[_0xfaa3('0xf')][_0xfaa3('0x7c')](this,_0x5d020a[_0xfaa3('0xe5')]);if(!_0x152433){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x5d020a,'no\x20variable\x20found');}var _0x147a34=this;_0x34c1cf[_0xfaa3('0xe6')](function(_0x4a4599,_0x13244c){Object[_0xfaa3('0xe7')](_0x4a4599)[_0xfaa3('0xe6')](function(_0x34a4c4){_0x147a34[_0xfaa3('0xc')]['setVariable'](util['format'](_0xfaa3('0xe8'),_0x152433,_0x13244c,_0x34a4c4),_0x4a4599[_0x34a4c4]);});});this[_0xfaa3('0xc')][_0xfaa3('0xa2')](util[_0xfaa3('0x29')](_0xfaa3('0xe9'),_0x152433),_0x34c1cf['length']);return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util['format'](_0xfaa3('0xea'),_0x152433));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xeb')]=function(_0xa0df07){logger[_0xfaa3('0xec')](util[_0xfaa3('0x29')]('Enter\x20in\x20DIAL\x20(%s)\x20block',_0xa0df07[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0xa0df07[_0xfaa3('0xed')])){return this[_0xfaa3('0xc')]['error'](_0xa0df07,'no\x20user\x20selected');}var _0x4355be=this[_0xfaa3('0x19')][_0xfaa3('0x7c')](this,_0xa0df07[_0xfaa3('0xed')]);if(!_0x4355be){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0xa0df07,_0xfaa3('0xee'));}var _0x3c6778=this['channel']['exec'](_0xfaa3('0xef'),[util[_0xfaa3('0x29')](_0xfaa3('0xf0'),_0x4355be),_0xa0df07[_0xfaa3('0x72')],_0xa0df07[_0xfaa3('0xf1')],_0xa0df07['url']]);if(_0x3c6778[_0xfaa3('0xac')]===-0x1){return _0x3c6778;}return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0xf2'),'DIAL'));};AGIVertices['prototype'][_0xfaa3('0xf3')]=function(_0x412716){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0xf4'),_0x412716[_0xfaa3('0x39')]));if(!this['isConfigured'](_0x412716[_0xfaa3('0x86')])){return this['channel'][_0xfaa3('0xb3')]('no\x20key\x20configured');}if(!this['isConfigured'](_0x412716[_0xfaa3('0x66')])){return this[_0xfaa3('0xc')]['noop']('no\x20text\x20configured');}this[_0xfaa3('0xc')][_0xfaa3('0xf5')]=!![];this[_0xfaa3('0x37')](_0x412716);this[_0xfaa3('0x43')](_0x412716[_0xfaa3('0x66')],'in');this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0xf6'),_0x412716['text']));var _0x50f0d4=this[_0xfaa3('0x85')]['sync'](this,_0x412716);if(_0x50f0d4){for(var _0x260dcc in _0x50f0d4){if(_0x50f0d4[_0xfaa3('0x9b')](_0x260dcc)){this['channel'][_0xfaa3('0xa2')](util[_0xfaa3('0x29')]('DIALOGFLOW_%s',_0x260dcc['toUpperCase']()),_0x50f0d4[_0x260dcc]);}}this[_0xfaa3('0x43')](_0x50f0d4['speech'],_0xfaa3('0xf7'));return this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0xf8'),_0x50f0d4[_0xfaa3('0xf9')]));}return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x412716,'Dialogflow\x20is\x20unreachable');};AGIVertices['prototype']['sesteknda']=function(_0x496db9){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0xfa'),_0x496db9[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x496db9[_0xfaa3('0xfb')])){return this['channel'][_0xfaa3('0xb3')](_0xfaa3('0xfc'));}if(!this[_0xfaa3('0xae')](_0x496db9[_0xfaa3('0xfd')])){return this[_0xfaa3('0xc')]['noop']('no\x20username\x20configured');}if(!this[_0xfaa3('0xae')](_0x496db9[_0xfaa3('0xfe')])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0xff'));}if(!this[_0xfaa3('0xae')](_0x496db9[_0xfaa3('0x100')])){return this[_0xfaa3('0xc')]['noop'](_0xfaa3('0xcf'));}this['channel'][_0xfaa3('0xf5')]=!![];this[_0xfaa3('0x37')](_0x496db9);this['createSquareMessage'](_0x496db9['text'],'in');this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0x101'),_0x496db9[_0xfaa3('0x66')]));var _0x2bd7e6=this[_0xfaa3('0x88')]['sync'](this,_0x496db9);if(_0x2bd7e6){for(var _0x168993 in _0x2bd7e6){if(_0x2bd7e6[_0xfaa3('0x9b')](_0x168993)){this[_0xfaa3('0xc')][_0xfaa3('0xa2')](util['format']('SESTEK_NDA_%s',_0x168993[_0xfaa3('0x76')]()),_0x2bd7e6[_0x168993]);}}this[_0xfaa3('0x43')](_0x2bd7e6['speech'],_0xfaa3('0xf7'));if(_0x2bd7e6[_0xfaa3('0x102')]){this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x103'),_0x2bd7e6[_0xfaa3('0x102')]));var _0x1138b1=this[_0xfaa3('0xc')]['streamFile'](_0x2bd7e6[_0xfaa3('0x102')]);try{fs[_0xfaa3('0x104')](_0x2bd7e6[_0xfaa3('0x102')]+'.wav');}catch(_0x4f53aa){logger[_0xfaa3('0x2c')](_0x4f53aa);}return _0x1138b1;}else{return this[_0xfaa3('0xc')]['noop'](util['format'](_0xfaa3('0x105'),_0x2bd7e6['speech']));}}return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x496db9,_0xfaa3('0x106'));};AGIVertices[_0xfaa3('0xe')]['end']=function(_0x3af0a6){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x107'),_0x3af0a6[_0xfaa3('0x39')]));return this['channel'][_0xfaa3('0xb3')]('end');};AGIVertices[_0xfaa3('0xe')]['ext_dial']=function(_0x1c9614){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x108'),_0x1c9614['label']));var _0x91850b='';if(_0x1c9614[_0xfaa3('0x109')]){if(!this[_0xfaa3('0xae')](_0x1c9614[_0xfaa3('0x109')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x1c9614,_0xfaa3('0x10a'));}else{var _0x4f3f66=parseInt(_0x1c9614[_0xfaa3('0x109')],0xa);if(isNaN(_0x4f3f66)){_0x91850b=_0x1c9614[_0xfaa3('0x109')];}else{_0x91850b=this[_0xfaa3('0x1c')][_0xfaa3('0x7c')](this,_0x1c9614[_0xfaa3('0x109')]);if(!_0x91850b){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x1c9614,_0xfaa3('0x10b'));}}}}else if(_0x1c9614[_0xfaa3('0x10c')]){_0x91850b=_0x1c9614['trunk_name'];}else{return this['channel'][_0xfaa3('0x2c')](_0x1c9614,_0xfaa3('0x10a'));}var _0x20dc34=this[_0xfaa3('0xc')][_0xfaa3('0x62')]('DIAL',[util[_0xfaa3('0x29')](_0xfaa3('0x10d'),_0x91850b,_0x1c9614['phone']),_0x1c9614[_0xfaa3('0x72')],_0x1c9614[_0xfaa3('0xf1')],_0x1c9614['url']]);if(_0x20dc34[_0xfaa3('0xac')]===-0x1){return _0x20dc34;}return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0xf2'),'DIAL'));};AGIVertices[_0xfaa3('0xe')]['finally']=function(_0x18ab80){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x10e'),_0x18ab80['label']));return this[_0xfaa3('0xc')]['noop'](_0xfaa3('0x10f'));};AGIVertices[_0xfaa3('0xe')]['getdigits']=function(_0xbb5469){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('Enter\x20in\x20GETDIGITS\x20(%s)\x20block',_0xbb5469[_0xfaa3('0x39')]));if(_0xbb5469[_0xfaa3('0xb0')]===0x0){return this[_0xfaa3('0xaf')](_0xbb5469);}_0xbb5469[_0xfaa3('0xb0')]-=0x1;if(!this[_0xfaa3('0xae')](_0xbb5469['file_id'])){return this[_0xfaa3('0xc')]['error'](_0xbb5469,_0xfaa3('0x110'));}var _0x5acdb6=this[_0xfaa3('0x1e')][_0xfaa3('0x7c')](this,_0xbb5469[_0xfaa3('0x111')]);if(!_0x5acdb6){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0xbb5469,_0xfaa3('0x112'));}if(!this[_0xfaa3('0xae')](_0xbb5469[_0xfaa3('0xe5')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0xfaa3('0x113'));}var _0x1ed175=this['channel'][_0xfaa3('0x114')](_0x5acdb6,_0xbb5469[_0xfaa3('0x115')],_0xbb5469['maxdigit']);var _0x3ab274=_0x1ed175[_0xfaa3('0xac')]?_0x1ed175[_0xfaa3('0xac')][_0xfaa3('0x56')]():'';logger[_0xfaa3('0x2e')]('test',JSON[_0xfaa3('0x7e')](_0x1ed175));if(_0x1ed175['result']===-0x1){this[_0xfaa3('0x37')]['sync'](this,_0xbb5469,_0x3ab274);return _0x1ed175;}else if(_0x1ed175[_0xfaa3('0xa9')]==='timeout'){_0x1ed175[_0xfaa3('0xac')]=_0x3ab274[_0xfaa3('0xa7')]>=parseInt(_0xbb5469[_0xfaa3('0x116')])?'x':'i';}else{_0x1ed175['result']=_0x3ab274[_0xfaa3('0xa7')]>=parseInt(_0xbb5469['mindigit'])&&_0x3ab274['length']<=parseInt(_0xbb5469[_0xfaa3('0x117')])?'x':'i';}var _0x22e266=this[_0xfaa3('0xf')][_0xfaa3('0x7c')](this,_0xbb5469['variable_id']);if(!_0x22e266){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0xbb5469,_0xfaa3('0x118'));}this[_0xfaa3('0xc')][_0xfaa3('0xa2')](_0x22e266,_0x3ab274);if(this[_0xfaa3('0xae')](_0xbb5469['hiddendigitsnum'])){var _0x35ca06=parseInt(_0xbb5469[_0xfaa3('0x119')],0xa);var _0x54d508=rs['generate']({'charset':'*','length':_0x35ca06});var _0x4b2dc4=_0x3ab274[_0xfaa3('0xa7')];if(_0x4b2dc4>0x0){if(_0x4b2dc4>_0x35ca06){this[_0xfaa3('0x37')][_0xfaa3('0x7c')](this,_0xbb5469,_0xbb5469[_0xfaa3('0x11a')]===_0xfaa3('0x11b')?_0x54d508+_0x3ab274['substr'](_0x35ca06):_0x3ab274[_0xfaa3('0x11c')](0x0,_0x4b2dc4-_0x35ca06)+_0x54d508);}else{this[_0xfaa3('0x37')][_0xfaa3('0x7c')](this,_0xbb5469,rs[_0xfaa3('0x11d')]({'charset':'*','length':_0x4b2dc4}));}}else{this[_0xfaa3('0x37')]['sync'](this,_0xbb5469,'');}}else{this['createSquareDetailsReport']['sync'](this,_0xbb5469,_0x3ab274);}return _0x1ed175;};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0xb')]=function(_0x45d6c9){logger[_0xfaa3('0x2e')](util['format'](_0xfaa3('0x11e'),_0x45d6c9[_0xfaa3('0x39')]));return this['getdigits'](_0x45d6c9);};AGIVertices['prototype']['goal']=function(_0x37d61a){logger[_0xfaa3('0x2e')](util['format'](_0xfaa3('0x11f'),_0x37d61a[_0xfaa3('0x39')]));this[_0xfaa3('0x37')]['sync'](this,_0x37d61a,_0x37d61a[_0xfaa3('0x120')]);return this['channel'][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x121'),_0x37d61a[_0xfaa3('0x120')]));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x122')]=function(_0x59b468){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x123'),_0x59b468[_0xfaa3('0x39')]));if(!this['isConfigured'](_0x59b468['aws_access_key_id'])||!this[_0xfaa3('0xae')](_0x59b468[_0xfaa3('0x8e')])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0x124'));}if(!this['isConfigured'](_0x59b468[_0xfaa3('0x66')])){return this[_0xfaa3('0xc')]['noop'](_0xfaa3('0xcf'));}this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util['format'](_0xfaa3('0x125'),_0x59b468[_0xfaa3('0x66')]));var _0xb7e99d=this[_0xfaa3('0x126')]['sync'](this,_0x59b468);if(_0xb7e99d){this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0x127'),_0xb7e99d));var _0xa89b1d=this[_0xfaa3('0xc')][_0xfaa3('0x128')](_0xb7e99d);try{fs[_0xfaa3('0x104')](_0xb7e99d+_0xfaa3('0x129'));}catch(_0x1762cc){logger['error'](_0x1762cc);}return _0xa89b1d;}return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x59b468,'aws\x20Polly\x20is\x20unreachable');};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x12a')]=function(_0x4e2250){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x12b'),_0x4e2250[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x4e2250['aws_access_key_id'])||!this['isConfigured'](_0x4e2250[_0xfaa3('0x8e')])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0x124'));}if(!this['isConfigured'](_0x4e2250[_0xfaa3('0x94')])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')]('no\x20bot\x20name\x20configured');}if(!this['isConfigured'](_0x4e2250[_0xfaa3('0x66')])){return this['channel'][_0xfaa3('0xb3')]('no\x20text\x20configured');}this[_0xfaa3('0xc')]['bot']=!![];this['createSquareDetailsReport'](_0x4e2250);this['createSquareMessage'](_0x4e2250['text'],'in');this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util['format']('Trying\x20Amazon\x20Lex:\x20%s',_0x4e2250[_0xfaa3('0x66')]));var _0x58fcf8=this[_0xfaa3('0x93')][_0xfaa3('0x7c')](this,_0x4e2250);if(_0x58fcf8){for(var _0x5b9ffe in _0x58fcf8){if(_0x58fcf8[_0xfaa3('0x9b')](_0x5b9ffe)&&_[_0xfaa3('0x9c')](_0x58fcf8[_0x5b9ffe])){this[_0xfaa3('0xc')][_0xfaa3('0xa2')](util['format'](_0xfaa3('0x12c'),_0x5b9ffe['toUpperCase']()),_0x58fcf8[_0x5b9ffe]);}}if(_[_0xfaa3('0x48')](_0x58fcf8[_0xfaa3('0x82')])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')]('Amazon\x20Lex\x20ready\x20for\x20fulfillment');}else{this['createSquareMessage'](_0x58fcf8[_0xfaa3('0x82')],_0xfaa3('0xf7'));return this['channel'][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x12d'),_0x58fcf8[_0xfaa3('0x82')]));}}return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x4e2250,_0xfaa3('0x12e'));};AGIVertices['prototype'][_0xfaa3('0x12f')]=function(_0x297983){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s',_0x297983[_0xfaa3('0x39')],_0x297983[_0xfaa3('0x72')]));if(!this[_0xfaa3('0xae')](_0x297983[_0xfaa3('0x86')])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0x130'));}var _0x28a39c=_0xfaa3('0x131');var _0x5e3815=util[_0xfaa3('0x29')](_0xfaa3('0x132'),FILES_PATH,rs['generate'](0x4));var _0x319982=util[_0xfaa3('0x29')]('%s.%s',_0x5e3815,_0x28a39c);var _0xe8f8c7=!![];if(_0x297983[_0xfaa3('0x133')]===_0xfaa3('0x134')){_0xe8f8c7=![];}var _0x3187ae=this[_0xfaa3('0xc')][_0xfaa3('0x135')](_0x5e3815,_0x28a39c,_0x297983[_0xfaa3('0x136')],_0x297983[_0xfaa3('0x72')],undefined,_0xe8f8c7);if(_0x3187ae[_0xfaa3('0xac')]!==-0x1){this['channel'][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x137'),_0x319982));var _0x1b1a1b=this[_0xfaa3('0x95')][_0xfaa3('0x7c')](this,_0x297983,_0x319982);if(_0x1b1a1b){for(var _0x508dcf in _0x1b1a1b){if(_0x1b1a1b['hasOwnProperty'](_0x508dcf)){this[_0xfaa3('0xc')][_0xfaa3('0xa2')](util[_0xfaa3('0x29')](_0xfaa3('0x138'),_0x508dcf[_0xfaa3('0x76')]()),_0x1b1a1b[_0x508dcf]);}}return this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')]('GoogleASR\x20Result\x20%s',JSON['stringify'](_0x1b1a1b)));}}return _0x3187ae;};AGIVertices['prototype']['tildeasr']=function(_0x3b77c2){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('Enter\x20in\x20TILDEASR\x20(%s)\x20block',_0x3b77c2[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x3b77c2[_0xfaa3('0x98')])){return this['channel'][_0xfaa3('0xb3')](_0xfaa3('0x139'));}if(!this['isConfigured'](_0x3b77c2[_0xfaa3('0x13a')])){return this['channel'][_0xfaa3('0xb3')](_0xfaa3('0x13b'));}var _0x518518='wav';var _0x45dcb2=util[_0xfaa3('0x29')](_0xfaa3('0x132'),FILES_PATH,rs[_0xfaa3('0x11d')](0x4));var _0x46b24b=util[_0xfaa3('0x29')](_0xfaa3('0xa3'),_0x45dcb2,_0x518518);var _0x5de480=!![];if(_0x3b77c2[_0xfaa3('0x133')]===_0xfaa3('0x134')){_0x5de480=![];}var _0x481c2d=this['channel'][_0xfaa3('0x135')](_0x45dcb2,_0x518518,_0x3b77c2[_0xfaa3('0x136')],_0x3b77c2[_0xfaa3('0x72')],undefined,_0x5de480);if(_0x481c2d[_0xfaa3('0xac')]!==-0x1){this['channel'][_0xfaa3('0xb3')](util['format'](_0xfaa3('0x13c'),_0x46b24b));var _0x3552e8=this[_0xfaa3('0x97')]['sync'](this,_0x3b77c2,_0x46b24b);if(_0x3552e8){for(var _0x53c9c9 in _0x3552e8){if(_0x3552e8['hasOwnProperty'](_0x53c9c9)){this['channel'][_0xfaa3('0xa2')](util['format'](_0xfaa3('0x13d'),_0x53c9c9[_0xfaa3('0x76')]()),_0x3552e8[_0x53c9c9]);}}return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util['format'](_0xfaa3('0x13e'),JSON[_0xfaa3('0x7e')](_0x3552e8)));}}return _0x481c2d;};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x13f')]=function(_0x566104){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x140'),_0x566104[_0xfaa3('0x39')]));return this[_0xfaa3('0xc')][_0xfaa3('0x141')](_0x566104[_0xfaa3('0x3e')],_0x566104[_0xfaa3('0x3f')],_0x566104[_0xfaa3('0x40')]);};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x142')]=function(_0x78bc14){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('Enter\x20in\x20GOTOIF\x20(%s)\x20block',_0x78bc14['label']));if(!this[_0xfaa3('0xae')](_0x78bc14[_0xfaa3('0x143')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x78bc14,_0xfaa3('0x144'));}try{var _0x530ba5=eval(_0x78bc14[_0xfaa3('0x143')])?_0xfaa3('0x145'):'false';this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util['format']('EVAL\x20CONDITION\x20%s\x20%s',_0x78bc14[_0xfaa3('0x143')],_0x530ba5));return{'code':0xc8,'result':_0x530ba5};}catch(_0x23539f){return{'code':0xc8,'result':_0xfaa3('0x146')};}};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x147')]=function(_0x4cd698){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x148'),_0x4cd698[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x4cd698[_0xfaa3('0x149')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x4cd698,_0xfaa3('0x14a'));}var _0x2a0efd=this[_0xfaa3('0x24')][_0xfaa3('0x7c')](this,_0x4cd698[_0xfaa3('0x149')]);if(!_0x2a0efd){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x4cd698,'no\x20intervals\x20found');}for(var _0x325e08=0x0;_0x325e08<_0x2a0efd[_0xfaa3('0xa7')];_0x325e08+=0x1){var _0xb1fc48=this[_0xfaa3('0xc')]['getVariable'](util[_0xfaa3('0x29')]('IFTIME(%s?true:false)',_0x2a0efd[_0x325e08]));if(_0xb1fc48['result']===-0x1){return _0xb1fc48;}logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('IFTIME\x20%s\x20%s',_0x2a0efd[_0x325e08],_0xb1fc48[_0xfaa3('0xa9')]));if(_0xb1fc48[_0xfaa3('0xa9')]===_0xfaa3('0x145')){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x14b'),_0x2a0efd[_0x325e08],'true'));this[_0xfaa3('0xc')]['noop'](util['format']('IFTIME\x20%s\x20%s',_0x2a0efd[_0x325e08],_0xfaa3('0x145')));return{'code':0xc8,'result':_0xfaa3('0x145')};}else{logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x14b'),_0x2a0efd[_0x325e08],_0xfaa3('0x146')));this['channel'][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x14b'),_0x2a0efd[_0x325e08],'false'));}}return{'code':0xc8,'result':'false'};};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x14c')]=function(_0x28f514){logger['info'](util['format'](_0xfaa3('0x14d'),_0x28f514[_0xfaa3('0x39')]));return this[_0xfaa3('0xc')]['hangup']();};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x14e')]=function(_0x202b5e){logger['info'](util['format'](_0xfaa3('0x14f'),_0x202b5e[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x202b5e['key'])){return this[_0xfaa3('0xc')]['noop'](_0xfaa3('0x130'));}var _0x853640=_0xfaa3('0x131');var _0x564cbc=util[_0xfaa3('0x29')]('%s/recordings/%s',FILES_PATH,rs[_0xfaa3('0x11d')](0x4));var _0x46eeff=util['format'](_0xfaa3('0xa3'),_0x564cbc,_0x853640);var _0x3f42e5=!![];if(_0x202b5e['beep']===_0xfaa3('0x134')){_0x3f42e5=![];}var _0x2447a1=this['channel'][_0xfaa3('0x135')](_0x564cbc,_0x853640,_0x202b5e['intKey'],_0x202b5e[_0xfaa3('0x72')],undefined,_0x3f42e5);if(_0x2447a1[_0xfaa3('0xac')]!==-0x1){this['channel']['noop'](util[_0xfaa3('0x29')](_0xfaa3('0x150'),_0x46eeff));var _0x512086=this[_0xfaa3('0x8a')]['sync'](this,_0x202b5e,_0x46eeff);if(_0x512086){for(var _0x20e3ac in _0x512086){if(_0x512086[_0xfaa3('0x9b')](_0x20e3ac)){this['channel'][_0xfaa3('0xa2')](util[_0xfaa3('0x29')](_0xfaa3('0x151'),_0x20e3ac[_0xfaa3('0x76')]()),_0x512086[_0x20e3ac]);}}return this['channel'][_0xfaa3('0xb3')](util['format']('IspeechASR\x20Result\x20%s',JSON['stringify'](_0x512086)));}}return _0x2447a1;};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x152')]=function(_0x28131e){logger['info'](util['format'](_0xfaa3('0x153'),_0x28131e[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x28131e[_0xfaa3('0x86')])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')]('no\x20key\x20configured');}if(!this[_0xfaa3('0xae')](_0x28131e[_0xfaa3('0x66')])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0xcf'));}this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x154'),_0x28131e[_0xfaa3('0x66')]));var _0x2cabf8=this[_0xfaa3('0x155')][_0xfaa3('0x7c')](this,_0x28131e);if(_0x2cabf8){this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util['format'](_0xfaa3('0x150'),_0x2cabf8));var _0x4b6198=this['channel'][_0xfaa3('0x128')](_0x2cabf8,_0x28131e['intKey']);try{fs['unlink'](_0x2cabf8+_0xfaa3('0x129'));}catch(_0x49ad78){logger[_0xfaa3('0x2c')](_0x49ad78);}return _0x4b6198;}return this[_0xfaa3('0xc')]['error'](_0x28131e,_0xfaa3('0x156'));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x157')]=function(_0x5d6ba8){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('Enter\x20in\x20LOGIN\x20(%s)\x20block',_0x5d6ba8['label']));if(!this[_0xfaa3('0xae')](_0x5d6ba8[_0xfaa3('0x158')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x5d6ba8,'no\x20find\x20by\x20configured');}logger[_0xfaa3('0x2e')](util['format'](_0xfaa3('0x159'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x5d6ba8['findBy']));var _0x46ab4f=this[_0xfaa3('0x5e')]['sync'](this,_0x5d6ba8['findBy']);if(_0x46ab4f){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x15a'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x5d6ba8[_0xfaa3('0x158')]));this['channel']['noop'](util[_0xfaa3('0x29')](_0xfaa3('0x15a'),this['channel'][_0xfaa3('0x3c')],_0x5d6ba8[_0xfaa3('0x158')]));return{'code':0xc8,'result':_0xfaa3('0x15b')};}else{logger['info'](util['format'](_0xfaa3('0x15c'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x5d6ba8[_0xfaa3('0x158')]));this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0xfaa3('0x3c')],_0x5d6ba8['findBy']));return{'code':0xc8,'result':_0xfaa3('0x15d')};}};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x15e')]=function(_0x2edc71){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x15f'),_0x2edc71['label']));if(!this['isConfigured'](_0x2edc71['findBy'])){return this[_0xfaa3('0xc')]['error'](_0x2edc71,_0xfaa3('0x160'));}logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this['channel']['callerid'],_0x2edc71[_0xfaa3('0x158')]));var _0xe780cb=this[_0xfaa3('0x5d')][_0xfaa3('0x7c')](this,_0x2edc71[_0xfaa3('0x158')]);if(_0xe780cb){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x15a'),this['channel'][_0xfaa3('0x3c')],_0x2edc71[_0xfaa3('0x158')]));this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0x15a'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x2edc71[_0xfaa3('0x158')]));return{'code':0xc8,'result':'success'};}else{logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x15c'),this['channel'][_0xfaa3('0x3c')],_0x2edc71['findBy']));this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0x15c'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x2edc71[_0xfaa3('0x158')]));return{'code':0xc8,'result':_0xfaa3('0x15d')};}};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x161')]=function(_0x1c93ef){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x162'),_0x1c93ef[_0xfaa3('0x39')]));if(!this['isConfigured'](_0x1c93ef[_0xfaa3('0x163')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x1c93ef,_0xfaa3('0x164'));}this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x165'),_0x1c93ef[_0xfaa3('0x163')]));var _0x4a051b=eval(_0x1c93ef[_0xfaa3('0x163')]);if(!this[_0xfaa3('0xae')](_0x1c93ef[_0xfaa3('0xe5')])){return this[_0xfaa3('0xc')]['noop']('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x4fc8e3=this[_0xfaa3('0xf')][_0xfaa3('0x7c')](this,_0x1c93ef['variable_id']);if(!_0x4fc8e3){return this[_0xfaa3('0xc')]['error'](_0x1c93ef,_0xfaa3('0x118'));}if(_['isArray'](_0x4a051b)){var _0x44664b=this;_0x4a051b[_0xfaa3('0xe6')](function(_0x186324,_0x22377d){_0x44664b[_0xfaa3('0xc')][_0xfaa3('0xa2')](util['format'](_0xfaa3('0x166'),_0x4fc8e3,_0x22377d),_0x186324);});return this['channel'][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x167'),_0x4fc8e3));}else{return this[_0xfaa3('0xc')][_0xfaa3('0xa2')](_0x4fc8e3,_0x4a051b);}};AGIVertices['prototype'][_0xfaa3('0x168')]=function(_0x376d7c){logger[_0xfaa3('0x2e')](util['format'](_0xfaa3('0x169'),_0x376d7c['label']));if(_0x376d7c[_0xfaa3('0xb0')]===0x0){return this[_0xfaa3('0xaf')](_0x376d7c);}_0x376d7c[_0xfaa3('0xb0')]-=0x1;if(!this[_0xfaa3('0xae')](_0x376d7c[_0xfaa3('0x111')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x376d7c,_0xfaa3('0x110'));}var _0x1e92c6=this[_0xfaa3('0x1e')][_0xfaa3('0x7c')](this,_0x376d7c[_0xfaa3('0x111')]);if(!_0x1e92c6){return this[_0xfaa3('0xc')]['error'](_0x376d7c,_0xfaa3('0x112'));}var _0x6b435f=this[_0xfaa3('0xc')][_0xfaa3('0x114')](_0x1e92c6,_0x376d7c[_0xfaa3('0x115')],_0x376d7c[_0xfaa3('0x16a')]);var _0x40e9c4=_0x6b435f['result'];if(_0x6b435f[_0xfaa3('0xac')]===-0x1){this[_0xfaa3('0x37')][_0xfaa3('0x7c')](this,_0x376d7c,'-1');return _0x6b435f;}else if(_0x6b435f[_0xfaa3('0xa9')]==='timeout'){_0x6b435f[_0xfaa3('0xac')]=_0x6b435f[_0xfaa3('0xac')][_0xfaa3('0xa7')]>0x0?_0x6b435f[_0xfaa3('0xac')]:'t';}else if(_[_0xfaa3('0x4e')](_0x6b435f[_0xfaa3('0xac')])){_0x6b435f['result']='#';_0x40e9c4='#';}if(!this['isConfigured'](_0x376d7c[_0xfaa3('0xe5')])){this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0x113'));}else{var _0xed1f6=this[_0xfaa3('0xf')][_0xfaa3('0x7c')](this,_0x376d7c[_0xfaa3('0xe5')]);if(!_0xed1f6){return this[_0xfaa3('0xc')]['error'](_0x376d7c,_0xfaa3('0x118'));}this[_0xfaa3('0xc')][_0xfaa3('0xa2')](_0xed1f6,_0x40e9c4);}this['createSquareDetailsReport'][_0xfaa3('0x7c')](this,_0x376d7c,_0x40e9c4);return _0x6b435f;};AGIVertices['prototype'][_0xfaa3('0xb3')]=function(_0x56e156){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x16b'),_0x56e156['label']));return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0x56e156[_0xfaa3('0x16c')]||_0x56e156[_0xfaa3('0x39')]);};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x16d')]=function(_0x3e5df1){logger['info'](util[_0xfaa3('0x29')]('Enter\x20in\x20PAUSE\x20(%s)\x20block',_0x3e5df1['label']));if(!this[_0xfaa3('0xae')](_0x3e5df1[_0xfaa3('0x158')])){return this[_0xfaa3('0xc')]['error'](_0x3e5df1,_0xfaa3('0x160'));}logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x159'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x3e5df1[_0xfaa3('0x158')]));var _0x4d9aa2=this['getPause'][_0xfaa3('0x7c')](this,_0x3e5df1[_0xfaa3('0x16e')]);var _0x13bd2c=this['agentPause'][_0xfaa3('0x7c')](this,_0x3e5df1[_0xfaa3('0x158')],_0x4d9aa2);if(_0x13bd2c){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x15a'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x3e5df1[_0xfaa3('0x158')]));this['channel'][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x15a'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x3e5df1[_0xfaa3('0x158')]));return{'code':0xc8,'result':'success'};}else{logger[_0xfaa3('0x2e')](util['format'](_0xfaa3('0x15c'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x3e5df1[_0xfaa3('0x158')]));this['channel'][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x15a'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x3e5df1[_0xfaa3('0x158')]));return{'code':0xc8,'result':_0xfaa3('0x15d')};}};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x16f')]=function(_0x34a444){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x170'),_0x34a444['label']));if(!this[_0xfaa3('0xae')](_0x34a444[_0xfaa3('0x111')])){return this[_0xfaa3('0xc')]['error'](_0x34a444,_0xfaa3('0x110'));}var _0x753057=this[_0xfaa3('0x1e')][_0xfaa3('0x7c')](this,_0x34a444[_0xfaa3('0x111')]);if(!_0x753057){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x34a444,_0xfaa3('0x112'));}var _0x5467d3=this[_0xfaa3('0xc')][_0xfaa3('0x62')]('PLAYBACK',[_0x753057,_0x34a444[_0xfaa3('0xf1')]]);if(_0x5467d3[_0xfaa3('0xac')]===-0x1){return _0x5467d3;}return this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0xcc'),_0xfaa3('0x171'),_0x753057));};AGIVertices['prototype'][_0xfaa3('0x172')]=function(_0x1c0f88){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x173'),_0x1c0f88[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x1c0f88[_0xfaa3('0x174')])){return this[_0xfaa3('0xc')]['error'](_0x1c0f88,_0xfaa3('0x175'));}var _0x16a163='';var _0x5cdc01=parseInt(_0x1c0f88[_0xfaa3('0x174')],0xa);if(isNaN(_0x5cdc01)){_0x16a163=_0x1c0f88[_0xfaa3('0x174')];}else{_0x16a163=this[_0xfaa3('0x13')][_0xfaa3('0x7c')](this,_0x1c0f88[_0xfaa3('0x174')]);if(!_0x16a163){return this['channel'][_0xfaa3('0x2c')](_0x1c0f88,_0xfaa3('0x176'));}}var _0x15b25c='';if(this['isConfigured'](_0x1c0f88['file_id'])){var _0xba44aa=this[_0xfaa3('0x1e')]['sync'](this,_0x1c0f88[_0xfaa3('0x111')]);if(_0xba44aa){_0x15b25c=_0xba44aa;}}this[_0xfaa3('0x37')]['sync'](this,_0x1c0f88,_0x16a163);if(_0x1c0f88[_0xfaa3('0xf1')][_0xfaa3('0x177')]('x')<0x0){_0x1c0f88[_0xfaa3('0xf1')]+='x';}if(_0x1c0f88[_0xfaa3('0xf1')]['indexOf']('X')<0x0){_0x1c0f88[_0xfaa3('0xf1')]+='X';}this[_0xfaa3('0xc')][_0xfaa3('0xa2')]('XMCS-QUEUE',_0x16a163?_0x16a163[_0xfaa3('0x178')]():'');var _0x30bd2e=this[_0xfaa3('0xc')][_0xfaa3('0x62')](_0xfaa3('0x179'),[_0x16a163,_0x1c0f88[_0xfaa3('0xf1')],_0x1c0f88[_0xfaa3('0x70')],_0x15b25c,_0x1c0f88['timeout'],_0x1c0f88[_0xfaa3('0x6')],_0x1c0f88['macro'],_0x1c0f88[_0xfaa3('0x17a')],'',_0x1c0f88[_0xfaa3('0x17b')]]);if(_0x30bd2e[_0xfaa3('0xac')]===-0x1){return _0x30bd2e;}return this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0xcc'),_0xfaa3('0x179'),_0x16a163));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x17c')]=function(_0x572394){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x17d'),_0x572394['label']));var _0x14dc36=_0x572394[_0xfaa3('0x17e')]||'wav';var _0x42e466=util[_0xfaa3('0x29')](_0xfaa3('0x17f'),this[_0xfaa3('0xc')][_0xfaa3('0x38')],rs[_0xfaa3('0x11d')](0x5));var _0x3be8cf=util['format'](_0xfaa3('0x180'),FILES_PATH,_0x42e466,_0x14dc36);var _0x46cb92=util[_0xfaa3('0x29')](_0xfaa3('0x132'),FILES_PATH,_0x42e466);this[_0xfaa3('0x3b')][_0xfaa3('0x7c')](this,_0x572394,_0x42e466,_0x3be8cf);this[_0xfaa3('0xc')]['setVariable'](_0xfaa3('0x181'),_0x42e466);logger['info'](_0xfaa3('0x182'),_0x46cb92,_0x14dc36,_0x572394[_0xfaa3('0x183')],_0x572394['timeout']);return this[_0xfaa3('0xc')][_0xfaa3('0x135')](_0x46cb92,_0x14dc36,_0x572394[_0xfaa3('0x183')],_0x572394['timeout'],undefined,!![]);};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x184')]=function(_0x31b510){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x185'),_0x31b510[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x31b510[_0xfaa3('0x70')])){return this[_0xfaa3('0xc')]['noop'](_0xfaa3('0x186'));}var _0x503af7=this['restAPI'][_0xfaa3('0x7c')](this,_0x31b510);logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x187'),util[_0xfaa3('0x188')](_0x503af7,{'showHidden':![],'depth':null})));if(!this[_0xfaa3('0xae')](_0x31b510['variable_id'])){return this['channel'][_0xfaa3('0xb3')](_0xfaa3('0x189'));}var _0x2e585a=this[_0xfaa3('0xf')]['sync'](this,_0x31b510['variable_id']);if(!_0x2e585a){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x31b510,_0xfaa3('0x118'));}this[_0xfaa3('0xc')][_0xfaa3('0xa2')](util[_0xfaa3('0x29')](_0xfaa3('0x18a'),_0x2e585a),_0x503af7[_0xfaa3('0x80')]?_0x503af7[_0xfaa3('0x80')]:_0xfaa3('0x18b'));this['channel'][_0xfaa3('0xa2')](util[_0xfaa3('0x29')]('%s_STATUS_MESSAGE',_0x2e585a),_0x503af7['statusMessage']?_0x503af7[_0xfaa3('0x81')]:'OK');if(_0x503af7[_0xfaa3('0x77')]){try{this[_0xfaa3('0xa1')](_0x503af7[_0xfaa3('0x77')],_0x2e585a);}catch(_0x45889){logger[_0xfaa3('0x2c')](util[_0xfaa3('0x29')](_0xfaa3('0x18c'),_0x2e585a));}}return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')]('variable\x20%s\x20set',_0x2e585a));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x18d')]=function(_0x3dd912){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x18e'),_0x3dd912[_0xfaa3('0x39')]));return this[_0xfaa3('0xc')][_0xfaa3('0x18f')](_0x3dd912[_0xfaa3('0x190')]['replace'](/\s+/g,''),_0x3dd912[_0xfaa3('0x183')]);};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x191')]=function(_0x2063c7){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x192'),_0x2063c7[_0xfaa3('0x39')]));return this['channel']['sayNumber'](_0x2063c7[_0xfaa3('0x193')][_0xfaa3('0xe3')](/\s+/g,''),_0x2063c7[_0xfaa3('0x183')]);};AGIVertices['prototype'][_0xfaa3('0x194')]=function(_0x517f80){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block',_0x517f80['label']));return this[_0xfaa3('0xc')][_0xfaa3('0x195')](_0x517f80[_0xfaa3('0x66')],_0x517f80['escape_digits']);};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x196')]=function(_0x1a8b93){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x197'),_0x1a8b93[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0x1a8b93['account_id'])){return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0x198'));}var _0x1b2834=this[_0xfaa3('0x21')]['sync'](this,_0x1a8b93['account_id']);if(!_0x1b2834||!_0x1b2834[_0xfaa3('0x199')]){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x1a8b93,_0xfaa3('0x19a'));}var _0x56277a={'from':util['format'](_0xfaa3('0x19b'),_0x1b2834[_0xfaa3('0x1b')],_0x1b2834['email']||_0x1b2834[_0xfaa3('0x199')][_0xfaa3('0x19c')]),'to':_0x1a8b93['to']||'','cc':_0x1a8b93['cc']||'','bcc':_0x1a8b93[_0xfaa3('0x19d')]||'','subject':_0x1a8b93[_0xfaa3('0x19e')],'html':_0x1a8b93[_0xfaa3('0x66')],'text':_0x1a8b93[_0xfaa3('0x66')]};var _0x5dc6ec={'tls':{'rejectUnauthorized':![]}};if(_0x1b2834[_0xfaa3('0x199')][_0xfaa3('0x19f')]){_0x5dc6ec[_0xfaa3('0x19f')]=_0x1b2834[_0xfaa3('0x199')][_0xfaa3('0x19f')];}else{_0x5dc6ec[_0xfaa3('0x1a0')]=_0x1b2834[_0xfaa3('0x199')][_0xfaa3('0x1a0')];_0x5dc6ec[_0xfaa3('0x1a1')]=_0x1b2834[_0xfaa3('0x199')]['port'];_0x5dc6ec[_0xfaa3('0x1a2')]=_0x1b2834[_0xfaa3('0x199')]['secure'];}if(_0x1b2834['Smtp'][_0xfaa3('0x1a3')]){_0x5dc6ec[_0xfaa3('0x1a4')]={'user':_0x1b2834[_0xfaa3('0x199')][_0xfaa3('0x19c')],'pass':_0x1b2834['Smtp'][_0xfaa3('0x1a5')]};}if(this[_0xfaa3('0xae')](_0x1a8b93['template_id'])){}logger[_0xfaa3('0xec')]('sendMail\x20message',JSON[_0xfaa3('0x7e')](_0x56277a));this['createSquareDetailsReport']['sync'](this,_0x1a8b93,_0x1a8b93[_0xfaa3('0x1a6')]);this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util['format']('Trying\x20SendMail\x20with\x20account\x20%s',_0x1b2834['name']));this[_0xfaa3('0x23')]['sync'](this,_0x5dc6ec,_0x56277a);return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](_0xfaa3('0x1a7'));};AGIVertices['prototype'][_0xfaa3('0x1a8')]=function(_0x550a01){logger[_0xfaa3('0x2e')](util['format']('Enter\x20in\x20SENDFAX\x20(%s)\x20block',_0x550a01[_0xfaa3('0x39')]));return this['channel'][_0xfaa3('0xb3')]('SENDFAX\x20block\x20not\x20implemented');};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x1a9')]=function(_0x4505a5){logger[_0xfaa3('0x2e')](util['format']('Enter\x20in\x20SENDSMS\x20(%s)\x20block',_0x4505a5[_0xfaa3('0x39')]));if(!this['isConfigured'](_0x4505a5[_0xfaa3('0x1aa')])){return this['channel'][_0xfaa3('0xb3')]('no\x20sms\x20account\x20configured');}var _0xcfc4a3=this[_0xfaa3('0x1ab')][_0xfaa3('0x7c')](this,_0x4505a5['sms_account_id']);if(!_0xcfc4a3){return this[_0xfaa3('0xc')]['error'](_0x4505a5,_0xfaa3('0x1ac'));}var _0x4eab28={'body':_0x4505a5[_0xfaa3('0x1ad')],'phone':_0x4505a5['to']||'','SmsAccountId':_0xcfc4a3['id']};logger[_0xfaa3('0xec')](_0xfaa3('0x1ae'),JSON['stringify'](_0x4eab28));this[_0xfaa3('0x37')][_0xfaa3('0x7c')](this,_0x4505a5,_0x4505a5[_0xfaa3('0x1aa')]);this[_0xfaa3('0xc')]['noop'](util['format'](_0xfaa3('0x1af'),_0xcfc4a3[_0xfaa3('0x1b')]));this[_0xfaa3('0x36')][_0xfaa3('0x7c')](this,_0x4eab28);return this[_0xfaa3('0xc')]['noop']('Sms\x20message\x20added\x20to\x20outgoing\x20process');};AGIVertices[_0xfaa3('0xe')]['set']=function(_0x4ae7bf){logger['info'](util[_0xfaa3('0x29')]('Enter\x20in\x20SET\x20(%s)\x20block',_0x4ae7bf['label']));if(!this[_0xfaa3('0xae')](_0x4ae7bf['variable_id'])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x4ae7bf,_0xfaa3('0x1b0'));}var _0x30b681=this['getVariable'][_0xfaa3('0x7c')](this,_0x4ae7bf['variable_id']);if(!_0x30b681){return this[_0xfaa3('0xc')]['error'](_0x4ae7bf,_0xfaa3('0x118'));}return this['channel'][_0xfaa3('0xa2')](_0x30b681,_0x4ae7bf[_0xfaa3('0x1b1')]);};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x1b2')]=function(_0x3d4666){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x1b3'),_0x3d4666['label']));this[_0xfaa3('0xc')][_0xfaa3('0xb3')]('START\x20CALLY\x20SQUARE');if(_0x3d4666[_0xfaa3('0xc2')]==='yes'){this['channel'][_0xfaa3('0xb3')](_0xfaa3('0x1b4'));return this[_0xfaa3('0xc')][_0xfaa3('0xc2')]();}return this[_0xfaa3('0xc')]['noop'](_0xfaa3('0x1b5'));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x1b6')]=function(_0xdfa70e){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x1b7'),_0xdfa70e[_0xfaa3('0x39')]));if(!this['isConfigured'](_0xdfa70e[_0xfaa3('0x1b8')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0xdfa70e,_0xfaa3('0x1b9'));}var _0x34704e=this['getSquareProject'][_0xfaa3('0x7c')](this,_0xdfa70e[_0xfaa3('0x1b8')]);if(!this[_0xfaa3('0xae')](_0x34704e)){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0xdfa70e,util['format']('no\x20subproject\x20found\x20with\x20id\x20%d',_0xdfa70e[_0xfaa3('0x1b8')]));}if(_0x34704e===this[_0xfaa3('0xc')][_0xfaa3('0x1ba')]){return this['channel'][_0xfaa3('0x2c')](_0xdfa70e,'project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project');}this['createSquareDetailsReport'][_0xfaa3('0x7c')](this,_0xdfa70e,_0x34704e);var _0x4c6aeb=this[_0xfaa3('0xc')][_0xfaa3('0x62')]('AGI',util[_0xfaa3('0x29')](_0xfaa3('0x1bb'),config[_0xfaa3('0x6')]['host']||'127.0.0.1',_0x34704e,this[_0xfaa3('0xc')][_0xfaa3('0x1ba')]));if(_0x4c6aeb[_0xfaa3('0xac')]===-0x1){return _0x4c6aeb;}return this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0xcc'),_0xfaa3('0x1bc'),_0x34704e));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x1bd')]=function(_0xf1d059){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x1be'),_0xf1d059['label']));var _0x401b0f=this['shellCommand'][_0xfaa3('0x7c')](this,_0xf1d059[_0xfaa3('0xbe')]);this['createSquareDetailsReport'][_0xfaa3('0x7c')](this,_0xf1d059,_0xf1d059[_0xfaa3('0xbe')]);if(this[_0xfaa3('0xae')](_0xf1d059[_0xfaa3('0xe5')])){var _0x4ce2d4=this[_0xfaa3('0xf')][_0xfaa3('0x7c')](this,_0xf1d059[_0xfaa3('0xe5')]);if(_0x4ce2d4){this['channel'][_0xfaa3('0xa2')](_0x4ce2d4,_0x401b0f);return this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')]('sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s',_0xf1d059[_0xfaa3('0xbe')],_0x4ce2d4));}}return this[_0xfaa3('0xc')]['noop'](util[_0xfaa3('0x29')](_0xfaa3('0x1bf'),_0xf1d059[_0xfaa3('0xbe')]));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x1c0')]=function(_0x7a0793){logger[_0xfaa3('0x2e')](util['format']('Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block',_0x7a0793['label']));_0x7a0793[_0xfaa3('0x66')]=_0x7a0793[_0xfaa3('0x66')][_0xfaa3('0xe3')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0xfaa3('0xae')](_0x7a0793[_0xfaa3('0x1c1')])){return this[_0xfaa3('0xc')]['noop'](_0xfaa3('0x1c2'));}if(!this[_0xfaa3('0xae')](_0x7a0793[_0xfaa3('0x66')])){return this['channel']['noop'](_0xfaa3('0xcf'));}this['channel'][_0xfaa3('0xb3')](util[_0xfaa3('0x29')]('Trying\x20Google\x20Cloud\x20TTS\x20%s',_0x7a0793[_0xfaa3('0x66')]));var _0x67d425=this[_0xfaa3('0x64')]['sync'](this,_0x7a0793);if(_0x67d425){this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util['format'](_0xfaa3('0x1c3'),_0x67d425));var _0x418d4b=this[_0xfaa3('0xc')][_0xfaa3('0x128')](_0x67d425);try{fs[_0xfaa3('0x104')](_0x67d425+_0xfaa3('0x129'));}catch(_0x5b9d20){logger[_0xfaa3('0x2c')](_0x5b9d20);}return _0x418d4b;}return this['channel'][_0xfaa3('0x2c')](_0x7a0793,_0xfaa3('0x1c4'));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x1c5')]=function(_0x258ea9){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x1c6'),_0x258ea9[_0xfaa3('0x39')]));_0x258ea9[_0xfaa3('0x66')]=_0x258ea9[_0xfaa3('0x66')][_0xfaa3('0xe3')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0xfaa3('0xae')](_0x258ea9[_0xfaa3('0x66')])){return this['channel']['noop']('no\x20text\x20configured');}this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x1c7'),_0x258ea9[_0xfaa3('0x66')]));var _0x419d9c=this[_0xfaa3('0x6d')][_0xfaa3('0x7c')](this,_0x258ea9);if(_0x419d9c){this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')]('Google\x20TTS\x20%s\x20file\x20created',_0x419d9c));var _0x4180f5=this[_0xfaa3('0xc')][_0xfaa3('0x128')](_0x419d9c);try{fs['unlink'](_0x419d9c+_0xfaa3('0x129'));}catch(_0x109998){logger[_0xfaa3('0x2c')](_0x109998);}return _0x4180f5;}return this[_0xfaa3('0xc')]['error'](_0x258ea9,_0xfaa3('0x1c8'));};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x1c9')]=function(_0x16b936){logger['info'](util[_0xfaa3('0x29')](_0xfaa3('0x1ca'),_0x16b936['label']));if(!this[_0xfaa3('0xae')](_0x16b936[_0xfaa3('0x158')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0x16b936,_0xfaa3('0x160'));}logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x16b936[_0xfaa3('0x158')]));var _0x172e2e=this['agentUnpause'][_0xfaa3('0x7c')](this,_0x16b936[_0xfaa3('0x158')]);if(_0x172e2e){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x15a'),this[_0xfaa3('0xc')]['callerid'],_0x16b936[_0xfaa3('0x158')]));this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')](_0xfaa3('0x15a'),this['channel'][_0xfaa3('0x3c')],_0x16b936[_0xfaa3('0x158')]));return{'code':0xc8,'result':_0xfaa3('0x15b')};}else{logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x15c'),this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x16b936[_0xfaa3('0x158')]));this[_0xfaa3('0xc')][_0xfaa3('0xb3')](util[_0xfaa3('0x29')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0xfaa3('0xc')][_0xfaa3('0x3c')],_0x16b936[_0xfaa3('0x158')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0xfaa3('0xe')][_0xfaa3('0x1cb')]=function(_0xb1d64f){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')]('Enter\x20in\x20VOICEMAIL\x20(%s)\x20block',_0xb1d64f[_0xfaa3('0x39')]));var _0x55692c=this[_0xfaa3('0xc')][_0xfaa3('0x62')](_0xfaa3('0x1cc'),[_0xb1d64f[_0xfaa3('0x1cd')],_0xb1d64f[_0xfaa3('0x84')]]);if(_0x55692c['result']===-0x1){return _0x55692c;}return this[_0xfaa3('0xc')]['noop'](util['format'](_0xfaa3('0xcc'),_0xfaa3('0x1cc'),_0xb1d64f['mailbox']));};AGIVertices['prototype'][_0xfaa3('0x1ce')]=function(_0xeb9e36){logger[_0xfaa3('0x2e')](util[_0xfaa3('0x29')](_0xfaa3('0x1cf'),_0xeb9e36[_0xfaa3('0x39')]));if(!this[_0xfaa3('0xae')](_0xeb9e36[_0xfaa3('0xe5')])){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0xeb9e36,'no\x20variable\x20selected');}var _0x351b69=this[_0xfaa3('0xf')][_0xfaa3('0x7c')](this,_0xeb9e36[_0xfaa3('0xe5')]);if(!_0x351b69){return this[_0xfaa3('0xc')][_0xfaa3('0x2c')](_0xeb9e36,_0xfaa3('0x118'));}var _0x7e4e9b=this[_0xfaa3('0xc')][_0xfaa3('0xf')](_0x351b69);return{'code':0xc8,'result':_0x7e4e9b[_0xfaa3('0xa9')]?_0x7e4e9b[_0xfaa3('0xa9')]:'-'};};String['prototype'][_0xfaa3('0xa8')]=function(_0x30d691,_0x18f4a7){return this[_0xfaa3('0xa5')](_0x30d691)[_0xfaa3('0x1d0')](_0x18f4a7);};module[_0xfaa3('0x1d1')]=AGIVertices;