[svn-commits] branch crichter/0.3.0 r33010 -
/team/crichter/0.3.0/channels/chan_misdn.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Thu Jun 8 02:46:54 MST 2006
Author: crichter
Date: Thu Jun 8 04:46:54 2006
New Revision: 33010
URL: http://svn.digium.com/view/asterisk?rev=33010&view=rev
Log:
Fixed detection of dtmfs with bridged channels.
Modified:
team/crichter/0.3.0/channels/chan_misdn.c
Modified: team/crichter/0.3.0/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/chan_misdn.c?rev=33010&r1=33009&r2=33010&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Thu Jun 8 04:46:54 2006
@@ -158,8 +158,10 @@
int norxtone;
int notxtone;
-
+
int incoming_early_audio;
+
+ int ignore_dtmf;
int pipe[2];
char ast_rd_buf[4096];
@@ -2186,6 +2188,14 @@
}
chan_misdn_log(1, ch1->bc->port, "* Making Native Bridge between %s and %s\n", ch1->bc->oad, ch2->bc->oad);
+
+
+ if (! (flags&AST_BRIDGE_DTMF_CHANNEL_0) )
+ ch1->ignore_dtmf=1;
+
+ if (! (flags&AST_BRIDGE_DTMF_CHANNEL_1) )
+ ch2->ignore_dtmf=1;
+
while(1) {
to=-1;
@@ -2204,8 +2214,16 @@
break;
}
-
-
+
+ if ( f->frametype == AST_FRAME_DTMF ) {
+ chan_misdn_log(1,0,"Read DTMF %d from %s\n",f->subclass, who->exten);
+
+ *fo=f;
+ *rc=who;
+ break;
+ }
+
+
if (who == c0) {
ast_write(c1,f);
}
@@ -2214,8 +2232,13 @@
}
}
-
- return 0;
+
+ chan_misdn_log(1, ch1->bc->port, "I SEND: Splitting conference with Number:%d\n", ch1->bc->pid +1);
+
+ misdn_lib_split_bridge(ch1->bc,ch2->bc);
+
+
+ return AST_BRIDGE_COMPLETE;
}
/** AST INDICATIONS END **/
@@ -3077,9 +3100,12 @@
fr.mallocd =0 ;
fr.offset= 0 ;
- chan_misdn_log(2, bc->port, " --> DTMF:%c\n", bc->dtmf);
-
- ast_queue_frame(ch->ast, &fr);
+ if (!ch->ignore_dtmf) {
+ chan_misdn_log(2, bc->port, " --> DTMF:%c\n", bc->dtmf);
+ ast_queue_frame(ch->ast, &fr);
+ } else {
+ chan_misdn_log(2, bc->port, " --> Ingoring DTMF:%c due to bridge flags\n", bc->dtmf);
+ }
}
break;
case EVENT_STATUS:
More information about the svn-commits
mailing list