Built motion from commit f25620e4.|2.6.30
[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 _0x37f7=['format','%s%s','agent','friend','udp','wss','all','ulaw','yes','/etc/pki/tls/certs/motion.crt','User','bulkCreate','catch','log','push'];(function(_0xd94071,_0x44e2be){var _0x58a109=function(_0x7c5972){while(--_0x7c5972){_0xd94071['push'](_0xd94071['shift']());}};_0x58a109(++_0x44e2be);}(_0x37f7,0x167));var _0x737f=function(_0x14dc9a,_0x3d4c0d){_0x14dc9a=_0x14dc9a-0x0;var _0x2626ba=_0x37f7[_0x14dc9a];return _0x2626ba;};'use strict';var util=require('util');var db=require('../mysqldb')['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x737f('0x0')]({'name':util[_0x737f('0x1')](_0x737f('0x2'),'agent',i),'fullname':util[_0x737f('0x1')](_0x737f('0x2'),_0x737f('0x3'),i),'email':util[_0x737f('0x1')]('%s%s@xcally.com',_0x737f('0x3'),i),'role':_0x737f('0x3'),'password':'password','internal':0xfa0+i,'type':_0x737f('0x4'),'transport':[_0x737f('0x5'),'ws',_0x737f('0x6')],'disallow':[_0x737f('0x7')],'allow':[_0x737f('0x8')],'defaultuser':util[_0x737f('0x1')]('%s%s','agent',i),'encryption':_0x737f('0x9'),'avpf':_0x737f('0x9'),'force_avp':'yes','icesupport':_0x737f('0x9'),'dtlsenable':_0x737f('0x9'),'dtlsverify':'no','dtlscertfile':_0x737f('0xa'),'dtlsprivatekey':'/etc/pki/tls/private/motion.key','dtlssetup':'actpass','callerid':util['format']('\x22%s\x22\x20<%s>',util[_0x737f('0x1')](_0x737f('0x2'),_0x737f('0x3'),i),0xfa0+i)});}db[_0x737f('0xb')][_0x737f('0xc')](users)['then'](function(){console['log']('add\x20user');})[_0x737f('0xd')](function(_0x3a0489){console[_0x737f('0xe')](_0x3a0489);});