[svn-commits] may: branch may/chan_ooh323_rework r209445 - /team/may/chan_ooh323_rework/add...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jul 28 18:59:12 CDT 2009


Author: may
Date: Tue Jul 28 18:59:08 2009
New Revision: 209445

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=209445
Log:
small changes to normalize format info for asterisk

Modified:
    team/may/chan_ooh323_rework/addons/chan_ooh323.c

Modified: team/may/chan_ooh323_rework/addons/chan_ooh323.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/may/chan_ooh323_rework/addons/chan_ooh323.c?view=diff&rev=209445&r1=209444&r2=209445
==============================================================================
--- team/may/chan_ooh323_rework/addons/chan_ooh323.c (original)
+++ team/may/chan_ooh323_rework/addons/chan_ooh323.c Tue Jul 28 18:59:08 2009
@@ -333,7 +333,6 @@
 			fmt = ast_best_codec(capability);
 
 		ch->nativeformats = ch->rawwriteformat = ch->rawreadformat = fmt;
-		/* ch->nativeformats = (capability) ? 0 : AST_FORMAT_SLINEAR; */
 
 		ast_channel_set_fd(ch, 0, ast_rtp_instance_fd(i->rtp, 0));
 		ast_channel_set_fd(ch, 1, ast_rtp_instance_fd(i->rtp, 1));
@@ -343,7 +342,8 @@
 			ch->rings = 1;
 
 		ch->adsicpe = AST_ADSI_UNAVAILABLE;
-		fmt = ast_best_codec(capability);
+		if (capability)
+			fmt = ast_best_codec(capability);
 		ast_set_write_format(ch, fmt);
 		ast_set_read_format(ch, fmt);
 		ch->tech_pvt = i;
@@ -589,11 +589,7 @@
 		if (ext)
 			ast_copy_string(p->exten, ext, sizeof(p->exten));
 
-		/* if (peer->capability & format) {
-			p->capability = peer->capability & format;
-		} else { */
-		  p->capability = peer->capability;
-		/* } */
+		p->capability = peer->capability;
 		memcpy(&p->prefs, &peer->prefs, sizeof(struct ast_codec_pref));
 		p->dtmfmode |= peer->dtmfmode;
 		p->t38support = peer->t38support;
@@ -1725,7 +1721,7 @@
 	configure_local_rtp(p, call);
 
 /* Incoming call */
-  	c = ooh323_new(p, AST_STATE_RING, p->username, p->capability, NULL);
+  	c = ooh323_new(p, AST_STATE_RING, p->username, 0, NULL);
   	if(!c) {
    	ast_mutex_unlock(&p->lock);
    	ast_log(LOG_ERROR, "Could not create ast_channel\n");
@@ -4221,10 +4217,10 @@
 			if (gH323Debug)
 				ast_debug(1,"Going to change native format for %s\n", call->callToken);
 			p->owner->nativeformats = AST_FORMAT_SLINEAR;
-			p->owner->readformat = AST_FORMAT_SLINEAR;
-			p->owner->writeformat = AST_FORMAT_SLINEAR;
-			ast_set_read_format(p->owner, p->owner->readformat);
-			ast_set_write_format(p->owner, p->owner->writeformat);
+			p->owner->rawreadformat = AST_FORMAT_SLINEAR;
+			p->owner->rawwriteformat = AST_FORMAT_SLINEAR;
+			ast_set_read_format(p->owner, p->owner->rawreadformat);
+			ast_set_write_format(p->owner, p->owner->rawwriteformat);
 			p->faxmode = 1;
 			ast_settimeout(p->owner, 34, t30_read, p->owner);
 			p->lastTxT38 = time(NULL);




More information about the svn-commits mailing list