Answer the question
In order to leave comments, you need to log in
Asterisk and externaddr where should it show up?
Comrades!
A theoretical question: "I understand correctly that externaddr should appear somewhere in the call logs?"
Let me explain, I'm setting up Rostelecom on Asterisk. They gave out a permanent internal address from their 10.9.*.* format subnet.
I added it to externaddr, and also added subnets in the form they gave me */16.
externaddr = 10.9.**.**
localnet = 192.168.50.0/24
localnet = 10.10.0.0/16
localnet = 10.9.0.0/16
language=ru
context=default
allowoverlap=no
udpbindaddr=0.0.0.0
bindport=5060
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=yes
allowguest=no
limitonpeers=yes
alwaysauthreject=yes
[2****2]
type=peer
host=10.10.10.100
nat=no
insecure=invite,port
disallow=all
allow=alaw
allow=ulaw
dtmfmode=auto
secret=********
defaultuser=2*****
fromuser=2*****
callbackextension=2*****
context=incoming
directmedia=nonat
canreinvite=no
Connected to Asterisk 13.14.0 currently running on voip (pid = 1385)
== Using SIP RTP CoS mark 5
-- Executing [[email protected]:1] Dial("SIP/213162-00000006", "SIP/123") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/123
-- SIP/123-00000007 is ringing
-- SIP/123-00000007 answered SIP/213162-00000006
-- Channel SIP/123-00000007 joined 'simple_bridge' basic-bridge <1d5146f0-9517-43fd-ac72-cea30b6b8002>
-- Channel SIP/213162-00000006 joined 'simple_bridge' basic-bridge <1d5146f0-9517-43fd-ac72-cea30b6b8002>
> Bridge 1d5146f0-9517-43fd-ac72-cea30b6b8002: switching from simple_bridge technology to native_rtp
> Locally RTP bridged 'SIP/213162-00000006' and 'SIP/123-00000007' in stack
> Locally RTP bridged 'SIP/213162-00000006' and 'SIP/123-00000007' in stack
> 0x7fde68005d10 -- Probation passed - setting RTP source address to 192.168.50.10:12338
> 0x7fde60009bb0 -- Probation passed - setting RTP source address to 10.10.10.113:21164
-- Channel SIP/123-00000007 left 'native_rtp' basic-bridge <1d5146f0-9517-43fd-ac72-cea30b6b8002>
-- Channel SIP/213162-00000006 left 'native_rtp' basic-bridge <1d5146f0-9517-43fd-ac72-cea30b6b8002>
== Spawn extension (incoming, 213162, 1) exited non-zero on 'SIP/213162-00000006'
== Using SIP RTP CoS mark 5
-- Executing [8*******[email protected]:1] Dial("SIP/123-00000008", "SIP/8********[email protected]") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/8********[email protected]
> 0x7fdf24007070 -- Probation passed - setting RTP source address to 10.10.12.199:6004
> 0x7fdf24007070 -- Probation passed - setting RTP source address to 10.10.12.199:6004
-- SIP/213162-00000009 is ringing
-- SIP/213162-00000009 is making progress passing it to SIP/123-00000008
> 0x7fdf24007070 -- Probation passed - setting RTP source address to 10.10.12.199:6004
> 0x7fde60009bb0 -- Probation passed - setting RTP source address to 192.168.50.10:12342
-- SIP/213162-00000009 answered SIP/123-00000008
-- Channel SIP/213162-00000009 joined 'simple_bridge' basic-bridge <773b259f-337d-4ba6-bfb5-550d472eaeb3>
-- Channel SIP/123-00000008 joined 'simple_bridge' basic-bridge <773b259f-337d-4ba6-bfb5-550d472eaeb3>
> Bridge 773b259f-337d-4ba6-bfb5-550d472eaeb3: switching from simple_bridge technology to native_rtp
> Locally RTP bridged 'SIP/123-00000008' and 'SIP/213162-00000009' in stack
> Locally RTP bridged 'SIP/123-00000008' and 'SIP/213162-00000009' in stack
> 0x7fdf24007070 -- Probation passed - setting RTP source address to 10.10.12.199:6004
-- Channel SIP/213162-00000009 left 'native_rtp' basic-bridge <773b259f-337d-4ba6-bfb5-550d472eaeb3>
-- Channel SIP/123-00000008 left 'native_rtp' basic-bridge <773b259f-337d-4ba6-bfb5-550d472eaeb3>
== Spawn extension (outcoling, 8******8, 1) exited non-zero on 'SIP/123-00000008'
Answer the question
In order to leave comments, you need to log in
externaddr = Your external white IP
localnet = your internal networks where phones are installed that connect to Asterisk
Addresses are used when forming SIP packets and for proper NAT traversal, if present.
First, you need to understand that asterisk is not a router. And prescribing localhost and other routing variables does not change. All that the parameter record gives is that these parameters are written into the SIP packet. For NAT translations, two addresses are written - an external address and an internal one; without NAT, only an internal address is written.
Theoretically - with correctly defined routing of internal networks - when there are no NAT broadcasts within the network, you can write all subnets to localnet - 192.168.0.0/16 10.0.0.0/8
So in your case, write the correct external address from the Internet and the Rostelecom network to localnet.
The udpbindaddr=0.0.0.0 parameter says that you can access port 5060 from any network and communication with Rostelecom should be without problems (with proper routing).
And correctly show INVITE packets to understand how you communicate with the provider.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question