Listen to endpoint output media using gstreamer

I am kind of a newbie with asterisk and I feel like I’m missing something
I am setting gstreamer with asterisk to send and receive the media of an endpoint (‘PJSIP/2002’). I have succeeded in sending a media to the calling endpoint (through a trunk).
Now I am trying to listen to my asterisk endpoint ‘PJSIP/2000’'s output media. Is there a way to do that? to make asterisk provide the rtp stream on an IP address and port where I could listen using gstreamer ?
I have tried looking at SDP logs using pjsip set logger on and listening to the IP and port set for rtp but the gstreamer doesn’t receive the rtp stream or ends up with “Address in use”.
I am using asterisk realtime database to manage endpoints, auths, aors, transports, extensions, contacts, musiconhold and registrations.
Here is the gstreamer command I’m using on a remote computer:
gst-launch-1.0 -v udpsrc uri=udp://<AsteriskIPAddress>:<PortFoundInSDPLogs> caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMU" ! rtppcmudepay ! mulawdec ! autoaudiosink sync=false
I have tried setting media_address and direct_media
Thanks for your help !

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