79f60c3cb16771ac6d543f76b15ad99ff0786cfe
[motion2.git] / server / services / ami / dialer / models / action.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 _0xf68a=['callback','callbackuniqueid','callbackat','recallme','originatecalleridname','prototype','getCaller','\x22%s\x22\x20<%s>','dialCutDigit','substring','getQueue','exports','util','lodash','moment','isNil','string','voiceQueue','Contact','phone','firstName','lastName','number','queue','name','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','ContactId','ListId','UserId','VoiceQueueId','CampaignId','idHopper','ContactFirstName','starttime','format'];(function(_0x5dd2bf,_0x2cb299){var _0x19818e=function(_0x403afd){while(--_0x403afd){_0x5dd2bf['push'](_0x5dd2bf['shift']());}};_0x19818e(++_0x2cb299);}(_0xf68a,0x93));var _0xaf68=function(_0x485995,_0x55d990){_0x485995=_0x485995-0x0;var _0x49e0a1=_0xf68a[_0x485995];return _0x49e0a1;};'use strict';var util=require(_0xaf68('0x0'));var _=require(_0xaf68('0x1'));var moment=require(_0xaf68('0x2'));function checkNameSurname(_0x2b8da5,_0x11fcea,_0x14db17){var _0x5bef3c='';if(!_[_0xaf68('0x3')](_0x11fcea)&&_0xaf68('0x4')===typeof _0x11fcea){_0x5bef3c+=_0x11fcea;}if(!_[_0xaf68('0x3')](_0x14db17)&&_0xaf68('0x4')===typeof _0x14db17){_0x5bef3c+='\x20'+_0x14db17;}if(_0x5bef3c!==''){return _0x5bef3c;}return _0x2b8da5;}function Action(_0x7abae3,_0x4f8e0c,_0x41812a){this[_0xaf68('0x5')]=_0x7abae3;this['uniqueid']=_0x41812a||undefined;this['name']=checkNameSurname(_0x4f8e0c[_0xaf68('0x6')][_0xaf68('0x7')],_0x4f8e0c[_0xaf68('0x6')][_0xaf68('0x8')],_0x4f8e0c[_0xaf68('0x6')][_0xaf68('0x9')]);this[_0xaf68('0xa')]=_0x4f8e0c[_0xaf68('0x7')];this[_0xaf68('0xb')]=_0x7abae3[_0xaf68('0xc')];this['active']=_0x4f8e0c[_0xaf68('0xd')]||![];this[_0xaf68('0xe')]=_0x7abae3[_0xaf68('0xe')];this[_0xaf68('0xf')]=_0x7abae3['dialQueueTimeout']||0x3;this[_0xaf68('0x10')]=_0x4f8e0c[_0xaf68('0x10')];this['countbusyretry']=_0x4f8e0c[_0xaf68('0x11')];this[_0xaf68('0x12')]=_0x4f8e0c[_0xaf68('0x12')];this[_0xaf68('0x13')]=_0x4f8e0c[_0xaf68('0x13')];this['countnosuchnumberretry']=_0x4f8e0c['countnosuchnumberretry'];this[_0xaf68('0x14')]=_0x4f8e0c[_0xaf68('0x14')];this[_0xaf68('0x15')]=_0x4f8e0c[_0xaf68('0x15')];this[_0xaf68('0x16')]=_0x4f8e0c[_0xaf68('0x16')];this['countagentrejectretry']=_0x4f8e0c[_0xaf68('0x17')];this[_0xaf68('0x18')]=_0x4f8e0c[_0xaf68('0x18')];this[_0xaf68('0x19')]=_0x4f8e0c[_0xaf68('0x19')];this[_0xaf68('0x1a')]=_0x4f8e0c[_0xaf68('0x1a')];this[_0xaf68('0x1b')]=_0x4f8e0c['VoiceQueueId'];this[_0xaf68('0x1c')]=_0x4f8e0c[_0xaf68('0x1c')];this[_0xaf68('0x1d')]=_0x4f8e0c['id'];this[_0xaf68('0x1e')]=_0x4f8e0c[_0xaf68('0x6')]['firstName']||'';this[_0xaf68('0x1f')]=moment()[_0xaf68('0x20')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xaf68('0x21')]=_0x4f8e0c[_0xaf68('0x21')];this[_0xaf68('0x22')]=_0x4f8e0c['callbackuniqueid'];this[_0xaf68('0x23')]=_0x4f8e0c[_0xaf68('0x23')];this[_0xaf68('0x24')]=_0x4f8e0c[_0xaf68('0x24')];this['originatecalleridnum']='';this[_0xaf68('0x25')]='';}Action[_0xaf68('0x26')][_0xaf68('0x27')]=function(){return util[_0xaf68('0x20')](_0xaf68('0x28'),this[_0xaf68('0xc')],this[_0xaf68('0x5')][_0xaf68('0x29')]>0x0?this['number'][_0xaf68('0x2a')](this[_0xaf68('0x5')][_0xaf68('0x29')]):this[_0xaf68('0xa')]);};Action['prototype'][_0xaf68('0x2b')]=function(){return this[_0xaf68('0xb')];};module[_0xaf68('0x2c')]=Action;