1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xcb6c=['update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb','setMaxListeners','save'];(function(_0x3eb620,_0x37511b){var _0x4b89ab=function(_0x51e3f4){while(--_0x51e3f4){_0x3eb620['push'](_0x3eb620['shift']());}};_0x4b89ab(++_0x37511b);}(_0xcb6c,0xba));var _0xccb6=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0xcb6c[_0x413feb];return _0x40ee88;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0xccb6('0x0'))['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xccb6('0x1')](0x0);var events={'afterCreate':_0xccb6('0x2'),'afterUpdate':_0xccb6('0x3'),'afterDestroy':_0xccb6('0x4')};function emitEvent(_0x33c9d6){return function(_0x2593aa,_0x110083,_0x588cb4){VoiceExtensionEvents[_0xccb6('0x5')](_0x33c9d6+':'+_0x2593aa['id'],_0x2593aa);VoiceExtensionEvents[_0xccb6('0x5')](_0x33c9d6,_0x2593aa);_0x588cb4(null);};}for(var e in events){if(events[_0xccb6('0x6')](e)){var event=events[e];VoiceExtension[_0xccb6('0x7')](e,emitEvent(event));}}module[_0xccb6('0x8')]=VoiceExtensionEvents;