Built motion from commit 459747fdfe53bbf13fbede61eeaffea1f1438f86. Version 3.0.0...
[motion-next.git] / server / config / seedDB / voiceExtensions.js
1 const a882_0x5728=['Echo','$[\x22${AMDSTATUS}\x22\x20==\x20\x22NOTSURE\x22\x20]?11:10','6670','queue','agi://127.0.0.1/square,AgentManagement','FAXOPT(maxrate)=${XMF-MAXRATE}','forward\x20to\x20Orders\x20IVR\x20auto\x20generated','outboundrouteid=','FAXOPT(modem)=${XMF-MODEM}','Answer','$[\x22${XMD-AGIAFTER}\x22\x20!=\x20\x22NONE\x22\x20]?AGI(${XMD-AGIAFTER})','failed','agi://127.0.0.1/square,CSI','inbound','destroy','$[\x22${AMDSTATUS}\x22\x20==\x20\x22MACHINE\x22\x20]?14:11','_XCALLY_MIXMONITOR_FORMAT=wav','CDR(type)=internal','xcally-mixmonitor-context','Playback','CDR(type)=inbound','type','../../mysqldb','$[\x22${AMDSTATUS}\x22\x20==\x20\x22HUMAN\x22\x20]?11:9','6669','GotoIf','forward\x20to\x20Support\x20queue\x20auto\x20generated','forward\x20to\x20Auto\x20Attendant\x20IVR\x20auto\x20generated','xcally-motion-fax','CDR(type)=outbound','_[x][c][a][l][l][y][Q][u][e][u][e][E][x][t][e][n][s][i][o][n].','Hangup','FAXOPT(minrate)=${XMF-MINRATE}','from-sip','defaults','../logger','forward\x20to\x20Agent\x20Management\x20IVR\x20auto\x20generated','outbound','then','Set','MixMonitor','fax\x20extensions\x20auto\x20generated','Support,xX,,,300,,,,,','FAXOPT(t38timeout)=${XMF-T38TIMEOUT}','context','Return','lodash','6668','Dial','6000','system','$[\x22${XMD-QUEUE}\x22\x20!=\x20\x22NONE\x22\x20]?QUEUE(${XMD-QUEUE})','CALLERID(all)=${XMD-CALLERID}','FAXOPT(ecm)=${XMF-ECM}','forward\x20to\x20CSI\x20IVR\x20auto\x20generated','VoiceExtension','6667','outboundrouteid','catch','agi://127.0.0.1/square,Survey','exten','_X.','Voice\x20Extensions\x20have\x20been\x20created','sequelize','description','6001','appdata','Background','agi','FAXOPT(headerinfo)=${XMF-HEADERINFO}','$[\x22${XMD-AGI}\x22\x20!=\x20\x22NONE\x22\x20]?AGI(${XMD-AGI})','info','${XMF-PATH},d','demo-echodone','length','Wait','demo\x20outbound\x20calls\x20auto\x20generated','${XCALLY_MIXMONITOR_UNIQUEID}.${XCALLY_MIXMONITOR_FORMAT},ab','600','${XMD-AMDINITIALSILENCE},${XMD-AMDGREETING},${XMD-AMDAFTERGREETINGSILENCE},${XMD-AMDTOTALANALYSISTIME},${XMD-AMDMINWORDLENGTH},${XMD-AMDBETWEENWORDSSILENCE},${XMD-AMDMAXIMUMNUMBEROFWORDS},${XMD-AMDSILENCETHRESHOLD},${XMD-AMDMAXIMUMWORDLENGTH}','MONITOR_OPTIONS=ab','demo-echotest','Queue','catch\x20hangup\x20event\x20auto\x20generated','from-voip-provider','catch\x20all\x20inbound\x20calls\x20auto\x20generated','XCALLY-MOTION-ANSWER=0','AGI','Sales,xX,,,300,,,,,','Can\x27t\x20create\x20Voice\x20Extensions','xcally-motion-preview','app','CDR(type)=outbound-fax','dialer\x20extensions\x20auto\x20generated','error','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','echo\x20test\x20demo\x20auto\x20generated','custom','SendFax','internal','FAXOPT(localstationid)=${XMF-LOCALSTATIONID}','CDR(type)=dialer','createAlways','create','Execif','agi://127.0.0.1/square,AutoAttendant'];(function(_0x1eb12a,_0x572800){const _0x167717=function(_0x58a713){while(--_0x58a713){_0x1eb12a['push'](_0x1eb12a['shift']());}};_0x167717(++_0x572800);}(a882_0x5728,0x1ae));const a882_0x1677=function(_0x1eb12a,_0x572800){_0x1eb12a=_0x1eb12a-0x0;let _0x167717=a882_0x5728[_0x1eb12a];return _0x167717;};const _0x5b7ad3=a882_0x1677;'use strict';const _=require(_0x5b7ad3('0x28')),db=require(_0x5b7ad3('0x10'))['db'],{Op}=require(_0x5b7ad3('0x39')),logger=require(_0x5b7ad3('0x1d'))(_0x5b7ad3('0x55')),applications={0x258:[{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0xb')},{'app':_0x5b7ad3('0x3')},{'app':'Playback','appdata':_0x5b7ad3('0x4b'),'isApp':!![]},{'app':_0x5b7ad3('0x64'),'isApp':!![]},{'app':_0x5b7ad3('0xd'),'appdata':_0x5b7ad3('0x43'),'isApp':!![]},{'app':_0x5b7ad3('0x19')}],0x1770:[{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0xb')},{'app':_0x5b7ad3('0x3')},{'app':'Queue','appdata':_0x5b7ad3('0x24'),'appType':'queue','isApp':!![]},{'app':'Hangup'}],0x1771:[{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0xb')},{'app':_0x5b7ad3('0x3')},{'app':'Queue','appdata':_0x5b7ad3('0x52'),'appType':_0x5b7ad3('0x67'),'isApp':!![]},{'app':'Hangup'}],0x1a0a:[{'app':_0x5b7ad3('0x21'),'appdata':'CDR(type)=internal'},{'app':_0x5b7ad3('0x51'),'appdata':_0x5b7ad3('0x63'),'appType':_0x5b7ad3('0x3e'),'isApp':!![]},{'app':_0x5b7ad3('0x19')}],0x1a0b:[{'app':_0x5b7ad3('0x21'),'appdata':'CDR(type)=internal'},{'app':_0x5b7ad3('0x51'),'appdata':'agi://127.0.0.1/square,Orders','appType':_0x5b7ad3('0x3e'),'isApp':!![]},{'app':'Hangup'}],0x1a0c:[{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0xb')},{'app':_0x5b7ad3('0x51'),'appdata':_0x5b7ad3('0x6'),'appType':'agi','isApp':!![]},{'app':_0x5b7ad3('0x19')}],0x1a0d:[{'app':'Set','appdata':_0x5b7ad3('0xb')},{'app':'AGI','appdata':_0x5b7ad3('0x35'),'appType':'agi','isApp':!![]},{'app':'Hangup'}],0x1a0e:[{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0xb')},{'app':'AGI','appdata':_0x5b7ad3('0x68'),'appType':_0x5b7ad3('0x3e'),'isApp':!![]},{'app':_0x5b7ad3('0x19')}],'xcally-motion-dialer':[{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0x5f')},{'app':_0x5b7ad3('0x21'),'appdata':'CALLERID(all)=${XMD-CALLERID}'},{'app':_0x5b7ad3('0x13'),'appdata':'$[\x22${XMD-AMD}\x22\x20!=\x20\x22NONE\x22\x20]?5:11'},{'app':'Answer','appdata':''},{'app':_0x5b7ad3('0x3d'),'appdata':'silence/1'},{'app':'AMD','appdata':_0x5b7ad3('0x49')},{'app':'GotoIf','appdata':_0x5b7ad3('0x11')},{'app':_0x5b7ad3('0x13'),'appdata':_0x5b7ad3('0x65')},{'app':'GotoIf','appdata':_0x5b7ad3('0x9')},{'app':_0x5b7ad3('0x62'),'appdata':_0x5b7ad3('0x40')},{'app':_0x5b7ad3('0x62'),'appdata':_0x5b7ad3('0x2d')},{'app':_0x5b7ad3('0x62'),'appdata':_0x5b7ad3('0x4')},{'app':_0x5b7ad3('0x19')}],'xcally-motion-fax':[{'app':'Set','appdata':_0x5b7ad3('0x56')},{'app':_0x5b7ad3('0x45'),'appdata':'6'},{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0x2f')},{'app':'Set','appdata':_0x5b7ad3('0x3f')},{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0x5e')},{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0x69')},{'app':'Set','appdata':_0x5b7ad3('0x1a')},{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0x2')},{'app':'Set','appdata':_0x5b7ad3('0x25')},{'app':_0x5b7ad3('0x5c'),'appdata':_0x5b7ad3('0x42')}],'xcally-motion-preview':[{'app':_0x5b7ad3('0x21'),'appdata':'CDR(type)=dialer'},{'app':'Set','appdata':_0x5b7ad3('0x2e')},{'app':_0x5b7ad3('0x62'),'appdata':_0x5b7ad3('0x40')},{'app':_0x5b7ad3('0x2a'),'appdata':'${XMD-DIALCHANNEL},${XMD-DIALTIMEOUT},${XMD-DIALOPTIONS},${XMD-DIALURL}'},{'app':_0x5b7ad3('0x62'),'appdata':_0x5b7ad3('0x4')},{'app':_0x5b7ad3('0x19')}],'_.':[{'app':'Set','appdata':_0x5b7ad3('0x17')},{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0x50')},{'app':_0x5b7ad3('0x21'),'appdata':'XCALLY-MOTION-PROGRESS=0'},{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0x4a')},{'app':_0x5b7ad3('0x21'),'outboundrouteid':!![]},{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0x59')},{'app':'Set','appdata':_0x5b7ad3('0xa')},{'app':_0x5b7ad3('0xd'),'appdata':'demo-congrats','appType':_0x5b7ad3('0x5b'),'isApp':!![]},{'app':_0x5b7ad3('0x19')}],'_X.':[{'app':_0x5b7ad3('0x21'),'appdata':_0x5b7ad3('0xe')},{'app':_0x5b7ad3('0x3')},{'app':_0x5b7ad3('0xd'),'appdata':'demo-congrats','isApp':!![]},{'app':'Hangup'}],'h':[{'app':_0x5b7ad3('0x19')}],'failed':[{'app':_0x5b7ad3('0x19')}]},voiceExtensions=[{'type':_0x5b7ad3('0x5d'),'context':_0x5b7ad3('0x1b'),'exten':_0x5b7ad3('0x48'),'description':_0x5b7ad3('0x5a')},{'type':'internal','context':_0x5b7ad3('0x1b'),'exten':_0x5b7ad3('0x2b'),'description':_0x5b7ad3('0x14')},{'type':_0x5b7ad3('0x5d'),'context':_0x5b7ad3('0x1b'),'exten':_0x5b7ad3('0x3b'),'description':'forward\x20to\x20Sales\x20queue\x20auto\x20generated'},{'type':_0x5b7ad3('0x5d'),'context':_0x5b7ad3('0x1b'),'exten':'6666','description':_0x5b7ad3('0x15')},{'type':_0x5b7ad3('0x5d'),'context':_0x5b7ad3('0x1b'),'exten':_0x5b7ad3('0x32'),'description':_0x5b7ad3('0x0')},{'type':'internal','context':_0x5b7ad3('0x1b'),'exten':_0x5b7ad3('0x29'),'description':_0x5b7ad3('0x30')},{'type':_0x5b7ad3('0x5d'),'context':'from-sip','exten':_0x5b7ad3('0x12'),'description':'forward\x20to\x20Survey\x20IVR\x20auto\x20generated'},{'type':'internal','context':_0x5b7ad3('0x1b'),'exten':_0x5b7ad3('0x66'),'description':_0x5b7ad3('0x1e')},{'type':_0x5b7ad3('0x2c'),'context':_0x5b7ad3('0x1b'),'exten':'xcally-motion-dialer','description':_0x5b7ad3('0x57')},{'type':_0x5b7ad3('0x2c'),'context':_0x5b7ad3('0x1b'),'exten':_0x5b7ad3('0x16'),'description':_0x5b7ad3('0x23')},{'type':_0x5b7ad3('0x2c'),'context':_0x5b7ad3('0x1b'),'exten':_0x5b7ad3('0x54'),'description':'dialer\x20extensions\x20auto\x20generated'},{'type':_0x5b7ad3('0x1f'),'context':'from-sip','exten':'_.','description':_0x5b7ad3('0x46')},{'type':_0x5b7ad3('0x7'),'context':_0x5b7ad3('0x4e'),'exten':_0x5b7ad3('0x37'),'description':_0x5b7ad3('0x4f')},{'type':_0x5b7ad3('0x2c'),'context':_0x5b7ad3('0x1b'),'exten':'h','description':_0x5b7ad3('0x4d')},{'type':_0x5b7ad3('0x2c'),'context':'from-sip','exten':_0x5b7ad3('0x5'),'description':'catch\x20failed\x20event\x20auto\x20generated'}],applicationsAlways={'s':[{'app':_0x5b7ad3('0x22'),'appdata':_0x5b7ad3('0x47')},{'app':_0x5b7ad3('0x27')}],'_[x][c][a][l][l][y][Q][u][e][u][e][E][x][t][e][n][s][i][o][n].':[{'app':'Progress'},{'app':_0x5b7ad3('0x4c'),'appdata':'${EXTEN:20},xX'}]},voiceExtensionsAlways=[{'type':_0x5b7ad3('0x2c'),'context':_0x5b7ad3('0xc'),'exten':'s'},{'type':_0x5b7ad3('0x2c'),'context':_0x5b7ad3('0x1b'),'exten':_0x5b7ad3('0x18')}];function createExtensions(_0x58a713,_0x537aad){const _0x30abbb=_0x5b7ad3;return db[_0x30abbb('0x31')]['bulkCreate'](_0x58a713,{'ignoreDuplicates':!![],'individualHooks':!![]})[_0x30abbb('0x20')](function(_0x2a7367){const _0x576cf7=_0x30abbb;for(let _0x291abd=0x0;_0x291abd<_0x2a7367[_0x576cf7('0x44')];_0x291abd+=0x1){if(_0x537aad[_0x2a7367[_0x291abd]['exten']])for(let _0x5bac58=0x0;_0x5bac58<_0x537aad[_0x2a7367[_0x291abd][_0x576cf7('0x36')]]['length'];_0x5bac58+=0x1){_0x537aad[_0x2a7367[_0x291abd][_0x576cf7('0x36')]][_0x5bac58][_0x576cf7('0x33')]&&(_0x537aad[_0x2a7367[_0x291abd][_0x576cf7('0x36')]][_0x5bac58][_0x576cf7('0x3c')]=_0x576cf7('0x1')+_0x2a7367[_0x291abd]['id'],delete _0x537aad[_0x2a7367[_0x291abd][_0x576cf7('0x36')]][_0x5bac58][_0x576cf7('0x33')]),_0x537aad[_0x2a7367[_0x291abd]['exten']][_0x5bac58]=_[_0x576cf7('0x1c')](_0x537aad[_0x2a7367[_0x291abd][_0x576cf7('0x36')]][_0x5bac58],{'isApp':![],'appType':_0x576cf7('0x5b'),'type':_0x2a7367[_0x291abd][_0x576cf7('0xf')],'context':_0x2a7367[_0x291abd][_0x576cf7('0x26')],'exten':_0x2a7367[_0x291abd][_0x576cf7('0x36')],'priority':parseInt(_0x2a7367[_0x291abd]['priority'],0xa)+0x1+_0x5bac58,'description':_0x2a7367[_0x291abd][_0x576cf7('0x3a')],'VoiceExtensionId':_0x2a7367[_0x291abd]['id']}),db[_0x576cf7('0x31')][_0x576cf7('0x61')](_0x537aad[_0x2a7367[_0x291abd][_0x576cf7('0x36')]][_0x5bac58]);}}})['then'](function(){const _0x146d64=_0x30abbb;logger[_0x146d64('0x41')](_0x146d64('0x38'));})['catch'](function(_0x414757){const _0x19c643=_0x30abbb;logger['error'](_0x19c643('0x53'),_0x414757);});}exports['create']=function(){createExtensions(voiceExtensions,applications);},exports[_0x5b7ad3('0x60')]=function(){const _0x1ee7fb=_0x5b7ad3;return db[_0x1ee7fb('0x31')][_0x1ee7fb('0x8')]({'where':{[Op['or']]:voiceExtensionsAlways}})[_0x1ee7fb('0x20')](function(){createExtensions(voiceExtensionsAlways,applicationsAlways);})[_0x1ee7fb('0x34')](function(_0x41c9af){const _0x502252=_0x1ee7fb;logger[_0x502252('0x58')](_0x502252('0x53'),_0x41c9af);});};