Answer the question
In order to leave comments, you need to log in
Why is asterisk not registering behind NAT (Request sent)?
Good afternoon!
There is asterisk 1.18.22 on Linux, located inside NAT. I'm trying to set up registration with a local provider (located outside NAT). Ports 5060 (for SIP signaling) and 10000-20000 (for RTP) are forwarded on the gateway.
The provider config is in asterisk realtime.
Registration line: register -> xxxxxx:[email protected]_name/xxxxxx
I registered localnet. externaddr - do not set - because maybe I will have 2 providers.
in realtime:
host = ip_провайдера
nat = yes
type = friend
canreinvite = no
fromuser = xxxxxx (соответствует строке register)
fromdomain = ip_провайдера
secret = yyyyyy (соответствует строке register)
disallow = all
allow = alaw; ulaw; g729; gsm
username = xxxxxx
defaultuser = xxxxxx
insecure = port, invite
REGISTER sip:ip_провайдера SIP/2.0
Via: SIP/2.0/UDP 192.168.1.11:5060;branch=z9hG4bK561c1ad1;rport
Max-Forwards: 70
From: <sip:[email protected]_провайдера>;tag=as3b954948
To: <sip:[email protected]_провайдера>
Call-ID: [email protected]_провайдера
CSeq: 102 REGISTER
User-Agent: Asterisk PBX 1.8.22.0
Expires: 120
Contact: <sip:[email protected]:5060>
Content-Length: 0
Answer the question
In order to leave comments, you need to log in
We also keep our server behind NAT. And they had problems when Asterisk did not know their external IP, because. he indicated the local IP in the signal fields, then the provider's server did not allow registration.
Therefore, in sip.conf:
externip= or externhost=
and update accordingly when switching providers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question