Built motion from commit 67e5df37.|2.0.66
[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 _0xa5c1=['service','host','port','secure','authentication','auth','pass','debug','sendMail\x20message','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','yes','Answer','Skipped\x20Answer','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','no\x20subproject\x20selected','no\x20subproject\x20found\x20with\x20id\x20%d','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','agi://%s/square,\x22%s\x22,\x22%s\x22','AGI','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20no\x20stored','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','voicemail','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','join','exports','path','util','lodash','randomstring','mustache','../../config/logger','agi','../../config/environment','./scripts','/var/opt/motion2/server/files','getdigits','rpc','prototype','getVariable','then','name','catch','getVoiceQueue','getSquareProject','getSquareProjectById','getSquareOdbc','getSquareOdbcById','dsn','getUser','getTrunk','getTrunkById','getSound','getSoundById','getSoundPath','save_name','getMailAccount','getMailAccountById','sendMailMessage','mailRpc','getIntervals','IntervalId','interval','Intervals','format','%s/sounds/converted/%s','getQueryOdbc','open','Error\x20getting\x20ODBC\x20connection\x20%s','info','Error\x20executing\x20query\x20%s','close','error','getSmsAccount','getSmsAccountById','createSmsMessage','createSquareDetailsReport','channel','label','agicommand','arg_1','createSquareRecording','uniqueid','calleridname','context','extension','priority','file','createCmContact','isEmpty','isNil','callback_','random','lastName','phone','list_id','callback','Callback\x20scheduled\x20at\x20','scheduledAt','toString','callback_priority','getPause','agentPause','agent','callerid','agentUnpause','agentLogout','LOCAL','agentLogin','shellCommand','exec','replace','googleTTS','text','google_tts_language','googleDialogflow','key','dialogflow_language','en-US','ispeechASR','isConfigured','model','aws_access_key_id','aws_secret_access_key','aws_polly_region','aws_polly_voice','aws_text_type','googleASR','google_asr_language','tildeASR','appid','appsecret','clear','clone','hasOwnProperty','isString','replaceAllVariables','split','length','replaceAll','extra','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','setVariable','maxRetry','sync','retry','command','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','timeout','Enter\x20in\x20CALLBACK\x20(%s)\x20block','delay','add','minutes','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','options','Executed\x20command\x20%s\x20%s','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','noop','no\x20text\x20configured','Executed\x20command\x20MRCPSynth\x20%s','lumenvoxasr','grammar','getAndSetVariable','RECOG_CONFIDENCE()','LUMENVOX_ASR_CONFIDENCE','RECOG_INSTANCE()','LUMENVOX_ASR_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20odbc\x20database\x20found','query','no\x20query\x20configured','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','%s[%s][%s]','variable\x20%s\x20set','dial','sip_id','no\x20user\x20selected','no\x20user\x20found','DIAL','SIP/%s','opts','url','Executed\x20command\x20%s','dialogflow','no\x20key\x20configured','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','toUpperCase','Dialogflow\x20Result\x20%s','speech','Google\x20TTS\x20is\x20unreachable','end','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','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','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','file_id','no\x20file\x20audio\x20selected','no\x20file\x20audio\x20found','response','maxdigit','test','stringify','mindigit','generate','hiddendigitspos','first','substr','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','awsPolly','aws\x20Polly\x20%s\x20file\x20created','streamFile','intKey','unlink','.wav','aws\x20Polly\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','wav','%s.%s','beep','recordFile','google\x20%s\x20file\x20created','GoogleASR\x20Result\x20%s','tildeasr','no\x20appid\x20configured','no\x20appsecret\x20configured','%s/recordings/%s','NOBEEP','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','gotoif','no\x20condition\x20configured','condition','true','EVAL\x20CONDITION\x20%s\x20%s','false','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20interval\x20configured','no\x20intervals\x20found','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','hangup','ispeechasr','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','ispeechtts','ispeechTTS','ispeech\x20TTS\x20is\x20unreachable','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','FIND\x20AGENT\x20%s\x20BY\x20%s','findBy','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','no\x20find\x20by\x20configured','failure','math','Enter\x20in\x20MATH\x20(%s)\x20block','operation','no\x20operation\x20configured','math\x20%s','isArray','%s[%s]','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','getData','digit','output','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','pause_id','playback','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20found','indexOf','toLowerCase','QUEUE','macro','gosub','position','record','Enter\x20in\x20RECORD\x20(%s)\x20block','%s_%s','RECORDING_SAVENAME','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','number','sayPhonetic','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','Smtp','no\x20mail\x20account\x20found','user','bcc','subject'];(function(_0x2642cb,_0x4b917f){var _0xe6e41=function(_0x281676){while(--_0x281676){_0x2642cb['push'](_0x2642cb['shift']());}};_0xe6e41(++_0x4b917f);}(_0xa5c1,0x19f));var _0x1a5c=function(_0x2c5193,_0x2b3ff7){_0x2c5193=_0x2c5193-0x0;var _0x17be24=_0xa5c1[_0x2c5193];return _0x17be24;};'use strict';var fs=require('fs');var path=require(_0x1a5c('0x0'));var util=require(_0x1a5c('0x1'));var _=require(_0x1a5c('0x2'));var sh=require('shelljs');var odbc=require('odbc')();var rs=require(_0x1a5c('0x3'));var moment=require('moment');var Mustache=require(_0x1a5c('0x4'));var logger=require(_0x1a5c('0x5'))(_0x1a5c('0x6'));var config=require(_0x1a5c('0x7'));var scripts=require(_0x1a5c('0x8'));var FILES_PATH=_0x1a5c('0x9');var verticesWithRetry=['menu',_0x1a5c('0xa'),'getsecretdigits'];var AGIVertices=function(_0x438f8f,_0x43a2ed,_0x1702ce){this['channel']=_0x438f8f;this[_0x1a5c('0xb')]=_0x43a2ed;this['mailRpc']=_0x1702ce;};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xd')]=function(_0x5097cf,_0x1323be){this[_0x1a5c('0xb')]['getVariableById'](_0x5097cf)[_0x1a5c('0xe')](function(_0x3f7368){_0x1323be(null,_0x3f7368?_0x3f7368[_0x1a5c('0xf')]:![]);})[_0x1a5c('0x10')](function(_0x3e344e){_0x1323be(_0x3e344e);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x11')]=function(_0x5bfb05,_0x2fa5ae){this[_0x1a5c('0xb')]['getVoiceQueueById'](_0x5bfb05)[_0x1a5c('0xe')](function(_0x207899){_0x2fa5ae(null,_0x207899?_0x207899['name']:![]);})[_0x1a5c('0x10')](function(_0x115aa6){_0x2fa5ae(_0x115aa6);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x12')]=function(_0x555b63,_0x2f3ba7){this['rpc'][_0x1a5c('0x13')](_0x555b63)[_0x1a5c('0xe')](function(_0x57cb61){_0x2f3ba7(null,_0x57cb61?_0x57cb61['name']:![]);})['catch'](function(_0x32e177){_0x2f3ba7(_0x32e177);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x14')]=function(_0xe376f4,_0x232798){this['rpc'][_0x1a5c('0x15')](_0xe376f4)['then'](function(_0xef3695){_0x232798(null,_0xef3695?_0xef3695[_0x1a5c('0x16')]:![]);})[_0x1a5c('0x10')](function(_0x5b4dfd){_0x232798(_0x5b4dfd);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x17')]=function(_0x3e1487,_0x3502cb){this[_0x1a5c('0xb')]['getUserById'](_0x3e1487)[_0x1a5c('0xe')](function(_0xbd916e){_0x3502cb(null,_0xbd916e?_0xbd916e[_0x1a5c('0xf')]:![]);})[_0x1a5c('0x10')](function(_0x35b5ff){_0x3502cb(_0x35b5ff);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x18')]=function(_0x414482,_0x11c61c){this[_0x1a5c('0xb')][_0x1a5c('0x19')](_0x414482)[_0x1a5c('0xe')](function(_0x4c6520){_0x11c61c(null,_0x4c6520?_0x4c6520[_0x1a5c('0xf')]:![]);})['catch'](function(_0x3d7168){_0x11c61c(_0x3d7168);});};AGIVertices['prototype'][_0x1a5c('0x1a')]=function(_0x4323f8,_0x12784b){var _0x1ba1cf=this;this[_0x1a5c('0xb')][_0x1a5c('0x1b')](_0x4323f8)[_0x1a5c('0xe')](function(_0x3e3dd1){_0x12784b(null,_0x3e3dd1?_0x1ba1cf[_0x1a5c('0x1c')](_0x3e3dd1[_0x1a5c('0x1d')]):![]);})[_0x1a5c('0x10')](function(_0x4e2fe3){_0x12784b(_0x4e2fe3);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x1e')]=function(_0x299406,_0x388f94){this[_0x1a5c('0xb')][_0x1a5c('0x1f')](_0x299406)[_0x1a5c('0xe')](function(_0x1a2bec){_0x388f94(null,_0x1a2bec?_0x1a2bec:![]);})[_0x1a5c('0x10')](function(_0x523dfb){_0x388f94(_0x523dfb);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x20')]=function(_0x257013,_0x131215,_0x5cce0c){this[_0x1a5c('0x21')][_0x1a5c('0x20')](_0x257013,_0x131215)[_0x1a5c('0xe')](function(){_0x5cce0c(null);})[_0x1a5c('0x10')](function(_0x40962c){_0x5cce0c(_0x40962c);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x22')]=function(_0x4aa5c8,_0x1a6dcf){this[_0x1a5c('0xb')]['getIntervalById'](_0x4aa5c8)[_0x1a5c('0xe')](function(_0x1e6854){if(_0x1e6854){if(_0x1e6854[_0x1a5c('0x23')]){_0x1a6dcf(null,[_0x1e6854[_0x1a5c('0x24')]]);}else{_0x1a6dcf(null,_['map'](_0x1e6854[_0x1a5c('0x25')],_0x1a5c('0x24')));}}else{_0x1a6dcf(null,![]);}})['catch'](function(_0x1f957a){_0x1a6dcf(_0x1f957a);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x1c')]=function(_0x1dbcbb){return util[_0x1a5c('0x26')](_0x1a5c('0x27'),FILES_PATH,_0x1dbcbb);};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x28')]=function(_0x24f88b,_0x1ded56,_0x515780){odbc[_0x1a5c('0x29')](_0x24f88b,function(_0x7f8e50){if(_0x7f8e50){logger['error'](_0x1a5c('0x2a'),_0x7f8e50);_0x515780(_0x7f8e50);}else{logger[_0x1a5c('0x2b')]('ODBC\x20connection\x20successfully');odbc['query'](_0x1ded56,function(_0x294b69,_0xefaf30){if(_0x294b69){logger[_0x1a5c('0x2b')](_0x1a5c('0x2c'),_0x1ded56);_0x515780(_0x294b69);}else{logger['info']('Query\x20executed\x20correctly\x20%s',_0x1ded56);odbc[_0x1a5c('0x2d')](function(_0x387152){if(_0x387152){logger[_0x1a5c('0x2e')]('Error\x20closing\x20connection\x20to\x20odbc\x20%s',_0x387152);}_0x515780(null,_0xefaf30);});}});}});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x2f')]=function(_0x129cd1,_0x216ba0){this[_0x1a5c('0xb')][_0x1a5c('0x30')](_0x129cd1)[_0x1a5c('0xe')](function(_0x18adf5){_0x216ba0(null,_0x18adf5?_0x18adf5:![]);})['catch'](function(_0x4cb0e8){_0x216ba0(_0x4cb0e8);});};AGIVertices['prototype'][_0x1a5c('0x31')]=function(_0x500d6e,_0x5943a9){this[_0x1a5c('0xb')][_0x1a5c('0x31')](_0x500d6e)[_0x1a5c('0xe')](function(_0x1072d5){_0x5943a9(null,_0x1072d5);})[_0x1a5c('0x10')](function(_0x3fce88){_0x5943a9(_0x3fce88);});};AGIVertices['prototype'][_0x1a5c('0x32')]=function(_0x3e1739,_0x2fef3e,_0x5e9d4c){this[_0x1a5c('0xb')][_0x1a5c('0x32')]({'uniqueid':this[_0x1a5c('0x33')]['uniqueid'],'node':_0x3e1739[_0x1a5c('0x34')],'application':_0x3e1739[_0x1a5c('0x35')],'data':_0x2fef3e||null,'project_name':this['channel'][_0x1a5c('0x36')],'callerid':this[_0x1a5c('0x33')]['callerid']})['then'](function(_0x56dceb){_0x5e9d4c(null,_0x56dceb);})[_0x1a5c('0x10')](function(_0x148c7a){_0x5e9d4c(_0x148c7a);});};AGIVertices['prototype'][_0x1a5c('0x37')]=function(_0x2924fe,_0x435d6a,_0xe74fd0,_0x21ecaf){this[_0x1a5c('0xb')][_0x1a5c('0x37')]({'uniqueid':this[_0x1a5c('0x33')][_0x1a5c('0x38')],'callerid':this[_0x1a5c('0x33')]['callerid'],'calleridname':this[_0x1a5c('0x33')][_0x1a5c('0x39')],'context':this[_0x1a5c('0x33')][_0x1a5c('0x3a')],'extension':this[_0x1a5c('0x33')][_0x1a5c('0x3b')],'priority':this[_0x1a5c('0x33')][_0x1a5c('0x3c')],'accountcode':this[_0x1a5c('0x33')]['accountcode'],'dnid':this['channel']['dnid'],'projectName':this[_0x1a5c('0x33')][_0x1a5c('0x36')],'saveName':_0x435d6a,'filename':_0x2924fe[_0x1a5c('0x3d')]||_0x435d6a,'savePath':_0xe74fd0})['then'](function(_0x42229e){_0x21ecaf(null,_0x42229e);})[_0x1a5c('0x10')](function(_0x29903f){_0x21ecaf(_0x29903f);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x3e')]=function(_0x4a4b2e,_0x343a50){this['rpc'][_0x1a5c('0x3e')]({'firstName':_[_0x1a5c('0x3f')](_0x4a4b2e[_0x1a5c('0xf')])||_[_0x1a5c('0x40')](_0x4a4b2e['name'])?_0x1a5c('0x41')+Math[_0x1a5c('0x42')]():_0x4a4b2e[_0x1a5c('0xf')],'lastName':_[_0x1a5c('0x3f')](_0x4a4b2e[_0x1a5c('0x43')])||_[_0x1a5c('0x40')](_0x4a4b2e[_0x1a5c('0x43')])?null:_0x4a4b2e['lastName'],'phone':_0x4a4b2e[_0x1a5c('0x44')],'ListId':_0x4a4b2e[_0x1a5c('0x45')],'scheduledAt':_0x4a4b2e['scheduledAt'],'callbackUniqueid':this[_0x1a5c('0x33')][_0x1a5c('0x38')],'tags':_0x1a5c('0x46'),'description':_0x1a5c('0x47')+_0x4a4b2e[_0x1a5c('0x48')][_0x1a5c('0x49')](),'priority':_0x4a4b2e[_0x1a5c('0x4a')]})[_0x1a5c('0xe')](function(_0x186dec){_0x343a50(null,_0x186dec);})[_0x1a5c('0x10')](function(_0x3f3d31){_0x343a50(_0x3f3d31);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x4b')]=function(_0x1732d0,_0x34a3a1){this[_0x1a5c('0xb')]['getPauseById'](_0x1732d0)[_0x1a5c('0xe')](function(_0x5043cc){_0x34a3a1(null,_0x5043cc?_0x5043cc[_0x1a5c('0xf')]:![]);})[_0x1a5c('0x10')](function(_0x26d51b){_0x34a3a1(_0x26d51b);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x4c')]=function(_0xc19a6f,_0x290e41,_0xa6ba43){var _0x1e2b53={'role':_0x1a5c('0x4d')};_0x1e2b53[_0xc19a6f]=this['channel'][_0x1a5c('0x4e')];this[_0x1a5c('0xb')][_0x1a5c('0x4c')](_0x1e2b53,_0x290e41,this[_0x1a5c('0x33')][_0x1a5c('0x38')])[_0x1a5c('0xe')](function(_0x32c149){_0xa6ba43(null,_[_0x1a5c('0x40')](_0x32c149)?![]:!![]);})[_0x1a5c('0x10')](function(_0x306e4f){logger['error'](_0x306e4f);_0xa6ba43(null,![]);});};AGIVertices[_0x1a5c('0xc')]['agentUnpause']=function(_0x4b3814,_0x4bcbb7){var _0x356442={'role':_0x1a5c('0x4d')};_0x356442[_0x4b3814]=this[_0x1a5c('0x33')]['callerid'];this[_0x1a5c('0xb')][_0x1a5c('0x4f')](_0x356442)['then'](function(_0x5979c4){_0x4bcbb7(null,_[_0x1a5c('0x40')](_0x5979c4)?![]:!![]);})[_0x1a5c('0x10')](function(_0x1120d8){logger[_0x1a5c('0x2e')](_0x1120d8);_0x4bcbb7(null,![]);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x50')]=function(_0x4d30b9,_0x49d438){var _0x288821={'role':'agent'};_0x288821[_0x4d30b9]=this[_0x1a5c('0x33')][_0x1a5c('0x4e')];this['rpc'][_0x1a5c('0x50')](_0x288821)['then'](function(_0x2a7f27){_0x49d438(null,_[_0x1a5c('0x40')](_0x2a7f27)?![]:!![]);})['catch'](function(_0x1433a0){logger[_0x1a5c('0x2e')](_0x1433a0);_0x49d438(null,![]);});};AGIVertices[_0x1a5c('0xc')]['agentLogin']=function(_0x56bc49,_0x552a4f){var _0xc6c422={'role':_0x1a5c('0x4d')};_0xc6c422[_0x56bc49]=this['channel'][_0x1a5c('0x4e')];var _0x5abae0=_0x56bc49!='internal'?util['format']('%s/%s@from-sip/n',_0x1a5c('0x51'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')]):undefined;this[_0x1a5c('0xb')][_0x1a5c('0x52')](_0xc6c422,_0x5abae0)[_0x1a5c('0xe')](function(_0x920757){_0x552a4f(null,_[_0x1a5c('0x40')](_0x920757)?![]:!![]);})['catch'](function(_0x368b27){logger[_0x1a5c('0x2e')](_0x368b27);_0x552a4f(null,![]);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x53')]=function(_0x422500,_0x5406c7){sh[_0x1a5c('0x54')](_['trim'](_0x422500),function(_0x58c8bb,_0x134748){var _0x23a4af=_0x134748[_0x1a5c('0x55')](/(\r\n|\n|\r)/gm,'');_0x5406c7(null,_0x23a4af);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x56')]=function(_0x3837cd,_0xa21de4){scripts[_0x1a5c('0x56')](_0x3837cd[_0x1a5c('0x57')],_0x3837cd[_0x1a5c('0x58')]||'en',0x1)[_0x1a5c('0xe')](function(_0x1b0c3f){_0xa21de4(null,_0x1b0c3f);})[_0x1a5c('0x10')](function(_0x4a33ee){_0xa21de4(_0x4a33ee);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x59')]=function(_0x29bd89,_0x249434){scripts['googleDialogflow'](this[_0x1a5c('0x33')][_0x1a5c('0x38')],_0x29bd89[_0x1a5c('0x5a')],_0x29bd89[_0x1a5c('0x57')],_0x29bd89[_0x1a5c('0x5b')]||'en')[_0x1a5c('0xe')](function(_0x396963){_0x249434(null,_0x396963);})['catch'](function(_0x7750de){_0x249434(_0x7750de);});};AGIVertices[_0x1a5c('0xc')]['ispeechTTS']=function(_0x1634ec,_0x3694a7){scripts['ispeechTTS'](_0x1634ec[_0x1a5c('0x5a')],_0x1634ec[_0x1a5c('0x57')],_0x1634ec['ispeech_tts_language']||_0x1a5c('0x5c'),_0x1634ec['speed'])[_0x1a5c('0xe')](function(_0x530a16){_0x3694a7(null,_0x530a16);})[_0x1a5c('0x10')](function(_0x1ec812){_0x3694a7(_0x1ec812);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x5d')]=function(_0x24557f,_0x479e10,_0xed32db){scripts[_0x1a5c('0x5d')](_0x479e10,_0x24557f[_0x1a5c('0x5a')],_0x24557f['ispeech_asr_language']||_0x1a5c('0x5c'),this[_0x1a5c('0x5e')](_0x24557f[_0x1a5c('0x5f')])?_0x24557f[_0x1a5c('0x5f')]:undefined)[_0x1a5c('0xe')](function(_0x14d8b0){_0xed32db(null,_0x14d8b0);})[_0x1a5c('0x10')](function(_0x475a5f){_0xed32db(_0x475a5f);});};AGIVertices[_0x1a5c('0xc')]['awsPolly']=function(_0x49304d,_0x2e1b2c){scripts['awsPolly'](_0x49304d[_0x1a5c('0x60')],_0x49304d[_0x1a5c('0x61')],_0x49304d[_0x1a5c('0x62')],_0x49304d[_0x1a5c('0x63')]||'Amy',_0x49304d[_0x1a5c('0x57')],_0x49304d[_0x1a5c('0x64')]||_0x1a5c('0x57'))[_0x1a5c('0xe')](function(_0x227f37){_0x2e1b2c(null,_0x227f37);})['catch'](function(_0x5229e8){_0x2e1b2c(_0x5229e8);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x65')]=function(_0xeeec0d,_0x598dbb,_0x15d2ab){scripts['googleASR'](_0x598dbb,_0xeeec0d[_0x1a5c('0x5a')],_0xeeec0d[_0x1a5c('0x66')]||_0x1a5c('0x5c'))[_0x1a5c('0xe')](function(_0x42ba8b){_0x15d2ab(null,_0x42ba8b);})[_0x1a5c('0x10')](function(_0x348b7a){_0x15d2ab(_0x348b7a);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x67')]=function(_0x490c84,_0x47652c,_0x10438b){scripts[_0x1a5c('0x67')](_0x47652c,_0x490c84[_0x1a5c('0x68')],_0x490c84[_0x1a5c('0x69')],_0x490c84['uri'])[_0x1a5c('0xe')](function(_0x1b43ad){_0x10438b(null,_0x1b43ad);})['catch'](function(_0x34bcbf){_0x10438b(_0x34bcbf);});};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x6a')]=function(_0x1c54ce){var _0x28b6b9=_['includes'](verticesWithRetry,_0x1c54ce[_0x1a5c('0x35')])?_0x1c54ce:_[_0x1a5c('0x6b')](_0x1c54ce);for(var _0x3802e3 in _0x28b6b9){if(_0x28b6b9[_0x1a5c('0x6c')](_0x3802e3)){if(_0x28b6b9[_0x3802e3]&&_[_0x1a5c('0x6d')](_0x28b6b9[_0x3802e3])){_0x28b6b9[_0x3802e3]=this[_0x1a5c('0x6e')](_0x28b6b9[_0x3802e3]);}}}return _0x28b6b9;};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x6e')]=function(_0xeaa5e8){var _0x3456e2=_0xeaa5e8[_0x1a5c('0x6f')]('{');for(var _0x57c0f1=0x1;_0x57c0f1<_0x3456e2['length'];_0x57c0f1+=0x1){var _0x31a921=_0x3456e2[_0x57c0f1][_0x1a5c('0x6f')]('}');if(_0x31a921[_0x1a5c('0x70')]>0x1){_0xeaa5e8=_0xeaa5e8[_0x1a5c('0x71')]('{'+_0x31a921[0x0]+'}',this['channel'][_0x1a5c('0xd')](_0x31a921[0x0])[_0x1a5c('0x72')]||_0x31a921[0x0]);}}if(_0x3456e2[_0x1a5c('0x70')]===0x1){return _0xeaa5e8[_0x1a5c('0x49')]();}return this[_0x1a5c('0x6e')](_0xeaa5e8);};AGIVertices[_0x1a5c('0xc')]['getAndSetVariable']=function(_0x54a983,_0x108276){var _0x36c883=this[_0x1a5c('0x33')][_0x1a5c('0xd')](_0x54a983);if(_0x36c883[_0x1a5c('0x73')]===-0x1){return _0x36c883;}logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x74'),_0x108276,_0x36c883['extra']));return this[_0x1a5c('0x33')][_0x1a5c('0x75')](_0x108276,_0x36c883['extra']);};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x5e')]=function(_0x110886){return _0x110886&&_0x110886!=='0'&&_0x110886!=='-1'&&_0x110886!=='';};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x76')]=function(_0x4c2917){this['createSquareDetailsReport'][_0x1a5c('0x77')](this,_0x4c2917,'-');_0x4c2917[_0x1a5c('0x78')]=_0x4c2917['maxRetry'];return{'code':0xc8,'result':'-'};};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x6')]=function(_0x467c1c){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')]('Enter\x20in\x20AGI\x20(%s)\x20block',_0x467c1c[_0x1a5c('0x34')]));return this[_0x1a5c('0x33')][_0x1a5c('0x6')]([_0x467c1c[_0x1a5c('0x79')],_0x467c1c[_0x1a5c('0x7a')]]);};AGIVertices['prototype'][_0x1a5c('0x7b')]=function(_0xb433f9){logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0x7c'),_0xb433f9[_0x1a5c('0x34')]));if(this[_0x1a5c('0x5e')](_0xb433f9['timeout'])){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')]('Wait\x20%s\x20seconds\x20before\x20answer',_0xb433f9[_0x1a5c('0x7d')]));var _0x5bc8d0=this[_0x1a5c('0x33')]['wait'](_0xb433f9[_0x1a5c('0x7d')]);if(_0x5bc8d0['result']===-0x1){return _0x5bc8d0;}}return this[_0x1a5c('0x33')][_0x1a5c('0x7b')]();};AGIVertices['prototype'][_0x1a5c('0x46')]=function(_0x144f4a){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x7e'),_0x144f4a[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x144f4a[_0x1a5c('0x45')])){return this['channel'][_0x1a5c('0x2e')](_0x144f4a,'no\x20list\x20selected');}_0x144f4a[_0x1a5c('0x48')]=moment();if(this[_0x1a5c('0x5e')](_0x144f4a[_0x1a5c('0x7f')])){_0x144f4a[_0x1a5c('0x48')]=moment()[_0x1a5c('0x80')](_0x144f4a[_0x1a5c('0x7f')],_0x1a5c('0x81'));}if(!this[_0x1a5c('0x5e')](_0x144f4a[_0x1a5c('0x4a')])){_0x144f4a[_0x1a5c('0x4a')]=0x2;}this[_0x1a5c('0x3e')]['sync'](this,_0x144f4a);return this['channel']['noop'](util['format'](_0x1a5c('0x82'),_0x144f4a[_0x1a5c('0x44')],_0x144f4a[_0x1a5c('0x45')],_0x144f4a[_0x1a5c('0x48')]));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x83')]=function(_0x160ec5){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x84'),_0x160ec5[_0x1a5c('0x34')]));var _0x1e1716=this[_0x1a5c('0x33')][_0x1a5c('0x54')](_0x160ec5[_0x1a5c('0x85')],_0x160ec5[_0x1a5c('0x86')]);if(_0x1e1716[_0x1a5c('0x73')]===-0x1){return _0x1e1716;}return this[_0x1a5c('0x33')]['noop'](util[_0x1a5c('0x26')](_0x1a5c('0x87'),_0x160ec5[_0x1a5c('0x85')],_0x160ec5[_0x1a5c('0x86')]));};AGIVertices[_0x1a5c('0xc')]['lumenvoxtts']=function(_0x28786e){logger['info'](util[_0x1a5c('0x26')](_0x1a5c('0x88'),_0x28786e[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x28786e['text'])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0x8a'));}var _0x4fe86c='\x22'+_0x28786e[_0x1a5c('0x57')]+'\x22';if(this['isConfigured'](_0x28786e[_0x1a5c('0x86')])){_0x4fe86c+=','+_0x28786e['options'];}var _0xd285f4=this[_0x1a5c('0x33')][_0x1a5c('0x54')]('MRCPSynth',_0x4fe86c);if(_0xd285f4[_0x1a5c('0x73')]===-0x1){return _0xd285f4;}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0x8b'),_0x4fe86c));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x8c')]=function(_0x381aa6){logger[_0x1a5c('0x2b')](util['format']('Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block',_0x381aa6[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x381aa6[_0x1a5c('0x8d')])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')]('no\x20grammar\x20configured');}var _0x2f34fc=_0x381aa6[_0x1a5c('0x8d')];if(this[_0x1a5c('0x5e')](_0x381aa6['options'])){_0x2f34fc+=','+_0x381aa6[_0x1a5c('0x86')];}var _0x45e00e=this[_0x1a5c('0x33')][_0x1a5c('0x54')]('MRCPRecog',_0x2f34fc);if(_0x45e00e[_0x1a5c('0x73')]===-0x1){return _0x45e00e;}var _0xd06cf=this[_0x1a5c('0x8e')](_0x1a5c('0x8f'),_0x1a5c('0x90'));if(_0xd06cf['result']===-0x1){return _0xd06cf;}var _0x5bcac6=this[_0x1a5c('0x8e')]('RECOG_INPUT()','LUMENVOX_ASR_TRANSCRIPT');if(_0x5bcac6[_0x1a5c('0x73')]===-0x1){return _0x5bcac6;}var _0x4482d3=this[_0x1a5c('0x8e')](_0x1a5c('0x91'),_0x1a5c('0x92'));if(_0x4482d3[_0x1a5c('0x73')]===-0x1){return _0x4482d3;}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0x93'),_0x2f34fc));};AGIVertices[_0x1a5c('0xc')]['database']=function(_0x4ac629){logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0x94'),_0x4ac629['label']));if(!this['isConfigured'](_0x4ac629['odbc_id'])){return this[_0x1a5c('0x33')]['error'](_0x4ac629,'no\x20database\x20selected');}var _0x466f7c=this[_0x1a5c('0x14')][_0x1a5c('0x77')](this,_0x4ac629[_0x1a5c('0x95')]);if(!_0x466f7c){return this[_0x1a5c('0x33')]['error'](_0x4ac629,_0x1a5c('0x96'));}if(!this[_0x1a5c('0x5e')](_0x4ac629[_0x1a5c('0x97')])){return this['channel'][_0x1a5c('0x2e')](_0x4ac629,_0x1a5c('0x98'));}var _0x1592ea=_0x4ac629[_0x1a5c('0x97')][_0x1a5c('0x55')](/(\r\n|\n|\r)/gm,'\x20');this[_0x1a5c('0x33')]['noop'](util[_0x1a5c('0x26')](_0x1a5c('0x99'),_0x1592ea));var _0x3ba1e8=this[_0x1a5c('0x28')][_0x1a5c('0x77')](this,_0x466f7c,_0x1592ea);this['createSquareDetailsReport'][_0x1a5c('0x77')](this,_0x4ac629,_0x1592ea);if(!this[_0x1a5c('0x5e')](_0x4ac629[_0x1a5c('0x9a')])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0x9b'));}var _0x5c650c=this[_0x1a5c('0xd')][_0x1a5c('0x77')](this,_0x4ac629[_0x1a5c('0x9a')]);if(!_0x5c650c){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x4ac629,_0x1a5c('0x9c'));}var _0x80e7cd=this;_0x3ba1e8['forEach'](function(_0x41b637,_0x44d969){Object['keys'](_0x41b637)['forEach'](function(_0x47a8b5){_0x80e7cd[_0x1a5c('0x33')][_0x1a5c('0x75')](util[_0x1a5c('0x26')](_0x1a5c('0x9d'),_0x5c650c,_0x44d969,_0x47a8b5),_0x41b637[_0x47a8b5]);});});this[_0x1a5c('0x33')][_0x1a5c('0x75')](util[_0x1a5c('0x26')]('%s_ROWS_COUNT',_0x5c650c),_0x3ba1e8[_0x1a5c('0x70')]);return this['channel'][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0x9e'),_0x5c650c));};AGIVertices['prototype'][_0x1a5c('0x9f')]=function(_0x96d834){logger['debug'](util[_0x1a5c('0x26')]('Enter\x20in\x20DIAL\x20(%s)\x20block',_0x96d834[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x96d834[_0x1a5c('0xa0')])){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x96d834,_0x1a5c('0xa1'));}var _0x30db7d=this[_0x1a5c('0x17')][_0x1a5c('0x77')](this,_0x96d834[_0x1a5c('0xa0')]);if(!_0x30db7d){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x96d834,_0x1a5c('0xa2'));}var _0x425906=this[_0x1a5c('0x33')][_0x1a5c('0x54')](_0x1a5c('0xa3'),[util[_0x1a5c('0x26')](_0x1a5c('0xa4'),_0x30db7d),_0x96d834[_0x1a5c('0x7d')],_0x96d834[_0x1a5c('0xa5')],_0x96d834[_0x1a5c('0xa6')]]);if(_0x425906[_0x1a5c('0x73')]===-0x1){return _0x425906;}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0xa7'),_0x1a5c('0xa3')));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xa8')]=function(_0x23e5bb){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')]('Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block',_0x23e5bb[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x23e5bb[_0x1a5c('0x5a')])){return this[_0x1a5c('0x33')]['noop'](_0x1a5c('0xa9'));}if(!this['isConfigured'](_0x23e5bb[_0x1a5c('0x57')])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0x8a'));}this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0xaa'),_0x23e5bb['text']));var _0x38c141=this[_0x1a5c('0x59')][_0x1a5c('0x77')](this,_0x23e5bb);if(_0x38c141){for(var _0x23a410 in _0x38c141){if(_0x38c141['hasOwnProperty'](_0x23a410)){this[_0x1a5c('0x33')][_0x1a5c('0x75')](util['format'](_0x1a5c('0xab'),_0x23a410[_0x1a5c('0xac')]()),_0x38c141[_0x23a410]);}}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0xad'),_0x38c141[_0x1a5c('0xae')]));}return this[_0x1a5c('0x33')]['error'](_0x23e5bb,_0x1a5c('0xaf'));};AGIVertices['prototype'][_0x1a5c('0xb0')]=function(_0x1fdcd8){logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0xb1'),_0x1fdcd8['label']));return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0xb0'));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xb2')]=function(_0x422bda){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xb3'),_0x422bda['label']));var _0x38554b='';if(_0x422bda[_0x1a5c('0xb4')]){if(!this['isConfigured'](_0x422bda[_0x1a5c('0xb4')])){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x422bda,_0x1a5c('0xb5'));}else{var _0x550f33=parseInt(_0x422bda[_0x1a5c('0xb4')],0xa);if(isNaN(_0x550f33)){_0x38554b=_0x422bda['trunk_id'];}else{_0x38554b=this['getTrunk'][_0x1a5c('0x77')](this,_0x422bda[_0x1a5c('0xb4')]);if(!_0x38554b){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x422bda,_0x1a5c('0xb6'));}}}}else if(_0x422bda[_0x1a5c('0xb7')]){_0x38554b=_0x422bda['trunk_name'];}else{return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x422bda,'no\x20trunk\x20selected');}var _0x46820a=this[_0x1a5c('0x33')][_0x1a5c('0x54')](_0x1a5c('0xa3'),[util[_0x1a5c('0x26')](_0x1a5c('0xb8'),_0x38554b,_0x422bda[_0x1a5c('0x44')]),_0x422bda[_0x1a5c('0x7d')],_0x422bda['opts'],_0x422bda[_0x1a5c('0xa6')]]);if(_0x46820a[_0x1a5c('0x73')]===-0x1){return _0x46820a;}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0xa7'),_0x1a5c('0xa3')));};AGIVertices[_0x1a5c('0xc')]['finally']=function(_0x20a66e){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xb9'),_0x20a66e[_0x1a5c('0x34')]));return this['channel']['noop'](_0x1a5c('0xba'));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xa')]=function(_0x3e233f){logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0xbb'),_0x3e233f[_0x1a5c('0x34')]));if(_0x3e233f[_0x1a5c('0x78')]===0x0){return this[_0x1a5c('0x76')](_0x3e233f);}_0x3e233f[_0x1a5c('0x78')]-=0x1;if(!this[_0x1a5c('0x5e')](_0x3e233f[_0x1a5c('0xbc')])){return this['channel'][_0x1a5c('0x2e')](_0x3e233f,_0x1a5c('0xbd'));}var _0x44d97e=this['getSound'][_0x1a5c('0x77')](this,_0x3e233f[_0x1a5c('0xbc')]);if(!_0x44d97e){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x3e233f,_0x1a5c('0xbe'));}if(!this['isConfigured'](_0x3e233f[_0x1a5c('0x9a')])){return this['channel'][_0x1a5c('0x2e')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x26ca0b=this['channel']['getData'](_0x44d97e,_0x3e233f[_0x1a5c('0xbf')],_0x3e233f[_0x1a5c('0xc0')]);var _0x175a87=_0x26ca0b['result']?_0x26ca0b[_0x1a5c('0x73')][_0x1a5c('0x49')]():'';logger[_0x1a5c('0x2b')](_0x1a5c('0xc1'),JSON[_0x1a5c('0xc2')](_0x26ca0b));if(_0x26ca0b[_0x1a5c('0x73')]===-0x1){this[_0x1a5c('0x32')][_0x1a5c('0x77')](this,_0x3e233f,_0x175a87);return _0x26ca0b;}else if(_0x26ca0b[_0x1a5c('0x72')]===_0x1a5c('0x7d')){_0x26ca0b[_0x1a5c('0x73')]=_0x175a87[_0x1a5c('0x70')]>=parseInt(_0x3e233f[_0x1a5c('0xc3')])?'x':'i';}else{_0x26ca0b['result']=_0x175a87[_0x1a5c('0x70')]>=parseInt(_0x3e233f[_0x1a5c('0xc3')])&&_0x175a87[_0x1a5c('0x70')]<=parseInt(_0x3e233f[_0x1a5c('0xc0')])?'x':'i';}var _0x3204e6=this[_0x1a5c('0xd')][_0x1a5c('0x77')](this,_0x3e233f[_0x1a5c('0x9a')]);if(!_0x3204e6){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x3e233f,_0x1a5c('0x9c'));}this['channel']['setVariable'](_0x3204e6,_0x175a87);if(this['isConfigured'](_0x3e233f['hiddendigitsnum'])){var _0x51ce95=parseInt(_0x3e233f['hiddendigitsnum'],0xa);var _0x48b944=rs[_0x1a5c('0xc4')]({'charset':'*','length':_0x51ce95});var _0x45155d=_0x175a87[_0x1a5c('0x70')];if(_0x45155d>0x0){if(_0x45155d>_0x51ce95){this[_0x1a5c('0x32')][_0x1a5c('0x77')](this,_0x3e233f,_0x3e233f[_0x1a5c('0xc5')]===_0x1a5c('0xc6')?_0x48b944+_0x175a87[_0x1a5c('0xc7')](_0x51ce95):_0x175a87[_0x1a5c('0xc7')](0x0,_0x45155d-_0x51ce95)+_0x48b944);}else{this[_0x1a5c('0x32')]['sync'](this,_0x3e233f,rs['generate']({'charset':'*','length':_0x45155d}));}}else{this['createSquareDetailsReport'][_0x1a5c('0x77')](this,_0x3e233f,'');}}else{this[_0x1a5c('0x32')][_0x1a5c('0x77')](this,_0x3e233f,_0x175a87);}return _0x26ca0b;};AGIVertices[_0x1a5c('0xc')]['getsecretdigits']=function(_0x5cd2c2){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xc8'),_0x5cd2c2[_0x1a5c('0x34')]));return this[_0x1a5c('0xa')](_0x5cd2c2);};AGIVertices['prototype'][_0x1a5c('0xc9')]=function(_0x25044e){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xca'),_0x25044e[_0x1a5c('0x34')]));this['createSquareDetailsReport']['sync'](this,_0x25044e,_0x25044e[_0x1a5c('0xcb')]);return this['channel'][_0x1a5c('0x89')](util[_0x1a5c('0x26')]('GOAL\x20%s',_0x25044e[_0x1a5c('0xcb')]));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xcc')]=function(_0x13635e){logger['info'](util[_0x1a5c('0x26')](_0x1a5c('0xcd'),_0x13635e[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x13635e[_0x1a5c('0x60')])||!this[_0x1a5c('0x5e')](_0x13635e[_0x1a5c('0x61')])){return this[_0x1a5c('0x33')]['noop'](_0x1a5c('0xce'));}if(!this[_0x1a5c('0x5e')](_0x13635e['text'])){return this[_0x1a5c('0x33')]['noop']('no\x20text\x20configured');}this[_0x1a5c('0x33')]['noop'](util[_0x1a5c('0x26')]('Trying\x20aws\x20Polly\x20%s',_0x13635e[_0x1a5c('0x57')]));var _0x274bec=this[_0x1a5c('0xcf')][_0x1a5c('0x77')](this,_0x13635e);if(_0x274bec){this[_0x1a5c('0x33')][_0x1a5c('0x89')](util['format'](_0x1a5c('0xd0'),_0x274bec));var _0x40660e=this['channel'][_0x1a5c('0xd1')](_0x274bec,_0x13635e[_0x1a5c('0xd2')]);try{fs[_0x1a5c('0xd3')](_0x274bec+_0x1a5c('0xd4'));}catch(_0x541401){logger['error'](_0x541401);}return _0x40660e;}return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x13635e,_0x1a5c('0xd5'));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xd6')]=function(_0x1231af){logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0xd7'),_0x1231af[_0x1a5c('0x34')],_0x1231af['timeout']));if(!this[_0x1a5c('0x5e')](_0x1231af['key'])){return this['channel'][_0x1a5c('0x89')](_0x1a5c('0xa9'));}var _0x34f639=_0x1a5c('0xd8');var _0x30df1f=util[_0x1a5c('0x26')]('%s/recordings/%s',FILES_PATH,rs['generate'](0x4));var _0x5a6a97=util[_0x1a5c('0x26')](_0x1a5c('0xd9'),_0x30df1f,_0x34f639);var _0x4fb7b5=!![];if(_0x1231af[_0x1a5c('0xda')]==='NOBEEP'){_0x4fb7b5=![];}var _0x2eea09=this[_0x1a5c('0x33')][_0x1a5c('0xdb')](_0x30df1f,_0x34f639,_0x1231af['intKey'],_0x1231af[_0x1a5c('0x7d')],undefined,_0x4fb7b5);if(_0x2eea09['result']!==-0x1){this[_0x1a5c('0x33')]['noop'](util['format'](_0x1a5c('0xdc'),_0x5a6a97));var _0x199d03=this[_0x1a5c('0x65')][_0x1a5c('0x77')](this,_0x1231af,_0x5a6a97);if(_0x199d03){for(var _0x5e78d4 in _0x199d03){if(_0x199d03[_0x1a5c('0x6c')](_0x5e78d4)){this[_0x1a5c('0x33')][_0x1a5c('0x75')](util[_0x1a5c('0x26')]('GOOGLE_ASR_%s',_0x5e78d4['toUpperCase']()),_0x199d03[_0x5e78d4]);}}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util['format'](_0x1a5c('0xdd'),JSON['stringify'](_0x199d03)));}}return _0x2eea09;};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xde')]=function(_0x400dcb){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')]('Enter\x20in\x20TILDEASR\x20(%s)\x20block',_0x400dcb[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x400dcb[_0x1a5c('0x68')])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0xdf'));}if(!this[_0x1a5c('0x5e')](_0x400dcb[_0x1a5c('0x69')])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0xe0'));}var _0x5d3982=_0x1a5c('0xd8');var _0x28c7df=util[_0x1a5c('0x26')](_0x1a5c('0xe1'),FILES_PATH,rs['generate'](0x4));var _0x1f8fb7=util[_0x1a5c('0x26')](_0x1a5c('0xd9'),_0x28c7df,_0x5d3982);var _0x441e9b=!![];if(_0x400dcb[_0x1a5c('0xda')]===_0x1a5c('0xe2')){_0x441e9b=![];}var _0x43c6a6=this[_0x1a5c('0x33')][_0x1a5c('0xdb')](_0x28c7df,_0x5d3982,_0x400dcb[_0x1a5c('0xd2')],_0x400dcb[_0x1a5c('0x7d')],undefined,_0x441e9b);if(_0x43c6a6['result']!==-0x1){this['channel'][_0x1a5c('0x89')](util[_0x1a5c('0x26')]('tilde\x20%s\x20file\x20created',_0x1f8fb7));var _0x66e220=this[_0x1a5c('0x67')][_0x1a5c('0x77')](this,_0x400dcb,_0x1f8fb7);if(_0x66e220){for(var _0x5ad545 in _0x66e220){if(_0x66e220[_0x1a5c('0x6c')](_0x5ad545)){this['channel'][_0x1a5c('0x75')](util[_0x1a5c('0x26')](_0x1a5c('0xe3'),_0x5ad545['toUpperCase']()),_0x66e220[_0x5ad545]);}}return this['channel'][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0xe4'),JSON[_0x1a5c('0xc2')](_0x66e220)));}}return _0x43c6a6;};AGIVertices['prototype'][_0x1a5c('0xe5')]=function(_0x5c71e3){logger['info'](util['format'](_0x1a5c('0xe6'),_0x5c71e3[_0x1a5c('0x34')]));return this[_0x1a5c('0x33')][_0x1a5c('0xe7')](_0x5c71e3[_0x1a5c('0x3a')],_0x5c71e3['extension'],_0x5c71e3['priority']);};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xe8')]=function(_0x230aeb){logger['info'](util[_0x1a5c('0x26')]('Enter\x20in\x20GOTOIF\x20(%s)\x20block',_0x230aeb[_0x1a5c('0x34')]));if(!this['isConfigured'](_0x230aeb['condition'])){return this[_0x1a5c('0x33')]['error'](_0x230aeb,_0x1a5c('0xe9'));}try{var _0x205230=eval(_0x230aeb[_0x1a5c('0xea')])?_0x1a5c('0xeb'):'false';this[_0x1a5c('0x33')]['noop'](util['format'](_0x1a5c('0xec'),_0x230aeb[_0x1a5c('0xea')],_0x205230));return{'code':0xc8,'result':_0x205230};}catch(_0xc2dccc){return{'code':0xc8,'result':_0x1a5c('0xed')};}};AGIVertices['prototype']['gotoiftime']=function(_0x271cc4){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xee'),_0x271cc4[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x271cc4[_0x1a5c('0xef')])){return this['channel'][_0x1a5c('0x2e')](_0x271cc4,_0x1a5c('0xf0'));}var _0x50198b=this[_0x1a5c('0x22')][_0x1a5c('0x77')](this,_0x271cc4[_0x1a5c('0xef')]);if(!_0x50198b){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x271cc4,_0x1a5c('0xf1'));}for(var _0xacfe3e=0x0;_0xacfe3e<_0x50198b['length'];_0xacfe3e+=0x1){var _0x51c1bd=this[_0x1a5c('0x33')][_0x1a5c('0xd')](util[_0x1a5c('0x26')](_0x1a5c('0xf2'),_0x50198b[_0xacfe3e]));if(_0x51c1bd['result']===-0x1){return _0x51c1bd;}logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0xf3'),_0x50198b[_0xacfe3e],_0x51c1bd[_0x1a5c('0x72')]));if(_0x51c1bd[_0x1a5c('0x72')]===_0x1a5c('0xeb')){logger['info'](util[_0x1a5c('0x26')](_0x1a5c('0xf3'),_0x50198b[_0xacfe3e],_0x1a5c('0xeb')));this[_0x1a5c('0x33')][_0x1a5c('0x89')](util['format'](_0x1a5c('0xf3'),_0x50198b[_0xacfe3e],_0x1a5c('0xeb')));return{'code':0xc8,'result':_0x1a5c('0xeb')};}else{logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')]('IFTIME\x20%s\x20%s',_0x50198b[_0xacfe3e],'false'));this['channel'][_0x1a5c('0x89')](util['format'](_0x1a5c('0xf3'),_0x50198b[_0xacfe3e],'false'));}}return{'code':0xc8,'result':_0x1a5c('0xed')};};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xf4')]=function(_0x352ca0){logger['info'](util[_0x1a5c('0x26')]('Enter\x20in\x20HANGUP\x20(%s)\x20block',_0x352ca0[_0x1a5c('0x34')]));return this['channel'][_0x1a5c('0xf4')]();};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xf5')]=function(_0x3ae51c){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')]('Enter\x20in\x20ISPEECHASR\x20(%s)\x20block',_0x3ae51c[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x3ae51c['key'])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0xa9'));}var _0x13ab9a=_0x1a5c('0xd8');var _0x3aab37=util[_0x1a5c('0x26')]('%s/recordings/%s',FILES_PATH,rs['generate'](0x4));var _0x7a7494=util[_0x1a5c('0x26')](_0x1a5c('0xd9'),_0x3aab37,_0x13ab9a);var _0x3010f6=!![];if(_0x3ae51c[_0x1a5c('0xda')]===_0x1a5c('0xe2')){_0x3010f6=![];}var _0x550dda=this['channel'][_0x1a5c('0xdb')](_0x3aab37,_0x13ab9a,_0x3ae51c[_0x1a5c('0xd2')],_0x3ae51c[_0x1a5c('0x7d')],undefined,_0x3010f6);if(_0x550dda[_0x1a5c('0x73')]!==-0x1){this[_0x1a5c('0x33')]['noop'](util['format'](_0x1a5c('0xf6'),_0x7a7494));var _0x2e3707=this['ispeechASR'][_0x1a5c('0x77')](this,_0x3ae51c,_0x7a7494);if(_0x2e3707){for(var _0x44f4cc in _0x2e3707){if(_0x2e3707['hasOwnProperty'](_0x44f4cc)){this['channel']['setVariable'](util[_0x1a5c('0x26')](_0x1a5c('0xf7'),_0x44f4cc['toUpperCase']()),_0x2e3707[_0x44f4cc]);}}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')]('IspeechASR\x20Result\x20%s',JSON[_0x1a5c('0xc2')](_0x2e3707)));}}return _0x550dda;};AGIVertices['prototype'][_0x1a5c('0xf8')]=function(_0x5da8e2){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')]('Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block',_0x5da8e2['label']));if(!this[_0x1a5c('0x5e')](_0x5da8e2[_0x1a5c('0x5a')])){return this[_0x1a5c('0x33')]['noop'](_0x1a5c('0xa9'));}if(!this[_0x1a5c('0x5e')](_0x5da8e2['text'])){return this[_0x1a5c('0x33')]['noop'](_0x1a5c('0x8a'));}this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')]('Trying\x20ispeech\x20TTS\x20%s',_0x5da8e2[_0x1a5c('0x57')]));var _0x2e031c=this[_0x1a5c('0xf9')][_0x1a5c('0x77')](this,_0x5da8e2);if(_0x2e031c){this[_0x1a5c('0x33')][_0x1a5c('0x89')](util['format'](_0x1a5c('0xf6'),_0x2e031c));var _0x938688=this['channel'][_0x1a5c('0xd1')](_0x2e031c,_0x5da8e2['intKey']);try{fs[_0x1a5c('0xd3')](_0x2e031c+'.wav');}catch(_0x4c5f53){logger[_0x1a5c('0x2e')](_0x4c5f53);}return _0x938688;}return this[_0x1a5c('0x33')]['error'](_0x5da8e2,_0x1a5c('0xfa'));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0xfb')]=function(_0x16a464){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xfc'),_0x16a464[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x16a464['findBy'])){return this['channel'][_0x1a5c('0x2e')](_0x16a464,'no\x20find\x20by\x20configured');}logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xfd'),this[_0x1a5c('0x33')]['callerid'],_0x16a464[_0x1a5c('0xfe')]));var _0x41bc7f=this[_0x1a5c('0x52')][_0x1a5c('0x77')](this,_0x16a464[_0x1a5c('0xfe')]);if(_0x41bc7f){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xff'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x16a464[_0x1a5c('0xfe')]));this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0xff'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x16a464[_0x1a5c('0xfe')]));return{'code':0xc8,'result':_0x1a5c('0x100')};}else{logger[_0x1a5c('0x2b')](util['format']('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x16a464[_0x1a5c('0xfe')]));this['channel'][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0x101'),this['channel']['callerid'],_0x16a464[_0x1a5c('0xfe')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x102')]=function(_0x297c9e){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x103'),_0x297c9e[_0x1a5c('0x34')]));if(!this['isConfigured'](_0x297c9e['findBy'])){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x297c9e,_0x1a5c('0x104'));}logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0xfd'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x297c9e[_0x1a5c('0xfe')]));var _0x44ab92=this[_0x1a5c('0x50')][_0x1a5c('0x77')](this,_0x297c9e[_0x1a5c('0xfe')]);if(_0x44ab92){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xff'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x297c9e[_0x1a5c('0xfe')]));this[_0x1a5c('0x33')]['noop'](util[_0x1a5c('0x26')](_0x1a5c('0xff'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x297c9e['findBy']));return{'code':0xc8,'result':'success'};}else{logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x101'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x297c9e[_0x1a5c('0xfe')]));this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0x1a5c('0x4e')],_0x297c9e[_0x1a5c('0xfe')]));return{'code':0xc8,'result':_0x1a5c('0x105')};}};AGIVertices['prototype'][_0x1a5c('0x106')]=function(_0x451967){logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0x107'),_0x451967['label']));if(!this[_0x1a5c('0x5e')](_0x451967[_0x1a5c('0x108')])){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x451967,_0x1a5c('0x109'));}this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0x10a'),_0x451967['operation']));var _0x2725f5=eval(_0x451967[_0x1a5c('0x108')]);if(!this['isConfigured'](_0x451967[_0x1a5c('0x9a')])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0x9b'));}var _0x1e2952=this[_0x1a5c('0xd')][_0x1a5c('0x77')](this,_0x451967['variable_id']);if(!_0x1e2952){return this[_0x1a5c('0x33')]['error'](_0x451967,'no\x20variable\x20found');}if(_[_0x1a5c('0x10b')](_0x2725f5)){var _0x2afa0a=this;_0x2725f5['forEach'](function(_0x298a8c,_0xa787ea){_0x2afa0a['channel'][_0x1a5c('0x75')](util['format'](_0x1a5c('0x10c'),_0x1e2952,_0xa787ea),_0x298a8c);});return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0x10d'),_0x1e2952));}else{return this[_0x1a5c('0x33')]['setVariable'](_0x1e2952,_0x2725f5);}};AGIVertices[_0x1a5c('0xc')]['menu']=function(_0x33f488){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x10e'),_0x33f488[_0x1a5c('0x34')]));if(_0x33f488[_0x1a5c('0x78')]===0x0){return this[_0x1a5c('0x76')](_0x33f488);}_0x33f488[_0x1a5c('0x78')]-=0x1;if(!this[_0x1a5c('0x5e')](_0x33f488[_0x1a5c('0xbc')])){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x33f488,_0x1a5c('0xbd'));}var _0x41123f=this['getSound']['sync'](this,_0x33f488['file_id']);if(!_0x41123f){return this['channel'][_0x1a5c('0x2e')](_0x33f488,_0x1a5c('0xbe'));}var _0x26cde4=this[_0x1a5c('0x33')][_0x1a5c('0x10f')](_0x41123f,_0x33f488[_0x1a5c('0xbf')],_0x33f488[_0x1a5c('0x110')]);var _0x2debf3=_0x26cde4['result'];if(_0x26cde4[_0x1a5c('0x73')]===-0x1){this[_0x1a5c('0x32')]['sync'](this,_0x33f488,'-1');return _0x26cde4;}else if(_0x26cde4[_0x1a5c('0x72')]===_0x1a5c('0x7d')){_0x26cde4[_0x1a5c('0x73')]=_0x26cde4[_0x1a5c('0x73')][_0x1a5c('0x70')]>0x0?_0x26cde4[_0x1a5c('0x73')]:'t';}else if(_['isEmpty'](_0x26cde4[_0x1a5c('0x73')])){_0x26cde4[_0x1a5c('0x73')]='#';_0x2debf3='#';}if(!this[_0x1a5c('0x5e')](_0x33f488[_0x1a5c('0x9a')])){this[_0x1a5c('0x33')]['noop'](_0x1a5c('0x9b'));}else{var _0x5aa4eb=this['getVariable']['sync'](this,_0x33f488[_0x1a5c('0x9a')]);if(!_0x5aa4eb){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x33f488,'no\x20variable\x20found');}this['channel'][_0x1a5c('0x75')](_0x5aa4eb,_0x2debf3);}this[_0x1a5c('0x32')]['sync'](this,_0x33f488,_0x2debf3);return _0x26cde4;};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x89')]=function(_0x9e00b4){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')]('Enter\x20in\x20NOOP\x20(%s)\x20block',_0x9e00b4['label']));return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x9e00b4[_0x1a5c('0x111')]||_0x9e00b4['label']);};AGIVertices['prototype'][_0x1a5c('0x112')]=function(_0x36dbd8){logger['info'](util[_0x1a5c('0x26')](_0x1a5c('0x113'),_0x36dbd8['label']));if(!this[_0x1a5c('0x5e')](_0x36dbd8[_0x1a5c('0xfe')])){return this[_0x1a5c('0x33')]['error'](_0x36dbd8,_0x1a5c('0x104'));}logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xfd'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x36dbd8[_0x1a5c('0xfe')]));var _0x21fb1b=this[_0x1a5c('0x4b')]['sync'](this,_0x36dbd8[_0x1a5c('0x114')]);var _0x22a987=this[_0x1a5c('0x4c')][_0x1a5c('0x77')](this,_0x36dbd8[_0x1a5c('0xfe')],_0x21fb1b);if(_0x22a987){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xff'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x36dbd8[_0x1a5c('0xfe')]));this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0xff'),this['channel'][_0x1a5c('0x4e')],_0x36dbd8[_0x1a5c('0xfe')]));return{'code':0xc8,'result':'success'};}else{logger['info'](util['format']('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x36dbd8[_0x1a5c('0xfe')]));this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0xff'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0x36dbd8['findBy']));return{'code':0xc8,'result':_0x1a5c('0x105')};}};AGIVertices['prototype'][_0x1a5c('0x115')]=function(_0x319548){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x116'),_0x319548[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x319548[_0x1a5c('0xbc')])){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x319548,_0x1a5c('0xbd'));}var _0x375d11=this['getSound'][_0x1a5c('0x77')](this,_0x319548[_0x1a5c('0xbc')]);if(!_0x375d11){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x319548,_0x1a5c('0xbe'));}var _0x511383=this[_0x1a5c('0x33')][_0x1a5c('0x54')]('PLAYBACK',[_0x375d11,_0x319548[_0x1a5c('0xa5')]]);if(_0x511383[_0x1a5c('0x73')]===-0x1){return _0x511383;}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')]('Executed\x20command\x20%s\x20%s',_0x1a5c('0x117'),_0x375d11));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x118')]=function(_0x2fb3e7){logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0x119'),_0x2fb3e7['label']));if(!this[_0x1a5c('0x5e')](_0x2fb3e7[_0x1a5c('0x11a')])){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x2fb3e7,'no\x20queue\x20selected');}var _0x48b3e4='';var _0x12af47=parseInt(_0x2fb3e7['queue_id'],0xa);if(isNaN(_0x12af47)){_0x48b3e4=_0x2fb3e7['queue_id'];}else{_0x48b3e4=this[_0x1a5c('0x11')][_0x1a5c('0x77')](this,_0x2fb3e7['queue_id']);if(!_0x48b3e4){return this['channel'][_0x1a5c('0x2e')](_0x2fb3e7,_0x1a5c('0x11b'));}}var _0x1f6b83='';if(this[_0x1a5c('0x5e')](_0x2fb3e7[_0x1a5c('0xbc')])){var _0x53b09b=this[_0x1a5c('0x1a')][_0x1a5c('0x77')](this,_0x2fb3e7[_0x1a5c('0xbc')]);if(_0x53b09b){_0x1f6b83=_0x53b09b;}}this[_0x1a5c('0x32')][_0x1a5c('0x77')](this,_0x2fb3e7,_0x48b3e4);if(_0x2fb3e7[_0x1a5c('0xa5')][_0x1a5c('0x11c')]('x')<0x0){_0x2fb3e7['opts']+='x';}if(_0x2fb3e7[_0x1a5c('0xa5')][_0x1a5c('0x11c')]('X')<0x0){_0x2fb3e7[_0x1a5c('0xa5')]+='X';}this['channel']['setVariable']('XMCS-QUEUE',_0x48b3e4?_0x48b3e4[_0x1a5c('0x11d')]():'');var _0x3d6500=this[_0x1a5c('0x33')]['exec'](_0x1a5c('0x11e'),[_0x48b3e4,_0x2fb3e7[_0x1a5c('0xa5')],_0x2fb3e7[_0x1a5c('0xa6')],_0x1f6b83,_0x2fb3e7[_0x1a5c('0x7d')],_0x2fb3e7[_0x1a5c('0x6')],_0x2fb3e7[_0x1a5c('0x11f')],_0x2fb3e7[_0x1a5c('0x120')],'',_0x2fb3e7[_0x1a5c('0x121')]]);if(_0x3d6500[_0x1a5c('0x73')]===-0x1){return _0x3d6500;}return this['channel'][_0x1a5c('0x89')](util['format']('Executed\x20command\x20%s\x20%s',_0x1a5c('0x11e'),_0x48b3e4));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x122')]=function(_0x19f035){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x123'),_0x19f035[_0x1a5c('0x34')]));var _0x39a83e=_0x19f035['recordingFormat']||_0x1a5c('0xd8');var _0x36cb98=util['format'](_0x1a5c('0x124'),this['channel']['uniqueid'],rs[_0x1a5c('0xc4')](0x5));var _0x603a85=util[_0x1a5c('0x26')]('%s/recordings/%s.%s',FILES_PATH,_0x36cb98,_0x39a83e);var _0x4e4282=util[_0x1a5c('0x26')](_0x1a5c('0xe1'),FILES_PATH,_0x36cb98);this[_0x1a5c('0x37')][_0x1a5c('0x77')](this,_0x19f035,_0x36cb98,_0x603a85);this[_0x1a5c('0x33')][_0x1a5c('0x75')](_0x1a5c('0x125'),_0x36cb98);logger['info'](_0x1a5c('0x126'),_0x4e4282,_0x39a83e,_0x19f035[_0x1a5c('0x127')],_0x19f035['timeout']);return this[_0x1a5c('0x33')][_0x1a5c('0xdb')](_0x4e4282,_0x39a83e,_0x19f035['escape_digits'],_0x19f035[_0x1a5c('0x7d')],undefined,!![]);};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x128')]=function(_0x1974e2){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x129'),_0x1974e2[_0x1a5c('0x34')]));return this['channel'][_0x1a5c('0x12a')](_0x1974e2[_0x1a5c('0x12b')]['replace'](/\s+/g,''),_0x1974e2[_0x1a5c('0x127')]);};AGIVertices['prototype'][_0x1a5c('0x12c')]=function(_0x3c850b){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x12d'),_0x3c850b['label']));return this[_0x1a5c('0x33')][_0x1a5c('0x12e')](_0x3c850b[_0x1a5c('0x12f')]['replace'](/\s+/g,''),_0x3c850b[_0x1a5c('0x127')]);};AGIVertices[_0x1a5c('0xc')]['sayphonetic']=function(_0x13e35f){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')]('Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block',_0x13e35f[_0x1a5c('0x34')]));return this[_0x1a5c('0x33')][_0x1a5c('0x130')](_0x13e35f[_0x1a5c('0x57')],_0x13e35f[_0x1a5c('0x127')]);};AGIVertices['prototype']['sendMail']=function(_0x830250){logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0x131'),_0x830250[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x830250[_0x1a5c('0x132')])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0x133'));}var _0x421626=this[_0x1a5c('0x1e')][_0x1a5c('0x77')](this,_0x830250[_0x1a5c('0x132')]);if(!_0x421626||!_0x421626[_0x1a5c('0x134')]){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x830250,_0x1a5c('0x135'));}var _0x2b9af9={'from':util[_0x1a5c('0x26')]('\x22%s\x22\x20<%s>',_0x421626[_0x1a5c('0xf')],_0x421626['email']||_0x421626[_0x1a5c('0x134')][_0x1a5c('0x136')]),'to':_0x830250['to']||'','cc':_0x830250['cc']||'','bcc':_0x830250[_0x1a5c('0x137')]||'','subject':_0x830250[_0x1a5c('0x138')],'html':_0x830250[_0x1a5c('0x57')],'text':_0x830250[_0x1a5c('0x57')]};var _0x53f8a2={'tls':{'rejectUnauthorized':![]}};if(_0x421626[_0x1a5c('0x134')][_0x1a5c('0x139')]){_0x53f8a2[_0x1a5c('0x139')]=_0x421626['Smtp'][_0x1a5c('0x139')];}else{_0x53f8a2[_0x1a5c('0x13a')]=_0x421626[_0x1a5c('0x134')][_0x1a5c('0x13a')];_0x53f8a2[_0x1a5c('0x13b')]=_0x421626[_0x1a5c('0x134')]['port'];_0x53f8a2[_0x1a5c('0x13c')]=_0x421626[_0x1a5c('0x134')][_0x1a5c('0x13c')];}if(_0x421626[_0x1a5c('0x134')][_0x1a5c('0x13d')]){_0x53f8a2[_0x1a5c('0x13e')]={'user':_0x421626[_0x1a5c('0x134')][_0x1a5c('0x136')],'pass':_0x421626[_0x1a5c('0x134')][_0x1a5c('0x13f')]};}if(this['isConfigured'](_0x830250['template_id'])){}logger[_0x1a5c('0x140')](_0x1a5c('0x141'),JSON[_0x1a5c('0xc2')](_0x2b9af9));this['createSquareDetailsReport'][_0x1a5c('0x77')](this,_0x830250,_0x830250[_0x1a5c('0x132')]);this['channel'][_0x1a5c('0x89')](util[_0x1a5c('0x26')]('Trying\x20SendMail\x20with\x20account\x20%s',_0x421626[_0x1a5c('0xf')]));this[_0x1a5c('0x20')]['sync'](this,_0x53f8a2,_0x2b9af9);return this[_0x1a5c('0x33')]['noop'](_0x1a5c('0x142'));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x143')]=function(_0xfbc54e){logger['info'](util[_0x1a5c('0x26')](_0x1a5c('0x144'),_0xfbc54e[_0x1a5c('0x34')]));return this[_0x1a5c('0x33')]['noop'](_0x1a5c('0x145'));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x146')]=function(_0x5295e1){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x147'),_0x5295e1[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x5295e1[_0x1a5c('0x148')])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')]('no\x20sms\x20account\x20configured');}var _0x148c7e=this['getSmsAccount'][_0x1a5c('0x77')](this,_0x5295e1[_0x1a5c('0x148')]);if(!_0x148c7e){return this['channel']['error'](_0x5295e1,_0x1a5c('0x149'));}var _0x4c36c0={'body':_0x5295e1[_0x1a5c('0x14a')],'phone':_0x5295e1['to']||'','SmsAccountId':_0x148c7e['id']};logger[_0x1a5c('0x140')](_0x1a5c('0x14b'),JSON[_0x1a5c('0xc2')](_0x4c36c0));this[_0x1a5c('0x32')][_0x1a5c('0x77')](this,_0x5295e1,_0x5295e1[_0x1a5c('0x148')]);this[_0x1a5c('0x33')][_0x1a5c('0x89')](util['format'](_0x1a5c('0x14c'),_0x148c7e['name']));this['createSmsMessage'][_0x1a5c('0x77')](this,_0x4c36c0);return this[_0x1a5c('0x33')]['noop'](_0x1a5c('0x14d'));};AGIVertices['prototype'][_0x1a5c('0x14e')]=function(_0x3693e9){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x14f'),_0x3693e9[_0x1a5c('0x34')]));if(!this[_0x1a5c('0x5e')](_0x3693e9[_0x1a5c('0x9a')])){return this['channel'][_0x1a5c('0x2e')](_0x3693e9,_0x1a5c('0x150'));}var _0x5df479=this[_0x1a5c('0xd')]['sync'](this,_0x3693e9['variable_id']);if(!_0x5df479){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x3693e9,_0x1a5c('0x9c'));}return this[_0x1a5c('0x33')]['setVariable'](_0x5df479,_0x3693e9[_0x1a5c('0x151')]);};AGIVertices[_0x1a5c('0xc')]['start']=function(_0x1a344b){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')]('Enter\x20in\x20START\x20(%s)\x20block',_0x1a344b['label']));this[_0x1a5c('0x33')][_0x1a5c('0x89')]('START\x20CALLY\x20SQUARE');if(_0x1a344b[_0x1a5c('0x7b')]===_0x1a5c('0x152')){this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0x153'));return this[_0x1a5c('0x33')][_0x1a5c('0x7b')]();}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](_0x1a5c('0x154'));};AGIVertices[_0x1a5c('0xc')]['subproject']=function(_0x6d67c5){logger[_0x1a5c('0x2b')](util['format'](_0x1a5c('0x155'),_0x6d67c5[_0x1a5c('0x34')]));if(!this['isConfigured'](_0x6d67c5[_0x1a5c('0x156')])){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x6d67c5,_0x1a5c('0x157'));}var _0x2c595a=this['getSquareProject'][_0x1a5c('0x77')](this,_0x6d67c5['project_id']);if(!this[_0x1a5c('0x5e')](_0x2c595a)){return this[_0x1a5c('0x33')]['error'](_0x6d67c5,util[_0x1a5c('0x26')](_0x1a5c('0x158'),_0x6d67c5[_0x1a5c('0x156')]));}if(_0x2c595a===this[_0x1a5c('0x33')][_0x1a5c('0x36')]){return this[_0x1a5c('0x33')]['error'](_0x6d67c5,_0x1a5c('0x159'));}this['createSquareDetailsReport'][_0x1a5c('0x77')](this,_0x6d67c5,_0x2c595a);var _0x1f97d4=this[_0x1a5c('0x33')][_0x1a5c('0x54')]('AGI',util[_0x1a5c('0x26')](_0x1a5c('0x15a'),config[_0x1a5c('0x6')][_0x1a5c('0x13a')]||'127.0.0.1',_0x2c595a,this[_0x1a5c('0x33')][_0x1a5c('0x36')]));if(_0x1f97d4[_0x1a5c('0x73')]===-0x1){return _0x1f97d4;}return this['channel'][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0x87'),_0x1a5c('0x15b'),_0x2c595a));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x15c')]=function(_0x16077d){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x15d'),_0x16077d[_0x1a5c('0x34')]));var _0x46d40c=this['shellCommand'][_0x1a5c('0x77')](this,_0x16077d[_0x1a5c('0x79')]);this[_0x1a5c('0x32')][_0x1a5c('0x77')](this,_0x16077d,_0x16077d[_0x1a5c('0x79')]);if(this[_0x1a5c('0x5e')](_0x16077d[_0x1a5c('0x9a')])){var _0x25b6e4=this[_0x1a5c('0xd')][_0x1a5c('0x77')](this,_0x16077d[_0x1a5c('0x9a')]);if(_0x25b6e4){this[_0x1a5c('0x33')][_0x1a5c('0x75')](_0x25b6e4,_0x46d40c);return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')]('sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s',_0x16077d[_0x1a5c('0x79')],_0x25b6e4));}}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util['format'](_0x1a5c('0x15e'),_0x16077d['command']));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x15f')]=function(_0xdef4b3){logger['info'](util[_0x1a5c('0x26')](_0x1a5c('0x160'),_0xdef4b3['label']));if(!this[_0x1a5c('0x5e')](_0xdef4b3[_0x1a5c('0x57')])){return this[_0x1a5c('0x33')][_0x1a5c('0x89')]('no\x20text\x20configured');}this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0x161'),_0xdef4b3[_0x1a5c('0x57')]));var _0x20c446=this[_0x1a5c('0x56')][_0x1a5c('0x77')](this,_0xdef4b3);if(_0x20c446){this['channel'][_0x1a5c('0x89')](util['format'](_0x1a5c('0x162'),_0x20c446));var _0x3bce77=this[_0x1a5c('0x33')][_0x1a5c('0xd1')](_0x20c446);try{fs[_0x1a5c('0xd3')](_0x20c446+_0x1a5c('0xd4'));}catch(_0x144051){logger[_0x1a5c('0x2e')](_0x144051);}return _0x3bce77;}return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0xdef4b3,_0x1a5c('0xaf'));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x163')]=function(_0xaf08b8){logger['info'](util['format'](_0x1a5c('0x164'),_0xaf08b8[_0x1a5c('0x34')]));if(!this['isConfigured'](_0xaf08b8['findBy'])){return this[_0x1a5c('0x33')]['error'](_0xaf08b8,_0x1a5c('0x104'));}logger['info'](util[_0x1a5c('0x26')](_0x1a5c('0xfd'),this['channel']['callerid'],_0xaf08b8[_0x1a5c('0xfe')]));var _0x1f4ba3=this['agentUnpause']['sync'](this,_0xaf08b8[_0x1a5c('0xfe')]);if(_0x1f4ba3){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0xff'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0xaf08b8[_0x1a5c('0xfe')]));this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0xff'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0xaf08b8[_0x1a5c('0xfe')]));return{'code':0xc8,'result':_0x1a5c('0x100')};}else{logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x101'),this['channel'][_0x1a5c('0x4e')],_0xaf08b8[_0x1a5c('0xfe')]));this[_0x1a5c('0x33')][_0x1a5c('0x89')](util[_0x1a5c('0x26')](_0x1a5c('0x101'),this[_0x1a5c('0x33')][_0x1a5c('0x4e')],_0xaf08b8['findBy']));return{'code':0xc8,'result':_0x1a5c('0x105')};}};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x165')]=function(_0x2ef5f4){logger[_0x1a5c('0x2b')](util[_0x1a5c('0x26')](_0x1a5c('0x166'),_0x2ef5f4[_0x1a5c('0x34')]));var _0x998974=this[_0x1a5c('0x33')][_0x1a5c('0x54')]('VOICEMAIL',[_0x2ef5f4[_0x1a5c('0x167')],_0x2ef5f4['options']]);if(_0x998974[_0x1a5c('0x73')]===-0x1){return _0x998974;}return this[_0x1a5c('0x33')][_0x1a5c('0x89')](util['format']('Executed\x20command\x20%s\x20%s','VOICEMAIL',_0x2ef5f4['mailbox']));};AGIVertices[_0x1a5c('0xc')][_0x1a5c('0x168')]=function(_0x1c8091){logger['info'](util[_0x1a5c('0x26')](_0x1a5c('0x169'),_0x1c8091['label']));if(!this['isConfigured'](_0x1c8091['variable_id'])){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x1c8091,_0x1a5c('0x150'));}var _0x1abf61=this[_0x1a5c('0xd')][_0x1a5c('0x77')](this,_0x1c8091['variable_id']);if(!_0x1abf61){return this[_0x1a5c('0x33')][_0x1a5c('0x2e')](_0x1c8091,_0x1a5c('0x9c'));}var _0x3867fe=this['channel'][_0x1a5c('0xd')](_0x1abf61);return{'code':0xc8,'result':_0x3867fe[_0x1a5c('0x72')]?_0x3867fe[_0x1a5c('0x72')]:'-'};};String['prototype']['replaceAll']=function(_0x48a9e7,_0x523da3){return this[_0x1a5c('0x6f')](_0x48a9e7)[_0x1a5c('0x16a')](_0x523da3);};module[_0x1a5c('0x16b')]=AGIVertices;