[Asterisk-cvs] asterisk/channels/h323 Makefile, 1.20, 1.21 ast_h323.cpp, 1.66, 1.67 ast_h323.h, 1.30, 1.31 chan_h323.h, 1.35, 1.36 h323.conf.sample, 1.12, 1.13

jeremy at lists.digium.com jeremy at lists.digium.com
Wed Dec 15 21:06:41 CST 2004


Update of /usr/cvsroot/asterisk/channels/h323
In directory mongoose.digium.com:/tmp/cvs-serv966/h323

Modified Files:
	Makefile ast_h323.cpp ast_h323.h chan_h323.h h323.conf.sample 
Log Message:
Properly deal with Caller*ID, document the new RTP Payload setting, remove compiler option that may confuse g++ and force chan_h323.so to be relinked on every compile

Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/Makefile,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- Makefile	15 Nov 2004 00:41:25 -0000	1.20
+++ Makefile	16 Dec 2004 02:03:19 -0000	1.21
@@ -37,11 +37,11 @@
 #
 OSARCH=$(shell uname -s)
 CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
-CFLAGS += -pipe -Wall -fPIC -Wmissing-prototypes -Wmissing-declarations 
+CFLAGS += -pipe -Wall -fPIC -Wmissing-prototypes
 CFLAGS += -D_REENTRANT -D_GNU_SOURCE
 CFLAGS += -I../../include
 CFLAGS += -I$(PWLIBDIR)/include 
-CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes -Wno-missing-declarations
+CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes
 
 all:	depend libchanh323.a
 
@@ -54,6 +54,7 @@
 
 libchanh323.a:	ast_h323.o
 	ar cr libchanh323.a ast_h323.o
+	touch ../chan_h323.c
 
 ast_h323.o:	ast_h323.cpp
 	$(CXX) -g -c -o $@ $(CFLAGS) $<

Index: ast_h323.cpp
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- ast_h323.cpp	15 Dec 2004 23:24:13 -0000	1.66
+++ ast_h323.cpp	16 Dec 2004 02:03:19 -0000	1.67
@@ -237,16 +237,15 @@
 		return 1;
 	}
 	*callReference = connection->GetCallReference();	
+
+	if (opts->cid_num) {
+		connection->ast_cid_num = PString(opts->cid_num);
+	}
 	if (opts->cid_name) {
-                localAliasNames.RemoveAll();
-		connection->SetLocalPartyName(PString(opts->cid_name));
-	        if (opts->cid_num) {
-                	localAliasNames.AppendString(PString(opts->cid_num));
-		}
-        } else if (opts->cid_num) {
-                localAliasNames.RemoveAll();
-                connection->SetLocalPartyName(PString(opts->cid_num));
-        }
+		connection->ast_cid_name = PString(opts->cid_name);
+		connection->SetLocalPartyName(connection->ast_cid_name);
+	}
+
 	connection->dtmfCodec = (RTP_DataFrame::PayloadTypes)opts->dtmfcodec;
 
 	if (h323debug) {
@@ -700,6 +699,15 @@
 	if (h323debug) { 
 		cout << "	-- Sending SETUP message" << endl;
 	}
+
+	if (!ast_cid_num.IsEmpty()) {
+		setupPDU.GetQ931().SetCallingPartyNumber(ast_cid_num);
+	}
+
+	if (!ast_cid_name.IsEmpty()) {
+		setupPDU.GetQ931().SetDisplayName(ast_cid_name);
+	}
+
 	sourceAliases = setupPDU.GetSourceAliases();
 	destAliases = setupPDU.GetDestinationAlias();
 

Index: ast_h323.h
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- ast_h323.h	15 Dec 2004 23:24:13 -0000	1.30
+++ ast_h323.h	16 Dec 2004 02:03:19 -0000	1.31
@@ -188,6 +188,9 @@
 	unsigned progressAlert;
 
 	RTP_DataFrame::PayloadTypes dtmfCodec;
+
+	PString ast_cid_num;
+	PString ast_cid_name;
 };
 
 class MyH323_ExternalRTPChannel : public H323_ExternalRTPChannel {

Index: chan_h323.h
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/chan_h323.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- chan_h323.h	15 Dec 2004 23:24:13 -0000	1.35
+++ chan_h323.h	16 Dec 2004 02:03:19 -0000	1.36
@@ -31,8 +31,8 @@
 /** call_option struct holds various bits
  *         of information for each call */
 typedef struct call_options {
-	char            *cid_num;
-	char            *cid_name;
+	char            cid_num[80];
+	char            cid_name[80];
 	int             noFastStart;
 	int             noH245Tunneling;
 	int             noSilenceSuppression;

Index: h323.conf.sample
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/h323.conf.sample,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- h323.conf.sample	14 Oct 2004 05:32:07 -0000	1.12
+++ h323.conf.sample	16 Dec 2004 02:03:19 -0000	1.13
@@ -31,6 +31,13 @@
 ; default is rfc2833
 ;dtmfmode=rfc2833
 ;
+; Default RTP Payload to send RFC2833 DTMF on.  This is used to
+; interoperate with broken gateways which cannot successfully
+; negotiate a RFC2833 payload type in the TerminalCapabilitySet.
+;
+; You may also specify on either a per-peer or per-user basis below.
+;dtmfcodec=101
+;
 ; Set the gatekeeper 
 ; DISCOVER			- Find the Gk address using multicast
 ; DISABLE			- Disable the use of a GK




More information about the svn-commits mailing list