Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / services / xdr / calls.controller.js
index 766e312..5356790 100644 (file)
@@ -1 +1 @@
-const a1220_0x2e67=['outboundrouteid','source','isNil','userfield','musiconholdstartAt','musiconholdstart','xmd-contactid','newchannel','destination','lastIndexOf','DOCUMENTATION','duration','systemanswertime','execif','now','endtime','context','set','localtwolinkedid','uniqueid','./utils','xmd-originatecalleridnum','diffTime','application','xmcs-queue','cdr','billableseconds','destinationchannel','xmd-callerid-preview','lastdata','callerid','xmd-queue','split','FAILED','CALL|%s|%s|%s|%s|%s|%s|%s|%s','CreateVoiceCallReport','xmd-cdrtype','sipcallid','attendedtransfer','toLowerCase','info','origtransfererchannel','disposition','lastapplication','linkedid','musiconholdstop','answertime','NO\x20ANSWER','OutgoingSpoolFailed','noop','substring','toNumber','gotoif','type','value','mohtime','channelstate','then','secondtransfererchannel','BUSY','error','ContactId','ANSWERED','includes','newstate','request','newexten','hangup','UserId','stack','queue','variable','transfertargetchannel','channel','transfer','appdata','Queue','xmd-callerid','accountcode'];(function(_0x2ea784,_0x2e673d){const _0xdf8cd=function(_0x3733f8){while(--_0x3733f8){_0x2ea784['push'](_0x2ea784['shift']());}};_0xdf8cd(++_0x2e673d);}(a1220_0x2e67,0xd4));const a1220_0xdf8c=function(_0x2ea784,_0x2e673d){_0x2ea784=_0x2ea784-0x0;let _0xdf8cd=a1220_0x2e67[_0x2ea784];return _0xdf8cd;};const _0x35e535=a1220_0xdf8c;'use strict';const _=require('lodash'),util=require('util'),utils=require(_0x35e535('0x2d')),dispositions=['NO\x20ANSWER','FAILED','FAILED',_0x35e535('0x48'),_0x35e535('0x48'),_0x35e535('0x48'),_0x35e535('0x8'),_0x35e535('0x5'),'FAILED','FAILED',_0x35e535('0x3a')],channels={};function writeDB(_0x3733f8){const _0x2f6fcb=_0x35e535;utils[_0x2f6fcb('0x41')](util['format'](_0x2f6fcb('0x3b'),_0x3733f8[_0x2f6fcb('0x2c')],_0x3733f8[_0x2f6fcb('0x13')],_0x3733f8[_0x2f6fcb('0x4e')],_0x3733f8[_0x2f6fcb('0x18')],_0x3733f8[_0x2f6fcb('0x1a')],_0x3733f8[_0x2f6fcb('0x21')],_0x3733f8[_0x2f6fcb('0x37')],_0x3733f8[_0x2f6fcb('0x43')])),_0x3733f8['accountcode']?utils['getUserByInternal'](_0x3733f8[_0x2f6fcb('0x18')])[_0x2f6fcb('0x3')](function(_0x42e543){const _0x424ecd=_0x2f6fcb;_0x42e543&&(_0x3733f8[_0x424ecd('0xe')]=_0x42e543['id']),utils[_0x424ecd('0xb')]('CreateVoiceCallReport',_0x3733f8);}):utils[_0x2f6fcb('0xb')](_0x2f6fcb('0x3c'),_0x3733f8),channels[_0x3733f8[_0x2f6fcb('0x2c')]]&&delete channels[_0x3733f8['uniqueid']];}exports[_0x35e535('0x20')]=function(_0x4dac29){const _0x140c8c=_0x35e535;try{_0x4dac29[_0x140c8c('0x2c')]==_0x4dac29[_0x140c8c('0x45')]&&_0x4dac29['channel']!=_0x140c8c('0x49')&&(channels[_0x4dac29[_0x140c8c('0x2c')]]={'uniqueid':_0x4dac29[_0x140c8c('0x2c')],'accountcode':_0x4dac29[_0x140c8c('0x18')],'source':_0x4dac29['calleridnum'],'destination':_0x4dac29['exten'],'destinationcontext':_0x4dac29['context'],'channel':_0x4dac29[_0x140c8c('0x13')],'starttime':utils[_0x140c8c('0x27')](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':_0x140c8c('0x48'),'amaflags':_0x140c8c('0x23')});}catch(_0x149a08){utils[_0x140c8c('0x6')](_0x149a08[_0x140c8c('0xf')]);}},exports[_0x35e535('0xa')]=function(_0xdbf25d){const _0x2bf6b0=_0x35e535;try{if(!_[_0x2bf6b0('0x1b')](channels[_0xdbf25d['uniqueid']])&&_0xdbf25d[_0x2bf6b0('0x2')]==0x6)_[_0x2bf6b0('0x1b')](channels[_0xdbf25d[_0x2bf6b0('0x2c')]]['systemanswertime'])&&(channels[_0xdbf25d[_0x2bf6b0('0x2c')]][_0x2bf6b0('0x25')]=utils[_0x2bf6b0('0x27')]());else!_[_0x2bf6b0('0x1b')](channels[_0xdbf25d['linkedid']])&&_0xdbf25d[_0x2bf6b0('0x2')]==0x6&&_0xdbf25d[_0x2bf6b0('0x29')]!=_0x2bf6b0('0x14')&&(channels[_0xdbf25d[_0x2bf6b0('0x45')]][_0x2bf6b0('0x18')]=_0xdbf25d[_0x2bf6b0('0x18')],channels[_0xdbf25d['linkedid']][_0x2bf6b0('0x34')]=_0xdbf25d[_0x2bf6b0('0x13')],_[_0x2bf6b0('0x1b')](channels[_0xdbf25d[_0x2bf6b0('0x45')]][_0x2bf6b0('0x47')])&&(channels[_0xdbf25d[_0x2bf6b0('0x45')]][_0x2bf6b0('0x47')]=utils[_0x2bf6b0('0x27')]()),channels[_0xdbf25d[_0x2bf6b0('0x45')]]['disposition']=dispositions[_[_0x2bf6b0('0x4c')](_0xdbf25d['channelstate'])]||_0x2bf6b0('0x8'));}catch(_0x33d0da){utils[_0x2bf6b0('0x6')](_0x33d0da['stack']);}},exports[_0x35e535('0xd')]=function(_0x3a763d){const _0x174181=_0x35e535;try{!_['isNil'](channels[_0x3a763d[_0x174181('0x2c')]])&&(_[_0x174181('0x1b')](channels[_0x3a763d['uniqueid']][_0x174181('0x37')])&&(channels[_0x3a763d[_0x174181('0x2c')]]['callerid']=_0x3a763d['calleridname']+'\x20<'+_0x3a763d['calleridnum']+'>'),channels[_0x3a763d[_0x174181('0x2c')]][_0x174181('0x28')]=utils[_0x174181('0x27')](),channels[_0x3a763d[_0x174181('0x2c')]][_0x174181('0x24')]=utils['diffTime'](channels[_0x3a763d[_0x174181('0x2c')]][_0x174181('0x28')],channels[_0x3a763d[_0x174181('0x2c')]]['starttime']),channels[_0x3a763d['uniqueid']][_0x174181('0x33')]=channels[_0x3a763d[_0x174181('0x2c')]][_0x174181('0x47')]?utils[_0x174181('0x2f')](channels[_0x3a763d[_0x174181('0x2c')]]['endtime'],channels[_0x3a763d[_0x174181('0x2c')]]['answertime']):0x0,writeDB(channels[_0x3a763d[_0x174181('0x2c')]]));}catch(_0x250d3f){utils[_0x174181('0x6')](_0x250d3f[_0x174181('0xf')]);}},exports[_0x35e535('0x3f')]=function(_0x43ddd2){const _0x3fc685=_0x35e535;try{if(!_[_0x3fc685('0x1b')](channels[_0x43ddd2[_0x3fc685('0x2b')]])){if(channels[_0x43ddd2['localtwolinkedid']][_0x3fc685('0x13')]==_0x43ddd2['transfereechannel'])channels[_0x43ddd2[_0x3fc685('0x2b')]]['destinationchannel']=_0x43ddd2[_0x3fc685('0x4')],channels[_0x43ddd2[_0x3fc685('0x2b')]][_0x3fc685('0x1c')]='_attended';else(channels[_0x43ddd2[_0x3fc685('0x2b')]][_0x3fc685('0x13')]=_0x43ddd2[_0x3fc685('0x12')])&&(channels[_0x43ddd2[_0x3fc685('0x2b')]][_0x3fc685('0x34')]=_0x43ddd2[_0x3fc685('0x42')],channels[_0x43ddd2[_0x3fc685('0x2b')]][_0x3fc685('0x1c')]='_attended');}}catch(_0x3fbcb4){utils['error'](_0x3fbcb4[_0x3fc685('0xf')]);}},exports[_0x35e535('0x1e')]=function(_0x25bd7e){const _0x1eb1bc=_0x35e535;try{!_[_0x1eb1bc('0x1b')](channels[_0x25bd7e[_0x1eb1bc('0x2c')]])&&(channels[_0x25bd7e[_0x1eb1bc('0x2c')]][_0x1eb1bc('0x1d')]=utils['now']());}catch(_0x4afed5){utils['error'](_0x4afed5['stack']);}},exports[_0x35e535('0x46')]=function(_0x22d106){const _0x1908a2=_0x35e535;try{!_[_0x1908a2('0x1b')](channels[_0x22d106[_0x1908a2('0x2c')]])&&(!_['isNil'](channels[_0x22d106[_0x1908a2('0x2c')]][_0x1908a2('0x1d')])&&(channels[_0x22d106['uniqueid']][_0x1908a2('0x1')]+=utils[_0x1908a2('0x2f')](utils[_0x1908a2('0x27')](),channels[_0x22d106[_0x1908a2('0x2c')]][_0x1908a2('0x1d')]),delete channels[_0x22d106[_0x1908a2('0x2c')]][_0x1908a2('0x1d')]));}catch(_0x4286c0){utils[_0x1908a2('0x6')](_0x4286c0['stack']);}},exports['varset']=function(_0x2c2bcc){const _0xc4f486=_0x35e535;try{!_[_0xc4f486('0x1b')](channels[_0x2c2bcc[_0xc4f486('0x2c')]])&&(!_[_0xc4f486('0x1b')](_0x2c2bcc[_0xc4f486('0x11')][_0xc4f486('0x2e')])&&(channels[_0x2c2bcc['uniqueid']]['source']=_0x2c2bcc['value']),!_[_0xc4f486('0x1b')](_0x2c2bcc[_0xc4f486('0x11')]['xmd-phone'])&&(channels[_0x2c2bcc[_0xc4f486('0x2c')]][_0xc4f486('0x21')]=_0x2c2bcc[_0xc4f486('0x0')],channels[_0x2c2bcc[_0xc4f486('0x2c')]][_0xc4f486('0x37')]='\x22'+_0x2c2bcc[_0xc4f486('0x0')]+'\x22\x20<'+_0x2c2bcc[_0xc4f486('0x0')]+'>'),(!_['isNil'](_0x2c2bcc[_0xc4f486('0x11')][_0xc4f486('0x35')])||!_[_0xc4f486('0x1b')](_0x2c2bcc[_0xc4f486('0x11')][_0xc4f486('0x17')]))&&(channels[_0x2c2bcc[_0xc4f486('0x2c')]][_0xc4f486('0x37')]=_0x2c2bcc[_0xc4f486('0x0')]),(!_[_0xc4f486('0x1b')](_0x2c2bcc['variable'][_0xc4f486('0x38')])||!_[_0xc4f486('0x1b')](_0x2c2bcc['variable'][_0xc4f486('0x31')]))&&(channels[_0x2c2bcc['uniqueid']][_0xc4f486('0x44')]=_0xc4f486('0x16'),channels[_0x2c2bcc[_0xc4f486('0x2c')]]['lastdata']=_0x2c2bcc[_0xc4f486('0x0')],channels[_0x2c2bcc[_0xc4f486('0x2c')]][_0xc4f486('0x10')]=!![]),!_['isNil'](_0x2c2bcc[_0xc4f486('0x11')][_0xc4f486('0x1f')])&&(channels[_0x2c2bcc['uniqueid']][_0xc4f486('0x7')]=_0x2c2bcc[_0xc4f486('0x0')]),!_[_0xc4f486('0x1b')](_0x2c2bcc[_0xc4f486('0x11')][_0xc4f486('0x3d')])&&(channels[_0x2c2bcc['uniqueid']][_0xc4f486('0x4e')]=_0x2c2bcc[_0xc4f486('0x0')]),!_[_0xc4f486('0x1b')](_0x2c2bcc[_0xc4f486('0x11')][_0xc4f486('0x19')])&&(channels[_0x2c2bcc[_0xc4f486('0x2c')]]['routeid']=_0x2c2bcc['value']),!_[_0xc4f486('0x1b')](_0x2c2bcc[_0xc4f486('0x11')]['sipcallid'])&&(channels[_0x2c2bcc[_0xc4f486('0x2c')]][_0xc4f486('0x3e')]=_0x2c2bcc[_0xc4f486('0x0')]));}catch(_0x3f9b57){utils[_0xc4f486('0x6')](_0x3f9b57[_0xc4f486('0xf')]);}},exports[_0x35e535('0xc')]=function(_0x22e98d){const _0x2b0f2c=_0x35e535;try{if(!_['isNil'](channels[_0x22e98d['uniqueid']])){if(_0x22e98d['application'][_0x2b0f2c('0x40')]()=='set'&&_['startsWith'](_0x22e98d[_0x2b0f2c('0x15')][_0x2b0f2c('0x40')](),_0x2b0f2c('0x32'))){const _0x42dc33=_0x22e98d['appdata'][_0x2b0f2c('0x39')]('='),_0x2d191b=_0x42dc33[0x0][_0x2b0f2c('0x4b')](_0x42dc33[0x0][_0x2b0f2c('0x22')]('(')+0x1,_0x42dc33[0x0][_0x2b0f2c('0x22')](')')),_0x94e6f8=_0x42dc33[0x1];channels[_0x22e98d[_0x2b0f2c('0x2c')]][_0x2d191b]=_0x94e6f8;}!_[_0x2b0f2c('0x9')]([_0x2b0f2c('0xd'),_0x2b0f2c('0x4a'),_0x2b0f2c('0x26'),_0x2b0f2c('0x2a'),_0x2b0f2c('0x4d')],_0x22e98d['application'][_0x2b0f2c('0x40')]())&&(channels[_0x22e98d[_0x2b0f2c('0x2c')]][_0x2b0f2c('0x44')]=_0x22e98d[_0x2b0f2c('0x30')],channels[_0x22e98d['uniqueid']][_0x2b0f2c('0x36')]=_0x22e98d[_0x2b0f2c('0x15')]);}}catch(_0x4462ae){utils[_0x2b0f2c('0x6')](_0x4462ae['stack']);}};
\ No newline at end of file
+const a1220_0x2e84=['duration','systemanswertime','linkedid','calleridnum','secondtransfererchannel','lastdata','cdr','value','answertime','lastIndexOf','split','xmd-cdrtype','musiconholdstart','OutgoingSpoolFailed','now','request','xmcs-queue','_attended','disposition','substring','musiconholdstartAt','source','./utils','xmd-queue','callerid','xmd-callerid-preview','newstate','DOCUMENTATION','startsWith','includes','hangup','accountcode','destination','ContactId','musiconholdstop','destinationchannel','transfertargetchannel','context','localtwolinkedid','application','endtime','userfield','getUserByInternal','info','Queue','billableseconds','then','lastapplication','attendedtransfer','UserId','stack','util','outboundrouteid','newchannel','mohtime','transfereechannel','origtransfererchannel','NO\x20ANSWER','variable','channel','xmd-callerid','varset','uniqueid','isNil','error','lodash','CreateVoiceCallReport','diffTime','CALL|%s|%s|%s|%s|%s|%s|%s|%s','transfer','routeid','sipcallid','toLowerCase','BUSY','set','xmd-phone','noop','FAILED','ANSWERED','gotoif','channelstate','appdata'];(function(_0x4e883e,_0x2e848d){const _0x2edcd7=function(_0x3da640){while(--_0x3da640){_0x4e883e['push'](_0x4e883e['shift']());}};_0x2edcd7(++_0x2e848d);}(a1220_0x2e84,0x181));const a1220_0x2edc=function(_0x4e883e,_0x2e848d){_0x4e883e=_0x4e883e-0x0;let _0x2edcd7=a1220_0x2e84[_0x4e883e];return _0x2edcd7;};const _0x544e49=a1220_0x2edc;'use strict';const _=require(_0x544e49('0x8')),util=require(_0x544e49('0x4c')),utils=require(_0x544e49('0x2f')),dispositions=['NO\x20ANSWER','FAILED',_0x544e49('0x14'),_0x544e49('0x0'),_0x544e49('0x0'),_0x544e49('0x0'),'ANSWERED',_0x544e49('0x10'),_0x544e49('0x14'),'FAILED',_0x544e49('0x14')],channels={};function writeDB(_0x3da640){const _0x237859=_0x544e49;utils[_0x237859('0x44')](util['format'](_0x237859('0xb'),_0x3da640[_0x237859('0x5')],_0x3da640['channel'],_0x3da640['type'],_0x3da640[_0x237859('0x38')],_0x3da640['source'],_0x3da640[_0x237859('0x39')],_0x3da640[_0x237859('0x31')],_0x3da640[_0x237859('0x2b')])),_0x3da640['accountcode']?utils[_0x237859('0x43')](_0x3da640['accountcode'])[_0x237859('0x47')](function(_0xe38816){const _0x8a9a28=_0x237859;_0xe38816&&(_0x3da640[_0x8a9a28('0x4a')]=_0xe38816['id']),utils[_0x8a9a28('0x28')](_0x8a9a28('0x9'),_0x3da640);}):utils[_0x237859('0x28')]('CreateVoiceCallReport',_0x3da640),channels[_0x3da640[_0x237859('0x5')]]&&delete channels[_0x3da640[_0x237859('0x5')]];}exports[_0x544e49('0x4e')]=function(_0x1c7368){const _0xb6fe55=_0x544e49;try{_0x1c7368[_0xb6fe55('0x5')]==_0x1c7368[_0xb6fe55('0x1b')]&&_0x1c7368[_0xb6fe55('0x2')]!=_0xb6fe55('0x26')&&(channels[_0x1c7368[_0xb6fe55('0x5')]]={'uniqueid':_0x1c7368[_0xb6fe55('0x5')],'accountcode':_0x1c7368[_0xb6fe55('0x38')],'source':_0x1c7368[_0xb6fe55('0x1c')],'destination':_0x1c7368['exten'],'destinationcontext':_0x1c7368[_0xb6fe55('0x3e')],'channel':_0x1c7368[_0xb6fe55('0x2')],'starttime':utils[_0xb6fe55('0x27')](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':_0xb6fe55('0x0'),'amaflags':_0xb6fe55('0x34')});}catch(_0x5182d1){utils[_0xb6fe55('0x7')](_0x5182d1[_0xb6fe55('0x4b')]);}},exports[_0x544e49('0x33')]=function(_0x15e5b4){const _0x377666=_0x544e49;try{if(!_[_0x377666('0x6')](channels[_0x15e5b4['uniqueid']])&&_0x15e5b4[_0x377666('0x17')]==0x6)_[_0x377666('0x6')](channels[_0x15e5b4[_0x377666('0x5')]][_0x377666('0x1a')])&&(channels[_0x15e5b4[_0x377666('0x5')]]['systemanswertime']=utils['now']());else!_[_0x377666('0x6')](channels[_0x15e5b4['linkedid']])&&_0x15e5b4['channelstate']==0x6&&_0x15e5b4[_0x377666('0x3e')]!=_0x377666('0xc')&&(channels[_0x15e5b4['linkedid']][_0x377666('0x38')]=_0x15e5b4[_0x377666('0x38')],channels[_0x15e5b4[_0x377666('0x1b')]][_0x377666('0x3c')]=_0x15e5b4[_0x377666('0x2')],_[_0x377666('0x6')](channels[_0x15e5b4[_0x377666('0x1b')]][_0x377666('0x21')])&&(channels[_0x15e5b4[_0x377666('0x1b')]]['answertime']=utils[_0x377666('0x27')]()),channels[_0x15e5b4[_0x377666('0x1b')]]['disposition']=dispositions[_['toNumber'](_0x15e5b4['channelstate'])]||_0x377666('0x15'));}catch(_0x2527bd){utils[_0x377666('0x7')](_0x2527bd['stack']);}},exports[_0x544e49('0x37')]=function(_0x380927){const _0x66f8c3=_0x544e49;try{!_[_0x66f8c3('0x6')](channels[_0x380927[_0x66f8c3('0x5')]])&&(_[_0x66f8c3('0x6')](channels[_0x380927['uniqueid']][_0x66f8c3('0x31')])&&(channels[_0x380927[_0x66f8c3('0x5')]][_0x66f8c3('0x31')]=_0x380927['calleridname']+'\x20<'+_0x380927[_0x66f8c3('0x1c')]+'>'),channels[_0x380927[_0x66f8c3('0x5')]]['endtime']=utils[_0x66f8c3('0x27')](),channels[_0x380927['uniqueid']][_0x66f8c3('0x19')]=utils[_0x66f8c3('0xa')](channels[_0x380927[_0x66f8c3('0x5')]][_0x66f8c3('0x41')],channels[_0x380927[_0x66f8c3('0x5')]]['starttime']),channels[_0x380927[_0x66f8c3('0x5')]][_0x66f8c3('0x46')]=channels[_0x380927[_0x66f8c3('0x5')]][_0x66f8c3('0x21')]?utils['diffTime'](channels[_0x380927[_0x66f8c3('0x5')]][_0x66f8c3('0x41')],channels[_0x380927[_0x66f8c3('0x5')]][_0x66f8c3('0x21')]):0x0,writeDB(channels[_0x380927[_0x66f8c3('0x5')]]));}catch(_0x18a6db){utils[_0x66f8c3('0x7')](_0x18a6db[_0x66f8c3('0x4b')]);}},exports[_0x544e49('0x49')]=function(_0x4cf5a0){const _0x2904b6=_0x544e49;try{if(!_[_0x2904b6('0x6')](channels[_0x4cf5a0['localtwolinkedid']])){if(channels[_0x4cf5a0[_0x2904b6('0x3f')]][_0x2904b6('0x2')]==_0x4cf5a0[_0x2904b6('0x50')])channels[_0x4cf5a0['localtwolinkedid']]['destinationchannel']=_0x4cf5a0[_0x2904b6('0x1d')],channels[_0x4cf5a0[_0x2904b6('0x3f')]][_0x2904b6('0x42')]=_0x2904b6('0x2a');else(channels[_0x4cf5a0[_0x2904b6('0x3f')]][_0x2904b6('0x2')]=_0x4cf5a0[_0x2904b6('0x3d')])&&(channels[_0x4cf5a0[_0x2904b6('0x3f')]][_0x2904b6('0x3c')]=_0x4cf5a0[_0x2904b6('0x51')],channels[_0x4cf5a0[_0x2904b6('0x3f')]][_0x2904b6('0x42')]=_0x2904b6('0x2a'));}}catch(_0x586a22){utils[_0x2904b6('0x7')](_0x586a22['stack']);}},exports[_0x544e49('0x25')]=function(_0x4c126d){const _0x50d8b5=_0x544e49;try{!_[_0x50d8b5('0x6')](channels[_0x4c126d['uniqueid']])&&(channels[_0x4c126d[_0x50d8b5('0x5')]][_0x50d8b5('0x2d')]=utils[_0x50d8b5('0x27')]());}catch(_0x2569d9){utils[_0x50d8b5('0x7')](_0x2569d9['stack']);}},exports[_0x544e49('0x3b')]=function(_0x4c3be2){const _0x3ef841=_0x544e49;try{!_[_0x3ef841('0x6')](channels[_0x4c3be2[_0x3ef841('0x5')]])&&(!_['isNil'](channels[_0x4c3be2['uniqueid']][_0x3ef841('0x2d')])&&(channels[_0x4c3be2['uniqueid']][_0x3ef841('0x4f')]+=utils['diffTime'](utils['now'](),channels[_0x4c3be2[_0x3ef841('0x5')]][_0x3ef841('0x2d')]),delete channels[_0x4c3be2[_0x3ef841('0x5')]][_0x3ef841('0x2d')]));}catch(_0x51fe14){utils[_0x3ef841('0x7')](_0x51fe14[_0x3ef841('0x4b')]);}},exports[_0x544e49('0x4')]=function(_0x20600e){const _0x36134e=_0x544e49;try{!_[_0x36134e('0x6')](channels[_0x20600e[_0x36134e('0x5')]])&&(!_[_0x36134e('0x6')](_0x20600e[_0x36134e('0x1')]['xmd-originatecalleridnum'])&&(channels[_0x20600e[_0x36134e('0x5')]][_0x36134e('0x2e')]=_0x20600e[_0x36134e('0x20')]),!_[_0x36134e('0x6')](_0x20600e[_0x36134e('0x1')][_0x36134e('0x12')])&&(channels[_0x20600e[_0x36134e('0x5')]][_0x36134e('0x39')]=_0x20600e[_0x36134e('0x20')],channels[_0x20600e['uniqueid']]['callerid']='\x22'+_0x20600e['value']+'\x22\x20<'+_0x20600e[_0x36134e('0x20')]+'>'),(!_[_0x36134e('0x6')](_0x20600e[_0x36134e('0x1')][_0x36134e('0x32')])||!_[_0x36134e('0x6')](_0x20600e['variable'][_0x36134e('0x3')]))&&(channels[_0x20600e[_0x36134e('0x5')]][_0x36134e('0x31')]=_0x20600e[_0x36134e('0x20')]),(!_['isNil'](_0x20600e[_0x36134e('0x1')][_0x36134e('0x30')])||!_[_0x36134e('0x6')](_0x20600e[_0x36134e('0x1')][_0x36134e('0x29')]))&&(channels[_0x20600e[_0x36134e('0x5')]]['lastapplication']=_0x36134e('0x45'),channels[_0x20600e[_0x36134e('0x5')]]['lastdata']=_0x20600e[_0x36134e('0x20')],channels[_0x20600e['uniqueid']]['queue']=!![]),!_[_0x36134e('0x6')](_0x20600e[_0x36134e('0x1')]['xmd-contactid'])&&(channels[_0x20600e[_0x36134e('0x5')]][_0x36134e('0x3a')]=_0x20600e[_0x36134e('0x20')]),!_['isNil'](_0x20600e[_0x36134e('0x1')][_0x36134e('0x24')])&&(channels[_0x20600e['uniqueid']]['type']=_0x20600e['value']),!_['isNil'](_0x20600e['variable'][_0x36134e('0x4d')])&&(channels[_0x20600e[_0x36134e('0x5')]][_0x36134e('0xd')]=_0x20600e[_0x36134e('0x20')]),!_['isNil'](_0x20600e[_0x36134e('0x1')][_0x36134e('0xe')])&&(channels[_0x20600e[_0x36134e('0x5')]][_0x36134e('0xe')]=_0x20600e[_0x36134e('0x20')]));}catch(_0xeb9cf0){utils['error'](_0xeb9cf0[_0x36134e('0x4b')]);}},exports['newexten']=function(_0x5afd25){const _0x2d7bc2=_0x544e49;try{if(!_[_0x2d7bc2('0x6')](channels[_0x5afd25[_0x2d7bc2('0x5')]])){if(_0x5afd25[_0x2d7bc2('0x40')][_0x2d7bc2('0xf')]()==_0x2d7bc2('0x11')&&_[_0x2d7bc2('0x35')](_0x5afd25[_0x2d7bc2('0x18')]['toLowerCase'](),_0x2d7bc2('0x1f'))){const _0x1a4ac5=_0x5afd25[_0x2d7bc2('0x18')][_0x2d7bc2('0x23')]('='),_0x24c8e2=_0x1a4ac5[0x0][_0x2d7bc2('0x2c')](_0x1a4ac5[0x0]['lastIndexOf']('(')+0x1,_0x1a4ac5[0x0][_0x2d7bc2('0x22')](')')),_0x18434f=_0x1a4ac5[0x1];channels[_0x5afd25[_0x2d7bc2('0x5')]][_0x24c8e2]=_0x18434f;}!_[_0x2d7bc2('0x36')]([_0x2d7bc2('0x37'),_0x2d7bc2('0x13'),'execif',_0x2d7bc2('0x11'),_0x2d7bc2('0x16')],_0x5afd25['application'][_0x2d7bc2('0xf')]())&&(channels[_0x5afd25[_0x2d7bc2('0x5')]][_0x2d7bc2('0x48')]=_0x5afd25[_0x2d7bc2('0x40')],channels[_0x5afd25[_0x2d7bc2('0x5')]][_0x2d7bc2('0x1e')]=_0x5afd25[_0x2d7bc2('0x18')]);}}catch(_0x4f22b6){utils[_0x2d7bc2('0x7')](_0x4f22b6[_0x2d7bc2('0x4b')]);}};
\ No newline at end of file