NAT, RTP, PJSIP. No audio problem in Asterisk 20

Hi! I’ve got the same problem. Could someone help me please.

This is my pjsip.conf:

disallow = all
allow = gsm
language = es

type = endpoint
context = muundogando
allow = gsm
trust_id_outbound = yes
device_state_busy_at = 1
dtmf_mode = rfc4733
direct_media = no
transport = transport-udp-nat
;media_address = public_ip
;media_use_received_transport = yes
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes

type = auth
auth_type = userpass

type = aor
max_contacts = 1
remove_existing = yes

auth = 100
aors = 100
callerid = 100 <100>

password = 100
username = 100

mailboxes = 100@example

auth = 1
aors = 1
callerid = 1

password = 1
username = 1

mailboxes = 1@example

And this is my extensions.conf:

exten => 1,1, Answer()
same => n, NoOp(Valor del argumento: ${id_vaca})
same => n, Playback(vaca-fuera-perimetro-1)
same => n, SayDigits(${id_vaca})
same => n, Playback(vaca-fuera-perimetro-2)
same => n, Playback(demo-echotest)
same => n, Hangup()

Im using Linphone as a SIP contact. In my asterisk everything seems to work but… there is no audio

This is a firewall issue NOT asterisk.
What firewall do you have in place?
Also make sure you have the appropriate ports opened in your firewall system.
10000-25000 rtp
5060 udp
5061 udp
& any other port you are forwarding to your sip service.

You are missing “type=…” in several sections, and I don’t think there is an option called “password”

The configuration is like this, but the web do not allow me to put it on the right way.

Okey, I have changed the rtp.conf to:

I’ll open the ports and try again.

Use the </> button.

I open de ports in the router and it function!!

1 Like

try: 10000 - 25000
with your current settings of 10000 - 10002
Your not going to get full access to corresponding ports

This will only allow one call leg, so no through calls, and I’d expect calls to fail if they followed on too close after a completed call.
The 10002 should never get used, as it would need 10003, for RTCP and that is not available.

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