Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / services / xdr / index.js
index 06a25c2..71c9120 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc03=['asterisk-manager','../../config/environment','./utils','asterisk','port','username','keepConnected','xdr','disabled','info','./agents.controller','./calls.controller','./queues.controller','./recordings.controller','./members.controller','./transfers.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','agentcalled','agentconnect','agentcomplete','queuecallerabandon','queuecallerjoin','musiconholdstart','musiconholdstop','newstate','hangup','cdr','blindtransfer','attendedtransfer','varset','newexten','newchannel','dialbegin','dialend'];(function(_0x462b4f,_0x2f1c0e){var _0x24f643=function(_0x3cc960){while(--_0x3cc960){_0x462b4f['push'](_0x462b4f['shift']());}};_0x24f643(++_0x2f1c0e);}(_0xfc03,0xa4));var _0x3fc0=function(_0x12fc8d,_0x19ee33){_0x12fc8d=_0x12fc8d-0x0;var _0x3f9d04=_0xfc03[_0x12fc8d];return _0x3f9d04;};var AsteriskManager=require(_0x3fc0('0x0'));var config=require(_0x3fc0('0x1'));var utils=require(_0x3fc0('0x2'));var ami=new AsteriskManager(config[_0x3fc0('0x3')][_0x3fc0('0x4')],config[_0x3fc0('0x3')]['ip'],config[_0x3fc0('0x3')][_0x3fc0('0x5')],config['asterisk']['password'],!![]);ami[_0x3fc0('0x6')]();if(config['xdr']&&config[_0x3fc0('0x7')][_0x3fc0('0x8')]){utils[_0x3fc0('0x9')]('XDR\x20DISABLED');}else{var agents=require(_0x3fc0('0xa'));var calls=require(_0x3fc0('0xb'));var queues=require(_0x3fc0('0xc'));var recordings=require(_0x3fc0('0xd'));var members=require(_0x3fc0('0xe'));var dials=require('./dials.controller');var transfers=require(_0x3fc0('0xf'));var core=require(_0x3fc0('0x10'));ami['on'](_0x3fc0('0x11'),core[_0x3fc0('0x11')]);ami['on']('shutdown',core[_0x3fc0('0x12')]);ami['on'](_0x3fc0('0x13'),core[_0x3fc0('0x13')]);ami['on'](_0x3fc0('0x14'),core[_0x3fc0('0x14')]);ami['on'](_0x3fc0('0x15'),core[_0x3fc0('0x15')]);ami['on'](_0x3fc0('0x16'),core['managerevent']);ami['on'](_0x3fc0('0x17'),function(_0x3277f7){try{members[_0x3fc0('0x17')](_0x3277f7);}catch(_0x18260b){utils[_0x3fc0('0x14')](_0x18260b);}});ami['on']('agentcalled',function(_0xceec78){try{agents[_0x3fc0('0x18')](_0xceec78);}catch(_0x51a56e){utils[_0x3fc0('0x14')](_0x51a56e);}});ami['on']('agentringnoanswer',function(_0x2eebac){try{agents['agentringnoanswer'](_0x2eebac);}catch(_0x142188){utils[_0x3fc0('0x14')](_0x142188);}});ami['on'](_0x3fc0('0x19'),function(_0x9d1be6){try{agents[_0x3fc0('0x19')](_0x9d1be6);queues[_0x3fc0('0x19')](_0x9d1be6);}catch(_0xb2aade){utils[_0x3fc0('0x14')](_0xb2aade);}});ami['on'](_0x3fc0('0x1a'),function(_0x42c1df){try{agents[_0x3fc0('0x1a')](_0x42c1df);queues['agentcomplete'](_0x42c1df);members[_0x3fc0('0x1a')](_0x42c1df);}catch(_0x1d47b1){utils[_0x3fc0('0x14')](_0x1d47b1);}});ami['on'](_0x3fc0('0x1b'),function(_0x99cc42){try{agents[_0x3fc0('0x1b')](_0x99cc42);queues[_0x3fc0('0x1b')](_0x99cc42);}catch(_0x2481c2){utils[_0x3fc0('0x14')](_0x2481c2);}});ami['on'](_0x3fc0('0x1c'),function(_0x58c178){try{queues[_0x3fc0('0x1c')](_0x58c178);recordings[_0x3fc0('0x1c')](_0x58c178);}catch(_0x1db02b){utils[_0x3fc0('0x14')](_0x1db02b);}});ami['on']('queuecallerleave',function(_0x55345f){try{queues['queuecallerleave'](_0x55345f);}catch(_0x544fc3){utils['error'](_0x544fc3);}});ami['on']('musiconholdstart',function(_0x1fc5dc){try{queues[_0x3fc0('0x1d')](_0x1fc5dc);calls[_0x3fc0('0x1d')](_0x1fc5dc);}catch(_0xf9ddb1){utils[_0x3fc0('0x14')](_0xf9ddb1);}});ami['on']('musiconholdstop',function(_0x46a3ac){try{queues[_0x3fc0('0x1e')](_0x46a3ac);calls[_0x3fc0('0x1e')](_0x46a3ac);}catch(_0x641fcc){utils[_0x3fc0('0x14')](_0x641fcc);}});ami['on'](_0x3fc0('0x1f'),function(_0x1b8eca){try{calls[_0x3fc0('0x1f')](_0x1b8eca);recordings[_0x3fc0('0x1f')](_0x1b8eca);}catch(_0x56f6f7){utils[_0x3fc0('0x14')](_0x56f6f7);}});ami['on'](_0x3fc0('0x20'),function(_0x394a45){try{calls[_0x3fc0('0x20')](_0x394a45);recordings[_0x3fc0('0x20')](_0x394a45);dials['hangup'](_0x394a45);agents[_0x3fc0('0x20')](_0x394a45);queues[_0x3fc0('0x20')](_0x394a45);}catch(_0x365aa3){utils[_0x3fc0('0x14')](_0x365aa3);}});ami['on'](_0x3fc0('0x21'),function(_0x56786f){try{members[_0x3fc0('0x21')](_0x56786f);}catch(_0x391455){utils[_0x3fc0('0x14')](_0x391455);}});ami['on']('blindtransfer',function(_0x2eadfa){try{queues[_0x3fc0('0x22')](_0x2eadfa);agents[_0x3fc0('0x22')](_0x2eadfa);transfers[_0x3fc0('0x22')](_0x2eadfa);}catch(_0x164216){utils[_0x3fc0('0x14')](_0x164216);}});ami['on'](_0x3fc0('0x23'),function(_0x3d9fb9){try{queues[_0x3fc0('0x23')](_0x3d9fb9);transfers[_0x3fc0('0x23')](_0x3d9fb9);agents[_0x3fc0('0x23')](_0x3d9fb9);calls[_0x3fc0('0x23')](_0x3d9fb9);}catch(_0x154c4c){utils[_0x3fc0('0x14')](_0x154c4c);}});ami['on']('varset',function(_0x2490d1){try{queues[_0x3fc0('0x24')](_0x2490d1);recordings[_0x3fc0('0x24')](_0x2490d1);calls['varset'](_0x2490d1);dials[_0x3fc0('0x24')](_0x2490d1);}catch(_0xa8d0c9){utils[_0x3fc0('0x14')](_0xa8d0c9);}});ami['on'](_0x3fc0('0x25'),function(_0x510aa7){try{calls[_0x3fc0('0x25')](_0x510aa7);recordings[_0x3fc0('0x25')](_0x510aa7);dials[_0x3fc0('0x25')](_0x510aa7);}catch(_0x4a37e5){utils[_0x3fc0('0x14')](_0x4a37e5);}});ami['on'](_0x3fc0('0x26'),function(_0x2c6d2a){try{calls[_0x3fc0('0x26')](_0x2c6d2a);recordings[_0x3fc0('0x26')](_0x2c6d2a);}catch(_0x22b488){utils['error'](_0x22b488);}});ami['on']('dialbegin',function(_0x1982fc){try{dials[_0x3fc0('0x27')](_0x1982fc);}catch(_0x59c6c1){utils[_0x3fc0('0x14')](_0x59c6c1);}});ami['on']('dialend',function(_0x534063){try{dials[_0x3fc0('0x28')](_0x534063);}catch(_0x2a7086){utils[_0x3fc0('0x14')](_0x2a7086);}});}
\ No newline at end of file
+var _0xba31=['newexten','newchannel','dialbegin','dialend','asterisk-manager','../../config/environment','./utils','asterisk','username','keepConnected','xdr','disabled','info','./members.controller','./dials.controller','./transfers.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','agentcalled','agentringnoanswer','agentconnect','agentcomplete','queuecallerabandon','queuecallerjoin','queuecallerleave','musiconholdstart','musiconholdstop','newstate','hangup','cdr','blindtransfer','attendedtransfer','varset'];(function(_0xdb8b81,_0x212885){var _0x5a170a=function(_0x4c67d5){while(--_0x4c67d5){_0xdb8b81['push'](_0xdb8b81['shift']());}};_0x5a170a(++_0x212885);}(_0xba31,0x13c));var _0x1ba3=function(_0x2c69a1,_0x201903){_0x2c69a1=_0x2c69a1-0x0;var _0x24bb91=_0xba31[_0x2c69a1];return _0x24bb91;};var AsteriskManager=require(_0x1ba3('0x0'));var config=require(_0x1ba3('0x1'));var utils=require(_0x1ba3('0x2'));var ami=new AsteriskManager(config[_0x1ba3('0x3')]['port'],config['asterisk']['ip'],config['asterisk'][_0x1ba3('0x4')],config[_0x1ba3('0x3')]['password'],!![]);ami[_0x1ba3('0x5')]();if(config[_0x1ba3('0x6')]&&config[_0x1ba3('0x6')][_0x1ba3('0x7')]){utils[_0x1ba3('0x8')]('XDR\x20DISABLED');}else{var agents=require('./agents.controller');var calls=require('./calls.controller');var queues=require('./queues.controller');var recordings=require('./recordings.controller');var members=require(_0x1ba3('0x9'));var dials=require(_0x1ba3('0xa'));var transfers=require(_0x1ba3('0xb'));var core=require(_0x1ba3('0xc'));ami['on']('connect',core[_0x1ba3('0xd')]);ami['on'](_0x1ba3('0xe'),core[_0x1ba3('0xe')]);ami['on'](_0x1ba3('0xf'),core[_0x1ba3('0xf')]);ami['on'](_0x1ba3('0x10'),core['error']);ami['on'](_0x1ba3('0x11'),core[_0x1ba3('0x11')]);ami['on'](_0x1ba3('0x12'),core[_0x1ba3('0x12')]);ami['on'](_0x1ba3('0x13'),function(_0x6417de){try{members[_0x1ba3('0x13')](_0x6417de);}catch(_0xc5b34c){utils[_0x1ba3('0x10')](_0xc5b34c);}});ami['on'](_0x1ba3('0x14'),function(_0x36876a){try{agents['agentcalled'](_0x36876a);}catch(_0x23fad8){utils['error'](_0x23fad8);}});ami['on']('agentringnoanswer',function(_0x4ca268){try{agents[_0x1ba3('0x15')](_0x4ca268);}catch(_0x40a28f){utils[_0x1ba3('0x10')](_0x40a28f);}});ami['on']('agentconnect',function(_0x353988){try{agents['agentconnect'](_0x353988);queues[_0x1ba3('0x16')](_0x353988);}catch(_0x282b5e){utils['error'](_0x282b5e);}});ami['on'](_0x1ba3('0x17'),function(_0x5653bc){try{agents['agentcomplete'](_0x5653bc);queues[_0x1ba3('0x17')](_0x5653bc);members[_0x1ba3('0x17')](_0x5653bc);}catch(_0x3750c9){utils[_0x1ba3('0x10')](_0x3750c9);}});ami['on'](_0x1ba3('0x18'),function(_0x5e3a99){try{agents[_0x1ba3('0x18')](_0x5e3a99);queues[_0x1ba3('0x18')](_0x5e3a99);}catch(_0x2a4320){utils[_0x1ba3('0x10')](_0x2a4320);}});ami['on'](_0x1ba3('0x19'),function(_0x2053fb){try{queues[_0x1ba3('0x19')](_0x2053fb);recordings[_0x1ba3('0x19')](_0x2053fb);}catch(_0x4d0e05){utils[_0x1ba3('0x10')](_0x4d0e05);}});ami['on'](_0x1ba3('0x1a'),function(_0x5cf30c){try{queues[_0x1ba3('0x1a')](_0x5cf30c);}catch(_0x3c4a1a){utils['error'](_0x3c4a1a);}});ami['on'](_0x1ba3('0x1b'),function(_0x37979c){try{queues[_0x1ba3('0x1b')](_0x37979c);calls['musiconholdstart'](_0x37979c);}catch(_0x2a8b59){utils['error'](_0x2a8b59);}});ami['on'](_0x1ba3('0x1c'),function(_0x26f88d){try{queues[_0x1ba3('0x1c')](_0x26f88d);calls['musiconholdstop'](_0x26f88d);}catch(_0x1133ae){utils[_0x1ba3('0x10')](_0x1133ae);}});ami['on'](_0x1ba3('0x1d'),function(_0x5dc03b){try{calls['newstate'](_0x5dc03b);recordings['newstate'](_0x5dc03b);}catch(_0x40f2a9){utils[_0x1ba3('0x10')](_0x40f2a9);}});ami['on'](_0x1ba3('0x1e'),function(_0x2a1b17){try{calls['hangup'](_0x2a1b17);recordings['hangup'](_0x2a1b17);dials['hangup'](_0x2a1b17);agents['hangup'](_0x2a1b17);queues[_0x1ba3('0x1e')](_0x2a1b17);}catch(_0x4827fe){utils[_0x1ba3('0x10')](_0x4827fe);}});ami['on'](_0x1ba3('0x1f'),function(_0x2155f4){try{members[_0x1ba3('0x1f')](_0x2155f4);}catch(_0x51cc2e){utils[_0x1ba3('0x10')](_0x51cc2e);}});ami['on'](_0x1ba3('0x20'),function(_0x297077){try{queues[_0x1ba3('0x20')](_0x297077);agents['blindtransfer'](_0x297077);transfers[_0x1ba3('0x20')](_0x297077);}catch(_0x5ccd3d){utils[_0x1ba3('0x10')](_0x5ccd3d);}});ami['on'](_0x1ba3('0x21'),function(_0x378662){try{queues[_0x1ba3('0x21')](_0x378662);transfers[_0x1ba3('0x21')](_0x378662);agents[_0x1ba3('0x21')](_0x378662);calls[_0x1ba3('0x21')](_0x378662);}catch(_0x1c6199){utils['error'](_0x1c6199);}});ami['on'](_0x1ba3('0x22'),function(_0x1f6ade){try{queues['varset'](_0x1f6ade);recordings[_0x1ba3('0x22')](_0x1f6ade);calls[_0x1ba3('0x22')](_0x1f6ade);dials['varset'](_0x1f6ade);}catch(_0x59c759){utils[_0x1ba3('0x10')](_0x59c759);}});ami['on']('newexten',function(_0x59881a){try{calls[_0x1ba3('0x23')](_0x59881a);recordings[_0x1ba3('0x23')](_0x59881a);dials['newexten'](_0x59881a);}catch(_0x3ef321){utils[_0x1ba3('0x10')](_0x3ef321);}});ami['on']('newchannel',function(_0x5192af){try{calls['newchannel'](_0x5192af);recordings[_0x1ba3('0x24')](_0x5192af);}catch(_0x17574e){utils[_0x1ba3('0x10')](_0x17574e);}});ami['on'](_0x1ba3('0x25'),function(_0x407eb3){try{dials[_0x1ba3('0x25')](_0x407eb3);}catch(_0x57a8ba){utils['error'](_0x57a8ba);}});ami['on'](_0x1ba3('0x26'),function(_0x17978c){try{dials[_0x1ba3('0x26')](_0x17978c);}catch(_0x1518e1){utils[_0x1ba3('0x10')](_0x1518e1);}});}
\ No newline at end of file