Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.29.js
index f6fb3f0..69b57e0 100644 (file)
@@ -1 +1 @@
-const a908_0x39c3=['#AMD\x20Total\x20Analysis\x20Time','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x277\x27,\x20\x27gotoif\x27,\x20\x27$[\x22${AMDSTATUS}\x22\x20==\x20\x22NOTSURE\x22\x20]?9:8\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','dialAMDSilenceThreshold','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x275\x27,\x20\x27amd\x27,\x20\x27${XMD-AMDINITIALSILENCE},${XMD-AMDGREETING},${XMD-AMDAFTERGREETINGSILENCE},${XMD-AMDTOTALANALYSISTIME},${XMD-AMDMINWORDLENGTH},${XMD-AMDBETWEENWORDSSILENCE},${XMD-AMDMAXIMUMNUMBEROFWORDS},${XMD-AMDSILENCETHRESHOLD},${XMD-AMDMAXIMUMWORDLENGTH}\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','dialAMDMaximumWordLength','#AMD\x20Greeting','campaigns','cm_hopper_final','chat_interactions','dialAMDTotalAnalysisTime','#AMD\x20After\x20Greeting\x20Silence','info','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x274\x27,\x20\x27gotoif\x27,\x20\x27$[\x22${XMD-AMD}\x22\x20!=\x20\x22NONE\x22\x20]?5:9\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','dialAMDInitialSilence','dialAMDGreeting','tail','#AMD\x20Maximum\x20Number\x20Of\x20Words','team_has_chat_queues','queryInterface','chat_dispositions','#AMD\x20Maximum\x20Word\x20Length','dropTable','BOOLEAN','#AMD\x20Initial\x20Silence','user_has_openchannel_interactions','INTEGER','dialAMDMinWordLength','query','phone','DELETE\x20FROM\x20`voice_extensions`\x20WHERE\x20exten\x20=\x20\x27xcally-motion-dialer\x27;','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x273\x27,\x20\x27set\x27,\x20\x27CALLERID(all)=${XMD-CALLERID}\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','phoneBarUnconditionalNumber','prototype','then','query\x20%s','migration','dialAMDAfterGreetingSilence','table\x20dropped\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s','chat_applications','chat_proactive_actions','UNSIGNED','dialQueueTimeout','voice_queues','openchannel_messages','addColumn','finally','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x278\x27,\x20\x27gotoif\x27,\x20\x27$[\x22${AMDSTATUS}\x22\x20==\x20\x22MACHINE\x22\x20]?11:9\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x271\x27,\x20\x27NoOp\x27,\x20\x27\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','dialAMDMaximumNumberOfWords','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x279\x27,\x20\x27execif\x27,\x20\x27$[\x22${XMD-AGI}\x22\x20!=\x20\x22NONE\x22\x20]?AGI(${XMD-AGI})\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','exports','phoneBarBusyNumber','#AMD\x20Min\x20Word\x20Length','phoneBarUnconditional','enqueue','final','STRING','changeColumn','stringify','phoneBarDnd','addIndex\x20%s\x20%s\x20%s','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x276\x27,\x20\x27gotoif\x27,\x20\x27$[\x22${AMDSTATUS}\x22\x20==\x20\x22HUMAN\x22\x20]?9:7\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x2710\x27,\x20\x27execif\x27,\x20\x27$[\x22${XMD-QUEUE}\x22\x20!=\x20\x22NONE\x22\x20]?QUEUE(${XMD-QUEUE})\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','user_has_chat_queues','#AMD\x20Between\x20Words\x20Silence','Active/Disactive\x20AMD','users','dialAMDBetweenWordsSilence','catch','sequence','chat_websites','chat_messages','calleridnum','join','sequelize','addIndex'];(function(_0x3eb0ff,_0x39c337){const _0x382195=function(_0x21341f){while(--_0x21341f){_0x3eb0ff['push'](_0x3eb0ff['shift']());}};_0x382195(++_0x39c337);}(a908_0x39c3,0x196));const a908_0x3821=function(_0x3eb0ff,_0x39c337){_0x3eb0ff=_0x3eb0ff-0x0;let _0x382195=a908_0x39c3[_0x3eb0ff];return _0x382195;};const _0x4fc6d8=a908_0x3821;'use strict';const logger=require('../config/logger')(_0x4fc6d8('0xe')),Sequence=function(){};Sequence[_0x4fc6d8('0xb')][_0x4fc6d8('0x22')]=function(_0x21341f){const _0x1943ae=_0x4fc6d8;this[_0x1943ae('0x47')]=this[_0x1943ae('0x47')]?this[_0x1943ae('0x47')][_0x1943ae('0x19')](_0x21341f):_0x21341f();};const Migration=function(_0x28277b){this['queryInterface']=_0x28277b,this['sequence']=new Sequence();};Migration[_0x4fc6d8('0xb')][_0x4fc6d8('0x25')]=function(_0x5a4ff4,_0x38db8c,_0x9d708c){const _0x4b8de3=this;this['sequence']['enqueue'](function(){const _0x488e2d=a908_0x3821;return _0x4b8de3[_0x488e2d('0x4a')][_0x488e2d('0x25')](_0x5a4ff4,_0x38db8c,_0x9d708c)[_0x488e2d('0xc')](function(){const _0x987326=_0x488e2d;logger[_0x987326('0x43')](_0x987326('0x11'),_0x38db8c,_0x5a4ff4);})[_0x488e2d('0x30')](function(_0x19b09e){const _0x5ca60c=_0x488e2d;logger[_0x5ca60c('0x43')](JSON[_0x5ca60c('0x26')](_0x19b09e));});});},Migration[_0x4fc6d8('0xb')][_0x4fc6d8('0x18')]=function(_0x4bdd74,_0xff076,_0x34658a){const _0x34c792=_0x4fc6d8,_0x2a6216=this;this['sequence'][_0x34c792('0x22')](function(){const _0x490a26=_0x34c792;return _0x2a6216['queryInterface'][_0x490a26('0x18')](_0x4bdd74,_0xff076,_0x34658a)[_0x490a26('0xc')](function(){const _0x42ac58=_0x490a26;logger[_0x42ac58('0x43')]('Added\x20column\x20%s\x20to\x20%s',_0xff076,_0x4bdd74);})[_0x490a26('0x30')](function(_0x36b78e){const _0x982993=_0x490a26;logger[_0x982993('0x43')](JSON[_0x982993('0x26')](_0x36b78e));});});},Migration['prototype'][_0x4fc6d8('0x0')]=function(_0x2c573f){const _0x2d69ae=_0x4fc6d8,_0x18a4bc=this;this[_0x2d69ae('0x31')]['enqueue'](function(){const _0x460ff6=_0x2d69ae;return _0x18a4bc[_0x460ff6('0x4a')]['dropTable'](_0x2c573f,{'force':!![]})[_0x460ff6('0xc')](function(){const _0x361f61=_0x460ff6;logger[_0x361f61('0x43')](_0x361f61('0x10'),_0x2c573f);})[_0x460ff6('0x30')](function(_0x15618e){const _0x580833=_0x460ff6;logger[_0x580833('0x43')](JSON[_0x580833('0x26')](_0x15618e));});});},Migration[_0x4fc6d8('0xb')][_0x4fc6d8('0x37')]=function(_0x20a8b1,_0x3d5742,_0xaab18d){const _0x3a6151=_0x4fc6d8,_0x577520=this;this[_0x3a6151('0x31')][_0x3a6151('0x22')](function(){const _0x449345=_0x3a6151;return _0x577520['queryInterface'][_0x449345('0x37')](_0x20a8b1,_0x3d5742,{'indexName':_0xaab18d})[_0x449345('0xc')](function(){const _0x39f49d=_0x449345;logger['info'](_0x39f49d('0x28'),_0x20a8b1,_0x3d5742[_0x39f49d('0x35')](','),_0xaab18d);})['catch'](function(_0x41d718){const _0x102126=_0x449345;logger['info'](JSON[_0x102126('0x26')](_0x41d718));});});},Migration[_0x4fc6d8('0xb')][_0x4fc6d8('0x6')]=function(_0x4a7639){const _0x20c62c=_0x4fc6d8,_0x306279=this;this[_0x20c62c('0x31')][_0x20c62c('0x22')](function(){const _0x56c74c=_0x20c62c;return _0x306279[_0x56c74c('0x4a')][_0x56c74c('0x36')][_0x56c74c('0x6')](_0x4a7639)[_0x56c74c('0xc')](function(){const _0x53144f=_0x56c74c;logger[_0x53144f('0x43')](_0x53144f('0xd'),_0x4a7639);})[_0x56c74c('0x30')](function(_0x5dad13){const _0x627b59=_0x56c74c;logger[_0x627b59('0x43')](JSON[_0x627b59('0x26')](_0x5dad13));});});},Migration[_0x4fc6d8('0xb')][_0x4fc6d8('0x23')]=function(_0x107295){const _0x1c1717=_0x4fc6d8;this[_0x1c1717('0x31')][_0x1c1717('0x22')](function(){return _0x107295();});},module[_0x4fc6d8('0x1e')]={'up':function(_0x52f793,_0x332aac){return new Promise(function(_0x23252b){const _0x342291=a908_0x3821,_0x5532b7=new Migration(_0x52f793);_0x5532b7[_0x342291('0x0')]('user_has_chat_rooms'),_0x5532b7[_0x342291('0x0')]('chat_enquiries'),_0x5532b7[_0x342291('0x0')](_0x342291('0x33')),_0x5532b7[_0x342291('0x0')](_0x342291('0x13')),_0x5532b7[_0x342291('0x0')](_0x342291('0x4b')),_0x5532b7[_0x342291('0x0')](_0x342291('0x12')),_0x5532b7[_0x342291('0x0')]('user_has_chat_interactions'),_0x5532b7[_0x342291('0x0')](_0x342291('0x40')),_0x5532b7[_0x342291('0x0')](_0x342291('0x49')),_0x5532b7[_0x342291('0x0')](_0x342291('0x2b')),_0x5532b7[_0x342291('0x0')]('chat_queues'),_0x5532b7[_0x342291('0x0')](_0x342291('0x32')),_0x5532b7[_0x342291('0x0')](_0x342291('0x17')),_0x5532b7[_0x342291('0x0')](_0x342291('0x3')),_0x5532b7[_0x342291('0x0')]('openchannel_interactions'),_0x5532b7[_0x342291('0x37')]('cm_hopper',[_0x342291('0x7')],'phone'),_0x5532b7[_0x342291('0x37')](_0x342291('0x3f'),[_0x342291('0x34')],_0x342291('0x34')),_0x5532b7[_0x342291('0x18')]('users',_0x342291('0xa'),{'type':_0x332aac[_0x342291('0x24')]}),_0x5532b7[_0x342291('0x18')](_0x342291('0x2e'),'phoneBarNoReplyNumber',{'type':_0x332aac['STRING']}),_0x5532b7[_0x342291('0x18')](_0x342291('0x2e'),_0x342291('0x1f'),{'type':_0x332aac['STRING']}),_0x5532b7['addColumn'](_0x342291('0x2e'),_0x342291('0x21'),{'type':_0x332aac[_0x342291('0x1')],'defaultValue':![]}),_0x5532b7[_0x342291('0x18')](_0x342291('0x2e'),'phoneBarNoReply',{'type':_0x332aac[_0x342291('0x1')],'defaultValue':![]}),_0x5532b7[_0x342291('0x18')](_0x342291('0x2e'),'phoneBarBusy',{'type':_0x332aac[_0x342291('0x1')],'defaultValue':![]}),_0x5532b7[_0x342291('0x18')](_0x342291('0x2e'),_0x342291('0x27'),{'type':_0x332aac[_0x342291('0x1')],'defaultValue':!![]}),_0x5532b7['changeColumn'](_0x342291('0x3e'),_0x342291('0x15'),{'type':_0x332aac[_0x342291('0x4')](0x3)[_0x342291('0x14')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)'}),_0x5532b7[_0x342291('0x18')]('voice_queues','dialAMDActive',{'type':_0x332aac['BOOLEAN'],'defaultValue':0x0,'comment':_0x342291('0x2d')}),_0x5532b7[_0x342291('0x18')]('voice_queues',_0x342291('0x45'),{'type':_0x332aac[_0x342291('0x4')](0x9)['UNSIGNED'],'validate':{'min':0x0},'defaultValue':0x9c4,'comment':_0x342291('0x2')}),_0x5532b7[_0x342291('0x18')](_0x342291('0x16'),_0x342291('0x46'),{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x5dc,'comment':_0x342291('0x3d')}),_0x5532b7[_0x342291('0x18')](_0x342291('0x16'),_0x342291('0xf'),{'type':_0x332aac['INTEGER'](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x320,'comment':_0x342291('0x42')}),_0x5532b7[_0x342291('0x18')](_0x342291('0x16'),_0x342291('0x41'),{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x1388,'comment':_0x342291('0x38')}),_0x5532b7[_0x342291('0x18')](_0x342291('0x16'),'dialAMDMinWordLength',{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x64,'comment':'#AMD\x20Min\x20Word\x20Length'}),_0x5532b7[_0x342291('0x18')]('voice_queues','dialAMDBetweenWordsSilence',{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x32,'comment':_0x342291('0x2c')}),_0x5532b7[_0x342291('0x18')]('voice_queues','dialAMDMaximumNumberOfWords',{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x3,'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'}),_0x5532b7['addColumn'](_0x342291('0x16'),_0x342291('0x3a'),{'type':_0x332aac['INTEGER'](0x5)[_0x342291('0x14')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':'#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)'}),_0x5532b7['addColumn'](_0x342291('0x16'),_0x342291('0x3c'),{'type':_0x332aac[_0x342291('0x4')](0x9)['UNSIGNED'],'validate':{'min':0x0},'defaultValue':0x1388,'comment':_0x342291('0x4c')}),_0x5532b7[_0x342291('0x18')](_0x342291('0x3e'),'dialAMDActive',{'type':_0x332aac[_0x342291('0x1')],'defaultValue':0x0,'comment':_0x342291('0x2d')}),_0x5532b7[_0x342291('0x18')]('campaigns',_0x342291('0x45'),{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x9c4,'comment':_0x342291('0x2')}),_0x5532b7[_0x342291('0x18')](_0x342291('0x3e'),_0x342291('0x46'),{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x5dc,'comment':_0x342291('0x3d')}),_0x5532b7['addColumn']('campaigns',_0x342291('0xf'),{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x320,'comment':_0x342291('0x42')}),_0x5532b7[_0x342291('0x18')](_0x342291('0x3e'),_0x342291('0x41'),{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x1388,'comment':_0x342291('0x38')}),_0x5532b7[_0x342291('0x18')]('campaigns',_0x342291('0x5'),{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x64,'comment':_0x342291('0x20')}),_0x5532b7['addColumn'](_0x342291('0x3e'),_0x342291('0x2f'),{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x32,'comment':_0x342291('0x2c')}),_0x5532b7[_0x342291('0x18')](_0x342291('0x3e'),_0x342291('0x1c'),{'type':_0x332aac[_0x342291('0x4')](0x9)['UNSIGNED'],'validate':{'min':0x0},'defaultValue':0x3,'comment':_0x342291('0x48')}),_0x5532b7[_0x342291('0x18')](_0x342291('0x3e'),_0x342291('0x3a'),{'type':_0x332aac['INTEGER'](0x5)[_0x342291('0x14')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':'#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)'}),_0x5532b7[_0x342291('0x18')](_0x342291('0x3e'),'dialAMDMaximumWordLength',{'type':_0x332aac[_0x342291('0x4')](0x9)[_0x342291('0x14')],'validate':{'min':0x0},'defaultValue':0x1388,'comment':_0x342291('0x4c')}),_0x5532b7['query'](_0x342291('0x8')),_0x5532b7['query'](_0x342291('0x1b')),_0x5532b7[_0x342291('0x6')]('INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x272\x27,\x20\x27set\x27,\x20\x27CDR(type)=dialer\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());'),_0x5532b7['query'](_0x342291('0x9')),_0x5532b7[_0x342291('0x6')](_0x342291('0x44')),_0x5532b7[_0x342291('0x6')](_0x342291('0x3b')),_0x5532b7[_0x342291('0x6')](_0x342291('0x29')),_0x5532b7['query'](_0x342291('0x39')),_0x5532b7['query'](_0x342291('0x1a')),_0x5532b7['query'](_0x342291('0x1d')),_0x5532b7['query'](_0x342291('0x2a')),_0x5532b7[_0x342291('0x6')]('INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x2711\x27,\x20\x27hangup\x27,\x20\x27system\x27,\x20\x27dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());'),_0x5532b7['final'](_0x23252b);});},'down':function(){}};
\ No newline at end of file
+const a908_0x5ee7=['cm_hopper','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x275\x27,\x20\x27amd\x27,\x20\x27${XMD-AMDINITIALSILENCE},${XMD-AMDGREETING},${XMD-AMDAFTERGREETINGSILENCE},${XMD-AMDTOTALANALYSISTIME},${XMD-AMDMINWORDLENGTH},${XMD-AMDBETWEENWORDSSILENCE},${XMD-AMDMAXIMUMNUMBEROFWORDS},${XMD-AMDSILENCETHRESHOLD},${XMD-AMDMAXIMUMWORDLENGTH}\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','chat_messages','#AMD\x20Between\x20Words\x20Silence','dialAMDBetweenWordsSilence','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x2711\x27,\x20\x27hangup\x27,\x20\x27system\x27,\x20\x27dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','BOOLEAN','UNSIGNED','info','Added\x20column\x20%s\x20to\x20%s','user_has_chat_rooms','stringify','phoneBarUnconditionalNumber','STRING','users','campaigns','chat_applications','#AMD\x20Maximum\x20Word\x20Length','Changed\x20column\x20%s\x20in\x20table\x20%s','INTEGER','dialQueueTimeout','dialAMDMaximumNumberOfWords','chat_interactions','tail','dialAMDMaximumWordLength','dialAMDMinWordLength','finally','Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x272\x27,\x20\x27set\x27,\x20\x27CDR(type)=dialer\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','#AMD\x20After\x20Greeting\x20Silence','dialAMDSilenceThreshold','voice_queues','addColumn','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x276\x27,\x20\x27gotoif\x27,\x20\x27$[\x22${AMDSTATUS}\x22\x20==\x20\x22HUMAN\x22\x20]?9:7\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','prototype','cm_hopper_final','queryInterface','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x274\x27,\x20\x27gotoif\x27,\x20\x27$[\x22${XMD-AMD}\x22\x20!=\x20\x22NONE\x22\x20]?5:9\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x278\x27,\x20\x27gotoif\x27,\x20\x27$[\x22${AMDSTATUS}\x22\x20==\x20\x22MACHINE\x22\x20]?11:9\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','dialAMDInitialSilence','calleridnum','migration','chat_queues','#AMD\x20Min\x20Word\x20Length','DELETE\x20FROM\x20`voice_extensions`\x20WHERE\x20exten\x20=\x20\x27xcally-motion-dialer\x27;','query\x20%s','chat_websites','then','table\x20dropped\x20%s','dialAMDTotalAnalysisTime','changeColumn','phoneBarDnd','phoneBarNoReplyNumber','openchannel_interactions','phoneBarNoReply','catch','dialAMDGreeting','#AMD\x20Total\x20Analysis\x20Time','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x277\x27,\x20\x27gotoif\x27,\x20\x27$[\x22${AMDSTATUS}\x22\x20==\x20\x22NOTSURE\x22\x20]?9:8\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','dropTable','Active/Disactive\x20AMD','enqueue','user_has_openchannel_interactions','#AMD\x20Greeting','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x2710\x27,\x20\x27execif\x27,\x20\x27$[\x22${XMD-QUEUE}\x22\x20!=\x20\x22NONE\x22\x20]?QUEUE(${XMD-QUEUE})\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','phone','#AMD\x20Initial\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','sequence','final','query','addIndex','exports','sequelize','dialAMDAfterGreetingSilence'];(function(_0x34e0b5,_0x5ee79b){const _0x43d072=function(_0x2a98b5){while(--_0x2a98b5){_0x34e0b5['push'](_0x34e0b5['shift']());}};_0x43d072(++_0x5ee79b);}(a908_0x5ee7,0x1b1));const a908_0x43d0=function(_0x34e0b5,_0x5ee79b){_0x34e0b5=_0x34e0b5-0x0;let _0x43d072=a908_0x5ee7[_0x34e0b5];return _0x43d072;};const _0x4b18ed=a908_0x43d0;'use strict';const logger=require('../config/logger')(_0x4b18ed('0x3a')),Sequence=function(){};Sequence[_0x4b18ed('0x33')][_0x4b18ed('0x3')]=function(_0x2a98b5){const _0x2bd2c7=_0x4b18ed;this[_0x2bd2c7('0x28')]=this['tail']?this['tail'][_0x2bd2c7('0x2b')](_0x2a98b5):_0x2a98b5();};const Migration=function(_0x25135e){const _0x2b9e7a=_0x4b18ed;this[_0x2b9e7a('0x35')]=_0x25135e,this[_0x2b9e7a('0xa')]=new Sequence();};Migration['prototype']['changeColumn']=function(_0x3f59dc,_0x208f46,_0x590479){const _0x581cff=_0x4b18ed,_0xa318cc=this;this[_0x581cff('0xa')][_0x581cff('0x3')](function(){const _0x3fc95d=_0x581cff;return _0xa318cc[_0x3fc95d('0x35')][_0x3fc95d('0x43')](_0x3f59dc,_0x208f46,_0x590479)[_0x3fc95d('0x40')](function(){const _0x56a2d7=_0x3fc95d;logger[_0x56a2d7('0x19')](_0x56a2d7('0x23'),_0x208f46,_0x3f59dc);})['catch'](function(_0x54f6b5){const _0x1a6343=_0x3fc95d;logger[_0x1a6343('0x19')](JSON[_0x1a6343('0x1c')](_0x54f6b5));});});},Migration[_0x4b18ed('0x33')][_0x4b18ed('0x31')]=function(_0x366490,_0x206596,_0x32e1b5){const _0x197965=_0x4b18ed,_0x264cbb=this;this[_0x197965('0xa')][_0x197965('0x3')](function(){const _0x2a6f71=_0x197965;return _0x264cbb[_0x2a6f71('0x35')]['addColumn'](_0x366490,_0x206596,_0x32e1b5)[_0x2a6f71('0x40')](function(){const _0x4d26ec=_0x2a6f71;logger[_0x4d26ec('0x19')](_0x4d26ec('0x1a'),_0x206596,_0x366490);})['catch'](function(_0x2f78f5){const _0x3e448a=_0x2a6f71;logger[_0x3e448a('0x19')](JSON[_0x3e448a('0x1c')](_0x2f78f5));});});},Migration['prototype'][_0x4b18ed('0x1')]=function(_0x522681){const _0x4f090e=this;this['sequence']['enqueue'](function(){const _0x4e7b14=a908_0x43d0;return _0x4f090e[_0x4e7b14('0x35')][_0x4e7b14('0x1')](_0x522681,{'force':!![]})[_0x4e7b14('0x40')](function(){const _0x5baa83=_0x4e7b14;logger['info'](_0x5baa83('0x41'),_0x522681);})[_0x4e7b14('0x48')](function(_0x1849eb){const _0x24542d=_0x4e7b14;logger[_0x24542d('0x19')](JSON[_0x24542d('0x1c')](_0x1849eb));});});},Migration['prototype'][_0x4b18ed('0xd')]=function(_0x3297fa,_0x321326,_0x530e66){const _0x1a0e54=_0x4b18ed,_0x4591f2=this;this[_0x1a0e54('0xa')]['enqueue'](function(){const _0x58eff0=_0x1a0e54;return _0x4591f2[_0x58eff0('0x35')][_0x58eff0('0xd')](_0x3297fa,_0x321326,{'indexName':_0x530e66})[_0x58eff0('0x40')](function(){logger['info']('addIndex\x20%s\x20%s\x20%s',_0x3297fa,_0x321326['join'](','),_0x530e66);})[_0x58eff0('0x48')](function(_0x344cd9){const _0x4a37b9=_0x58eff0;logger[_0x4a37b9('0x19')](JSON['stringify'](_0x344cd9));});});},Migration[_0x4b18ed('0x33')][_0x4b18ed('0xc')]=function(_0x4c3d68){const _0x4a84c1=_0x4b18ed,_0x213cec=this;this['sequence'][_0x4a84c1('0x3')](function(){const _0x3de69a=_0x4a84c1;return _0x213cec[_0x3de69a('0x35')][_0x3de69a('0xf')][_0x3de69a('0xc')](_0x4c3d68)[_0x3de69a('0x40')](function(){const _0x159f50=_0x3de69a;logger['info'](_0x159f50('0x3e'),_0x4c3d68);})['catch'](function(_0x1902d7){const _0x4a9688=_0x3de69a;logger[_0x4a9688('0x19')](JSON['stringify'](_0x1902d7));});});},Migration[_0x4b18ed('0x33')]['final']=function(_0x4fed28){const _0x293f12=_0x4b18ed;this[_0x293f12('0xa')][_0x293f12('0x3')](function(){return _0x4fed28();});},module[_0x4b18ed('0xe')]={'up':function(_0x4c2672,_0x443095){return new Promise(function(_0x32819b){const _0x34848c=a908_0x43d0,_0x5c7401=new Migration(_0x4c2672);_0x5c7401[_0x34848c('0x1')](_0x34848c('0x1b')),_0x5c7401[_0x34848c('0x1')]('chat_enquiries'),_0x5c7401['dropTable'](_0x34848c('0x13')),_0x5c7401[_0x34848c('0x1')]('chat_proactive_actions'),_0x5c7401['dropTable']('chat_dispositions'),_0x5c7401[_0x34848c('0x1')](_0x34848c('0x21')),_0x5c7401[_0x34848c('0x1')]('user_has_chat_interactions'),_0x5c7401[_0x34848c('0x1')](_0x34848c('0x27')),_0x5c7401['dropTable']('team_has_chat_queues'),_0x5c7401[_0x34848c('0x1')]('user_has_chat_queues'),_0x5c7401[_0x34848c('0x1')](_0x34848c('0x3b')),_0x5c7401[_0x34848c('0x1')](_0x34848c('0x3f')),_0x5c7401[_0x34848c('0x1')]('openchannel_messages'),_0x5c7401[_0x34848c('0x1')](_0x34848c('0x4')),_0x5c7401['dropTable'](_0x34848c('0x46')),_0x5c7401['addIndex'](_0x34848c('0x11'),[_0x34848c('0x7')],_0x34848c('0x7')),_0x5c7401[_0x34848c('0xd')](_0x34848c('0x34'),[_0x34848c('0x39')],_0x34848c('0x39')),_0x5c7401[_0x34848c('0x31')]('users',_0x34848c('0x1d'),{'type':_0x443095[_0x34848c('0x1e')]}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x1f'),_0x34848c('0x45'),{'type':_0x443095[_0x34848c('0x1e')]}),_0x5c7401['addColumn'](_0x34848c('0x1f'),'phoneBarBusyNumber',{'type':_0x443095[_0x34848c('0x1e')]}),_0x5c7401['addColumn']('users','phoneBarUnconditional',{'type':_0x443095[_0x34848c('0x17')],'defaultValue':![]}),_0x5c7401[_0x34848c('0x31')]('users',_0x34848c('0x47'),{'type':_0x443095[_0x34848c('0x17')],'defaultValue':![]}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x1f'),'phoneBarBusy',{'type':_0x443095[_0x34848c('0x17')],'defaultValue':![]}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x1f'),_0x34848c('0x44'),{'type':_0x443095[_0x34848c('0x17')],'defaultValue':!![]}),_0x5c7401[_0x34848c('0x43')](_0x34848c('0x20'),_0x34848c('0x25'),{'type':_0x443095[_0x34848c('0x24')](0x3)[_0x34848c('0x18')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x34848c('0x2c')}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x30'),'dialAMDActive',{'type':_0x443095[_0x34848c('0x17')],'defaultValue':0x0,'comment':_0x34848c('0x2')}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x30'),_0x34848c('0x38'),{'type':_0x443095[_0x34848c('0x24')](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x9c4,'comment':'#AMD\x20Initial\x20Silence'}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x30'),_0x34848c('0x49'),{'type':_0x443095[_0x34848c('0x24')](0x9)['UNSIGNED'],'validate':{'min':0x0},'defaultValue':0x5dc,'comment':_0x34848c('0x5')}),_0x5c7401['addColumn'](_0x34848c('0x30'),_0x34848c('0x10'),{'type':_0x443095['INTEGER'](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x320,'comment':_0x34848c('0x2e')}),_0x5c7401[_0x34848c('0x31')]('voice_queues','dialAMDTotalAnalysisTime',{'type':_0x443095['INTEGER'](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x1388,'comment':_0x34848c('0x4a')}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x30'),_0x34848c('0x2a'),{'type':_0x443095[_0x34848c('0x24')](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x64,'comment':_0x34848c('0x3c')}),_0x5c7401['addColumn']('voice_queues',_0x34848c('0x15'),{'type':_0x443095[_0x34848c('0x24')](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x32,'comment':_0x34848c('0x14')}),_0x5c7401['addColumn']('voice_queues',_0x34848c('0x26'),{'type':_0x443095[_0x34848c('0x24')](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x3,'comment':_0x34848c('0x9')}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x30'),'dialAMDSilenceThreshold',{'type':_0x443095[_0x34848c('0x24')](0x5)[_0x34848c('0x18')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':'#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)'}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x30'),_0x34848c('0x29'),{'type':_0x443095[_0x34848c('0x24')](0x9)['UNSIGNED'],'validate':{'min':0x0},'defaultValue':0x1388,'comment':_0x34848c('0x22')}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x20'),'dialAMDActive',{'type':_0x443095[_0x34848c('0x17')],'defaultValue':0x0,'comment':_0x34848c('0x2')}),_0x5c7401[_0x34848c('0x31')]('campaigns',_0x34848c('0x38'),{'type':_0x443095[_0x34848c('0x24')](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x9c4,'comment':_0x34848c('0x8')}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x20'),_0x34848c('0x49'),{'type':_0x443095[_0x34848c('0x24')](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x5dc,'comment':_0x34848c('0x5')}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x20'),_0x34848c('0x10'),{'type':_0x443095[_0x34848c('0x24')](0x9)['UNSIGNED'],'validate':{'min':0x0},'defaultValue':0x320,'comment':_0x34848c('0x2e')}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x20'),_0x34848c('0x42'),{'type':_0x443095['INTEGER'](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x1388,'comment':'#AMD\x20Total\x20Analysis\x20Time'}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x20'),_0x34848c('0x2a'),{'type':_0x443095[_0x34848c('0x24')](0x9)['UNSIGNED'],'validate':{'min':0x0},'defaultValue':0x64,'comment':_0x34848c('0x3c')}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x20'),_0x34848c('0x15'),{'type':_0x443095[_0x34848c('0x24')](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x32,'comment':_0x34848c('0x14')}),_0x5c7401[_0x34848c('0x31')]('campaigns','dialAMDMaximumNumberOfWords',{'type':_0x443095[_0x34848c('0x24')](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x3,'comment':_0x34848c('0x9')}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x20'),_0x34848c('0x2f'),{'type':_0x443095['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':'#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)'}),_0x5c7401[_0x34848c('0x31')](_0x34848c('0x20'),'dialAMDMaximumWordLength',{'type':_0x443095[_0x34848c('0x24')](0x9)[_0x34848c('0x18')],'validate':{'min':0x0},'defaultValue':0x1388,'comment':_0x34848c('0x22')}),_0x5c7401['query'](_0x34848c('0x3d')),_0x5c7401[_0x34848c('0xc')]('INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x271\x27,\x20\x27NoOp\x27,\x20\x27\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());'),_0x5c7401[_0x34848c('0xc')](_0x34848c('0x2d')),_0x5c7401[_0x34848c('0xc')]('INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x273\x27,\x20\x27set\x27,\x20\x27CALLERID(all)=${XMD-CALLERID}\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());'),_0x5c7401[_0x34848c('0xc')](_0x34848c('0x36')),_0x5c7401['query'](_0x34848c('0x12')),_0x5c7401[_0x34848c('0xc')](_0x34848c('0x32')),_0x5c7401[_0x34848c('0xc')](_0x34848c('0x0')),_0x5c7401[_0x34848c('0xc')](_0x34848c('0x37')),_0x5c7401[_0x34848c('0xc')]('INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x279\x27,\x20\x27execif\x27,\x20\x27$[\x22${XMD-AGI}\x22\x20!=\x20\x22NONE\x22\x20]?AGI(${XMD-AGI})\x27,\x20\x27system\x27,\x20\x27Dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());'),_0x5c7401[_0x34848c('0xc')](_0x34848c('0x6')),_0x5c7401[_0x34848c('0xc')](_0x34848c('0x16')),_0x5c7401[_0x34848c('0xb')](_0x32819b);});},'down':function(){}};
\ No newline at end of file