[asterisk-commits] moy: branch 1.6.2 r217632 - in /branches/1.6.2: ./ channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 10 10:14:36 CDT 2009


Author: moy
Date: Thu Sep 10 10:14:33 2009
New Revision: 217632

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=217632
Log:
Merged revisions 217524 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r217524 | moy | 2009-09-09 17:48:04 -0400 (Wed, 09 Sep 2009) | 1 line
  
  ast_log replaced for ast_verbose in MFCR2 event notifications
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/channels/chan_dahdi.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/channels/chan_dahdi.c?view=diff&rev=217632&r1=217631&r2=217632
==============================================================================
--- branches/1.6.2/channels/chan_dahdi.c (original)
+++ branches/1.6.2/channels/chan_dahdi.c Thu Sep 10 10:14:33 2009
@@ -1680,7 +1680,7 @@
 	p->mfcr2_answer_pending = 0;
 	p->mfcr2_call_accepted = 0;
 	ast_mutex_unlock(&p->lock);
-	ast_log(LOG_NOTICE, "New MFC/R2 call detected on chan %d.\n", openr2_chan_get_number(r2chan));
+	ast_verbose("New MFC/R2 call detected on chan %d.\n", openr2_chan_get_number(r2chan));
 }
 
 static int get_alarms(struct dahdi_pvt *p);
@@ -1754,7 +1754,7 @@
 {
 	struct dahdi_pvt *p;
 	struct ast_channel *c;
-	ast_log(LOG_NOTICE, "MFC/R2 call offered on chan %d. ANI = %s, DNIS = %s, Category = %s\n",
+	ast_verbose("MFC/R2 call offered on chan %d. ANI = %s, DNIS = %s, Category = %s\n",
 			openr2_chan_get_number(r2chan), ani ? ani : "(restricted)", dnis,
 			openr2_proto_get_category_string(category));
 	p = openr2_chan_get_client_data(r2chan);
@@ -1809,7 +1809,7 @@
 static void dahdi_r2_on_call_end(openr2_chan_t *r2chan)
 {
 	struct dahdi_pvt *p = openr2_chan_get_client_data(r2chan);
-	ast_log(LOG_NOTICE, "MFC/R2 call end on chan %d\n", p->channel);
+	ast_verbose("MFC/R2 call end on channel %d\n", p->channel);
 	ast_mutex_lock(&p->lock);
 	p->mfcr2call = 0;
 	ast_mutex_unlock(&p->lock);
@@ -1820,12 +1820,12 @@
 {
 	struct dahdi_pvt *p = NULL;
 	struct ast_channel *c = NULL;
-	ast_log(LOG_NOTICE, "MFC/R2 call has been accepted on chan %d\n", openr2_chan_get_number(r2chan));
 	p = openr2_chan_get_client_data(r2chan);
 	dahdi_enable_ec(p);
 	p->mfcr2_call_accepted = 1;
 	/* if it's an incoming call ... */
 	if (OR2_DIR_BACKWARD == openr2_chan_get_direction(r2chan)) {
+		ast_verbose("MFC/R2 call has been accepted on backward channel %d\n", openr2_chan_get_number(r2chan));
 		/* If accept on offer is not set, it means at this point the PBX thread is already
 		   launched (was launched in the 'on call offered' handler) and therefore this callback
 		   is being executed already in the PBX thread rather than the monitor thread, don't launch
@@ -1852,18 +1852,17 @@
 		return;
 	}
 	/* this is an outgoing call, no need to launch the PBX thread, most likely we're in one already */
-	ast_log(LOG_NOTICE, "Call accepted on forward channel %d\n", p->channel);
+	ast_verbose("MFC/R2 call has been accepted on forward channel %d\n", p->channel);
 	p->subs[SUB_REAL].needringing = 1;
 	p->dialing = 0;
-	/* chan_dahdi will take care of reading from now on in the PBX thread, tell the
-	   library to forget about it */
+	/* chan_dahdi will take care of reading from now on in the PBX thread, tell the library to forget about it */
 	openr2_chan_disable_read(r2chan);
 }
 
 static void dahdi_r2_on_call_answered(openr2_chan_t *r2chan)
 {
 	struct dahdi_pvt *p = openr2_chan_get_client_data(r2chan);
-	ast_log(LOG_DEBUG, "MFC/R2 call has been answered on chan %d\n", openr2_chan_get_number(r2chan));
+	ast_verbose("MFC/R2 call has been answered on channel %d\n", openr2_chan_get_number(r2chan));
 	p->subs[SUB_REAL].needanswer = 1;
 }
 
@@ -1896,7 +1895,7 @@
 static void dahdi_r2_on_call_disconnect(openr2_chan_t *r2chan, openr2_call_disconnect_cause_t cause)
 {
 	struct dahdi_pvt *p = openr2_chan_get_client_data(r2chan);
-	ast_verb(3, "MFC/R2 call disconnected on chan %d\n", openr2_chan_get_number(r2chan));
+	ast_verbose("MFC/R2 call disconnected on channel %d\n", openr2_chan_get_number(r2chan));
 	ast_mutex_lock(&p->lock);
 	if (!p->owner) {
 		ast_mutex_unlock(&p->lock);
@@ -1939,7 +1938,7 @@
 {
 	switch (level) {
 	case OR2_LOG_NOTICE:
-		ast_log(LOG_NOTICE, "%s", logmessage);
+		ast_verbose("%s", logmessage);
 		break;
 	case OR2_LOG_WARNING:
 		ast_log(LOG_WARNING, "%s", logmessage);
@@ -2036,6 +2035,11 @@
 	p->cid_name[p->mfcr2_ani_index] = 0;
 }
 
+static void dahdi_r2_on_billing_pulse_received(openr2_chan_t *r2chan)
+{
+	ast_verbose("MFC/R2 billing pulse received on channel %d\n", openr2_chan_get_number(r2chan));
+}
+
 static openr2_event_interface_t dahdi_r2_event_iface = {
 	.on_call_init = dahdi_r2_on_call_init,
 	.on_call_offered = dahdi_r2_on_call_offered,
@@ -2054,7 +2058,7 @@
 	.on_dnis_digit_received = dahdi_r2_on_dnis_digit_received,
 	.on_ani_digit_received = dahdi_r2_on_ani_digit_received,
 	/* so far we do nothing with billing pulses */
-	.on_billing_pulse_received = NULL
+	.on_billing_pulse_received = dahdi_r2_on_billing_pulse_received
 };
 
 static inline int16_t dahdi_r2_alaw_to_linear(uint8_t sample)




More information about the asterisk-commits mailing list