Built motion from commit 4c281f94.|2.6.31
[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 _0xa9e7=['line','exports','stream','Transform','call','_localBuffer','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','toString','_inBody','indexOf','substring','length','split','trim'];(function(_0x1f65ee,_0x1792a0){var _0x381fd8=function(_0x1f2973){while(--_0x1f2973){_0x1f65ee['push'](_0x1f65ee['shift']());}};_0x381fd8(++_0x1792a0);}(_0xa9e7,0x79));var _0x7a9e=function(_0x5806c3,_0x5105d8){_0x5806c3=_0x5806c3-0x0;var _0x48ac77=_0xa9e7[_0x5806c3];return _0x48ac77;};'use strict';var util=require('util');var Transform=require(_0x7a9e('0x0'))[_0x7a9e('0x1')];function AGIReply(_0x2940ba){Transform[_0x7a9e('0x2')](this,_0x2940ba);this[_0x7a9e('0x3')]='';this['_inBody']=![];}util[_0x7a9e('0x4')](AGIReply,Transform);AGIReply[_0x7a9e('0x5')][_0x7a9e('0x6')]=function(_0x22dd2e,_0x301f27,_0x40775c){var _0x1f890a='\x0a',_0x32ef48=['\x0a\x0a',_0x7a9e('0x7')],_0x9dcfe6=-0x1,_0x23f2ad=-0x1,_0x11d46e='',_0x262964=0x0,_0x264650='',_0x305781='';this['_localBuffer']+=_0x22dd2e[_0x7a9e('0x8')]();_0x264650=this[_0x7a9e('0x3')];if(!this[_0x7a9e('0x9')]){_0x262964=0x0;while(_0x32ef48[_0x262964]){while((_0x23f2ad=_0x264650[_0x7a9e('0xa')](_0x32ef48[_0x262964]))!=-0x1){_0x11d46e=_0x32ef48[_0x262964];_0x305781=_0x264650[_0x7a9e('0xb')](0x0,_0x23f2ad);_0x264650=_0x264650['substring'](_0x23f2ad+_0x11d46e[_0x7a9e('0xc')]);var _0x101d5e=_0x305781[_0x7a9e('0xd')](_0x1f890a),_0x5491ea=0x0,_0x46b68a={},_0x19ffdb='',_0x4e7620='',_0x25931e=-0x1;while(_0x101d5e[_0x5491ea]){_0x25931e=_0x101d5e[_0x5491ea][_0x7a9e('0xa')](':');if(_0x25931e!=-0x1){_0x19ffdb=_0x101d5e[_0x5491ea]['slice'](0x0,_0x25931e)[_0x7a9e('0xe')]();_0x4e7620=_0x101d5e[_0x5491ea]['slice'](_0x25931e+0x1)[_0x7a9e('0xe')]();if(_0x19ffdb[_0x7a9e('0xc')]>0x0){_0x46b68a[_0x19ffdb]=_0x4e7620;}}else{}_0x5491ea++;}this['emit']('headers',_0x46b68a);this['_inBody']=!![];}_0x262964++;}this[_0x7a9e('0x3')]=_0x264650;}else{while((_0x9dcfe6=_0x264650['indexOf'](_0x1f890a))!=-0x1){_0x305781=_0x264650[_0x7a9e('0xb')](0x0,_0x9dcfe6);this['emit'](_0x7a9e('0xf'),_0x305781);_0x264650=_0x264650[_0x7a9e('0xb')](_0x9dcfe6+_0x1f890a['length']);}this[_0x7a9e('0x3')]=_0x264650;}_0x40775c();};module[_0x7a9e('0x10')]=AGIReply;