Correct crv handling.
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@176 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
524ed2ba1c
commit
c48ce7994f
|
@ -337,6 +337,10 @@ L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT Size)
|
||||||
/* Starting Codeset */
|
/* Starting Codeset */
|
||||||
m->codeset = Q931_CODESET_0;
|
m->codeset = Q931_CODESET_0;
|
||||||
|
|
||||||
|
if (m->ProtDisc != 8) {
|
||||||
|
return Q931E_UNKNOWN_MESSAGE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Call table proc to unpack codec message */
|
/* Call table proc to unpack codec message */
|
||||||
RetCode = Q931Umes[pTrunk->Dialect][m->MesType](pTrunk, Mes, (Q931mes_Generic *)pTrunk->L3Buf, Q931L4HeaderSpace + IOff , Size - Q931L4HeaderSpace - IOff + 1);
|
RetCode = Q931Umes[pTrunk->Dialect][m->MesType](pTrunk, Mes, (Q931mes_Generic *)pTrunk->L3Buf, Q931L4HeaderSpace + IOff , Size - Q931L4HeaderSpace - IOff + 1);
|
||||||
|
|
||||||
|
@ -533,7 +537,7 @@ L3INT Q931GetCallState(Q931_TrunkInfo_t *pTrunk, L3INT iCRV)
|
||||||
L3INT x;
|
L3INT x;
|
||||||
for(x=0; x < Q931MAXCALLPERTRUNK; x++)
|
for(x=0; x < Q931MAXCALLPERTRUNK; x++)
|
||||||
{
|
{
|
||||||
if(!pTrunk->call[x].InUse)
|
if(pTrunk->call[x].InUse)
|
||||||
{
|
{
|
||||||
if(pTrunk->call[x].CRV == iCRV)
|
if(pTrunk->call[x].CRV == iCRV)
|
||||||
{
|
{
|
||||||
|
@ -601,7 +605,7 @@ L3INT Q931FindCRV(Q931_TrunkInfo_t *pTrunk, L3INT crv, L3INT *callindex)
|
||||||
L3INT x;
|
L3INT x;
|
||||||
for(x=0; x < Q931MAXCALLPERTRUNK; x++)
|
for(x=0; x < Q931MAXCALLPERTRUNK; x++)
|
||||||
{
|
{
|
||||||
if(!pTrunk->call[x].InUse)
|
if(pTrunk->call[x].InUse)
|
||||||
{
|
{
|
||||||
if(pTrunk->call[x].CRV == crv)
|
if(pTrunk->call[x].CRV == crv)
|
||||||
{
|
{
|
||||||
|
|
|
@ -793,15 +793,19 @@ L3INT Q931ProcRestartTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
||||||
L3INT ret=Q931E_NO_ERROR;
|
L3INT ret=Q931E_NO_ERROR;
|
||||||
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
||||||
|
|
||||||
/* Find the call using CRV */
|
|
||||||
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
if (pMes->CRV) {
|
||||||
if(ret != Q931E_NO_ERROR)
|
/* Find the call using CRV */
|
||||||
return ret;
|
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
||||||
|
if(ret != Q931E_NO_ERROR)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
/* TODO - Set correct timer here */
|
||||||
|
Q931StartTimer(pTrunk, callIndex, 303);
|
||||||
|
}
|
||||||
|
|
||||||
/* TODO chack against state table for illegal or unexpected message here*/
|
/* TODO chack against state table for illegal or unexpected message here*/
|
||||||
|
|
||||||
/* TODO - Set correct timer here */
|
|
||||||
Q931StartTimer(pTrunk, callIndex, 303);
|
|
||||||
if(iFrom == 4)
|
if(iFrom == 4)
|
||||||
{
|
{
|
||||||
/* TODO Add proc here*/
|
/* TODO Add proc here*/
|
||||||
|
@ -826,15 +830,17 @@ L3INT Q931ProcRestartAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
||||||
L3INT ret=Q931E_NO_ERROR;
|
L3INT ret=Q931E_NO_ERROR;
|
||||||
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
||||||
|
|
||||||
/* Find the call using CRV */
|
if (pMes->CRV) {
|
||||||
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
/* Find the call using CRV */
|
||||||
if(ret != Q931E_NO_ERROR)
|
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
||||||
return ret;
|
if(ret != Q931E_NO_ERROR)
|
||||||
|
return ret;
|
||||||
|
/* TODO - Set correct timer here */
|
||||||
|
Q931StartTimer(pTrunk, callIndex, 303);
|
||||||
|
}
|
||||||
|
|
||||||
/* TODO chack against state table for illegal or unexpected message here*/
|
/* TODO chack against state table for illegal or unexpected message here*/
|
||||||
|
|
||||||
/* TODO - Set correct timer here */
|
|
||||||
Q931StartTimer(pTrunk, callIndex, 303);
|
|
||||||
if(iFrom == 4)
|
if(iFrom == 4)
|
||||||
{
|
{
|
||||||
/* TODO Add proc here*/
|
/* TODO Add proc here*/
|
||||||
|
|
Loading…
Reference in New Issue