cba0fbb77c8294e999a73f5be7a4699b551c1c16
[motion2.git] / server / config / seedUsers.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 _0xb8b7=['all','ulaw','yes','/etc/pki/tls/certs/motion.crt','actpass','\x22%s\x22\x20<%s>','User','bulkCreate','then','log','add\x20user','util','../mysqldb','push','format','%s%s','agent','%s%s@xcally.com','password','friend'];(function(_0x58b647,_0xe24336){var _0x233b67=function(_0x17eec7){while(--_0x17eec7){_0x58b647['push'](_0x58b647['shift']());}};_0x233b67(++_0xe24336);}(_0xb8b7,0x123));var _0x7b8b=function(_0x36eaaa,_0x326732){_0x36eaaa=_0x36eaaa-0x0;var _0x461349=_0xb8b7[_0x36eaaa];return _0x461349;};'use strict';var util=require(_0x7b8b('0x0'));var db=require(_0x7b8b('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x7b8b('0x2')]({'name':util[_0x7b8b('0x3')](_0x7b8b('0x4'),'agent',i),'fullname':util[_0x7b8b('0x3')](_0x7b8b('0x4'),_0x7b8b('0x5'),i),'email':util['format'](_0x7b8b('0x6'),_0x7b8b('0x5'),i),'role':'agent','password':_0x7b8b('0x7'),'internal':0xfa0+i,'type':_0x7b8b('0x8'),'transport':['udp','ws','wss'],'disallow':[_0x7b8b('0x9')],'allow':[_0x7b8b('0xa')],'defaultuser':util['format'](_0x7b8b('0x4'),_0x7b8b('0x5'),i),'encryption':_0x7b8b('0xb'),'avpf':_0x7b8b('0xb'),'force_avp':_0x7b8b('0xb'),'icesupport':_0x7b8b('0xb'),'dtlsenable':'yes','dtlsverify':'no','dtlscertfile':_0x7b8b('0xc'),'dtlsprivatekey':'/etc/pki/tls/private/motion.key','dtlssetup':_0x7b8b('0xd'),'callerid':util['format'](_0x7b8b('0xe'),util[_0x7b8b('0x3')]('%s%s',_0x7b8b('0x5'),i),0xfa0+i)});}db[_0x7b8b('0xf')][_0x7b8b('0x10')](users)[_0x7b8b('0x11')](function(){console[_0x7b8b('0x12')](_0x7b8b('0x13'));})['catch'](function(_0x396c1c){console[_0x7b8b('0x12')](_0x396c1c);});