[asterisk-users] asterisk playback ogg files

marek
Wed, 22 Dec 2021 13:27:22 -0000

hi,

is it possible to playback ogg/opus files to alaw sip clients?

exten => _[*+#0-9].,n,Playback(/var/lib/asterisk/sounds/output.ogg,)


[Dec 22 14:05:53] WARNING[49275][C-00000004]: file.c:789
ast_openstream_full: File /var/lib/asterisk/sounds/output.ogg does not
exist in any format
[Dec 22 14:05:53] WARNING[49275][C-00000004]: file.c:1262
ast_streamfile: Unable to open /var/lib/asterisk/sounds/output.ogg
(format (alaw)): No such file or directory
[Dec 22 14:05:53] WARNING[49275][C-00000004]: app_playback.c:497
playback_exec: Playback failed on PJSIP/endpoint33-00000003 for
/var/lib/asterisk/sounds/output.ogg,


dev*CLI> module show like ogg
Module Description                              Use Count  Status
Support Level
format_ogg_opus.so             OGG/Opus audio
0          Running core
format_ogg_speex.so            OGG/Speex audio
0          Running extended

dev*CLI> module show like opus
Module Description                              Use Count  Status
Support Level
codec_opus.so                  OPUS Coder/Decoder
0          Running extended
format_ogg_opus.so             OGG/Opus audio
0          Running core
res_format_attr_opus.so        Opus Format Attribute Module
1          Running              core


core show translation

           ulaw  alaw   gsm  g726 g726aal2 adpcm slin8 slin12 slin16
slin24 slin32 slin44 slin48 slin96 slin192  g729 speex8 speex16 speex32
ilbc  g722 testlaw  opus
      ulaw     -  9150 15000 15000    15000 15000  9000  17000 17000
17000  17000  17000  17000  17000   17000 15000  15000 23000   23000
15000 17250   15000 23000
      alaw  9150     - 15000 15000    15000 15000  9000  17000 17000
17000  17000  17000  17000  17000   17000 15000  15000 23000   23000
15000 17250   15000 23000


audio file created with google TTS

https://cloud.google.com/text-to-speech/docs/reference/rest/v1/text/synthesize

|OGG_OPUS| 	Opus encoded audio wrapped in an ogg container. The result
will be a file which can be played natively on Android, and in browsers
(at least Chrome and Firefox). The quality of the encoding is
considerably higher than MP3 while using approximately the same bitrate.


Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20211222/b7fbb32e/attachment.html>