[asterisk-commits] crichter: branch 1.2 r49303 - in
/branches/1.2/channels: ./ misdn/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jan 3 01:24:01 MST 2007
Author: crichter
Date: Wed Jan 3 02:24:00 2007
New Revision: 49303
URL: http://svn.digium.com/view/asterisk?view=rev&rev=49303
Log:
* Added check for bridging in misdn_call to avoid setting echocancellation
when 2 mISDN channels are involved and when bridging is set. That lead
to a kernel panic before under different situations, because we switched
about 2 times between hardware bridging and echocancelation
* readded MISDN_URATE variable which got lost before, this should make app_v110
work again
* fixed typo
Modified:
branches/1.2/channels/chan_misdn.c
branches/1.2/channels/misdn/isdn_lib.c
Modified: branches/1.2/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_misdn.c?view=diff&rev=49303&r1=49302&r2=49303
==============================================================================
--- branches/1.2/channels/chan_misdn.c (original)
+++ branches/1.2/channels/chan_misdn.c Wed Jan 3 02:24:00 2007
@@ -1694,6 +1694,15 @@
misdn_set_opt_exec(ast,opts);
else
chan_misdn_log(2,port,"NO OPTS GIVEN\n");
+
+ /*check for bridging*/
+ int bridging;
+ misdn_cfg_get( 0, MISDN_GEN_BRIDGING, &bridging, sizeof(int));
+ if (bridging && ch->other_ch) {
+ chan_misdn_log(0, port, "Disabling EC on both Sides\n");
+ ch->bc->ec_enable=0;
+ ch->other_ch->bc->ec_enable=0;
+ }
r=misdn_lib_send_event( newbc, EVENT_SETUP );
@@ -1769,7 +1778,6 @@
}
p->state = MISDN_CONNECTED;
- misdn_lib_echo(p->bc,0);
stop_indicate(p);
if ( ast_strlen_zero(p->bc->cad) ) {
@@ -2316,27 +2324,12 @@
if (ch1 && ch2 ) ;
else
return -1;
-
int bridging;
misdn_cfg_get( 0, MISDN_GEN_BRIDGING, &bridging, sizeof(int));
if (bridging) {
- int ec;
- misdn_cfg_get( ch1->bc->port, MISDN_CFG_ECHOCANCEL, &ec, sizeof(int));
- if ( ec ) {
- chan_misdn_log(2, ch1->bc->port, "Disabling Echo Cancellor when Bridged\n");
- ch1->bc->ec_enable=0;
- manager_ec_disable(ch1->bc);
- }
- misdn_cfg_get( ch2->bc->port, MISDN_CFG_ECHOCANCEL, &ec, sizeof(int));
- if ( ec ) {
- chan_misdn_log(2, ch2->bc->port, "Disabling Echo Cancellor when Bridged\n");
- ch2->bc->ec_enable=0;
- manager_ec_disable(ch2->bc);
- }
/* trying to make a mISDN_dsp conference */
chan_misdn_log(1, ch1->bc->port, "I SEND: Making conference with Number:%d\n", ch1->bc->pid +1);
-
misdn_lib_bridge(ch1->bc,ch2->bc);
}
@@ -3229,6 +3222,11 @@
sprintf(tmp,"%d",bc->sending_complete);
pbx_builtin_setvar_helper(chan,"MISDN_ADDRESS_COMPLETE",tmp);
}
+
+ if (bc->urate) {
+ sprintf(tmp,"%d",bc->urate);
+ pbx_builtin_setvar_helper(chan,"MISDN_URATE",tmp);
+ }
}
@@ -3243,7 +3241,6 @@
if (event != EVENT_BCHAN_DATA && event != EVENT_TONE_GENERATE) { /* Debug Only Non-Bchan */
int debuglevel=1;
-
if ( event==EVENT_CLEANUP && !user_data)
debuglevel=5;
@@ -3787,8 +3784,6 @@
misdn_lib_send_event(bc,EVENT_CONNECT_ACKNOWLEDGE);
struct ast_channel *bridged=AST_BRIDGED_P(ch->ast);
-
- misdn_lib_echo(bc,0);
stop_indicate(ch);
if (bridged && !strcasecmp(bridged->tech->type,"mISDN")) {
Modified: branches/1.2/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/misdn/isdn_lib.c?view=diff&rev=49303&r1=49302&r2=49303
==============================================================================
--- branches/1.2/channels/misdn/isdn_lib.c (original)
+++ branches/1.2/channels/misdn/isdn_lib.c Wed Jan 3 02:24:00 2007
@@ -448,7 +448,7 @@
int empty_chan_in_stack(struct misdn_stack *stack, int channel)
{
if (channel<=0 || channel>=MAX_BCHANS) {
- cb_log(0,stack?stack->port:0, "empty_chan_inst_stack: cannot empty channel %d\n",channel);
+ cb_log(0,stack?stack->port:0, "empty_chan_in_stack: cannot empty channel %d\n",channel);
return -1;
}
@@ -3575,6 +3575,7 @@
if (bc) {
manager_clean_bc(bc);
}
+ return 0;
}
int misdn_lib_port_restart(int port)
More information about the asterisk-commits
mailing list