15729a45edf1b0c2e811d344b9f67094f79b0781
[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 _0xbd91=['%s%s@xcally.com','password','friend','udp','wss','all','ulaw','yes','/etc/pki/tls/certs/motion.crt','format','User','bulkCreate','then','add\x20user','log','util','../mysqldb','%s%s','agent'];(function(_0x3d4957,_0x265c6b){var _0x1dd0cd=function(_0x1aced4){while(--_0x1aced4){_0x3d4957['push'](_0x3d4957['shift']());}};_0x1dd0cd(++_0x265c6b);}(_0xbd91,0xf3));var _0x1bd9=function(_0x2bcb75,_0x5789a7){_0x2bcb75=_0x2bcb75-0x0;var _0x175345=_0xbd91[_0x2bcb75];return _0x175345;};'use strict';var util=require(_0x1bd9('0x0'));var db=require(_0x1bd9('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users['push']({'name':util['format'](_0x1bd9('0x2'),'agent',i),'fullname':util['format'](_0x1bd9('0x2'),_0x1bd9('0x3'),i),'email':util['format'](_0x1bd9('0x4'),_0x1bd9('0x3'),i),'role':_0x1bd9('0x3'),'password':_0x1bd9('0x5'),'internal':0xfa0+i,'type':_0x1bd9('0x6'),'transport':[_0x1bd9('0x7'),'ws',_0x1bd9('0x8')],'disallow':[_0x1bd9('0x9')],'allow':[_0x1bd9('0xa')],'defaultuser':util['format']('%s%s',_0x1bd9('0x3'),i),'encryption':_0x1bd9('0xb'),'avpf':_0x1bd9('0xb'),'force_avp':'yes','icesupport':'yes','dtlsenable':_0x1bd9('0xb'),'dtlsverify':'no','dtlscertfile':_0x1bd9('0xc'),'dtlsprivatekey':'/etc/pki/tls/private/motion.key','dtlssetup':'actpass','callerid':util[_0x1bd9('0xd')]('\x22%s\x22\x20<%s>',util['format'](_0x1bd9('0x2'),_0x1bd9('0x3'),i),0xfa0+i)});}db[_0x1bd9('0xe')][_0x1bd9('0xf')](users)[_0x1bd9('0x10')](function(){console['log'](_0x1bd9('0x11'));})['catch'](function(_0x4da453){console[_0x1bd9('0x12')](_0x4da453);});