Built motion from commit b0a9a629.|2.6.33
[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 _0x102f=['headers','_localBuffer','length','exports','_inBody','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','indexOf','substring','trim','slice','emit'];(function(_0x4e6ae6,_0x49dba6){var _0x23c108=function(_0x1bc103){while(--_0x1bc103){_0x4e6ae6['push'](_0x4e6ae6['shift']());}};_0x23c108(++_0x49dba6);}(_0x102f,0x1d2));var _0xf102=function(_0x419ffd,_0x10bdfe){_0x419ffd=_0x419ffd-0x0;var _0xb0b19d=_0x102f[_0x419ffd];return _0xb0b19d;};'use strict';var util=require('util');var Transform=require('stream')['Transform'];function AGIReply(_0x1b768a){Transform['call'](this,_0x1b768a);this['_localBuffer']='';this[_0xf102('0x0')]=![];}util[_0xf102('0x1')](AGIReply,Transform);AGIReply[_0xf102('0x2')][_0xf102('0x3')]=function(_0x5068fe,_0x44d0da,_0x2cc7b7){var _0x5f1c20='\x0a',_0x2cb2d6=['\x0a\x0a',_0xf102('0x4')],_0x2b8fcb=-0x1,_0x1e2873=-0x1,_0x38bd7a='',_0x44b4a7=0x0,_0x3ab013='',_0x1455a9='';this['_localBuffer']+=_0x5068fe['toString']();_0x3ab013=this['_localBuffer'];if(!this[_0xf102('0x0')]){_0x44b4a7=0x0;while(_0x2cb2d6[_0x44b4a7]){while((_0x1e2873=_0x3ab013[_0xf102('0x5')](_0x2cb2d6[_0x44b4a7]))!=-0x1){_0x38bd7a=_0x2cb2d6[_0x44b4a7];_0x1455a9=_0x3ab013['substring'](0x0,_0x1e2873);_0x3ab013=_0x3ab013[_0xf102('0x6')](_0x1e2873+_0x38bd7a['length']);var _0x57d11d=_0x1455a9['split'](_0x5f1c20),_0xa2d260=0x0,_0x2491e1={},_0x3b4764='',_0x410bbe='',_0x48b6a2=-0x1;while(_0x57d11d[_0xa2d260]){_0x48b6a2=_0x57d11d[_0xa2d260]['indexOf'](':');if(_0x48b6a2!=-0x1){_0x3b4764=_0x57d11d[_0xa2d260]['slice'](0x0,_0x48b6a2)[_0xf102('0x7')]();_0x410bbe=_0x57d11d[_0xa2d260][_0xf102('0x8')](_0x48b6a2+0x1)[_0xf102('0x7')]();if(_0x3b4764['length']>0x0){_0x2491e1[_0x3b4764]=_0x410bbe;}}else{}_0xa2d260++;}this[_0xf102('0x9')](_0xf102('0xa'),_0x2491e1);this[_0xf102('0x0')]=!![];}_0x44b4a7++;}this[_0xf102('0xb')]=_0x3ab013;}else{while((_0x2b8fcb=_0x3ab013[_0xf102('0x5')](_0x5f1c20))!=-0x1){_0x1455a9=_0x3ab013[_0xf102('0x6')](0x0,_0x2b8fcb);this[_0xf102('0x9')]('line',_0x1455a9);_0x3ab013=_0x3ab013[_0xf102('0x6')](_0x2b8fcb+_0x5f1c20[_0xf102('0xc')]);}this[_0xf102('0xb')]=_0x3ab013;}_0x2cc7b7();};module[_0xf102('0xd')]=AGIReply;