Built motion from commit 06eb8eb0.|2.6.31
[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 _0x2b83=['127.0.0.1','AGI','Enter\x20in\x20SYSTEM\x20(%s)\x20block','shellCommand','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','sh\x20command:\x20%s\x20result\x20no\x20stored','google_cloud_tts','Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block','no\x20apiKey\x20configured','Google\x20Cloud\x20TTS\x20is\x20unreachable','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','unpause','failure','voicemail','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','lodash','shelljs','randomstring','moment','mustache','agi','../../config/environment','/var/opt/motion2/server/files','rawBody','menu','getdigits','getsecretdigits','mailRpc','getVariable','rpc','then','getVoiceQueue','getVoiceQueueById','name','catch','getSquareOdbcById','dsn','prototype','getUser','getTrunk','getTrunkById','getSound','getSoundById','getSoundPath','save_name','getMailAccountById','sendMailMessage','getIntervals','getIntervalById','IntervalId','interval','map','Intervals','format','%s/sounds/converted/%s','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','close','error','createSmsMessage','createSquareDetailsReport','channel','label','agicommand','callerid','createSquareRecording','uniqueid','calleridname','context','priority','accountcode','arg_1','file','createSquareMessage','createCmContact','isEmpty','callback_','random','lastName','isNil','phone','list_id','Callback\x20scheduled\x20at\x20','scheduledAt','toString','callback_priority','agentPause','agentUnpause','agentLogout','agent','agentLogin','internal','%s/%s@from-sip/n','LOCAL','trim','replace','googleCloudTTS','apiKey','text','languageCode','en-US','ssmlGender','MALE','audioEncoding','MP3','googleTTS','google_tts_language','restAPI','method','timeout','POST','toUpperCase','body','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','rawHeaders','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','sync','url','render','stringify','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','statusMessage','message','500\x20-\x20Internal\x20Server\x20Error','options','googleDialogflow','key','client_email','dialogflowV2_language','sestekNDA','ispeechTTS','ispeech_tts_language','speed','ispeechASR','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region','Amy','aws_text_type','aws_lex_region','aws_bot_name','google_asr_language','tildeASR','appid','appsecret','uri','clear','clone','hasOwnProperty','isString','includes','replaceAllVariables','recursiveNodeIndex','isPlainObject','saveRestApiResult','%s.%s','isArray','setVariable','replaceObjectAllVariables','split','length','replaceAll','extra','getAndSetVariable','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','maxRetry','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','no\x20text\x20configured','MRCPSynth','noop','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','grammar','no\x20grammar\x20configured','exec','MRCPRecog','MRCP_RECOG_CONFIDENCE','MRCP_RECOG_TRANSCRIPT','MRCP_RECOG_INSTANCE','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','wait','callback','delay','add','minutes','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','Executed\x20command\x20%s\x20%s','lumenvoxtts','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','lumenvoxasr','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','RECOG_CONFIDENCE()','LUMENVOX_ASR_TRANSCRIPT','RECOG_INSTANCE()','LUMENVOX_ASR_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','sestekasr','SESTEK_ASR_TRANSCRIPT','SESTEK_ASR_INSTANCE','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20database\x20selected','getSquareOdbc','query:\x20%s','getQueryOdbc','no\x20variable\x20selected\x20for\x20the\x20result','variable_id','forEach','keys','%s[%s][%s]','%s_ROWS_COUNT','variable\x20%s\x20set','debug','Enter\x20in\x20DIAL\x20(%s)\x20block','no\x20user\x20found','DIAL','SIP/%s','opts','Executed\x20command\x20%s','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','no\x20key\x20configured','bot','DIALOGFLOW_%s','speech','out','dialogflow','Dialogflow\x20Result\x20%s','dialogflowV2','Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block','dialogflowV2_project_id','no\x20project_id\x20configured','no\x20client_email\x20configured','private_key','no\x20private_key\x20configured','googleDialogflowV2','providerResponse','DialogflowV2\x20is\x20unreachable','sesteknda','ndauth_url','no\x20ndauth\x20url\x20configured','username','no\x20username\x20configured','password','no\x20password\x20configured','ndassistant_url','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','audiofile','.wav','Enter\x20in\x20END\x20(%s)\x20block','end','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','trunk_name','SIP/%s/%s','finally','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','retry','file_id','no\x20file\x20audio\x20found','getData','response','maxdigit','test','mindigit','no\x20variable\x20found','hiddendigitsnum','generate','hiddendigitspos','first','substr','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','awspolly','aws\x20Polly\x20%s\x20file\x20created','streamFile','unlink','awslex','no\x20valid\x20credentials\x20configured','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','awsLex','AWS_LEX_%s','Amazon\x20Lex\x20ready\x20for\x20fulfillment','amazonlex','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','wav','%s/recordings/%s','beep','intKey','googleASR','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','Enter\x20in\x20TILDEASR\x20(%s)\x20block','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','extension','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','no\x20condition\x20configured','true','false','gotoiftime','no\x20interval\x20configured','interval_id','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','NOBEEP','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','no\x20find\x20by\x20configured','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','success','math','Enter\x20in\x20MATH\x20(%s)\x20block','operation','no\x20operation\x20configured','math\x20%s','Enter\x20in\x20MENU\x20(%s)\x20block','no\x20file\x20audio\x20selected','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause','pause_id','playback','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20selected','no\x20queue\x20found','indexOf','XMCS-QUEUE','macro','gosub','position','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','%s/recordings/%s.%s','RECORDING_SAVENAME','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','recordFile','restapi','no\x20url\x20configured','Response:','%s_STATUS_MESSAGE','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','number','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','getMailAccount','Smtp','no\x20mail\x20account\x20found','email','bcc','subject','template_id','sendMail\x20message','smtpOptions','Enter\x20in\x20SENDFAX\x20(%s)\x20block','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20configured','getSmsAccount','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','start','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','yes','Skipped\x20Answer','subproject','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'];(function(_0x16f19f,_0x21af7d){var _0x2ac7fb=function(_0x24298c){while(--_0x24298c){_0x16f19f['push'](_0x16f19f['shift']());}};_0x2ac7fb(++_0x21af7d);}(_0x2b83,0x1d3));var _0x32b8=function(_0xad6193,_0x2cc8b5){_0xad6193=_0xad6193-0x0;var _0x47735e=_0x2b83[_0xad6193];return _0x47735e;};'use strict';var fs=require('fs');var util=require('util');var _=require(_0x32b8('0x0'));var sh=require(_0x32b8('0x1'));var odbc=require('odbc')();var rs=require(_0x32b8('0x2'));var moment=require(_0x32b8('0x3'));var Mustache=require(_0x32b8('0x4'));var rp=require('request-promise');var logger=require('../../config/logger')(_0x32b8('0x5'));var config=require(_0x32b8('0x6'));var scripts=require('./scripts');var FILES_PATH=_0x32b8('0x7');var recursiveMapAttributes=['rawHeaders',_0x32b8('0x8')];var verticesWithRetry=[_0x32b8('0x9'),_0x32b8('0xa'),_0x32b8('0xb')];var AGIVertices=function(_0x5cc6b2,_0x46be90,_0x2c9e57){this['channel']=_0x5cc6b2;this['rpc']=_0x46be90;this[_0x32b8('0xc')]=_0x2c9e57;};AGIVertices['prototype'][_0x32b8('0xd')]=function(_0x31b795,_0x465672){this[_0x32b8('0xe')]['getVariableById'](_0x31b795)[_0x32b8('0xf')](function(_0x3b6bc6){_0x465672(null,_0x3b6bc6?_0x3b6bc6['name']:![]);})['catch'](function(_0x30d00a){_0x465672(_0x30d00a);});};AGIVertices['prototype'][_0x32b8('0x10')]=function(_0x4b838f,_0x37aa93){this[_0x32b8('0xe')][_0x32b8('0x11')](_0x4b838f)[_0x32b8('0xf')](function(_0x2645b0){_0x37aa93(null,_0x2645b0?_0x2645b0['name']:![]);})['catch'](function(_0x5e7b4f){_0x37aa93(_0x5e7b4f);});};AGIVertices['prototype']['getSquareProject']=function(_0x576593,_0x834da1){this['rpc']['getSquareProjectById'](_0x576593)[_0x32b8('0xf')](function(_0x2ce0ea){_0x834da1(null,_0x2ce0ea?_0x2ce0ea[_0x32b8('0x12')]:![]);})[_0x32b8('0x13')](function(_0x599bc3){_0x834da1(_0x599bc3);});};AGIVertices['prototype']['getSquareOdbc']=function(_0x38f02b,_0x2ffea2){this[_0x32b8('0xe')][_0x32b8('0x14')](_0x38f02b)['then'](function(_0x34cf64){_0x2ffea2(null,_0x34cf64?_0x34cf64[_0x32b8('0x15')]:![]);})[_0x32b8('0x13')](function(_0x39a4f1){_0x2ffea2(_0x39a4f1);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x17')]=function(_0x222c77,_0xcd4b26){this['rpc']['getUserById'](_0x222c77)[_0x32b8('0xf')](function(_0x4c7471){_0xcd4b26(null,_0x4c7471?_0x4c7471[_0x32b8('0x12')]:![]);})['catch'](function(_0x1a4c2b){_0xcd4b26(_0x1a4c2b);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x18')]=function(_0x189c4a,_0x2df3dc){this['rpc'][_0x32b8('0x19')](_0x189c4a)[_0x32b8('0xf')](function(_0x3eea54){_0x2df3dc(null,_0x3eea54?_0x3eea54[_0x32b8('0x12')]:![]);})[_0x32b8('0x13')](function(_0x29988d){_0x2df3dc(_0x29988d);});};AGIVertices['prototype'][_0x32b8('0x1a')]=function(_0x15a8bf,_0x3b0049){var _0x3e1598=this;this[_0x32b8('0xe')][_0x32b8('0x1b')](_0x15a8bf)[_0x32b8('0xf')](function(_0x39ce15){_0x3b0049(null,_0x39ce15?_0x3e1598[_0x32b8('0x1c')](_0x39ce15[_0x32b8('0x1d')]):![]);})[_0x32b8('0x13')](function(_0x2bc3ce){_0x3b0049(_0x2bc3ce);});};AGIVertices[_0x32b8('0x16')]['getMailAccount']=function(_0x424721,_0x21c9fb){this[_0x32b8('0xe')][_0x32b8('0x1e')](_0x424721)[_0x32b8('0xf')](function(_0x1d83a5){_0x21c9fb(null,_0x1d83a5?_0x1d83a5:![]);})[_0x32b8('0x13')](function(_0x28ed75){_0x21c9fb(_0x28ed75);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x1f')]=function(_0x521bf4,_0x1833af,_0x3c1122){this[_0x32b8('0xc')][_0x32b8('0x1f')](_0x521bf4,_0x1833af)['then'](function(){_0x3c1122(null);})['catch'](function(_0x287a6b){_0x3c1122(_0x287a6b);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x20')]=function(_0x12ff7d,_0x523736){this[_0x32b8('0xe')][_0x32b8('0x21')](_0x12ff7d)[_0x32b8('0xf')](function(_0x42e9bc){if(_0x42e9bc){if(_0x42e9bc[_0x32b8('0x22')]){_0x523736(null,[_0x42e9bc[_0x32b8('0x23')]]);}else{_0x523736(null,_[_0x32b8('0x24')](_0x42e9bc[_0x32b8('0x25')],'interval'));}}else{_0x523736(null,![]);}})[_0x32b8('0x13')](function(_0x5e8af2){_0x523736(_0x5e8af2);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x1c')]=function(_0xcf7b7){return util[_0x32b8('0x26')](_0x32b8('0x27'),FILES_PATH,_0xcf7b7);};AGIVertices[_0x32b8('0x16')]['getQueryOdbc']=function(_0x152209,_0x22ed5a,_0x7e13a9){odbc['open'](_0x152209,function(_0x470653){if(_0x470653){logger['error'](_0x32b8('0x28'),_0x470653);_0x7e13a9(_0x470653);}else{logger[_0x32b8('0x29')](_0x32b8('0x2a'));odbc[_0x32b8('0x2b')](_0x22ed5a,function(_0x5e7b75,_0x140cce){if(_0x5e7b75){logger[_0x32b8('0x29')](_0x32b8('0x2c'),_0x22ed5a);_0x7e13a9(_0x5e7b75);}else{logger['info']('Query\x20executed\x20correctly\x20%s',_0x22ed5a);odbc[_0x32b8('0x2d')](function(_0x385e5d){if(_0x385e5d){logger[_0x32b8('0x2e')]('Error\x20closing\x20connection\x20to\x20odbc\x20%s',_0x385e5d);}_0x7e13a9(null,_0x140cce);});}});}});};AGIVertices['prototype']['getSmsAccount']=function(_0x1aa6ef,_0x1dff0e){this[_0x32b8('0xe')]['getSmsAccountById'](_0x1aa6ef)[_0x32b8('0xf')](function(_0x14c109){_0x1dff0e(null,_0x14c109?_0x14c109:![]);})[_0x32b8('0x13')](function(_0x273d5f){_0x1dff0e(_0x273d5f);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x2f')]=function(_0x8dd996,_0x24bdaf){this['rpc'][_0x32b8('0x2f')](_0x8dd996)['then'](function(_0x5c0416){_0x24bdaf(null,_0x5c0416);})['catch'](function(_0x5eb159){_0x24bdaf(_0x5eb159);});};AGIVertices[_0x32b8('0x16')]['createSquareDetailsReport']=function(_0x2a3968,_0x52709b,_0x5bd1de){this[_0x32b8('0xe')][_0x32b8('0x30')]({'uniqueid':this[_0x32b8('0x31')]['uniqueid'],'node':_0x2a3968[_0x32b8('0x32')],'application':_0x2a3968[_0x32b8('0x33')],'data':_0x52709b||null,'project_name':this[_0x32b8('0x31')]['arg_1'],'callerid':this['channel'][_0x32b8('0x34')]})['then'](function(_0xb7406c){if(_0x5bd1de){_0x5bd1de(null,_0xb7406c);}})['catch'](function(_0x25957b){if(_0x5bd1de){_0x5bd1de(_0x25957b);}});};AGIVertices['prototype'][_0x32b8('0x35')]=function(_0x43b294,_0x155ed6,_0x17791d,_0x47eea4){this['rpc'][_0x32b8('0x35')]({'uniqueid':this[_0x32b8('0x31')][_0x32b8('0x36')],'callerid':this['channel']['callerid'],'calleridname':this[_0x32b8('0x31')][_0x32b8('0x37')],'context':this['channel'][_0x32b8('0x38')],'extension':this['channel']['extension'],'priority':this['channel'][_0x32b8('0x39')],'accountcode':this[_0x32b8('0x31')][_0x32b8('0x3a')],'dnid':this[_0x32b8('0x31')]['dnid'],'projectName':this[_0x32b8('0x31')][_0x32b8('0x3b')],'saveName':_0x155ed6,'filename':_0x43b294[_0x32b8('0x3c')]||_0x155ed6,'savePath':_0x17791d})[_0x32b8('0xf')](function(_0x1a5bd4){_0x47eea4(null,_0x1a5bd4);})[_0x32b8('0x13')](function(_0x25a2a8){_0x47eea4(_0x25a2a8);});};AGIVertices['prototype'][_0x32b8('0x3d')]=function(_0xf99c9d,_0x2eee28,_0x17d6bb,_0x13f936,_0x2726bf){this[_0x32b8('0xe')][_0x32b8('0x3d')]({'uniqueid':this[_0x32b8('0x31')]['uniqueid'],'body':_0xf99c9d,'direction':_0x2eee28,'providerName':_0x17d6bb,'providerResponse':_0x13f936})['then'](function(_0x4032f1){if(_0x2726bf){_0x2726bf(null,_0x4032f1);}})[_0x32b8('0x13')](function(_0x3694dc){if(_0x2726bf){_0x2726bf(_0x3694dc);}});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x3e')]=function(_0x17c46a,_0x4f7c6f){this[_0x32b8('0xe')][_0x32b8('0x3e')]({'firstName':_[_0x32b8('0x3f')](_0x17c46a[_0x32b8('0x12')])||_['isNil'](_0x17c46a[_0x32b8('0x12')])?_0x32b8('0x40')+Math[_0x32b8('0x41')]():_0x17c46a['name'],'lastName':_[_0x32b8('0x3f')](_0x17c46a[_0x32b8('0x42')])||_[_0x32b8('0x43')](_0x17c46a[_0x32b8('0x42')])?null:_0x17c46a[_0x32b8('0x42')],'phone':_0x17c46a[_0x32b8('0x44')],'ListId':_0x17c46a[_0x32b8('0x45')],'scheduledat':_0x17c46a['scheduledAt'],'callbackUniqueid':this[_0x32b8('0x31')]['uniqueid'],'tags':'callback','description':_0x32b8('0x46')+_0x17c46a[_0x32b8('0x47')][_0x32b8('0x48')](),'priority':_0x17c46a[_0x32b8('0x49')]})[_0x32b8('0xf')](function(_0x5e3e6f){_0x4f7c6f(null,_0x5e3e6f);})[_0x32b8('0x13')](function(_0x3b9694){_0x4f7c6f(_0x3b9694);});};AGIVertices[_0x32b8('0x16')]['getPause']=function(_0x1dbe22,_0x2e41ee){this[_0x32b8('0xe')]['getPauseById'](_0x1dbe22)[_0x32b8('0xf')](function(_0x531b62){_0x2e41ee(null,_0x531b62?_0x531b62[_0x32b8('0x12')]:![]);})[_0x32b8('0x13')](function(_0x40e1dd){_0x2e41ee(_0x40e1dd);});};AGIVertices[_0x32b8('0x16')]['agentPause']=function(_0xa39ab2,_0x567733,_0x7b4b88){var _0x5a6b2c={'role':'agent'};_0x5a6b2c[_0xa39ab2]=this['channel'][_0x32b8('0x34')];this[_0x32b8('0xe')][_0x32b8('0x4a')](_0x5a6b2c,_0x567733,this[_0x32b8('0x31')]['uniqueid'])[_0x32b8('0xf')](function(_0x391244){_0x7b4b88(null,_[_0x32b8('0x43')](_0x391244)?![]:!![]);})[_0x32b8('0x13')](function(_0x5077e4){logger[_0x32b8('0x2e')](_0x5077e4);_0x7b4b88(null,![]);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x4b')]=function(_0x43003e,_0x43c677){var _0x5fdb5a={'role':'agent'};_0x5fdb5a[_0x43003e]=this[_0x32b8('0x31')]['callerid'];this['rpc'][_0x32b8('0x4b')](_0x5fdb5a)[_0x32b8('0xf')](function(_0x216faf){_0x43c677(null,_['isNil'](_0x216faf)?![]:!![]);})[_0x32b8('0x13')](function(_0x1d2c07){logger[_0x32b8('0x2e')](_0x1d2c07);_0x43c677(null,![]);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x4c')]=function(_0x58fc0a,_0x1d6d52){var _0x8fddf8={'role':_0x32b8('0x4d')};_0x8fddf8[_0x58fc0a]=this['channel'][_0x32b8('0x34')];this[_0x32b8('0xe')]['agentLogout'](_0x8fddf8)[_0x32b8('0xf')](function(_0x9b7424){_0x1d6d52(null,_[_0x32b8('0x43')](_0x9b7424)?![]:!![]);})[_0x32b8('0x13')](function(_0x4118ac){logger[_0x32b8('0x2e')](_0x4118ac);_0x1d6d52(null,![]);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x4e')]=function(_0x2b5963,_0x532664){var _0x1add74={'role':_0x32b8('0x4d')};_0x1add74[_0x2b5963]=this['channel'][_0x32b8('0x34')];var _0x527986=_0x2b5963!=_0x32b8('0x4f')?util[_0x32b8('0x26')](_0x32b8('0x50'),_0x32b8('0x51'),this[_0x32b8('0x31')][_0x32b8('0x34')]):undefined;this[_0x32b8('0xe')][_0x32b8('0x4e')](_0x1add74,_0x527986)['then'](function(_0x4f745d){_0x532664(null,_[_0x32b8('0x43')](_0x4f745d)?![]:!![]);})['catch'](function(_0x195b37){logger[_0x32b8('0x2e')](_0x195b37);_0x532664(null,![]);});};AGIVertices[_0x32b8('0x16')]['shellCommand']=function(_0x17a175,_0x21c969){sh['exec'](_[_0x32b8('0x52')](_0x17a175),function(_0x4f4d5c,_0xeb73b8){var _0x308ebd=_0xeb73b8[_0x32b8('0x53')](/(\r\n|\n|\r)/gm,'');_0x21c969(null,_0x308ebd);});};AGIVertices[_0x32b8('0x16')]['googleCloudTTS']=function(_0x374be5,_0x58a585){scripts[_0x32b8('0x54')](_0x374be5[_0x32b8('0x55')],_0x374be5['google_cloud_tts_text_type']||'text',_0x374be5[_0x32b8('0x56')],_0x374be5[_0x32b8('0x57')]||_0x32b8('0x58'),_0x374be5[_0x32b8('0x59')]||_0x32b8('0x5a'),_0x374be5[_0x32b8('0x5b')]||_0x32b8('0x5c'))['then'](function(_0x1c7bd3){_0x58a585(null,_0x1c7bd3);})['catch'](function(_0x16bb7b){_0x58a585(_0x16bb7b);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x5d')]=function(_0x5655ae,_0x4d3044){scripts[_0x32b8('0x5d')](_0x5655ae[_0x32b8('0x56')],_0x5655ae[_0x32b8('0x5e')]||'en',0x1)[_0x32b8('0xf')](function(_0x504530){_0x4d3044(null,_0x504530);})[_0x32b8('0x13')](function(_0xcc2677){_0x4d3044(_0xcc2677);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x5f')]=function(_0x4c84b0,_0x570c4c){var _0x3a389={'uri':_0x4c84b0['url'],'method':_0x4c84b0[_0x32b8('0x60')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x4c84b0[_0x32b8('0x61')])==='number'&&parseInt(_0x4c84b0[_0x32b8('0x61')])>=0x1?parseInt(_0x4c84b0[_0x32b8('0x61')])*0x3e8:0x5*0x3e8};if(_['includes']([_0x32b8('0x62'),'PUT'],_0x3a389[_0x32b8('0x60')][_0x32b8('0x63')]())){try{_0x3a389[_0x32b8('0x64')]=_0x4c84b0[_0x32b8('0x8')]?JSON[_0x32b8('0x65')](_0x4c84b0['rawBody']):{};}catch(_0x245785){logger[_0x32b8('0x2e')](_0x32b8('0x66'),_0x245785);}}try{_0x3a389[_0x32b8('0x67')]=_0x4c84b0[_0x32b8('0x68')]?JSON[_0x32b8('0x65')](_0x4c84b0[_0x32b8('0x68')]):{};}catch(_0x17f806){logger['error'](_0x32b8('0x69'),_0x17f806);}if(_0x4c84b0['computedVariables']){try{var _0x238c22=require(_0x4c84b0['computedVariables'])[_0x32b8('0x6a')](this,_0x3a389);_0x3a389['uri']=Mustache['render'](_0x4c84b0[_0x32b8('0x6b')],_0x238c22,{},['$$','$$']);if(_0x3a389[_0x32b8('0x67')]){_0x3a389['headers']=JSON[_0x32b8('0x65')](Mustache[_0x32b8('0x6c')](JSON[_0x32b8('0x6d')](_0x3a389[_0x32b8('0x67')]),_0x238c22,{},['$$','$$']));}if(_0x3a389['body']){_0x3a389[_0x32b8('0x64')]=JSON[_0x32b8('0x65')](Mustache['render'](JSON[_0x32b8('0x6d')](_0x3a389['body']),_0x238c22,{},['$$','$$']));}}catch(_0x3f4034){logger[_0x32b8('0x2e')](_0x32b8('0x6e'),_0x3f4034);}}rp(_0x3a389)[_0x32b8('0xf')](function(_0x39ee79){var _0x311055={'statusCode':_0x39ee79[_0x32b8('0x6f')]||0xc8,'statusMessage':_0x39ee79[_0x32b8('0x70')]||'OK','headers':_0x39ee79[_0x32b8('0x67')]||{},'body':_0x39ee79['body']||{}};_0x570c4c(null,_0x311055);})[_0x32b8('0x13')](function(_0x1f8918){var _0x2b08fd={'statusCode':_0x1f8918[_0x32b8('0x6f')]||0x1f4,'statusMessage':_0x1f8918[_0x32b8('0x71')]||_0x32b8('0x72'),'headers':_0x1f8918[_0x32b8('0x73')][_0x32b8('0x67')]||{},'body':_0x1f8918[_0x32b8('0x73')][_0x32b8('0x64')]||{}};_0x570c4c(null,_0x2b08fd);});};AGIVertices[_0x32b8('0x16')]['googleDialogflow']=function(_0x56e39c,_0x534990){scripts[_0x32b8('0x74')](this['channel'][_0x32b8('0x36')],_0x56e39c[_0x32b8('0x75')],_0x56e39c[_0x32b8('0x56')],_0x56e39c['dialogflow_language']||'en')[_0x32b8('0xf')](function(_0x235ebc){_0x534990(null,_0x235ebc);})['catch'](function(_0x2a5cb0){_0x534990(_0x2a5cb0);});};AGIVertices['prototype']['googleDialogflowV2']=function(_0x4d78ae,_0x543331){scripts['googleDialogflowV2'](this['channel'][_0x32b8('0x36')],_0x4d78ae['dialogflowV2_project_id'],_0x4d78ae[_0x32b8('0x76')],_0x4d78ae['private_key'],_0x4d78ae[_0x32b8('0x56')],_0x4d78ae[_0x32b8('0x77')]||'en')[_0x32b8('0xf')](function(_0x2524a5){_0x543331(null,_0x2524a5);})[_0x32b8('0x13')](function(_0x3eaa5b){_0x543331(_0x3eaa5b);});};AGIVertices['prototype']['sestekNDA']=function(_0x435b12,_0x25835f){scripts[_0x32b8('0x78')](this[_0x32b8('0x31')],_0x435b12)['then'](function(_0x4a4784){_0x25835f(null,_0x4a4784);})['catch'](function(_0x2a74f9){_0x25835f(_0x2a74f9);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x79')]=function(_0x4cc70b,_0x68be4a){scripts['ispeechTTS'](_0x4cc70b[_0x32b8('0x75')],_0x4cc70b[_0x32b8('0x56')],_0x4cc70b[_0x32b8('0x7a')]||_0x32b8('0x58'),_0x4cc70b[_0x32b8('0x7b')])['then'](function(_0x2b1e0f){_0x68be4a(null,_0x2b1e0f);})[_0x32b8('0x13')](function(_0x34738b){_0x68be4a(_0x34738b);});};AGIVertices['prototype']['ispeechASR']=function(_0x34b5c9,_0x49112b,_0x407889){scripts[_0x32b8('0x7c')](_0x49112b,_0x34b5c9[_0x32b8('0x75')],_0x34b5c9['ispeech_asr_language']||_0x32b8('0x58'),this[_0x32b8('0x7d')](_0x34b5c9[_0x32b8('0x7e')])?_0x34b5c9['model']:undefined)[_0x32b8('0xf')](function(_0x37dc1e){_0x407889(null,_0x37dc1e);})['catch'](function(_0x4d1606){_0x407889(_0x4d1606);});};AGIVertices[_0x32b8('0x16')]['awsPolly']=function(_0x8eb753,_0x12576d){scripts[_0x32b8('0x7f')](_0x8eb753[_0x32b8('0x80')],_0x8eb753[_0x32b8('0x81')],_0x8eb753[_0x32b8('0x82')],_0x8eb753['aws_polly_voice']||_0x32b8('0x83'),_0x8eb753[_0x32b8('0x56')],_0x8eb753[_0x32b8('0x84')]||_0x32b8('0x56'))[_0x32b8('0xf')](function(_0x2f755e){_0x12576d(null,_0x2f755e);})[_0x32b8('0x13')](function(_0x447166){_0x12576d(_0x447166);});};AGIVertices['prototype']['awsLex']=function(_0x1d7d11,_0x42b81a){scripts['awsLex'](this[_0x32b8('0x31')][_0x32b8('0x36')],_0x1d7d11[_0x32b8('0x80')],_0x1d7d11['aws_secret_access_key'],_0x1d7d11[_0x32b8('0x85')],_0x1d7d11[_0x32b8('0x56')],_0x1d7d11[_0x32b8('0x86')])[_0x32b8('0xf')](function(_0xde7870){_0x42b81a(null,_0xde7870);})[_0x32b8('0x13')](function(_0x358a9e){_0x42b81a(_0x358a9e);});};AGIVertices[_0x32b8('0x16')]['googleASR']=function(_0x3b833e,_0x42e387,_0x46f1c0){scripts['googleASR'](_0x42e387,_0x3b833e[_0x32b8('0x75')],_0x3b833e[_0x32b8('0x87')]||'en-US')[_0x32b8('0xf')](function(_0x2ed151){_0x46f1c0(null,_0x2ed151);})['catch'](function(_0x2ec386){_0x46f1c0(_0x2ec386);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x88')]=function(_0x481746,_0xbe98ae,_0x23c08d){scripts[_0x32b8('0x88')](_0xbe98ae,_0x481746[_0x32b8('0x89')],_0x481746[_0x32b8('0x8a')],_0x481746[_0x32b8('0x8b')])[_0x32b8('0xf')](function(_0x354f94){_0x23c08d(null,_0x354f94);})['catch'](function(_0x2cb2a8){_0x23c08d(_0x2cb2a8);});};AGIVertices[_0x32b8('0x16')][_0x32b8('0x8c')]=function(_0x286a12){var _0x29f9cf=_['includes'](verticesWithRetry,_0x286a12[_0x32b8('0x33')])?_0x286a12:_[_0x32b8('0x8d')](_0x286a12);for(var _0x41d6db in _0x29f9cf){if(_0x29f9cf[_0x32b8('0x8e')](_0x41d6db)){if(_0x29f9cf[_0x41d6db]&&_[_0x32b8('0x8f')](_0x29f9cf[_0x41d6db])){if(_[_0x32b8('0x90')](recursiveMapAttributes,_0x41d6db)){_0x29f9cf[_0x41d6db]=this['replaceObjectAllVariables'](_0x29f9cf[_0x41d6db]);}else{_0x29f9cf[_0x41d6db]=this[_0x32b8('0x91')](_0x29f9cf[_0x41d6db]);}}}}return _0x29f9cf;};AGIVertices[_0x32b8('0x16')][_0x32b8('0x92')]=function(_0x1e29a1){for(var _0x1ee08f in _0x1e29a1){if(_0x1e29a1[_0x32b8('0x8e')](_0x1ee08f)){if(_[_0x32b8('0x93')](_0x1e29a1[_0x1ee08f])){this[_0x32b8('0x92')](_0x1e29a1[_0x1ee08f]);}else if(_['isArray'](_0x1e29a1[_0x1ee08f])){for(var _0x2591dc=0x0;_0x2591dc<_0x1e29a1[_0x1ee08f]['length'];_0x2591dc++){this[_0x32b8('0x92')](_0x1e29a1[_0x1ee08f][_0x2591dc]);}}else if(_[_0x32b8('0x8f')](_0x1e29a1[_0x1ee08f])){_0x1e29a1[_0x1ee08f]=this['replaceAllVariables'](_0x1e29a1[_0x1ee08f]);}}}};AGIVertices['prototype'][_0x32b8('0x94')]=function(_0x2d666b,_0x69b331){for(var _0x33becf in _0x2d666b){if(_0x2d666b[_0x32b8('0x8e')](_0x33becf)){if(_['isPlainObject'](_0x2d666b[_0x33becf])){if(!_['isEmpty'](_0x2d666b[_0x33becf])){this[_0x32b8('0x94')](_0x2d666b[_0x33becf],util[_0x32b8('0x26')](_0x32b8('0x95'),_0x69b331,_0x33becf));}}else if(_[_0x32b8('0x96')](_0x2d666b[_0x33becf])){for(var _0x317164=0x0;_0x317164<_0x2d666b[_0x33becf]['length'];_0x317164++){this[_0x32b8('0x94')](_0x2d666b[_0x33becf][_0x317164],util['format'](_0x32b8('0x95'),_0x69b331,_0x33becf+'['+_0x317164+']'));}}else{if(!_[_0x32b8('0x43')](_0x2d666b[_0x33becf])){this[_0x32b8('0x31')][_0x32b8('0x97')](util[_0x32b8('0x26')](_0x32b8('0x95'),_0x69b331,_0x33becf),_0x2d666b[_0x33becf]);}}}}};AGIVertices['prototype'][_0x32b8('0x98')]=function(_0x58c791){try{var _0x164369=JSON[_0x32b8('0x65')](_0x58c791);this['recursiveNodeIndex'](_0x164369);return JSON[_0x32b8('0x6d')](_0x164369);}catch(_0x3e44f8){return this['replaceAllVariables'](_0x58c791);}};AGIVertices[_0x32b8('0x16')][_0x32b8('0x91')]=function(_0x5ed377){var _0x2788b0=_0x5ed377[_0x32b8('0x99')]('{');for(var _0x40ebaa=0x1;_0x40ebaa<_0x2788b0[_0x32b8('0x9a')];_0x40ebaa+=0x1){var _0x528755=_0x2788b0[_0x40ebaa][_0x32b8('0x99')]('}');if(_0x528755[_0x32b8('0x9a')]>0x1){_0x5ed377=_0x5ed377[_0x32b8('0x9b')]('{'+_0x528755[0x0]+'}',this[_0x32b8('0x31')]['getVariable'](_0x528755[0x0])[_0x32b8('0x9c')]||_0x528755[0x0]);}}if(_0x2788b0[_0x32b8('0x9a')]===0x1){return _0x5ed377[_0x32b8('0x48')]();}return this[_0x32b8('0x91')](_0x5ed377);};AGIVertices[_0x32b8('0x16')][_0x32b8('0x9d')]=function(_0x1a2d68,_0x4cc34c){var _0x12c3ab=this[_0x32b8('0x31')][_0x32b8('0xd')](_0x1a2d68);if(_0x12c3ab[_0x32b8('0x9e')]===-0x1){return _0x12c3ab;}logger['info'](util[_0x32b8('0x26')](_0x32b8('0x9f'),_0x4cc34c,_0x12c3ab[_0x32b8('0x9c')]));return this['channel']['setVariable'](_0x4cc34c,_0x12c3ab['extra']);};AGIVertices[_0x32b8('0x16')][_0x32b8('0x7d')]=function(_0x344ed7){return _0x344ed7&&_0x344ed7!=='0'&&_0x344ed7!=='-1'&&_0x344ed7!=='';};AGIVertices['prototype']['maxRetry']=function(_0x32c588){this[_0x32b8('0x30')][_0x32b8('0x6a')](this,_0x32c588,'-');_0x32c588['retry']=_0x32c588[_0x32b8('0xa0')];return{'code':0xc8,'result':'-'};};AGIVertices[_0x32b8('0x16')]['mrcpsynth']=function(_0x93dfa4){logger[_0x32b8('0x29')](util['format'](_0x32b8('0xa1'),_0x93dfa4[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x93dfa4[_0x32b8('0x56')])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0xa2'));}var _0x14320f='\x22'+_0x93dfa4[_0x32b8('0x56')]+'\x22';if(this[_0x32b8('0x7d')](_0x93dfa4[_0x32b8('0x73')])){_0x14320f+=','+_0x93dfa4['options'];}var _0x4c26aa=this[_0x32b8('0x31')]['exec'](_0x32b8('0xa3'),_0x14320f);if(_0x4c26aa[_0x32b8('0x9e')]===-0x1){return _0x4c26aa;}return this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0xa5'),_0x14320f));};AGIVertices['prototype'][_0x32b8('0xa6')]=function(_0x29095e){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0xa7'),_0x29095e['label']));if(!this[_0x32b8('0x7d')](_0x29095e[_0x32b8('0xa8')])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0xa9'));}var _0x52ac94=_0x29095e[_0x32b8('0xa8')];if(this[_0x32b8('0x7d')](_0x29095e[_0x32b8('0x73')])){_0x52ac94+=','+_0x29095e['options'];}var _0x43fee6=this[_0x32b8('0x31')][_0x32b8('0xaa')](_0x32b8('0xab'),_0x52ac94);if(_0x43fee6['result']===-0x1){return _0x43fee6;}var _0x40ec2d=this[_0x32b8('0x9d')]('RECOG_CONFIDENCE()',_0x32b8('0xac'));if(_0x40ec2d[_0x32b8('0x9e')]===-0x1){return _0x40ec2d;}var _0x4a390f=this[_0x32b8('0x9d')]('RECOG_INPUT()',_0x32b8('0xad'));if(_0x4a390f[_0x32b8('0x9e')]===-0x1){return _0x4a390f;}var _0x45cb59=this[_0x32b8('0x9d')]('RECOG_INSTANCE()',_0x32b8('0xae'));if(_0x45cb59[_0x32b8('0x9e')]===-0x1){return _0x45cb59;}return this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')]('Executed\x20command\x20MRCPRecog\x20%s',_0x52ac94));};AGIVertices[_0x32b8('0x16')][_0x32b8('0x5')]=function(_0x46d1d5){logger[_0x32b8('0x29')](util['format'](_0x32b8('0xaf'),_0x46d1d5[_0x32b8('0x32')]));return this[_0x32b8('0x31')][_0x32b8('0x5')]([_0x46d1d5[_0x32b8('0xb0')],_0x46d1d5[_0x32b8('0xb1')]]);};AGIVertices[_0x32b8('0x16')][_0x32b8('0xb2')]=function(_0x23f9ae){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0xb3'),_0x23f9ae[_0x32b8('0x32')]));if(this[_0x32b8('0x7d')](_0x23f9ae[_0x32b8('0x61')])){logger[_0x32b8('0x29')](util['format'](_0x32b8('0xb4'),_0x23f9ae[_0x32b8('0x61')]));var _0x226e17=this['channel'][_0x32b8('0xb5')](_0x23f9ae[_0x32b8('0x61')]);if(_0x226e17['result']===-0x1){return _0x226e17;}}return this[_0x32b8('0x31')][_0x32b8('0xb2')]();};AGIVertices[_0x32b8('0x16')][_0x32b8('0xb6')]=function(_0x4b695a){logger[_0x32b8('0x29')](util[_0x32b8('0x26')]('Enter\x20in\x20CALLBACK\x20(%s)\x20block',_0x4b695a[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x4b695a[_0x32b8('0x45')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x4b695a,'no\x20list\x20selected');}_0x4b695a[_0x32b8('0x47')]=moment();if(this['isConfigured'](_0x4b695a[_0x32b8('0xb7')])){_0x4b695a['scheduledAt']=moment()[_0x32b8('0xb8')](_0x4b695a[_0x32b8('0xb7')],_0x32b8('0xb9'));}if(!this[_0x32b8('0x7d')](_0x4b695a[_0x32b8('0x49')])){_0x4b695a[_0x32b8('0x49')]=0x2;}this[_0x32b8('0x3e')]['sync'](this,_0x4b695a);return this[_0x32b8('0x31')]['noop'](util[_0x32b8('0x26')]('CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s',_0x4b695a[_0x32b8('0x44')],_0x4b695a[_0x32b8('0x45')],_0x4b695a[_0x32b8('0x47')]));};AGIVertices['prototype'][_0x32b8('0xba')]=function(_0x5d0cd0){logger[_0x32b8('0x29')](util['format'](_0x32b8('0xbb'),_0x5d0cd0[_0x32b8('0x32')]));var _0x135da4=this[_0x32b8('0x31')][_0x32b8('0xaa')](_0x5d0cd0[_0x32b8('0xbc')],_0x5d0cd0[_0x32b8('0x73')]);if(_0x135da4[_0x32b8('0x9e')]===-0x1){return _0x135da4;}return this[_0x32b8('0x31')][_0x32b8('0xa4')](util['format'](_0x32b8('0xbd'),_0x5d0cd0['application'],_0x5d0cd0['options']));};AGIVertices[_0x32b8('0x16')][_0x32b8('0xbe')]=function(_0x29cc73){logger['info'](util[_0x32b8('0x26')](_0x32b8('0xbf'),_0x29cc73[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x29cc73[_0x32b8('0x56')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xa2'));}var _0x40ced6='\x22'+_0x29cc73[_0x32b8('0x56')]+'\x22';if(this[_0x32b8('0x7d')](_0x29cc73['options'])){_0x40ced6+=','+_0x29cc73[_0x32b8('0x73')];}var _0x16d088=this[_0x32b8('0x31')][_0x32b8('0xaa')](_0x32b8('0xa3'),_0x40ced6);if(_0x16d088['result']===-0x1){return _0x16d088;}return this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0xa5'),_0x40ced6));};AGIVertices[_0x32b8('0x16')]['sestektts']=function(_0x4c09fe){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0xc0'),_0x4c09fe[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x4c09fe[_0x32b8('0x56')])){return this['channel'][_0x32b8('0xa4')](_0x32b8('0xa2'));}var _0x2b1dfa='\x22'+_0x4c09fe[_0x32b8('0x56')]+'\x22';if(this[_0x32b8('0x7d')](_0x4c09fe[_0x32b8('0x73')])){_0x2b1dfa+=','+_0x4c09fe['options'];}var _0x53d7f7=this[_0x32b8('0x31')][_0x32b8('0xaa')](_0x32b8('0xa3'),_0x2b1dfa);if(_0x53d7f7[_0x32b8('0x9e')]===-0x1){return _0x53d7f7;}return this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0xa5'),_0x2b1dfa));};AGIVertices[_0x32b8('0x16')][_0x32b8('0xc1')]=function(_0x554068){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0xc2'),_0x554068[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x554068[_0x32b8('0xa8')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xa9'));}var _0x339b89=_0x554068[_0x32b8('0xa8')];if(this[_0x32b8('0x7d')](_0x554068[_0x32b8('0x73')])){_0x339b89+=','+_0x554068[_0x32b8('0x73')];}var _0x138b01=this[_0x32b8('0x31')][_0x32b8('0xaa')](_0x32b8('0xab'),_0x339b89);if(_0x138b01[_0x32b8('0x9e')]===-0x1){return _0x138b01;}var _0x48b45f=this[_0x32b8('0x9d')](_0x32b8('0xc3'),'LUMENVOX_ASR_CONFIDENCE');if(_0x48b45f[_0x32b8('0x9e')]===-0x1){return _0x48b45f;}var _0x4d29c3=this[_0x32b8('0x9d')]('RECOG_INPUT()',_0x32b8('0xc4'));if(_0x4d29c3[_0x32b8('0x9e')]===-0x1){return _0x4d29c3;}var _0x2c8691=this['getAndSetVariable'](_0x32b8('0xc5'),_0x32b8('0xc6'));if(_0x2c8691[_0x32b8('0x9e')]===-0x1){return _0x2c8691;}return this[_0x32b8('0x31')]['noop'](util['format'](_0x32b8('0xc7'),_0x339b89));};AGIVertices[_0x32b8('0x16')][_0x32b8('0xc8')]=function(_0x47dc87){logger[_0x32b8('0x29')](util['format']('Enter\x20in\x20SESTEKASR\x20(%s)\x20block',_0x47dc87[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x47dc87['grammar'])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xa9'));}var _0x5e1472=_0x47dc87['grammar'];if(this[_0x32b8('0x7d')](_0x47dc87[_0x32b8('0x73')])){_0x5e1472+=','+_0x47dc87[_0x32b8('0x73')];}var _0x5486a9=this[_0x32b8('0x31')][_0x32b8('0xaa')](_0x32b8('0xab'),_0x5e1472);if(_0x5486a9['result']===-0x1){return _0x5486a9;}var _0x1ee61f=this[_0x32b8('0x9d')](_0x32b8('0xc3'),'SESTEK_ASR_CONFIDENCE');if(_0x1ee61f[_0x32b8('0x9e')]===-0x1){return _0x1ee61f;}var _0x555a81=this[_0x32b8('0x9d')]('RECOG_INPUT()',_0x32b8('0xc9'));if(_0x555a81[_0x32b8('0x9e')]===-0x1){return _0x555a81;}var _0x53c69f=this[_0x32b8('0x9d')](_0x32b8('0xc5'),_0x32b8('0xca'));if(_0x53c69f[_0x32b8('0x9e')]===-0x1){return _0x53c69f;}return this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0xc7'),_0x5e1472));};AGIVertices[_0x32b8('0x16')]['database']=function(_0x3badd1){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0xcb'),_0x3badd1['label']));if(!this['isConfigured'](_0x3badd1[_0x32b8('0xcc')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x3badd1,_0x32b8('0xcd'));}var _0x27da1f=this[_0x32b8('0xce')]['sync'](this,_0x3badd1[_0x32b8('0xcc')]);if(!_0x27da1f){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x3badd1,'no\x20odbc\x20database\x20found');}if(!this[_0x32b8('0x7d')](_0x3badd1['query'])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x3badd1,'no\x20query\x20configured');}var _0x25c1c6=_0x3badd1[_0x32b8('0x2b')]['replace'](/(\r\n|\n|\r)/gm,'\x20');this[_0x32b8('0x31')]['noop'](util[_0x32b8('0x26')](_0x32b8('0xcf'),_0x25c1c6));var _0x4a5f66=this[_0x32b8('0xd0')][_0x32b8('0x6a')](this,_0x27da1f,_0x25c1c6);this[_0x32b8('0x30')]['sync'](this,_0x3badd1,_0x25c1c6);if(!this['isConfigured'](_0x3badd1['variable_id'])){return this['channel'][_0x32b8('0xa4')](_0x32b8('0xd1'));}var _0xb189be=this[_0x32b8('0xd')][_0x32b8('0x6a')](this,_0x3badd1[_0x32b8('0xd2')]);if(!_0xb189be){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x3badd1,'no\x20variable\x20found');}var _0x23ff8d=this;_0x4a5f66[_0x32b8('0xd3')](function(_0x5dbe57,_0x25f220){Object[_0x32b8('0xd4')](_0x5dbe57)[_0x32b8('0xd3')](function(_0x3633ea){_0x23ff8d[_0x32b8('0x31')][_0x32b8('0x97')](util[_0x32b8('0x26')](_0x32b8('0xd5'),_0xb189be,_0x25f220,_0x3633ea),_0x5dbe57[_0x3633ea]);});});this[_0x32b8('0x31')][_0x32b8('0x97')](util['format'](_0x32b8('0xd6'),_0xb189be),_0x4a5f66[_0x32b8('0x9a')]);return this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0xd7'),_0xb189be));};AGIVertices[_0x32b8('0x16')]['dial']=function(_0x2bc9b5){logger[_0x32b8('0xd8')](util[_0x32b8('0x26')](_0x32b8('0xd9'),_0x2bc9b5[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x2bc9b5['sip_id'])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x2bc9b5,'no\x20user\x20selected');}var _0xa90509=this[_0x32b8('0x17')]['sync'](this,_0x2bc9b5['sip_id']);if(!_0xa90509){return this[_0x32b8('0x31')]['error'](_0x2bc9b5,_0x32b8('0xda'));}var _0x219891=this[_0x32b8('0x31')][_0x32b8('0xaa')](_0x32b8('0xdb'),[util[_0x32b8('0x26')](_0x32b8('0xdc'),_0xa90509),_0x2bc9b5[_0x32b8('0x61')],_0x2bc9b5[_0x32b8('0xdd')],_0x2bc9b5[_0x32b8('0x6b')]]);if(_0x219891['result']===-0x1){return _0x219891;}return this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0xde'),_0x32b8('0xdb')));};AGIVertices[_0x32b8('0x16')]['dialogflow']=function(_0x504f12){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0xdf'),_0x504f12[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x504f12[_0x32b8('0x75')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xe0'));}if(!this[_0x32b8('0x7d')](_0x504f12[_0x32b8('0x56')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xa2'));}this['channel'][_0x32b8('0xe1')]=!![];this['createSquareDetailsReport'](_0x504f12);this[_0x32b8('0x3d')](_0x504f12['text'],'in','','');this[_0x32b8('0x31')][_0x32b8('0xa4')](util['format']('Trying\x20Dialogflow:\x20%s',_0x504f12[_0x32b8('0x56')]));var _0x120c12=this[_0x32b8('0x74')][_0x32b8('0x6a')](this,_0x504f12);if(_0x120c12){for(var _0x1b46c4 in _0x120c12){if(_0x120c12[_0x32b8('0x8e')](_0x1b46c4)){this[_0x32b8('0x31')][_0x32b8('0x97')](util[_0x32b8('0x26')](_0x32b8('0xe2'),_0x1b46c4[_0x32b8('0x63')]()),_0x120c12[_0x1b46c4]);}}this[_0x32b8('0x3d')](_0x120c12[_0x32b8('0xe3')],_0x32b8('0xe4'),_0x32b8('0xe5'),'');return this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0xe6'),_0x120c12[_0x32b8('0xe3')]));}return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x504f12,'Dialogflow\x20is\x20unreachable');};AGIVertices[_0x32b8('0x16')][_0x32b8('0xe7')]=function(_0x5cb7f2){logger['info'](util[_0x32b8('0x26')](_0x32b8('0xe8'),_0x5cb7f2[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x5cb7f2[_0x32b8('0xe9')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xea'));}if(!this[_0x32b8('0x7d')](_0x5cb7f2[_0x32b8('0x76')])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0xeb'));}if(!this[_0x32b8('0x7d')](_0x5cb7f2[_0x32b8('0xec')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xed'));}if(!this[_0x32b8('0x7d')](_0x5cb7f2[_0x32b8('0x77')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')]('no\x20anguage\x20configured');}if(!this[_0x32b8('0x7d')](_0x5cb7f2['text'])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xa2'));}this[_0x32b8('0x31')]['bot']=!![];this[_0x32b8('0x30')](_0x5cb7f2);this[_0x32b8('0x3d')](_0x5cb7f2['text'],'in','','');this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')]('Trying\x20DialogflowV2:\x20%s',_0x5cb7f2[_0x32b8('0x56')]));var _0x9a0be=this[_0x32b8('0xee')][_0x32b8('0x6a')](this,_0x5cb7f2);if(_0x9a0be){for(var _0x4dcafc in _0x9a0be){if(_0x9a0be[_0x32b8('0x8e')](_0x4dcafc)){if(_0x4dcafc!==_0x32b8('0xef')){this[_0x32b8('0x31')]['setVariable'](util['format'](_0x32b8('0xe2'),_0x4dcafc[_0x32b8('0x63')]()),_0x9a0be[_0x4dcafc]);}}}this[_0x32b8('0x3d')](_0x9a0be[_0x32b8('0xe3')],_0x32b8('0xe4'),_0x32b8('0xe7'),_0x9a0be['providerResponse']);return this[_0x32b8('0x31')][_0x32b8('0xa4')](util['format']('DialogflowV2\x20Result\x20%s',_0x9a0be[_0x32b8('0xe3')]));}return this[_0x32b8('0x31')]['error'](_0x5cb7f2,_0x32b8('0xf0'));};AGIVertices[_0x32b8('0x16')][_0x32b8('0xf1')]=function(_0xac9ae9){logger['info'](util[_0x32b8('0x26')]('Enter\x20in\x20SESTEKNDA\x20(%s)\x20block',_0xac9ae9[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0xac9ae9[_0x32b8('0xf2')])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0xf3'));}if(!this[_0x32b8('0x7d')](_0xac9ae9[_0x32b8('0xf4')])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0xf5'));}if(!this[_0x32b8('0x7d')](_0xac9ae9[_0x32b8('0xf6')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xf7'));}if(!this[_0x32b8('0x7d')](_0xac9ae9[_0x32b8('0xf8')])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0xa2'));}this['channel'][_0x32b8('0xe1')]=!![];this[_0x32b8('0x30')](_0xac9ae9);this['createSquareMessage'](_0xac9ae9[_0x32b8('0x56')],'in','','');this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0xf9'),_0xac9ae9[_0x32b8('0x56')]));var _0x34a831=this[_0x32b8('0x78')][_0x32b8('0x6a')](this,_0xac9ae9);if(_0x34a831){for(var _0x35400 in _0x34a831){if(_0x34a831[_0x32b8('0x8e')](_0x35400)){this[_0x32b8('0x31')][_0x32b8('0x97')](util[_0x32b8('0x26')](_0x32b8('0xfa'),_0x35400['toUpperCase']()),_0x34a831[_0x35400]);}}this[_0x32b8('0x3d')](_0x34a831[_0x32b8('0xe3')],_0x32b8('0xe4'),_0x32b8('0xf1'),'');if(_0x34a831[_0x32b8('0xfb')]){this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')]('Sestek\x20NDA\x20%s\x20file\x20created',_0x34a831[_0x32b8('0xfb')]));var _0x303852=this[_0x32b8('0x31')]['streamFile'](_0x34a831[_0x32b8('0xfb')]);try{fs['unlink'](_0x34a831['audiofile']+_0x32b8('0xfc'));}catch(_0x26c06e){logger[_0x32b8('0x2e')](_0x26c06e);}return _0x303852;}else{return this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')]('SestekNDA\x20Result\x20%s',_0x34a831[_0x32b8('0xe3')]));}}return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0xac9ae9,'SestekNDA\x20is\x20unreachable');};AGIVertices['prototype']['end']=function(_0x324d2f){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0xfd'),_0x324d2f[_0x32b8('0x32')]));return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xfe'));};AGIVertices[_0x32b8('0x16')][_0x32b8('0xff')]=function(_0xde691a){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x100'),_0xde691a[_0x32b8('0x32')]));var _0x15e414='';if(_0xde691a[_0x32b8('0x101')]){if(!this[_0x32b8('0x7d')](_0xde691a[_0x32b8('0x101')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0xde691a,_0x32b8('0x102'));}else{var _0x9acaf0=parseInt(_0xde691a[_0x32b8('0x101')],0xa);if(isNaN(_0x9acaf0)){_0x15e414=_0xde691a[_0x32b8('0x101')];}else{_0x15e414=this[_0x32b8('0x18')][_0x32b8('0x6a')](this,_0xde691a[_0x32b8('0x101')]);if(!_0x15e414){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0xde691a,'no\x20trunk\x20found');}}}}else if(_0xde691a[_0x32b8('0x103')]){_0x15e414=_0xde691a[_0x32b8('0x103')];}else{return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0xde691a,_0x32b8('0x102'));}var _0x1b2830=this['channel']['exec'](_0x32b8('0xdb'),[util[_0x32b8('0x26')](_0x32b8('0x104'),_0x15e414,_0xde691a['phone']),_0xde691a[_0x32b8('0x61')],_0xde691a[_0x32b8('0xdd')],_0xde691a[_0x32b8('0x6b')]]);if(_0x1b2830[_0x32b8('0x9e')]===-0x1){return _0x1b2830;}return this['channel'][_0x32b8('0xa4')](util['format'](_0x32b8('0xde'),_0x32b8('0xdb')));};AGIVertices[_0x32b8('0x16')]['finally']=function(_0x309194){logger[_0x32b8('0x29')](util[_0x32b8('0x26')]('Enter\x20in\x20FINALLY\x20(%s)\x20block',_0x309194[_0x32b8('0x32')]));return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0x105'));};AGIVertices['prototype']['getdigits']=function(_0x4d3ed8){logger[_0x32b8('0x29')](util['format'](_0x32b8('0x106'),_0x4d3ed8[_0x32b8('0x32')]));if(_0x4d3ed8[_0x32b8('0x107')]===0x0){return this[_0x32b8('0xa0')](_0x4d3ed8);}_0x4d3ed8['retry']-=0x1;if(!this['isConfigured'](_0x4d3ed8[_0x32b8('0x108')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x4d3ed8,'no\x20file\x20audio\x20selected');}var _0x338acf=this[_0x32b8('0x1a')][_0x32b8('0x6a')](this,_0x4d3ed8[_0x32b8('0x108')]);if(!_0x338acf){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x4d3ed8,_0x32b8('0x109'));}if(!this[_0x32b8('0x7d')](_0x4d3ed8[_0x32b8('0xd2')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x32b8('0xd1'));}var _0x115017=this['channel'][_0x32b8('0x10a')](_0x338acf,_0x4d3ed8[_0x32b8('0x10b')],_0x4d3ed8[_0x32b8('0x10c')]);var _0x540b5e=_0x115017[_0x32b8('0x9e')]?_0x115017[_0x32b8('0x9e')][_0x32b8('0x48')]():'';logger[_0x32b8('0x29')](_0x32b8('0x10d'),JSON['stringify'](_0x115017));if(_0x115017[_0x32b8('0x9e')]===-0x1){this[_0x32b8('0x30')][_0x32b8('0x6a')](this,_0x4d3ed8,_0x540b5e);return _0x115017;}else if(_0x115017[_0x32b8('0x9c')]===_0x32b8('0x61')){_0x115017[_0x32b8('0x9e')]=_0x540b5e[_0x32b8('0x9a')]>=parseInt(_0x4d3ed8[_0x32b8('0x10e')])?'x':'i';}else{_0x115017[_0x32b8('0x9e')]=_0x540b5e[_0x32b8('0x9a')]>=parseInt(_0x4d3ed8[_0x32b8('0x10e')])&&_0x540b5e[_0x32b8('0x9a')]<=parseInt(_0x4d3ed8[_0x32b8('0x10c')])?'x':'i';}var _0x3d44ef=this[_0x32b8('0xd')][_0x32b8('0x6a')](this,_0x4d3ed8[_0x32b8('0xd2')]);if(!_0x3d44ef){return this['channel'][_0x32b8('0x2e')](_0x4d3ed8,_0x32b8('0x10f'));}this[_0x32b8('0x31')][_0x32b8('0x97')](_0x3d44ef,_0x540b5e);if(this[_0x32b8('0x7d')](_0x4d3ed8['hiddendigitsnum'])){var _0x82aba5=parseInt(_0x4d3ed8[_0x32b8('0x110')],0xa);var _0x3a3f66=rs[_0x32b8('0x111')]({'charset':'*','length':_0x82aba5});var _0x43ff42=_0x540b5e[_0x32b8('0x9a')];if(_0x43ff42>0x0){if(_0x43ff42>_0x82aba5){this[_0x32b8('0x30')]['sync'](this,_0x4d3ed8,_0x4d3ed8[_0x32b8('0x112')]===_0x32b8('0x113')?_0x3a3f66+_0x540b5e['substr'](_0x82aba5):_0x540b5e[_0x32b8('0x114')](0x0,_0x43ff42-_0x82aba5)+_0x3a3f66);}else{this['createSquareDetailsReport']['sync'](this,_0x4d3ed8,rs[_0x32b8('0x111')]({'charset':'*','length':_0x43ff42}));}}else{this[_0x32b8('0x30')][_0x32b8('0x6a')](this,_0x4d3ed8,'');}}else{this[_0x32b8('0x30')][_0x32b8('0x6a')](this,_0x4d3ed8,_0x540b5e);}return _0x115017;};AGIVertices[_0x32b8('0x16')]['getsecretdigits']=function(_0x179470){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x115'),_0x179470['label']));return this['getdigits'](_0x179470);};AGIVertices[_0x32b8('0x16')][_0x32b8('0x116')]=function(_0x3c110c){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x117'),_0x3c110c[_0x32b8('0x32')]));this['createSquareDetailsReport'][_0x32b8('0x6a')](this,_0x3c110c,_0x3c110c[_0x32b8('0x118')]);return this['channel']['noop'](util[_0x32b8('0x26')](_0x32b8('0x119'),_0x3c110c[_0x32b8('0x118')]));};AGIVertices[_0x32b8('0x16')][_0x32b8('0x11a')]=function(_0x26ea0f){logger[_0x32b8('0x29')](util[_0x32b8('0x26')]('[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block',_0x26ea0f[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x26ea0f['aws_access_key_id'])||!this[_0x32b8('0x7d')](_0x26ea0f[_0x32b8('0x81')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')]('no\x20valid\x20credentials\x20configured');}if(!this['isConfigured'](_0x26ea0f['text'])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0xa2'));}this[_0x32b8('0x31')][_0x32b8('0xa4')](util['format']('Trying\x20aws\x20Polly\x20%s',_0x26ea0f[_0x32b8('0x56')]));var _0x218656=this[_0x32b8('0x7f')][_0x32b8('0x6a')](this,_0x26ea0f);if(_0x218656){this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x11b'),_0x218656));var _0x1c5728=this[_0x32b8('0x31')][_0x32b8('0x11c')](_0x218656);try{fs[_0x32b8('0x11d')](_0x218656+'.wav');}catch(_0x15dacc){logger[_0x32b8('0x2e')](_0x15dacc);}return _0x1c5728;}return this['channel']['error'](_0x26ea0f,'aws\x20Polly\x20is\x20unreachable');};AGIVertices['prototype'][_0x32b8('0x11e')]=function(_0x16649c){logger[_0x32b8('0x29')](util[_0x32b8('0x26')]('Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block',_0x16649c['label']));if(!this['isConfigured'](_0x16649c['aws_access_key_id'])||!this['isConfigured'](_0x16649c['aws_secret_access_key'])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0x11f'));}if(!this[_0x32b8('0x7d')](_0x16649c[_0x32b8('0x86')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0x120'));}if(!this[_0x32b8('0x7d')](_0x16649c['text'])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xa2'));}this[_0x32b8('0x31')][_0x32b8('0xe1')]=!![];this['createSquareDetailsReport'](_0x16649c);this[_0x32b8('0x3d')](_0x16649c[_0x32b8('0x56')],'in','','');this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x121'),_0x16649c[_0x32b8('0x56')]));var _0x3e48be=this[_0x32b8('0x122')][_0x32b8('0x6a')](this,_0x16649c);if(_0x3e48be){for(var _0x170295 in _0x3e48be){if(_0x3e48be['hasOwnProperty'](_0x170295)&&_[_0x32b8('0x8f')](_0x3e48be[_0x170295])){this[_0x32b8('0x31')][_0x32b8('0x97')](util[_0x32b8('0x26')](_0x32b8('0x123'),_0x170295[_0x32b8('0x63')]()),_0x3e48be[_0x170295]);}}if(_[_0x32b8('0x43')](_0x3e48be[_0x32b8('0x71')])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0x124'));}else{this[_0x32b8('0x3d')](_0x3e48be[_0x32b8('0x71')],_0x32b8('0xe4'),_0x32b8('0x125'),'');return this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x126'),_0x3e48be[_0x32b8('0x71')]));}}return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x16649c,_0x32b8('0x127'));};AGIVertices['prototype'][_0x32b8('0x128')]=function(_0x598866){logger[_0x32b8('0x29')](util['format'](_0x32b8('0x129'),_0x598866[_0x32b8('0x32')],_0x598866[_0x32b8('0x61')]));if(!this[_0x32b8('0x7d')](_0x598866['key'])){return this[_0x32b8('0x31')][_0x32b8('0xa4')]('no\x20key\x20configured');}var _0x36bfcb=_0x32b8('0x12a');var _0x18785c=util[_0x32b8('0x26')](_0x32b8('0x12b'),FILES_PATH,rs[_0x32b8('0x111')](0x4));var _0x106d8d=util[_0x32b8('0x26')](_0x32b8('0x95'),_0x18785c,_0x36bfcb);var _0x224bac=!![];if(_0x598866[_0x32b8('0x12c')]==='NOBEEP'){_0x224bac=![];}var _0x33cca8=this[_0x32b8('0x31')]['recordFile'](_0x18785c,_0x36bfcb,_0x598866[_0x32b8('0x12d')],_0x598866['timeout'],undefined,_0x224bac);if(_0x33cca8[_0x32b8('0x9e')]!==-0x1){this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')]('google\x20%s\x20file\x20created',_0x106d8d));var _0x32ce9b=this[_0x32b8('0x12e')][_0x32b8('0x6a')](this,_0x598866,_0x106d8d);if(_0x32ce9b){for(var _0xcf2eba in _0x32ce9b){if(_0x32ce9b[_0x32b8('0x8e')](_0xcf2eba)){this[_0x32b8('0x31')][_0x32b8('0x97')](util[_0x32b8('0x26')](_0x32b8('0x12f'),_0xcf2eba['toUpperCase']()),_0x32ce9b[_0xcf2eba]);}}return this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x130'),JSON['stringify'](_0x32ce9b)));}}return _0x33cca8;};AGIVertices[_0x32b8('0x16')]['tildeasr']=function(_0x59d1fb){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x131'),_0x59d1fb[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x59d1fb['appid'])){return this[_0x32b8('0x31')][_0x32b8('0xa4')]('no\x20appid\x20configured');}if(!this[_0x32b8('0x7d')](_0x59d1fb[_0x32b8('0x8a')])){return this[_0x32b8('0x31')]['noop']('no\x20appsecret\x20configured');}var _0x1e3e4d=_0x32b8('0x12a');var _0xe464b5=util['format'](_0x32b8('0x12b'),FILES_PATH,rs[_0x32b8('0x111')](0x4));var _0x308b68=util[_0x32b8('0x26')](_0x32b8('0x95'),_0xe464b5,_0x1e3e4d);var _0x5de46d=!![];if(_0x59d1fb['beep']==='NOBEEP'){_0x5de46d=![];}var _0x5da5a0=this[_0x32b8('0x31')]['recordFile'](_0xe464b5,_0x1e3e4d,_0x59d1fb[_0x32b8('0x12d')],_0x59d1fb[_0x32b8('0x61')],undefined,_0x5de46d);if(_0x5da5a0[_0x32b8('0x9e')]!==-0x1){this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x132'),_0x308b68));var _0x45c9c7=this['tildeASR']['sync'](this,_0x59d1fb,_0x308b68);if(_0x45c9c7){for(var _0x30da9c in _0x45c9c7){if(_0x45c9c7['hasOwnProperty'](_0x30da9c)){this[_0x32b8('0x31')][_0x32b8('0x97')](util[_0x32b8('0x26')](_0x32b8('0x133'),_0x30da9c[_0x32b8('0x63')]()),_0x45c9c7[_0x30da9c]);}}return this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x134'),JSON[_0x32b8('0x6d')](_0x45c9c7)));}}return _0x5da5a0;};AGIVertices['prototype'][_0x32b8('0x135')]=function(_0x3a20d0){logger[_0x32b8('0x29')](util[_0x32b8('0x26')]('Enter\x20in\x20GOTO\x20(%s)\x20block',_0x3a20d0['label']));return this[_0x32b8('0x31')]['continueAt'](_0x3a20d0['context'],_0x3a20d0[_0x32b8('0x136')],_0x3a20d0[_0x32b8('0x39')]);};AGIVertices[_0x32b8('0x16')][_0x32b8('0x137')]=function(_0x53a793){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x138'),_0x53a793[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x53a793[_0x32b8('0x139')])){return this['channel'][_0x32b8('0x2e')](_0x53a793,_0x32b8('0x13a'));}try{var _0x5c2461=eval(_0x53a793[_0x32b8('0x139')])?_0x32b8('0x13b'):'false';this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')]('EVAL\x20CONDITION\x20%s\x20%s',_0x53a793[_0x32b8('0x139')],_0x5c2461));return{'code':0xc8,'result':_0x5c2461};}catch(_0x140aad){return{'code':0xc8,'result':_0x32b8('0x13c')};}};AGIVertices['prototype'][_0x32b8('0x13d')]=function(_0x5203f6){logger[_0x32b8('0x29')](util[_0x32b8('0x26')]('Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block',_0x5203f6[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x5203f6['interval_id'])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x5203f6,_0x32b8('0x13e'));}var _0x510a83=this[_0x32b8('0x20')][_0x32b8('0x6a')](this,_0x5203f6[_0x32b8('0x13f')]);if(!_0x510a83){return this[_0x32b8('0x31')]['error'](_0x5203f6,'no\x20intervals\x20found');}for(var _0xd7d100=0x0;_0xd7d100<_0x510a83[_0x32b8('0x9a')];_0xd7d100+=0x1){var _0x3945fb=this[_0x32b8('0x31')]['getVariable'](util[_0x32b8('0x26')](_0x32b8('0x140'),_0x510a83[_0xd7d100]));if(_0x3945fb['result']===-0x1){return _0x3945fb;}logger['info'](util['format']('IFTIME\x20%s\x20%s',_0x510a83[_0xd7d100],_0x3945fb['extra']));if(_0x3945fb['extra']===_0x32b8('0x13b')){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x141'),_0x510a83[_0xd7d100],'true'));this['channel']['noop'](util[_0x32b8('0x26')](_0x32b8('0x141'),_0x510a83[_0xd7d100],_0x32b8('0x13b')));return{'code':0xc8,'result':'true'};}else{logger['info'](util[_0x32b8('0x26')](_0x32b8('0x141'),_0x510a83[_0xd7d100],'false'));this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x141'),_0x510a83[_0xd7d100],_0x32b8('0x13c')));}}return{'code':0xc8,'result':_0x32b8('0x13c')};};AGIVertices[_0x32b8('0x16')][_0x32b8('0x142')]=function(_0x3d4e58){logger['info'](util[_0x32b8('0x26')](_0x32b8('0x143'),_0x3d4e58[_0x32b8('0x32')]));return this[_0x32b8('0x31')][_0x32b8('0x142')]();};AGIVertices['prototype'][_0x32b8('0x144')]=function(_0x1f937d){logger[_0x32b8('0x29')](util['format'](_0x32b8('0x145'),_0x1f937d[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x1f937d[_0x32b8('0x75')])){return this['channel'][_0x32b8('0xa4')]('no\x20key\x20configured');}var _0x298300=_0x32b8('0x12a');var _0x512f90=util[_0x32b8('0x26')](_0x32b8('0x12b'),FILES_PATH,rs[_0x32b8('0x111')](0x4));var _0x165a1e=util['format'](_0x32b8('0x95'),_0x512f90,_0x298300);var _0x1f7cf7=!![];if(_0x1f937d['beep']===_0x32b8('0x146')){_0x1f7cf7=![];}var _0x1667ce=this['channel']['recordFile'](_0x512f90,_0x298300,_0x1f937d[_0x32b8('0x12d')],_0x1f937d[_0x32b8('0x61')],undefined,_0x1f7cf7);if(_0x1667ce[_0x32b8('0x9e')]!==-0x1){this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x147'),_0x165a1e));var _0x38b33e=this[_0x32b8('0x7c')]['sync'](this,_0x1f937d,_0x165a1e);if(_0x38b33e){for(var _0x536fdb in _0x38b33e){if(_0x38b33e[_0x32b8('0x8e')](_0x536fdb)){this[_0x32b8('0x31')][_0x32b8('0x97')](util['format'](_0x32b8('0x148'),_0x536fdb[_0x32b8('0x63')]()),_0x38b33e[_0x536fdb]);}}return this['channel'][_0x32b8('0xa4')](util['format'](_0x32b8('0x149'),JSON['stringify'](_0x38b33e)));}}return _0x1667ce;};AGIVertices['prototype'][_0x32b8('0x14a')]=function(_0x2e47d2){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x14b'),_0x2e47d2['label']));if(!this[_0x32b8('0x7d')](_0x2e47d2[_0x32b8('0x75')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xe0'));}if(!this[_0x32b8('0x7d')](_0x2e47d2['text'])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xa2'));}this[_0x32b8('0x31')]['noop'](util[_0x32b8('0x26')]('Trying\x20ispeech\x20TTS\x20%s',_0x2e47d2['text']));var _0x30c4f3=this['ispeechTTS']['sync'](this,_0x2e47d2);if(_0x30c4f3){this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x147'),_0x30c4f3));var _0x2534ea=this[_0x32b8('0x31')][_0x32b8('0x11c')](_0x30c4f3,_0x2e47d2['intKey']);try{fs[_0x32b8('0x11d')](_0x30c4f3+_0x32b8('0xfc'));}catch(_0x348fff){logger['error'](_0x348fff);}return _0x2534ea;}return this['channel'][_0x32b8('0x2e')](_0x2e47d2,'ispeech\x20TTS\x20is\x20unreachable');};AGIVertices[_0x32b8('0x16')][_0x32b8('0x14c')]=function(_0x41b00a){logger['info'](util[_0x32b8('0x26')](_0x32b8('0x14d'),_0x41b00a[_0x32b8('0x32')]));if(!this['isConfigured'](_0x41b00a[_0x32b8('0x14e')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x41b00a,_0x32b8('0x14f'));}logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x150'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x41b00a[_0x32b8('0x14e')]));var _0x2d3580=this['agentLogin'][_0x32b8('0x6a')](this,_0x41b00a[_0x32b8('0x14e')]);if(_0x2d3580){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x151'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x41b00a['findBy']));this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x151'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x41b00a[_0x32b8('0x14e')]));return{'code':0xc8,'result':'success'};}else{logger['info'](util['format'](_0x32b8('0x152'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x41b00a[_0x32b8('0x14e')]));this[_0x32b8('0x31')][_0x32b8('0xa4')](util['format'](_0x32b8('0x152'),this['channel'][_0x32b8('0x34')],_0x41b00a[_0x32b8('0x14e')]));return{'code':0xc8,'result':'failure'};}};AGIVertices['prototype'][_0x32b8('0x153')]=function(_0x38956b){logger['info'](util[_0x32b8('0x26')](_0x32b8('0x154'),_0x38956b['label']));if(!this[_0x32b8('0x7d')](_0x38956b[_0x32b8('0x14e')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x38956b,'no\x20find\x20by\x20configured');}logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x150'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x38956b[_0x32b8('0x14e')]));var _0x4712be=this[_0x32b8('0x4c')][_0x32b8('0x6a')](this,_0x38956b['findBy']);if(_0x4712be){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x151'),this['channel'][_0x32b8('0x34')],_0x38956b['findBy']));this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')]('AGENT\x20%s\x20FOUND\x20BY',this['channel'][_0x32b8('0x34')],_0x38956b[_0x32b8('0x14e')]));return{'code':0xc8,'result':_0x32b8('0x155')};}else{logger[_0x32b8('0x29')](util['format'](_0x32b8('0x152'),this['channel']['callerid'],_0x38956b[_0x32b8('0x14e')]));this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x152'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x38956b[_0x32b8('0x14e')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x32b8('0x16')][_0x32b8('0x156')]=function(_0x38019b){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x157'),_0x38019b['label']));if(!this[_0x32b8('0x7d')](_0x38019b[_0x32b8('0x158')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x38019b,_0x32b8('0x159'));}this[_0x32b8('0x31')]['noop'](util[_0x32b8('0x26')](_0x32b8('0x15a'),_0x38019b[_0x32b8('0x158')]));var _0x5cc34d=eval(_0x38019b['operation']);if(!this[_0x32b8('0x7d')](_0x38019b['variable_id'])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xd1'));}var _0x580d89=this['getVariable']['sync'](this,_0x38019b[_0x32b8('0xd2')]);if(!_0x580d89){return this[_0x32b8('0x31')]['error'](_0x38019b,_0x32b8('0x10f'));}if(_[_0x32b8('0x96')](_0x5cc34d)){var _0x140687=this;_0x5cc34d[_0x32b8('0xd3')](function(_0x2c8f86,_0x38de5b){_0x140687[_0x32b8('0x31')][_0x32b8('0x97')](util[_0x32b8('0x26')]('%s[%s]',_0x580d89,_0x38de5b),_0x2c8f86);});return this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')]('variable\x20%s[key]\x20set',_0x580d89));}else{return this[_0x32b8('0x31')][_0x32b8('0x97')](_0x580d89,_0x5cc34d);}};AGIVertices[_0x32b8('0x16')][_0x32b8('0x9')]=function(_0x35aae6){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x15b'),_0x35aae6[_0x32b8('0x32')]));if(_0x35aae6[_0x32b8('0x107')]===0x0){return this[_0x32b8('0xa0')](_0x35aae6);}_0x35aae6[_0x32b8('0x107')]-=0x1;if(!this[_0x32b8('0x7d')](_0x35aae6['file_id'])){return this['channel'][_0x32b8('0x2e')](_0x35aae6,_0x32b8('0x15c'));}var _0x4337fd=this['getSound'][_0x32b8('0x6a')](this,_0x35aae6[_0x32b8('0x108')]);if(!_0x4337fd){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x35aae6,_0x32b8('0x109'));}var _0x2dbdb1=this[_0x32b8('0x31')]['getData'](_0x4337fd,_0x35aae6[_0x32b8('0x10b')],_0x35aae6[_0x32b8('0x15d')]);var _0x5ed878=_0x2dbdb1[_0x32b8('0x9e')];if(_0x2dbdb1[_0x32b8('0x9e')]===-0x1){this[_0x32b8('0x30')][_0x32b8('0x6a')](this,_0x35aae6,'-1');return _0x2dbdb1;}else if(_0x2dbdb1['extra']===_0x32b8('0x61')){_0x2dbdb1[_0x32b8('0x9e')]=_0x2dbdb1[_0x32b8('0x9e')]['length']>0x0?_0x2dbdb1[_0x32b8('0x9e')]:'t';}else if(_['isEmpty'](_0x2dbdb1['result'])){_0x2dbdb1['result']='#';_0x5ed878='#';}if(!this['isConfigured'](_0x35aae6['variable_id'])){this['channel'][_0x32b8('0xa4')]('no\x20variable\x20selected\x20for\x20the\x20result');}else{var _0x98b97e=this[_0x32b8('0xd')][_0x32b8('0x6a')](this,_0x35aae6[_0x32b8('0xd2')]);if(!_0x98b97e){return this['channel'][_0x32b8('0x2e')](_0x35aae6,'no\x20variable\x20found');}this[_0x32b8('0x31')][_0x32b8('0x97')](_0x98b97e,_0x5ed878);}this[_0x32b8('0x30')][_0x32b8('0x6a')](this,_0x35aae6,_0x5ed878);return _0x2dbdb1;};AGIVertices[_0x32b8('0x16')][_0x32b8('0xa4')]=function(_0x179b7d){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x15e'),_0x179b7d[_0x32b8('0x32')]));return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x179b7d[_0x32b8('0x15f')]||_0x179b7d['label']);};AGIVertices[_0x32b8('0x16')][_0x32b8('0x160')]=function(_0x4ad3ae){logger[_0x32b8('0x29')](util[_0x32b8('0x26')]('Enter\x20in\x20PAUSE\x20(%s)\x20block',_0x4ad3ae[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x4ad3ae[_0x32b8('0x14e')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x4ad3ae,_0x32b8('0x14f'));}logger['info'](util['format'](_0x32b8('0x150'),this[_0x32b8('0x31')]['callerid'],_0x4ad3ae[_0x32b8('0x14e')]));var _0x19077c=this['getPause'][_0x32b8('0x6a')](this,_0x4ad3ae[_0x32b8('0x161')]);var _0x471c1f=this['agentPause']['sync'](this,_0x4ad3ae[_0x32b8('0x14e')],_0x19077c);if(_0x471c1f){logger['info'](util[_0x32b8('0x26')](_0x32b8('0x151'),this['channel'][_0x32b8('0x34')],_0x4ad3ae['findBy']));this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x151'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x4ad3ae[_0x32b8('0x14e')]));return{'code':0xc8,'result':_0x32b8('0x155')};}else{logger[_0x32b8('0x29')](util['format'](_0x32b8('0x152'),this['channel'][_0x32b8('0x34')],_0x4ad3ae['findBy']));this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x151'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x4ad3ae[_0x32b8('0x14e')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x32b8('0x16')][_0x32b8('0x162')]=function(_0x57e2bb){logger['info'](util['format'](_0x32b8('0x163'),_0x57e2bb[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x57e2bb[_0x32b8('0x108')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x57e2bb,_0x32b8('0x15c'));}var _0x110969=this[_0x32b8('0x1a')]['sync'](this,_0x57e2bb[_0x32b8('0x108')]);if(!_0x110969){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x57e2bb,_0x32b8('0x109'));}var _0xa2747d=this[_0x32b8('0x31')][_0x32b8('0xaa')]('PLAYBACK',[_0x110969,_0x57e2bb['opts']]);if(_0xa2747d[_0x32b8('0x9e')]===-0x1){return _0xa2747d;}return this[_0x32b8('0x31')]['noop'](util['format']('Executed\x20command\x20%s\x20%s',_0x32b8('0x164'),_0x110969));};AGIVertices[_0x32b8('0x16')]['queue']=function(_0x1cdf43){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x165'),_0x1cdf43[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x1cdf43[_0x32b8('0x166')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x1cdf43,_0x32b8('0x167'));}var _0x2f1eb6='';var _0x5a4058=parseInt(_0x1cdf43[_0x32b8('0x166')],0xa);if(isNaN(_0x5a4058)){_0x2f1eb6=_0x1cdf43['queue_id'];}else{_0x2f1eb6=this[_0x32b8('0x10')][_0x32b8('0x6a')](this,_0x1cdf43['queue_id']);if(!_0x2f1eb6){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x1cdf43,_0x32b8('0x168'));}}var _0x172724='';if(this[_0x32b8('0x7d')](_0x1cdf43['file_id'])){var _0x28a615=this[_0x32b8('0x1a')][_0x32b8('0x6a')](this,_0x1cdf43[_0x32b8('0x108')]);if(_0x28a615){_0x172724=_0x28a615;}}this[_0x32b8('0x30')][_0x32b8('0x6a')](this,_0x1cdf43,_0x2f1eb6);if(_0x1cdf43['opts']['indexOf']('x')<0x0){_0x1cdf43['opts']+='x';}if(_0x1cdf43[_0x32b8('0xdd')][_0x32b8('0x169')]('X')<0x0){_0x1cdf43[_0x32b8('0xdd')]+='X';}this[_0x32b8('0x31')]['setVariable'](_0x32b8('0x16a'),_0x2f1eb6?_0x2f1eb6['toLowerCase']():'');var _0x38a1b1=this['channel'][_0x32b8('0xaa')]('QUEUE',[_0x2f1eb6,_0x1cdf43[_0x32b8('0xdd')],_0x1cdf43['url'],_0x172724,_0x1cdf43[_0x32b8('0x61')],_0x1cdf43[_0x32b8('0x5')],_0x1cdf43[_0x32b8('0x16b')],_0x1cdf43[_0x32b8('0x16c')],'',_0x1cdf43[_0x32b8('0x16d')]]);if(_0x38a1b1[_0x32b8('0x9e')]===-0x1){return _0x38a1b1;}return this[_0x32b8('0x31')]['noop'](util[_0x32b8('0x26')]('Executed\x20command\x20%s\x20%s','QUEUE',_0x2f1eb6));};AGIVertices['prototype'][_0x32b8('0x16e')]=function(_0x310e8b){logger[_0x32b8('0x29')](util['format'](_0x32b8('0x16f'),_0x310e8b['label']));var _0x47b85a=_0x310e8b[_0x32b8('0x170')]||_0x32b8('0x12a');var _0x696acd=util[_0x32b8('0x26')](_0x32b8('0x171'),this[_0x32b8('0x31')]['uniqueid'],rs[_0x32b8('0x111')](0x5));var _0x1e9a63=util[_0x32b8('0x26')](_0x32b8('0x172'),FILES_PATH,_0x696acd,_0x47b85a);var _0x2a1aaf=util['format']('%s/recordings/%s',FILES_PATH,_0x696acd);this[_0x32b8('0x35')][_0x32b8('0x6a')](this,_0x310e8b,_0x696acd,_0x1e9a63);this[_0x32b8('0x31')][_0x32b8('0x97')](_0x32b8('0x173'),_0x696acd);logger[_0x32b8('0x29')](_0x32b8('0x174'),_0x2a1aaf,_0x47b85a,_0x310e8b[_0x32b8('0x175')],_0x310e8b[_0x32b8('0x61')]);return this[_0x32b8('0x31')][_0x32b8('0x176')](_0x2a1aaf,_0x47b85a,_0x310e8b[_0x32b8('0x175')],_0x310e8b[_0x32b8('0x61')],undefined,!![]);};AGIVertices[_0x32b8('0x16')][_0x32b8('0x177')]=function(_0x241c74){logger[_0x32b8('0x29')](util['format']('Enter\x20in\x20RESTAPI\x20(%s)\x20block',_0x241c74[_0x32b8('0x32')]));if(!this['isConfigured'](_0x241c74[_0x32b8('0x6b')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0x178'));}var _0x5669a9=this[_0x32b8('0x5f')]['sync'](this,_0x241c74);logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x179'),util['inspect'](_0x5669a9,{'showHidden':![],'depth':null})));if(!this[_0x32b8('0x7d')](_0x241c74[_0x32b8('0xd2')])){return this[_0x32b8('0x31')]['noop']('no\x20variable\x20selected\x20for\x20the\x20response');}var _0x42b69b=this[_0x32b8('0xd')][_0x32b8('0x6a')](this,_0x241c74[_0x32b8('0xd2')]);if(!_0x42b69b){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x241c74,_0x32b8('0x10f'));}this[_0x32b8('0x31')][_0x32b8('0x97')](util['format']('%s_STATUS_CODE',_0x42b69b),_0x5669a9[_0x32b8('0x6f')]?_0x5669a9['statusCode']:'200');this[_0x32b8('0x31')][_0x32b8('0x97')](util[_0x32b8('0x26')](_0x32b8('0x17a'),_0x42b69b),_0x5669a9[_0x32b8('0x70')]?_0x5669a9[_0x32b8('0x70')]:'OK');if(_0x5669a9[_0x32b8('0x64')]){try{this['saveRestApiResult'](_0x5669a9[_0x32b8('0x64')],_0x42b69b);}catch(_0x1d7036){logger[_0x32b8('0x2e')](util[_0x32b8('0x26')](_0x32b8('0x17b'),_0x42b69b));}}return this[_0x32b8('0x31')]['noop'](util[_0x32b8('0x26')]('variable\x20%s\x20set',_0x42b69b));};AGIVertices[_0x32b8('0x16')][_0x32b8('0x17c')]=function(_0x3c7119){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x17d'),_0x3c7119['label']));return this[_0x32b8('0x31')][_0x32b8('0x17e')](_0x3c7119[_0x32b8('0x17f')][_0x32b8('0x53')](/\s+/g,''),_0x3c7119[_0x32b8('0x175')]);};AGIVertices[_0x32b8('0x16')][_0x32b8('0x180')]=function(_0x26880c){logger[_0x32b8('0x29')](util['format'](_0x32b8('0x181'),_0x26880c[_0x32b8('0x32')]));return this['channel'][_0x32b8('0x182')](_0x26880c[_0x32b8('0x183')][_0x32b8('0x53')](/\s+/g,''),_0x26880c[_0x32b8('0x175')]);};AGIVertices[_0x32b8('0x16')]['sayphonetic']=function(_0xdc33df){logger[_0x32b8('0x29')](util['format'](_0x32b8('0x184'),_0xdc33df['label']));return this[_0x32b8('0x31')]['sayPhonetic'](_0xdc33df[_0x32b8('0x56')],_0xdc33df[_0x32b8('0x175')]);};AGIVertices['prototype']['sendMail']=function(_0x2d4095){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x185'),_0x2d4095[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x2d4095[_0x32b8('0x186')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0x187'));}var _0x45bb2a=this[_0x32b8('0x188')]['sync'](this,_0x2d4095[_0x32b8('0x186')]);if(!_0x45bb2a||!_0x45bb2a[_0x32b8('0x189')]){return this[_0x32b8('0x31')]['error'](_0x2d4095,_0x32b8('0x18a'));}var _0x41269e={'from':util[_0x32b8('0x26')]('\x22%s\x22\x20<%s>',_0x45bb2a[_0x32b8('0x12')],_0x45bb2a[_0x32b8('0x18b')]||_0x45bb2a[_0x32b8('0x189')]['user']),'to':_0x2d4095['to']||'','cc':_0x2d4095['cc']||'','bcc':_0x2d4095[_0x32b8('0x18c')]||'','subject':_0x2d4095[_0x32b8('0x18d')],'html':_0x2d4095[_0x32b8('0x56')],'text':_0x2d4095['text']};if(this[_0x32b8('0x7d')](_0x2d4095[_0x32b8('0x18e')])){}logger['debug'](_0x32b8('0x18f'),JSON[_0x32b8('0x6d')](_0x41269e));this['createSquareDetailsReport'][_0x32b8('0x6a')](this,_0x2d4095,_0x2d4095[_0x32b8('0x186')]);this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')]('Trying\x20SendMail\x20with\x20account\x20%s',_0x45bb2a[_0x32b8('0x12')]));this[_0x32b8('0x1f')]['sync'](this,_0x45bb2a[_0x32b8('0x190')],_0x41269e);return this[_0x32b8('0x31')][_0x32b8('0xa4')]('Mail\x20message\x20added\x20to\x20outgoing\x20process');};AGIVertices[_0x32b8('0x16')]['sendFax']=function(_0x3cd177){logger['info'](util[_0x32b8('0x26')](_0x32b8('0x191'),_0x3cd177['label']));return this['channel']['noop']('SENDFAX\x20block\x20not\x20implemented');};AGIVertices[_0x32b8('0x16')][_0x32b8('0x192')]=function(_0x41e410){logger['info'](util['format'](_0x32b8('0x193'),_0x41e410[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x41e410[_0x32b8('0x194')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0x195'));}var _0xec689a=this[_0x32b8('0x196')][_0x32b8('0x6a')](this,_0x41e410[_0x32b8('0x194')]);if(!_0xec689a){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x41e410,'no\x20sms\x20account\x20found');}var _0xc209bd={'body':_0x41e410['sms_text'],'phone':_0x41e410['to']||'','SmsAccountId':_0xec689a['id']};logger[_0x32b8('0xd8')](_0x32b8('0x197'),JSON[_0x32b8('0x6d')](_0xc209bd));this[_0x32b8('0x30')]['sync'](this,_0x41e410,_0x41e410[_0x32b8('0x194')]);this['channel'][_0x32b8('0xa4')](util['format'](_0x32b8('0x198'),_0xec689a[_0x32b8('0x12')]));this[_0x32b8('0x2f')]['sync'](this,_0xc209bd);return this[_0x32b8('0x31')]['noop'](_0x32b8('0x199'));};AGIVertices[_0x32b8('0x16')][_0x32b8('0x19a')]=function(_0x1b1e29){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x19b'),_0x1b1e29[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0x1b1e29[_0x32b8('0xd2')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x1b1e29,_0x32b8('0x19c'));}var _0x1a7098=this[_0x32b8('0xd')][_0x32b8('0x6a')](this,_0x1b1e29[_0x32b8('0xd2')]);if(!_0x1a7098){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x1b1e29,_0x32b8('0x10f'));}return this[_0x32b8('0x31')][_0x32b8('0x97')](_0x1a7098,_0x1b1e29['variable_value']);};AGIVertices[_0x32b8('0x16')][_0x32b8('0x19d')]=function(_0x1bc2fb){logger['info'](util['format'](_0x32b8('0x19e'),_0x1bc2fb['label']));this[_0x32b8('0x31')]['noop'](_0x32b8('0x19f'));var _0x5d570f=this[_0x32b8('0x31')][_0x32b8('0xd')]('XMCS-UNIQUEID');if(!_[_0x32b8('0x3f')](_0x5d570f[_0x32b8('0x9c')])){this['channel']['uniqueid']=_0x5d570f[_0x32b8('0x9c')];}if(_0x1bc2fb[_0x32b8('0xb2')]===_0x32b8('0x1a0')){this[_0x32b8('0x31')]['noop']('Answer');return this[_0x32b8('0x31')][_0x32b8('0xb2')]();}return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0x1a1'));};AGIVertices['prototype'][_0x32b8('0x1a2')]=function(_0x4e2706){logger['info'](util[_0x32b8('0x26')](_0x32b8('0x1a3'),_0x4e2706[_0x32b8('0x32')]));if(!this['isConfigured'](_0x4e2706[_0x32b8('0x1a4')])){return this['channel']['error'](_0x4e2706,_0x32b8('0x1a5'));}var _0x1ef7bf=this['getSquareProject'][_0x32b8('0x6a')](this,_0x4e2706[_0x32b8('0x1a4')]);if(!this[_0x32b8('0x7d')](_0x1ef7bf)){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x4e2706,util['format'](_0x32b8('0x1a6'),_0x4e2706[_0x32b8('0x1a4')]));}if(_0x1ef7bf===this[_0x32b8('0x31')][_0x32b8('0x3b')]){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x4e2706,_0x32b8('0x1a7'));}this['createSquareDetailsReport'][_0x32b8('0x6a')](this,_0x4e2706,_0x1ef7bf);var _0xd2fce2=this['channel'][_0x32b8('0xaa')]('AGI',util['format'](_0x32b8('0x1a8'),config[_0x32b8('0x5')]['host']||_0x32b8('0x1a9'),_0x1ef7bf,this[_0x32b8('0x31')][_0x32b8('0x3b')]));if(_0xd2fce2[_0x32b8('0x9e')]===-0x1){return _0xd2fce2;}return this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0xbd'),_0x32b8('0x1aa'),_0x1ef7bf));};AGIVertices[_0x32b8('0x16')]['system']=function(_0x5ac6b2){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x1ab'),_0x5ac6b2[_0x32b8('0x32')]));var _0x4d4dc1=this[_0x32b8('0x1ac')][_0x32b8('0x6a')](this,_0x5ac6b2[_0x32b8('0xb0')]);this[_0x32b8('0x30')][_0x32b8('0x6a')](this,_0x5ac6b2,_0x5ac6b2[_0x32b8('0xb0')]);if(this[_0x32b8('0x7d')](_0x5ac6b2['variable_id'])){var _0x1bab8c=this[_0x32b8('0xd')][_0x32b8('0x6a')](this,_0x5ac6b2[_0x32b8('0xd2')]);if(_0x1bab8c){this[_0x32b8('0x31')][_0x32b8('0x97')](_0x1bab8c,_0x4d4dc1);return this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x1ad'),_0x5ac6b2[_0x32b8('0xb0')],_0x1bab8c));}}return this['channel'][_0x32b8('0xa4')](util['format'](_0x32b8('0x1ae'),_0x5ac6b2[_0x32b8('0xb0')]));};AGIVertices[_0x32b8('0x16')][_0x32b8('0x1af')]=function(_0x4c1d96){logger['info'](util[_0x32b8('0x26')](_0x32b8('0x1b0'),_0x4c1d96[_0x32b8('0x32')]));_0x4c1d96[_0x32b8('0x56')]=_0x4c1d96['text'][_0x32b8('0x53')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0x32b8('0x7d')](_0x4c1d96[_0x32b8('0x55')])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0x1b1'));}if(!this[_0x32b8('0x7d')](_0x4c1d96[_0x32b8('0x56')])){return this[_0x32b8('0x31')][_0x32b8('0xa4')](_0x32b8('0xa2'));}this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')]('Trying\x20Google\x20Cloud\x20TTS\x20%s',_0x4c1d96[_0x32b8('0x56')]));var _0x16a8c5=this['googleCloudTTS'][_0x32b8('0x6a')](this,_0x4c1d96);if(_0x16a8c5){this[_0x32b8('0x31')][_0x32b8('0xa4')](util['format']('Google\x20Cloud\x20TTS\x20%s\x20file\x20created',_0x16a8c5));var _0x214267=this[_0x32b8('0x31')]['streamFile'](_0x16a8c5);try{fs[_0x32b8('0x11d')](_0x16a8c5+_0x32b8('0xfc'));}catch(_0x3aabdf){logger[_0x32b8('0x2e')](_0x3aabdf);}return _0x214267;}return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x4c1d96,_0x32b8('0x1b2'));};AGIVertices[_0x32b8('0x16')]['tts']=function(_0x179cb3){logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x1b3'),_0x179cb3['label']));_0x179cb3[_0x32b8('0x56')]=_0x179cb3[_0x32b8('0x56')][_0x32b8('0x53')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0x32b8('0x7d')](_0x179cb3[_0x32b8('0x56')])){return this[_0x32b8('0x31')]['noop'](_0x32b8('0xa2'));}this[_0x32b8('0x31')][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x1b4'),_0x179cb3[_0x32b8('0x56')]));var _0x2a2120=this[_0x32b8('0x5d')][_0x32b8('0x6a')](this,_0x179cb3);if(_0x2a2120){this[_0x32b8('0x31')][_0x32b8('0xa4')](util['format'](_0x32b8('0x1b5'),_0x2a2120));var _0x4afef6=this[_0x32b8('0x31')]['streamFile'](_0x2a2120);try{fs[_0x32b8('0x11d')](_0x2a2120+_0x32b8('0xfc'));}catch(_0x20c503){logger[_0x32b8('0x2e')](_0x20c503);}return _0x4afef6;}return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x179cb3,_0x32b8('0x1b6'));};AGIVertices['prototype'][_0x32b8('0x1b7')]=function(_0x228417){logger['info'](util['format']('Enter\x20in\x20UNPAUSE\x20(%s)\x20block',_0x228417['label']));if(!this[_0x32b8('0x7d')](_0x228417[_0x32b8('0x14e')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0x228417,'no\x20find\x20by\x20configured');}logger[_0x32b8('0x29')](util[_0x32b8('0x26')](_0x32b8('0x150'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x228417[_0x32b8('0x14e')]));var _0x4744c7=this[_0x32b8('0x4b')][_0x32b8('0x6a')](this,_0x228417[_0x32b8('0x14e')]);if(_0x4744c7){logger[_0x32b8('0x29')](util['format'](_0x32b8('0x151'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x228417[_0x32b8('0x14e')]));this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0x151'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x228417[_0x32b8('0x14e')]));return{'code':0xc8,'result':_0x32b8('0x155')};}else{logger[_0x32b8('0x29')](util['format'](_0x32b8('0x152'),this['channel'][_0x32b8('0x34')],_0x228417[_0x32b8('0x14e')]));this[_0x32b8('0x31')]['noop'](util[_0x32b8('0x26')](_0x32b8('0x152'),this[_0x32b8('0x31')][_0x32b8('0x34')],_0x228417[_0x32b8('0x14e')]));return{'code':0xc8,'result':_0x32b8('0x1b8')};}};AGIVertices[_0x32b8('0x16')][_0x32b8('0x1b9')]=function(_0x353bfa){logger[_0x32b8('0x29')](util['format'](_0x32b8('0x1ba'),_0x353bfa['label']));var _0x30de5c=this[_0x32b8('0x31')]['exec'](_0x32b8('0x1bb'),[_0x353bfa['mailbox'],_0x353bfa[_0x32b8('0x73')]]);if(_0x30de5c['result']===-0x1){return _0x30de5c;}return this['channel'][_0x32b8('0xa4')](util[_0x32b8('0x26')](_0x32b8('0xbd'),'VOICEMAIL',_0x353bfa['mailbox']));};AGIVertices['prototype'][_0x32b8('0x1bc')]=function(_0xdf2888){logger['info'](util[_0x32b8('0x26')](_0x32b8('0x1bd'),_0xdf2888[_0x32b8('0x32')]));if(!this[_0x32b8('0x7d')](_0xdf2888[_0x32b8('0xd2')])){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0xdf2888,_0x32b8('0x19c'));}var _0x118bf5=this[_0x32b8('0xd')][_0x32b8('0x6a')](this,_0xdf2888[_0x32b8('0xd2')]);if(!_0x118bf5){return this[_0x32b8('0x31')][_0x32b8('0x2e')](_0xdf2888,_0x32b8('0x10f'));}var _0xd9151b=this[_0x32b8('0x31')][_0x32b8('0xd')](_0x118bf5);return{'code':0xc8,'result':_0xd9151b[_0x32b8('0x9c')]?_0xd9151b[_0x32b8('0x9c')]:'-'};};String[_0x32b8('0x16')][_0x32b8('0x9b')]=function(_0x7ed552,_0x428395){return this[_0x32b8('0x99')](_0x7ed552)['join'](_0x428395);};module['exports']=AGIVertices;