diff options
author | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-11-03 01:41:32 +0000 |
---|---|---|
committer | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-11-03 01:41:32 +0000 |
commit | 0e5115e187c1aab430aa5f34093524412a502ee3 (patch) | |
tree | 5d562af396ca5327dcbdb8911da54e4e99fddc72 /channels | |
parent | a84697b843a745c6162c1ba0ca6a52ed3cae5cb3 (diff) |
Request a sane amount of bandwdith from GK, and fix one-way auido problems with broken H.323 stacks *cough* CCM.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6950 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/h323/ast_h323.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/channels/h323/ast_h323.cpp b/channels/h323/ast_h323.cpp index 74c348190..bb4145088 100755 --- a/channels/h323/ast_h323.cpp +++ b/channels/h323/ast_h323.cpp @@ -155,6 +155,11 @@ void MyProcess::Main() { cout << " == Creating H.323 Endpoint" << endl; endPoint = new MyH323EndPoint(); + /* Due to a bug in the H.323 recomendation/stack we should request a sane + amount of bandwidth from the GK - this function is ignored if not using a GK + We are requesting 128 (64k in each direction), which is the worst case codec. */ + endPoint->SetInitialBandwidth(1280); + PTrace::Initialise(0, NULL, PTrace::Timestamp | PTrace::Thread | PTrace::FileAndLine); PTrace::SetStream(logstream); } @@ -360,7 +365,7 @@ void MyH323EndPoint::SetEndpointTypeInfo( H225_EndpointType & info ) const PINDEX as=SupportedPrefixes.GetSize(); ((H225_VoiceCaps &)protocol).m_supportedPrefixes.SetSize(as); for (PINDEX p=0; p<as; p++) { - H323SetAliasAddress(SupportedPrefixes[p], ((H225_VoiceCaps &)protocol).m_supportedPrefixes[p].m_prefix); + H323SetAliasAddress(SupportedPrefixes[p], ((H225_VoiceCaps &)protocol).m_supportedPrefixes[p].m_prefix, H225_AliasAddress::e_dialedDigits); } } @@ -1085,22 +1090,18 @@ BOOL MyH323_ExternalRTPChannel::Start(void) cout << "\t\tRTP channel id " << sessionID << " parameters:" << endl; } - /* Update RTP parameters by outgoing voice path only */ - if (GetDirection() == IsTransmitter) { - /* Collect the remote information */ - H323_ExternalRTPChannel::GetRemoteAddress(remoteIpAddr, remotePort); - - if (h323debug) { - cout << "\t\t-- remoteIpAddress: " << remoteIpAddr << endl; - cout << "\t\t-- remotePort: " << remotePort << endl; - cout << "\t\t-- ExternalIpAddress: " << localIpAddr << endl; - cout << "\t\t-- ExternalPort: " << localPort << endl; - } + /* Collect the remote information */ + H323_ExternalRTPChannel::GetRemoteAddress(remoteIpAddr, remotePort); - /* Notify Asterisk of remote RTP information */ - on_start_rtp_channel(connection.GetCallReference(), (const char *)remoteIpAddr.AsString(), remotePort, - (const char *)connection.GetCallToken(), (int)payloadCode); - } + if (h323debug) { + cout << "\t\t-- remoteIpAddress: " << remoteIpAddr << endl; + cout << "\t\t-- remotePort: " << remotePort << endl; + cout << "\t\t-- ExternalIpAddress: " << localIpAddr << endl; + cout << "\t\t-- ExternalPort: " << localPort << endl; + } + /* Notify Asterisk of remote RTP information */ + on_start_rtp_channel(connection.GetCallReference(), (const char *)remoteIpAddr.AsString(), remotePort, + (const char *)connection.GetCallToken(), (int)payloadCode); return TRUE; } |