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