Link to home
Start Free TrialLog in
Avatar of node_runner
node_runner

asked on

conneting two asterisk servers encountering problem

I'm new to Asterisk and SIP/VOIP in general. What I am trying to accomplish, is to have one main office using Asterisk and local SIP telephones (Polycom) connect to a SIP provider for outbound calls. We have another office located in another city with Polycom phones, so I'm trying to create a second server there, connect it to the main server, and use the main server for outbound calls to the provider.

I have the main server successfully connected to the provider and I can send/receive calls.

I have the secondary server connected to the main server and I can see that it is successfully registering. I'm using SIP instead of IAX to connect the two * servers.

I'm trying to use a phone at the secondary office to call an extension at the main office. The call doesn't seem to be getting routed correctly. Running asterisk on the secondary server with -vvv shows congestion errors (on the sending * server) when I try and connect to an extension on the other side.

I think this is a syntax issue on my part because I'm not fully understanding the documentation I'm reading. My config is posted and detailed below.

As far as network topology, both * servers are behind standard consumer routers that have a single public IP and using NAT. I'm using port forwarding to forward SIP and the entire range of RTP ports to the * server on both sides.
##########################################
# Main Office Asterisk Server (name "radar")
# ========================================
# Connects to VOIP Provider for outbound calls
# Accepts connections from local SIP phones
# Accepts SIP peer connections from satellite asterisk server
# Sits behind a standard consumer router with NAT using port forwarding
###########################################
 
sip.conf:
-------------------------------
[general]
localnet=192.168.0.0/255.255.0.0
externip=xxx.xxx.xxx.xxx
register => <user>:<pass>@sip.inphonex.com
register => <user>:<pass>@sip.inphonex.com
register => <user>:<pass>@<asterisk2 server>/gladiator
 
 
[gladiator]
type=friend
secret=xxxxx
context=gladiator_incoming
host=dynamic
disallow=all
allow=ulaw
nat=yes
 
[102]
type=friend
host=dynamic
secret=polycom
context=bob
 
 
[inphonex]
username=<user>
type=peer
secret=<pass>
host=sip.inphonex.com
fromuser=<user>
fromdomain=sip.inphonex.com
context=from-inphonex
canreinvite=no
 
[inphonex2]
username=<user>
type=peer
secret=<pass>
host=sip.inphonex.com
fromuser=<user>
fromdomain=sip.inphonex.com
 
 
extensions.conf:
--------------------------------
[general]
static=yes
writeprotect=no
clearglobalvars=no
 
[globals]
 
 
[gladiator_incoming]
exten => 102,1,Dial(SIP/102)
exten => _NXXXXXX.,1,Dial(SIP/${EXTEN}@inphonex,30,Tt)
exten => _NXXXXXX.,n,Congestion()
exten => _NXXXXXX.,n,Hangup()
exten => _NXXNXXXXXX.,1,Dial(SIP/${EXTEN}@inphonex,30,Tt)
exten => _NXXNXXXXXX.,n,Congestion()
exten => _NXXNXXXXXX.,n,Hangup()
exten => _1NXXNXXXXXX.,1,Dial(SIP/${EXTEN}@inphonex,30,Tt)
exten => _1NXXNXXXXXX.,n,Congestion()
exten => _1NXXNXXXXXX.,n,Hangup()
 
 
[tom]
exten => 101,1,Dial(SIP/101)
exten => 600,1,Answer()
exten => 600,2,Playback(demo-echotest) ; Let them know what
exten => 600,3,Echo()                  ; Do the echo test
exten => 600,4,Playback(demo-echodone) ; Let them know it
exten => 600,5,Hangup()
exten => _NXXXXXX.,1,Dial(SIP/${EXTEN}@inphonex,30,Tt)
exten => _NXXXXXX.,n,Congestion()
exten => _NXXXXXX.,n,Hangup()
exten => _NXXNXXXXXX.,1,Dial(SIP/${EXTEN}@inphonex,30,Tt)
exten => _NXXNXXXXXX.,n,Congestion()
exten => _NXXNXXXXXX.,n,Hangup()
exten => _1NXXNXXXXXX.,1,Dial(SIP/${EXTEN}@inphonex,30,Tt)
exten => _1NXXNXXXXXX.,n,Congestion()
exten => _1NXXNXXXXXX.,n,Hangup()
 
[bob]
exten => 102,1,Dial(SIP/102)
exten => 600,1,Answer()
exten => 600,2,Playback(demo-echotest) ; Let them know what
exten => 600,3,Echo()                  ; Do the echo test
exten => 600,4,Playback(demo-echodone) ; Let them know it
exten => 600,5,Hangup()
exten => _NXXXXXX.,1,Dial(SIP/${EXTEN}@inphonex2,30,Tt)
exten => _NXXXXXX.,n,Congestion()
exten => _NXXXXXX.,n,Hangup()
exten => _NXXNXXXXXX.,1,Dial(SIP/${EXTEN}@inphonex2,30,Tt)
exten => _NXXNXXXXXX.,n,Congestion()
exten => _NXXNXXXXXX.,n,Hangup()
exten => _1NXXNXXXXXX.,1,Dial(SIP/${EXTEN}@inphonex2,30,Tt)
exten => _1NXXNXXXXXX.,n,Congestion()
exten => _1NXXNXXXXXX.,n,Hangup()
 
 
 
##########################################
# Secondary Office Asterisk Server (name "gladiator")
# ========================================
# Connects to main office asterisk server for extensions and outbout calls to provider
# Accepts connections from local SIP phones
# Sits behind a standard consumer router with NAT using port forwarding
###########################################
 
sip.conf:
-----------------------------
 
[general]
register => <user>:<pass>@98.175.96.233/radar
externip=98.163.74.196
 
[radar]
type=friend
secret=welcome
context=radar_incoming
host=dynamic
disallow=all
allow=ulaw
nat=yes
 
[101]
type=friend
context=tom
host=dynamic
secret=polycom
 
 
 
extensions.conf:
--------------------------
 
[globals]
 
[general]
autofallthrough=yes
 
 
 
[radar_incoming]
exten => 102,1,NoOp()
exten => 102,n,Dial(SIP/radar/${EXTEN})
exten => 102,n,Hangup()
 
 
[tom]
exten => 102,1,NoOp()
exten => 102,n,Dial(SIP/radar/${EXTEN})
exten => 102,n,Hangup()
 
exten => _NXXXXXX.,1,Dial(SIP/radar/${EXTEN})
exten => _NXXXXXX.,n,Congestion()
exten => _NXXXXXX.,n,Hangup()
 
exten => _NXXNXXXXXX.,1,Dial(SIP/radar/${EXTEN})
exten => _NXXNXXXXXX.,n,Congestion()
exten => _NXXNXXXXXX.,n,Hangup()
 
exten => _1NXXNXXXXXX.,1,Dial(SIP/radar/${EXTEN})
exten => _1NXXNXXXXXX.,n,Congestion()
exten => _1NXXNXXXXXX.,n,Hangup()

Open in new window

Avatar of Kamran Arshad
Kamran Arshad
Flag of Pakistan image

Hi,

Could you please paste the console errors when your run your asterisk in debugging mode?
SOLUTION
Avatar of koszegi
koszegi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of node_runner
node_runner

ASKER

We ended up not using Asterisk and ditching the project. We needed something fairly quickly, and we just ended up having too many technical problems getting things to work reliably. Thanks for your help to everyone who commented.
i like the expert comment .. can u pls guide me step by step how  my outisde carrier bypass thier traffic through my linux server which is attached gsm gateway*voip devices)