@ -40,6 +40,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg);
int ooOnReceivedAlerting ( OOH323CallData * call , Q931Message * q931Msg ) ;
int ooOnReceivedAlerting ( OOH323CallData * call , Q931Message * q931Msg ) ;
int ooOnReceivedProgress ( OOH323CallData * call , Q931Message * q931Msg ) ;
int ooOnReceivedProgress ( OOH323CallData * call , Q931Message * q931Msg ) ;
int ooHandleDisplayIE ( OOH323CallData * call , Q931Message * q931Msg ) ;
int ooHandleDisplayIE ( OOH323CallData * call , Q931Message * q931Msg ) ;
int ooHandleH2250ID ( OOH323CallData * call , H225ProtocolIdentifier protocolIdentifier ) ;
int ooHandleDisplayIE ( OOH323CallData * call , Q931Message * q931Msg ) {
int ooHandleDisplayIE ( OOH323CallData * call , Q931Message * q931Msg ) {
Q931InformationElement * pDisplayIE ;
Q931InformationElement * pDisplayIE ;
@ -57,6 +58,17 @@ int ooHandleDisplayIE(OOH323CallData *call, Q931Message *q931Msg) {
return OO_OK ;
return OO_OK ;
}
}
int ooHandleH2250ID ( OOH323CallData * call , H225ProtocolIdentifier protocolIdentifier ) {
if ( ! call - > h225version & & ( protocolIdentifier . numids > = 6 ) & &
( protocolIdentifier . subid [ 3 ] = = 2250 ) ) {
call - > h225version = protocolIdentifier . subid [ 5 ] ;
OOTRACEDBGC4 ( " Extract H.225 remote version, it's %d, (%s, %s) \n " , call - > h225version ,
call - > callType , call - > callToken ) ;
}
return OO_OK ;
}
int ooHandleFastStart ( OOH323CallData * call , H225Facility_UUIE * facility )
int ooHandleFastStart ( OOH323CallData * call , H225Facility_UUIE * facility )
{
{
H245OpenLogicalChannel * olc ;
H245OpenLogicalChannel * olc ;
@ -241,7 +253,9 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
}
}
}
}
} else if ( OO_TESTFLAG ( call - > flags , OO_M_TUNNELING ) ) {
} else if ( OO_TESTFLAG ( call - > flags , OO_M_TUNNELING ) ) {
if ( call - > h225version > = 4 ) {
ret = ooSendTCSandMSD ( call ) ;
ret = ooSendTCSandMSD ( call ) ;
}
if ( ret ! = OO_OK )
if ( ret ! = OO_OK )
return ret ;
return ret ;
}
}
@ -372,6 +386,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
" %s \n " , call - > callType , call - > callToken ) ;
" %s \n " , call - > callType , call - > callToken ) ;
return OO_FAILED ;
return OO_FAILED ;
}
}
ooHandleH2250ID ( call , setup - > protocolIdentifier ) ;
memcpy ( call - > callIdentifier . guid . data , setup - > callIdentifier . guid . data ,
memcpy ( call - > callIdentifier . guid . data , setup - > callIdentifier . guid . data ,
setup - > callIdentifier . guid . numocts ) ;
setup - > callIdentifier . guid . numocts ) ;
call - > callIdentifier . guid . numocts = setup - > callIdentifier . guid . numocts ;
call - > callIdentifier . guid . numocts = setup - > callIdentifier . guid . numocts ;
@ -384,9 +399,9 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
pDisplayIE = ooQ931GetIE ( q931Msg , Q931DisplayIE ) ;
pDisplayIE = ooQ931GetIE ( q931Msg , Q931DisplayIE ) ;
if ( pDisplayIE )
if ( pDisplayIE )
{
{
call - > remoteDisplayName = ( char * ) memAlloc ( call - > pctxt ,
call - > remoteDisplayName = ( char * ) memAlloc Z ( call - > pctxt ,
pDisplayIE - > length * sizeof ( ASN1OCTET ) + 1 ) ;
pDisplayIE - > length * sizeof ( ASN1OCTET ) + 1 ) ;
str cpy( call - > remoteDisplayName , ( char * ) pDisplayIE - > data ) ;
str n cpy( call - > remoteDisplayName , ( char * ) pDisplayIE - > data , pDisplayIE - > length * sizeof ( ASN1OCTET ) ) ;
}
}
/*Extract Remote Aliases, if present*/
/*Extract Remote Aliases, if present*/
if ( setup - > m . sourceAddressPresent )
if ( setup - > m . sourceAddressPresent )
@ -618,6 +633,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED ;
return OO_FAILED ;
}
}
ooHandleH2250ID ( call , callProceeding - > protocolIdentifier ) ;
/* Handle fast-start */
/* Handle fast-start */
if ( OO_TESTFLAG ( call - > flags , OO_M_FASTSTART ) )
if ( OO_TESTFLAG ( call - > flags , OO_M_FASTSTART ) )
{
{
@ -846,6 +862,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
}
}
return OO_FAILED ;
return OO_FAILED ;
}
}
ooHandleH2250ID ( call , alerting - > protocolIdentifier ) ;
/*Handle fast-start */
/*Handle fast-start */
if ( OO_TESTFLAG ( call - > flags , OO_M_FASTSTART ) & &
if ( OO_TESTFLAG ( call - > flags , OO_M_FASTSTART ) & &
! OO_TESTFLAG ( call - > flags , OO_M_FASTSTARTANSWERED ) )
! OO_TESTFLAG ( call - > flags , OO_M_FASTSTARTANSWERED ) )
@ -996,7 +1013,9 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
OOTRACEINFO3 ( " Tunneling and h245address provided. "
OOTRACEINFO3 ( " Tunneling and h245address provided. "
" Giving preference to Tunneling (%s, %s) \n " ,
" Giving preference to Tunneling (%s, %s) \n " ,
call - > callType , call - > callToken ) ;
call - > callType , call - > callToken ) ;
if ( call - > h225version > = 4 ) {
ret = ooSendTCSandMSD ( call ) ;
ret = ooSendTCSandMSD ( call ) ;
}
if ( ret ! = OO_OK )
if ( ret ! = OO_OK )
return ret ;
return ret ;
@ -1038,6 +1057,10 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
call - > callState = OO_CALL_CLEAR ;
call - > callState = OO_CALL_CLEAR ;
}
}
return OO_FAILED ;
return OO_FAILED ;
} else {
if ( call - > h225version > = 4 ) {
ret = ooSendTCSandMSD ( call ) ;
}
}
}
}
}
}
}
@ -1076,6 +1099,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
}
}
return OO_FAILED ;
return OO_FAILED ;
}
}
ooHandleH2250ID ( call , progress - > protocolIdentifier ) ;
/*Handle fast-start */
/*Handle fast-start */
if ( OO_TESTFLAG ( call - > flags , OO_M_FASTSTART ) & &
if ( OO_TESTFLAG ( call - > flags , OO_M_FASTSTART ) & &
! OO_TESTFLAG ( call - > flags , OO_M_FASTSTARTANSWERED ) )
! OO_TESTFLAG ( call - > flags , OO_M_FASTSTARTANSWERED ) )
@ -1227,7 +1251,9 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
OOTRACEINFO3 ( " Tunneling and h245address provided. "
OOTRACEINFO3 ( " Tunneling and h245address provided. "
" Giving preference to Tunneling (%s, %s) \n " ,
" Giving preference to Tunneling (%s, %s) \n " ,
call - > callType , call - > callToken ) ;
call - > callType , call - > callToken ) ;
if ( call - > h225version > = 4 ) {
ret = ooSendTCSandMSD ( call ) ;
ret = ooSendTCSandMSD ( call ) ;
}
if ( ret ! = OO_OK )
if ( ret ! = OO_OK )
return ret ;
return ret ;
} else if ( progress - > m . h245AddressPresent ) {
} else if ( progress - > m . h245AddressPresent ) {
@ -1268,6 +1294,10 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
call - > callState = OO_CALL_CLEAR ;
call - > callState = OO_CALL_CLEAR ;
}
}
return OO_FAILED ;
return OO_FAILED ;
} else {
if ( call - > h225version > = 4 ) {
ret = ooSendTCSandMSD ( call ) ;
}
}
}
}
}
}
}
@ -1313,7 +1343,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
}
return OO_FAILED ;
return OO_FAILED ;
}
}
ooHandleH2250ID ( call , connect - > protocolIdentifier ) ;
/*Handle fast-start */
/*Handle fast-start */
if ( OO_TESTFLAG ( call - > flags , OO_M_FASTSTART ) & &
if ( OO_TESTFLAG ( call - > flags , OO_M_FASTSTART ) & &
! OO_TESTFLAG ( call - > flags , OO_M_FASTSTARTANSWERED ) )
! OO_TESTFLAG ( call - > flags , OO_M_FASTSTARTANSWERED ) )
@ -1548,6 +1578,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
OOTRACEDBGB3 ( " Finished tunneled messages in Connect. (%s, %s) \n " ,
OOTRACEDBGB3 ( " Finished tunneled messages in Connect. (%s, %s) \n " ,
call - > callType , call - > callToken ) ;
call - > callType , call - > callToken ) ;
}
/*
/*
Send TCS as call established and no capability exchange has yet
Send TCS as call established and no capability exchange has yet
started . This will be true only when separate h245 connection is not
started . This will be true only when separate h245 connection is not
@ -1565,7 +1596,6 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
}
}
}
}
call - > callState = OO_CALL_CONNECTED ;
call - > callState = OO_CALL_CONNECTED ;
if ( call - > rtdrCount > 0 & & call - > rtdrInterval > 0 ) {
if ( call - > rtdrCount > 0 & & call - > rtdrInterval > 0 ) {
return ooSendRoundTripDelayRequest ( call ) ;
return ooSendRoundTripDelayRequest ( call ) ;
@ -1786,6 +1816,9 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
H225TransportAddress_ipAddress_ip * ip = NULL ;
H225TransportAddress_ipAddress_ip * ip = NULL ;
OOTRACEDBGC3 ( " Received Facility Message.(%s, %s) \n " , call - > callType ,
OOTRACEDBGC3 ( " Received Facility Message.(%s, %s) \n " , call - > callType ,
call - > callToken ) ;
call - > callToken ) ;
ooHandleDisplayIE ( call , pQ931Msg ) ;
/* Get Reference to H323_UU_PDU */
/* Get Reference to H323_UU_PDU */
if ( ! pQ931Msg - > userInfo )
if ( ! pQ931Msg - > userInfo )
{
{
@ -1803,6 +1836,7 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
facility = pH323UUPdu - > h323_message_body . u . facility ;
facility = pH323UUPdu - > h323_message_body . u . facility ;
if ( facility )
if ( facility )
{
{
ooHandleH2250ID ( call , facility - > protocolIdentifier ) ;
/* Depending on the reason of facility message handle the message */
/* Depending on the reason of facility message handle the message */
if ( facility - > reason . t = = T_H225FacilityReason_transportedInformation )
if ( facility - > reason . t = = T_H225FacilityReason_transportedInformation )
{
{
@ -1980,6 +2014,7 @@ int ooHandleStartH245FacilityMessage
OOTRACEINFO3 ( " INFO: H.245 connection already established with remote "
OOTRACEINFO3 ( " INFO: H.245 connection already established with remote "
" endpoint (%s, %s) \n " , call - > callType , call - > callToken ) ;
" endpoint (%s, %s) \n " , call - > callType , call - > callToken ) ;
}
}
ooSendTCSandMSD ( call ) ;
return OO_OK ;
return OO_OK ;
}
}