Strict RTP, external media and snoop channel

Hello everyone,

I’m currently working on a project where I need to play different recognized audio files to a channel. Here’s a brief overview of my setup:

  1. Created an ExternalMedia channel.
  2. Set up a bridge.
  3. Joined the ExternalMedia channel to the bridge.
  4. Created a Snoop channel based on the current channel and bridged it using ARI.

With this setup, I successfully receive RTP from Asterisk to my application and send RTP back based on a ulaw audio file. However, while the first audio file plays correctly, subsequent attempts to play another audio file fail. This issue persists even after hanging up and making a new call with the same setup.

Interestingly, the only workaround I’ve found is to set:

strictrtp=no

While this resolves the issue temporarily, I would prefer not to disable strictrtp.

Has anyone encountered this problem or can suggest a solution for sending media multiple times in this scenario? For reference, I use a random new SSRC for each attempt.

What does a debug log say as to why your media is being dropped?

I can see in both cases that application send RTP traffic to asterisk
tcpdump -i lo udp dst port 10386 and host 127.0.0.1

13:42:40.419122 IP localhost.55890 > localhost.10386: UDP, length 172
13:42:40.439583 IP localhost.55890 > localhost.10386: UDP, length 172

in asterisk console when first time play audio
Channel Snoop/1736253405.1-00000000 joined ‘simple_bridge’ stasis-bridge <8a6ae237-f3d4-48e5-92c8-27e4bc050448>
> 0x7f711c003fe0 – Strict RTP qualifying stream type:
> 0x7f711c003fe0 – Strict RTP qualifying stream type:
> 0x7f711c003fe0 – Strict RTP qualifying stream type:
> 0x7f711c003fe0 – Strict RTP qualifying stream type:
> 0x7f711c003fe0 – Strict RTP switching source address to 127.0.0.1:46039
> 0x7f711c003fe0 – Strict RTP learning complete - Locking on source address 127.0.0.1:46039

next attempts no reactions. only asterisk restart and recreating bridge, externalMedia channel helps or set strictrtp=no

https://docs.asterisk.org/Operation/Logging/Collecting-Debug-Information/?h=collecting

Additionally, you must use the same source IP address and port within an external media RTP channel when sending to it. The sequence number should also increase, and it should be a stream.

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