2

I set up two asterisk servers (on Fedora) in different networks. My goal is to make a call from softphone (on windows lite with ip: 192.168.20.3) to the asterisk server 2 which is in the other network (ip:192.168.10.2).

But the problem is in registration between the two asterisk servers which are behind NAT.

NAT IP for Asterisk Server 1: 100.100.100.100 NAT IP for Asterisk Server 2: 200.200.200.200

Architecture:

enter image description here

IAX.conf in Asterisk server 1:

[general]
autokill=yes
externip=100.100.100.100
localnet=192.168.10.0/255.255.255.0
nat=yes
register => zone1:welcome@200.200.200.200

[zone2]
type=friend
host=200.200.200.200
trunk=yes
nat=yes
qualify=yes
secret=welcome
context=incoming_zone2
permit=0.0.0.0/0.0.0.0

IAX.conf in Asterisk server 2:

[general]
externip=200.200.200.200
localnet=192.168.20.0/255.255.255.0
nat=yes
autokill=yes
register => zone1:welcome@100.100.100.100

[zone1]
type=friend
host=100.100.100.100
trunk=yes
nat=yes
qualify=yes
secret=welcome
context=incoming_zone1
permit=0.0.0.0/0.0.0.0

extensions.conf in Asterisk server 1

[general]
autofallthrough=yes

[phones]
include => internal
include => remote

[internal]
exten => _5XXX,1,NoOp()
exten => _5XXX,n,Playback(hello-world)
exten => _5XXX,n,Dial(SIP/${EXTEN})
exten => _5XXX,n,Hangup()

[remote]
exten => _6XXX,1,NoOp()
exten => _6XXX,n,Playback(hello-world)
exten => _6XXX,n,Dial(IAX2/zone2/${EXTEN})
exten => _6XXX,n,Hangup()

[incoming_zone2]
include => internal

extensions.conf in Asterisk server 2

[general]
autofallthrough=yes

[phones]
include => internal
include => remote

[internal]
exten => _6XXX,1,NoOp()
exten => _6XXX,n,Playback(hello-world)
exten => _6XXX,n,Dial(SIP/${EXTEN})
exten => _6XXX,n,Hangup()

[remote]
exten => _5XXX,1,NoOp()
exten => _5XXX,n,Playback(hello-world)
exten => _5XXX,n,Dial(IAX2/zone1/${EXTEN})
exten => _5XXX,n,Hangup()

[incoming_zone1]
include => internal

Registration state: Rejected

enter image description here

NOTES:

  • PING between the two networks is ok
  • Firewall on servers was turned off

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.