Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / services / xdr / index.js
index 8570029..16cdd84 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x36f1=['keepConnected','xdr','disabled','info','XDR\x20DISABLED','./queues.controller','./recordings.controller','./members.controller','./dials.controller','./transfers.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','agentringnoanswer','agentconnect','agentcomplete','queuecallerabandon','queuecallerjoin','queuecallerleave','musiconholdstart','musiconholdstop','newstate','hangup','cdr','blindtransfer','attendedtransfer','varset','newexten','newchannel','dialbegin','dialend','asterisk-manager','../../config/environment','./utils','port','asterisk','password'];(function(_0x175374,_0x3c2440){var _0x4e1f61=function(_0x23e306){while(--_0x23e306){_0x175374['push'](_0x175374['shift']());}};_0x4e1f61(++_0x3c2440);}(_0x36f1,0x119));var _0x136f=function(_0x4fc9e6,_0xc51915){_0x4fc9e6=_0x4fc9e6-0x0;var _0x551d28=_0x36f1[_0x4fc9e6];return _0x551d28;};var AsteriskManager=require(_0x136f('0x0'));var config=require(_0x136f('0x1'));var utils=require(_0x136f('0x2'));var ami=new AsteriskManager(config['asterisk'][_0x136f('0x3')],config[_0x136f('0x4')]['ip'],config[_0x136f('0x4')]['username'],config[_0x136f('0x4')][_0x136f('0x5')],!![]);ami[_0x136f('0x6')]();if(config['xdr']&&config[_0x136f('0x7')][_0x136f('0x8')]){utils[_0x136f('0x9')](_0x136f('0xa'));}else{var agents=require('./agents.controller');var calls=require('./calls.controller');var queues=require(_0x136f('0xb'));var recordings=require(_0x136f('0xc'));var members=require(_0x136f('0xd'));var dials=require(_0x136f('0xe'));var transfers=require(_0x136f('0xf'));var core=require('./core.controller');ami['on'](_0x136f('0x10'),core[_0x136f('0x10')]);ami['on'](_0x136f('0x11'),core[_0x136f('0x11')]);ami['on'](_0x136f('0x12'),core[_0x136f('0x12')]);ami['on']('error',core[_0x136f('0x13')]);ami['on'](_0x136f('0x14'),core[_0x136f('0x14')]);ami['on']('managerevent',core[_0x136f('0x15')]);ami['on'](_0x136f('0x16'),function(_0x44b83b){try{members[_0x136f('0x16')](_0x44b83b);}catch(_0xb824b0){utils[_0x136f('0x13')](_0xb824b0);}});ami['on']('agentcalled',function(_0x318383){try{agents['agentcalled'](_0x318383);}catch(_0x597e62){utils[_0x136f('0x13')](_0x597e62);}});ami['on'](_0x136f('0x17'),function(_0x38fc98){try{agents[_0x136f('0x17')](_0x38fc98);}catch(_0x25363e){utils['error'](_0x25363e);}});ami['on'](_0x136f('0x18'),function(_0x2a76e5){try{agents['agentconnect'](_0x2a76e5);queues[_0x136f('0x18')](_0x2a76e5);}catch(_0x378361){utils[_0x136f('0x13')](_0x378361);}});ami['on'](_0x136f('0x19'),function(_0x17cc37){try{agents['agentcomplete'](_0x17cc37);queues[_0x136f('0x19')](_0x17cc37);members[_0x136f('0x19')](_0x17cc37);}catch(_0x5bb508){utils[_0x136f('0x13')](_0x5bb508);}});ami['on'](_0x136f('0x1a'),function(_0x31213f){try{agents[_0x136f('0x1a')](_0x31213f);queues[_0x136f('0x1a')](_0x31213f);}catch(_0xb9dbb2){utils[_0x136f('0x13')](_0xb9dbb2);}});ami['on'](_0x136f('0x1b'),function(_0xfd667b){try{queues['queuecallerjoin'](_0xfd667b);recordings['queuecallerjoin'](_0xfd667b);}catch(_0x12eade){utils[_0x136f('0x13')](_0x12eade);}});ami['on']('queuecallerleave',function(_0x59a4a2){try{queues[_0x136f('0x1c')](_0x59a4a2);}catch(_0x43d693){utils[_0x136f('0x13')](_0x43d693);}});ami['on']('musiconholdstart',function(_0x383906){try{queues[_0x136f('0x1d')](_0x383906);calls[_0x136f('0x1d')](_0x383906);}catch(_0x2992a1){utils[_0x136f('0x13')](_0x2992a1);}});ami['on']('musiconholdstop',function(_0x552406){try{queues[_0x136f('0x1e')](_0x552406);calls[_0x136f('0x1e')](_0x552406);}catch(_0x4fbded){utils[_0x136f('0x13')](_0x4fbded);}});ami['on'](_0x136f('0x1f'),function(_0xb28cbd){try{calls[_0x136f('0x1f')](_0xb28cbd);recordings['newstate'](_0xb28cbd);}catch(_0x405dd6){utils[_0x136f('0x13')](_0x405dd6);}});ami['on'](_0x136f('0x20'),function(_0x36da54){try{calls[_0x136f('0x20')](_0x36da54);recordings['hangup'](_0x36da54);dials[_0x136f('0x20')](_0x36da54);agents[_0x136f('0x20')](_0x36da54);queues[_0x136f('0x20')](_0x36da54);}catch(_0x2b82d3){utils[_0x136f('0x13')](_0x2b82d3);}});ami['on'](_0x136f('0x21'),function(_0x33333c){try{members[_0x136f('0x21')](_0x33333c);}catch(_0xc11e43){utils[_0x136f('0x13')](_0xc11e43);}});ami['on'](_0x136f('0x22'),function(_0xf5d419){try{queues[_0x136f('0x22')](_0xf5d419);agents[_0x136f('0x22')](_0xf5d419);transfers[_0x136f('0x22')](_0xf5d419);}catch(_0x33b24d){utils[_0x136f('0x13')](_0x33b24d);}});ami['on'](_0x136f('0x23'),function(_0xd8af5a){try{queues['attendedtransfer'](_0xd8af5a);transfers[_0x136f('0x23')](_0xd8af5a);agents[_0x136f('0x23')](_0xd8af5a);calls['attendedtransfer'](_0xd8af5a);}catch(_0x935a1b){utils[_0x136f('0x13')](_0x935a1b);}});ami['on'](_0x136f('0x24'),function(_0x2904bc){try{queues[_0x136f('0x24')](_0x2904bc);recordings[_0x136f('0x24')](_0x2904bc);calls[_0x136f('0x24')](_0x2904bc);dials[_0x136f('0x24')](_0x2904bc);}catch(_0x42668a){utils[_0x136f('0x13')](_0x42668a);}});ami['on'](_0x136f('0x25'),function(_0x5e156a){try{calls[_0x136f('0x25')](_0x5e156a);recordings[_0x136f('0x25')](_0x5e156a);dials[_0x136f('0x25')](_0x5e156a);}catch(_0x1338f3){utils[_0x136f('0x13')](_0x1338f3);}});ami['on'](_0x136f('0x26'),function(_0x3b10cb){try{calls['newchannel'](_0x3b10cb);recordings['newchannel'](_0x3b10cb);}catch(_0x580cc7){utils[_0x136f('0x13')](_0x580cc7);}});ami['on'](_0x136f('0x27'),function(_0x4547e2){try{dials[_0x136f('0x27')](_0x4547e2);}catch(_0x43d13d){utils[_0x136f('0x13')](_0x43d13d);}});ami['on'](_0x136f('0x28'),function(_0x363b3b){try{dials[_0x136f('0x28')](_0x363b3b);}catch(_0x3d5e2d){utils[_0x136f('0x13')](_0x3d5e2d);}});}
\ No newline at end of file
+var _0x486f=['connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','agentcalled','agentringnoanswer','agentconnect','agentcomplete','queuecallerabandon','queuecallerjoin','musiconholdstart','musiconholdstop','newstate','hangup','cdr','blindtransfer','attendedtransfer','varset','newexten','newchannel','dialbegin','dialend','asterisk-manager','../../config/environment','./utils','asterisk','password','xdr','info','XDR\x20DISABLED','./calls.controller','./recordings.controller','./members.controller','./transfers.controller','./core.controller'];(function(_0xf2d1bf,_0x19c53a){var _0x388d2c=function(_0x217e55){while(--_0x217e55){_0xf2d1bf['push'](_0xf2d1bf['shift']());}};_0x388d2c(++_0x19c53a);}(_0x486f,0x1e1));var _0xf486=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x486f[_0x4a9fb1];return _0x348672;};var AsteriskManager=require(_0xf486('0x0'));var config=require(_0xf486('0x1'));var utils=require(_0xf486('0x2'));var ami=new AsteriskManager(config[_0xf486('0x3')]['port'],config[_0xf486('0x3')]['ip'],config[_0xf486('0x3')]['username'],config['asterisk'][_0xf486('0x4')],!![]);ami['keepConnected']();if(config[_0xf486('0x5')]&&config['xdr']['disabled']){utils[_0xf486('0x6')](_0xf486('0x7'));}else{var agents=require('./agents.controller');var calls=require(_0xf486('0x8'));var queues=require('./queues.controller');var recordings=require(_0xf486('0x9'));var members=require(_0xf486('0xa'));var dials=require('./dials.controller');var transfers=require(_0xf486('0xb'));var core=require(_0xf486('0xc'));ami['on'](_0xf486('0xd'),core[_0xf486('0xd')]);ami['on'](_0xf486('0xe'),core['shutdown']);ami['on'](_0xf486('0xf'),core['fullybooted']);ami['on'](_0xf486('0x10'),core[_0xf486('0x10')]);ami['on'](_0xf486('0x11'),core[_0xf486('0x11')]);ami['on'](_0xf486('0x12'),core[_0xf486('0x12')]);ami['on'](_0xf486('0x13'),function(_0x29ea80){try{members['devicestatechange'](_0x29ea80);}catch(_0x87da5){utils[_0xf486('0x10')](_0x87da5);}});ami['on'](_0xf486('0x14'),function(_0x239561){try{agents[_0xf486('0x14')](_0x239561);}catch(_0x152051){utils['error'](_0x152051);}});ami['on']('agentringnoanswer',function(_0x1b3059){try{agents[_0xf486('0x15')](_0x1b3059);}catch(_0x29ab76){utils['error'](_0x29ab76);}});ami['on'](_0xf486('0x16'),function(_0x2d9e4a){try{agents[_0xf486('0x16')](_0x2d9e4a);queues['agentconnect'](_0x2d9e4a);}catch(_0x8497dd){utils[_0xf486('0x10')](_0x8497dd);}});ami['on']('agentcomplete',function(_0x151ff3){try{agents[_0xf486('0x17')](_0x151ff3);queues['agentcomplete'](_0x151ff3);members[_0xf486('0x17')](_0x151ff3);}catch(_0x31130b){utils[_0xf486('0x10')](_0x31130b);}});ami['on'](_0xf486('0x18'),function(_0x4d5cc6){try{agents[_0xf486('0x18')](_0x4d5cc6);queues[_0xf486('0x18')](_0x4d5cc6);}catch(_0x3b1851){utils[_0xf486('0x10')](_0x3b1851);}});ami['on'](_0xf486('0x19'),function(_0x40e4d8){try{queues[_0xf486('0x19')](_0x40e4d8);recordings[_0xf486('0x19')](_0x40e4d8);}catch(_0x198f9b){utils['error'](_0x198f9b);}});ami['on']('queuecallerleave',function(_0x129a87){try{queues['queuecallerleave'](_0x129a87);}catch(_0x35a46a){utils['error'](_0x35a46a);}});ami['on'](_0xf486('0x1a'),function(_0x5545ad){try{queues['musiconholdstart'](_0x5545ad);calls[_0xf486('0x1a')](_0x5545ad);}catch(_0x10516d){utils[_0xf486('0x10')](_0x10516d);}});ami['on'](_0xf486('0x1b'),function(_0x39bd70){try{queues[_0xf486('0x1b')](_0x39bd70);calls[_0xf486('0x1b')](_0x39bd70);}catch(_0x21755a){utils[_0xf486('0x10')](_0x21755a);}});ami['on'](_0xf486('0x1c'),function(_0x274dc7){try{calls[_0xf486('0x1c')](_0x274dc7);recordings[_0xf486('0x1c')](_0x274dc7);}catch(_0x546566){utils['error'](_0x546566);}});ami['on'](_0xf486('0x1d'),function(_0x322ede){try{calls[_0xf486('0x1d')](_0x322ede);recordings[_0xf486('0x1d')](_0x322ede);dials[_0xf486('0x1d')](_0x322ede);agents['hangup'](_0x322ede);queues[_0xf486('0x1d')](_0x322ede);}catch(_0x4dd6a6){utils[_0xf486('0x10')](_0x4dd6a6);}});ami['on'](_0xf486('0x1e'),function(_0x35bf32){try{members['cdr'](_0x35bf32);}catch(_0x3328f6){utils[_0xf486('0x10')](_0x3328f6);}});ami['on'](_0xf486('0x1f'),function(_0x417946){try{queues[_0xf486('0x1f')](_0x417946);agents[_0xf486('0x1f')](_0x417946);transfers[_0xf486('0x1f')](_0x417946);}catch(_0x404e8f){utils[_0xf486('0x10')](_0x404e8f);}});ami['on'](_0xf486('0x20'),function(_0x35fd66){try{queues[_0xf486('0x20')](_0x35fd66);transfers['attendedtransfer'](_0x35fd66);agents[_0xf486('0x20')](_0x35fd66);calls[_0xf486('0x20')](_0x35fd66);}catch(_0x878443){utils[_0xf486('0x10')](_0x878443);}});ami['on']('varset',function(_0xf5425){try{queues[_0xf486('0x21')](_0xf5425);recordings[_0xf486('0x21')](_0xf5425);calls['varset'](_0xf5425);dials[_0xf486('0x21')](_0xf5425);}catch(_0x5075c6){utils[_0xf486('0x10')](_0x5075c6);}});ami['on'](_0xf486('0x22'),function(_0x5732a3){try{calls[_0xf486('0x22')](_0x5732a3);recordings[_0xf486('0x22')](_0x5732a3);dials[_0xf486('0x22')](_0x5732a3);}catch(_0xa377c7){utils['error'](_0xa377c7);}});ami['on'](_0xf486('0x23'),function(_0x24102e){try{calls[_0xf486('0x23')](_0x24102e);recordings['newchannel'](_0x24102e);}catch(_0x41ce96){utils['error'](_0x41ce96);}});ami['on']('dialbegin',function(_0x1299cd){try{dials[_0xf486('0x24')](_0x1299cd);}catch(_0x55f59e){utils[_0xf486('0x10')](_0x55f59e);}});ami['on']('dialend',function(_0x1f6ab2){try{dials[_0xf486('0x25')](_0x1f6ab2);}catch(_0x4927e4){utils[_0xf486('0x10')](_0x4927e4);}});}
\ No newline at end of file