ftmod_zt: B-Channels need to have audio mode disabled upon closing the channel.

Preparation for fixing channel handling for BRI PTMP (Point-To-MultiPoint) setups.

Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
This commit is contained in:
Stefan Knoblich 2010-11-14 23:38:16 +01:00
parent 0286af421b
commit c1517e99d1
1 changed files with 8 additions and 0 deletions

View File

@ -658,6 +658,14 @@ static FIO_OPEN_FUNCTION(zt_open)
*/
static FIO_CLOSE_FUNCTION(zt_close)
{
if (ftdmchan->type == FTDM_CHAN_TYPE_B) {
int value = 0; /* disable audio mode */
if (ioctl(ftdmchan->sockfd, codes.AUDIOMODE, &value)) {
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "%s", strerror(errno));
ftdm_log(FTDM_LOG_ERROR, "%s\n", ftdmchan->last_error);
return FTDM_FAIL;
}
}
return FTDM_SUCCESS;
}