Is there a possibility to execute an action when asterisk start to count for rtp timeout


I am trying to detect (via the api) when asterisk START to detect a RTP Timeout.

As it seems to be difficult to have this kind of event, I try to find a way to use the dialplan for that, I could send a VarSet event. But for that I have to find a way to configure my diaplan to do the var set when the rtp timeout is starting to count (ie : when the first rtp paquet is lost).

Is it possible ?


No, there is no such functionality in Asterisk.

Ok. Is using the rtcp send event and checking the report 0 dlsr (that goes up) could be considered as reliable ?

What exactly are you trying to achieve? (Without describing how you want to achieve it)

I’m pretty sure that the timeout is started every time a packet is successfully received, not after a packet is declared overdue. I don’t think there is anything to detect an overdue packet, and I believe it is technically legal to just not send during silence, so I don’t think it would know that a packet was lost until the next successful receive showed a problem with serial numbers, or the timeout occurs.

I am using Asterisk to record SIP call that are specifically sent to Asterisk. I am using the MixMonitor application for that, so far it works great. The problem is that if the remote client have a network issue, there could be a miss of RTP packets, this is fine as we have configured a timeout where the recording is stopped.

The problem is when we loose packet but without reaching the rtp timeout, the record will be missing these rtp, like if there wasn’t any problem. As I didn’t know if it was possible to configure Asterisk to simulate these missed packet with void, we chose to track the missing rtp moments to display a marker telling the user that there is a miss of X seconds here.

The only thing realtime perspective would be AMI RTCP events but I don’t know if those would do what you want. Otherwise MixMonitor should insert silence if at least one stream is providing audio. If recording individually there is an option[1] to insert silence in the recording.

[1] Asterisk 18 Application_MixMonitor - Asterisk Project - Asterisk Project Wiki

Thank you, but we are using Asterisk in a strange way, we have only one stream that is going into Asterisk.

Do you think that if we configure Asterisk to play a void file to “reply” to the remote, this will allow MixMonitor to generate the silence as we will send audio ourself ?

Uhhhh it might? You’re in off-nominal land.

:smiley: indeed, thank you for your help

Using the playback application works.

I am sorry to use this thread for another question, but how I make it playback indefinitely ? a while loop ?

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