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:
[transport-udp-nat]
type=transport
protocol=udp
bind=0.0.0.0:5020
allow_reload=yes
;NAT SETTINGS:
local_net=192.168.0.0/24
external_media_address=public_ip
external_signaling_address=public_ip

codecs
disallow = all
allow = gsm
language = es

softphones
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

[auth-userpass]
type = auth
auth_type = userpass

[aor-single-reg]
type = aor
max_contacts = 1
remove_existing = yes

[100]
auth = 100
aors = 100
callerid = 100 <100>

[100]
password = 100
username = 100

[100]
mailboxes = 100@example

[1]
auth = 1
aors = 1
callerid = 1

[1]
password = 1
username = 1

[1]
mailboxes = 1@example

And this is my extensions.conf:
[general]

[muundogando]
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.
image

Okey, I have changed the rtp.conf to:
image

I’ll open the ports and try again.
Thanks!

Use the </> button.

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

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.