79e53b4c1512df7563660153db8cda2b74395557
[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 _0x9466=['Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20no\x20stored','google_cloud_tts','Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block','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\x20%s\x20file\x20created','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','voicemail','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','mailbox','VOICEMAIL','Enter\x20in\x20SWITCH\x20(%s)\x20block','replaceAll','join','exports','util','lodash','shelljs','odbc','randomstring','moment','mustache','request-promise','../../config/logger','agi','../../config/environment','/var/opt/motion2/server/files','rawBody','getdigits','mailRpc','getVariable','name','catch','prototype','getVoiceQueue','getVoiceQueueById','then','getSquareProject','rpc','getSquareProjectById','getSquareOdbc','getSquareOdbcById','getUser','getUserById','getTrunk','getTrunkById','getSound','getSoundById','getSoundPath','getMailAccountById','sendMailMessage','getIntervals','getIntervalById','IntervalId','interval','format','%s/sounds/converted/%s','getQueryOdbc','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','Query\x20executed\x20correctly\x20%s','close','getSmsAccountById','createSmsMessage','createSquareDetailsReport','channel','uniqueid','label','arg_1','createSquareRecording','callerid','calleridname','context','extension','dnid','file','createSquareMessage','createCmContact','isEmpty','isNil','callback_','random','lastName','phone','list_id','scheduledAt','callback','toString','callback_priority','getPause','getPauseById','agent','agentUnpause','agentLogout','internal','%s/%s@from-sip/n','LOCAL','agentLogin','shellCommand','exec','replace','googleCloudTTS','apiKey','google_cloud_tts_text_type','text','languageCode','en-US','ssmlGender','MALE','audioEncoding','MP3','googleTTS','number','timeout','includes','PUT','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','rawHeaders','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','sync','uri','render','url','headers','stringify','body','statusCode','statusMessage','message','500\x20-\x20Internal\x20Server\x20Error','googleDialogflow','key','dialogflow_language','sestekNDA','ispeechTTS','ispeech_tts_language','speed','ispeechASR','ispeech_asr_language','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region','aws_polly_voice','awsLex','googleASR','google_asr_language','appsecret','clear','agicommand','isString','replaceObjectAllVariables','replaceAllVariables','recursiveNodeIndex','hasOwnProperty','isPlainObject','length','saveRestApiResult','%s.%s','isArray','setVariable','split','extra','maxRetry','retry','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','wait','result','answer','Enter\x20in\x20CALLBACK\x20(%s)\x20block','no\x20list\x20selected','add','minutes','noop','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','application','options','lumenvoxtts','no\x20text\x20configured','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','MRCPSynth','lumenvoxasr','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','grammar','getAndSetVariable','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','RECOG_INSTANCE()','LUMENVOX_ASR_INSTANCE','sestekasr','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','no\x20grammar\x20configured','MRCPRecog','RECOG_CONFIDENCE()','SESTEK_ASR_CONFIDENCE','RECOG_INPUT()','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','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','forEach','keys','%s[%s][%s]','variable\x20%s\x20set','dial','debug','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','no\x20user\x20found','DIAL','Executed\x20command\x20%s','no\x20key\x20configured','bot','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','toUpperCase','speech','out','Dialogflow\x20Result\x20%s','Dialogflow\x20is\x20unreachable','sesteknda','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','no\x20ndauth\x20url\x20configured','no\x20username\x20configured','ndassistant_url','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','audiofile','Sestek\x20NDA\x20%s\x20file\x20created','streamFile','unlink','SestekNDA\x20Result\x20%s','Enter\x20in\x20END\x20(%s)\x20block','end','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20found','trunk_name','no\x20trunk\x20selected','SIP/%s/%s','opts','finally','Enter\x20in\x20FINALLY\x20(%s)\x20block','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','file_id','no\x20file\x20audio\x20selected','getData','maxdigit','test','mindigit','hiddendigitsnum','generate','first','substr','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','.wav','awslex','aws_bot_name','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','Amazon\x20Lex\x20ready\x20for\x20fulfillment','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','wav','beep','NOBEEP','intKey','google\x20%s\x20file\x20created','GoogleASR\x20Result\x20%s','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','no\x20appsecret\x20configured','%s/recordings/%s','recordFile','tildeASR','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','continueAt','priority','gotoif','condition','no\x20condition\x20configured','false','EVAL\x20CONDITION\x20%s\x20%s','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20intervals\x20found','IFTIME(%s?true:false)','true','IFTIME\x20%s\x20%s','hangup','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','ispeech\x20TTS\x20is\x20unreachable','login','findBy','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20FOUND\x20BY','AGENT\x20%s\x20NOT\x20FOUND\x20BY','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','failure','math','operation','no\x20operation\x20configured','variable\x20%s[key]\x20set','menu','Enter\x20in\x20MENU\x20(%s)\x20block','response','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','no\x20find\x20by\x20configured','agentPause','success','playback','PLAYBACK','Executed\x20command\x20%s\x20%s','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20found','indexOf','XMCS-QUEUE','toLowerCase','macro','gosub','position','QUEUE','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','%s/recordings/%s.%s','RECORDING_SAVENAME','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','inspect','no\x20variable\x20selected\x20for\x20the\x20response','%s_STATUS_CODE','200','%s_STATUS_MESSAGE','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','digits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','sayphonetic','sayPhonetic','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','getMailAccount','Smtp','no\x20mail\x20account\x20found','email','bcc','service','host','port','secure','authentication','auth','pass','sendMail\x20message','Trying\x20SendMail\x20with\x20account\x20%s','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\x20configured','getSmsAccount','sendSMS\x20message','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','yes','Answer','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','no\x20subproject\x20selected','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','agi://%s/square,\x22%s\x22,\x22%s\x22','system'];(function(_0x10bbc6,_0x2e6d34){var _0x481e8a=function(_0x532084){while(--_0x532084){_0x10bbc6['push'](_0x10bbc6['shift']());}};_0x481e8a(++_0x2e6d34);}(_0x9466,0x1cb));var _0x6946=function(_0x35885a,_0x42fed7){_0x35885a=_0x35885a-0x0;var _0xe86249=_0x9466[_0x35885a];return _0xe86249;};'use strict';var fs=require('fs');var path=require('path');var util=require(_0x6946('0x0'));var _=require(_0x6946('0x1'));var sh=require(_0x6946('0x2'));var odbc=require(_0x6946('0x3'))();var rs=require(_0x6946('0x4'));var moment=require(_0x6946('0x5'));var Mustache=require(_0x6946('0x6'));var rp=require(_0x6946('0x7'));var logger=require(_0x6946('0x8'))(_0x6946('0x9'));var config=require(_0x6946('0xa'));var scripts=require('./scripts');var FILES_PATH=_0x6946('0xb');var recursiveMapAttributes=['rawHeaders',_0x6946('0xc')];var verticesWithRetry=['menu',_0x6946('0xd'),'getsecretdigits'];var AGIVertices=function(_0x301b38,_0x2b4eb3,_0x33dc99){this['channel']=_0x301b38;this['rpc']=_0x2b4eb3;this[_0x6946('0xe')]=_0x33dc99;};AGIVertices['prototype'][_0x6946('0xf')]=function(_0x249920,_0x440b7a){this['rpc']['getVariableById'](_0x249920)['then'](function(_0xf6fc3d){_0x440b7a(null,_0xf6fc3d?_0xf6fc3d[_0x6946('0x10')]:![]);})[_0x6946('0x11')](function(_0x164c74){_0x440b7a(_0x164c74);});};AGIVertices[_0x6946('0x12')][_0x6946('0x13')]=function(_0x3a395a,_0x6677f8){this['rpc'][_0x6946('0x14')](_0x3a395a)[_0x6946('0x15')](function(_0x197218){_0x6677f8(null,_0x197218?_0x197218[_0x6946('0x10')]:![]);})[_0x6946('0x11')](function(_0x2fb002){_0x6677f8(_0x2fb002);});};AGIVertices[_0x6946('0x12')][_0x6946('0x16')]=function(_0x124fda,_0x2ce8a7){this[_0x6946('0x17')][_0x6946('0x18')](_0x124fda)[_0x6946('0x15')](function(_0x23eefa){_0x2ce8a7(null,_0x23eefa?_0x23eefa['name']:![]);})['catch'](function(_0x289f57){_0x2ce8a7(_0x289f57);});};AGIVertices['prototype'][_0x6946('0x19')]=function(_0x4a1a0,_0x52a34f){this[_0x6946('0x17')][_0x6946('0x1a')](_0x4a1a0)['then'](function(_0x1c9d7c){_0x52a34f(null,_0x1c9d7c?_0x1c9d7c['dsn']:![]);})[_0x6946('0x11')](function(_0x14daa0){_0x52a34f(_0x14daa0);});};AGIVertices['prototype'][_0x6946('0x1b')]=function(_0x47528c,_0x3c8789){this['rpc'][_0x6946('0x1c')](_0x47528c)['then'](function(_0x3f2ca9){_0x3c8789(null,_0x3f2ca9?_0x3f2ca9[_0x6946('0x10')]:![]);})[_0x6946('0x11')](function(_0x345f37){_0x3c8789(_0x345f37);});};AGIVertices['prototype'][_0x6946('0x1d')]=function(_0x12d61a,_0x1ca606){this['rpc'][_0x6946('0x1e')](_0x12d61a)['then'](function(_0x1dfe91){_0x1ca606(null,_0x1dfe91?_0x1dfe91[_0x6946('0x10')]:![]);})[_0x6946('0x11')](function(_0x2db511){_0x1ca606(_0x2db511);});};AGIVertices[_0x6946('0x12')][_0x6946('0x1f')]=function(_0x2a6692,_0x36e7ff){var _0x1db3ce=this;this['rpc'][_0x6946('0x20')](_0x2a6692)[_0x6946('0x15')](function(_0x5d4619){_0x36e7ff(null,_0x5d4619?_0x1db3ce[_0x6946('0x21')](_0x5d4619['save_name']):![]);})[_0x6946('0x11')](function(_0x35bdf0){_0x36e7ff(_0x35bdf0);});};AGIVertices[_0x6946('0x12')]['getMailAccount']=function(_0x324581,_0x38b3ae){this[_0x6946('0x17')][_0x6946('0x22')](_0x324581)[_0x6946('0x15')](function(_0x36a25d){_0x38b3ae(null,_0x36a25d?_0x36a25d:![]);})[_0x6946('0x11')](function(_0x2b7b0e){_0x38b3ae(_0x2b7b0e);});};AGIVertices[_0x6946('0x12')][_0x6946('0x23')]=function(_0xfdc099,_0x51ca42,_0x681ae3){this[_0x6946('0xe')]['sendMailMessage'](_0xfdc099,_0x51ca42)[_0x6946('0x15')](function(){_0x681ae3(null);})[_0x6946('0x11')](function(_0xace751){_0x681ae3(_0xace751);});};AGIVertices[_0x6946('0x12')][_0x6946('0x24')]=function(_0x2a5245,_0x2b67ea){this[_0x6946('0x17')][_0x6946('0x25')](_0x2a5245)[_0x6946('0x15')](function(_0x4655fe){if(_0x4655fe){if(_0x4655fe[_0x6946('0x26')]){_0x2b67ea(null,[_0x4655fe[_0x6946('0x27')]]);}else{_0x2b67ea(null,_['map'](_0x4655fe['Intervals'],_0x6946('0x27')));}}else{_0x2b67ea(null,![]);}})[_0x6946('0x11')](function(_0x5051d6){_0x2b67ea(_0x5051d6);});};AGIVertices[_0x6946('0x12')][_0x6946('0x21')]=function(_0xff281c){return util[_0x6946('0x28')](_0x6946('0x29'),FILES_PATH,_0xff281c);};AGIVertices[_0x6946('0x12')][_0x6946('0x2a')]=function(_0x3aeedf,_0x263bca,_0x5e7e87){odbc[_0x6946('0x2b')](_0x3aeedf,function(_0x59b100){if(_0x59b100){logger[_0x6946('0x2c')](_0x6946('0x2d'),_0x59b100);_0x5e7e87(_0x59b100);}else{logger[_0x6946('0x2e')](_0x6946('0x2f'));odbc[_0x6946('0x30')](_0x263bca,function(_0x34860a,_0x4d393b){if(_0x34860a){logger[_0x6946('0x2e')]('Error\x20executing\x20query\x20%s',_0x263bca);_0x5e7e87(_0x34860a);}else{logger[_0x6946('0x2e')](_0x6946('0x31'),_0x263bca);odbc[_0x6946('0x32')](function(_0x35913d){if(_0x35913d){logger[_0x6946('0x2c')]('Error\x20closing\x20connection\x20to\x20odbc\x20%s',_0x35913d);}_0x5e7e87(null,_0x4d393b);});}});}});};AGIVertices[_0x6946('0x12')]['getSmsAccount']=function(_0x2cc67e,_0x3b9e47){this[_0x6946('0x17')][_0x6946('0x33')](_0x2cc67e)['then'](function(_0x155152){_0x3b9e47(null,_0x155152?_0x155152:![]);})[_0x6946('0x11')](function(_0x293808){_0x3b9e47(_0x293808);});};AGIVertices[_0x6946('0x12')][_0x6946('0x34')]=function(_0x37430,_0xac212){this[_0x6946('0x17')][_0x6946('0x34')](_0x37430)[_0x6946('0x15')](function(_0x40c2c6){_0xac212(null,_0x40c2c6);})[_0x6946('0x11')](function(_0x45c67d){_0xac212(_0x45c67d);});};AGIVertices['prototype'][_0x6946('0x35')]=function(_0x442285,_0x5ada1e,_0x45f2d7){this['rpc']['createSquareDetailsReport']({'uniqueid':this[_0x6946('0x36')][_0x6946('0x37')],'node':_0x442285[_0x6946('0x38')],'application':_0x442285['agicommand'],'data':_0x5ada1e||null,'project_name':this[_0x6946('0x36')][_0x6946('0x39')],'callerid':this[_0x6946('0x36')]['callerid']})[_0x6946('0x15')](function(_0x3bcd8a){if(_0x45f2d7){_0x45f2d7(null,_0x3bcd8a);}})[_0x6946('0x11')](function(_0x2a724c){if(_0x45f2d7){_0x45f2d7(_0x2a724c);}});};AGIVertices[_0x6946('0x12')][_0x6946('0x3a')]=function(_0x22e2a3,_0x159c3d,_0x1efa27,_0x5bb9f1){this[_0x6946('0x17')][_0x6946('0x3a')]({'uniqueid':this['channel'][_0x6946('0x37')],'callerid':this[_0x6946('0x36')][_0x6946('0x3b')],'calleridname':this[_0x6946('0x36')][_0x6946('0x3c')],'context':this[_0x6946('0x36')][_0x6946('0x3d')],'extension':this[_0x6946('0x36')][_0x6946('0x3e')],'priority':this[_0x6946('0x36')]['priority'],'accountcode':this[_0x6946('0x36')]['accountcode'],'dnid':this['channel'][_0x6946('0x3f')],'projectName':this[_0x6946('0x36')]['arg_1'],'saveName':_0x159c3d,'filename':_0x22e2a3[_0x6946('0x40')]||_0x159c3d,'savePath':_0x1efa27})[_0x6946('0x15')](function(_0x57da4e){_0x5bb9f1(null,_0x57da4e);})[_0x6946('0x11')](function(_0x343230){_0x5bb9f1(_0x343230);});};AGIVertices[_0x6946('0x12')]['createSquareMessage']=function(_0x52008e,_0x5cc5a2,_0x14057d){this[_0x6946('0x17')][_0x6946('0x41')]({'uniqueid':this[_0x6946('0x36')]['uniqueid'],'body':_0x52008e,'direction':_0x5cc5a2})[_0x6946('0x15')](function(_0x24168a){if(_0x14057d){_0x14057d(null,_0x24168a);}})[_0x6946('0x11')](function(_0x39f995){if(_0x14057d){_0x14057d(_0x39f995);}});};AGIVertices[_0x6946('0x12')][_0x6946('0x42')]=function(_0x509d87,_0x4f05e9){this[_0x6946('0x17')][_0x6946('0x42')]({'firstName':_[_0x6946('0x43')](_0x509d87['name'])||_[_0x6946('0x44')](_0x509d87[_0x6946('0x10')])?_0x6946('0x45')+Math[_0x6946('0x46')]():_0x509d87['name'],'lastName':_[_0x6946('0x43')](_0x509d87['lastName'])||_[_0x6946('0x44')](_0x509d87['lastName'])?null:_0x509d87[_0x6946('0x47')],'phone':_0x509d87[_0x6946('0x48')],'ListId':_0x509d87[_0x6946('0x49')],'scheduledat':_0x509d87[_0x6946('0x4a')],'callbackUniqueid':this[_0x6946('0x36')][_0x6946('0x37')],'tags':_0x6946('0x4b'),'description':'Callback\x20scheduled\x20at\x20'+_0x509d87[_0x6946('0x4a')][_0x6946('0x4c')](),'priority':_0x509d87[_0x6946('0x4d')]})['then'](function(_0x3dcc39){_0x4f05e9(null,_0x3dcc39);})[_0x6946('0x11')](function(_0x23d60f){_0x4f05e9(_0x23d60f);});};AGIVertices[_0x6946('0x12')][_0x6946('0x4e')]=function(_0x3e41db,_0x571cd7){this[_0x6946('0x17')][_0x6946('0x4f')](_0x3e41db)[_0x6946('0x15')](function(_0xca711d){_0x571cd7(null,_0xca711d?_0xca711d[_0x6946('0x10')]:![]);})[_0x6946('0x11')](function(_0x2aa80e){_0x571cd7(_0x2aa80e);});};AGIVertices[_0x6946('0x12')]['agentPause']=function(_0x265cd7,_0x152079,_0x3aa8e8){var _0x21bc8c={'role':_0x6946('0x50')};_0x21bc8c[_0x265cd7]=this[_0x6946('0x36')][_0x6946('0x3b')];this[_0x6946('0x17')]['agentPause'](_0x21bc8c,_0x152079,this['channel'][_0x6946('0x37')])[_0x6946('0x15')](function(_0x1e0399){_0x3aa8e8(null,_['isNil'](_0x1e0399)?![]:!![]);})[_0x6946('0x11')](function(_0x47b76d){logger[_0x6946('0x2c')](_0x47b76d);_0x3aa8e8(null,![]);});};AGIVertices['prototype'][_0x6946('0x51')]=function(_0x4dd938,_0x15e3c2){var _0x52517a={'role':_0x6946('0x50')};_0x52517a[_0x4dd938]=this[_0x6946('0x36')][_0x6946('0x3b')];this[_0x6946('0x17')][_0x6946('0x51')](_0x52517a)[_0x6946('0x15')](function(_0x185e6e){_0x15e3c2(null,_['isNil'](_0x185e6e)?![]:!![]);})[_0x6946('0x11')](function(_0x20821f){logger['error'](_0x20821f);_0x15e3c2(null,![]);});};AGIVertices[_0x6946('0x12')][_0x6946('0x52')]=function(_0x24fee6,_0x378f81){var _0x3b67a8={'role':_0x6946('0x50')};_0x3b67a8[_0x24fee6]=this['channel']['callerid'];this['rpc'][_0x6946('0x52')](_0x3b67a8)['then'](function(_0x154f54){_0x378f81(null,_['isNil'](_0x154f54)?![]:!![]);})[_0x6946('0x11')](function(_0x1eda8a){logger[_0x6946('0x2c')](_0x1eda8a);_0x378f81(null,![]);});};AGIVertices[_0x6946('0x12')]['agentLogin']=function(_0x4a6c39,_0x2c335a){var _0x3f29dd={'role':_0x6946('0x50')};_0x3f29dd[_0x4a6c39]=this[_0x6946('0x36')][_0x6946('0x3b')];var _0x31f9a1=_0x4a6c39!=_0x6946('0x53')?util[_0x6946('0x28')](_0x6946('0x54'),_0x6946('0x55'),this[_0x6946('0x36')][_0x6946('0x3b')]):undefined;this[_0x6946('0x17')][_0x6946('0x56')](_0x3f29dd,_0x31f9a1)[_0x6946('0x15')](function(_0x282ee6){_0x2c335a(null,_[_0x6946('0x44')](_0x282ee6)?![]:!![]);})[_0x6946('0x11')](function(_0x3c125b){logger[_0x6946('0x2c')](_0x3c125b);_0x2c335a(null,![]);});};AGIVertices[_0x6946('0x12')][_0x6946('0x57')]=function(_0x4da526,_0x54c7f9){sh[_0x6946('0x58')](_['trim'](_0x4da526),function(_0x3a76cc,_0x1d9e3a){var _0x1c7b7c=_0x1d9e3a[_0x6946('0x59')](/(\r\n|\n|\r)/gm,'');_0x54c7f9(null,_0x1c7b7c);});};AGIVertices['prototype'][_0x6946('0x5a')]=function(_0x1e17fc,_0x4f6adf){scripts[_0x6946('0x5a')](_0x1e17fc[_0x6946('0x5b')],_0x1e17fc[_0x6946('0x5c')]||_0x6946('0x5d'),_0x1e17fc[_0x6946('0x5d')],_0x1e17fc[_0x6946('0x5e')]||_0x6946('0x5f'),_0x1e17fc[_0x6946('0x60')]||_0x6946('0x61'),_0x1e17fc[_0x6946('0x62')]||_0x6946('0x63'))[_0x6946('0x15')](function(_0x3aed10){_0x4f6adf(null,_0x3aed10);})[_0x6946('0x11')](function(_0x4360b7){_0x4f6adf(_0x4360b7);});};AGIVertices[_0x6946('0x12')][_0x6946('0x64')]=function(_0x54f691,_0x49e71f){scripts[_0x6946('0x64')](_0x54f691['text'],_0x54f691['google_tts_language']||'en',0x1)['then'](function(_0x2888a8){_0x49e71f(null,_0x2888a8);})[_0x6946('0x11')](function(_0x17e3f5){_0x49e71f(_0x17e3f5);});};AGIVertices[_0x6946('0x12')]['restAPI']=function(_0x343bec,_0x3ac48e){var _0x6ab0ba={'uri':_0x343bec['url'],'method':_0x343bec['method'],'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x343bec['timeout'])===_0x6946('0x65')&&parseInt(_0x343bec['timeout'])>=0x1?parseInt(_0x343bec[_0x6946('0x66')])*0x3e8:0x5*0x3e8};if(_[_0x6946('0x67')](['POST',_0x6946('0x68')],_0x6ab0ba['method']['toUpperCase']())){try{_0x6ab0ba['body']=_0x343bec[_0x6946('0xc')]?JSON[_0x6946('0x69')](_0x343bec['rawBody']):{};}catch(_0x3ad8ec){logger[_0x6946('0x2c')](_0x6946('0x6a'),_0x3ad8ec);}}try{_0x6ab0ba['headers']=_0x343bec[_0x6946('0x6b')]?JSON[_0x6946('0x69')](_0x343bec[_0x6946('0x6b')]):{};}catch(_0x978fef){logger['error'](_0x6946('0x6c'),_0x978fef);}if(_0x343bec[_0x6946('0x6d')]){try{var _0x23ef19=require(_0x343bec['computedVariables'])[_0x6946('0x6e')](this,_0x6ab0ba);_0x6ab0ba[_0x6946('0x6f')]=Mustache[_0x6946('0x70')](_0x343bec[_0x6946('0x71')],_0x23ef19,{},['$$','$$']);if(_0x6ab0ba['headers']){_0x6ab0ba[_0x6946('0x72')]=JSON['parse'](Mustache[_0x6946('0x70')](JSON[_0x6946('0x73')](_0x6ab0ba['headers']),_0x23ef19,{},['$$','$$']));}if(_0x6ab0ba[_0x6946('0x74')]){_0x6ab0ba[_0x6946('0x74')]=JSON[_0x6946('0x69')](Mustache[_0x6946('0x70')](JSON[_0x6946('0x73')](_0x6ab0ba[_0x6946('0x74')]),_0x23ef19,{},['$$','$$']));}}catch(_0x5941a2){logger[_0x6946('0x2c')]('An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function',_0x5941a2);}}rp(_0x6ab0ba)['then'](function(_0x11113f){var _0x3b14c8={'statusCode':_0x11113f[_0x6946('0x75')]||0xc8,'statusMessage':_0x11113f[_0x6946('0x76')]||'OK','headers':_0x11113f[_0x6946('0x72')]||{},'body':_0x11113f[_0x6946('0x74')]||{}};_0x3ac48e(null,_0x3b14c8);})[_0x6946('0x11')](function(_0xe10b11){var _0xec075f={'statusCode':_0xe10b11[_0x6946('0x75')]||0x1f4,'statusMessage':_0xe10b11[_0x6946('0x77')]||_0x6946('0x78'),'headers':_0xe10b11['options'][_0x6946('0x72')]||{},'body':_0xe10b11['options'][_0x6946('0x74')]||{}};_0x3ac48e(null,_0xec075f);});};AGIVertices['prototype']['googleDialogflow']=function(_0x4a842d,_0x3e7202){scripts[_0x6946('0x79')](this[_0x6946('0x36')][_0x6946('0x37')],_0x4a842d[_0x6946('0x7a')],_0x4a842d[_0x6946('0x5d')],_0x4a842d[_0x6946('0x7b')]||'en')[_0x6946('0x15')](function(_0x4c7743){_0x3e7202(null,_0x4c7743);})[_0x6946('0x11')](function(_0x58720d){_0x3e7202(_0x58720d);});};AGIVertices[_0x6946('0x12')][_0x6946('0x7c')]=function(_0x2e512a,_0x3dd6c8){scripts[_0x6946('0x7c')](this[_0x6946('0x36')],_0x2e512a)[_0x6946('0x15')](function(_0x2fd218){_0x3dd6c8(null,_0x2fd218);})[_0x6946('0x11')](function(_0x401268){_0x3dd6c8(_0x401268);});};AGIVertices[_0x6946('0x12')][_0x6946('0x7d')]=function(_0x350b44,_0x54c9dd){scripts['ispeechTTS'](_0x350b44[_0x6946('0x7a')],_0x350b44['text'],_0x350b44[_0x6946('0x7e')]||_0x6946('0x5f'),_0x350b44[_0x6946('0x7f')])[_0x6946('0x15')](function(_0xc6e5b3){_0x54c9dd(null,_0xc6e5b3);})[_0x6946('0x11')](function(_0xf01fe6){_0x54c9dd(_0xf01fe6);});};AGIVertices[_0x6946('0x12')][_0x6946('0x80')]=function(_0x1244ad,_0x3cc6d8,_0x15c792){scripts[_0x6946('0x80')](_0x3cc6d8,_0x1244ad['key'],_0x1244ad[_0x6946('0x81')]||_0x6946('0x5f'),this[_0x6946('0x82')](_0x1244ad['model'])?_0x1244ad[_0x6946('0x83')]:undefined)[_0x6946('0x15')](function(_0x4a6f6b){_0x15c792(null,_0x4a6f6b);})[_0x6946('0x11')](function(_0x2b2637){_0x15c792(_0x2b2637);});};AGIVertices[_0x6946('0x12')][_0x6946('0x84')]=function(_0x25aa12,_0x17a08f){scripts[_0x6946('0x84')](_0x25aa12[_0x6946('0x85')],_0x25aa12[_0x6946('0x86')],_0x25aa12[_0x6946('0x87')],_0x25aa12[_0x6946('0x88')]||'Amy',_0x25aa12[_0x6946('0x5d')],_0x25aa12['aws_text_type']||_0x6946('0x5d'))[_0x6946('0x15')](function(_0xff8aae){_0x17a08f(null,_0xff8aae);})['catch'](function(_0x8ff25d){_0x17a08f(_0x8ff25d);});};AGIVertices['prototype']['awsLex']=function(_0x20d0e9,_0x3ce5e4){scripts[_0x6946('0x89')](this[_0x6946('0x36')][_0x6946('0x37')],_0x20d0e9[_0x6946('0x85')],_0x20d0e9[_0x6946('0x86')],_0x20d0e9['aws_lex_region'],_0x20d0e9[_0x6946('0x5d')],_0x20d0e9['aws_bot_name'])[_0x6946('0x15')](function(_0xd753e8){_0x3ce5e4(null,_0xd753e8);})[_0x6946('0x11')](function(_0x594dd7){_0x3ce5e4(_0x594dd7);});};AGIVertices['prototype'][_0x6946('0x8a')]=function(_0x398c95,_0x41f62,_0x369195){scripts[_0x6946('0x8a')](_0x41f62,_0x398c95['key'],_0x398c95[_0x6946('0x8b')]||_0x6946('0x5f'))[_0x6946('0x15')](function(_0x354ebc){_0x369195(null,_0x354ebc);})[_0x6946('0x11')](function(_0xfd6875){_0x369195(_0xfd6875);});};AGIVertices['prototype']['tildeASR']=function(_0x20703f,_0x28d21c,_0x399ea){scripts['tildeASR'](_0x28d21c,_0x20703f['appid'],_0x20703f[_0x6946('0x8c')],_0x20703f['uri'])[_0x6946('0x15')](function(_0x530575){_0x399ea(null,_0x530575);})[_0x6946('0x11')](function(_0x45ec73){_0x399ea(_0x45ec73);});};AGIVertices[_0x6946('0x12')][_0x6946('0x8d')]=function(_0x37828a){var _0x52ef5c=_[_0x6946('0x67')](verticesWithRetry,_0x37828a[_0x6946('0x8e')])?_0x37828a:_['clone'](_0x37828a);for(var _0x553fed in _0x52ef5c){if(_0x52ef5c['hasOwnProperty'](_0x553fed)){if(_0x52ef5c[_0x553fed]&&_[_0x6946('0x8f')](_0x52ef5c[_0x553fed])){if(_[_0x6946('0x67')](recursiveMapAttributes,_0x553fed)){_0x52ef5c[_0x553fed]=this[_0x6946('0x90')](_0x52ef5c[_0x553fed]);}else{_0x52ef5c[_0x553fed]=this[_0x6946('0x91')](_0x52ef5c[_0x553fed]);}}}}return _0x52ef5c;};AGIVertices['prototype'][_0x6946('0x92')]=function(_0x503e9b){for(var _0x5c3f59 in _0x503e9b){if(_0x503e9b[_0x6946('0x93')](_0x5c3f59)){if(_[_0x6946('0x94')](_0x503e9b[_0x5c3f59])){this['recursiveNodeIndex'](_0x503e9b[_0x5c3f59]);}else if(_['isArray'](_0x503e9b[_0x5c3f59])){for(var _0x42cc48=0x0;_0x42cc48<_0x503e9b[_0x5c3f59][_0x6946('0x95')];_0x42cc48++){this[_0x6946('0x92')](_0x503e9b[_0x5c3f59][_0x42cc48]);}}else if(_[_0x6946('0x8f')](_0x503e9b[_0x5c3f59])){_0x503e9b[_0x5c3f59]=this['replaceAllVariables'](_0x503e9b[_0x5c3f59]);}}}};AGIVertices[_0x6946('0x12')][_0x6946('0x96')]=function(_0x518241,_0x452301){for(var _0x474869 in _0x518241){if(_0x518241[_0x6946('0x93')](_0x474869)){if(_[_0x6946('0x94')](_0x518241[_0x474869])){if(!_[_0x6946('0x43')](_0x518241[_0x474869])){this[_0x6946('0x96')](_0x518241[_0x474869],util['format'](_0x6946('0x97'),_0x452301,_0x474869));}}else if(_[_0x6946('0x98')](_0x518241[_0x474869])){for(var _0xd4970a=0x0;_0xd4970a<_0x518241[_0x474869][_0x6946('0x95')];_0xd4970a++){this[_0x6946('0x96')](_0x518241[_0x474869][_0xd4970a],util['format']('%s.%s',_0x452301,_0x474869+'['+_0xd4970a+']'));}}else{if(!_[_0x6946('0x44')](_0x518241[_0x474869])){this['channel'][_0x6946('0x99')](util[_0x6946('0x28')](_0x6946('0x97'),_0x452301,_0x474869),_0x518241[_0x474869]);}}}}};AGIVertices[_0x6946('0x12')][_0x6946('0x90')]=function(_0x48b46e){try{var _0x4ad412=JSON['parse'](_0x48b46e);this['recursiveNodeIndex'](_0x4ad412);return JSON[_0x6946('0x73')](_0x4ad412);}catch(_0x264b80){return this[_0x6946('0x91')](_0x48b46e);}};AGIVertices['prototype'][_0x6946('0x91')]=function(_0x3e7aff){var _0x398406=_0x3e7aff['split']('{');for(var _0x44f248=0x1;_0x44f248<_0x398406[_0x6946('0x95')];_0x44f248+=0x1){var _0x1d1af=_0x398406[_0x44f248][_0x6946('0x9a')]('}');if(_0x1d1af[_0x6946('0x95')]>0x1){_0x3e7aff=_0x3e7aff['replaceAll']('{'+_0x1d1af[0x0]+'}',this[_0x6946('0x36')][_0x6946('0xf')](_0x1d1af[0x0])['extra']||_0x1d1af[0x0]);}}if(_0x398406[_0x6946('0x95')]===0x1){return _0x3e7aff[_0x6946('0x4c')]();}return this['replaceAllVariables'](_0x3e7aff);};AGIVertices[_0x6946('0x12')]['getAndSetVariable']=function(_0x210f0d,_0x27046a){var _0x13966d=this[_0x6946('0x36')][_0x6946('0xf')](_0x210f0d);if(_0x13966d['result']===-0x1){return _0x13966d;}logger[_0x6946('0x2e')](util['format']('The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s',_0x27046a,_0x13966d['extra']));return this['channel']['setVariable'](_0x27046a,_0x13966d[_0x6946('0x9b')]);};AGIVertices['prototype'][_0x6946('0x82')]=function(_0x5f331b){return _0x5f331b&&_0x5f331b!=='0'&&_0x5f331b!=='-1'&&_0x5f331b!=='';};AGIVertices[_0x6946('0x12')][_0x6946('0x9c')]=function(_0x54cfac){this['createSquareDetailsReport'][_0x6946('0x6e')](this,_0x54cfac,'-');_0x54cfac[_0x6946('0x9d')]=_0x54cfac[_0x6946('0x9c')];return{'code':0xc8,'result':'-'};};AGIVertices['prototype']['agi']=function(_0x1b232f){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x9e'),_0x1b232f[_0x6946('0x38')]));return this[_0x6946('0x36')][_0x6946('0x9')]([_0x1b232f[_0x6946('0x9f')],_0x1b232f[_0x6946('0xa0')]]);};AGIVertices[_0x6946('0x12')]['answer']=function(_0x286d93){logger['info'](util[_0x6946('0x28')]('Enter\x20in\x20ANSWER\x20(%s)\x20block',_0x286d93['label']));if(this[_0x6946('0x82')](_0x286d93[_0x6946('0x66')])){logger['info'](util[_0x6946('0x28')]('Wait\x20%s\x20seconds\x20before\x20answer',_0x286d93[_0x6946('0x66')]));var _0x50bb73=this[_0x6946('0x36')][_0x6946('0xa1')](_0x286d93['timeout']);if(_0x50bb73[_0x6946('0xa2')]===-0x1){return _0x50bb73;}}return this[_0x6946('0x36')][_0x6946('0xa3')]();};AGIVertices[_0x6946('0x12')][_0x6946('0x4b')]=function(_0x454815){logger['info'](util[_0x6946('0x28')](_0x6946('0xa4'),_0x454815[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x454815['list_id'])){return this[_0x6946('0x36')]['error'](_0x454815,_0x6946('0xa5'));}_0x454815[_0x6946('0x4a')]=moment();if(this[_0x6946('0x82')](_0x454815['delay'])){_0x454815[_0x6946('0x4a')]=moment()[_0x6946('0xa6')](_0x454815['delay'],_0x6946('0xa7'));}if(!this['isConfigured'](_0x454815[_0x6946('0x4d')])){_0x454815[_0x6946('0x4d')]=0x2;}this[_0x6946('0x42')][_0x6946('0x6e')](this,_0x454815);return this['channel'][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0xa9'),_0x454815['phone'],_0x454815['list_id'],_0x454815[_0x6946('0x4a')]));};AGIVertices[_0x6946('0x12')][_0x6946('0xaa')]=function(_0xd18277){logger['info'](util[_0x6946('0x28')]('Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block',_0xd18277[_0x6946('0x38')]));var _0x5174d3=this[_0x6946('0x36')]['exec'](_0xd18277[_0x6946('0xab')],_0xd18277[_0x6946('0xac')]);if(_0x5174d3[_0x6946('0xa2')]===-0x1){return _0x5174d3;}return this[_0x6946('0x36')]['noop'](util['format']('Executed\x20command\x20%s\x20%s',_0xd18277[_0x6946('0xab')],_0xd18277[_0x6946('0xac')]));};AGIVertices[_0x6946('0x12')][_0x6946('0xad')]=function(_0x4b1fa5){logger[_0x6946('0x2e')](util[_0x6946('0x28')]('Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block',_0x4b1fa5[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x4b1fa5[_0x6946('0x5d')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xae'));}var _0x15e49b='\x22'+_0x4b1fa5[_0x6946('0x5d')]+'\x22';if(this['isConfigured'](_0x4b1fa5[_0x6946('0xac')])){_0x15e49b+=','+_0x4b1fa5['options'];}var _0x46f977=this[_0x6946('0x36')][_0x6946('0x58')]('MRCPSynth',_0x15e49b);if(_0x46f977[_0x6946('0xa2')]===-0x1){return _0x46f977;}return this['channel'][_0x6946('0xa8')](util[_0x6946('0x28')]('Executed\x20command\x20MRCPSynth\x20%s',_0x15e49b));};AGIVertices[_0x6946('0x12')][_0x6946('0xaf')]=function(_0x201ec1){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0xb0'),_0x201ec1[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x201ec1['text'])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xae'));}var _0x24f9f6='\x22'+_0x201ec1[_0x6946('0x5d')]+'\x22';if(this[_0x6946('0x82')](_0x201ec1[_0x6946('0xac')])){_0x24f9f6+=','+_0x201ec1[_0x6946('0xac')];}var _0x388b1b=this[_0x6946('0x36')][_0x6946('0x58')](_0x6946('0xb1'),_0x24f9f6);if(_0x388b1b[_0x6946('0xa2')]===-0x1){return _0x388b1b;}return this['channel'][_0x6946('0xa8')](util[_0x6946('0x28')]('Executed\x20command\x20MRCPSynth\x20%s',_0x24f9f6));};AGIVertices[_0x6946('0x12')][_0x6946('0xb2')]=function(_0x4f0f6f){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0xb3'),_0x4f0f6f[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x4f0f6f['grammar'])){return this['channel'][_0x6946('0xa8')]('no\x20grammar\x20configured');}var _0x964870=_0x4f0f6f[_0x6946('0xb4')];if(this['isConfigured'](_0x4f0f6f[_0x6946('0xac')])){_0x964870+=','+_0x4f0f6f[_0x6946('0xac')];}var _0xb42771=this['channel'][_0x6946('0x58')]('MRCPRecog',_0x964870);if(_0xb42771[_0x6946('0xa2')]===-0x1){return _0xb42771;}var _0x169bf1=this[_0x6946('0xb5')]('RECOG_CONFIDENCE()',_0x6946('0xb6'));if(_0x169bf1[_0x6946('0xa2')]===-0x1){return _0x169bf1;}var _0x3fc29c=this['getAndSetVariable']('RECOG_INPUT()',_0x6946('0xb7'));if(_0x3fc29c['result']===-0x1){return _0x3fc29c;}var _0x4ca1b4=this[_0x6946('0xb5')](_0x6946('0xb8'),_0x6946('0xb9'));if(_0x4ca1b4[_0x6946('0xa2')]===-0x1){return _0x4ca1b4;}return this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')]('Executed\x20command\x20MRCPRecog\x20%s',_0x964870));};AGIVertices[_0x6946('0x12')][_0x6946('0xba')]=function(_0x1464ff){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0xbb'),_0x1464ff[_0x6946('0x38')]));if(!this['isConfigured'](_0x1464ff[_0x6946('0xb4')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xbc'));}var _0x1b8e5c=_0x1464ff[_0x6946('0xb4')];if(this[_0x6946('0x82')](_0x1464ff[_0x6946('0xac')])){_0x1b8e5c+=','+_0x1464ff[_0x6946('0xac')];}var _0x1afb62=this[_0x6946('0x36')]['exec'](_0x6946('0xbd'),_0x1b8e5c);if(_0x1afb62['result']===-0x1){return _0x1afb62;}var _0x28b657=this[_0x6946('0xb5')](_0x6946('0xbe'),_0x6946('0xbf'));if(_0x28b657['result']===-0x1){return _0x28b657;}var _0x8878a4=this[_0x6946('0xb5')](_0x6946('0xc0'),_0x6946('0xc1'));if(_0x8878a4[_0x6946('0xa2')]===-0x1){return _0x8878a4;}var _0x2344b7=this[_0x6946('0xb5')](_0x6946('0xb8'),_0x6946('0xc2'));if(_0x2344b7[_0x6946('0xa2')]===-0x1){return _0x2344b7;}return this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')]('Executed\x20command\x20MRCPRecog\x20%s',_0x1b8e5c));};AGIVertices[_0x6946('0x12')][_0x6946('0xc3')]=function(_0x21c2e0){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0xc4'),_0x21c2e0[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x21c2e0[_0x6946('0xc5')])){return this['channel']['error'](_0x21c2e0,_0x6946('0xc6'));}var _0x413c73=this[_0x6946('0x19')]['sync'](this,_0x21c2e0[_0x6946('0xc5')]);if(!_0x413c73){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x21c2e0,_0x6946('0xc7'));}if(!this['isConfigured'](_0x21c2e0[_0x6946('0x30')])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x21c2e0,_0x6946('0xc8'));}var _0x456c71=_0x21c2e0[_0x6946('0x30')][_0x6946('0x59')](/(\r\n|\n|\r)/gm,'\x20');this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0xc9'),_0x456c71));var _0x2cc4bf=this['getQueryOdbc'][_0x6946('0x6e')](this,_0x413c73,_0x456c71);this[_0x6946('0x35')]['sync'](this,_0x21c2e0,_0x456c71);if(!this[_0x6946('0x82')](_0x21c2e0[_0x6946('0xca')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xcb'));}var _0x2da2aa=this[_0x6946('0xf')][_0x6946('0x6e')](this,_0x21c2e0[_0x6946('0xca')]);if(!_0x2da2aa){return this['channel'][_0x6946('0x2c')](_0x21c2e0,_0x6946('0xcc'));}var _0x4a7fc2=this;_0x2cc4bf[_0x6946('0xcd')](function(_0x106750,_0x21a48c){Object[_0x6946('0xce')](_0x106750)[_0x6946('0xcd')](function(_0x5dd422){_0x4a7fc2[_0x6946('0x36')][_0x6946('0x99')](util['format'](_0x6946('0xcf'),_0x2da2aa,_0x21a48c,_0x5dd422),_0x106750[_0x5dd422]);});});this[_0x6946('0x36')][_0x6946('0x99')](util[_0x6946('0x28')]('%s_ROWS_COUNT',_0x2da2aa),_0x2cc4bf['length']);return this[_0x6946('0x36')]['noop'](util['format'](_0x6946('0xd0'),_0x2da2aa));};AGIVertices[_0x6946('0x12')][_0x6946('0xd1')]=function(_0x92203f){logger[_0x6946('0xd2')](util[_0x6946('0x28')](_0x6946('0xd3'),_0x92203f[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x92203f['sip_id'])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x92203f,'no\x20user\x20selected');}var _0x2e3418=this['getUser'][_0x6946('0x6e')](this,_0x92203f[_0x6946('0xd4')]);if(!_0x2e3418){return this['channel'][_0x6946('0x2c')](_0x92203f,_0x6946('0xd5'));}var _0x3a43b7=this[_0x6946('0x36')][_0x6946('0x58')](_0x6946('0xd6'),[util[_0x6946('0x28')]('SIP/%s',_0x2e3418),_0x92203f[_0x6946('0x66')],_0x92203f['opts'],_0x92203f[_0x6946('0x71')]]);if(_0x3a43b7[_0x6946('0xa2')]===-0x1){return _0x3a43b7;}return this['channel'][_0x6946('0xa8')](util['format'](_0x6946('0xd7'),'DIAL'));};AGIVertices['prototype']['dialogflow']=function(_0x38695d){logger[_0x6946('0x2e')](util[_0x6946('0x28')]('Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block',_0x38695d[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x38695d['key'])){return this['channel']['noop'](_0x6946('0xd8'));}if(!this['isConfigured'](_0x38695d[_0x6946('0x5d')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xae'));}this[_0x6946('0x36')][_0x6946('0xd9')]=!![];this[_0x6946('0x35')](_0x38695d);this[_0x6946('0x41')](_0x38695d[_0x6946('0x5d')],'in');this[_0x6946('0x36')][_0x6946('0xa8')](util['format'](_0x6946('0xda'),_0x38695d['text']));var _0x36b35b=this[_0x6946('0x79')][_0x6946('0x6e')](this,_0x38695d);if(_0x36b35b){for(var _0x13c17c in _0x36b35b){if(_0x36b35b[_0x6946('0x93')](_0x13c17c)){this['channel'][_0x6946('0x99')](util['format'](_0x6946('0xdb'),_0x13c17c[_0x6946('0xdc')]()),_0x36b35b[_0x13c17c]);}}this[_0x6946('0x41')](_0x36b35b[_0x6946('0xdd')],_0x6946('0xde'));return this['channel'][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0xdf'),_0x36b35b['speech']));}return this['channel']['error'](_0x38695d,_0x6946('0xe0'));};AGIVertices[_0x6946('0x12')][_0x6946('0xe1')]=function(_0x4e4d70){logger[_0x6946('0x2e')](util['format'](_0x6946('0xe2'),_0x4e4d70[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x4e4d70[_0x6946('0xe3')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xe4'));}if(!this[_0x6946('0x82')](_0x4e4d70['username'])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xe5'));}if(!this[_0x6946('0x82')](_0x4e4d70['password'])){return this[_0x6946('0x36')][_0x6946('0xa8')]('no\x20password\x20configured');}if(!this[_0x6946('0x82')](_0x4e4d70[_0x6946('0xe6')])){return this[_0x6946('0x36')][_0x6946('0xa8')]('no\x20text\x20configured');}this[_0x6946('0x36')][_0x6946('0xd9')]=!![];this[_0x6946('0x35')](_0x4e4d70);this['createSquareMessage'](_0x4e4d70[_0x6946('0x5d')],'in');this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0xe7'),_0x4e4d70[_0x6946('0x5d')]));var _0x42ef73=this[_0x6946('0x7c')]['sync'](this,_0x4e4d70);if(_0x42ef73){for(var _0xfab6a4 in _0x42ef73){if(_0x42ef73['hasOwnProperty'](_0xfab6a4)){this[_0x6946('0x36')][_0x6946('0x99')](util[_0x6946('0x28')](_0x6946('0xe8'),_0xfab6a4['toUpperCase']()),_0x42ef73[_0xfab6a4]);}}this[_0x6946('0x41')](_0x42ef73['speech'],'out');if(_0x42ef73[_0x6946('0xe9')]){this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0xea'),_0x42ef73['audiofile']));var _0x2840e7=this['channel'][_0x6946('0xeb')](_0x42ef73[_0x6946('0xe9')]);try{fs[_0x6946('0xec')](_0x42ef73[_0x6946('0xe9')]+'.wav');}catch(_0xcc74d5){logger[_0x6946('0x2c')](_0xcc74d5);}return _0x2840e7;}else{return this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0xed'),_0x42ef73[_0x6946('0xdd')]));}}return this[_0x6946('0x36')][_0x6946('0x2c')](_0x4e4d70,'SestekNDA\x20is\x20unreachable');};AGIVertices[_0x6946('0x12')]['end']=function(_0x11d75b){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0xee'),_0x11d75b[_0x6946('0x38')]));return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xef'));};AGIVertices[_0x6946('0x12')][_0x6946('0xf0')]=function(_0x4a9be6){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0xf1'),_0x4a9be6[_0x6946('0x38')]));var _0x2208ca='';if(_0x4a9be6[_0x6946('0xf2')]){if(!this[_0x6946('0x82')](_0x4a9be6[_0x6946('0xf2')])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x4a9be6,'no\x20trunk\x20selected');}else{var _0x5c7468=parseInt(_0x4a9be6[_0x6946('0xf2')],0xa);if(isNaN(_0x5c7468)){_0x2208ca=_0x4a9be6[_0x6946('0xf2')];}else{_0x2208ca=this[_0x6946('0x1d')][_0x6946('0x6e')](this,_0x4a9be6[_0x6946('0xf2')]);if(!_0x2208ca){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x4a9be6,_0x6946('0xf3'));}}}}else if(_0x4a9be6[_0x6946('0xf4')]){_0x2208ca=_0x4a9be6[_0x6946('0xf4')];}else{return this['channel'][_0x6946('0x2c')](_0x4a9be6,_0x6946('0xf5'));}var _0x5a3758=this['channel']['exec'](_0x6946('0xd6'),[util['format'](_0x6946('0xf6'),_0x2208ca,_0x4a9be6[_0x6946('0x48')]),_0x4a9be6[_0x6946('0x66')],_0x4a9be6[_0x6946('0xf7')],_0x4a9be6[_0x6946('0x71')]]);if(_0x5a3758[_0x6946('0xa2')]===-0x1){return _0x5a3758;}return this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0xd7'),_0x6946('0xd6')));};AGIVertices[_0x6946('0x12')][_0x6946('0xf8')]=function(_0x55a8f4){logger['info'](util[_0x6946('0x28')](_0x6946('0xf9'),_0x55a8f4['label']));return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xf8'));};AGIVertices['prototype'][_0x6946('0xd')]=function(_0x2e3085){logger['info'](util['format'](_0x6946('0xfa'),_0x2e3085[_0x6946('0x38')]));if(_0x2e3085[_0x6946('0x9d')]===0x0){return this[_0x6946('0x9c')](_0x2e3085);}_0x2e3085[_0x6946('0x9d')]-=0x1;if(!this[_0x6946('0x82')](_0x2e3085[_0x6946('0xfb')])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x2e3085,_0x6946('0xfc'));}var _0x5474b4=this[_0x6946('0x1f')][_0x6946('0x6e')](this,_0x2e3085[_0x6946('0xfb')]);if(!_0x5474b4){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x2e3085,'no\x20file\x20audio\x20found');}if(!this[_0x6946('0x82')](_0x2e3085[_0x6946('0xca')])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x6946('0xcb'));}var _0xc693e=this[_0x6946('0x36')][_0x6946('0xfd')](_0x5474b4,_0x2e3085['response'],_0x2e3085[_0x6946('0xfe')]);var _0x2d8dbc=_0xc693e[_0x6946('0xa2')]?_0xc693e[_0x6946('0xa2')]['toString']():'';logger[_0x6946('0x2e')](_0x6946('0xff'),JSON[_0x6946('0x73')](_0xc693e));if(_0xc693e['result']===-0x1){this[_0x6946('0x35')][_0x6946('0x6e')](this,_0x2e3085,_0x2d8dbc);return _0xc693e;}else if(_0xc693e['extra']===_0x6946('0x66')){_0xc693e['result']=_0x2d8dbc[_0x6946('0x95')]>=parseInt(_0x2e3085[_0x6946('0x100')])?'x':'i';}else{_0xc693e['result']=_0x2d8dbc[_0x6946('0x95')]>=parseInt(_0x2e3085[_0x6946('0x100')])&&_0x2d8dbc['length']<=parseInt(_0x2e3085[_0x6946('0xfe')])?'x':'i';}var _0x23c0f2=this[_0x6946('0xf')][_0x6946('0x6e')](this,_0x2e3085['variable_id']);if(!_0x23c0f2){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x2e3085,'no\x20variable\x20found');}this[_0x6946('0x36')][_0x6946('0x99')](_0x23c0f2,_0x2d8dbc);if(this['isConfigured'](_0x2e3085[_0x6946('0x101')])){var _0x9e6ac1=parseInt(_0x2e3085[_0x6946('0x101')],0xa);var _0x3dbc92=rs[_0x6946('0x102')]({'charset':'*','length':_0x9e6ac1});var _0x330947=_0x2d8dbc[_0x6946('0x95')];if(_0x330947>0x0){if(_0x330947>_0x9e6ac1){this['createSquareDetailsReport']['sync'](this,_0x2e3085,_0x2e3085['hiddendigitspos']===_0x6946('0x103')?_0x3dbc92+_0x2d8dbc['substr'](_0x9e6ac1):_0x2d8dbc[_0x6946('0x104')](0x0,_0x330947-_0x9e6ac1)+_0x3dbc92);}else{this[_0x6946('0x35')][_0x6946('0x6e')](this,_0x2e3085,rs[_0x6946('0x102')]({'charset':'*','length':_0x330947}));}}else{this[_0x6946('0x35')][_0x6946('0x6e')](this,_0x2e3085,'');}}else{this[_0x6946('0x35')][_0x6946('0x6e')](this,_0x2e3085,_0x2d8dbc);}return _0xc693e;};AGIVertices[_0x6946('0x12')]['getsecretdigits']=function(_0x4a7cf8){logger[_0x6946('0x2e')](util[_0x6946('0x28')]('Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block',_0x4a7cf8[_0x6946('0x38')]));return this['getdigits'](_0x4a7cf8);};AGIVertices[_0x6946('0x12')]['goal']=function(_0x31610f){logger['info'](util[_0x6946('0x28')](_0x6946('0x105'),_0x31610f[_0x6946('0x38')]));this['createSquareDetailsReport'][_0x6946('0x6e')](this,_0x31610f,_0x31610f[_0x6946('0x106')]);return this[_0x6946('0x36')]['noop'](util[_0x6946('0x28')](_0x6946('0x107'),_0x31610f[_0x6946('0x106')]));};AGIVertices[_0x6946('0x12')][_0x6946('0x108')]=function(_0x38ffb6){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x109'),_0x38ffb6['label']));if(!this[_0x6946('0x82')](_0x38ffb6[_0x6946('0x85')])||!this['isConfigured'](_0x38ffb6[_0x6946('0x86')])){return this['channel']['noop'](_0x6946('0x10a'));}if(!this[_0x6946('0x82')](_0x38ffb6[_0x6946('0x5d')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xae'));}this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x10b'),_0x38ffb6[_0x6946('0x5d')]));var _0x131d57=this[_0x6946('0x84')][_0x6946('0x6e')](this,_0x38ffb6);if(_0x131d57){this[_0x6946('0x36')]['noop'](util[_0x6946('0x28')]('aws\x20Polly\x20%s\x20file\x20created',_0x131d57));var _0x39d4a8=this[_0x6946('0x36')]['streamFile'](_0x131d57);try{fs['unlink'](_0x131d57+_0x6946('0x10c'));}catch(_0x456f22){logger[_0x6946('0x2c')](_0x456f22);}return _0x39d4a8;}return this[_0x6946('0x36')][_0x6946('0x2c')](_0x38ffb6,'aws\x20Polly\x20is\x20unreachable');};AGIVertices['prototype'][_0x6946('0x10d')]=function(_0x5f0c84){logger[_0x6946('0x2e')](util[_0x6946('0x28')]('Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block',_0x5f0c84['label']));if(!this[_0x6946('0x82')](_0x5f0c84[_0x6946('0x85')])||!this[_0x6946('0x82')](_0x5f0c84[_0x6946('0x86')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0x10a'));}if(!this[_0x6946('0x82')](_0x5f0c84[_0x6946('0x10e')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0x10f'));}if(!this[_0x6946('0x82')](_0x5f0c84[_0x6946('0x5d')])){return this[_0x6946('0x36')][_0x6946('0xa8')]('no\x20text\x20configured');}this['channel']['bot']=!![];this[_0x6946('0x35')](_0x5f0c84);this[_0x6946('0x41')](_0x5f0c84[_0x6946('0x5d')],'in');this[_0x6946('0x36')]['noop'](util[_0x6946('0x28')](_0x6946('0x110'),_0x5f0c84[_0x6946('0x5d')]));var _0x2e8da9=this[_0x6946('0x89')][_0x6946('0x6e')](this,_0x5f0c84);if(_0x2e8da9){for(var _0x30cd03 in _0x2e8da9){if(_0x2e8da9[_0x6946('0x93')](_0x30cd03)&&_[_0x6946('0x8f')](_0x2e8da9[_0x30cd03])){this[_0x6946('0x36')][_0x6946('0x99')](util[_0x6946('0x28')](_0x6946('0x111'),_0x30cd03['toUpperCase']()),_0x2e8da9[_0x30cd03]);}}if(_[_0x6946('0x44')](_0x2e8da9[_0x6946('0x77')])){return this[_0x6946('0x36')]['noop'](_0x6946('0x112'));}else{this[_0x6946('0x41')](_0x2e8da9[_0x6946('0x77')],_0x6946('0xde'));return this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x113'),_0x2e8da9[_0x6946('0x77')]));}}return this[_0x6946('0x36')][_0x6946('0x2c')](_0x5f0c84,_0x6946('0x114'));};AGIVertices[_0x6946('0x12')][_0x6946('0x115')]=function(_0x252ec1){logger['info'](util['format'](_0x6946('0x116'),_0x252ec1['label'],_0x252ec1[_0x6946('0x66')]));if(!this[_0x6946('0x82')](_0x252ec1[_0x6946('0x7a')])){return this['channel']['noop'](_0x6946('0xd8'));}var _0x1f5dc9=_0x6946('0x117');var _0x3ddcf7=util['format']('%s/recordings/%s',FILES_PATH,rs[_0x6946('0x102')](0x4));var _0x24a23f=util[_0x6946('0x28')]('%s.%s',_0x3ddcf7,_0x1f5dc9);var _0x45ffca=!![];if(_0x252ec1[_0x6946('0x118')]===_0x6946('0x119')){_0x45ffca=![];}var _0x49f8c8=this['channel']['recordFile'](_0x3ddcf7,_0x1f5dc9,_0x252ec1[_0x6946('0x11a')],_0x252ec1[_0x6946('0x66')],undefined,_0x45ffca);if(_0x49f8c8[_0x6946('0xa2')]!==-0x1){this[_0x6946('0x36')]['noop'](util[_0x6946('0x28')](_0x6946('0x11b'),_0x24a23f));var _0x18032a=this[_0x6946('0x8a')][_0x6946('0x6e')](this,_0x252ec1,_0x24a23f);if(_0x18032a){for(var _0xd2076 in _0x18032a){if(_0x18032a[_0x6946('0x93')](_0xd2076)){this['channel'][_0x6946('0x99')](util[_0x6946('0x28')]('GOOGLE_ASR_%s',_0xd2076[_0x6946('0xdc')]()),_0x18032a[_0xd2076]);}}return this[_0x6946('0x36')]['noop'](util['format'](_0x6946('0x11c'),JSON['stringify'](_0x18032a)));}}return _0x49f8c8;};AGIVertices[_0x6946('0x12')][_0x6946('0x11d')]=function(_0x1bc6b8){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x11e'),_0x1bc6b8['label']));if(!this[_0x6946('0x82')](_0x1bc6b8['appid'])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0x11f'));}if(!this[_0x6946('0x82')](_0x1bc6b8[_0x6946('0x8c')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0x120'));}var _0x3ef4a6=_0x6946('0x117');var _0x505315=util['format'](_0x6946('0x121'),FILES_PATH,rs[_0x6946('0x102')](0x4));var _0x57018f=util[_0x6946('0x28')](_0x6946('0x97'),_0x505315,_0x3ef4a6);var _0x36ee4c=!![];if(_0x1bc6b8[_0x6946('0x118')]===_0x6946('0x119')){_0x36ee4c=![];}var _0x14085c=this['channel'][_0x6946('0x122')](_0x505315,_0x3ef4a6,_0x1bc6b8[_0x6946('0x11a')],_0x1bc6b8['timeout'],undefined,_0x36ee4c);if(_0x14085c['result']!==-0x1){this[_0x6946('0x36')]['noop'](util[_0x6946('0x28')]('tilde\x20%s\x20file\x20created',_0x57018f));var _0x2586be=this[_0x6946('0x123')]['sync'](this,_0x1bc6b8,_0x57018f);if(_0x2586be){for(var _0x5e3825 in _0x2586be){if(_0x2586be[_0x6946('0x93')](_0x5e3825)){this[_0x6946('0x36')][_0x6946('0x99')](util['format'](_0x6946('0x124'),_0x5e3825[_0x6946('0xdc')]()),_0x2586be[_0x5e3825]);}}return this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x125'),JSON[_0x6946('0x73')](_0x2586be)));}}return _0x14085c;};AGIVertices[_0x6946('0x12')][_0x6946('0x126')]=function(_0x3a9983){logger[_0x6946('0x2e')](util['format']('Enter\x20in\x20GOTO\x20(%s)\x20block',_0x3a9983[_0x6946('0x38')]));return this[_0x6946('0x36')][_0x6946('0x127')](_0x3a9983[_0x6946('0x3d')],_0x3a9983['extension'],_0x3a9983[_0x6946('0x128')]);};AGIVertices[_0x6946('0x12')][_0x6946('0x129')]=function(_0x1025b6){logger[_0x6946('0x2e')](util[_0x6946('0x28')]('Enter\x20in\x20GOTOIF\x20(%s)\x20block',_0x1025b6[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x1025b6[_0x6946('0x12a')])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x1025b6,_0x6946('0x12b'));}try{var _0x1e4ad1=eval(_0x1025b6[_0x6946('0x12a')])?'true':_0x6946('0x12c');this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x12d'),_0x1025b6[_0x6946('0x12a')],_0x1e4ad1));return{'code':0xc8,'result':_0x1e4ad1};}catch(_0x26a7dd){return{'code':0xc8,'result':_0x6946('0x12c')};}};AGIVertices[_0x6946('0x12')]['gotoiftime']=function(_0x3a2780){logger[_0x6946('0x2e')](util['format'](_0x6946('0x12e'),_0x3a2780[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x3a2780[_0x6946('0x12f')])){return this['channel'][_0x6946('0x2c')](_0x3a2780,'no\x20interval\x20configured');}var _0x319251=this[_0x6946('0x24')][_0x6946('0x6e')](this,_0x3a2780['interval_id']);if(!_0x319251){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x3a2780,_0x6946('0x130'));}for(var _0x57a6b3=0x0;_0x57a6b3<_0x319251[_0x6946('0x95')];_0x57a6b3+=0x1){var _0x56e0bd=this['channel'][_0x6946('0xf')](util[_0x6946('0x28')](_0x6946('0x131'),_0x319251[_0x57a6b3]));if(_0x56e0bd[_0x6946('0xa2')]===-0x1){return _0x56e0bd;}logger[_0x6946('0x2e')](util[_0x6946('0x28')]('IFTIME\x20%s\x20%s',_0x319251[_0x57a6b3],_0x56e0bd['extra']));if(_0x56e0bd[_0x6946('0x9b')]==='true'){logger[_0x6946('0x2e')](util[_0x6946('0x28')]('IFTIME\x20%s\x20%s',_0x319251[_0x57a6b3],_0x6946('0x132')));this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x133'),_0x319251[_0x57a6b3],_0x6946('0x132')));return{'code':0xc8,'result':'true'};}else{logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x133'),_0x319251[_0x57a6b3],_0x6946('0x12c')));this[_0x6946('0x36')]['noop'](util[_0x6946('0x28')](_0x6946('0x133'),_0x319251[_0x57a6b3],'false'));}}return{'code':0xc8,'result':_0x6946('0x12c')};};AGIVertices[_0x6946('0x12')][_0x6946('0x134')]=function(_0x139902){logger['info'](util[_0x6946('0x28')]('Enter\x20in\x20HANGUP\x20(%s)\x20block',_0x139902[_0x6946('0x38')]));return this[_0x6946('0x36')][_0x6946('0x134')]();};AGIVertices[_0x6946('0x12')][_0x6946('0x135')]=function(_0x4fe6d4){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x136'),_0x4fe6d4['label']));if(!this[_0x6946('0x82')](_0x4fe6d4[_0x6946('0x7a')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xd8'));}var _0x774564=_0x6946('0x117');var _0x5736e9=util[_0x6946('0x28')](_0x6946('0x121'),FILES_PATH,rs[_0x6946('0x102')](0x4));var _0x439e85=util[_0x6946('0x28')](_0x6946('0x97'),_0x5736e9,_0x774564);var _0x154ab7=!![];if(_0x4fe6d4[_0x6946('0x118')]==='NOBEEP'){_0x154ab7=![];}var _0xc85843=this['channel'][_0x6946('0x122')](_0x5736e9,_0x774564,_0x4fe6d4[_0x6946('0x11a')],_0x4fe6d4[_0x6946('0x66')],undefined,_0x154ab7);if(_0xc85843[_0x6946('0xa2')]!==-0x1){this[_0x6946('0x36')][_0x6946('0xa8')](util['format'](_0x6946('0x137'),_0x439e85));var _0x4f438a=this[_0x6946('0x80')][_0x6946('0x6e')](this,_0x4fe6d4,_0x439e85);if(_0x4f438a){for(var _0x5e0a66 in _0x4f438a){if(_0x4f438a[_0x6946('0x93')](_0x5e0a66)){this[_0x6946('0x36')][_0x6946('0x99')](util[_0x6946('0x28')](_0x6946('0x138'),_0x5e0a66['toUpperCase']()),_0x4f438a[_0x5e0a66]);}}return this[_0x6946('0x36')]['noop'](util[_0x6946('0x28')](_0x6946('0x139'),JSON[_0x6946('0x73')](_0x4f438a)));}}return _0xc85843;};AGIVertices[_0x6946('0x12')][_0x6946('0x13a')]=function(_0x43118f){logger['info'](util['format'](_0x6946('0x13b'),_0x43118f[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x43118f['key'])){return this['channel'][_0x6946('0xa8')](_0x6946('0xd8'));}if(!this[_0x6946('0x82')](_0x43118f['text'])){return this['channel']['noop']('no\x20text\x20configured');}this['channel'][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x13c'),_0x43118f['text']));var _0x416e5f=this[_0x6946('0x7d')]['sync'](this,_0x43118f);if(_0x416e5f){this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x137'),_0x416e5f));var _0x4af08f=this[_0x6946('0x36')][_0x6946('0xeb')](_0x416e5f,_0x43118f[_0x6946('0x11a')]);try{fs[_0x6946('0xec')](_0x416e5f+_0x6946('0x10c'));}catch(_0x113d7e){logger[_0x6946('0x2c')](_0x113d7e);}return _0x4af08f;}return this[_0x6946('0x36')]['error'](_0x43118f,_0x6946('0x13d'));};AGIVertices['prototype'][_0x6946('0x13e')]=function(_0x14e2c4){logger['info'](util['format']('Enter\x20in\x20LOGIN\x20(%s)\x20block',_0x14e2c4['label']));if(!this['isConfigured'](_0x14e2c4[_0x6946('0x13f')])){return this['channel'][_0x6946('0x2c')](_0x14e2c4,'no\x20find\x20by\x20configured');}logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x140'),this['channel']['callerid'],_0x14e2c4[_0x6946('0x13f')]));var _0x405e93=this['agentLogin'][_0x6946('0x6e')](this,_0x14e2c4['findBy']);if(_0x405e93){logger[_0x6946('0x2e')](util[_0x6946('0x28')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x6946('0x36')][_0x6946('0x3b')],_0x14e2c4[_0x6946('0x13f')]));this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x141'),this[_0x6946('0x36')][_0x6946('0x3b')],_0x14e2c4['findBy']));return{'code':0xc8,'result':'success'};}else{logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x142'),this[_0x6946('0x36')]['callerid'],_0x14e2c4['findBy']));this[_0x6946('0x36')][_0x6946('0xa8')](util['format'](_0x6946('0x142'),this['channel']['callerid'],_0x14e2c4[_0x6946('0x13f')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x6946('0x12')][_0x6946('0x143')]=function(_0x1a0e73){logger[_0x6946('0x2e')](util['format'](_0x6946('0x144'),_0x1a0e73[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x1a0e73['findBy'])){return this['channel'][_0x6946('0x2c')](_0x1a0e73,'no\x20find\x20by\x20configured');}logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x140'),this[_0x6946('0x36')][_0x6946('0x3b')],_0x1a0e73['findBy']));var _0x1f128c=this[_0x6946('0x52')]['sync'](this,_0x1a0e73[_0x6946('0x13f')]);if(_0x1f128c){logger['info'](util[_0x6946('0x28')](_0x6946('0x141'),this[_0x6946('0x36')]['callerid'],_0x1a0e73[_0x6946('0x13f')]));this[_0x6946('0x36')]['noop'](util[_0x6946('0x28')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x6946('0x36')]['callerid'],_0x1a0e73[_0x6946('0x13f')]));return{'code':0xc8,'result':'success'};}else{logger['info'](util[_0x6946('0x28')](_0x6946('0x142'),this[_0x6946('0x36')]['callerid'],_0x1a0e73['findBy']));this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x142'),this['channel'][_0x6946('0x3b')],_0x1a0e73[_0x6946('0x13f')]));return{'code':0xc8,'result':_0x6946('0x145')};}};AGIVertices[_0x6946('0x12')][_0x6946('0x146')]=function(_0x483eb1){logger[_0x6946('0x2e')](util[_0x6946('0x28')]('Enter\x20in\x20MATH\x20(%s)\x20block',_0x483eb1['label']));if(!this[_0x6946('0x82')](_0x483eb1[_0x6946('0x147')])){return this['channel'][_0x6946('0x2c')](_0x483eb1,_0x6946('0x148'));}this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')]('math\x20%s',_0x483eb1[_0x6946('0x147')]));var _0x1bd03f=eval(_0x483eb1[_0x6946('0x147')]);if(!this[_0x6946('0x82')](_0x483eb1[_0x6946('0xca')])){return this['channel'][_0x6946('0xa8')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0xf72904=this['getVariable'][_0x6946('0x6e')](this,_0x483eb1[_0x6946('0xca')]);if(!_0xf72904){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x483eb1,'no\x20variable\x20found');}if(_[_0x6946('0x98')](_0x1bd03f)){var _0x441a73=this;_0x1bd03f[_0x6946('0xcd')](function(_0x369c64,_0x4a9461){_0x441a73['channel'][_0x6946('0x99')](util[_0x6946('0x28')]('%s[%s]',_0xf72904,_0x4a9461),_0x369c64);});return this[_0x6946('0x36')][_0x6946('0xa8')](util['format'](_0x6946('0x149'),_0xf72904));}else{return this[_0x6946('0x36')][_0x6946('0x99')](_0xf72904,_0x1bd03f);}};AGIVertices[_0x6946('0x12')][_0x6946('0x14a')]=function(_0x56f811){logger['info'](util['format'](_0x6946('0x14b'),_0x56f811[_0x6946('0x38')]));if(_0x56f811[_0x6946('0x9d')]===0x0){return this[_0x6946('0x9c')](_0x56f811);}_0x56f811['retry']-=0x1;if(!this[_0x6946('0x82')](_0x56f811['file_id'])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x56f811,_0x6946('0xfc'));}var _0x258af4=this[_0x6946('0x1f')][_0x6946('0x6e')](this,_0x56f811[_0x6946('0xfb')]);if(!_0x258af4){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x56f811,'no\x20file\x20audio\x20found');}var _0x3e54d3=this['channel'][_0x6946('0xfd')](_0x258af4,_0x56f811[_0x6946('0x14c')],_0x56f811['digit']);var _0x3235a1=_0x3e54d3['result'];if(_0x3e54d3[_0x6946('0xa2')]===-0x1){this['createSquareDetailsReport'][_0x6946('0x6e')](this,_0x56f811,'-1');return _0x3e54d3;}else if(_0x3e54d3[_0x6946('0x9b')]===_0x6946('0x66')){_0x3e54d3[_0x6946('0xa2')]=_0x3e54d3[_0x6946('0xa2')][_0x6946('0x95')]>0x0?_0x3e54d3[_0x6946('0xa2')]:'t';}else if(_['isEmpty'](_0x3e54d3[_0x6946('0xa2')])){_0x3e54d3['result']='#';_0x3235a1='#';}if(!this['isConfigured'](_0x56f811[_0x6946('0xca')])){this[_0x6946('0x36')]['noop']('no\x20variable\x20selected\x20for\x20the\x20result');}else{var _0x5db068=this['getVariable'][_0x6946('0x6e')](this,_0x56f811[_0x6946('0xca')]);if(!_0x5db068){return this['channel'][_0x6946('0x2c')](_0x56f811,_0x6946('0xcc'));}this[_0x6946('0x36')][_0x6946('0x99')](_0x5db068,_0x3235a1);}this[_0x6946('0x35')][_0x6946('0x6e')](this,_0x56f811,_0x3235a1);return _0x3e54d3;};AGIVertices['prototype']['noop']=function(_0x250af1){logger['info'](util[_0x6946('0x28')](_0x6946('0x14d'),_0x250af1[_0x6946('0x38')]));return this['channel'][_0x6946('0xa8')](_0x250af1[_0x6946('0x14e')]||_0x250af1['label']);};AGIVertices[_0x6946('0x12')][_0x6946('0x14f')]=function(_0x3e55f8){logger['info'](util[_0x6946('0x28')](_0x6946('0x150'),_0x3e55f8[_0x6946('0x38')]));if(!this['isConfigured'](_0x3e55f8[_0x6946('0x13f')])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x3e55f8,_0x6946('0x151'));}logger['info'](util['format'](_0x6946('0x140'),this[_0x6946('0x36')][_0x6946('0x3b')],_0x3e55f8[_0x6946('0x13f')]));var _0x4de960=this['getPause'][_0x6946('0x6e')](this,_0x3e55f8['pause_id']);var _0x1aa725=this[_0x6946('0x152')][_0x6946('0x6e')](this,_0x3e55f8[_0x6946('0x13f')],_0x4de960);if(_0x1aa725){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x141'),this[_0x6946('0x36')][_0x6946('0x3b')],_0x3e55f8['findBy']));this[_0x6946('0x36')][_0x6946('0xa8')](util['format'](_0x6946('0x141'),this[_0x6946('0x36')]['callerid'],_0x3e55f8[_0x6946('0x13f')]));return{'code':0xc8,'result':_0x6946('0x153')};}else{logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x142'),this['channel'][_0x6946('0x3b')],_0x3e55f8[_0x6946('0x13f')]));this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x141'),this[_0x6946('0x36')]['callerid'],_0x3e55f8[_0x6946('0x13f')]));return{'code':0xc8,'result':_0x6946('0x145')};}};AGIVertices[_0x6946('0x12')][_0x6946('0x154')]=function(_0x591006){logger[_0x6946('0x2e')](util[_0x6946('0x28')]('Enter\x20in\x20PLAYBACK\x20(%s)\x20block',_0x591006[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x591006['file_id'])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x591006,_0x6946('0xfc'));}var _0x357027=this[_0x6946('0x1f')][_0x6946('0x6e')](this,_0x591006[_0x6946('0xfb')]);if(!_0x357027){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x591006,'no\x20file\x20audio\x20found');}var _0x2b943c=this[_0x6946('0x36')]['exec'](_0x6946('0x155'),[_0x357027,_0x591006[_0x6946('0xf7')]]);if(_0x2b943c['result']===-0x1){return _0x2b943c;}return this[_0x6946('0x36')]['noop'](util[_0x6946('0x28')](_0x6946('0x156'),_0x6946('0x155'),_0x357027));};AGIVertices['prototype']['queue']=function(_0x29b425){logger['info'](util[_0x6946('0x28')](_0x6946('0x157'),_0x29b425['label']));if(!this[_0x6946('0x82')](_0x29b425['queue_id'])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x29b425,'no\x20queue\x20selected');}var _0x271cd5='';var _0x166cd5=parseInt(_0x29b425['queue_id'],0xa);if(isNaN(_0x166cd5)){_0x271cd5=_0x29b425[_0x6946('0x158')];}else{_0x271cd5=this[_0x6946('0x13')]['sync'](this,_0x29b425[_0x6946('0x158')]);if(!_0x271cd5){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x29b425,_0x6946('0x159'));}}var _0xe9835a='';if(this[_0x6946('0x82')](_0x29b425[_0x6946('0xfb')])){var _0x450e2f=this[_0x6946('0x1f')][_0x6946('0x6e')](this,_0x29b425[_0x6946('0xfb')]);if(_0x450e2f){_0xe9835a=_0x450e2f;}}this[_0x6946('0x35')][_0x6946('0x6e')](this,_0x29b425,_0x271cd5);if(_0x29b425['opts']['indexOf']('x')<0x0){_0x29b425[_0x6946('0xf7')]+='x';}if(_0x29b425[_0x6946('0xf7')][_0x6946('0x15a')]('X')<0x0){_0x29b425[_0x6946('0xf7')]+='X';}this[_0x6946('0x36')][_0x6946('0x99')](_0x6946('0x15b'),_0x271cd5?_0x271cd5[_0x6946('0x15c')]():'');var _0x178a1f=this[_0x6946('0x36')][_0x6946('0x58')]('QUEUE',[_0x271cd5,_0x29b425[_0x6946('0xf7')],_0x29b425[_0x6946('0x71')],_0xe9835a,_0x29b425[_0x6946('0x66')],_0x29b425[_0x6946('0x9')],_0x29b425[_0x6946('0x15d')],_0x29b425[_0x6946('0x15e')],'',_0x29b425[_0x6946('0x15f')]]);if(_0x178a1f['result']===-0x1){return _0x178a1f;}return this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x156'),_0x6946('0x160'),_0x271cd5));};AGIVertices[_0x6946('0x12')][_0x6946('0x161')]=function(_0x3b9202){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x162'),_0x3b9202[_0x6946('0x38')]));var _0x1310a4=_0x3b9202[_0x6946('0x163')]||_0x6946('0x117');var _0x20892e=util[_0x6946('0x28')](_0x6946('0x164'),this['channel'][_0x6946('0x37')],rs[_0x6946('0x102')](0x5));var _0x498a83=util['format'](_0x6946('0x165'),FILES_PATH,_0x20892e,_0x1310a4);var _0x482c0a=util['format']('%s/recordings/%s',FILES_PATH,_0x20892e);this['createSquareRecording']['sync'](this,_0x3b9202,_0x20892e,_0x498a83);this[_0x6946('0x36')][_0x6946('0x99')](_0x6946('0x166'),_0x20892e);logger[_0x6946('0x2e')]('Recording\x20%s\x20%s\x20%s\x20%s',_0x482c0a,_0x1310a4,_0x3b9202[_0x6946('0x167')],_0x3b9202[_0x6946('0x66')]);return this[_0x6946('0x36')][_0x6946('0x122')](_0x482c0a,_0x1310a4,_0x3b9202[_0x6946('0x167')],_0x3b9202['timeout'],undefined,!![]);};AGIVertices[_0x6946('0x12')][_0x6946('0x168')]=function(_0x47b9ef){logger['info'](util[_0x6946('0x28')](_0x6946('0x169'),_0x47b9ef[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x47b9ef[_0x6946('0x71')])){return this[_0x6946('0x36')][_0x6946('0xa8')]('no\x20url\x20configured');}var _0x5379f2=this['restAPI'][_0x6946('0x6e')](this,_0x47b9ef);logger[_0x6946('0x2e')](util[_0x6946('0x28')]('Response:',util[_0x6946('0x16a')](_0x5379f2,{'showHidden':![],'depth':null})));if(!this[_0x6946('0x82')](_0x47b9ef['variable_id'])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0x16b'));}var _0x5a3dec=this[_0x6946('0xf')][_0x6946('0x6e')](this,_0x47b9ef[_0x6946('0xca')]);if(!_0x5a3dec){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x47b9ef,'no\x20variable\x20found');}this['channel']['setVariable'](util[_0x6946('0x28')](_0x6946('0x16c'),_0x5a3dec),_0x5379f2['statusCode']?_0x5379f2[_0x6946('0x75')]:_0x6946('0x16d'));this[_0x6946('0x36')]['setVariable'](util[_0x6946('0x28')](_0x6946('0x16e'),_0x5a3dec),_0x5379f2[_0x6946('0x76')]?_0x5379f2[_0x6946('0x76')]:'OK');if(_0x5379f2['body']){try{this[_0x6946('0x96')](_0x5379f2[_0x6946('0x74')],_0x5a3dec);}catch(_0x2e6d7e){logger[_0x6946('0x2c')](util[_0x6946('0x28')](_0x6946('0x16f'),_0x5a3dec));}}return this[_0x6946('0x36')]['noop'](util['format']('variable\x20%s\x20set',_0x5a3dec));};AGIVertices['prototype'][_0x6946('0x170')]=function(_0x55ab46){logger['info'](util[_0x6946('0x28')](_0x6946('0x171'),_0x55ab46[_0x6946('0x38')]));return this[_0x6946('0x36')]['sayDigits'](_0x55ab46[_0x6946('0x172')][_0x6946('0x59')](/\s+/g,''),_0x55ab46[_0x6946('0x167')]);};AGIVertices['prototype'][_0x6946('0x173')]=function(_0x1def66){logger[_0x6946('0x2e')](util['format'](_0x6946('0x174'),_0x1def66[_0x6946('0x38')]));return this['channel'][_0x6946('0x175')](_0x1def66[_0x6946('0x65')][_0x6946('0x59')](/\s+/g,''),_0x1def66['escape_digits']);};AGIVertices[_0x6946('0x12')][_0x6946('0x176')]=function(_0x2524c4){logger[_0x6946('0x2e')](util[_0x6946('0x28')]('Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block',_0x2524c4[_0x6946('0x38')]));return this[_0x6946('0x36')][_0x6946('0x177')](_0x2524c4['text'],_0x2524c4[_0x6946('0x167')]);};AGIVertices['prototype'][_0x6946('0x178')]=function(_0x5984a5){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x179'),_0x5984a5['label']));if(!this['isConfigured'](_0x5984a5[_0x6946('0x17a')])){return this[_0x6946('0x36')]['noop']('no\x20mail\x20account\x20configured');}var _0x278690=this[_0x6946('0x17b')][_0x6946('0x6e')](this,_0x5984a5[_0x6946('0x17a')]);if(!_0x278690||!_0x278690[_0x6946('0x17c')]){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x5984a5,_0x6946('0x17d'));}var _0x4bbecd={'from':util[_0x6946('0x28')]('\x22%s\x22\x20<%s>',_0x278690[_0x6946('0x10')],_0x278690[_0x6946('0x17e')]||_0x278690[_0x6946('0x17c')]['user']),'to':_0x5984a5['to']||'','cc':_0x5984a5['cc']||'','bcc':_0x5984a5[_0x6946('0x17f')]||'','subject':_0x5984a5['subject'],'html':_0x5984a5[_0x6946('0x5d')],'text':_0x5984a5[_0x6946('0x5d')]};var _0x1df519={'tls':{'rejectUnauthorized':![]}};if(_0x278690['Smtp'][_0x6946('0x180')]){_0x1df519[_0x6946('0x180')]=_0x278690[_0x6946('0x17c')][_0x6946('0x180')];}else{_0x1df519['host']=_0x278690['Smtp'][_0x6946('0x181')];_0x1df519[_0x6946('0x182')]=_0x278690[_0x6946('0x17c')]['port'];_0x1df519[_0x6946('0x183')]=_0x278690[_0x6946('0x17c')][_0x6946('0x183')];}if(_0x278690[_0x6946('0x17c')][_0x6946('0x184')]){_0x1df519[_0x6946('0x185')]={'user':_0x278690[_0x6946('0x17c')]['user'],'pass':_0x278690[_0x6946('0x17c')][_0x6946('0x186')]};}if(this[_0x6946('0x82')](_0x5984a5['template_id'])){}logger[_0x6946('0xd2')](_0x6946('0x187'),JSON[_0x6946('0x73')](_0x4bbecd));this[_0x6946('0x35')][_0x6946('0x6e')](this,_0x5984a5,_0x5984a5[_0x6946('0x17a')]);this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x188'),_0x278690[_0x6946('0x10')]));this[_0x6946('0x23')][_0x6946('0x6e')](this,_0x1df519,_0x4bbecd);return this[_0x6946('0x36')]['noop'](_0x6946('0x189'));};AGIVertices[_0x6946('0x12')][_0x6946('0x18a')]=function(_0x3c5186){logger[_0x6946('0x2e')](util['format'](_0x6946('0x18b'),_0x3c5186[_0x6946('0x38')]));return this[_0x6946('0x36')]['noop'](_0x6946('0x18c'));};AGIVertices['prototype'][_0x6946('0x18d')]=function(_0x35a531){logger[_0x6946('0x2e')](util['format'](_0x6946('0x18e'),_0x35a531[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x35a531[_0x6946('0x18f')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0x190'));}var _0xe7fb92=this[_0x6946('0x191')][_0x6946('0x6e')](this,_0x35a531[_0x6946('0x18f')]);if(!_0xe7fb92){return this['channel'][_0x6946('0x2c')](_0x35a531,'no\x20sms\x20account\x20found');}var _0x44ab2b={'body':_0x35a531['sms_text'],'phone':_0x35a531['to']||'','SmsAccountId':_0xe7fb92['id']};logger[_0x6946('0xd2')](_0x6946('0x192'),JSON[_0x6946('0x73')](_0x44ab2b));this['createSquareDetailsReport']['sync'](this,_0x35a531,_0x35a531[_0x6946('0x18f')]);this[_0x6946('0x36')][_0x6946('0xa8')](util['format']('Trying\x20SendSMS\x20with\x20account\x20%s',_0xe7fb92[_0x6946('0x10')]));this['createSmsMessage']['sync'](this,_0x44ab2b);return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0x193'));};AGIVertices['prototype'][_0x6946('0x194')]=function(_0x5d46e1){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x195'),_0x5d46e1['label']));if(!this['isConfigured'](_0x5d46e1[_0x6946('0xca')])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x5d46e1,_0x6946('0x196'));}var _0x175708=this[_0x6946('0xf')][_0x6946('0x6e')](this,_0x5d46e1[_0x6946('0xca')]);if(!_0x175708){return this[_0x6946('0x36')]['error'](_0x5d46e1,_0x6946('0xcc'));}return this[_0x6946('0x36')][_0x6946('0x99')](_0x175708,_0x5d46e1[_0x6946('0x197')]);};AGIVertices[_0x6946('0x12')][_0x6946('0x198')]=function(_0x1c84ff){logger['info'](util[_0x6946('0x28')](_0x6946('0x199'),_0x1c84ff['label']));this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0x19a'));if(_0x1c84ff['answer']===_0x6946('0x19b')){this['channel'][_0x6946('0xa8')](_0x6946('0x19c'));return this[_0x6946('0x36')]['answer']();}return this[_0x6946('0x36')][_0x6946('0xa8')]('Skipped\x20Answer');};AGIVertices[_0x6946('0x12')]['subproject']=function(_0x157180){logger['info'](util['format'](_0x6946('0x19d'),_0x157180[_0x6946('0x38')]));if(!this['isConfigured'](_0x157180[_0x6946('0x19e')])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x157180,_0x6946('0x19f'));}var _0x2f09e3=this[_0x6946('0x16')][_0x6946('0x6e')](this,_0x157180[_0x6946('0x19e')]);if(!this[_0x6946('0x82')](_0x2f09e3)){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x157180,util['format']('no\x20subproject\x20found\x20with\x20id\x20%d',_0x157180[_0x6946('0x19e')]));}if(_0x2f09e3===this[_0x6946('0x36')]['arg_1']){return this['channel']['error'](_0x157180,_0x6946('0x1a0'));}this[_0x6946('0x35')][_0x6946('0x6e')](this,_0x157180,_0x2f09e3);var _0x15c359=this['channel'][_0x6946('0x58')]('AGI',util['format'](_0x6946('0x1a1'),config[_0x6946('0x9')][_0x6946('0x181')]||'127.0.0.1',_0x2f09e3,this[_0x6946('0x36')][_0x6946('0x39')]));if(_0x15c359[_0x6946('0xa2')]===-0x1){return _0x15c359;}return this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x156'),'AGI',_0x2f09e3));};AGIVertices[_0x6946('0x12')][_0x6946('0x1a2')]=function(_0x2ed01c){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x1a3'),_0x2ed01c[_0x6946('0x38')]));var _0x52f7a8=this[_0x6946('0x57')][_0x6946('0x6e')](this,_0x2ed01c[_0x6946('0x9f')]);this[_0x6946('0x35')]['sync'](this,_0x2ed01c,_0x2ed01c[_0x6946('0x9f')]);if(this[_0x6946('0x82')](_0x2ed01c[_0x6946('0xca')])){var _0x33fd52=this[_0x6946('0xf')][_0x6946('0x6e')](this,_0x2ed01c[_0x6946('0xca')]);if(_0x33fd52){this[_0x6946('0x36')][_0x6946('0x99')](_0x33fd52,_0x52f7a8);return this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')]('sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s',_0x2ed01c[_0x6946('0x9f')],_0x33fd52));}}return this['channel'][_0x6946('0xa8')](util['format'](_0x6946('0x1a4'),_0x2ed01c['command']));};AGIVertices[_0x6946('0x12')][_0x6946('0x1a5')]=function(_0x1c2f74){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x1a6'),_0x1c2f74[_0x6946('0x38')]));if(!this['isConfigured'](_0x1c2f74[_0x6946('0x5b')])){return this[_0x6946('0x36')][_0x6946('0xa8')]('no\x20apiKey\x20configured');}if(!this['isConfigured'](_0x1c2f74[_0x6946('0x5d')])){return this[_0x6946('0x36')][_0x6946('0xa8')](_0x6946('0xae'));}this['channel'][_0x6946('0xa8')](util[_0x6946('0x28')]('Trying\x20Google\x20Cloud\x20TTS\x20%s',_0x1c2f74[_0x6946('0x5d')]));var _0x50fa69=this[_0x6946('0x5a')][_0x6946('0x6e')](this,_0x1c2f74);if(_0x50fa69){this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x1a7'),_0x50fa69));var _0x33d9e=this[_0x6946('0x36')][_0x6946('0xeb')](_0x50fa69);try{fs[_0x6946('0xec')](_0x50fa69+_0x6946('0x10c'));}catch(_0x481b9a){logger[_0x6946('0x2c')](_0x481b9a);}return _0x33d9e;}return this[_0x6946('0x36')]['error'](_0x1c2f74,_0x6946('0x1a8'));};AGIVertices[_0x6946('0x12')][_0x6946('0x1a9')]=function(_0x55150c){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x1aa'),_0x55150c[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x55150c[_0x6946('0x5d')])){return this['channel']['noop'](_0x6946('0xae'));}this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x1ab'),_0x55150c['text']));var _0xad7407=this[_0x6946('0x64')]['sync'](this,_0x55150c);if(_0xad7407){this['channel'][_0x6946('0xa8')](util['format'](_0x6946('0x1ac'),_0xad7407));var _0x66acfd=this['channel'][_0x6946('0xeb')](_0xad7407);try{fs['unlink'](_0xad7407+_0x6946('0x10c'));}catch(_0x4b938d){logger['error'](_0x4b938d);}return _0x66acfd;}return this[_0x6946('0x36')][_0x6946('0x2c')](_0x55150c,'Google\x20TTS\x20is\x20unreachable');};AGIVertices[_0x6946('0x12')][_0x6946('0x1ad')]=function(_0x34989e){logger['info'](util[_0x6946('0x28')](_0x6946('0x1ae'),_0x34989e[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x34989e[_0x6946('0x13f')])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x34989e,_0x6946('0x151'));}logger['info'](util[_0x6946('0x28')](_0x6946('0x140'),this[_0x6946('0x36')][_0x6946('0x3b')],_0x34989e[_0x6946('0x13f')]));var _0x466753=this['agentUnpause']['sync'](this,_0x34989e[_0x6946('0x13f')]);if(_0x466753){logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x141'),this[_0x6946('0x36')][_0x6946('0x3b')],_0x34989e['findBy']));this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')](_0x6946('0x141'),this[_0x6946('0x36')]['callerid'],_0x34989e['findBy']));return{'code':0xc8,'result':_0x6946('0x153')};}else{logger[_0x6946('0x2e')](util[_0x6946('0x28')](_0x6946('0x142'),this['channel'][_0x6946('0x3b')],_0x34989e['findBy']));this[_0x6946('0x36')][_0x6946('0xa8')](util['format'](_0x6946('0x142'),this[_0x6946('0x36')][_0x6946('0x3b')],_0x34989e[_0x6946('0x13f')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x6946('0x12')][_0x6946('0x1af')]=function(_0x5262e8){logger['info'](util[_0x6946('0x28')](_0x6946('0x1b0'),_0x5262e8['label']));var _0xc207e3=this['channel'][_0x6946('0x58')]('VOICEMAIL',[_0x5262e8[_0x6946('0x1b1')],_0x5262e8['options']]);if(_0xc207e3['result']===-0x1){return _0xc207e3;}return this[_0x6946('0x36')][_0x6946('0xa8')](util[_0x6946('0x28')]('Executed\x20command\x20%s\x20%s',_0x6946('0x1b2'),_0x5262e8['mailbox']));};AGIVertices[_0x6946('0x12')]['vswitch']=function(_0x1f830b){logger[_0x6946('0x2e')](util['format'](_0x6946('0x1b3'),_0x1f830b[_0x6946('0x38')]));if(!this[_0x6946('0x82')](_0x1f830b['variable_id'])){return this[_0x6946('0x36')][_0x6946('0x2c')](_0x1f830b,'no\x20variable\x20selected');}var _0x3a5ede=this['getVariable'][_0x6946('0x6e')](this,_0x1f830b[_0x6946('0xca')]);if(!_0x3a5ede){return this[_0x6946('0x36')]['error'](_0x1f830b,_0x6946('0xcc'));}var _0x493d2f=this['channel'][_0x6946('0xf')](_0x3a5ede);return{'code':0xc8,'result':_0x493d2f[_0x6946('0x9b')]?_0x493d2f[_0x6946('0x9b')]:'-'};};String[_0x6946('0x12')][_0x6946('0x1b4')]=function(_0x253a54,_0x243e12){return this[_0x6946('0x9a')](_0x253a54)[_0x6946('0x1b5')](_0x243e12);};module[_0x6946('0x1b6')]=AGIVertices;