Silence updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
8b257ef3b6
commit
7fe77f16a7
|
@ -676,6 +676,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int
|
||||||
free(sfmt[x]);
|
free(sfmt[x]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sildet = ast_dsp_new(); //Create the silence detector
|
||||||
if (silence > 0) {
|
if (silence > 0) {
|
||||||
rfmt = chan->readformat;
|
rfmt = chan->readformat;
|
||||||
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
|
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
|
||||||
|
@ -683,7 +684,6 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int
|
||||||
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
|
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
sildet = ast_dsp_new();
|
|
||||||
if (!sildet) {
|
if (!sildet) {
|
||||||
ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
|
ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue