[Help] How to connect 2 SIP phones on 2 remote locations


#1

Hi,

Is there anyone who tried to connect 2 SIP (x-lite) phones on two remote locations? I’ve tried it before and on my side my x-lite phone can logged in meaning it’s working.However on my client side it displayed Logged in Time Out :Contact your Administrator.

Here’s my sip.conf

[0001]
type=friend
username=0001
secret=password
host=dynamic
context=local
nat=yes
externip=< my public IP>
localnet=192.168.0.xxx/255.255.255.0
canreinvite=no

[0002]
type=friend
username=0002
secret=password
host=dynamic
context=local
nat=yes
externip=< client public IP>
localnet=192.168.0.xxx/255.255.255.0
canreinvite=no

My extensions.conf

[0001]
exten=>0001,1,Answer
exten=>0001,n,Wait
exten=>0001,Dial(SIP/${EXTEN})
exten=>0001,n,Hangup

[0002]
exten=>0002,1,Answer
exten=>0002,n,Wait
exten=>0002,Dial(SIP/${EXTEN})
exten=>0002,n,Hangup

Any suggestions are very much welcome as i’m also new to this kind of field…Thanks in advance.

noel


#2

Is everything open on the firewall for SIP? Is the user using a STUN server?


#3

Hi,

We’re behind a NAT and i believed the user is not using a STUN server.

noel


#4

Have the user, with the problem, specify a stun server in xlite. Take out the externip specifications in the sip configs for the clients. Externip should be under general and should specify the external IP address of the Asterisk box. Externip tells Asterisk to rewrite the SIP headers destined to remote clients.