[asterisk-commits] mmichelson: branch group/CCSS r235129 - /team/group/CCSS/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 15 10:41:24 CST 2009


Author: mmichelson
Date: Tue Dec 15 10:41:22 2009
New Revision: 235129

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=235129
Log:
Queue a CC frame along with the initial ringing frame when dialing an analog device.

This allows for CCNR to be requested of an analog device. An additional change added
with this revision was to make dahdi_queryoption return -1 if it does not implement
a specific option. This was necessary to prevent the use of uninitialized memory when
queueing a CC frame.


Modified:
    team/group/CCSS/channels/chan_dahdi.c
    team/group/CCSS/channels/sig_analog.c

Modified: team/group/CCSS/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_dahdi.c?view=diff&rev=235129&r1=235128&r2=235129
==============================================================================
--- team/group/CCSS/channels/chan_dahdi.c (original)
+++ team/group/CCSS/channels/chan_dahdi.c Tue Dec 15 10:41:22 2009
@@ -5924,6 +5924,8 @@
 		*cp = (p->callprogress & CALLPROGRESS_FAX) ? 0 : 1;
 		ast_debug(1, "Reporting fax tone detection %sabled on %s\n", *cp ? "en" : "dis", chan->name);
 		break;
+	default:
+		return -1;
 	}
 
 	errno = 0;

Modified: team/group/CCSS/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/sig_analog.c?view=diff&rev=235129&r1=235128&r2=235129
==============================================================================
--- team/group/CCSS/channels/sig_analog.c (original)
+++ team/group/CCSS/channels/sig_analog.c Tue Dec 15 10:41:22 2009
@@ -939,6 +939,12 @@
 		ast_setstate(ast, AST_STATE_RINGING);
 		index = analog_get_index(ast, p, 0);
 		if (index > -1) {
+			/* This is where the initial ringing frame is queued for an analog call.
+			 * As such, this is a great time to offer CCNR to the caller if it's available.
+			 */
+			if (ast_get_cc_monitor_policy(ast_channel_get_cc_config_params(p->subs[index].owner)) == AST_CC_MONITOR_GENERIC) {
+				ast_queue_cc_frame(p->subs[index].owner, AST_CC_GENERIC_MONITOR_TYPE, AST_CC_CCNR);
+			}
 			ast_queue_control(p->subs[index].owner, AST_CONTROL_RINGING);
 		}
 		break;




More information about the asterisk-commits mailing list