ExternalMedia AppServer and Asterisk interraction

Hello everyone,

I have the following setup in Asterisk:

  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.

After this, I successfully receive an RTP stream on my server. However, the only information I have at this point is the UDP source port of the RTP packets.

My goal is to associate this RTP stream with a specific process ID (which I can define somewhere in the dialplan). I assume this might be possible using ARI or AMI, but I’m unsure about the best approach.

I recall that the CHANNEL function may allow retrieving RTP source information, but I’m not sure if this is the correct way to achieve my goal.

Does anyone have experience with this? Where and how should I set the process ID so that I can later correlate it with the received RTP stream?

Or maybe I can mark RTP packets to any variable, like processId=1

Any association is up to you. You tell it where to send media, so you can create a mapping based on destination IP+port. Asterisk will also tell you where it expects media (and where it would send from) in the response to creating the external media channel.

1 Like