Built motion from commit 497d3d92.|2.5.43
[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 _0x6f5e=['then','add\x20user','log','../mysqldb','push','%s%s','agent','password','udp','wss','all','format','yes','/etc/pki/tls/private/motion.key','actpass','User','bulkCreate'];(function(_0x5a857f,_0x2dd91f){var _0x464b89=function(_0x366a52){while(--_0x366a52){_0x5a857f['push'](_0x5a857f['shift']());}};_0x464b89(++_0x2dd91f);}(_0x6f5e,0x69));var _0xe6f5=function(_0x4fbf04,_0xac7aba){_0x4fbf04=_0x4fbf04-0x0;var _0xbbd370=_0x6f5e[_0x4fbf04];return _0xbbd370;};'use strict';var util=require('util');var db=require(_0xe6f5('0x0'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0xe6f5('0x1')]({'name':util['format'](_0xe6f5('0x2'),_0xe6f5('0x3'),i),'fullname':util['format'](_0xe6f5('0x2'),_0xe6f5('0x3'),i),'email':util['format']('%s%s@xcally.com',_0xe6f5('0x3'),i),'role':'agent','password':_0xe6f5('0x4'),'internal':0xfa0+i,'type':'friend','transport':[_0xe6f5('0x5'),'ws',_0xe6f5('0x6')],'disallow':[_0xe6f5('0x7')],'allow':['ulaw'],'defaultuser':util[_0xe6f5('0x8')](_0xe6f5('0x2'),_0xe6f5('0x3'),i),'encryption':_0xe6f5('0x9'),'avpf':_0xe6f5('0x9'),'force_avp':_0xe6f5('0x9'),'icesupport':_0xe6f5('0x9'),'dtlsenable':'yes','dtlsverify':'no','dtlscertfile':'/etc/pki/tls/certs/motion.crt','dtlsprivatekey':_0xe6f5('0xa'),'dtlssetup':_0xe6f5('0xb'),'callerid':util[_0xe6f5('0x8')]('\x22%s\x22\x20<%s>',util[_0xe6f5('0x8')](_0xe6f5('0x2'),_0xe6f5('0x3'),i),0xfa0+i)});}db[_0xe6f5('0xc')][_0xe6f5('0xd')](users)[_0xe6f5('0xe')](function(){console['log'](_0xe6f5('0xf'));})['catch'](function(_0x4d9a71){console[_0xe6f5('0x10')](_0x4d9a71);});