aboutsummaryrefslogtreecommitdiffstats
path: root/channels/h323/ast_h323.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'channels/h323/ast_h323.cxx')
-rw-r--r--channels/h323/ast_h323.cxx88
1 files changed, 43 insertions, 45 deletions
diff --git a/channels/h323/ast_h323.cxx b/channels/h323/ast_h323.cxx
index a55a89574..222cbfb3c 100644
--- a/channels/h323/ast_h323.cxx
+++ b/channels/h323/ast_h323.cxx
@@ -63,8 +63,6 @@ extern "C" {
#include "cisco-h225.h"
#include "caps_h323.h"
-#include <ptbuildopts.h>
-
#if PWLIB_MAJOR * 10000 + PWLIB_MINOR * 100 + PWLIB_BUILD >= 1 * 10000 + 12 * 100 + 0
#define SKIP_PWLIB_PIPE_BUG_WORKAROUND 1
#endif
@@ -331,7 +329,7 @@ void MyH323EndPoint::SetGateway(void)
terminalType = e_GatewayOnly;
}
-BOOL MyH323EndPoint::ClearCall(const PString & token, H323Connection::CallEndReason reason)
+PBoolean MyH323EndPoint::ClearCall(const PString & token, H323Connection::CallEndReason reason)
{
if (h323debug) {
#ifdef PTRACING
@@ -343,7 +341,7 @@ BOOL MyH323EndPoint::ClearCall(const PString & token, H323Connection::CallEndRea
return H323EndPoint::ClearCall(token, reason);
}
-BOOL MyH323EndPoint::ClearCall(const PString & token)
+PBoolean MyH323EndPoint::ClearCall(const PString & token)
{
if (h323debug) {
cout << "\t-- ClearCall: Request to clear call with token " << token << endl;
@@ -371,7 +369,7 @@ void MyH323EndPoint::OnClosedLogicalChannel(H323Connection & connection, const H
H323EndPoint::OnClosedLogicalChannel(connection, channel);
}
-BOOL MyH323EndPoint::OnConnectionForwarded(H323Connection & connection,
+PBoolean MyH323EndPoint::OnConnectionForwarded(H323Connection & connection,
const PString & forwardParty,
const H323SignalPDU & pdu)
{
@@ -381,7 +379,7 @@ BOOL MyH323EndPoint::OnConnectionForwarded(H323Connection & connection,
return FALSE;
}
-BOOL MyH323EndPoint::ForwardConnection(H323Connection & connection,
+PBoolean MyH323EndPoint::ForwardConnection(H323Connection & connection,
const PString & forwardParty,
const H323SignalPDU & pdu)
{
@@ -585,9 +583,9 @@ MyH323Connection::~MyH323Connection()
return;
}
-BOOL MyH323Connection::OnReceivedProgress(const H323SignalPDU &pdu)
+PBoolean MyH323Connection::OnReceivedProgress(const H323SignalPDU &pdu)
{
- BOOL isInband;
+ PBoolean isInband;
unsigned pi;
if (!H323Connection::OnReceivedProgress(pdu)) {
@@ -613,7 +611,7 @@ BOOL MyH323Connection::OnReceivedProgress(const H323SignalPDU &pdu)
return connectionState != ShuttingDownConnection;
}
-BOOL MyH323Connection::MySendProgress()
+PBoolean MyH323Connection::MySendProgress()
{
/* The code taken from H323Connection::AnsweringCall() but ALWAYS send
PROGRESS message, including slow start operations */
@@ -693,7 +691,7 @@ H323Connection::AnswerCallResponse MyH323Connection::OnAnswerCall(const PString
return ((pi || (fastStartState != FastStartDisabled)) ? AnswerCallDeferredWithMedia : AnswerCallDeferred);
}
-BOOL MyH323Connection::OnAlerting(const H323SignalPDU & alertingPDU, const PString & username)
+PBoolean MyH323Connection::OnAlerting(const H323SignalPDU & alertingPDU, const PString & username)
{
if (h323debug) {
cout << "\t=-= In OnAlerting for call " << GetCallReference()
@@ -702,7 +700,7 @@ BOOL MyH323Connection::OnAlerting(const H323SignalPDU & alertingPDU, const PStri
}
if (on_progress) {
- BOOL isInband;
+ PBoolean isInband;
unsigned alertingPI;
if (!alertingPDU.GetQ931().GetProgressIndicator(alertingPI)) {
@@ -726,7 +724,7 @@ BOOL MyH323Connection::OnAlerting(const H323SignalPDU & alertingPDU, const PStri
return connectionState != ShuttingDownConnection;
}
-void MyH323Connection::SetCallOptions(void *o, BOOL isIncoming)
+void MyH323Connection::SetCallOptions(void *o, PBoolean isIncoming)
{
call_options_t *opts = (call_options_t *)o;
@@ -757,7 +755,7 @@ void MyH323Connection::SetCallOptions(void *o, BOOL isIncoming)
tunnelOptions = opts->tunnelOptions;
}
-void MyH323Connection::SetCallDetails(void *callDetails, const H323SignalPDU &setupPDU, BOOL isIncoming)
+void MyH323Connection::SetCallDetails(void *callDetails, const H323SignalPDU &setupPDU, PBoolean isIncoming)
{
PString sourceE164;
PString destE164;
@@ -852,7 +850,7 @@ void MyH323Connection::SetCallDetails(void *callDetails, const H323SignalPDU &se
}
#ifdef TUNNELLING
-static BOOL FetchInformationElements(Q931 &q931, const PBYTEArray &data)
+static PBoolean FetchInformationElements(Q931 &q931, const PBYTEArray &data)
{
PINDEX offset = 0;
@@ -910,9 +908,9 @@ static BOOL FetchInformationElements(Q931 &q931, const PBYTEArray &data)
return TRUE;
}
-static BOOL FetchCiscoTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
+static PBoolean FetchCiscoTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
{
- BOOL res = FALSE;
+ PBoolean res = FALSE;
const H225_H323_UU_PDU &uuPDU = pdu.m_h323_uu_pdu;
if(uuPDU.HasOptionalField(H225_H323_UU_PDU::e_nonStandardControl)) {
@@ -929,7 +927,7 @@ static BOOL FetchCiscoTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
CISCO_H225_H323_UU_NonStdInfo c;
PPER_Stream strm(data);
if (c.Decode(strm)) {
- BOOL haveIEs = FALSE;
+ PBoolean haveIEs = FALSE;
if (h323debug)
cout << setprecision(0) << "H323_UU_NonStdInfo = " << c << endl;
if (c.HasOptionalField(CISCO_H225_H323_UU_NonStdInfo::e_protoParam)) {
@@ -954,19 +952,19 @@ static BOOL FetchCiscoTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
return res;
}
-static BOOL EmbedCiscoTunneledInfo(H323SignalPDU &pdu)
+static PBoolean EmbedCiscoTunneledInfo(H323SignalPDU &pdu)
{
const static struct {
Q931::InformationElementCodes ie;
- BOOL dontDelete;
+ PBoolean dontDelete;
} codes[] = {
{ Q931::RedirectingNumberIE, },
{ Q931::FacilityIE, },
// { Q931::CallingPartyNumberIE, TRUE },
};
- BOOL res = FALSE;
- BOOL notRedirOnly = FALSE;
+ PBoolean res = FALSE;
+ PBoolean notRedirOnly = FALSE;
Q931 tmpQ931;
Q931 &q931 = pdu.GetQ931();
@@ -1024,9 +1022,9 @@ static BOOL EmbedCiscoTunneledInfo(H323SignalPDU &pdu)
static const char OID_QSIG[] = "1.3.12.9";
-static BOOL FetchQSIGTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
+static PBoolean FetchQSIGTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
{
- BOOL res = FALSE;
+ PBoolean res = FALSE;
const H225_H323_UU_PDU &uuPDU = pdu.m_h323_uu_pdu;
if (uuPDU.HasOptionalField(H225_H323_UU_PDU::e_tunnelledSignallingMessage)) {
const H225_H323_UU_PDU_tunnelledSignallingMessage &sig = uuPDU.m_tunnelledSignallingMessage;
@@ -1074,7 +1072,7 @@ static H225_EndpointType *GetEndpointType(H323SignalPDU &pdu)
return NULL;
}
-static BOOL QSIGTunnelRequested(H323SignalPDU &pdu)
+static PBoolean QSIGTunnelRequested(H323SignalPDU &pdu)
{
H225_EndpointType *epType = GetEndpointType(pdu);
if (epType) {
@@ -1093,7 +1091,7 @@ static BOOL QSIGTunnelRequested(H323SignalPDU &pdu)
return FALSE;
}
-static BOOL EmbedQSIGTunneledInfo(H323SignalPDU &pdu)
+static PBoolean EmbedQSIGTunneledInfo(H323SignalPDU &pdu)
{
const static Q931::InformationElementCodes codes[] =
{ Q931::RedirectingNumberIE, Q931::FacilityIE };
@@ -1118,7 +1116,7 @@ static BOOL EmbedQSIGTunneledInfo(H323SignalPDU &pdu)
(*epType).m_supportedTunnelledProtocols.SetSize(0);
}
H225_ArrayOf_TunnelledProtocol &protos = (*epType).m_supportedTunnelledProtocols;
- BOOL addQSIG = TRUE;
+ PBoolean addQSIG = TRUE;
for (int i = 0; i < protos.GetSize(); ++i)
{
if ((protos[i].GetTag() == H225_TunnelledProtocol_id::e_tunnelledProtocolObjectID) &&
@@ -1150,7 +1148,7 @@ static BOOL EmbedQSIGTunneledInfo(H323SignalPDU &pdu)
return TRUE;
}
-BOOL MyH323Connection::EmbedTunneledInfo(H323SignalPDU &pdu)
+PBoolean MyH323Connection::EmbedTunneledInfo(H323SignalPDU &pdu)
{
if ((tunnelOptions & H323_TUNNEL_QSIG) || (remoteTunnelOptions & H323_TUNNEL_QSIG))
EmbedQSIGTunneledInfo(pdu);
@@ -1161,7 +1159,7 @@ BOOL MyH323Connection::EmbedTunneledInfo(H323SignalPDU &pdu)
}
/* Handle tunneled messages */
-BOOL MyH323Connection::HandleSignalPDU(H323SignalPDU &pdu)
+PBoolean MyH323Connection::HandleSignalPDU(H323SignalPDU &pdu)
{
if (pdu.GetQ931().HasIE(Q931::UserUserIE)) {
Q931 tunneledInfo;
@@ -1196,7 +1194,7 @@ BOOL MyH323Connection::HandleSignalPDU(H323SignalPDU &pdu)
}
#endif
-BOOL MyH323Connection::OnReceivedSignalSetup(const H323SignalPDU & setupPDU)
+PBoolean MyH323Connection::OnReceivedSignalSetup(const H323SignalPDU & setupPDU)
{
call_details_t cd;
@@ -1232,7 +1230,7 @@ BOOL MyH323Connection::OnReceivedSignalSetup(const H323SignalPDU & setupPDU)
return H323Connection::OnReceivedSignalSetup(setupPDU);
}
-BOOL MyH323Connection::OnSendSignalSetup(H323SignalPDU & setupPDU)
+PBoolean MyH323Connection::OnSendSignalSetup(H323SignalPDU & setupPDU)
{
call_details_t cd;
@@ -1282,7 +1280,7 @@ BOOL MyH323Connection::OnSendSignalSetup(H323SignalPDU & setupPDU)
return H323Connection::OnSendSignalSetup(setupPDU);
}
-static BOOL BuildFastStartList(const H323Channel & channel,
+static PBoolean BuildFastStartList(const H323Channel & channel,
H225_ArrayOf_PASN_OctetString & array,
H323Channel::Directions reverseDirection)
{
@@ -1471,7 +1469,7 @@ H323Connection::CallEndReason MyH323Connection::SendSignalSetup(const PString &
signallingChannel->SetWriteTimeout(100);
- BOOL connectFailed = !signallingChannel->Connect();
+ PBoolean connectFailed = !signallingChannel->Connect();
// Lock while checking for shutting down.
if (!Lock())
@@ -1546,14 +1544,14 @@ H323Connection::CallEndReason MyH323Connection::SendSignalSetup(const PString &
setupPDU.GetQ931().GetCalledPartyNumber(remotePartyNumber);
fastStartState = FastStartDisabled;
- BOOL set_lastPDUWasH245inSETUP = FALSE;
+ PBoolean set_lastPDUWasH245inSETUP = FALSE;
if (h245Tunneling && doH245inSETUP) {
h245TunnelTxPDU = &setupPDU;
// Try and start the master/slave and capability exchange through the tunnel
// Note: this used to be disallowed but is now allowed as of H323v4
- BOOL ok = StartControlNegotiations();
+ PBoolean ok = StartControlNegotiations();
h245TunnelTxPDU = NULL;
@@ -1587,7 +1585,7 @@ H323Connection::CallEndReason MyH323Connection::SendSignalSetup(const PString &
}
-BOOL MyH323Connection::OnSendReleaseComplete(H323SignalPDU & releaseCompletePDU)
+PBoolean MyH323Connection::OnSendReleaseComplete(H323SignalPDU & releaseCompletePDU)
{
if (h323debug) {
cout << "\t-- Sending RELEASE COMPLETE" << endl;
@@ -1602,7 +1600,7 @@ BOOL MyH323Connection::OnSendReleaseComplete(H323SignalPDU & releaseCompletePDU)
return H323Connection::OnSendReleaseComplete(releaseCompletePDU);
}
-BOOL MyH323Connection::OnReceivedFacility(const H323SignalPDU & pdu)
+PBoolean MyH323Connection::OnReceivedFacility(const H323SignalPDU & pdu)
{
if (h323debug) {
cout << "\t-- Received Facility message... " << endl;
@@ -1620,7 +1618,7 @@ void MyH323Connection::OnReceivedReleaseComplete(const H323SignalPDU & pdu)
return H323Connection::OnReceivedReleaseComplete(pdu);
}
-BOOL MyH323Connection::OnClosingLogicalChannel(H323Channel & channel)
+PBoolean MyH323Connection::OnClosingLogicalChannel(H323Channel & channel)
{
if (h323debug) {
cout << "\t-- Closing logical channel..." << endl;
@@ -1693,7 +1691,7 @@ void MyH323Connection::OnSetLocalCapabilities()
on_setcapabilities(GetCallReference(), (const char *)callToken);
}
-BOOL MyH323Connection::OnReceivedCapabilitySet(const H323Capabilities & remoteCaps,
+PBoolean MyH323Connection::OnReceivedCapabilitySet(const H323Capabilities & remoteCaps,
const H245_MultiplexCapability * muxCap,
H245_TerminalCapabilitySetReject & reject)
{
@@ -1860,7 +1858,7 @@ H323Channel * MyH323Connection::CreateRealTimeLogicalChannel(const H323Capabilit
/** This callback function is invoked once upon creation of each
* channel for an H323 session
*/
-BOOL MyH323Connection::OnStartLogicalChannel(H323Channel & channel)
+PBoolean MyH323Connection::OnStartLogicalChannel(H323Channel & channel)
{
/* Increase the count of channels we have open */
channelsOpen++;
@@ -2036,7 +2034,7 @@ void MyH323Connection::SetCapabilities(int caps, int dtmf_mode, void *_prefs, in
}
}
-BOOL MyH323Connection::StartControlChannel(const H225_TransportAddress & h245Address)
+PBoolean MyH323Connection::StartControlChannel(const H225_TransportAddress & h245Address)
{
// Check that it is an IP address, all we support at the moment
if (h245Address.GetTag() != H225_TransportAddress::e_ipAddress
@@ -2092,7 +2090,7 @@ void MyH323Connection::OnReceivedLocalCallRetrieve(int linkedId)
}
#endif
-void MyH323Connection::MyHoldCall(BOOL isHold)
+void MyH323Connection::MyHoldCall(PBoolean isHold)
{
if (((holdHandling & H323_HOLD_NOTIFY) != 0) || ((holdHandling & H323_HOLD_Q931ONLY) != 0)) {
PBYTEArray x ((const BYTE *)(isHold ? "\xF9" : "\xFA"), 1);
@@ -2155,7 +2153,7 @@ MyH323_ExternalRTPChannel::~MyH323_ExternalRTPChannel()
}
}
-BOOL MyH323_ExternalRTPChannel::Start(void)
+PBoolean MyH323_ExternalRTPChannel::Start(void)
{
/* Call ancestor first */
if (!H323_ExternalRTPChannel::Start()) {
@@ -2182,7 +2180,7 @@ BOOL MyH323_ExternalRTPChannel::Start(void)
return TRUE;
}
-BOOL MyH323_ExternalRTPChannel::OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param)
+PBoolean MyH323_ExternalRTPChannel::OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param)
{
if (h323debug) {
cout << " MyH323_ExternalRTPChannel::OnReceivedAckPDU" << endl;
@@ -2580,7 +2578,7 @@ int h323_answering_call(const char *token, int busy)
int h323_soft_hangup(const char *data)
{
PString token(data);
- BOOL result;
+ PBoolean result;
cout << "Soft hangup" << endl;
result = endPoint->ClearCall(token);
return result;
@@ -2615,7 +2613,7 @@ int h323_hold_call(const char *token, int is_hold)
cout << "ERROR: No connection found, this is bad" << endl;
return -1;
}
- conn->MyHoldCall((BOOL)is_hold);
+ conn->MyHoldCall((PBoolean)is_hold);
conn->Unlock();
return 0;
}