Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / services / xdr / index.js
index aeedf44..294bb62 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x431c=['dialend','asterisk-manager','../../config/environment','./utils','port','asterisk','username','password','xdr','./agents.controller','./calls.controller','./queues.controller','./recordings.controller','./members.controller','./dials.controller','./transfers.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','agentcalled','agentringnoanswer','agentconnect','agentcomplete','queuecallerabandon','queuecallerjoin','queuecallerleave','musiconholdstart','musiconholdstop','newstate','hangup','cdr','blindtransfer','attendedtransfer','varset','newexten','newchannel','dialbegin'];(function(_0x2f7237,_0x2ee4c6){var _0x5005b9=function(_0xa29f5b){while(--_0xa29f5b){_0x2f7237['push'](_0x2f7237['shift']());}};_0x5005b9(++_0x2ee4c6);}(_0x431c,0x120));var _0xc431=function(_0x57fcd3,_0x20cf25){_0x57fcd3=_0x57fcd3-0x0;var _0x134dfc=_0x431c[_0x57fcd3];return _0x134dfc;};var AsteriskManager=require(_0xc431('0x0'));var config=require(_0xc431('0x1'));var utils=require(_0xc431('0x2'));var ami=new AsteriskManager(config['asterisk'][_0xc431('0x3')],config[_0xc431('0x4')]['ip'],config['asterisk'][_0xc431('0x5')],config[_0xc431('0x4')][_0xc431('0x6')],!![]);ami['keepConnected']();if(config[_0xc431('0x7')]&&config[_0xc431('0x7')]['disabled']){utils['info']('XDR\x20DISABLED');}else{var agents=require(_0xc431('0x8'));var calls=require(_0xc431('0x9'));var queues=require(_0xc431('0xa'));var recordings=require(_0xc431('0xb'));var members=require(_0xc431('0xc'));var dials=require(_0xc431('0xd'));var transfers=require(_0xc431('0xe'));var core=require('./core.controller');ami['on'](_0xc431('0xf'),core[_0xc431('0xf')]);ami['on'](_0xc431('0x10'),core['shutdown']);ami['on'](_0xc431('0x11'),core[_0xc431('0x11')]);ami['on'](_0xc431('0x12'),core[_0xc431('0x12')]);ami['on'](_0xc431('0x13'),core[_0xc431('0x13')]);ami['on'](_0xc431('0x14'),core[_0xc431('0x14')]);ami['on'](_0xc431('0x15'),function(_0x425f96){try{members[_0xc431('0x15')](_0x425f96);}catch(_0x1bab32){utils['error'](_0x1bab32);}});ami['on'](_0xc431('0x16'),function(_0x2f70ff){try{agents[_0xc431('0x16')](_0x2f70ff);}catch(_0x497683){utils[_0xc431('0x12')](_0x497683);}});ami['on'](_0xc431('0x17'),function(_0x1fc903){try{agents['agentringnoanswer'](_0x1fc903);}catch(_0x33b3b3){utils[_0xc431('0x12')](_0x33b3b3);}});ami['on']('agentconnect',function(_0x2e049e){try{agents['agentconnect'](_0x2e049e);queues[_0xc431('0x18')](_0x2e049e);}catch(_0x51f3b6){utils[_0xc431('0x12')](_0x51f3b6);}});ami['on']('agentcomplete',function(_0x4efa53){try{agents[_0xc431('0x19')](_0x4efa53);queues[_0xc431('0x19')](_0x4efa53);members['agentcomplete'](_0x4efa53);}catch(_0x17d2d6){utils[_0xc431('0x12')](_0x17d2d6);}});ami['on'](_0xc431('0x1a'),function(_0x5aa754){try{agents[_0xc431('0x1a')](_0x5aa754);queues[_0xc431('0x1a')](_0x5aa754);}catch(_0x1acd2b){utils[_0xc431('0x12')](_0x1acd2b);}});ami['on']('queuecallerjoin',function(_0xb2cbfa){try{queues['queuecallerjoin'](_0xb2cbfa);recordings[_0xc431('0x1b')](_0xb2cbfa);}catch(_0x2f2f40){utils[_0xc431('0x12')](_0x2f2f40);}});ami['on'](_0xc431('0x1c'),function(_0x3532fd){try{queues[_0xc431('0x1c')](_0x3532fd);}catch(_0x3a3ea6){utils[_0xc431('0x12')](_0x3a3ea6);}});ami['on'](_0xc431('0x1d'),function(_0x3c137e){try{queues[_0xc431('0x1d')](_0x3c137e);calls['musiconholdstart'](_0x3c137e);}catch(_0xbdc75d){utils[_0xc431('0x12')](_0xbdc75d);}});ami['on'](_0xc431('0x1e'),function(_0x15c056){try{queues[_0xc431('0x1e')](_0x15c056);calls[_0xc431('0x1e')](_0x15c056);}catch(_0x17f3b7){utils[_0xc431('0x12')](_0x17f3b7);}});ami['on'](_0xc431('0x1f'),function(_0x11b69f){try{calls[_0xc431('0x1f')](_0x11b69f);recordings[_0xc431('0x1f')](_0x11b69f);}catch(_0x1a8558){utils[_0xc431('0x12')](_0x1a8558);}});ami['on']('hangup',function(_0x430277){try{calls[_0xc431('0x20')](_0x430277);recordings['hangup'](_0x430277);dials[_0xc431('0x20')](_0x430277);agents[_0xc431('0x20')](_0x430277);queues[_0xc431('0x20')](_0x430277);}catch(_0x21de4a){utils[_0xc431('0x12')](_0x21de4a);}});ami['on'](_0xc431('0x21'),function(_0x1ef07e){try{members[_0xc431('0x21')](_0x1ef07e);}catch(_0x24cec2){utils['error'](_0x24cec2);}});ami['on'](_0xc431('0x22'),function(_0x4bd916){try{queues[_0xc431('0x22')](_0x4bd916);agents[_0xc431('0x22')](_0x4bd916);transfers['blindtransfer'](_0x4bd916);}catch(_0x1ecece){utils[_0xc431('0x12')](_0x1ecece);}});ami['on'](_0xc431('0x23'),function(_0x437c3a){try{queues[_0xc431('0x23')](_0x437c3a);transfers[_0xc431('0x23')](_0x437c3a);agents[_0xc431('0x23')](_0x437c3a);calls['attendedtransfer'](_0x437c3a);}catch(_0x2c03f5){utils['error'](_0x2c03f5);}});ami['on'](_0xc431('0x24'),function(_0x362c61){try{queues[_0xc431('0x24')](_0x362c61);recordings[_0xc431('0x24')](_0x362c61);calls['varset'](_0x362c61);dials[_0xc431('0x24')](_0x362c61);}catch(_0x69e905){utils[_0xc431('0x12')](_0x69e905);}});ami['on'](_0xc431('0x25'),function(_0x2fc2c6){try{calls[_0xc431('0x25')](_0x2fc2c6);recordings[_0xc431('0x25')](_0x2fc2c6);dials[_0xc431('0x25')](_0x2fc2c6);}catch(_0x3e00b8){utils[_0xc431('0x12')](_0x3e00b8);}});ami['on'](_0xc431('0x26'),function(_0x43b0b8){try{calls['newchannel'](_0x43b0b8);recordings[_0xc431('0x26')](_0x43b0b8);}catch(_0x1de039){utils['error'](_0x1de039);}});ami['on'](_0xc431('0x27'),function(_0x27f80b){try{dials['dialbegin'](_0x27f80b);}catch(_0x20afff){utils[_0xc431('0x12')](_0x20afff);}});ami['on']('dialend',function(_0x1cfc25){try{dials[_0xc431('0x28')](_0x1cfc25);}catch(_0x73abef){utils['error'](_0x73abef);}});}
\ No newline at end of file
+var _0x113a=['agentringnoanswer','agentconnect','agentcomplete','queuecallerabandon','queuecallerjoin','queuecallerleave','musiconholdstart','musiconholdstop','newstate','hangup','cdr','blindtransfer','attendedtransfer','varset','newexten','newchannel','dialbegin','dialend','asterisk-manager','../../config/environment','asterisk','port','keepConnected','xdr','disabled','info','XDR\x20DISABLED','./agents.controller','./calls.controller','./queues.controller','./recordings.controller','./members.controller','./dials.controller','./transfers.controller','./core.controller','connect','fullybooted','error','close','managerevent','devicestatechange','agentcalled'];(function(_0x34b5ca,_0x313e68){var _0xa39e80=function(_0x59b2eb){while(--_0x59b2eb){_0x34b5ca['push'](_0x34b5ca['shift']());}};_0xa39e80(++_0x313e68);}(_0x113a,0x18c));var _0xa113=function(_0x342780,_0x547757){_0x342780=_0x342780-0x0;var _0x300d4c=_0x113a[_0x342780];return _0x300d4c;};var AsteriskManager=require(_0xa113('0x0'));var config=require(_0xa113('0x1'));var utils=require('./utils');var ami=new AsteriskManager(config[_0xa113('0x2')][_0xa113('0x3')],config[_0xa113('0x2')]['ip'],config[_0xa113('0x2')]['username'],config['asterisk']['password'],!![]);ami[_0xa113('0x4')]();if(config[_0xa113('0x5')]&&config[_0xa113('0x5')][_0xa113('0x6')]){utils[_0xa113('0x7')](_0xa113('0x8'));}else{var agents=require(_0xa113('0x9'));var calls=require(_0xa113('0xa'));var queues=require(_0xa113('0xb'));var recordings=require(_0xa113('0xc'));var members=require(_0xa113('0xd'));var dials=require(_0xa113('0xe'));var transfers=require(_0xa113('0xf'));var core=require(_0xa113('0x10'));ami['on']('connect',core[_0xa113('0x11')]);ami['on']('shutdown',core['shutdown']);ami['on'](_0xa113('0x12'),core[_0xa113('0x12')]);ami['on'](_0xa113('0x13'),core['error']);ami['on']('close',core[_0xa113('0x14')]);ami['on'](_0xa113('0x15'),core['managerevent']);ami['on'](_0xa113('0x16'),function(_0x47bfca){try{members[_0xa113('0x16')](_0x47bfca);}catch(_0x2a9882){utils[_0xa113('0x13')](_0x2a9882);}});ami['on']('agentcalled',function(_0x449f0c){try{agents[_0xa113('0x17')](_0x449f0c);}catch(_0x43f9a6){utils[_0xa113('0x13')](_0x43f9a6);}});ami['on'](_0xa113('0x18'),function(_0x506a83){try{agents[_0xa113('0x18')](_0x506a83);}catch(_0x23424f){utils[_0xa113('0x13')](_0x23424f);}});ami['on'](_0xa113('0x19'),function(_0x3c0e76){try{agents['agentconnect'](_0x3c0e76);queues[_0xa113('0x19')](_0x3c0e76);}catch(_0x4f5d20){utils['error'](_0x4f5d20);}});ami['on'](_0xa113('0x1a'),function(_0x1c125f){try{agents[_0xa113('0x1a')](_0x1c125f);queues[_0xa113('0x1a')](_0x1c125f);members[_0xa113('0x1a')](_0x1c125f);}catch(_0x23b8e3){utils[_0xa113('0x13')](_0x23b8e3);}});ami['on'](_0xa113('0x1b'),function(_0x406625){try{agents[_0xa113('0x1b')](_0x406625);queues[_0xa113('0x1b')](_0x406625);}catch(_0x33ce99){utils[_0xa113('0x13')](_0x33ce99);}});ami['on'](_0xa113('0x1c'),function(_0x2c1609){try{queues[_0xa113('0x1c')](_0x2c1609);recordings[_0xa113('0x1c')](_0x2c1609);}catch(_0x1793ed){utils[_0xa113('0x13')](_0x1793ed);}});ami['on'](_0xa113('0x1d'),function(_0x513487){try{queues[_0xa113('0x1d')](_0x513487);}catch(_0x192895){utils[_0xa113('0x13')](_0x192895);}});ami['on'](_0xa113('0x1e'),function(_0x2de414){try{queues[_0xa113('0x1e')](_0x2de414);calls[_0xa113('0x1e')](_0x2de414);}catch(_0xa7f0a2){utils['error'](_0xa7f0a2);}});ami['on'](_0xa113('0x1f'),function(_0x1183fd){try{queues[_0xa113('0x1f')](_0x1183fd);calls[_0xa113('0x1f')](_0x1183fd);}catch(_0x437758){utils['error'](_0x437758);}});ami['on'](_0xa113('0x20'),function(_0x29ca2e){try{calls[_0xa113('0x20')](_0x29ca2e);recordings['newstate'](_0x29ca2e);}catch(_0x518fc6){utils[_0xa113('0x13')](_0x518fc6);}});ami['on'](_0xa113('0x21'),function(_0x32e4ce){try{calls[_0xa113('0x21')](_0x32e4ce);recordings[_0xa113('0x21')](_0x32e4ce);dials['hangup'](_0x32e4ce);agents['hangup'](_0x32e4ce);queues[_0xa113('0x21')](_0x32e4ce);}catch(_0x1304b1){utils['error'](_0x1304b1);}});ami['on'](_0xa113('0x22'),function(_0x487f34){try{members[_0xa113('0x22')](_0x487f34);}catch(_0x378f75){utils['error'](_0x378f75);}});ami['on'](_0xa113('0x23'),function(_0xa77b4c){try{queues[_0xa113('0x23')](_0xa77b4c);agents['blindtransfer'](_0xa77b4c);transfers[_0xa113('0x23')](_0xa77b4c);}catch(_0x34deb6){utils['error'](_0x34deb6);}});ami['on']('attendedtransfer',function(_0x283d58){try{queues[_0xa113('0x24')](_0x283d58);transfers[_0xa113('0x24')](_0x283d58);agents[_0xa113('0x24')](_0x283d58);calls[_0xa113('0x24')](_0x283d58);}catch(_0x22345c){utils[_0xa113('0x13')](_0x22345c);}});ami['on'](_0xa113('0x25'),function(_0xafd84f){try{queues[_0xa113('0x25')](_0xafd84f);recordings[_0xa113('0x25')](_0xafd84f);calls[_0xa113('0x25')](_0xafd84f);dials[_0xa113('0x25')](_0xafd84f);}catch(_0x233544){utils[_0xa113('0x13')](_0x233544);}});ami['on'](_0xa113('0x26'),function(_0x54897a){try{calls[_0xa113('0x26')](_0x54897a);recordings[_0xa113('0x26')](_0x54897a);dials[_0xa113('0x26')](_0x54897a);}catch(_0x2aa627){utils[_0xa113('0x13')](_0x2aa627);}});ami['on'](_0xa113('0x27'),function(_0x2813e1){try{calls['newchannel'](_0x2813e1);recordings['newchannel'](_0x2813e1);}catch(_0x19eae7){utils[_0xa113('0x13')](_0x19eae7);}});ami['on'](_0xa113('0x28'),function(_0x155ea0){try{dials[_0xa113('0x28')](_0x155ea0);}catch(_0xc4ead7){utils[_0xa113('0x13')](_0xc4ead7);}});ami['on'](_0xa113('0x29'),function(_0x5a999f){try{dials[_0xa113('0x29')](_0x5a999f);}catch(_0x3c650c){utils[_0xa113('0x13')](_0x3c650c);}});}
\ No newline at end of file