10ecdf065b89bc6345db90228cfe13dc3b0ee5ab
[motion2.git] / server / services / agi / reply.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 _0xcae6=['length','split','slice','trim','emit','exports','util','stream','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','_localBuffer','_inBody','indexOf','substring'];(function(_0x131712,_0x2ed068){var _0x292b97=function(_0x106fbd){while(--_0x106fbd){_0x131712['push'](_0x131712['shift']());}};_0x292b97(++_0x2ed068);}(_0xcae6,0x146));var _0x6cae=function(_0x5e8d3e,_0x18ed2e){_0x5e8d3e=_0x5e8d3e-0x0;var _0x1348c0=_0xcae6[_0x5e8d3e];return _0x1348c0;};'use strict';var util=require(_0x6cae('0x0'));var Transform=require(_0x6cae('0x1'))['Transform'];function AGIReply(_0x604625){Transform['call'](this,_0x604625);this['_localBuffer']='';this['_inBody']=![];}util[_0x6cae('0x2')](AGIReply,Transform);AGIReply[_0x6cae('0x3')][_0x6cae('0x4')]=function(_0x3ce41d,_0xe2f09f,_0x2b6cf3){var _0x2d8114='\x0a',_0x1ecda1=['\x0a\x0a',_0x6cae('0x5')],_0x1c0025=-0x1,_0x117b0d=-0x1,_0x467032='',_0x3c4f6b=0x0,_0x4a93be='',_0xffcfee='';this[_0x6cae('0x6')]+=_0x3ce41d['toString']();_0x4a93be=this[_0x6cae('0x6')];if(!this[_0x6cae('0x7')]){_0x3c4f6b=0x0;while(_0x1ecda1[_0x3c4f6b]){while((_0x117b0d=_0x4a93be[_0x6cae('0x8')](_0x1ecda1[_0x3c4f6b]))!=-0x1){_0x467032=_0x1ecda1[_0x3c4f6b];_0xffcfee=_0x4a93be[_0x6cae('0x9')](0x0,_0x117b0d);_0x4a93be=_0x4a93be[_0x6cae('0x9')](_0x117b0d+_0x467032[_0x6cae('0xa')]);var _0x9e6cf2=_0xffcfee[_0x6cae('0xb')](_0x2d8114),_0x21143c=0x0,_0xbd19f={},_0x572304='',_0x34e94c='',_0x16b2e0=-0x1;while(_0x9e6cf2[_0x21143c]){_0x16b2e0=_0x9e6cf2[_0x21143c][_0x6cae('0x8')](':');if(_0x16b2e0!=-0x1){_0x572304=_0x9e6cf2[_0x21143c][_0x6cae('0xc')](0x0,_0x16b2e0)[_0x6cae('0xd')]();_0x34e94c=_0x9e6cf2[_0x21143c][_0x6cae('0xc')](_0x16b2e0+0x1)[_0x6cae('0xd')]();if(_0x572304['length']>0x0){_0xbd19f[_0x572304]=_0x34e94c;}}else{}_0x21143c++;}this[_0x6cae('0xe')]('headers',_0xbd19f);this[_0x6cae('0x7')]=!![];}_0x3c4f6b++;}this[_0x6cae('0x6')]=_0x4a93be;}else{while((_0x1c0025=_0x4a93be[_0x6cae('0x8')](_0x2d8114))!=-0x1){_0xffcfee=_0x4a93be[_0x6cae('0x9')](0x0,_0x1c0025);this['emit']('line',_0xffcfee);_0x4a93be=_0x4a93be[_0x6cae('0x9')](_0x1c0025+_0x2d8114['length']);}this[_0x6cae('0x6')]=_0x4a93be;}_0x2b6cf3();};module[_0x6cae('0xf')]=AGIReply;