Freepbx as a SIP server behind nat,clients at remote(nat too

I have freepbx behind nat, all local phone work fine. but there is some sip user (sip phone ) out side nat, how can I config to let out side user connect it. thanks.

you have to forward ports to the server…

turn off Stateful Packet Inspection

do your self a favor and dump sip…IAX is much better as remote

UDP
SIP 5004-5082
RTP 10001-20000
IAX 4569

any good firewall / route will KILL sip…makes way to much traffic for SPI

Thank you
Yes, I did this, Also at file sip_nat.conf
nat=yes
externip=1.2.3.4
localnet=192.168.0.0/255.255.255.0

but it is still not working

go grab a iax phone (good free one you do not need to install)

http://www.laser.com/dante/

make sure you can get in

If you get in with IAX then you can start Trouble shooting SIP…

go to the system (console or SSH)

run the sip debug watch for error when making INbound
Post here if needed

sip no debug to turn it off.

at the CLI (asterisk -rvvvv) type help and you will see tons of tools to use in trouble shooting

thanks, we can connect it, but no audios. can not talk.

did u try with IAX and still no audio???
Sip is flaky with some routers, may sure that all works by use IAX phone if you can not connect and make calls using IAX u got big problems

thank you very much bubba,

I edit sip.conf , put
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
allow=ilbc ;
allow=alaw

was allow=all, now every working fine.

You have used up all the simple tricks. You need to find out what exist
between u and the SIP client. You have to do this from both sides. The
client side is just as likley to be blocking the RTP ports.

  1. Determine what type of NAT exist on both sides. I normally use XTEN
    softphone to try and connect to server. This is because its log file will
    contain the type of firewall it discovered. Symmetric are difficult to work
    with whie port restricted are easiest.

  2. On the client side. If you are port forwarding Don’t use STUN
    capabilities.

  3. If all else fails put the devices [client and server] in their
    respective DMZ

  4. Last resort I would use routers [NATs] that are known to work because
    they are not symmetric NATs. Try old linksys wrt54g family or DLINK. I
    know those work. But do find out what type of NAT is in your
    router/firewall

  5. Avoid SIP altogether and use IAX. There are IAX softfones and IAX ATAs

  6. Ever heard of SER [sip express router]. This will also help becuse it is
    a real SIP proxy but the learning curve is fierce. not for the faint of
    heart.

From: “peterzhu” [email protected]
Reply-To: [email protected]
To: [email protected]
Subject: [Amportal-users] [Edited]
Date: Mon, 12 Jun 2006 22:49:02 -0600

This is an edited version of a previous post

thanks, we can connect it, but no audios. can not talk.


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

btw the sip guy on the other end should also do the same set of things for
their SIP and RTP ports because they in all likelihood are behind a NAT and
firewall

rgds

From: “peterzhu” [email protected]
Reply-To: [email protected]
To: [email protected]
Subject: Re: [Amportal-users] freepbx as a SIP server behind nat,clients at
remote
Date: Mon, 12 Jun 2006 19:50:39 -0600

thanks, we can connect it, but we can not talk, can not hear anything.


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

so now you have one way “connection” where only one party can hear each
other OR you have no conversation whatsoever? Can you ring each other?

look in the file /etc/asterisk/rtp.conf you will see the RTP ports.

  • make sure they are open on your router
  • port forward them to the server internal IP address they are UDP ports

the range does not have to be as big as it in the file. so if you have
other stuff in that range you can narrow the range and avoid the overlap

From: “peterzhu” [email protected]
Reply-To: [email protected]
To: [email protected]
Subject: Re: [Amportal-users] freepbx as a SIP server behind nat,clients at
remote
Date: Mon, 12 Jun 2006 19:50:39 -0600

thanks, we can connect it, but we can not talk, can not hear anything.


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

Hi,

  1. try port forwarding. Port forward SIP port and RTP ports to the
    appropriate internal address.

  2. Look and see if you have a file called /etc/asterisk/sip.nat if you
    do put the following in the file.
    externip = xxx.xxx.xxx.xxx ;server’s external address
    localnet = xxx.xxx.xxx.xxx/255.255.255.0 ;server’s
    internal address
    if you don’t have sip.nat file, create one and Include it in the
    SIP.conf file. you can also just include the the 2 instructions in the
    sip.conf “general” section

  3. In the extension SIP configuration remember to set NAT=YES

From: “peterzhu” [email protected]
Reply-To: [email protected]
To: [email protected]
Subject: [Amportal-users] freepbx as a SIP server behind nat,clients at
remote [Edited]
Date: Sun, 11 Jun 2006 21:38:06 -0600

This is an edited version of a previous post

I have freepbx behind nat, all local phone work fine. but there is some sip
user (sip phone ) out side nat, how can I config to let out side user
connect it. thanks.


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)