Built motion from commit 355702c8.|2.5.41
[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 _0x9037=['call','_localBuffer','_inBody','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','indexOf','substring','length','slice','trim','emit','line','exports','stream'];(function(_0x4ca939,_0x3e93a6){var _0x23e61d=function(_0x4ba4fa){while(--_0x4ba4fa){_0x4ca939['push'](_0x4ca939['shift']());}};_0x23e61d(++_0x3e93a6);}(_0x9037,0xbf));var _0x7903=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9037[_0x14add3];return _0x4a174f;};'use strict';var util=require('util');var Transform=require(_0x7903('0x0'))['Transform'];function AGIReply(_0x1d783f){Transform[_0x7903('0x1')](this,_0x1d783f);this[_0x7903('0x2')]='';this[_0x7903('0x3')]=![];}util[_0x7903('0x4')](AGIReply,Transform);AGIReply[_0x7903('0x5')][_0x7903('0x6')]=function(_0x2f9ff7,_0x233506,_0x3ac717){var _0x3f13aa='\x0a',_0x12aca4=['\x0a\x0a',_0x7903('0x7')],_0x5e9071=-0x1,_0x334d94=-0x1,_0x36dcfa='',_0x3ef2a0=0x0,_0x29e7d2='',_0x1c74ac='';this['_localBuffer']+=_0x2f9ff7['toString']();_0x29e7d2=this[_0x7903('0x2')];if(!this[_0x7903('0x3')]){_0x3ef2a0=0x0;while(_0x12aca4[_0x3ef2a0]){while((_0x334d94=_0x29e7d2[_0x7903('0x8')](_0x12aca4[_0x3ef2a0]))!=-0x1){_0x36dcfa=_0x12aca4[_0x3ef2a0];_0x1c74ac=_0x29e7d2[_0x7903('0x9')](0x0,_0x334d94);_0x29e7d2=_0x29e7d2[_0x7903('0x9')](_0x334d94+_0x36dcfa[_0x7903('0xa')]);var _0x195921=_0x1c74ac['split'](_0x3f13aa),_0x3c2adb=0x0,_0x375049={},_0x59b5e5='',_0x1630ea='',_0x367571=-0x1;while(_0x195921[_0x3c2adb]){_0x367571=_0x195921[_0x3c2adb][_0x7903('0x8')](':');if(_0x367571!=-0x1){_0x59b5e5=_0x195921[_0x3c2adb][_0x7903('0xb')](0x0,_0x367571)[_0x7903('0xc')]();_0x1630ea=_0x195921[_0x3c2adb]['slice'](_0x367571+0x1)[_0x7903('0xc')]();if(_0x59b5e5['length']>0x0){_0x375049[_0x59b5e5]=_0x1630ea;}}else{}_0x3c2adb++;}this[_0x7903('0xd')]('headers',_0x375049);this[_0x7903('0x3')]=!![];}_0x3ef2a0++;}this[_0x7903('0x2')]=_0x29e7d2;}else{while((_0x5e9071=_0x29e7d2[_0x7903('0x8')](_0x3f13aa))!=-0x1){_0x1c74ac=_0x29e7d2[_0x7903('0x9')](0x0,_0x5e9071);this[_0x7903('0xd')](_0x7903('0xe'),_0x1c74ac);_0x29e7d2=_0x29e7d2[_0x7903('0x9')](_0x5e9071+_0x3f13aa[_0x7903('0xa')]);}this[_0x7903('0x2')]=_0x29e7d2;}_0x3ac717();};module[_0x7903('0xf')]=AGIReply;