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