mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
re-apply possible CCM fix. Someone still needs to test this
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -687,7 +687,7 @@ H323Channel * MyH323Connection::CreateRealTimeLogicalChannel(const H323Capabilit
|
|||||||
cout << " -- SessionID: " << sessionID << endl;
|
cout << " -- SessionID: " << sessionID << endl;
|
||||||
cout << " -- Direction: " << dir << endl;
|
cout << " -- Direction: " << dir << endl;
|
||||||
}
|
}
|
||||||
return new H323_ExternalRTPChannel(*this, capability, dir, sessionID, externalIpAddress, externalPort);
|
return new MyH323_ExternalRTPChannel(*this, capability, dir, sessionID, externalIpAddress, externalPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This callback function is invoked once upon creation of each
|
/** This callback function is invoked once upon creation of each
|
||||||
@@ -720,6 +720,63 @@ BOOL MyH323Connection::OnStartLogicalChannel(H323Channel & channel)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* MyH323_ExternalRTPChannel */
|
||||||
|
MyH323_ExternalRTPChannel::MyH323_ExternalRTPChannel(MyH323Connection & connection,
|
||||||
|
const H323Capability & capability,
|
||||||
|
Directions direction,
|
||||||
|
unsigned sessionID,
|
||||||
|
const PIPSocket::Address & ip,
|
||||||
|
WORD dataPort)
|
||||||
|
: H323_ExternalRTPChannel(connection, capability, direction, sessionID, ip, dataPort)
|
||||||
|
{
|
||||||
|
if (h323debug) {
|
||||||
|
cout << " == New H.323 ExternalRTPChannel created." << endl;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MyH323_ExternalRTPChannel::~MyH323_ExternalRTPChannel()
|
||||||
|
{
|
||||||
|
if (h323debug) {
|
||||||
|
cout << " == H.323 ExternalRTPChannel deleted." << endl;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL MyH323_ExternalRTPChannel::OnReceivedPDU(
|
||||||
|
const H245_H2250LogicalChannelParameters & param,
|
||||||
|
unsigned & errorCode)
|
||||||
|
{
|
||||||
|
if (h323debug) {
|
||||||
|
cout << " MyH323_ExternalRTPChannel::OnReceivedPDU " << endl;
|
||||||
|
}
|
||||||
|
return H323_ExternalRTPChannel::OnReceivedPDU( param, errorCode );
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL MyH323_ExternalRTPChannel::OnReceivedAckPDU(
|
||||||
|
const H245_H2250LogicalChannelAckParameters & param)
|
||||||
|
{
|
||||||
|
|
||||||
|
PIPSocket::Address remoteIpAddress; // IP Address of remote endpoint
|
||||||
|
WORD remotePort; // remote endpoint Data port (control is dataPort+1)
|
||||||
|
|
||||||
|
if (h323debug) {
|
||||||
|
cout << " MyH323_ExternalRTPChannel::OnReceivedAckPDU " << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (H323_ExternalRTPChannel::OnReceivedAckPDU( param )) {
|
||||||
|
GetRemoteAddress(remoteIpAddress, remotePort);
|
||||||
|
if (h323debug) {
|
||||||
|
cout << " -- remoteIpAddress: " << remoteIpAddress << endl;
|
||||||
|
cout << " -- remotePort: " << remotePort << endl;
|
||||||
|
}
|
||||||
|
/* Notify Asterisk of remote RTP information */
|
||||||
|
on_start_logical_channel(connection.GetCallReference(), (const char *)remoteIpAddress.AsString(), remotePort);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** IMPLEMENTATION OF C FUNCTIONS */
|
/** IMPLEMENTATION OF C FUNCTIONS */
|
||||||
|
|
||||||
@@ -1097,5 +1154,3 @@ void h323_native_bridge(const char *token, char *them, char *capability)
|
|||||||
|
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -253,6 +253,26 @@ class MyH323Connection : public H323Connection {
|
|||||||
BOOL bridging; // Used to help determine which IP to use
|
BOOL bridging; // Used to help determine which IP to use
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class MyH323_ExternalRTPChannel : public H323_ExternalRTPChannel {
|
||||||
|
|
||||||
|
PCLASSINFO(MyH323_ExternalRTPChannel, H323_ExternalRTPChannel);
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
MyH323_ExternalRTPChannel(MyH323Connection &, const H323Capability &, Directions,
|
||||||
|
unsigned, const PIPSocket::Address &, WORD);
|
||||||
|
|
||||||
|
~MyH323_ExternalRTPChannel();
|
||||||
|
|
||||||
|
BOOL OnReceivedPDU(
|
||||||
|
const H245_H2250LogicalChannelParameters & param, /// Acknowledgement PDU
|
||||||
|
unsigned & errorCode /// Error on failure
|
||||||
|
);
|
||||||
|
|
||||||
|
BOOL OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The MyProcess is a necessary descendant PProcess class so that the H323EndPoint
|
* The MyProcess is a necessary descendant PProcess class so that the H323EndPoint
|
||||||
* objected to be created from within that class. (Who owns main() problem).
|
* objected to be created from within that class. (Who owns main() problem).
|
||||||
@@ -269,4 +289,3 @@ class MyProcess : public PProcess {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user