Title: RTP audio not received in Python ExternalMedia setup and IVR audio not heard on MicroSIP

Hello everyone,

I am currently trying to set up RTP media streaming between Asterisk and a Python media server using ARI and ExternalMedia.

The call is being intercepted successfully through ARI, and the ExternalMedia channel is also being created. However, I am facing an issue where the RTP audio packets are not being received properly on the Python side. Because of this, I am unable to process the incoming audio stream further (for example, for speech processing).

In addition to this, when I place a call from MicroSIP, I am not able to hear the initial dialogue from the python side that should be played. I am unsure whether the audio is reaching Asterisk correctly or if there is an issue in my dialplan or media configuration.

So far I have:

  • Created the ExternalMedia channel through ARI

  • Set up a Python UDP listener for RTP packets

  • Verified the RTP port configuration

  • Checked the basic network configuration

Despite this, the Python server does not seem to receive the RTP packets, and the IVR audio is not heard on the SIP client.

I would appreciate any suggestions on what could be causing this issue or what areas I should investigate further (RTP configuration, codec mismatch, network setup, etc.).

Thank you.

Don’t do external media yet. Just don’t. That’s jumping immediately to complexity. Start simple and verify the MicroSIP side. Send the call to Answer() followed by Playback(). Look at the output of “rtp set debug on”. Confirm that media is coming into Asterisk. If it’s not, then it’s either configuration related if Asterisk is behind NAT or a network issue outside of Asterisk. Confirm that Asterisk is sending media out to MicroSIP and that you can hear it.

1 Like

Soo I did some debugging , when I set format to ulaw , the audio works is received and sent back(like echo) from python service , I actually want to setup a stt to it , is ulaw format good enough for that ?

Yes.

Thanks a lot