[asterisk-dev] EAGI audio format
John Fawcett
john.ml at erba.tv
Sun Jun 19 10:41:56 CDT 2016
On 06/19/2016 02:21 PM, John Fawcett wrote:
> Hi
>
> I noticed that the audio format provided in the file descriptor 3 to an
> EAGI script, at least on my Asterisk 13.9.1 system, always seems to be
> slin - taken from the CHANNEL(audioreadformat) variable. Is it possible
> to change the format of the audio sent to EAGI, for example using sln48?
>
> Looking through the code I could not see where the audioreadformat for
> EAGI was being decided.
>
> thanks for any help
>
> John
>
>
>
H
just following up, I found it:
--- res/res_agi.c.original 2016-06-19 17:39:06.554220638 +0200
+++ res/res_agi.c 2016-06-19 17:39:23.405290623 +0200
@@ -4200,7 +4200,7 @@
return 0;
}
readformat = ao2_bump(ast_channel_readformat(chan));
- if (ast_set_read_format(chan, ast_format_slin)) {
+ if (ast_set_read_format(chan, ast_format_slin48)) {
ast_log(LOG_WARNING, "Unable to set channel '%s' to linear
mode\n", ast_channel_name(chan));
ao2_ref(readformat, -1);
return -1;
Maybe it's worthwhile to make it configurable. I'll file an enhancement.
John
More information about the asterisk-dev
mailing list