Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / services / ami / preview / action.js
index ba94d78..e0c8075 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1893=['type','queue','dialAnswer','membername','Agent','channelAgent','format','calleridname','Contact','phone','firstName','lastName','active','calleridnum','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','getCaller','\x22%s\x22\x20<%s>','number','exports','moment','isNil','string','uniqueid','idContact','name'];(function(_0x58a03e,_0x315a47){var _0x6d1eb=function(_0x4fbbd2){while(--_0x4fbbd2){_0x58a03e['push'](_0x58a03e['shift']());}};_0x6d1eb(++_0x315a47);}(_0x1893,0xa2));var _0x3189=function(_0x2d120a,_0x5e4d33){_0x2d120a=_0x2d120a-0x0;var _0x205747=_0x1893[_0x2d120a];return _0x205747;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0x3189('0x0'));function checkNameSurname(_0x3aec2b,_0x1b12ad,_0x106df4){var _0x10c189='';if(!_[_0x3189('0x1')](_0x1b12ad)&&_0x3189('0x2')===typeof _0x1b12ad){_0x10c189+=_0x1b12ad;}if(!_['isNil'](_0x106df4)&&_0x3189('0x2')===typeof _0x106df4){_0x10c189+='\x20'+_0x106df4;}if(_0x10c189!==''){return _0x10c189;}return _0x3aec2b;}function Action(_0x4faebf,_0x2333e6,_0x4080a9,_0x77c566,_0x118970){this[_0x3189('0x3')]=_0x4080a9||undefined;this[_0x3189('0x4')]=_0x4faebf['id'];this['queue']=_0x2333e6[_0x3189('0x5')];this['type']=_0x2333e6[_0x3189('0x6')];this['campaigntype']=_0x3189('0x7');this[_0x3189('0x8')]=![];this[_0x3189('0x9')]=_[_0x3189('0x1')](_0x4faebf['Agent'])?undefined:_0x4faebf[_0x3189('0xa')][_0x3189('0x5')];this[_0x3189('0xb')]=this[_0x3189('0x9')]?util[_0x3189('0xc')]('SIP/%s',this[_0x3189('0x9')]):_0x77c566||undefined;this[_0x3189('0xd')]=checkNameSurname(_0x4faebf[_0x3189('0xe')][_0x3189('0xf')],_0x4faebf[_0x3189('0xe')][_0x3189('0x10')],_0x4faebf[_0x3189('0xe')][_0x3189('0x11')]);this['active']=_0x4faebf[_0x3189('0x12')]||![];this[_0x3189('0x13')]=_0x4faebf[_0x3189('0xf')];this[_0x3189('0x14')]=_0x4faebf['scheduledat'];this[_0x3189('0x15')]=_0x4faebf['countbusyretry']||0x0;this['countcongestionretry']=_0x4faebf[_0x3189('0x16')]||0x0;this['countnoanswerretry']=_0x4faebf[_0x3189('0x17')]||0x0;this[_0x3189('0x18')]=(_0x4faebf[_0x3189('0x15')]||0x0)+(_0x4faebf[_0x3189('0x16')]||0x0)+(_0x4faebf['countnoanswerretry']||0x0)+(_0x4faebf[_0x3189('0x19')]||0x0)+(_0x4faebf[_0x3189('0x1a')]||0x0)+(_0x4faebf[_0x3189('0x1b')]||0x0)+(_0x4faebf['countmachineretry']||0x0)+(_0x4faebf[_0x3189('0x1c')]||0x0);this[_0x3189('0x19')]=_0x4faebf[_0x3189('0x19')]||0x0;this[_0x3189('0x1a')]=_0x4faebf[_0x3189('0x1a')]||0x0;this['countabandonedretry']=_0x4faebf[_0x3189('0x1b')]||0x0;this[_0x3189('0x1d')]=_0x4faebf[_0x3189('0x1d')]||0x0;this['countagentrejectretry']=_0x4faebf[_0x3189('0x1c')]||0x0;this['callback']=_0x4faebf[_0x3189('0x1e')];this[_0x3189('0x1f')]=_0x4faebf[_0x3189('0x1f')];this[_0x3189('0x20')]=_0x4faebf[_0x3189('0x20')];this[_0x3189('0x21')]=_0x4faebf['recallme'];this['ContactId']=_0x4faebf[_0x3189('0x22')];this[_0x3189('0x23')]=_0x4faebf[_0x3189('0x23')];this[_0x3189('0x24')]=_[_0x3189('0x1')](_0x4faebf[_0x3189('0xa')])?_0x4faebf[_0x3189('0x24')]:_0x4faebf[_0x3189('0xa')]['id'];this[_0x3189('0x25')]=_0x4faebf[_0x3189('0x25')];this['originatecalleridnum']='';this['originatecalleridname']='';}Action['prototype'][_0x3189('0x26')]=function(){return util[_0x3189('0xc')](_0x3189('0x27'),this[_0x3189('0xd')],this[_0x3189('0x28')]);};module[_0x3189('0x29')]=Action;
\ No newline at end of file
+var _0x5f66=['countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridname','prototype','format','\x22%s\x22\x20<%s>','lodash','isNil','uniqueid','idContact','queue','name','type','dialAnswer','membername','Agent','SIP/%s','calleridname','Contact','phone','firstName','lastName','active','calleridnum','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry'];(function(_0x1780f8,_0x11ba93){var _0x33a410=function(_0x2a015f){while(--_0x2a015f){_0x1780f8['push'](_0x1780f8['shift']());}};_0x33a410(++_0x11ba93);}(_0x5f66,0x1a0));var _0x65f6=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0x5f66[_0x13d07a];return _0x5ee0ee;};'use strict';var util=require('util');var _=require(_0x65f6('0x0'));var moment=require('moment');function checkNameSurname(_0x2d5fd9,_0x2f06ae,_0x3461cd){var _0xbce843='';if(!_[_0x65f6('0x1')](_0x2f06ae)&&'string'===typeof _0x2f06ae){_0xbce843+=_0x2f06ae;}if(!_[_0x65f6('0x1')](_0x3461cd)&&'string'===typeof _0x3461cd){_0xbce843+='\x20'+_0x3461cd;}if(_0xbce843!==''){return _0xbce843;}return _0x2d5fd9;}function Action(_0x1c9f5b,_0x22b017,_0x4ec221,_0x4ed98f,_0x1c0e12){this[_0x65f6('0x2')]=_0x4ec221||undefined;this[_0x65f6('0x3')]=_0x1c9f5b['id'];this[_0x65f6('0x4')]=_0x22b017[_0x65f6('0x5')];this[_0x65f6('0x6')]=_0x22b017['type'];this['campaigntype']=_0x65f6('0x4');this[_0x65f6('0x7')]=![];this[_0x65f6('0x8')]=_[_0x65f6('0x1')](_0x1c9f5b['Agent'])?undefined:_0x1c9f5b[_0x65f6('0x9')]['name'];this['channelAgent']=this[_0x65f6('0x8')]?util['format'](_0x65f6('0xa'),this['membername']):_0x4ed98f||undefined;this[_0x65f6('0xb')]=checkNameSurname(_0x1c9f5b[_0x65f6('0xc')][_0x65f6('0xd')],_0x1c9f5b[_0x65f6('0xc')][_0x65f6('0xe')],_0x1c9f5b[_0x65f6('0xc')][_0x65f6('0xf')]);this[_0x65f6('0x10')]=_0x1c9f5b[_0x65f6('0x10')]||![];this[_0x65f6('0x11')]=_0x1c9f5b['phone'];this[_0x65f6('0x12')]=_0x1c9f5b['scheduledat'];this['countbusyretry']=_0x1c9f5b[_0x65f6('0x13')]||0x0;this[_0x65f6('0x14')]=_0x1c9f5b[_0x65f6('0x14')]||0x0;this[_0x65f6('0x15')]=_0x1c9f5b[_0x65f6('0x15')]||0x0;this[_0x65f6('0x16')]=(_0x1c9f5b[_0x65f6('0x13')]||0x0)+(_0x1c9f5b[_0x65f6('0x14')]||0x0)+(_0x1c9f5b['countnoanswerretry']||0x0)+(_0x1c9f5b['countnosuchnumberretry']||0x0)+(_0x1c9f5b[_0x65f6('0x17')]||0x0)+(_0x1c9f5b['countabandonedretry']||0x0)+(_0x1c9f5b['countmachineretry']||0x0)+(_0x1c9f5b['countagentrejectretry']||0x0);this[_0x65f6('0x18')]=_0x1c9f5b[_0x65f6('0x18')]||0x0;this['countdropretry']=_0x1c9f5b[_0x65f6('0x17')]||0x0;this[_0x65f6('0x19')]=_0x1c9f5b[_0x65f6('0x19')]||0x0;this[_0x65f6('0x1a')]=_0x1c9f5b[_0x65f6('0x1a')]||0x0;this[_0x65f6('0x1b')]=_0x1c9f5b['countagentrejectretry']||0x0;this[_0x65f6('0x1c')]=_0x1c9f5b['callback'];this['callbackuniqueid']=_0x1c9f5b[_0x65f6('0x1d')];this[_0x65f6('0x1e')]=_0x1c9f5b['callbackat'];this[_0x65f6('0x1f')]=_0x1c9f5b[_0x65f6('0x1f')];this[_0x65f6('0x20')]=_0x1c9f5b[_0x65f6('0x20')];this['ListId']=_0x1c9f5b[_0x65f6('0x21')];this[_0x65f6('0x22')]=_[_0x65f6('0x1')](_0x1c9f5b['Agent'])?_0x1c9f5b['UserId']:_0x1c9f5b['Agent']['id'];this[_0x65f6('0x23')]=_0x1c9f5b[_0x65f6('0x23')];this['originatecalleridnum']='';this[_0x65f6('0x24')]='';}Action[_0x65f6('0x25')]['getCaller']=function(){return util[_0x65f6('0x26')](_0x65f6('0x27'),this[_0x65f6('0xb')],this['number']);};module['exports']=Action;
\ No newline at end of file