Built motion from commit cafec4f3.|2.6.31
[motion2.git] / server / services / ami / dialer / models / action.js
index 895619d..ab08ff5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf8c7=['queue','name','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','ListId','UserId','VoiceQueueId','CampaignId','idHopper','ContactFirstName','firstName','starttime','callback','callbackuniqueid','callbackat','recallme','prototype','getCaller','format','\x22%s\x22\x20<%s>','substring','getQueue','exports','util','moment','isNil','string','voiceQueue','uniqueid','Contact','phone','lastName','number'];(function(_0xb3e2b4,_0x379d70){var _0xb6c4a5=function(_0x2c597e){while(--_0x2c597e){_0xb3e2b4['push'](_0xb3e2b4['shift']());}};_0xb6c4a5(++_0x379d70);}(_0xf8c7,0xa2));var _0x7f8c=function(_0x2aab56,_0xd4c3d7){_0x2aab56=_0x2aab56-0x0;var _0x13a3e0=_0xf8c7[_0x2aab56];return _0x13a3e0;};'use strict';var util=require(_0x7f8c('0x0'));var _=require('lodash');var moment=require(_0x7f8c('0x1'));function checkNameSurname(_0x3c1101,_0x5e28ab,_0x4bd113){var _0x1ea74d='';if(!_[_0x7f8c('0x2')](_0x5e28ab)&&'string'===typeof _0x5e28ab){_0x1ea74d+=_0x5e28ab;}if(!_[_0x7f8c('0x2')](_0x4bd113)&&_0x7f8c('0x3')===typeof _0x4bd113){_0x1ea74d+='\x20'+_0x4bd113;}if(_0x1ea74d!==''){return _0x1ea74d;}return _0x3c1101;}function Action(_0x1c99ab,_0x12ad8b,_0x8e610){this[_0x7f8c('0x4')]=_0x1c99ab;this[_0x7f8c('0x5')]=_0x8e610||undefined;this['name']=checkNameSurname(_0x12ad8b[_0x7f8c('0x6')][_0x7f8c('0x7')],_0x12ad8b[_0x7f8c('0x6')]['firstName'],_0x12ad8b[_0x7f8c('0x6')][_0x7f8c('0x8')]);this[_0x7f8c('0x9')]=_0x12ad8b[_0x7f8c('0x7')];this[_0x7f8c('0xa')]=_0x1c99ab[_0x7f8c('0xb')];this[_0x7f8c('0xc')]=_0x12ad8b[_0x7f8c('0xc')]||![];this[_0x7f8c('0xd')]=_0x1c99ab['type'];this[_0x7f8c('0xe')]=_0x1c99ab[_0x7f8c('0xe')]||0x3;this[_0x7f8c('0xf')]=_0x12ad8b['scheduledat'];this[_0x7f8c('0x10')]=_0x12ad8b[_0x7f8c('0x10')];this[_0x7f8c('0x11')]=_0x12ad8b[_0x7f8c('0x11')];this[_0x7f8c('0x12')]=_0x12ad8b['countnoanswerretry'];this[_0x7f8c('0x13')]=_0x12ad8b[_0x7f8c('0x13')];this['countdropretry']=_0x12ad8b[_0x7f8c('0x14')];this[_0x7f8c('0x15')]=_0x12ad8b[_0x7f8c('0x15')];this[_0x7f8c('0x16')]=_0x12ad8b[_0x7f8c('0x16')];this[_0x7f8c('0x17')]=_0x12ad8b[_0x7f8c('0x17')];this['ContactId']=_0x12ad8b['ContactId'];this[_0x7f8c('0x18')]=_0x12ad8b[_0x7f8c('0x18')];this[_0x7f8c('0x19')]=_0x12ad8b[_0x7f8c('0x19')];this[_0x7f8c('0x1a')]=_0x12ad8b[_0x7f8c('0x1a')];this[_0x7f8c('0x1b')]=_0x12ad8b[_0x7f8c('0x1b')];this[_0x7f8c('0x1c')]=_0x12ad8b['id'];this[_0x7f8c('0x1d')]=_0x12ad8b['Contact'][_0x7f8c('0x1e')]||'';this[_0x7f8c('0x1f')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x7f8c('0x20')]=_0x12ad8b['callback'];this[_0x7f8c('0x21')]=_0x12ad8b[_0x7f8c('0x21')];this[_0x7f8c('0x22')]=_0x12ad8b[_0x7f8c('0x22')];this[_0x7f8c('0x23')]=_0x12ad8b['recallme'];this['originatecalleridnum']='';this['originatecalleridname']='';}Action[_0x7f8c('0x24')][_0x7f8c('0x25')]=function(){return util[_0x7f8c('0x26')](_0x7f8c('0x27'),this['name'],this[_0x7f8c('0x4')]['dialCutDigit']>0x0?this['number'][_0x7f8c('0x28')](this[_0x7f8c('0x4')]['dialCutDigit']):this['number']);};Action[_0x7f8c('0x24')][_0x7f8c('0x29')]=function(){return this[_0x7f8c('0xa')];};module[_0x7f8c('0x2a')]=Action;
\ No newline at end of file
+var _0x10da=['callbackuniqueid','callbackat','recallme','originatecalleridnum','originatecalleridname','getCaller','\x22%s\x22\x20<%s>','dialCutDigit','prototype','getQueue','queue','util','lodash','moment','isNil','string','voiceQueue','name','phone','Contact','firstName','number','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','ContactId','ListId','UserId','CampaignId','ContactFirstName','starttime','format','callback'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x10da,0x15b));var _0xa10d=function(_0x2e0c62,_0xab72b5){_0x2e0c62=_0x2e0c62-0x0;var _0x558131=_0x10da[_0x2e0c62];return _0x558131;};'use strict';var util=require(_0xa10d('0x0'));var _=require(_0xa10d('0x1'));var moment=require(_0xa10d('0x2'));function checkNameSurname(_0x299beb,_0x18cd0e,_0x57a160){var _0x471207='';if(!_[_0xa10d('0x3')](_0x18cd0e)&&'string'===typeof _0x18cd0e){_0x471207+=_0x18cd0e;}if(!_[_0xa10d('0x3')](_0x57a160)&&_0xa10d('0x4')===typeof _0x57a160){_0x471207+='\x20'+_0x57a160;}if(_0x471207!==''){return _0x471207;}return _0x299beb;}function Action(_0x6d6dc4,_0x4bdee3,_0x54c00a){this[_0xa10d('0x5')]=_0x6d6dc4;this['uniqueid']=_0x54c00a||undefined;this[_0xa10d('0x6')]=checkNameSurname(_0x4bdee3['Contact'][_0xa10d('0x7')],_0x4bdee3[_0xa10d('0x8')][_0xa10d('0x9')],_0x4bdee3[_0xa10d('0x8')]['lastName']);this[_0xa10d('0xa')]=_0x4bdee3[_0xa10d('0x7')];this['queue']=_0x6d6dc4['name'];this[_0xa10d('0xb')]=_0x4bdee3[_0xa10d('0xb')]||![];this[_0xa10d('0xc')]=_0x6d6dc4['type'];this[_0xa10d('0xd')]=_0x6d6dc4[_0xa10d('0xd')]||0x3;this['scheduledat']=_0x4bdee3[_0xa10d('0xe')];this['countbusyretry']=_0x4bdee3[_0xa10d('0xf')];this[_0xa10d('0x10')]=_0x4bdee3['countcongestionretry'];this[_0xa10d('0x11')]=_0x4bdee3[_0xa10d('0x11')];this['countnosuchnumberretry']=_0x4bdee3[_0xa10d('0x12')];this['countdropretry']=_0x4bdee3[_0xa10d('0x13')];this[_0xa10d('0x14')]=_0x4bdee3[_0xa10d('0x14')];this['countmachineretry']=_0x4bdee3[_0xa10d('0x15')];this[_0xa10d('0x16')]=_0x4bdee3['countagentrejectretry'];this['ContactId']=_0x4bdee3[_0xa10d('0x17')];this[_0xa10d('0x18')]=_0x4bdee3[_0xa10d('0x18')];this[_0xa10d('0x19')]=_0x4bdee3[_0xa10d('0x19')];this['VoiceQueueId']=_0x4bdee3['VoiceQueueId'];this[_0xa10d('0x1a')]=_0x4bdee3['CampaignId'];this['idHopper']=_0x4bdee3['id'];this[_0xa10d('0x1b')]=_0x4bdee3[_0xa10d('0x8')][_0xa10d('0x9')]||'';this[_0xa10d('0x1c')]=moment()[_0xa10d('0x1d')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xa10d('0x1e')]=_0x4bdee3[_0xa10d('0x1e')];this[_0xa10d('0x1f')]=_0x4bdee3[_0xa10d('0x1f')];this[_0xa10d('0x20')]=_0x4bdee3[_0xa10d('0x20')];this['recallme']=_0x4bdee3[_0xa10d('0x21')];this[_0xa10d('0x22')]='';this[_0xa10d('0x23')]='';}Action['prototype'][_0xa10d('0x24')]=function(){return util[_0xa10d('0x1d')](_0xa10d('0x25'),this[_0xa10d('0x6')],this[_0xa10d('0x5')][_0xa10d('0x26')]>0x0?this[_0xa10d('0xa')]['substring'](this['voiceQueue'][_0xa10d('0x26')]):this[_0xa10d('0xa')]);};Action[_0xa10d('0x27')][_0xa10d('0x28')]=function(){return this[_0xa10d('0x29')];};module['exports']=Action;
\ No newline at end of file