diff options
author | pcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-28 12:58:22 +0000 |
---|---|---|
committer | pcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-28 12:58:22 +0000 |
commit | 9c1e6eed95a296c26c681299b7481540ec19d466 (patch) | |
tree | 18560984fda8bbf3e6f85f76414ef7bf2f78e45c /channels/h323/ast_h323.cxx | |
parent | 423d25b073c6570c76ff2d4daad3629e7d96a691 (diff) |
Force remote side to start media on outgoing PROGRESS message
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@43862 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323/ast_h323.cxx')
-rw-r--r-- | channels/h323/ast_h323.cxx | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/channels/h323/ast_h323.cxx b/channels/h323/ast_h323.cxx index 73b81865f..ebd551606 100644 --- a/channels/h323/ast_h323.cxx +++ b/channels/h323/ast_h323.cxx @@ -580,6 +580,41 @@ BOOL MyH323Connection::OnReceivedProgress(const H323SignalPDU &pdu) 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, const H323SignalPDU & setupPDU, H323SignalPDU & connectPDU) @@ -1968,7 +2003,11 @@ int h323_send_progress(const char *token) cout << "No connection found for " << token << endl; return -1; } +#if 1 + ((MyH323Connection *)connection)->MySendProgress(); +#else connection->AnsweringCall(H323Connection::AnswerCallDeferredWithMedia); +#endif connection->Unlock(); return 0; } |