hack in DMS service message support
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@284 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
29411355a4
commit
b041edc605
|
@ -2533,6 +2533,7 @@ L3INT Q931Uie_RestartInd(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *pMsg, L3UCHA
|
||||||
|
|
||||||
/* Octet 3 */
|
/* Octet 3 */
|
||||||
pie->Class = IBuf[Octet+Off] & 0x07;
|
pie->Class = IBuf[Octet+Off] & 0x07;
|
||||||
|
pie->Spare = IBuf[Octet+Off] & 0x78;
|
||||||
|
|
||||||
Off = Q931ReadExt(&IBuf[Octet], Off);
|
Off = Q931ReadExt(&IBuf[Octet], Off);
|
||||||
Octet++;
|
Octet++;
|
||||||
|
|
|
@ -63,6 +63,7 @@ typedef enum {
|
||||||
|
|
||||||
/* Variable Length Information Elements */
|
/* Variable Length Information Elements */
|
||||||
#define Q931ie_SEGMENTED_MESSAGE 0x00 /* 0000 0000 */
|
#define Q931ie_SEGMENTED_MESSAGE 0x00 /* 0000 0000 */
|
||||||
|
#define Q931ie_CHANGE_STATUS 0x01 /* 0000 0001 */
|
||||||
#define Q931ie_BEARER_CAPABILITY 0x04 /* 0000 0100 */
|
#define Q931ie_BEARER_CAPABILITY 0x04 /* 0000 0100 */
|
||||||
#define Q931ie_CAUSE 0x08 /* 0000 1000 */
|
#define Q931ie_CAUSE 0x08 /* 0000 1000 */
|
||||||
#define Q931ie_CALL_IDENTITY 0x10 /* 0001 0000 */
|
#define Q931ie_CALL_IDENTITY 0x10 /* 0001 0000 */
|
||||||
|
@ -1060,6 +1061,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
L3UCHAR IEId; /* 01110100 */
|
L3UCHAR IEId; /* 01110100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
|
L3UCHAR Spare; /* Spare */
|
||||||
L3UCHAR Class; /* Class */
|
L3UCHAR Class; /* Class */
|
||||||
/* 000 Indicate channels */
|
/* 000 Indicate channels */
|
||||||
/* 110 Single interface */
|
/* 110 Single interface */
|
||||||
|
|
|
@ -72,6 +72,8 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *OBuf, L3INT IOff, L3INT Size);
|
L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *OBuf, L3INT IOff, L3INT Size);
|
||||||
L3INT nationalPmes_Setup(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize);
|
L3INT nationalPmes_Setup(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize);
|
||||||
|
L3INT DMSUmes_0x0f(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size);
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ void nationalCreateTE(L3UCHAR i)
|
||||||
Q931SetMesProc(Q931mes_ALERTING, i,Q931ProcAlertingTE, Q931Umes_Alerting, Q931Pmes_Alerting);
|
Q931SetMesProc(Q931mes_ALERTING, i,Q931ProcAlertingTE, Q931Umes_Alerting, Q931Pmes_Alerting);
|
||||||
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i,Q931ProcCallProceedingTE, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i,Q931ProcCallProceedingTE, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
||||||
Q931SetMesProc(Q931mes_CONNECT, i,Q931ProcConnectTE, Q931Umes_Connect, Q931Pmes_Connect);
|
Q931SetMesProc(Q931mes_CONNECT, i,Q931ProcConnectTE, Q931Umes_Connect, Q931Pmes_Connect);
|
||||||
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i,Q931ProcConnectAckTE, Q931Umes_ConnectAck, Q931Pmes_ConnectAck);
|
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i,Q931ProcConnectAckTE, DMSUmes_0x0f, Q931Pmes_ConnectAck);
|
||||||
Q931SetMesProc(Q931mes_PROGRESS, i,Q931ProcProgressTE, Q931Umes_Progress, Q931Pmes_Progress);
|
Q931SetMesProc(Q931mes_PROGRESS, i,Q931ProcProgressTE, Q931Umes_Progress, Q931Pmes_Progress);
|
||||||
Q931SetMesProc(Q931mes_SETUP, i,Q931ProcSetupTE, nationalUmes_Setup, nationalPmes_Setup);
|
Q931SetMesProc(Q931mes_SETUP, i,Q931ProcSetupTE, nationalUmes_Setup, nationalPmes_Setup);
|
||||||
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i,Q931ProcSetupAckTE, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i,Q931ProcSetupAckTE, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
||||||
|
|
|
@ -259,3 +259,42 @@ L3INT nationalPmes_Setup(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
|
||||||
|
Function: DMSUmes_0x0f
|
||||||
|
|
||||||
|
*****************************************************************************/
|
||||||
|
L3INT DMSUmes_0x0f(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
|
//L3INT Q931Umes_ConnectAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
|
{
|
||||||
|
L3INT OOff=0;
|
||||||
|
L3INT rc=Q931E_NO_ERROR;
|
||||||
|
|
||||||
|
if (mes->ProtDisc == 8) {
|
||||||
|
Q931Umes_ConnectAck(pTrunk, IBuf, mes, IOff, Size);
|
||||||
|
}
|
||||||
|
|
||||||
|
while(IOff < Size)
|
||||||
|
{
|
||||||
|
switch(IBuf[IOff])
|
||||||
|
{
|
||||||
|
case Q931ie_CHANNEL_IDENTIFICATION:
|
||||||
|
rc = Q931Uie[pTrunk->Dialect][Q931ie_RESTART_INDICATOR](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
|
if(rc != Q931E_NO_ERROR)
|
||||||
|
return rc;
|
||||||
|
break;
|
||||||
|
case Q931ie_CHANGE_STATUS:
|
||||||
|
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
|
if(rc != Q931E_NO_ERROR)
|
||||||
|
return rc;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return Q931E_ILLEGAL_IE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mes->Size = sizeof(Q931mes_Generic) - 1 + OOff;
|
||||||
|
return Q931E_NO_ERROR;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue