]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Request a sane amount of bandwdith from GK, and fix one-way auido problems with broke...
authorJeremy McNamara <jj@nufone.net>
Thu, 3 Nov 2005 01:41:32 +0000 (01:41 +0000)
committerJeremy McNamara <jj@nufone.net>
Thu, 3 Nov 2005 01:41:32 +0000 (01:41 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6950 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/h323/ast_h323.cpp

index 74c348190a191001f37d6dca42f3f6eafa990c4f..bb41450886f47765fed107a316b991b3000e42cf 100755 (executable)
@@ -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;
 }