mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-27 14:41:58 +00:00
optmize call setup process
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -471,9 +471,6 @@ MyH323Connection::MyH323Connection(MyH323EndPoint & ep, unsigned callReference,
|
|||||||
unsigned options)
|
unsigned options)
|
||||||
: H323Connection(ep, callReference, options)
|
: H323Connection(ep, callReference, options)
|
||||||
{
|
{
|
||||||
remoteIpAddress = 0; // IP Address of remote endpoint
|
|
||||||
remotePort = 0; // remote endpoint Data port (control is dataPort+1)
|
|
||||||
|
|
||||||
if (h323debug) {
|
if (h323debug) {
|
||||||
cout << " == New H.323 Connection created." << endl;
|
cout << " == New H.323 Connection created." << endl;
|
||||||
}
|
}
|
||||||
@@ -722,24 +719,14 @@ BOOL MyH323Connection::OnStartLogicalChannel(H323Channel & channel)
|
|||||||
cout << ((channel.GetDirection()==H323Channel::IsTransmitter)?"sending ":((channel.GetDirection()==H323Channel::IsReceiver)?"receiving ":" "));
|
cout << ((channel.GetDirection()==H323Channel::IsTransmitter)?"sending ":((channel.GetDirection()==H323Channel::IsReceiver)?"receiving ":" "));
|
||||||
cout << (const char *)(channel.GetCapability()).GetFormatName() << endl;
|
cout << (const char *)(channel.GetCapability()).GetFormatName() << endl;
|
||||||
}
|
}
|
||||||
// adjust the count of channels we have open
|
|
||||||
|
/* adjust the count of channels we have open */
|
||||||
channelsOpen++;
|
channelsOpen++;
|
||||||
|
|
||||||
if (h323debug) {
|
if (h323debug) {
|
||||||
cout << " -- channelsOpen = " << channelsOpen << endl;
|
cout << " -- channelsOpen = " << channelsOpen << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
H323_ExternalRTPChannel & external = (H323_ExternalRTPChannel &)channel;
|
|
||||||
external.GetRemoteAddress(remoteIpAddress, remotePort);
|
|
||||||
|
|
||||||
if (h323debug) {
|
|
||||||
if (channel.GetDirection()==H323Channel::IsReceiver) {
|
|
||||||
cout << " -- remoteIpAddress: " << remoteIpAddress << endl;
|
|
||||||
cout << " -- remotePort: " << remotePort << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Notify Asterisk of remote RTP information */
|
|
||||||
on_start_logical_channel(GetCallReference(), (const char *)remoteIpAddress.AsString(), remotePort);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -752,10 +739,6 @@ MyH323_ExternalRTPChannel::MyH323_ExternalRTPChannel(MyH323Connection & connecti
|
|||||||
WORD dataPort)
|
WORD dataPort)
|
||||||
: H323_ExternalRTPChannel(connection, capability, direction, sessionID, ip, dataPort)
|
: H323_ExternalRTPChannel(connection, capability, direction, sessionID, ip, dataPort)
|
||||||
{
|
{
|
||||||
if (h323debug) {
|
|
||||||
cout << " == New H.323 ExternalRTPChannel created." << endl;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MyH323_ExternalRTPChannel::MyH323_ExternalRTPChannel(MyH323Connection & connection,
|
MyH323_ExternalRTPChannel::MyH323_ExternalRTPChannel(MyH323Connection & connection,
|
||||||
@@ -778,10 +761,6 @@ MyH323_ExternalRTPChannel::MyH323_ExternalRTPChannel(MyH323Connection & connecti
|
|||||||
|
|
||||||
MyH323_ExternalRTPChannel::~MyH323_ExternalRTPChannel()
|
MyH323_ExternalRTPChannel::~MyH323_ExternalRTPChannel()
|
||||||
{
|
{
|
||||||
if (h323debug) {
|
|
||||||
cout << " == H.323 ExternalRTPChannel deleted." << endl;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL MyH323_ExternalRTPChannel::OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param)
|
BOOL MyH323_ExternalRTPChannel::OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param)
|
||||||
@@ -796,14 +775,15 @@ BOOL MyH323_ExternalRTPChannel::OnReceivedAckPDU(const H245_H2250LogicalChannelA
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
/** IMPLEMENTATION OF C FUNCTIONS */
|
/** IMPLEMENTATION OF C FUNCTIONS */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The extern "C" directive takes care for
|
* The extern "C" directive takes care for
|
||||||
* the ANSI-C representation of linkable symbols
|
* the ANSI-C representation of linkable symbols
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
int h323_end_point_exist(void)
|
int h323_end_point_exist(void)
|
||||||
|
|||||||
@@ -248,9 +248,7 @@ class MyH323Connection : public H323Connection {
|
|||||||
PString destE164;
|
PString destE164;
|
||||||
|
|
||||||
PIPSocket::Address externalIpAddress;
|
PIPSocket::Address externalIpAddress;
|
||||||
PIPSocket::Address remoteIpAddress;
|
|
||||||
WORD externalPort;
|
WORD externalPort;
|
||||||
WORD remotePort;
|
|
||||||
WORD sessionId;
|
WORD sessionId;
|
||||||
BOOL bridging;
|
BOOL bridging;
|
||||||
};
|
};
|
||||||
@@ -289,9 +287,7 @@ class MyH323_ExternalRTPChannel : public H323_ExternalRTPChannel {
|
|||||||
BOOL OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param);
|
BOOL OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param);
|
||||||
|
|
||||||
PIPSocket::Address externalIpAddress;
|
PIPSocket::Address externalIpAddress;
|
||||||
PIPSocket::Address remoteIpAddress;
|
|
||||||
WORD externalPort;
|
WORD externalPort;
|
||||||
WORD remotePort;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user