Not receiving UnicastRTP stream


i want to work with the audio stream of an incoming call in python.
There was a blog post from Joshua Colp called “broadcasting asterisk conferences”.
Unfortunately the blog post is not available anymore.

I tested the connection on the port where the stream should be send with telnet (inside and outside of the firewall) and the port is open and recieves data.

But I am not getting any connection from asterisk when it is streaming the audio.

Here extensions.conf:
exten = 8000,1,Answer()
same = n, Dial(UnicastRTP/
same = n,Hangup()

Here the CLI Output:
Executing [8000@from-internal:1] Answer(“PJSIP/6001-00000012”, “”) in new stack

> 0x7f3bcc06cb20 – Strict RTP learning after remote address set to: “My Public IP”:64866

> 0x7f3bcc06cb20 – Strict RTP switching to RTP target address “My Public IP”:64866 as source

Executing [8000@from-internal:2] Dial(“PJSIP/6001-00000012”, “UnicastRTP/”) in new stack

> 0x7f3c8c000e90 – Strict RTP learning after remote address set to:

Called UnicastRTP/

UnicastRTP/ answered PJSIP/6001-00000012

Channel UnicastRTP/ joined ‘simple_bridge’ basic-bridge <099f356c-0a6c-48e0-8b43-74cca19de309>

Channel PJSIP/6001-00000012 joined ‘simple_bridge’ basic-bridge <099f356c-0a6c-48e0-8b43-74cca19de309>

I would be most grateful if anybody can give me here a hint on how to solve my problem.

The RTP is sent using UDP, not TCP. Testing using “telnet” would not be a valid test. You can see if media is being sent using “rtp set debug on” or by doing a packet capture.

Thanks for the quick respond.
Asterisk was already sending rtp packets. I needed to change my settings in python from tcp to Udp.

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