[Asterisk-cvs] asterisk/channels/h323 ast_h323.cpp,1.79,1.80
jeremy
jeremy
Wed Nov 2 20:49:42 CST 2005
Update of /usr/cvsroot/asterisk/channels/h323
In directory mongoose.digium.com:/tmp/cvs-serv25682
Modified Files:
ast_h323.cpp
Log Message:
Request a sane amount of bandwdith from GK, and fix one-way auido problems with broken H.323 stacks *cough* CCM.
Index: ast_h323.cpp
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- ast_h323.cpp 1 Jun 2005 16:00:13 -0000 1.79
+++ ast_h323.cpp 3 Nov 2005 01:41:32 -0000 1.80
@@ -155,6 +155,11 @@
{
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 @@
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 @@
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;
}
More information about the svn-commits
mailing list