diff options
author | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-20 14:14:00 +0000 |
---|---|---|
committer | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-20 14:14:00 +0000 |
commit | 19471f4a8f35654870492dae2a376595b7b1f1ec (patch) | |
tree | 7cb0907753d705bdce6ab692ca1a03e1a0b874e9 /channels/h323/ast_h323.cpp | |
parent | 09acc271c7cc1b7b8d018089c23dfe3014b1f7ee (diff) |
try to work around CCM interop, UNTESTED! Someone with a CCM needs to test this
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2497 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323/ast_h323.cpp')
-rwxr-xr-x | channels/h323/ast_h323.cpp | 61 |
1 files changed, 58 insertions, 3 deletions
diff --git a/channels/h323/ast_h323.cpp b/channels/h323/ast_h323.cpp index e55b93825..9dbc1aa6f 100755 --- a/channels/h323/ast_h323.cpp +++ b/channels/h323/ast_h323.cpp @@ -687,7 +687,7 @@ H323Channel * MyH323Connection::CreateRealTimeLogicalChannel(const H323Capabilit cout << " -- SessionID: " << sessionID << 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 @@ -720,6 +720,63 @@ BOOL MyH323Connection::OnStartLogicalChannel(H323Channel & channel) 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 */ @@ -1102,5 +1159,3 @@ void h323_native_bridge(const char *token, char *them, char *capability) } /* extern "C" */ - - |