} else {
ret = Q931ProcUnexpectedMessage(pTrunk, buf, iFrom);
}
- if (pMes->CRV) {
+ if (pMes->CRV && iFrom == 2) {
/* Find the call using CRV */
if ((Q931FindCRV(pTrunk, pMes->CRV, &callIndex)) != Q931E_NO_ERROR)
return ret;
{
/* TODO Add proc here*/
ret = Q931Tx34(pTrunk,buf,pMes->Size);
- }
+ } else {
- if (pMes->CRV) {
- /* Find the call using CRV */
- ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
- if(ret != Q931E_NO_ERROR)
- return ret;
- pTrunk->call[callIndex].InUse = 0;
- }
+ if (pMes->CRV) {
+ /* Find the call using CRV */
+ ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
+ if(ret != Q931E_NO_ERROR)
+ return ret;
+ pTrunk->call[callIndex].InUse = 0;
+ }
+ }
return ret;
}