Setting Up SIP remote

Hello; I have setup X-lite on my LAN and it’s working fine; I also created another account (1001) for my friend as a test and Im getting a conection error; timed out.

I have configure X-lite the same way as in my LAN except that I’m using my WAN IP for domain. I have forwarded the required ports and I have also enable DMZ for asterisk IP.
Do I need to create a “special extension” type when you connect remotely?

My dialplan and sip config:
[globals]

[general]
autofallthrough=yes

[default]

[incoming_calls]

[internal]
exten => 1000,1,Verbose(1|Extension 1000)
exten => 1000,n,Dial(SIP/1000,30)
exten => 1000,n,Hangup()

exten => 1001,1,Verbose(1|Extension 1001)
exten => 1001,n,Dial(SIP/1001,30)
exten => 1001,n,Hangup()

[phones]
include => internal

____________SIP.conf

[general]
[1000]
type=friend
context=phones
host=dynamic
secret=********

[1001]
type=friend
context=phones
host=dynamic
secret=*********

Please let me know;
Thank you!

In sip.conf in the general section you need to add:

externip=XX.XX.XX.XX (replaces by your external IP address).
localnet=192.168.1.0/255.255.255.0
localnet=192.168.0.0/255.255.0.0
localnet=10.0.0.0/255.0.0.0
localnet=172.16.0.0/12
localnet=169.254.0.0/255.255.0.0

Under the sip account that you are going to be using remotely you need to add:

nat=yes
canreinvite=no

[quote=“Dovid”]In sip.conf in the general section you need to add:

externip=XX.XX.XX.XX (replaces by your external IP address).
localnet=192.168.1.0/255.255.255.0
localnet=192.168.0.0/255.255.0.0
localnet=10.0.0.0/255.0.0.0
localnet=172.16.0.0/12
localnet=169.254.0.0/255.255.0.0

Under the sip account that you are going to be using remotely you need to add:

nat=yes canreinvite=no [/quote]

Hello; I tried this but still no luck. I was not able to connect; I was able to see the web interface from my friend house but I stiil get the error…
I also was able to ping the WAN IP.
EXTERNIP= should be my WAN IP right???
what would happen when it change?> should I dyndns better?
Please let me know if there is anything else I could try…

thank you

externip should be your wan ip. You can also use externhost instead if you want to go with DNS:

externhost=pbx.mydomain.com
externrefresh=10

May be you should check in
CLI>
if remote client initiate any dialogue.
You can enable sip debug