[Asterisk-cvs] asterisk/channels chan_h323.c,1.38,1.39

jeremy at lists.digium.com jeremy at lists.digium.com
Mon Apr 5 16:45:06 CDT 2004


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

Modified Files:
	chan_h323.c 
Log Message:
on outbound calls make sure we use requested codec


Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- chan_h323.c	27 Mar 2004 07:41:33 -0000	1.38
+++ chan_h323.c	5 Apr 2004 20:45:14 -0000	1.39
@@ -94,23 +94,23 @@
 struct oh323_pvt {
 	ast_mutex_t lock;					/* Channel private lock */
 	call_options_t calloptions;				/* Options to be used during call setup */
-	int	alreadygone;						/* Whether or not we've already been destroyed by or peer */
-	int needdestroy;						/* if we need to be destroyed */
-	call_details_t cd;						/* Call details */
+	int alreadygone;					/* Whether or not we've already been destroyed by or peer */
+	int needdestroy;					/* if we need to be destroyed */
+	call_details_t cd;					/* Call details */
 	struct ast_channel *owner;				/* Who owns us */
-	int capability;							/* Special capability */
-	int nonCodecCapability;
-	int outgoing;							/* Outgoing or incoming call? */
-	int nat;								/* Are we talking to a NAT EP?*/
-	int bridge;								/* Determine of we should native bridge or not*/
-	char exten[AST_MAX_EXTENSION];			/* Requested extension */
-	char context[AST_MAX_EXTENSION];		/* Context where to start */
-	char username[81];						/* H.323 alias using this channel */
+	int capability;						/* audio capability */
+	int nonCodecCapability;					/* non-audio capability */
+	int outgoing;						/* Outgoing or incoming call? */
+	int nat;						/* Are we talking to a NAT EP?*/
+	int bridge;						/* Determine of we should native bridge or not*/
+	char exten[AST_MAX_EXTENSION];				/* Requested extension */
+	char context[AST_MAX_EXTENSION];			/* Context where to start */
+	char username[81];					/* H.323 alias using this channel */
 	char accountcode[256];					/* Account code */
-	int amaflags;							/* AMA Flags */
-	char callerid[80];						/* Caller*ID if available */
+	int amaflags;						/* AMA Flags */
+	char callerid[80];					/* Caller*ID if available */
 	struct ast_rtp *rtp;					/* RTP Session */
-	int dtmfmode;
+	int dtmfmode;						/* What DTMF Mode is being used */
 	struct ast_dsp *vad;					/* Used for in-band DTMF detection */
 	struct oh323_pvt *next;					/* Next channel in list */
 } *iflist = NULL;
@@ -805,7 +805,6 @@
 		h323_set_id(h323id);
 	}
 		
-	
 	p = oh323_alloc(0);
 
 	if (!p) {
@@ -815,13 +814,15 @@
 
 	/* Assign a default capability */
 	p->capability = capability;
-
+	
 	if (p->dtmfmode) {
 		if (p->dtmfmode & H323_DTMF_RFC2833)
 			p->nonCodecCapability |= AST_RTP_DTMF;
 		else
 			p->nonCodecCapability &= ~AST_RTP_DTMF;
 	}
+	/* pass on our preferred codec to the H.323 stack */
+	h323_set_capability(format, dtmfmode);
 
 	if (ext) {
 		strncpy(p->username, ext, sizeof(p->username) - 1);
@@ -1435,7 +1436,7 @@
 	struct oh323_alias *alias = NULL;
 	struct hostent *hp;
 	char *cat;
-    char *utype;
+    	char *utype;
 	
 	cfg = ast_load(config);
 




More information about the svn-commits mailing list