summaryrefslogtreecommitdiff
path: root/channels/h323/ast_h323.cxx
diff options
context:
space:
mode:
authorJeff Peeler <jpeeler@digium.com>2009-02-18 20:11:57 +0000
committerJeff Peeler <jpeeler@digium.com>2009-02-18 20:11:57 +0000
commitc8fe75da36d72d2fdc5ba2d0aa4031e713a1fe22 (patch)
treefd86877953d39fc69ebad3a8bb60d2f6b47635e7 /channels/h323/ast_h323.cxx
parent0fb9712a0ad6f997370e7804845dc6efd9fc3bce (diff)
Modify h323 to build against PTLib as well as the older PWLib
Several changes in PTLib have occurred requiring build time detection. Changes accounted for include the library name change, config option change, install location change, and a boolean type change which is handled by ast_ptlib.h. Also, the sed check has been modified to properly work with autoconf >= 2.62. (closes issue #14224) Reported by: bergolth Patches: asterisk-autoconf-sed.patch uploaded by bergolth (license 661) asterisk-pwlib-v3.patch uploaded by bergolth (license 661) Tested by: jpeeler git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 d61006800..425961435 100644
--- a/channels/h323/ast_h323.cxx
+++ b/channels/h323/ast_h323.cxx
@@ -66,8 +66,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
@@ -334,7 +332,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
@@ -346,7 +344,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;
@@ -374,7 +372,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)
{
@@ -384,7 +382,7 @@ BOOL MyH323EndPoint::OnConnectionForwarded(H323Connection & connection,
return FALSE;
}
-BOOL MyH323EndPoint::ForwardConnection(H323Connection & connection,
+PBoolean MyH323EndPoint::ForwardConnection(H323Connection & connection,
const PString & forwardParty,
const H323SignalPDU & pdu)
{
@@ -588,9 +586,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)) {
@@ -616,7 +614,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 */
@@ -696,7 +694,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()
@@ -705,7 +703,7 @@ BOOL MyH323Connection::OnAlerting(const H323SignalPDU & alertingPDU, const PStri
}
if (on_progress) {
- BOOL isInband;
+ PBoolean isInband;
unsigned alertingPI;
if (!alertingPDU.GetQ931().GetProgressIndicator(alertingPI)) {
@@ -729,7 +727,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;
@@ -760,7 +758,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;
@@ -855,7 +853,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;
@@ -913,9 +911,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)) {
@@ -932,7 +930,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)) {
@@ -957,19 +955,19 @@ static BOOL FetchCiscoTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
return res;
}
-static BOOL EmbedCiscoTunneledInfo(H323SignalPDU &pdu)
+static PBoolean EmbedCiscoTunneledInfo(H323SignalPDU &pdu)
{
static const 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();
@@ -1027,9 +1025,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;
@@ -1077,7 +1075,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) {
@@ -1096,7 +1094,7 @@ static BOOL QSIGTunnelRequested(H323SignalPDU &pdu)
return FALSE;
}
-static BOOL EmbedQSIGTunneledInfo(H323SignalPDU &pdu)
+static PBoolean EmbedQSIGTunneledInfo(H323SignalPDU &pdu)
{
static const Q931::InformationElementCodes codes[] =
{ Q931::RedirectingNumberIE, Q931::FacilityIE };
@@ -1121,7 +1119,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) &&
@@ -1153,7 +1151,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);
@@ -1164,7 +1162,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;
@@ -1199,7 +1197,7 @@ BOOL MyH323Connection::HandleSignalPDU(H323SignalPDU &pdu)
}
#endif
-BOOL MyH323Connection::OnReceivedSignalSetup(const H323SignalPDU & setupPDU)
+PBoolean MyH323Connection::OnReceivedSignalSetup(const H323SignalPDU & setupPDU)
{
call_details_t cd;
@@ -1235,7 +1233,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;
@@ -1285,7 +1283,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)
{
@@ -1474,7 +1472,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())
@@ -1549,14 +1547,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;
@@ -1590,7 +1588,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;
@@ -1605,7 +1603,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;
@@ -1623,7 +1621,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;
@@ -1696,7 +1694,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)
{
@@ -1863,7 +1861,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++;
@@ -2039,7 +2037,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
@@ -2095,7 +2093,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);
@@ -2158,7 +2156,7 @@ MyH323_ExternalRTPChannel::~MyH323_ExternalRTPChannel()
}
}
-BOOL MyH323_ExternalRTPChannel::Start(void)
+PBoolean MyH323_ExternalRTPChannel::Start(void)
{
/* Call ancestor first */
if (!H323_ExternalRTPChannel::Start()) {
@@ -2185,7 +2183,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;
@@ -2583,7 +2581,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;
@@ -2618,7 +2616,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;
}