Sip peers unreachable 200

Hello. This is my sip show peer results

100/100                   172.20.x.xx                                 Yes        Yes            5060     OK (12 ms)
200/200                   172.20.x.xy                                Yes        Yes            5060     UNREACHABLE
3000/3000                 172.20.x.xz                                 Yes        Yes            5060     UNREACHABLE

And this is my SIP.CONF code

[3000]
type= peer
host=172.20.x.xz
defaultuser=3000
secret=12345
fromuser=3000
fromdomain=172.16.z.z
context=from_external
allow=all

nat=yes
externip=124.xx.xx.xx
localnet=172.20.xx.0/24 ; Adjust this to match your local network subnet
qualify=yes

[100]
type= peer
host=172.20.x.xx
defaultuser=100
secret=12345
fromuser=100
fromdomain=172.16.x.x
context=from_external
allow=all

nat=yes
externip=124.xx.xx.xx
localnet=172.20.xx.0/24 ; Adjust this to match your local network subnet
qualify=yes


[200]
type= peer
host=172.20.x.xy
defaultuser=200
secret=12345
fromuser=200
fromdomain=172.16.x.x
context=from_external
allow=all

nat=yes
externip=124.xx.xx.xx
localnet=172.20.xx.0/24 ; Adjust this to match your local network subnet
qualify=yes

My problem is ‘100’ is reachable but 200 and 3000 not reachable. 100 set for my pc ip and 200 and 300 are another pc’s ips. What is the issue? Why 200 and 3000 unreachable?

chan_sip is obsolete, you should be using chan_pjsip instead.

Using allow=all can break things, in the network, because of overlong packets and, in some versions of Asterisk break Asterisk.

You cannot set externip and localnet on individual peers.

Assuming that all cases of 172.20.xx and 172.20.x are the same, you don’t need nat=yes, and you rarely need it even when NAT is involved.

defaultuser is, I believe, only meaningful for host=dynamic.

As already noted, you should not be using chan_sip. It is unsupported, and you will not be able to move to the latest released version of Asterisk.

1 Like

Thank you for your replies. I solved this. Problem was, if install the Microsip softphone, it is not get 5060 port in each PCs. After Re-install microSIP, then problem solved.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.