Built motion from commit 14588770.|2.5.38
[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 _0x1ed5=['catch','getSquareProject','getSquareOdbc','getSquareOdbcById','getUserById','getTrunk','getSound','getSoundById','getSoundPath','getMailAccount','getMailAccountById','sendMailMessage','IntervalId','Intervals','interval','format','getQueryOdbc','open','error','ODBC\x20connection\x20successfully','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccountById','createSmsMessage','createSquareDetailsReport','channel','uniqueid','label','agicommand','callerid','createSquareRecording','calleridname','context','extension','accountcode','dnid','arg_1','file','createSquareMessage','createCmContact','isNil','callback_','random','lastName','phone','list_id','scheduledAt','toString','callback_priority','getPause','getPauseById','agent','agentPause','agentUnpause','agentLogout','%s/%s@from-sip/n','LOCAL','shellCommand','googleCloudTTS','text','languageCode','ssmlGender','googleTTS','google_tts_language','restAPI','url','method','timeout','number','includes','POST','PUT','body','parse','rawBody','headers','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','sync','render','stringify','statusCode','statusMessage','message','googleDialogflow','key','dialogflow_language','googleDialogflowV2','client_email','sestekNDA','ispeechTTS','speed','ispeechASR','ispeech_asr_language','en-US','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region','aws_polly_voice','Amy','aws_text_type','awsLex','aws_lex_region','googleASR','tildeASR','appid','uri','isString','replaceObjectAllVariables','replaceAllVariables','hasOwnProperty','isPlainObject','recursiveNodeIndex','isArray','saveRestApiResult','%s.%s','length','setVariable','split','replaceAll','extra','getAndSetVariable','getVariable','result','info','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','retry','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','no\x20text\x20configured','options','noop','Executed\x20command\x20MRCPSynth\x20%s','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','no\x20grammar\x20configured','grammar','MRCPRecog','RECOG_INPUT()','RECOG_INSTANCE()','Executed\x20command\x20MRCPRecog\x20%s','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','callback','no\x20list\x20selected','delay','add','minutes','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','exec','Executed\x20command\x20%s\x20%s','application','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','RECOG_CONFIDENCE()','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','sestekasr','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_INSTANCE','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20database\x20selected','no\x20odbc\x20database\x20found','no\x20query\x20configured','replace','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','forEach','keys','%s[%s][%s]','%s_ROWS_COUNT','variable\x20%s\x20set','dial','debug','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','no\x20user\x20selected','no\x20user\x20found','SIP/%s','opts','DIAL','dialogflow','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','no\x20key\x20configured','DIALOGFLOW_%s','toUpperCase','speech','out','Dialogflow\x20Result\x20%s','Dialogflow\x20is\x20unreachable','dialogflowV2','Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block','no\x20project_id\x20configured','no\x20client_email\x20configured','private_key','dialogflowV2_language','bot','providerResponse','DialogflowV2\x20Result\x20%s','DialogflowV2\x20is\x20unreachable','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','username','no\x20username\x20configured','password','no\x20password\x20configured','ndassistant_url','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','sesteknda','Sestek\x20NDA\x20%s\x20file\x20created','streamFile','audiofile','.wav','SestekNDA\x20is\x20unreachable','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','trunk_name','SIP/%s/%s','Executed\x20command\x20%s','finally','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','maxRetry','file_id','no\x20file\x20audio\x20selected','no\x20file\x20audio\x20found','getData','response','maxdigit','mindigit','no\x20variable\x20found','hiddendigitsnum','generate','first','substr','getsecretdigits','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','awspolly','no\x20valid\x20credentials\x20configured','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20%s\x20file\x20created','unlink','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','aws_bot_name','no\x20bot\x20name\x20configured','Amazon\x20Lex\x20ready\x20for\x20fulfillment','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','wav','%s/recordings/%s','NOBEEP','recordFile','intKey','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','no\x20appid\x20configured','no\x20appsecret\x20configured','beep','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','priority','gotoif','condition','no\x20condition\x20configured','true','false','EVAL\x20CONDITION\x20%s\x20%s','gotoiftime','interval_id','no\x20interval\x20configured','getIntervals','no\x20intervals\x20found','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','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','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','no\x20find\x20by\x20configured','agentLogin','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','math','Enter\x20in\x20MATH\x20(%s)\x20block','operation','no\x20operation\x20configured','math\x20%s','%s[%s]','variable\x20%s[key]\x20set','menu','Enter\x20in\x20MENU\x20(%s)\x20block','digit','isEmpty','Enter\x20in\x20NOOP\x20(%s)\x20block','output','Enter\x20in\x20PAUSE\x20(%s)\x20block','FIND\x20AGENT\x20%s\x20BY\x20%s','pause_id','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','queue_id','indexOf','XMCS-QUEUE','toLowerCase','macro','gosub','position','QUEUE','record','Enter\x20in\x20RECORD\x20(%s)\x20block','%s_%s','%s/recordings/%s.%s','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','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','sayDigits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','sayphonetic','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sayPhonetic','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','Smtp','no\x20mail\x20account\x20found','email','user','subject','service','host','port','secure','authentication','pass','template_id','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','sms_account_id','no\x20sms\x20account\x20configured','getSmsAccount','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','yes','Skipped\x20Answer','subproject','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','Enter\x20in\x20SYSTEM\x20(%s)\x20block','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','apiKey','no\x20apiKey\x20configured','Trying\x20Google\x20Cloud\x20TTS\x20%s','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','Google\x20Cloud\x20TTS\x20is\x20unreachable','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','voicemail','VOICEMAIL','Enter\x20in\x20SWITCH\x20(%s)\x20block','join','exports','path','util','lodash','shelljs','odbc','randomstring','moment','mustache','request-promise','../../config/logger','agi','../../config/environment','./scripts','/var/opt/motion2/server/files','rawHeaders','getdigits','rpc','mailRpc','prototype','getVariableById','then','getVoiceQueue','getVoiceQueueById','name'];(function(_0x47aa64,_0xfb8a07){var _0x549c7a=function(_0x266165){while(--_0x266165){_0x47aa64['push'](_0x47aa64['shift']());}};_0x549c7a(++_0xfb8a07);}(_0x1ed5,0x1ae));var _0x51ed=function(_0x42182d,_0x125b1a){_0x42182d=_0x42182d-0x0;var _0x26459b=_0x1ed5[_0x42182d];return _0x26459b;};'use strict';var fs=require('fs');var path=require(_0x51ed('0x0'));var util=require(_0x51ed('0x1'));var _=require(_0x51ed('0x2'));var sh=require(_0x51ed('0x3'));var odbc=require(_0x51ed('0x4'))();var rs=require(_0x51ed('0x5'));var moment=require(_0x51ed('0x6'));var Mustache=require(_0x51ed('0x7'));var rp=require(_0x51ed('0x8'));var logger=require(_0x51ed('0x9'))(_0x51ed('0xa'));var config=require(_0x51ed('0xb'));var scripts=require(_0x51ed('0xc'));var FILES_PATH=_0x51ed('0xd');var recursiveMapAttributes=[_0x51ed('0xe'),'rawBody'];var verticesWithRetry=['menu',_0x51ed('0xf'),'getsecretdigits'];var AGIVertices=function(_0x2d8540,_0x3637cb,_0x522881){this['channel']=_0x2d8540;this[_0x51ed('0x10')]=_0x3637cb;this[_0x51ed('0x11')]=_0x522881;};AGIVertices[_0x51ed('0x12')]['getVariable']=function(_0x56a830,_0x48b439){this[_0x51ed('0x10')][_0x51ed('0x13')](_0x56a830)[_0x51ed('0x14')](function(_0x2d3086){_0x48b439(null,_0x2d3086?_0x2d3086['name']:![]);})['catch'](function(_0x30beea){_0x48b439(_0x30beea);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x15')]=function(_0x325663,_0x5958bc){this[_0x51ed('0x10')][_0x51ed('0x16')](_0x325663)[_0x51ed('0x14')](function(_0xe4823e){_0x5958bc(null,_0xe4823e?_0xe4823e[_0x51ed('0x17')]:![]);})[_0x51ed('0x18')](function(_0x5db8fc){_0x5958bc(_0x5db8fc);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x19')]=function(_0x1dff89,_0xaa7ec){this['rpc']['getSquareProjectById'](_0x1dff89)['then'](function(_0xcadc48){_0xaa7ec(null,_0xcadc48?_0xcadc48[_0x51ed('0x17')]:![]);})[_0x51ed('0x18')](function(_0x38f20e){_0xaa7ec(_0x38f20e);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x1a')]=function(_0x393f81,_0x184f90){this['rpc'][_0x51ed('0x1b')](_0x393f81)[_0x51ed('0x14')](function(_0x461880){_0x184f90(null,_0x461880?_0x461880['dsn']:![]);})['catch'](function(_0x4a4c58){_0x184f90(_0x4a4c58);});};AGIVertices['prototype']['getUser']=function(_0x3d7b8b,_0x1dfec8){this['rpc'][_0x51ed('0x1c')](_0x3d7b8b)[_0x51ed('0x14')](function(_0x4736a2){_0x1dfec8(null,_0x4736a2?_0x4736a2[_0x51ed('0x17')]:![]);})[_0x51ed('0x18')](function(_0x3f29da){_0x1dfec8(_0x3f29da);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x1d')]=function(_0x559755,_0x13ea13){this['rpc']['getTrunkById'](_0x559755)['then'](function(_0x23e15d){_0x13ea13(null,_0x23e15d?_0x23e15d[_0x51ed('0x17')]:![]);})[_0x51ed('0x18')](function(_0x5ee7f6){_0x13ea13(_0x5ee7f6);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x1e')]=function(_0x369a40,_0x4c2ab0){var _0x586fd3=this;this[_0x51ed('0x10')][_0x51ed('0x1f')](_0x369a40)[_0x51ed('0x14')](function(_0x31d962){_0x4c2ab0(null,_0x31d962?_0x586fd3[_0x51ed('0x20')](_0x31d962['save_name']):![]);})[_0x51ed('0x18')](function(_0x34889d){_0x4c2ab0(_0x34889d);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x21')]=function(_0x4c9ae4,_0x59c2c3){this[_0x51ed('0x10')][_0x51ed('0x22')](_0x4c9ae4)['then'](function(_0xcd4a07){_0x59c2c3(null,_0xcd4a07?_0xcd4a07:![]);})[_0x51ed('0x18')](function(_0x275122){_0x59c2c3(_0x275122);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x23')]=function(_0x10b6e6,_0x3c310c,_0x1d97a6){this[_0x51ed('0x11')][_0x51ed('0x23')](_0x10b6e6,_0x3c310c)['then'](function(){_0x1d97a6(null);})[_0x51ed('0x18')](function(_0xefcc2e){_0x1d97a6(_0xefcc2e);});};AGIVertices[_0x51ed('0x12')]['getIntervals']=function(_0x29f730,_0x84c95a){this[_0x51ed('0x10')]['getIntervalById'](_0x29f730)['then'](function(_0x4b2432){if(_0x4b2432){if(_0x4b2432[_0x51ed('0x24')]){_0x84c95a(null,[_0x4b2432['interval']]);}else{_0x84c95a(null,_['map'](_0x4b2432[_0x51ed('0x25')],_0x51ed('0x26')));}}else{_0x84c95a(null,![]);}})[_0x51ed('0x18')](function(_0x4982b2){_0x84c95a(_0x4982b2);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x20')]=function(_0x4e212b){return util[_0x51ed('0x27')]('%s/sounds/converted/%s',FILES_PATH,_0x4e212b);};AGIVertices['prototype'][_0x51ed('0x28')]=function(_0x32ec4b,_0x1966cb,_0x312bb3){odbc[_0x51ed('0x29')](_0x32ec4b,function(_0x333f02){if(_0x333f02){logger[_0x51ed('0x2a')]('Error\x20getting\x20ODBC\x20connection\x20%s',_0x333f02);_0x312bb3(_0x333f02);}else{logger['info'](_0x51ed('0x2b'));odbc['query'](_0x1966cb,function(_0xb2456e,_0x533f6f){if(_0xb2456e){logger['info'](_0x51ed('0x2c'),_0x1966cb);_0x312bb3(_0xb2456e);}else{logger['info'](_0x51ed('0x2d'),_0x1966cb);odbc[_0x51ed('0x2e')](function(_0x4a3f9a){if(_0x4a3f9a){logger['error'](_0x51ed('0x2f'),_0x4a3f9a);}_0x312bb3(null,_0x533f6f);});}});}});};AGIVertices['prototype']['getSmsAccount']=function(_0xf9b94,_0x29525f){this[_0x51ed('0x10')][_0x51ed('0x30')](_0xf9b94)[_0x51ed('0x14')](function(_0x33cbaa){_0x29525f(null,_0x33cbaa?_0x33cbaa:![]);})[_0x51ed('0x18')](function(_0xcdda0a){_0x29525f(_0xcdda0a);});};AGIVertices['prototype'][_0x51ed('0x31')]=function(_0x15f6d6,_0xfdd6f2){this[_0x51ed('0x10')][_0x51ed('0x31')](_0x15f6d6)[_0x51ed('0x14')](function(_0x51a302){_0xfdd6f2(null,_0x51a302);})['catch'](function(_0x5db2cf){_0xfdd6f2(_0x5db2cf);});};AGIVertices['prototype'][_0x51ed('0x32')]=function(_0x42a193,_0x35a0d3,_0x390810){this[_0x51ed('0x10')]['createSquareDetailsReport']({'uniqueid':this[_0x51ed('0x33')][_0x51ed('0x34')],'node':_0x42a193[_0x51ed('0x35')],'application':_0x42a193[_0x51ed('0x36')],'data':_0x35a0d3||null,'project_name':this['channel']['arg_1'],'callerid':this[_0x51ed('0x33')][_0x51ed('0x37')]})['then'](function(_0x398da2){if(_0x390810){_0x390810(null,_0x398da2);}})[_0x51ed('0x18')](function(_0x2d31f2){if(_0x390810){_0x390810(_0x2d31f2);}});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x38')]=function(_0x32dfc9,_0x5b5981,_0x25b4c9,_0x3f170e){this[_0x51ed('0x10')]['createSquareRecording']({'uniqueid':this[_0x51ed('0x33')]['uniqueid'],'callerid':this[_0x51ed('0x33')][_0x51ed('0x37')],'calleridname':this[_0x51ed('0x33')][_0x51ed('0x39')],'context':this[_0x51ed('0x33')][_0x51ed('0x3a')],'extension':this['channel'][_0x51ed('0x3b')],'priority':this[_0x51ed('0x33')]['priority'],'accountcode':this[_0x51ed('0x33')][_0x51ed('0x3c')],'dnid':this[_0x51ed('0x33')][_0x51ed('0x3d')],'projectName':this[_0x51ed('0x33')][_0x51ed('0x3e')],'saveName':_0x5b5981,'filename':_0x32dfc9[_0x51ed('0x3f')]||_0x5b5981,'savePath':_0x25b4c9})[_0x51ed('0x14')](function(_0x19e046){_0x3f170e(null,_0x19e046);})[_0x51ed('0x18')](function(_0x4ba0ad){_0x3f170e(_0x4ba0ad);});};AGIVertices[_0x51ed('0x12')]['createSquareMessage']=function(_0x247e41,_0x275fa8,_0x443d86,_0x3981e4,_0x339c4e){this[_0x51ed('0x10')][_0x51ed('0x40')]({'uniqueid':this[_0x51ed('0x33')][_0x51ed('0x34')],'body':_0x247e41,'direction':_0x275fa8,'providerName':_0x443d86,'providerResponse':_0x3981e4})[_0x51ed('0x14')](function(_0x156a5f){if(_0x339c4e){_0x339c4e(null,_0x156a5f);}})[_0x51ed('0x18')](function(_0x153046){if(_0x339c4e){_0x339c4e(_0x153046);}});};AGIVertices['prototype']['createCmContact']=function(_0x3f0a7a,_0x5c4941){this['rpc'][_0x51ed('0x41')]({'firstName':_['isEmpty'](_0x3f0a7a[_0x51ed('0x17')])||_[_0x51ed('0x42')](_0x3f0a7a['name'])?_0x51ed('0x43')+Math[_0x51ed('0x44')]():_0x3f0a7a[_0x51ed('0x17')],'lastName':_['isEmpty'](_0x3f0a7a['lastName'])||_[_0x51ed('0x42')](_0x3f0a7a[_0x51ed('0x45')])?null:_0x3f0a7a[_0x51ed('0x45')],'phone':_0x3f0a7a[_0x51ed('0x46')],'ListId':_0x3f0a7a[_0x51ed('0x47')],'scheduledat':_0x3f0a7a[_0x51ed('0x48')],'callbackUniqueid':this[_0x51ed('0x33')]['uniqueid'],'tags':'callback','description':'Callback\x20scheduled\x20at\x20'+_0x3f0a7a['scheduledAt'][_0x51ed('0x49')](),'priority':_0x3f0a7a[_0x51ed('0x4a')]})['then'](function(_0x5412bd){_0x5c4941(null,_0x5412bd);})[_0x51ed('0x18')](function(_0xaf769d){_0x5c4941(_0xaf769d);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x4b')]=function(_0xacac8a,_0x530a65){this[_0x51ed('0x10')][_0x51ed('0x4c')](_0xacac8a)[_0x51ed('0x14')](function(_0x52dc05){_0x530a65(null,_0x52dc05?_0x52dc05[_0x51ed('0x17')]:![]);})['catch'](function(_0x57baab){_0x530a65(_0x57baab);});};AGIVertices['prototype']['agentPause']=function(_0x525ae4,_0x165785,_0x26dcfc){var _0x2b31a9={'role':_0x51ed('0x4d')};_0x2b31a9[_0x525ae4]=this[_0x51ed('0x33')]['callerid'];this[_0x51ed('0x10')][_0x51ed('0x4e')](_0x2b31a9,_0x165785,this['channel'][_0x51ed('0x34')])[_0x51ed('0x14')](function(_0x1b745e){_0x26dcfc(null,_[_0x51ed('0x42')](_0x1b745e)?![]:!![]);})[_0x51ed('0x18')](function(_0x3205de){logger[_0x51ed('0x2a')](_0x3205de);_0x26dcfc(null,![]);});};AGIVertices[_0x51ed('0x12')]['agentUnpause']=function(_0x307f3c,_0x4a7d1d){var _0x417b4f={'role':_0x51ed('0x4d')};_0x417b4f[_0x307f3c]=this['channel']['callerid'];this['rpc'][_0x51ed('0x4f')](_0x417b4f)['then'](function(_0x13855c){_0x4a7d1d(null,_[_0x51ed('0x42')](_0x13855c)?![]:!![]);})['catch'](function(_0xe426a5){logger[_0x51ed('0x2a')](_0xe426a5);_0x4a7d1d(null,![]);});};AGIVertices['prototype'][_0x51ed('0x50')]=function(_0x34dc0d,_0x4e3f53){var _0x8b8170={'role':_0x51ed('0x4d')};_0x8b8170[_0x34dc0d]=this[_0x51ed('0x33')][_0x51ed('0x37')];this[_0x51ed('0x10')][_0x51ed('0x50')](_0x8b8170)['then'](function(_0x2ba6e4){_0x4e3f53(null,_['isNil'](_0x2ba6e4)?![]:!![]);})[_0x51ed('0x18')](function(_0x567877){logger['error'](_0x567877);_0x4e3f53(null,![]);});};AGIVertices['prototype']['agentLogin']=function(_0x33eb3f,_0x4da472){var _0x4104b1={'role':_0x51ed('0x4d')};_0x4104b1[_0x33eb3f]=this[_0x51ed('0x33')]['callerid'];var _0xc5e491=_0x33eb3f!='internal'?util[_0x51ed('0x27')](_0x51ed('0x51'),_0x51ed('0x52'),this[_0x51ed('0x33')][_0x51ed('0x37')]):undefined;this['rpc']['agentLogin'](_0x4104b1,_0xc5e491)[_0x51ed('0x14')](function(_0x524121){_0x4da472(null,_[_0x51ed('0x42')](_0x524121)?![]:!![]);})[_0x51ed('0x18')](function(_0x5f3237){logger[_0x51ed('0x2a')](_0x5f3237);_0x4da472(null,![]);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x53')]=function(_0x234094,_0xd70653){sh['exec'](_['trim'](_0x234094),function(_0x2ee4ac,_0x2a489b){var _0x3ee5e6=_0x2a489b['replace'](/(\r\n|\n|\r)/gm,'');_0xd70653(null,_0x3ee5e6);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x54')]=function(_0x14fbf5,_0x5eef55){scripts[_0x51ed('0x54')](_0x14fbf5['apiKey'],_0x14fbf5['google_cloud_tts_text_type']||_0x51ed('0x55'),_0x14fbf5[_0x51ed('0x55')],_0x14fbf5[_0x51ed('0x56')]||'en-US',_0x14fbf5[_0x51ed('0x57')]||'MALE',_0x14fbf5['audioEncoding']||'MP3')['then'](function(_0x21feb2){_0x5eef55(null,_0x21feb2);})[_0x51ed('0x18')](function(_0x33c9a1){_0x5eef55(_0x33c9a1);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x58')]=function(_0x39920b,_0x1fea2a){scripts[_0x51ed('0x58')](_0x39920b['text'],_0x39920b[_0x51ed('0x59')]||'en',0x1)[_0x51ed('0x14')](function(_0x2a8a71){_0x1fea2a(null,_0x2a8a71);})[_0x51ed('0x18')](function(_0x1ee3dd){_0x1fea2a(_0x1ee3dd);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x5a')]=function(_0x40a59d,_0x4ee545){var _0x4a84a8={'uri':_0x40a59d[_0x51ed('0x5b')],'method':_0x40a59d[_0x51ed('0x5c')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x40a59d[_0x51ed('0x5d')])===_0x51ed('0x5e')&&parseInt(_0x40a59d[_0x51ed('0x5d')])>=0x1?parseInt(_0x40a59d[_0x51ed('0x5d')])*0x3e8:0x5*0x3e8};if(_[_0x51ed('0x5f')]([_0x51ed('0x60'),_0x51ed('0x61')],_0x4a84a8['method']['toUpperCase']())){try{_0x4a84a8[_0x51ed('0x62')]=_0x40a59d['rawBody']?JSON[_0x51ed('0x63')](_0x40a59d[_0x51ed('0x64')]):{};}catch(_0x48b830){logger[_0x51ed('0x2a')]('An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function',_0x48b830);}}try{_0x4a84a8[_0x51ed('0x65')]=_0x40a59d[_0x51ed('0xe')]?JSON['parse'](_0x40a59d[_0x51ed('0xe')]):{};}catch(_0x42ca32){logger['error'](_0x51ed('0x66'),_0x42ca32);}if(_0x40a59d[_0x51ed('0x67')]){try{var _0x145d98=require(_0x40a59d[_0x51ed('0x67')])[_0x51ed('0x68')](this,_0x4a84a8);_0x4a84a8['uri']=Mustache[_0x51ed('0x69')](_0x40a59d['url'],_0x145d98,{},['$$','$$']);if(_0x4a84a8[_0x51ed('0x65')]){_0x4a84a8[_0x51ed('0x65')]=JSON[_0x51ed('0x63')](Mustache[_0x51ed('0x69')](JSON[_0x51ed('0x6a')](_0x4a84a8['headers']),_0x145d98,{},['$$','$$']));}if(_0x4a84a8[_0x51ed('0x62')]){_0x4a84a8[_0x51ed('0x62')]=JSON[_0x51ed('0x63')](Mustache[_0x51ed('0x69')](JSON[_0x51ed('0x6a')](_0x4a84a8[_0x51ed('0x62')]),_0x145d98,{},['$$','$$']));}}catch(_0x1b93cb){logger['error']('An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function',_0x1b93cb);}}rp(_0x4a84a8)[_0x51ed('0x14')](function(_0x22dabd){var _0x53b78b={'statusCode':_0x22dabd[_0x51ed('0x6b')]||0xc8,'statusMessage':_0x22dabd[_0x51ed('0x6c')]||'OK','headers':_0x22dabd[_0x51ed('0x65')]||{},'body':_0x22dabd['body']||{}};_0x4ee545(null,_0x53b78b);})[_0x51ed('0x18')](function(_0x12d73c){var _0x6bfe81={'statusCode':_0x12d73c[_0x51ed('0x6b')]||0x1f4,'statusMessage':_0x12d73c[_0x51ed('0x6d')]||'500\x20-\x20Internal\x20Server\x20Error','headers':_0x12d73c['options'][_0x51ed('0x65')]||{},'body':_0x12d73c['options'][_0x51ed('0x62')]||{}};_0x4ee545(null,_0x6bfe81);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x6e')]=function(_0x460397,_0x16c6cc){scripts[_0x51ed('0x6e')](this[_0x51ed('0x33')][_0x51ed('0x34')],_0x460397[_0x51ed('0x6f')],_0x460397[_0x51ed('0x55')],_0x460397[_0x51ed('0x70')]||'en')[_0x51ed('0x14')](function(_0x53d8c2){_0x16c6cc(null,_0x53d8c2);})['catch'](function(_0x2d4b1e){_0x16c6cc(_0x2d4b1e);});};AGIVertices['prototype'][_0x51ed('0x71')]=function(_0x13f8c9,_0x28dbdc){scripts[_0x51ed('0x71')](this[_0x51ed('0x33')][_0x51ed('0x34')],_0x13f8c9['dialogflowV2_project_id'],_0x13f8c9[_0x51ed('0x72')],_0x13f8c9['private_key'],_0x13f8c9[_0x51ed('0x55')],_0x13f8c9['dialogflowV2_language']||'en')['then'](function(_0x2d138d){_0x28dbdc(null,_0x2d138d);})[_0x51ed('0x18')](function(_0x1e6a03){_0x28dbdc(_0x1e6a03);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x73')]=function(_0x17a493,_0x38b96f){scripts[_0x51ed('0x73')](this['channel'],_0x17a493)[_0x51ed('0x14')](function(_0x1cddf0){_0x38b96f(null,_0x1cddf0);})[_0x51ed('0x18')](function(_0x318aab){_0x38b96f(_0x318aab);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x74')]=function(_0x46ca89,_0x1997a8){scripts[_0x51ed('0x74')](_0x46ca89[_0x51ed('0x6f')],_0x46ca89[_0x51ed('0x55')],_0x46ca89['ispeech_tts_language']||'en-US',_0x46ca89[_0x51ed('0x75')])[_0x51ed('0x14')](function(_0x4a3790){_0x1997a8(null,_0x4a3790);})[_0x51ed('0x18')](function(_0x4245ab){_0x1997a8(_0x4245ab);});};AGIVertices[_0x51ed('0x12')]['ispeechASR']=function(_0x350721,_0x5ba043,_0x2709de){scripts[_0x51ed('0x76')](_0x5ba043,_0x350721[_0x51ed('0x6f')],_0x350721[_0x51ed('0x77')]||_0x51ed('0x78'),this[_0x51ed('0x79')](_0x350721[_0x51ed('0x7a')])?_0x350721[_0x51ed('0x7a')]:undefined)['then'](function(_0x53ec52){_0x2709de(null,_0x53ec52);})['catch'](function(_0x7cbf09){_0x2709de(_0x7cbf09);});};AGIVertices['prototype'][_0x51ed('0x7b')]=function(_0x33f762,_0x4be008){scripts['awsPolly'](_0x33f762[_0x51ed('0x7c')],_0x33f762[_0x51ed('0x7d')],_0x33f762[_0x51ed('0x7e')],_0x33f762[_0x51ed('0x7f')]||_0x51ed('0x80'),_0x33f762[_0x51ed('0x55')],_0x33f762[_0x51ed('0x81')]||_0x51ed('0x55'))[_0x51ed('0x14')](function(_0x642c73){_0x4be008(null,_0x642c73);})['catch'](function(_0x26966e){_0x4be008(_0x26966e);});};AGIVertices[_0x51ed('0x12')][_0x51ed('0x82')]=function(_0x35a89c,_0x746436){scripts[_0x51ed('0x82')](this[_0x51ed('0x33')][_0x51ed('0x34')],_0x35a89c[_0x51ed('0x7c')],_0x35a89c[_0x51ed('0x7d')],_0x35a89c[_0x51ed('0x83')],_0x35a89c[_0x51ed('0x55')],_0x35a89c['aws_bot_name'])[_0x51ed('0x14')](function(_0x1b8473){_0x746436(null,_0x1b8473);})[_0x51ed('0x18')](function(_0x198141){_0x746436(_0x198141);});};AGIVertices['prototype']['googleASR']=function(_0x241b51,_0x5e4dc0,_0x372e04){scripts[_0x51ed('0x84')](_0x5e4dc0,_0x241b51['key'],_0x241b51['google_asr_language']||_0x51ed('0x78'))[_0x51ed('0x14')](function(_0x51fbc1){_0x372e04(null,_0x51fbc1);})['catch'](function(_0x11c5f5){_0x372e04(_0x11c5f5);});};AGIVertices['prototype'][_0x51ed('0x85')]=function(_0x18a77f,_0x339c8b,_0x248f33){scripts[_0x51ed('0x85')](_0x339c8b,_0x18a77f[_0x51ed('0x86')],_0x18a77f['appsecret'],_0x18a77f[_0x51ed('0x87')])[_0x51ed('0x14')](function(_0x101a6b){_0x248f33(null,_0x101a6b);})[_0x51ed('0x18')](function(_0x11b318){_0x248f33(_0x11b318);});};AGIVertices[_0x51ed('0x12')]['clear']=function(_0x25ea3f){var _0x1bf8b3=_[_0x51ed('0x5f')](verticesWithRetry,_0x25ea3f[_0x51ed('0x36')])?_0x25ea3f:_['clone'](_0x25ea3f);for(var _0x4b9e43 in _0x1bf8b3){if(_0x1bf8b3['hasOwnProperty'](_0x4b9e43)){if(_0x1bf8b3[_0x4b9e43]&&_[_0x51ed('0x88')](_0x1bf8b3[_0x4b9e43])){if(_[_0x51ed('0x5f')](recursiveMapAttributes,_0x4b9e43)){_0x1bf8b3[_0x4b9e43]=this[_0x51ed('0x89')](_0x1bf8b3[_0x4b9e43]);}else{_0x1bf8b3[_0x4b9e43]=this[_0x51ed('0x8a')](_0x1bf8b3[_0x4b9e43]);}}}}return _0x1bf8b3;};AGIVertices['prototype']['recursiveNodeIndex']=function(_0x9f80ff){for(var _0x2779bb in _0x9f80ff){if(_0x9f80ff[_0x51ed('0x8b')](_0x2779bb)){if(_[_0x51ed('0x8c')](_0x9f80ff[_0x2779bb])){this[_0x51ed('0x8d')](_0x9f80ff[_0x2779bb]);}else if(_[_0x51ed('0x8e')](_0x9f80ff[_0x2779bb])){for(var _0xb3f1d3=0x0;_0xb3f1d3<_0x9f80ff[_0x2779bb]['length'];_0xb3f1d3++){this['recursiveNodeIndex'](_0x9f80ff[_0x2779bb][_0xb3f1d3]);}}else if(_['isString'](_0x9f80ff[_0x2779bb])){_0x9f80ff[_0x2779bb]=this[_0x51ed('0x8a')](_0x9f80ff[_0x2779bb]);}}}};AGIVertices[_0x51ed('0x12')][_0x51ed('0x8f')]=function(_0x390487,_0x320c3a){for(var _0x3d7b25 in _0x390487){if(_0x390487['hasOwnProperty'](_0x3d7b25)){if(_[_0x51ed('0x8c')](_0x390487[_0x3d7b25])){if(!_['isEmpty'](_0x390487[_0x3d7b25])){this[_0x51ed('0x8f')](_0x390487[_0x3d7b25],util[_0x51ed('0x27')](_0x51ed('0x90'),_0x320c3a,_0x3d7b25));}}else if(_[_0x51ed('0x8e')](_0x390487[_0x3d7b25])){for(var _0x38a12b=0x0;_0x38a12b<_0x390487[_0x3d7b25][_0x51ed('0x91')];_0x38a12b++){this[_0x51ed('0x8f')](_0x390487[_0x3d7b25][_0x38a12b],util[_0x51ed('0x27')](_0x51ed('0x90'),_0x320c3a,_0x3d7b25+'['+_0x38a12b+']'));}}else{if(!_[_0x51ed('0x42')](_0x390487[_0x3d7b25])){this[_0x51ed('0x33')][_0x51ed('0x92')](util['format'](_0x51ed('0x90'),_0x320c3a,_0x3d7b25),_0x390487[_0x3d7b25]);}}}}};AGIVertices[_0x51ed('0x12')][_0x51ed('0x89')]=function(_0x4a451f){try{var _0x42d28c=JSON[_0x51ed('0x63')](_0x4a451f);this[_0x51ed('0x8d')](_0x42d28c);return JSON['stringify'](_0x42d28c);}catch(_0x3183c7){return this[_0x51ed('0x8a')](_0x4a451f);}};AGIVertices[_0x51ed('0x12')][_0x51ed('0x8a')]=function(_0x322055){var _0x2819fa=_0x322055[_0x51ed('0x93')]('{');for(var _0x5e794a=0x1;_0x5e794a<_0x2819fa[_0x51ed('0x91')];_0x5e794a+=0x1){var _0x545e53=_0x2819fa[_0x5e794a][_0x51ed('0x93')]('}');if(_0x545e53[_0x51ed('0x91')]>0x1){_0x322055=_0x322055[_0x51ed('0x94')]('{'+_0x545e53[0x0]+'}',this[_0x51ed('0x33')]['getVariable'](_0x545e53[0x0])[_0x51ed('0x95')]||_0x545e53[0x0]);}}if(_0x2819fa['length']===0x1){return _0x322055['toString']();}return this[_0x51ed('0x8a')](_0x322055);};AGIVertices[_0x51ed('0x12')][_0x51ed('0x96')]=function(_0x559219,_0x337879){var _0x93ce6=this[_0x51ed('0x33')][_0x51ed('0x97')](_0x559219);if(_0x93ce6[_0x51ed('0x98')]===-0x1){return _0x93ce6;}logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x9a'),_0x337879,_0x93ce6[_0x51ed('0x95')]));return this[_0x51ed('0x33')]['setVariable'](_0x337879,_0x93ce6['extra']);};AGIVertices[_0x51ed('0x12')][_0x51ed('0x79')]=function(_0x2b068b){return _0x2b068b&&_0x2b068b!=='0'&&_0x2b068b!=='-1'&&_0x2b068b!=='';};AGIVertices[_0x51ed('0x12')]['maxRetry']=function(_0x2a4b30){this[_0x51ed('0x32')][_0x51ed('0x68')](this,_0x2a4b30,'-');_0x2a4b30[_0x51ed('0x9b')]=_0x2a4b30['maxRetry'];return{'code':0xc8,'result':'-'};};AGIVertices[_0x51ed('0x12')]['mrcpsynth']=function(_0x1207cf){logger[_0x51ed('0x99')](util['format'](_0x51ed('0x9c'),_0x1207cf[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x1207cf[_0x51ed('0x55')])){return this[_0x51ed('0x33')]['noop'](_0x51ed('0x9d'));}var _0x21fe86='\x22'+_0x1207cf[_0x51ed('0x55')]+'\x22';if(this['isConfigured'](_0x1207cf['options'])){_0x21fe86+=','+_0x1207cf[_0x51ed('0x9e')];}var _0x20eaa4=this[_0x51ed('0x33')]['exec']('MRCPSynth',_0x21fe86);if(_0x20eaa4[_0x51ed('0x98')]===-0x1){return _0x20eaa4;}return this['channel'][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xa0'),_0x21fe86));};AGIVertices[_0x51ed('0x12')]['mrcprecog']=function(_0x52c609){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0xa1'),_0x52c609['label']));if(!this[_0x51ed('0x79')](_0x52c609['grammar'])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0xa2'));}var _0xf92f71=_0x52c609[_0x51ed('0xa3')];if(this[_0x51ed('0x79')](_0x52c609[_0x51ed('0x9e')])){_0xf92f71+=','+_0x52c609[_0x51ed('0x9e')];}var _0x8b0728=this[_0x51ed('0x33')]['exec'](_0x51ed('0xa4'),_0xf92f71);if(_0x8b0728['result']===-0x1){return _0x8b0728;}var _0x1f32f9=this[_0x51ed('0x96')]('RECOG_CONFIDENCE()','MRCP_RECOG_CONFIDENCE');if(_0x1f32f9[_0x51ed('0x98')]===-0x1){return _0x1f32f9;}var _0x91dfe8=this[_0x51ed('0x96')](_0x51ed('0xa5'),'MRCP_RECOG_TRANSCRIPT');if(_0x91dfe8['result']===-0x1){return _0x91dfe8;}var _0x18f599=this[_0x51ed('0x96')](_0x51ed('0xa6'),'MRCP_RECOG_INSTANCE');if(_0x18f599[_0x51ed('0x98')]===-0x1){return _0x18f599;}return this['channel'][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xa7'),_0xf92f71));};AGIVertices[_0x51ed('0x12')][_0x51ed('0xa')]=function(_0x9560eb){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0xa8'),_0x9560eb[_0x51ed('0x35')]));return this[_0x51ed('0x33')][_0x51ed('0xa')]([_0x9560eb[_0x51ed('0xa9')],_0x9560eb[_0x51ed('0xaa')]]);};AGIVertices[_0x51ed('0x12')][_0x51ed('0xab')]=function(_0x348b76){logger['info'](util['format'](_0x51ed('0xac'),_0x348b76[_0x51ed('0x35')]));if(this[_0x51ed('0x79')](_0x348b76[_0x51ed('0x5d')])){logger[_0x51ed('0x99')](util['format'](_0x51ed('0xad'),_0x348b76[_0x51ed('0x5d')]));var _0x5ac010=this[_0x51ed('0x33')]['wait'](_0x348b76[_0x51ed('0x5d')]);if(_0x5ac010[_0x51ed('0x98')]===-0x1){return _0x5ac010;}}return this[_0x51ed('0x33')][_0x51ed('0xab')]();};AGIVertices[_0x51ed('0x12')][_0x51ed('0xae')]=function(_0x504e3b){logger[_0x51ed('0x99')](util['format']('Enter\x20in\x20CALLBACK\x20(%s)\x20block',_0x504e3b[_0x51ed('0x35')]));if(!this['isConfigured'](_0x504e3b[_0x51ed('0x47')])){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x504e3b,_0x51ed('0xaf'));}_0x504e3b['scheduledAt']=moment();if(this[_0x51ed('0x79')](_0x504e3b[_0x51ed('0xb0')])){_0x504e3b['scheduledAt']=moment()[_0x51ed('0xb1')](_0x504e3b[_0x51ed('0xb0')],_0x51ed('0xb2'));}if(!this[_0x51ed('0x79')](_0x504e3b[_0x51ed('0x4a')])){_0x504e3b[_0x51ed('0x4a')]=0x2;}this[_0x51ed('0x41')][_0x51ed('0x68')](this,_0x504e3b);return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xb3'),_0x504e3b[_0x51ed('0x46')],_0x504e3b[_0x51ed('0x47')],_0x504e3b[_0x51ed('0x48')]));};AGIVertices['prototype']['custom_app']=function(_0x2583a5){logger[_0x51ed('0x99')](util[_0x51ed('0x27')]('Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block',_0x2583a5['label']));var _0x4918a5=this[_0x51ed('0x33')][_0x51ed('0xb4')](_0x2583a5['application'],_0x2583a5[_0x51ed('0x9e')]);if(_0x4918a5['result']===-0x1){return _0x4918a5;}return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xb5'),_0x2583a5[_0x51ed('0xb6')],_0x2583a5[_0x51ed('0x9e')]));};AGIVertices[_0x51ed('0x12')]['lumenvoxtts']=function(_0xc2fa58){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0xb7'),_0xc2fa58[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0xc2fa58[_0x51ed('0x55')])){return this['channel'][_0x51ed('0x9f')](_0x51ed('0x9d'));}var _0x324ef5='\x22'+_0xc2fa58[_0x51ed('0x55')]+'\x22';if(this['isConfigured'](_0xc2fa58[_0x51ed('0x9e')])){_0x324ef5+=','+_0xc2fa58[_0x51ed('0x9e')];}var _0x2f8de2=this[_0x51ed('0x33')][_0x51ed('0xb4')]('MRCPSynth',_0x324ef5);if(_0x2f8de2[_0x51ed('0x98')]===-0x1){return _0x2f8de2;}return this[_0x51ed('0x33')][_0x51ed('0x9f')](util['format'](_0x51ed('0xa0'),_0x324ef5));};AGIVertices[_0x51ed('0x12')][_0x51ed('0xb8')]=function(_0x52d77c){logger[_0x51ed('0x99')](util['format'](_0x51ed('0xb9'),_0x52d77c[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x52d77c[_0x51ed('0x55')])){return this['channel'][_0x51ed('0x9f')]('no\x20text\x20configured');}var _0x12c982='\x22'+_0x52d77c['text']+'\x22';if(this[_0x51ed('0x79')](_0x52d77c[_0x51ed('0x9e')])){_0x12c982+=','+_0x52d77c[_0x51ed('0x9e')];}var _0x263865=this['channel'][_0x51ed('0xb4')]('MRCPSynth',_0x12c982);if(_0x263865[_0x51ed('0x98')]===-0x1){return _0x263865;}return this[_0x51ed('0x33')]['noop'](util[_0x51ed('0x27')](_0x51ed('0xa0'),_0x12c982));};AGIVertices['prototype']['lumenvoxasr']=function(_0x1d5661){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0xba'),_0x1d5661[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x1d5661[_0x51ed('0xa3')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')]('no\x20grammar\x20configured');}var _0x561dcd=_0x1d5661[_0x51ed('0xa3')];if(this[_0x51ed('0x79')](_0x1d5661[_0x51ed('0x9e')])){_0x561dcd+=','+_0x1d5661['options'];}var _0x637160=this[_0x51ed('0x33')][_0x51ed('0xb4')](_0x51ed('0xa4'),_0x561dcd);if(_0x637160['result']===-0x1){return _0x637160;}var _0x216957=this['getAndSetVariable'](_0x51ed('0xbb'),_0x51ed('0xbc'));if(_0x216957[_0x51ed('0x98')]===-0x1){return _0x216957;}var _0x2d53f5=this['getAndSetVariable']('RECOG_INPUT()',_0x51ed('0xbd'));if(_0x2d53f5[_0x51ed('0x98')]===-0x1){return _0x2d53f5;}var _0x188ac9=this[_0x51ed('0x96')](_0x51ed('0xa6'),_0x51ed('0xbe'));if(_0x188ac9[_0x51ed('0x98')]===-0x1){return _0x188ac9;}return this['channel'][_0x51ed('0x9f')](util['format']('Executed\x20command\x20MRCPRecog\x20%s',_0x561dcd));};AGIVertices[_0x51ed('0x12')][_0x51ed('0xbf')]=function(_0x5d7669){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0xc0'),_0x5d7669['label']));if(!this[_0x51ed('0x79')](_0x5d7669['grammar'])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0xa2'));}var _0x3127bb=_0x5d7669[_0x51ed('0xa3')];if(this[_0x51ed('0x79')](_0x5d7669[_0x51ed('0x9e')])){_0x3127bb+=','+_0x5d7669[_0x51ed('0x9e')];}var _0x5af348=this[_0x51ed('0x33')]['exec'](_0x51ed('0xa4'),_0x3127bb);if(_0x5af348[_0x51ed('0x98')]===-0x1){return _0x5af348;}var _0x5cea73=this['getAndSetVariable'](_0x51ed('0xbb'),'SESTEK_ASR_CONFIDENCE');if(_0x5cea73['result']===-0x1){return _0x5cea73;}var _0x2a22b1=this[_0x51ed('0x96')](_0x51ed('0xa5'),'SESTEK_ASR_TRANSCRIPT');if(_0x2a22b1['result']===-0x1){return _0x2a22b1;}var _0x1ca588=this['getAndSetVariable']('RECOG_INSTANCE()',_0x51ed('0xc1'));if(_0x1ca588[_0x51ed('0x98')]===-0x1){return _0x1ca588;}return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xa7'),_0x3127bb));};AGIVertices[_0x51ed('0x12')][_0x51ed('0xc2')]=function(_0x11a3a2){logger[_0x51ed('0x99')](util['format'](_0x51ed('0xc3'),_0x11a3a2['label']));if(!this[_0x51ed('0x79')](_0x11a3a2[_0x51ed('0xc4')])){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x11a3a2,_0x51ed('0xc5'));}var _0x1e7709=this[_0x51ed('0x1a')][_0x51ed('0x68')](this,_0x11a3a2[_0x51ed('0xc4')]);if(!_0x1e7709){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x11a3a2,_0x51ed('0xc6'));}if(!this[_0x51ed('0x79')](_0x11a3a2['query'])){return this['channel']['error'](_0x11a3a2,_0x51ed('0xc7'));}var _0x226bde=_0x11a3a2['query'][_0x51ed('0xc8')](/(\r\n|\n|\r)/gm,'\x20');this['channel'][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xc9'),_0x226bde));var _0x133f32=this[_0x51ed('0x28')]['sync'](this,_0x1e7709,_0x226bde);this['createSquareDetailsReport']['sync'](this,_0x11a3a2,_0x226bde);if(!this['isConfigured'](_0x11a3a2[_0x51ed('0xca')])){return this['channel'][_0x51ed('0x9f')](_0x51ed('0xcb'));}var _0x52c68f=this['getVariable'][_0x51ed('0x68')](this,_0x11a3a2[_0x51ed('0xca')]);if(!_0x52c68f){return this['channel']['error'](_0x11a3a2,'no\x20variable\x20found');}var _0x4b5e3b=this;_0x133f32[_0x51ed('0xcc')](function(_0x1b22cb,_0xd00c34){Object[_0x51ed('0xcd')](_0x1b22cb)[_0x51ed('0xcc')](function(_0x2b66db){_0x4b5e3b['channel'][_0x51ed('0x92')](util['format'](_0x51ed('0xce'),_0x52c68f,_0xd00c34,_0x2b66db),_0x1b22cb[_0x2b66db]);});});this[_0x51ed('0x33')][_0x51ed('0x92')](util['format'](_0x51ed('0xcf'),_0x52c68f),_0x133f32[_0x51ed('0x91')]);return this['channel']['noop'](util[_0x51ed('0x27')](_0x51ed('0xd0'),_0x52c68f));};AGIVertices[_0x51ed('0x12')][_0x51ed('0xd1')]=function(_0x199c4d){logger[_0x51ed('0xd2')](util[_0x51ed('0x27')](_0x51ed('0xd3'),_0x199c4d[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x199c4d[_0x51ed('0xd4')])){return this['channel'][_0x51ed('0x2a')](_0x199c4d,_0x51ed('0xd5'));}var _0x5aac3e=this['getUser'][_0x51ed('0x68')](this,_0x199c4d['sip_id']);if(!_0x5aac3e){return this['channel'][_0x51ed('0x2a')](_0x199c4d,_0x51ed('0xd6'));}var _0x1d12dd=this[_0x51ed('0x33')][_0x51ed('0xb4')]('DIAL',[util[_0x51ed('0x27')](_0x51ed('0xd7'),_0x5aac3e),_0x199c4d[_0x51ed('0x5d')],_0x199c4d[_0x51ed('0xd8')],_0x199c4d[_0x51ed('0x5b')]]);if(_0x1d12dd['result']===-0x1){return _0x1d12dd;}return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')]('Executed\x20command\x20%s',_0x51ed('0xd9')));};AGIVertices[_0x51ed('0x12')][_0x51ed('0xda')]=function(_0x1a6f87){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0xdb'),_0x1a6f87['label']));if(!this[_0x51ed('0x79')](_0x1a6f87['key'])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0xdc'));}if(!this['isConfigured'](_0x1a6f87[_0x51ed('0x55')])){return this['channel'][_0x51ed('0x9f')](_0x51ed('0x9d'));}this[_0x51ed('0x33')]['bot']=!![];this['createSquareDetailsReport'](_0x1a6f87);this[_0x51ed('0x40')](_0x1a6f87['text'],'in','','');this['channel'][_0x51ed('0x9f')](util[_0x51ed('0x27')]('Trying\x20Dialogflow:\x20%s',_0x1a6f87[_0x51ed('0x55')]));var _0x4e517d=this[_0x51ed('0x6e')][_0x51ed('0x68')](this,_0x1a6f87);if(_0x4e517d){for(var _0x197997 in _0x4e517d){if(_0x4e517d[_0x51ed('0x8b')](_0x197997)){this[_0x51ed('0x33')][_0x51ed('0x92')](util[_0x51ed('0x27')](_0x51ed('0xdd'),_0x197997[_0x51ed('0xde')]()),_0x4e517d[_0x197997]);}}this[_0x51ed('0x40')](_0x4e517d[_0x51ed('0xdf')],_0x51ed('0xe0'),_0x51ed('0xda'),'');return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xe1'),_0x4e517d['speech']));}return this[_0x51ed('0x33')]['error'](_0x1a6f87,_0x51ed('0xe2'));};AGIVertices[_0x51ed('0x12')][_0x51ed('0xe3')]=function(_0x53c46b){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0xe4'),_0x53c46b[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x53c46b['dialogflowV2_project_id'])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0xe5'));}if(!this[_0x51ed('0x79')](_0x53c46b['client_email'])){return this[_0x51ed('0x33')]['noop'](_0x51ed('0xe6'));}if(!this['isConfigured'](_0x53c46b[_0x51ed('0xe7')])){return this['channel'][_0x51ed('0x9f')]('no\x20private_key\x20configured');}if(!this['isConfigured'](_0x53c46b[_0x51ed('0xe8')])){return this['channel'][_0x51ed('0x9f')]('no\x20anguage\x20configured');}if(!this[_0x51ed('0x79')](_0x53c46b['text'])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x9d'));}this['channel'][_0x51ed('0xe9')]=!![];this[_0x51ed('0x32')](_0x53c46b);this['createSquareMessage'](_0x53c46b[_0x51ed('0x55')],'in','','');this[_0x51ed('0x33')][_0x51ed('0x9f')](util['format']('Trying\x20DialogflowV2:\x20%s',_0x53c46b[_0x51ed('0x55')]));var _0x2dbc49=this['googleDialogflowV2'][_0x51ed('0x68')](this,_0x53c46b);if(_0x2dbc49){for(var _0x1049e2 in _0x2dbc49){if(_0x2dbc49[_0x51ed('0x8b')](_0x1049e2)){if(_0x1049e2!=='providerResponse'){this[_0x51ed('0x33')][_0x51ed('0x92')](util[_0x51ed('0x27')]('DIALOGFLOW_%s',_0x1049e2[_0x51ed('0xde')]()),_0x2dbc49[_0x1049e2]);}}}this[_0x51ed('0x40')](_0x2dbc49[_0x51ed('0xdf')],_0x51ed('0xe0'),'dialogflowV2',_0x2dbc49[_0x51ed('0xea')]);return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xeb'),_0x2dbc49[_0x51ed('0xdf')]));}return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x53c46b,_0x51ed('0xec'));};AGIVertices[_0x51ed('0x12')]['sesteknda']=function(_0x50029b){logger['info'](util[_0x51ed('0x27')](_0x51ed('0xed'),_0x50029b[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x50029b[_0x51ed('0xee')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')]('no\x20ndauth\x20url\x20configured');}if(!this[_0x51ed('0x79')](_0x50029b[_0x51ed('0xef')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0xf0'));}if(!this[_0x51ed('0x79')](_0x50029b[_0x51ed('0xf1')])){return this['channel']['noop'](_0x51ed('0xf2'));}if(!this['isConfigured'](_0x50029b[_0x51ed('0xf3')])){return this['channel'][_0x51ed('0x9f')](_0x51ed('0x9d'));}this['channel'][_0x51ed('0xe9')]=!![];this[_0x51ed('0x32')](_0x50029b);this['createSquareMessage'](_0x50029b['text'],'in','','');this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xf4'),_0x50029b['text']));var _0x150265=this['sestekNDA'][_0x51ed('0x68')](this,_0x50029b);if(_0x150265){for(var _0x5d8aa1 in _0x150265){if(_0x150265[_0x51ed('0x8b')](_0x5d8aa1)){this[_0x51ed('0x33')][_0x51ed('0x92')](util[_0x51ed('0x27')](_0x51ed('0xf5'),_0x5d8aa1[_0x51ed('0xde')]()),_0x150265[_0x5d8aa1]);}}this['createSquareMessage'](_0x150265['speech'],_0x51ed('0xe0'),_0x51ed('0xf6'),'');if(_0x150265['audiofile']){this[_0x51ed('0x33')]['noop'](util[_0x51ed('0x27')](_0x51ed('0xf7'),_0x150265['audiofile']));var _0x426f2e=this[_0x51ed('0x33')][_0x51ed('0xf8')](_0x150265[_0x51ed('0xf9')]);try{fs['unlink'](_0x150265['audiofile']+_0x51ed('0xfa'));}catch(_0x9b44a8){logger[_0x51ed('0x2a')](_0x9b44a8);}return _0x426f2e;}else{return this[_0x51ed('0x33')][_0x51ed('0x9f')](util['format']('SestekNDA\x20Result\x20%s',_0x150265[_0x51ed('0xdf')]));}}return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x50029b,_0x51ed('0xfb'));};AGIVertices[_0x51ed('0x12')]['end']=function(_0x49e618){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0xfc'),_0x49e618[_0x51ed('0x35')]));return this[_0x51ed('0x33')][_0x51ed('0x9f')]('end');};AGIVertices[_0x51ed('0x12')][_0x51ed('0xfd')]=function(_0x18c9ed){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0xfe'),_0x18c9ed[_0x51ed('0x35')]));var _0x12933e='';if(_0x18c9ed[_0x51ed('0xff')]){if(!this[_0x51ed('0x79')](_0x18c9ed['trunk_id'])){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x18c9ed,'no\x20trunk\x20selected');}else{var _0x1b097a=parseInt(_0x18c9ed[_0x51ed('0xff')],0xa);if(isNaN(_0x1b097a)){_0x12933e=_0x18c9ed[_0x51ed('0xff')];}else{_0x12933e=this['getTrunk']['sync'](this,_0x18c9ed[_0x51ed('0xff')]);if(!_0x12933e){return this[_0x51ed('0x33')]['error'](_0x18c9ed,'no\x20trunk\x20found');}}}}else if(_0x18c9ed[_0x51ed('0x100')]){_0x12933e=_0x18c9ed[_0x51ed('0x100')];}else{return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x18c9ed,'no\x20trunk\x20selected');}var _0x4fe57a=this[_0x51ed('0x33')][_0x51ed('0xb4')](_0x51ed('0xd9'),[util[_0x51ed('0x27')](_0x51ed('0x101'),_0x12933e,_0x18c9ed['phone']),_0x18c9ed[_0x51ed('0x5d')],_0x18c9ed[_0x51ed('0xd8')],_0x18c9ed[_0x51ed('0x5b')]]);if(_0x4fe57a[_0x51ed('0x98')]===-0x1){return _0x4fe57a;}return this[_0x51ed('0x33')]['noop'](util['format'](_0x51ed('0x102'),_0x51ed('0xd9')));};AGIVertices[_0x51ed('0x12')]['finally']=function(_0x31f766){logger[_0x51ed('0x99')](util[_0x51ed('0x27')]('Enter\x20in\x20FINALLY\x20(%s)\x20block',_0x31f766['label']));return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x103'));};AGIVertices[_0x51ed('0x12')]['getdigits']=function(_0x243d4a){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x104'),_0x243d4a[_0x51ed('0x35')]));if(_0x243d4a[_0x51ed('0x9b')]===0x0){return this[_0x51ed('0x105')](_0x243d4a);}_0x243d4a[_0x51ed('0x9b')]-=0x1;if(!this['isConfigured'](_0x243d4a[_0x51ed('0x106')])){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x243d4a,_0x51ed('0x107'));}var _0x18241c=this[_0x51ed('0x1e')]['sync'](this,_0x243d4a[_0x51ed('0x106')]);if(!_0x18241c){return this['channel'][_0x51ed('0x2a')](_0x243d4a,_0x51ed('0x108'));}if(!this[_0x51ed('0x79')](_0x243d4a[_0x51ed('0xca')])){return this[_0x51ed('0x33')][_0x51ed('0x2a')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x2243f0=this[_0x51ed('0x33')][_0x51ed('0x109')](_0x18241c,_0x243d4a[_0x51ed('0x10a')],_0x243d4a[_0x51ed('0x10b')]);var _0x5cb19b=_0x2243f0[_0x51ed('0x98')]?_0x2243f0[_0x51ed('0x98')][_0x51ed('0x49')]():'';logger[_0x51ed('0x99')]('test',JSON[_0x51ed('0x6a')](_0x2243f0));if(_0x2243f0[_0x51ed('0x98')]===-0x1){this[_0x51ed('0x32')][_0x51ed('0x68')](this,_0x243d4a,_0x5cb19b);return _0x2243f0;}else if(_0x2243f0[_0x51ed('0x95')]==='timeout'){_0x2243f0['result']=_0x5cb19b['length']>=parseInt(_0x243d4a['mindigit'])?'x':'i';}else{_0x2243f0['result']=_0x5cb19b['length']>=parseInt(_0x243d4a[_0x51ed('0x10c')])&&_0x5cb19b['length']<=parseInt(_0x243d4a[_0x51ed('0x10b')])?'x':'i';}var _0x49a44a=this['getVariable'][_0x51ed('0x68')](this,_0x243d4a[_0x51ed('0xca')]);if(!_0x49a44a){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x243d4a,_0x51ed('0x10d'));}this[_0x51ed('0x33')][_0x51ed('0x92')](_0x49a44a,_0x5cb19b);if(this[_0x51ed('0x79')](_0x243d4a[_0x51ed('0x10e')])){var _0x1430ba=parseInt(_0x243d4a[_0x51ed('0x10e')],0xa);var _0x469d3f=rs[_0x51ed('0x10f')]({'charset':'*','length':_0x1430ba});var _0x203df7=_0x5cb19b[_0x51ed('0x91')];if(_0x203df7>0x0){if(_0x203df7>_0x1430ba){this[_0x51ed('0x32')]['sync'](this,_0x243d4a,_0x243d4a['hiddendigitspos']===_0x51ed('0x110')?_0x469d3f+_0x5cb19b[_0x51ed('0x111')](_0x1430ba):_0x5cb19b[_0x51ed('0x111')](0x0,_0x203df7-_0x1430ba)+_0x469d3f);}else{this['createSquareDetailsReport']['sync'](this,_0x243d4a,rs[_0x51ed('0x10f')]({'charset':'*','length':_0x203df7}));}}else{this[_0x51ed('0x32')][_0x51ed('0x68')](this,_0x243d4a,'');}}else{this[_0x51ed('0x32')]['sync'](this,_0x243d4a,_0x5cb19b);}return _0x2243f0;};AGIVertices['prototype'][_0x51ed('0x112')]=function(_0x215402){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x113'),_0x215402[_0x51ed('0x35')]));return this[_0x51ed('0xf')](_0x215402);};AGIVertices[_0x51ed('0x12')][_0x51ed('0x114')]=function(_0x26a96b){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x115'),_0x26a96b[_0x51ed('0x35')]));this[_0x51ed('0x32')][_0x51ed('0x68')](this,_0x26a96b,_0x26a96b[_0x51ed('0x116')]);return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x117'),_0x26a96b[_0x51ed('0x116')]));};AGIVertices[_0x51ed('0x12')][_0x51ed('0x118')]=function(_0x1d2489){logger[_0x51ed('0x99')](util[_0x51ed('0x27')]('[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block',_0x1d2489['label']));if(!this[_0x51ed('0x79')](_0x1d2489['aws_access_key_id'])||!this[_0x51ed('0x79')](_0x1d2489['aws_secret_access_key'])){return this[_0x51ed('0x33')]['noop'](_0x51ed('0x119'));}if(!this[_0x51ed('0x79')](_0x1d2489['text'])){return this[_0x51ed('0x33')]['noop'](_0x51ed('0x9d'));}this[_0x51ed('0x33')]['noop'](util[_0x51ed('0x27')](_0x51ed('0x11a'),_0x1d2489[_0x51ed('0x55')]));var _0x52507c=this[_0x51ed('0x7b')]['sync'](this,_0x1d2489);if(_0x52507c){this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x11b'),_0x52507c));var _0x806b5b=this['channel'][_0x51ed('0xf8')](_0x52507c);try{fs[_0x51ed('0x11c')](_0x52507c+_0x51ed('0xfa'));}catch(_0xe4a831){logger['error'](_0xe4a831);}return _0x806b5b;}return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x1d2489,'aws\x20Polly\x20is\x20unreachable');};AGIVertices[_0x51ed('0x12')][_0x51ed('0x11d')]=function(_0x5bac41){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x11e'),_0x5bac41[_0x51ed('0x35')]));if(!this['isConfigured'](_0x5bac41[_0x51ed('0x7c')])||!this['isConfigured'](_0x5bac41[_0x51ed('0x7d')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x119'));}if(!this[_0x51ed('0x79')](_0x5bac41[_0x51ed('0x11f')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x120'));}if(!this['isConfigured'](_0x5bac41[_0x51ed('0x55')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')]('no\x20text\x20configured');}this[_0x51ed('0x33')][_0x51ed('0xe9')]=!![];this[_0x51ed('0x32')](_0x5bac41);this[_0x51ed('0x40')](_0x5bac41[_0x51ed('0x55')],'in','','');this['channel'][_0x51ed('0x9f')](util[_0x51ed('0x27')]('Trying\x20Amazon\x20Lex:\x20%s',_0x5bac41['text']));var _0x44351e=this[_0x51ed('0x82')][_0x51ed('0x68')](this,_0x5bac41);if(_0x44351e){for(var _0x5658ba in _0x44351e){if(_0x44351e[_0x51ed('0x8b')](_0x5658ba)&&_['isString'](_0x44351e[_0x5658ba])){this['channel'][_0x51ed('0x92')](util['format']('AWS_LEX_%s',_0x5658ba['toUpperCase']()),_0x44351e[_0x5658ba]);}}if(_['isNil'](_0x44351e['message'])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x121'));}else{this[_0x51ed('0x40')](_0x44351e[_0x51ed('0x6d')],_0x51ed('0xe0'),'amazonlex','');return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x122'),_0x44351e[_0x51ed('0x6d')]));}}return this[_0x51ed('0x33')]['error'](_0x5bac41,_0x51ed('0x123'));};AGIVertices[_0x51ed('0x12')]['googleasr']=function(_0x35d672){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x124'),_0x35d672[_0x51ed('0x35')],_0x35d672[_0x51ed('0x5d')]));if(!this['isConfigured'](_0x35d672[_0x51ed('0x6f')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0xdc'));}var _0x3114d3=_0x51ed('0x125');var _0x58c401=util[_0x51ed('0x27')](_0x51ed('0x126'),FILES_PATH,rs[_0x51ed('0x10f')](0x4));var _0xe9b069=util[_0x51ed('0x27')](_0x51ed('0x90'),_0x58c401,_0x3114d3);var _0x37405a=!![];if(_0x35d672['beep']===_0x51ed('0x127')){_0x37405a=![];}var _0x4086e2=this['channel'][_0x51ed('0x128')](_0x58c401,_0x3114d3,_0x35d672[_0x51ed('0x129')],_0x35d672['timeout'],undefined,_0x37405a);if(_0x4086e2[_0x51ed('0x98')]!==-0x1){this['channel'][_0x51ed('0x9f')](util['format']('google\x20%s\x20file\x20created',_0xe9b069));var _0x15700d=this[_0x51ed('0x84')][_0x51ed('0x68')](this,_0x35d672,_0xe9b069);if(_0x15700d){for(var _0x42590f in _0x15700d){if(_0x15700d[_0x51ed('0x8b')](_0x42590f)){this[_0x51ed('0x33')][_0x51ed('0x92')](util[_0x51ed('0x27')](_0x51ed('0x12a'),_0x42590f[_0x51ed('0xde')]()),_0x15700d[_0x42590f]);}}return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x12b'),JSON[_0x51ed('0x6a')](_0x15700d)));}}return _0x4086e2;};AGIVertices['prototype']['tildeasr']=function(_0x5c8b9c){logger['info'](util[_0x51ed('0x27')]('Enter\x20in\x20TILDEASR\x20(%s)\x20block',_0x5c8b9c['label']));if(!this[_0x51ed('0x79')](_0x5c8b9c[_0x51ed('0x86')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x12c'));}if(!this['isConfigured'](_0x5c8b9c['appsecret'])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x12d'));}var _0x13b99b='wav';var _0x5d3b61=util[_0x51ed('0x27')]('%s/recordings/%s',FILES_PATH,rs['generate'](0x4));var _0x4578f9=util['format'](_0x51ed('0x90'),_0x5d3b61,_0x13b99b);var _0x334479=!![];if(_0x5c8b9c[_0x51ed('0x12e')]==='NOBEEP'){_0x334479=![];}var _0x4a5f65=this[_0x51ed('0x33')]['recordFile'](_0x5d3b61,_0x13b99b,_0x5c8b9c['intKey'],_0x5c8b9c['timeout'],undefined,_0x334479);if(_0x4a5f65[_0x51ed('0x98')]!==-0x1){this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')]('tilde\x20%s\x20file\x20created',_0x4578f9));var _0x59d987=this['tildeASR']['sync'](this,_0x5c8b9c,_0x4578f9);if(_0x59d987){for(var _0x5a04d4 in _0x59d987){if(_0x59d987['hasOwnProperty'](_0x5a04d4)){this[_0x51ed('0x33')]['setVariable'](util['format'](_0x51ed('0x12f'),_0x5a04d4[_0x51ed('0xde')]()),_0x59d987[_0x5a04d4]);}}return this['channel'][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x130'),JSON[_0x51ed('0x6a')](_0x59d987)));}}return _0x4a5f65;};AGIVertices[_0x51ed('0x12')][_0x51ed('0x131')]=function(_0x12173e){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x132'),_0x12173e[_0x51ed('0x35')]));return this[_0x51ed('0x33')][_0x51ed('0x133')](_0x12173e[_0x51ed('0x3a')],_0x12173e['extension'],_0x12173e[_0x51ed('0x134')]);};AGIVertices[_0x51ed('0x12')][_0x51ed('0x135')]=function(_0x3eecb5){logger[_0x51ed('0x99')](util[_0x51ed('0x27')]('Enter\x20in\x20GOTOIF\x20(%s)\x20block',_0x3eecb5['label']));if(!this[_0x51ed('0x79')](_0x3eecb5[_0x51ed('0x136')])){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x3eecb5,_0x51ed('0x137'));}try{var _0xf57d28=eval(_0x3eecb5['condition'])?_0x51ed('0x138'):_0x51ed('0x139');this['channel'][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x13a'),_0x3eecb5[_0x51ed('0x136')],_0xf57d28));return{'code':0xc8,'result':_0xf57d28};}catch(_0x5d2c1f){return{'code':0xc8,'result':_0x51ed('0x139')};}};AGIVertices[_0x51ed('0x12')][_0x51ed('0x13b')]=function(_0x106f54){logger[_0x51ed('0x99')](util[_0x51ed('0x27')]('Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block',_0x106f54[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x106f54[_0x51ed('0x13c')])){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x106f54,_0x51ed('0x13d'));}var _0x20fc76=this[_0x51ed('0x13e')][_0x51ed('0x68')](this,_0x106f54['interval_id']);if(!_0x20fc76){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x106f54,_0x51ed('0x13f'));}for(var _0x118d85=0x0;_0x118d85<_0x20fc76[_0x51ed('0x91')];_0x118d85+=0x1){var _0x5ae80a=this[_0x51ed('0x33')][_0x51ed('0x97')](util['format'](_0x51ed('0x140'),_0x20fc76[_0x118d85]));if(_0x5ae80a[_0x51ed('0x98')]===-0x1){return _0x5ae80a;}logger[_0x51ed('0x99')](util['format']('IFTIME\x20%s\x20%s',_0x20fc76[_0x118d85],_0x5ae80a[_0x51ed('0x95')]));if(_0x5ae80a[_0x51ed('0x95')]===_0x51ed('0x138')){logger['info'](util[_0x51ed('0x27')]('IFTIME\x20%s\x20%s',_0x20fc76[_0x118d85],'true'));this[_0x51ed('0x33')][_0x51ed('0x9f')](util['format']('IFTIME\x20%s\x20%s',_0x20fc76[_0x118d85],_0x51ed('0x138')));return{'code':0xc8,'result':'true'};}else{logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x141'),_0x20fc76[_0x118d85],_0x51ed('0x139')));this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')]('IFTIME\x20%s\x20%s',_0x20fc76[_0x118d85],_0x51ed('0x139')));}}return{'code':0xc8,'result':_0x51ed('0x139')};};AGIVertices['prototype'][_0x51ed('0x142')]=function(_0x10661b){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x143'),_0x10661b[_0x51ed('0x35')]));return this[_0x51ed('0x33')]['hangup']();};AGIVertices['prototype']['ispeechasr']=function(_0x2ae9df){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x144'),_0x2ae9df[_0x51ed('0x35')]));if(!this['isConfigured'](_0x2ae9df[_0x51ed('0x6f')])){return this['channel']['noop'](_0x51ed('0xdc'));}var _0x21f8fc=_0x51ed('0x125');var _0x37adf2=util[_0x51ed('0x27')](_0x51ed('0x126'),FILES_PATH,rs[_0x51ed('0x10f')](0x4));var _0x84f3b0=util[_0x51ed('0x27')]('%s.%s',_0x37adf2,_0x21f8fc);var _0x18bffd=!![];if(_0x2ae9df[_0x51ed('0x12e')]===_0x51ed('0x127')){_0x18bffd=![];}var _0x14ef9a=this[_0x51ed('0x33')][_0x51ed('0x128')](_0x37adf2,_0x21f8fc,_0x2ae9df[_0x51ed('0x129')],_0x2ae9df[_0x51ed('0x5d')],undefined,_0x18bffd);if(_0x14ef9a[_0x51ed('0x98')]!==-0x1){this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x145'),_0x84f3b0));var _0x2cbcdc=this[_0x51ed('0x76')][_0x51ed('0x68')](this,_0x2ae9df,_0x84f3b0);if(_0x2cbcdc){for(var _0x51a10a in _0x2cbcdc){if(_0x2cbcdc[_0x51ed('0x8b')](_0x51a10a)){this[_0x51ed('0x33')][_0x51ed('0x92')](util[_0x51ed('0x27')](_0x51ed('0x146'),_0x51a10a[_0x51ed('0xde')]()),_0x2cbcdc[_0x51a10a]);}}return this['channel'][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x147'),JSON[_0x51ed('0x6a')](_0x2cbcdc)));}}return _0x14ef9a;};AGIVertices['prototype'][_0x51ed('0x148')]=function(_0x55ff70){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x149'),_0x55ff70[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x55ff70[_0x51ed('0x6f')])){return this[_0x51ed('0x33')]['noop'](_0x51ed('0xdc'));}if(!this[_0x51ed('0x79')](_0x55ff70[_0x51ed('0x55')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x9d'));}this[_0x51ed('0x33')]['noop'](util[_0x51ed('0x27')]('Trying\x20ispeech\x20TTS\x20%s',_0x55ff70[_0x51ed('0x55')]));var _0x25e36e=this[_0x51ed('0x74')][_0x51ed('0x68')](this,_0x55ff70);if(_0x25e36e){this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')]('ispeech\x20%s\x20file\x20created',_0x25e36e));var _0x49c97c=this[_0x51ed('0x33')][_0x51ed('0xf8')](_0x25e36e,_0x55ff70[_0x51ed('0x129')]);try{fs[_0x51ed('0x11c')](_0x25e36e+_0x51ed('0xfa'));}catch(_0x11e672){logger[_0x51ed('0x2a')](_0x11e672);}return _0x49c97c;}return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x55ff70,'ispeech\x20TTS\x20is\x20unreachable');};AGIVertices['prototype']['login']=function(_0x1f9e61){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x14a'),_0x1f9e61[_0x51ed('0x35')]));if(!this['isConfigured'](_0x1f9e61[_0x51ed('0x14b')])){return this[_0x51ed('0x33')]['error'](_0x1f9e61,_0x51ed('0x14c'));}logger[_0x51ed('0x99')](util[_0x51ed('0x27')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0x51ed('0x33')][_0x51ed('0x37')],_0x1f9e61[_0x51ed('0x14b')]));var _0x5cb86d=this[_0x51ed('0x14d')][_0x51ed('0x68')](this,_0x1f9e61['findBy']);if(_0x5cb86d){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x14e'),this[_0x51ed('0x33')][_0x51ed('0x37')],_0x1f9e61['findBy']));this[_0x51ed('0x33')]['noop'](util['format'](_0x51ed('0x14e'),this['channel']['callerid'],_0x1f9e61['findBy']));return{'code':0xc8,'result':_0x51ed('0x14f')};}else{logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x150'),this[_0x51ed('0x33')][_0x51ed('0x37')],_0x1f9e61[_0x51ed('0x14b')]));this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x51ed('0x33')]['callerid'],_0x1f9e61[_0x51ed('0x14b')]));return{'code':0xc8,'result':_0x51ed('0x151')};}};AGIVertices['prototype'][_0x51ed('0x152')]=function(_0x35f454){logger[_0x51ed('0x99')](util['format'](_0x51ed('0x153'),_0x35f454[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x35f454[_0x51ed('0x14b')])){return this[_0x51ed('0x33')]['error'](_0x35f454,_0x51ed('0x14c'));}logger[_0x51ed('0x99')](util['format']('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0x51ed('0x33')][_0x51ed('0x37')],_0x35f454[_0x51ed('0x14b')]));var _0x4c5fc6=this[_0x51ed('0x50')][_0x51ed('0x68')](this,_0x35f454['findBy']);if(_0x4c5fc6){logger[_0x51ed('0x99')](util[_0x51ed('0x27')]('AGENT\x20%s\x20FOUND\x20BY',this['channel'][_0x51ed('0x37')],_0x35f454[_0x51ed('0x14b')]));this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x14e'),this[_0x51ed('0x33')][_0x51ed('0x37')],_0x35f454['findBy']));return{'code':0xc8,'result':'success'};}else{logger[_0x51ed('0x99')](util[_0x51ed('0x27')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x51ed('0x33')][_0x51ed('0x37')],_0x35f454[_0x51ed('0x14b')]));this[_0x51ed('0x33')]['noop'](util[_0x51ed('0x27')](_0x51ed('0x150'),this[_0x51ed('0x33')][_0x51ed('0x37')],_0x35f454[_0x51ed('0x14b')]));return{'code':0xc8,'result':_0x51ed('0x151')};}};AGIVertices['prototype'][_0x51ed('0x154')]=function(_0x4d99f9){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x155'),_0x4d99f9[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x4d99f9[_0x51ed('0x156')])){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x4d99f9,_0x51ed('0x157'));}this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x158'),_0x4d99f9[_0x51ed('0x156')]));var _0x57a521=eval(_0x4d99f9['operation']);if(!this[_0x51ed('0x79')](_0x4d99f9[_0x51ed('0xca')])){return this['channel'][_0x51ed('0x9f')](_0x51ed('0xcb'));}var _0x40637e=this[_0x51ed('0x97')][_0x51ed('0x68')](this,_0x4d99f9[_0x51ed('0xca')]);if(!_0x40637e){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x4d99f9,'no\x20variable\x20found');}if(_[_0x51ed('0x8e')](_0x57a521)){var _0x29cb9a=this;_0x57a521['forEach'](function(_0x519ae8,_0x37b8c2){_0x29cb9a[_0x51ed('0x33')][_0x51ed('0x92')](util[_0x51ed('0x27')](_0x51ed('0x159'),_0x40637e,_0x37b8c2),_0x519ae8);});return this[_0x51ed('0x33')]['noop'](util['format'](_0x51ed('0x15a'),_0x40637e));}else{return this[_0x51ed('0x33')]['setVariable'](_0x40637e,_0x57a521);}};AGIVertices[_0x51ed('0x12')][_0x51ed('0x15b')]=function(_0x1881f5){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x15c'),_0x1881f5[_0x51ed('0x35')]));if(_0x1881f5[_0x51ed('0x9b')]===0x0){return this[_0x51ed('0x105')](_0x1881f5);}_0x1881f5[_0x51ed('0x9b')]-=0x1;if(!this[_0x51ed('0x79')](_0x1881f5[_0x51ed('0x106')])){return this['channel'][_0x51ed('0x2a')](_0x1881f5,_0x51ed('0x107'));}var _0x3bf96d=this['getSound']['sync'](this,_0x1881f5[_0x51ed('0x106')]);if(!_0x3bf96d){return this['channel'][_0x51ed('0x2a')](_0x1881f5,_0x51ed('0x108'));}var _0x24d05b=this[_0x51ed('0x33')][_0x51ed('0x109')](_0x3bf96d,_0x1881f5[_0x51ed('0x10a')],_0x1881f5[_0x51ed('0x15d')]);var _0x31a112=_0x24d05b[_0x51ed('0x98')];if(_0x24d05b[_0x51ed('0x98')]===-0x1){this[_0x51ed('0x32')][_0x51ed('0x68')](this,_0x1881f5,'-1');return _0x24d05b;}else if(_0x24d05b[_0x51ed('0x95')]===_0x51ed('0x5d')){_0x24d05b[_0x51ed('0x98')]=_0x24d05b[_0x51ed('0x98')]['length']>0x0?_0x24d05b[_0x51ed('0x98')]:'t';}else if(_[_0x51ed('0x15e')](_0x24d05b['result'])){_0x24d05b[_0x51ed('0x98')]='#';_0x31a112='#';}if(!this['isConfigured'](_0x1881f5['variable_id'])){this[_0x51ed('0x33')]['noop'](_0x51ed('0xcb'));}else{var _0x17558e=this[_0x51ed('0x97')]['sync'](this,_0x1881f5[_0x51ed('0xca')]);if(!_0x17558e){return this['channel'][_0x51ed('0x2a')](_0x1881f5,'no\x20variable\x20found');}this[_0x51ed('0x33')][_0x51ed('0x92')](_0x17558e,_0x31a112);}this[_0x51ed('0x32')]['sync'](this,_0x1881f5,_0x31a112);return _0x24d05b;};AGIVertices[_0x51ed('0x12')][_0x51ed('0x9f')]=function(_0x5a400a){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x15f'),_0x5a400a[_0x51ed('0x35')]));return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x5a400a[_0x51ed('0x160')]||_0x5a400a[_0x51ed('0x35')]);};AGIVertices[_0x51ed('0x12')]['pause']=function(_0x4aef4b){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x161'),_0x4aef4b[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x4aef4b['findBy'])){return this['channel']['error'](_0x4aef4b,'no\x20find\x20by\x20configured');}logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x162'),this[_0x51ed('0x33')][_0x51ed('0x37')],_0x4aef4b[_0x51ed('0x14b')]));var _0x1c0ef6=this['getPause']['sync'](this,_0x4aef4b[_0x51ed('0x163')]);var _0x510a9e=this['agentPause'][_0x51ed('0x68')](this,_0x4aef4b[_0x51ed('0x14b')],_0x1c0ef6);if(_0x510a9e){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x14e'),this[_0x51ed('0x33')][_0x51ed('0x37')],_0x4aef4b[_0x51ed('0x14b')]));this[_0x51ed('0x33')][_0x51ed('0x9f')](util['format'](_0x51ed('0x14e'),this[_0x51ed('0x33')][_0x51ed('0x37')],_0x4aef4b[_0x51ed('0x14b')]));return{'code':0xc8,'result':_0x51ed('0x14f')};}else{logger['info'](util[_0x51ed('0x27')](_0x51ed('0x150'),this[_0x51ed('0x33')]['callerid'],_0x4aef4b[_0x51ed('0x14b')]));this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')]('AGENT\x20%s\x20FOUND\x20BY',this['channel'][_0x51ed('0x37')],_0x4aef4b['findBy']));return{'code':0xc8,'result':_0x51ed('0x151')};}};AGIVertices[_0x51ed('0x12')]['playback']=function(_0x587f93){logger[_0x51ed('0x99')](util['format'](_0x51ed('0x164'),_0x587f93['label']));if(!this['isConfigured'](_0x587f93[_0x51ed('0x106')])){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x587f93,_0x51ed('0x107'));}var _0x826dcd=this[_0x51ed('0x1e')]['sync'](this,_0x587f93['file_id']);if(!_0x826dcd){return this['channel']['error'](_0x587f93,_0x51ed('0x108'));}var _0xb716f2=this[_0x51ed('0x33')][_0x51ed('0xb4')](_0x51ed('0x165'),[_0x826dcd,_0x587f93['opts']]);if(_0xb716f2[_0x51ed('0x98')]===-0x1){return _0xb716f2;}return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xb5'),_0x51ed('0x165'),_0x826dcd));};AGIVertices['prototype']['queue']=function(_0x27af7f){logger['info'](util['format']('Enter\x20in\x20QUEUE\x20(%s)\x20block',_0x27af7f[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x27af7f['queue_id'])){return this['channel'][_0x51ed('0x2a')](_0x27af7f,'no\x20queue\x20selected');}var _0x135076='';var _0x4c90d9=parseInt(_0x27af7f[_0x51ed('0x166')],0xa);if(isNaN(_0x4c90d9)){_0x135076=_0x27af7f[_0x51ed('0x166')];}else{_0x135076=this[_0x51ed('0x15')][_0x51ed('0x68')](this,_0x27af7f[_0x51ed('0x166')]);if(!_0x135076){return this['channel'][_0x51ed('0x2a')](_0x27af7f,'no\x20queue\x20found');}}var _0x4af10d='';if(this[_0x51ed('0x79')](_0x27af7f['file_id'])){var _0x399cd1=this[_0x51ed('0x1e')][_0x51ed('0x68')](this,_0x27af7f['file_id']);if(_0x399cd1){_0x4af10d=_0x399cd1;}}this[_0x51ed('0x32')]['sync'](this,_0x27af7f,_0x135076);if(_0x27af7f['opts'][_0x51ed('0x167')]('x')<0x0){_0x27af7f[_0x51ed('0xd8')]+='x';}if(_0x27af7f['opts'][_0x51ed('0x167')]('X')<0x0){_0x27af7f[_0x51ed('0xd8')]+='X';}this['channel'][_0x51ed('0x92')](_0x51ed('0x168'),_0x135076?_0x135076[_0x51ed('0x169')]():'');var _0x24f1dd=this[_0x51ed('0x33')][_0x51ed('0xb4')]('QUEUE',[_0x135076,_0x27af7f[_0x51ed('0xd8')],_0x27af7f[_0x51ed('0x5b')],_0x4af10d,_0x27af7f[_0x51ed('0x5d')],_0x27af7f[_0x51ed('0xa')],_0x27af7f[_0x51ed('0x16a')],_0x27af7f[_0x51ed('0x16b')],'',_0x27af7f[_0x51ed('0x16c')]]);if(_0x24f1dd[_0x51ed('0x98')]===-0x1){return _0x24f1dd;}return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')]('Executed\x20command\x20%s\x20%s',_0x51ed('0x16d'),_0x135076));};AGIVertices['prototype'][_0x51ed('0x16e')]=function(_0x2c5764){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x16f'),_0x2c5764['label']));var _0x14608c=_0x2c5764['recordingFormat']||'wav';var _0x3754e8=util['format'](_0x51ed('0x170'),this[_0x51ed('0x33')][_0x51ed('0x34')],rs[_0x51ed('0x10f')](0x5));var _0x417551=util[_0x51ed('0x27')](_0x51ed('0x171'),FILES_PATH,_0x3754e8,_0x14608c);var _0x51b16a=util[_0x51ed('0x27')](_0x51ed('0x126'),FILES_PATH,_0x3754e8);this[_0x51ed('0x38')][_0x51ed('0x68')](this,_0x2c5764,_0x3754e8,_0x417551);this[_0x51ed('0x33')][_0x51ed('0x92')]('RECORDING_SAVENAME',_0x3754e8);logger[_0x51ed('0x99')]('Recording\x20%s\x20%s\x20%s\x20%s',_0x51b16a,_0x14608c,_0x2c5764[_0x51ed('0x172')],_0x2c5764['timeout']);return this[_0x51ed('0x33')]['recordFile'](_0x51b16a,_0x14608c,_0x2c5764[_0x51ed('0x172')],_0x2c5764['timeout'],undefined,!![]);};AGIVertices[_0x51ed('0x12')][_0x51ed('0x173')]=function(_0x599646){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x174'),_0x599646[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x599646[_0x51ed('0x5b')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x175'));}var _0x111bdd=this['restAPI']['sync'](this,_0x599646);logger[_0x51ed('0x99')](util[_0x51ed('0x27')]('Response:',util[_0x51ed('0x176')](_0x111bdd,{'showHidden':![],'depth':null})));if(!this[_0x51ed('0x79')](_0x599646[_0x51ed('0xca')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x177'));}var _0x27408c=this[_0x51ed('0x97')]['sync'](this,_0x599646[_0x51ed('0xca')]);if(!_0x27408c){return this['channel'][_0x51ed('0x2a')](_0x599646,_0x51ed('0x10d'));}this[_0x51ed('0x33')][_0x51ed('0x92')](util['format'](_0x51ed('0x178'),_0x27408c),_0x111bdd[_0x51ed('0x6b')]?_0x111bdd[_0x51ed('0x6b')]:_0x51ed('0x179'));this[_0x51ed('0x33')]['setVariable'](util[_0x51ed('0x27')](_0x51ed('0x17a'),_0x27408c),_0x111bdd[_0x51ed('0x6c')]?_0x111bdd['statusMessage']:'OK');if(_0x111bdd[_0x51ed('0x62')]){try{this[_0x51ed('0x8f')](_0x111bdd[_0x51ed('0x62')],_0x27408c);}catch(_0x4a5ac7){logger[_0x51ed('0x2a')](util[_0x51ed('0x27')](_0x51ed('0x17b'),_0x27408c));}}return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xd0'),_0x27408c));};AGIVertices['prototype'][_0x51ed('0x17c')]=function(_0x4badf8){logger[_0x51ed('0x99')](util['format'](_0x51ed('0x17d'),_0x4badf8[_0x51ed('0x35')]));return this[_0x51ed('0x33')][_0x51ed('0x17e')](_0x4badf8['digits']['replace'](/\s+/g,''),_0x4badf8[_0x51ed('0x172')]);};AGIVertices[_0x51ed('0x12')][_0x51ed('0x17f')]=function(_0x39151a){logger[_0x51ed('0x99')](util['format'](_0x51ed('0x180'),_0x39151a[_0x51ed('0x35')]));return this[_0x51ed('0x33')][_0x51ed('0x181')](_0x39151a[_0x51ed('0x5e')][_0x51ed('0xc8')](/\s+/g,''),_0x39151a[_0x51ed('0x172')]);};AGIVertices[_0x51ed('0x12')][_0x51ed('0x182')]=function(_0x512173){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x183'),_0x512173[_0x51ed('0x35')]));return this['channel'][_0x51ed('0x184')](_0x512173['text'],_0x512173[_0x51ed('0x172')]);};AGIVertices[_0x51ed('0x12')][_0x51ed('0x185')]=function(_0x2af709){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x186'),_0x2af709[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x2af709[_0x51ed('0x187')])){return this[_0x51ed('0x33')]['noop'](_0x51ed('0x188'));}var _0x320d63=this['getMailAccount'][_0x51ed('0x68')](this,_0x2af709[_0x51ed('0x187')]);if(!_0x320d63||!_0x320d63[_0x51ed('0x189')]){return this['channel']['error'](_0x2af709,_0x51ed('0x18a'));}var _0x226b4b={'from':util[_0x51ed('0x27')]('\x22%s\x22\x20<%s>',_0x320d63[_0x51ed('0x17')],_0x320d63[_0x51ed('0x18b')]||_0x320d63['Smtp'][_0x51ed('0x18c')]),'to':_0x2af709['to']||'','cc':_0x2af709['cc']||'','bcc':_0x2af709['bcc']||'','subject':_0x2af709[_0x51ed('0x18d')],'html':_0x2af709[_0x51ed('0x55')],'text':_0x2af709[_0x51ed('0x55')]};var _0x1d6ee3={'tls':{'rejectUnauthorized':![]}};if(_0x320d63['Smtp'][_0x51ed('0x18e')]){_0x1d6ee3[_0x51ed('0x18e')]=_0x320d63[_0x51ed('0x189')][_0x51ed('0x18e')];}else{_0x1d6ee3[_0x51ed('0x18f')]=_0x320d63[_0x51ed('0x189')]['host'];_0x1d6ee3[_0x51ed('0x190')]=_0x320d63[_0x51ed('0x189')][_0x51ed('0x190')];_0x1d6ee3[_0x51ed('0x191')]=_0x320d63[_0x51ed('0x189')]['secure'];}if(_0x320d63[_0x51ed('0x189')][_0x51ed('0x192')]){_0x1d6ee3['auth']={'user':_0x320d63[_0x51ed('0x189')][_0x51ed('0x18c')],'pass':_0x320d63[_0x51ed('0x189')][_0x51ed('0x193')]};}if(this['isConfigured'](_0x2af709[_0x51ed('0x194')])){}logger[_0x51ed('0xd2')](_0x51ed('0x195'),JSON[_0x51ed('0x6a')](_0x226b4b));this[_0x51ed('0x32')][_0x51ed('0x68')](this,_0x2af709,_0x2af709[_0x51ed('0x187')]);this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x196'),_0x320d63[_0x51ed('0x17')]));this[_0x51ed('0x23')][_0x51ed('0x68')](this,_0x1d6ee3,_0x226b4b);return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x197'));};AGIVertices[_0x51ed('0x12')][_0x51ed('0x198')]=function(_0x1baec0){logger[_0x51ed('0x99')](util['format'](_0x51ed('0x199'),_0x1baec0[_0x51ed('0x35')]));return this['channel'][_0x51ed('0x9f')](_0x51ed('0x19a'));};AGIVertices[_0x51ed('0x12')][_0x51ed('0x19b')]=function(_0x23e043){logger[_0x51ed('0x99')](util[_0x51ed('0x27')]('Enter\x20in\x20SENDSMS\x20(%s)\x20block',_0x23e043['label']));if(!this[_0x51ed('0x79')](_0x23e043[_0x51ed('0x19c')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x19d'));}var _0x1313bb=this[_0x51ed('0x19e')]['sync'](this,_0x23e043[_0x51ed('0x19c')]);if(!_0x1313bb){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x23e043,'no\x20sms\x20account\x20found');}var _0x350348={'body':_0x23e043[_0x51ed('0x19f')],'phone':_0x23e043['to']||'','SmsAccountId':_0x1313bb['id']};logger['debug'](_0x51ed('0x1a0'),JSON[_0x51ed('0x6a')](_0x350348));this[_0x51ed('0x32')][_0x51ed('0x68')](this,_0x23e043,_0x23e043['sms_account_id']);this['channel']['noop'](util[_0x51ed('0x27')](_0x51ed('0x1a1'),_0x1313bb['name']));this[_0x51ed('0x31')][_0x51ed('0x68')](this,_0x350348);return this['channel'][_0x51ed('0x9f')](_0x51ed('0x1a2'));};AGIVertices[_0x51ed('0x12')][_0x51ed('0x1a3')]=function(_0x217e1b){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x1a4'),_0x217e1b[_0x51ed('0x35')]));if(!this['isConfigured'](_0x217e1b[_0x51ed('0xca')])){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x217e1b,_0x51ed('0x1a5'));}var _0xb0f668=this[_0x51ed('0x97')][_0x51ed('0x68')](this,_0x217e1b[_0x51ed('0xca')]);if(!_0xb0f668){return this['channel'][_0x51ed('0x2a')](_0x217e1b,_0x51ed('0x10d'));}return this[_0x51ed('0x33')][_0x51ed('0x92')](_0xb0f668,_0x217e1b[_0x51ed('0x1a6')]);};AGIVertices[_0x51ed('0x12')]['start']=function(_0x3671f3){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x1a7'),_0x3671f3['label']));this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x1a8'));if(_0x3671f3[_0x51ed('0xab')]===_0x51ed('0x1a9')){this['channel']['noop']('Answer');return this[_0x51ed('0x33')]['answer']();}return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x1aa'));};AGIVertices[_0x51ed('0x12')][_0x51ed('0x1ab')]=function(_0x38639e){logger['info'](util['format'](_0x51ed('0x1ac'),_0x38639e[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x38639e[_0x51ed('0x1ad')])){return this['channel']['error'](_0x38639e,_0x51ed('0x1ae'));}var _0x1edc3c=this['getSquareProject'][_0x51ed('0x68')](this,_0x38639e[_0x51ed('0x1ad')]);if(!this[_0x51ed('0x79')](_0x1edc3c)){return this[_0x51ed('0x33')]['error'](_0x38639e,util[_0x51ed('0x27')]('no\x20subproject\x20found\x20with\x20id\x20%d',_0x38639e[_0x51ed('0x1ad')]));}if(_0x1edc3c===this[_0x51ed('0x33')][_0x51ed('0x3e')]){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x38639e,_0x51ed('0x1af'));}this[_0x51ed('0x32')][_0x51ed('0x68')](this,_0x38639e,_0x1edc3c);var _0x49971e=this[_0x51ed('0x33')]['exec']('AGI',util['format'](_0x51ed('0x1b0'),config[_0x51ed('0xa')]['host']||'127.0.0.1',_0x1edc3c,this[_0x51ed('0x33')][_0x51ed('0x3e')]));if(_0x49971e[_0x51ed('0x98')]===-0x1){return _0x49971e;}return this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0xb5'),'AGI',_0x1edc3c));};AGIVertices['prototype']['system']=function(_0x59148f){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x1b1'),_0x59148f[_0x51ed('0x35')]));var _0x571dbe=this[_0x51ed('0x53')][_0x51ed('0x68')](this,_0x59148f[_0x51ed('0xa9')]);this[_0x51ed('0x32')]['sync'](this,_0x59148f,_0x59148f[_0x51ed('0xa9')]);if(this[_0x51ed('0x79')](_0x59148f[_0x51ed('0xca')])){var _0x541069=this[_0x51ed('0x97')]['sync'](this,_0x59148f[_0x51ed('0xca')]);if(_0x541069){this[_0x51ed('0x33')][_0x51ed('0x92')](_0x541069,_0x571dbe);return this[_0x51ed('0x33')][_0x51ed('0x9f')](util['format'](_0x51ed('0x1b2'),_0x59148f[_0x51ed('0xa9')],_0x541069));}}return this['channel'][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x1b3'),_0x59148f[_0x51ed('0xa9')]));};AGIVertices['prototype'][_0x51ed('0x1b4')]=function(_0x59df26){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x1b5'),_0x59df26[_0x51ed('0x35')]));_0x59df26[_0x51ed('0x55')]=_0x59df26[_0x51ed('0x55')][_0x51ed('0xc8')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0x51ed('0x79')](_0x59df26[_0x51ed('0x1b6')])){return this['channel'][_0x51ed('0x9f')](_0x51ed('0x1b7'));}if(!this[_0x51ed('0x79')](_0x59df26[_0x51ed('0x55')])){return this[_0x51ed('0x33')][_0x51ed('0x9f')](_0x51ed('0x9d'));}this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x1b8'),_0x59df26[_0x51ed('0x55')]));var _0x5981eb=this[_0x51ed('0x54')]['sync'](this,_0x59df26);if(_0x5981eb){this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x1b9'),_0x5981eb));var _0x3c764f=this[_0x51ed('0x33')][_0x51ed('0xf8')](_0x5981eb);try{fs[_0x51ed('0x11c')](_0x5981eb+_0x51ed('0xfa'));}catch(_0x560211){logger['error'](_0x560211);}return _0x3c764f;}return this[_0x51ed('0x33')]['error'](_0x59df26,_0x51ed('0x1ba'));};AGIVertices[_0x51ed('0x12')][_0x51ed('0x1bb')]=function(_0x49c47a){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x1bc'),_0x49c47a[_0x51ed('0x35')]));_0x49c47a['text']=_0x49c47a[_0x51ed('0x55')]['replace'](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x49c47a['text'])){return this['channel'][_0x51ed('0x9f')](_0x51ed('0x9d'));}this[_0x51ed('0x33')]['noop'](util['format']('Trying\x20Google\x20TTS\x20%s',_0x49c47a[_0x51ed('0x55')]));var _0x2b1a3f=this[_0x51ed('0x58')]['sync'](this,_0x49c47a);if(_0x2b1a3f){this[_0x51ed('0x33')][_0x51ed('0x9f')](util[_0x51ed('0x27')](_0x51ed('0x1bd'),_0x2b1a3f));var _0x3a578b=this[_0x51ed('0x33')][_0x51ed('0xf8')](_0x2b1a3f);try{fs[_0x51ed('0x11c')](_0x2b1a3f+_0x51ed('0xfa'));}catch(_0x5defd0){logger[_0x51ed('0x2a')](_0x5defd0);}return _0x3a578b;}return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x49c47a,_0x51ed('0x1be'));};AGIVertices[_0x51ed('0x12')][_0x51ed('0x1bf')]=function(_0x844588){logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x1c0'),_0x844588[_0x51ed('0x35')]));if(!this['isConfigured'](_0x844588[_0x51ed('0x14b')])){return this[_0x51ed('0x33')][_0x51ed('0x2a')](_0x844588,_0x51ed('0x14c'));}logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x162'),this[_0x51ed('0x33')][_0x51ed('0x37')],_0x844588['findBy']));var _0x31a409=this['agentUnpause'][_0x51ed('0x68')](this,_0x844588[_0x51ed('0x14b')]);if(_0x31a409){logger[_0x51ed('0x99')](util['format'](_0x51ed('0x14e'),this[_0x51ed('0x33')][_0x51ed('0x37')],_0x844588[_0x51ed('0x14b')]));this['channel']['noop'](util[_0x51ed('0x27')](_0x51ed('0x14e'),this[_0x51ed('0x33')]['callerid'],_0x844588[_0x51ed('0x14b')]));return{'code':0xc8,'result':_0x51ed('0x14f')};}else{logger[_0x51ed('0x99')](util[_0x51ed('0x27')](_0x51ed('0x150'),this[_0x51ed('0x33')][_0x51ed('0x37')],_0x844588[_0x51ed('0x14b')]));this[_0x51ed('0x33')]['noop'](util[_0x51ed('0x27')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x51ed('0x33')][_0x51ed('0x37')],_0x844588[_0x51ed('0x14b')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x51ed('0x12')][_0x51ed('0x1c1')]=function(_0x3cdf27){logger['info'](util[_0x51ed('0x27')]('Enter\x20in\x20VOICEMAIL\x20(%s)\x20block',_0x3cdf27['label']));var _0x52fb3a=this['channel'][_0x51ed('0xb4')](_0x51ed('0x1c2'),[_0x3cdf27['mailbox'],_0x3cdf27[_0x51ed('0x9e')]]);if(_0x52fb3a[_0x51ed('0x98')]===-0x1){return _0x52fb3a;}return this['channel']['noop'](util[_0x51ed('0x27')]('Executed\x20command\x20%s\x20%s',_0x51ed('0x1c2'),_0x3cdf27['mailbox']));};AGIVertices['prototype']['vswitch']=function(_0x3a05ab){logger['info'](util[_0x51ed('0x27')](_0x51ed('0x1c3'),_0x3a05ab[_0x51ed('0x35')]));if(!this[_0x51ed('0x79')](_0x3a05ab['variable_id'])){return this['channel']['error'](_0x3a05ab,_0x51ed('0x1a5'));}var _0x76c838=this[_0x51ed('0x97')][_0x51ed('0x68')](this,_0x3a05ab[_0x51ed('0xca')]);if(!_0x76c838){return this[_0x51ed('0x33')]['error'](_0x3a05ab,_0x51ed('0x10d'));}var _0x309a20=this[_0x51ed('0x33')][_0x51ed('0x97')](_0x76c838);return{'code':0xc8,'result':_0x309a20[_0x51ed('0x95')]?_0x309a20['extra']:'-'};};String['prototype']['replaceAll']=function(_0x57832a,_0x1ea9fa){return this[_0x51ed('0x93')](_0x57832a)[_0x51ed('0x1c4')](_0x1ea9fa);};module[_0x51ed('0x1c5')]=AGIVertices;