Built motion from commit ecf5ab8ec560fd4c6972692268e350fcef2f38e7. Version 3.0.0...
[motion-next.git] / server / config / seedDB / voiceContexts.js
1 const a881_0x144c=['from-sip','VoiceContext','from-voip-provider','findOrCreate','Can\x27t\x20create\x20','xcally-mixmonitor-context','../../mysqldb','Context\x20','exports','outbound-fax','../logger','\x20context','inbound-fax','name','app','default\x20entry\x20context\x20(DO\x20NOT\x20DELETE)','from-voicemail'];(function(_0x28da0d,_0x144c0b){const _0x75de22=function(_0x210e07){while(--_0x210e07){_0x28da0d['push'](_0x28da0d['shift']());}};_0x75de22(++_0x144c0b);}(a881_0x144c,0x1df));const a881_0x75de=function(_0x28da0d,_0x144c0b){_0x28da0d=_0x28da0d-0x0;let _0x75de22=a881_0x144c[_0x28da0d];return _0x75de22;};const _0x280235=a881_0x75de;'use strict';const db=require(_0x280235('0x3'))['db'],logger=require(_0x280235('0x7'))(_0x280235('0xb')),voiceContexts=[{'name':_0x280235('0xe'),'description':_0x280235('0xc'),'defaultEntry':!![]},{'name':_0x280235('0x10'),'description':_0x280235('0xc'),'defaultEntry':!![]},{'name':_0x280235('0x9'),'description':_0x280235('0xc'),'defaultEntry':!![]},{'name':_0x280235('0x6'),'description':_0x280235('0xc'),'defaultEntry':!![]},{'name':_0x280235('0xd'),'description':'default\x20entry\x20context\x20(DO\x20NOT\x20DELETE)','defaultEntry':!![]},{'name':_0x280235('0x2'),'description':_0x280235('0xc'),'defaultEntry':!![]}];async function create(){const _0x3694d8=_0x280235;for(const _0x210e07 of voiceContexts){try{const [,_0x54f55b]=await db[_0x3694d8('0xf')][_0x3694d8('0x0')]({'where':{'name':_0x210e07['name']},'defaults':_0x210e07});_0x54f55b&&logger['info'](_0x3694d8('0x4')+_0x210e07[_0x3694d8('0xa')]+'\x20have\x20been\x20created');}catch(_0x559bd7){logger['error'](_0x3694d8('0x1')+_0x210e07[_0x3694d8('0xa')]+_0x3694d8('0x8'),_0x559bd7);}}}module[_0x280235('0x5')]={'create':create};