[asterisk-commits] pcadach: branch 1.4 r43862 - /branches/1.4/channels/h323/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Sep 28 05:58:22 MST 2006


Author: pcadach
Date: Thu Sep 28 07:58:22 2006
New Revision: 43862

URL: http://svn.digium.com/view/asterisk?rev=43862&view=rev
Log:
Force remote side to start media on outgoing PROGRESS message

Modified:
    branches/1.4/channels/h323/ast_h323.cxx
    branches/1.4/channels/h323/ast_h323.h

Modified: branches/1.4/channels/h323/ast_h323.cxx
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/h323/ast_h323.cxx?rev=43862&r1=43861&r2=43862&view=diff
==============================================================================
--- branches/1.4/channels/h323/ast_h323.cxx (original)
+++ branches/1.4/channels/h323/ast_h323.cxx Thu Sep 28 07:58:22 2006
@@ -578,6 +578,41 @@
 	on_progress(GetCallReference(), (const char *)GetCallToken(), isInband);
 
 	return connectionState != ShuttingDownConnection;
+}
+
+BOOL MyH323Connection::MySendProgress()
+{
+	/* The code taken from H323Connection::AnsweringCall() but ALWAYS send
+	   PROGRESS message, including slow start operations */
+	H323SignalPDU progressPDU;
+	H225_Progress_UUIE &prog = progressPDU.BuildProgress(*this);
+
+	if (!mediaWaitForConnect) {
+		if (SendFastStartAcknowledge(prog.m_fastStart))
+			prog.IncludeOptionalField(H225_Progress_UUIE::e_fastStart);
+		else {
+			if (connectionState == ShuttingDownConnection)
+				return FALSE;
+
+			/* Do early H.245 start */
+			earlyStart = TRUE;
+			if (!h245Tunneling) {
+				if (!H323Connection::StartControlChannel())
+					return FALSE;
+				prog.IncludeOptionalField(H225_Progress_UUIE::e_h245Address);
+				controlChannel->SetUpTransportPDU(prog.m_h245Address, TRUE);
+			}
+		}
+	}
+	progressPDU.GetQ931().SetProgressIndicator(Q931::ProgressInbandInformationAvailable);
+
+#ifdef TUNNELLING
+	EmbedTunneledInfo(progressPDU);
+#endif
+	HandleTunnelPDU(&progressPDU);
+	WriteSignalPDU(progressPDU);
+
+	return TRUE;
 }
 
 H323Connection::AnswerCallResponse MyH323Connection::OnAnswerCall(const PString & caller,
@@ -1968,7 +2003,11 @@
 		cout << "No connection found for " << token << endl;
 		return -1;
 	}
+#if 1
+	((MyH323Connection *)connection)->MySendProgress();
+#else
 	connection->AnsweringCall(H323Connection::AnswerCallDeferredWithMedia);
+#endif
 	connection->Unlock();
 	return 0;
 }

Modified: branches/1.4/channels/h323/ast_h323.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/h323/ast_h323.h?rev=43862&r1=43861&r2=43862&view=diff
==============================================================================
--- branches/1.4/channels/h323/ast_h323.h (original)
+++ branches/1.4/channels/h323/ast_h323.h Thu Sep 28 07:58:22 2006
@@ -80,6 +80,7 @@
 	virtual void OnUserInputTone(char, unsigned, unsigned, unsigned);
 	virtual void OnUserInputString(const PString &value);
 	BOOL OnReceivedProgress(const H323SignalPDU &);
+	BOOL MySendProgress();
 	void OnSendCapabilitySet(H245_TerminalCapabilitySet &);
 	void OnSetLocalCapabilities();
 	void SetCapabilities(int, int, void *, int);



More information about the asterisk-commits mailing list