Cmd Monitor and RTP gap

Hi,
I would need some advice on using Monitor command in asterisk 1.8.
I’m recording inbound audio stream (on the originating box) and everything works ok except one detail.
Let’s say I have following dialplan on the destination box:

exten => _#24#12345678908,1,Answer()
exten => _#24#12345678908,n,Wait(5)
exten => _#24#12345678908,n,Playback(conf-hasjoin)
exten => _#24#12345678908,n,Wait(5)
exten => _#24#12345678908,n,Playback(conf-hasjoin)

The problem is that the pauses between audio are not contained in the recorded file on the originating box,
meaning that the recorded file contains only two ‘conf-hasjoined’ messages, with no silence at the beginning nor between the messages.

So, I checked the rtp stream in wireshark, and there are no rtp packets while the Wait(5) command is executed, which is expected.

I would like that the recorded file contains silence when there is no rtp.

Any hint would be appreciated.

Thanks.

If there is no RTP, there is nothing to record.

Thanks for your reply.

I would like to record audio as it would be heared by the caller to check for audio quality. If a gap in the rtp stream occurs, the caller would hear silence. However, this silence does is not present in the recorded wav file.

The pasted dialplan on the destination box is just a test case for such scenario where rtp stream is interrupted or delayed.

I think you can replace Wait(5), for playback(silence/5) as pause.

That should do it, although I would also note that this example is using syntax that hasn’t been supported since Asterisk 1.4, which hasn’t been supported since 2011-04-21 and hasn’t had security fixes since 2012-04-21.

I believe transmit_silence = yes in asterisk.conf should transmit silence packets while a channel is in a waiting state.

–Satish Barot