Recording on bridge stopping while playing audio on channel

Hi all,

Problem faced
On a bridge (with bridge recording on) having a single channel, if I do file audio announcement using play ARI api on the channel, recording on the bridge is getting terminated.

Sequence of Operations
NOTE: everything is done using ARI APIs

  • Created a bridge on asterisk.
  • An Incoming call channel is answered (Media flowing both sides).
  • Added the channel to the bridge and start recording on the bridge. Things are working fine till now.
  • Now I play a wav file on the channel (using command: curl -s -X POST 'http://asterisk-uname:asterisk-pwd@:8020/ari/channels/10-1-242-121-1726581143.32/play?media=sound:/Recording/audio/Hindi_combo’). The announcement is audible at user.
  • After about 4 seconds of this announcement playing, we get the event “RecordingFinished”. Everything else works fine from here on, but recording is stopped at this point.

Observations:

  1. Two channels are created for recording rec-channel-id;1 and rec-channel-id;2
  2. Received warning on asterisk console logs (after about 4 seconds of playing announcement): WARNING[2947367][C-00000044]: app.c:1941 __ast_play_and_record: No audio available on Recorder/rec-channel-id;1??
  3. RecordingFinished is received for both the Recording channels created - rec-channel-id;1 and rec-channel-id;2

Versions and values
Asterisk version: Asterisk 18.11.1 built by root @ my-hostname on a x86_64 running Linux on 2024-02-26 06:00:44 UTC
Media file details:
$ soxi Hindi_combo.wav
Input File : ‘Hindi_combo.wav’
Channels : 1
Sample Rate : 8000
Precision : 16-bit
Duration : 00:00:14.62 = 116928 samples ~ 1096.2 CDDA sectors
File Size : 234k
Bit Rate : 128k
Sample Encoding: 16-bit Signed Integer PCM

Relevant logs:
Attached
asterisk-detailed-log.txt (357.1 KB)

Similar topics:

The recorder in a bridge currently expects a consistent stream of audio. When you play audio to a channel in a bridge, it temporarily is suspended from the bridge and its audio no longer goes to the bridge resulting in the recorder leaving. You can file an issue[1] but there is no time frame or guarantee of resolution. A workaround would be to ensure there is always a source of audio in a bridge, such as temporarily adding another channel while doing playback.

[1] Issues ¡ asterisk/asterisk ¡ GitHub

1 Like

Thanks for the answer @jcolp. As a work-around, instead of playing on channel, we are now playing on bridge, and that seems to work fine as per our requirement.

검토후 확인 바랍니다.

-----Original Message-----
From: "sitlate via Asterisk Community"notifications@asterisk.discoursemail.com
To: carybaby@naver.com;
Cc:
Sent: 2024-09-20 (금) 14:32:49 (GMT+09:00)
Subject: Recording on bridge stopping while playing audio on channel [Asterisk Community] [Asterisk/Asterisk APIs]

sitlate
September 20

Thanks for the answer @jcolp. As a work-around, instead of playing on channel, we are now playing on bridge, and that seems to work fine as per our requirement.


Visit Topic or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.

(attachments)

TSR20240920060856_D9DBKT3.zip (1.5 MB)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.