Reset EC if hold reported by netwwork

This commit is contained in:
MelwareDE 2010-11-10 14:07:51 +00:00
parent 9f1b2b83cc
commit e0484c4db5
3 changed files with 14 additions and 2 deletions

View File

@ -577,7 +577,7 @@ static void capi_facility_add_datetime(unsigned char *facilityarray)
/* /*
* Echo cancellation is for cards w/ integrated echo cancellation only * Echo cancellation is for cards w/ integrated echo cancellation only
*/ */
static void capi_echo_canceller(struct capi_pvt *i, int function) void capi_echo_canceller(struct capi_pvt *i, int function)
{ {
int ecAvail = 0; int ecAvail = 0;

View File

@ -809,6 +809,11 @@ void pbx_capi_unlock_interfaces(void);
*/ */
int pbx_capi_cli_exec_capicommand(struct ast_channel *chan, const char *data); int pbx_capi_cli_exec_capicommand(struct ast_channel *chan, const char *data);
/*!
\brief EC control
*/
void capi_echo_canceller(struct capi_pvt *i, int function);
#ifdef DIVA_STREAMING #ifdef DIVA_STREAMING
struct _diva_streaming_vector; struct _diva_streaming_vector;
void capidev_handle_data_b3_indication_vector (struct capi_pvt *i, void capidev_handle_data_b3_indication_vector (struct capi_pvt *i,

View File

@ -640,11 +640,18 @@ int handle_facility_indication_supplementary(
#endif #endif
} }
} else { } else {
cc_verbose(4, 0, VERBOSE_PREFIX_1 "CAPI%u Rx MWI %s for '%s@default %s %s time '%s' service %d", cc_verbose(4, 0, VERBOSE_PREFIX_1 "CAPI%u Rx MWI %s for '%s@default %s %s time '%s' service %d\n",
messageStatus == 0 ? "add" : "del", mailboxName, controllingUserNumberName, controllingUserProvidedNumberName, messageStatus == 0 ? "add" : "del", mailboxName, controllingUserNumberName, controllingUserProvidedNumberName,
mwiTimeName, basicService); mwiTimeName, basicService);
} }
} return ret; } return ret;
case 0x8000: /* Hold notification */
if ((i->isdnstate & CAPI_ISDN_STATE_EC) != 0) {
cc_verbose(4, 0, VERBOSE_PREFIX_1 "%s: EC reset\n", i->vname);
capi_echo_canceller(i, EC_FUNCTION_DISABLE);
capi_echo_canceller(i, EC_FUNCTION_ENABLE);
}
return ret;
default: default:
break; break;