Built motion from commit bab6f49e.|2.6.17
[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 _0x5b41=['_transform','\x0d\x0a\x0d\x0a','indexOf','split','trim','slice','length','_inBody','substring','emit','line','util','stream','Transform','call','_localBuffer','inherits','prototype'];(function(_0x22b08d,_0x58dcd4){var _0xee36c=function(_0x3a79ae){while(--_0x3a79ae){_0x22b08d['push'](_0x22b08d['shift']());}};_0xee36c(++_0x58dcd4);}(_0x5b41,0xf5));var _0x15b4=function(_0x4c9927,_0x1adb8d){_0x4c9927=_0x4c9927-0x0;var _0x25084d=_0x5b41[_0x4c9927];return _0x25084d;};'use strict';var util=require(_0x15b4('0x0'));var Transform=require(_0x15b4('0x1'))[_0x15b4('0x2')];function AGIReply(_0xeaac6e){Transform[_0x15b4('0x3')](this,_0xeaac6e);this[_0x15b4('0x4')]='';this['_inBody']=![];}util[_0x15b4('0x5')](AGIReply,Transform);AGIReply[_0x15b4('0x6')][_0x15b4('0x7')]=function(_0x5b2d6a,_0x302057,_0x36fb89){var _0xc1fe26='\x0a',_0x4e603a=['\x0a\x0a',_0x15b4('0x8')],_0x182524=-0x1,_0x201624=-0x1,_0xff3d85='',_0x2a3ede=0x0,_0x46225c='',_0x29a44b='';this['_localBuffer']+=_0x5b2d6a['toString']();_0x46225c=this[_0x15b4('0x4')];if(!this['_inBody']){_0x2a3ede=0x0;while(_0x4e603a[_0x2a3ede]){while((_0x201624=_0x46225c[_0x15b4('0x9')](_0x4e603a[_0x2a3ede]))!=-0x1){_0xff3d85=_0x4e603a[_0x2a3ede];_0x29a44b=_0x46225c['substring'](0x0,_0x201624);_0x46225c=_0x46225c['substring'](_0x201624+_0xff3d85['length']);var _0x18b7d3=_0x29a44b[_0x15b4('0xa')](_0xc1fe26),_0x4b30b2=0x0,_0x136b14={},_0x3bb885='',_0x5105af='',_0x354ed1=-0x1;while(_0x18b7d3[_0x4b30b2]){_0x354ed1=_0x18b7d3[_0x4b30b2][_0x15b4('0x9')](':');if(_0x354ed1!=-0x1){_0x3bb885=_0x18b7d3[_0x4b30b2]['slice'](0x0,_0x354ed1)[_0x15b4('0xb')]();_0x5105af=_0x18b7d3[_0x4b30b2][_0x15b4('0xc')](_0x354ed1+0x1)[_0x15b4('0xb')]();if(_0x3bb885[_0x15b4('0xd')]>0x0){_0x136b14[_0x3bb885]=_0x5105af;}}else{}_0x4b30b2++;}this['emit']('headers',_0x136b14);this[_0x15b4('0xe')]=!![];}_0x2a3ede++;}this['_localBuffer']=_0x46225c;}else{while((_0x182524=_0x46225c[_0x15b4('0x9')](_0xc1fe26))!=-0x1){_0x29a44b=_0x46225c[_0x15b4('0xf')](0x0,_0x182524);this[_0x15b4('0x10')](_0x15b4('0x11'),_0x29a44b);_0x46225c=_0x46225c[_0x15b4('0xf')](_0x182524+_0xc1fe26[_0x15b4('0xd')]);}this[_0x15b4('0x4')]=_0x46225c;}_0x36fb89();};module['exports']=AGIReply;