#ifndef _MGCP_DEF__H
#define _MGCP_DEF__H

#include "mgcp_pub.h"
#include "mgcp.h"
#include "mgcp_const.h"
#include "mgcp_struct.h"

MGCP_SAP	mgcpSap[MGCP_MAX_NUM_OF_SAP];
MGCP_PORT	mgcpPort[MGCP_MAX_NUM_OF_PORT];
WORD		mgcpTransStart[MGCP_MAX_NUM_OF_PORT];

WORD		mgcpPortSelect;

char		mgcpCmdToStr[8][5] = {{""}, {"CRCX"}, {"MDCX"}, {"DLCX"}, {"RQNT"}, {"NTFY"}, {"AUEP"}, {"RSIP"}};
char		mgcpConModeToStr[4][9] = {{"inactive"}, {"recvonly"}, {"sendonly"}, {"sendrecv"}};

char		mgcpPkgToStr[MGCP_PACKAGE_MAX][8] = {{"L"},{"D"},{"G"}};
char		mgcpAalnSigToStr[MGCP_PACKAGE_MAX][MGCP_PKG_AALN_SIG_MAX][16] = {{"", "aw", "dl", "bz", "wt", "nbz", "rg", "e", "ot"}
                                                                         , {"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "#", "[0-9*#](N)"}
                                                                         , {"", "rt", "cf", "cg", "it", "pt"}};


char    mgcpEntToStr[MGCP_PACKAGE_MAX][MGCP_ENT_MAX][16] = {{"", "hd", "hu", "hf", "aw", "nbz", "e", "oc", "of"}
                                                           , {"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "*", "#","[0-9#*](N)"}
                                                           , {"", "mt", "ft", "ld", "of"}
														   };

char    mgcpRestModToStr[MGCP_REST_MOD_MAX][16] = {{"restart"}, {"forced"}, {"disconnected"}, {"graceful"}, {"cancel-graceful"}};

BYTE	mgcpMaxPkgSig[MGCP_PACKAGE_MAX] = {8, 13, 5};
BYTE    mgcpMaxPkgEvent[MGCP_PACKAGE_MAX] = {8, 13, 4};

message_list 	mgcpSdMsg;
message_list 	mgcpRvMsg;

MGCP_PARA    mgcpRespPara;

MGCP_RET_CODE	mgcpRetCode[MGCP_MAX_RET_CODE_INDEX] = { {MGCP_RET_CODE_TRANS_TIME_OUT, MGCP_RET_CODE_TRANS_TIME_OUT_DESC}
        												, {MGCP_RET_CODE_INTERNAL_OVERLOAD, MGCP_RET_CODE_INTERNAL_OVERLOAD_DESC}
        											    , {MGCP_RET_CODE_UNEP, MGCP_RET_CODE_UNEP_DESC}
        												, {MGCP_RET_CODE_UNCMD, MGCP_RET_CODE_UNCMD_DESC}
        											    , {MGCP_RET_CODE_RCD_ERR, MGCP_RET_CODE_RCD_ERR_DESC}
        												, {MGCP_RET_CODE_INCONID,	MGCP_RET_CODE_INCONID_DESC}
                                                        , {MGCP_RET_CODE_UNCLLID, MGCP_RET_CODE_UNCLLID_DESC}
        												, {MGCP_RET_CODE_UNMD,MGCP_RET_CODE_UNMD_DESC}
        											    , {MGCP_RET_CODE_UNPKG, MGCP_RET_CODE_UNPKG_DESC}
        												, {MGCP_RET_CODE_NES, MGCP_RET_CODE_NES_DESC}
        												, {MGCP_RET_CODE_ILCO, MGCP_RET_CODE_ILCO_DESC}
        											    , {MGCP_RET_CODE_UNRM, MGCP_RET_CODE_UNRM_DESC}
        											    , {MGCP_RET_CODE_TRANS_OK, MGCP_RET_CODE_TRANS_OK_DESC}
        											    , {MGCP_RET_CODE_TEMP_RSP, MGCP_RET_CODE_TEMP_RSP_DESC}
        																								};

BYTE				mgcpAsciInBuf[MGCP_MAX_ASCIIIN_LEN];
BYTE				mgcpAsciOutBuf[MGCP_MAX_ASCIIOUT_LEN];
BYTE				mgcpAsciTempBuf[MGCP_MAX_ASCITMP_LEN];
WORD				mgcpMonitorFg;
							
char		dbgmgNamemg[3][MGCP_MAX_MG_NAME_LEN];

#endif
