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