4df979e12e00f4e5b2b18a11a4181273f24c29bc
[motion2.git] / server / services / agi / error.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 _0x5253=['exports','util','Undefined\x20error.','Server\x20error.\x20Code:\x20%s.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','Socket\x20timeout.','Empty\x20command.','Missing\x20\x27ivr.agi_network_script\x27.','Missing\x20\x27ivr.entry\x27\x20menu.','push','apply','name'];(function(_0x202c5b,_0x18cc8d){var _0x333417=function(_0x2d7a1a){while(--_0x2d7a1a){_0x202c5b['push'](_0x202c5b['shift']());}};_0x333417(++_0x18cc8d);}(_0x5253,0x1d5));var _0x3525=function(_0x3efef6,_0x300ade){_0x3efef6=_0x3efef6-0x0;var _0x30a662=_0x5253[_0x3efef6];return _0x30a662;};'use strict';var util=require(_0x3525('0x0'));var error={'E_AGI_UNDEFINED':_0x3525('0x1'),'E_AGI_ARGUMENT_PORT':'Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','E_AGI_SERVER_ERROR':_0x3525('0x2'),'E_AGI_SERVER_CLOSE':'Server\x20closed.','E_AGI_SERVER_MAXCONNECTION':_0x3525('0x3'),'E_AGI_SERVER_VOICE_DISABLED':_0x3525('0x4'),'E_AGI_SOCKET_ERROR':'Socket\x20error.\x20Code:\x20%s.','E_AGI_SOCKET_CLOSE':'Socket\x20closed.','E_AGI_SOCKET_TIMEOUT':_0x3525('0x5'),'E_AGI_COMMAND_EMPTY':_0x3525('0x6'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':_0x3525('0x7'),'E_AGI_IVR_ENTRY':_0x3525('0x8')};function AGIError(_0x4a34e2){var _0x4a34e2=_0x4a34e2||null,_0x3a9e82=_0x3a9e82||[],_0x53f7d8=0x1,_0x790d99='';if(!error[_0x4a34e2]){_0x4a34e2='E_AGI_UNDEFINED';}_0x3a9e82[_0x3525('0x9')](error[_0x4a34e2]);while(arguments[_0x53f7d8]){_0x3a9e82[_0x3525('0x9')](arguments[_0x53f7d8]);_0x53f7d8++;}_0x790d99=util['format'][_0x3525('0xa')](util,_0x3a9e82);this['message']=_0x790d99;this[_0x3525('0xb')]=_0x4a34e2;}module[_0x3525('0xc')]=AGIError;