Changed port, now I can't receive calls

I recently changed my server from the default port to port 5555.

I also changed the main extension I use so it also uses port 5555 instead of 5060.

Having made the change, and having made sure port 5555 was open in my home firewall (so the SIP handset can communicate with the PBX server, which is hosted on the internet outside my home network), I updated my SIP handset config and the handset was able to connect without problem.

I can place outgoing calls from my SIP handset, and everything works as expected.

However, when I receive incoming calls they go straight to voicemail without even ringing my SIP handset.

Before changing the port I could make outgoing calls and I could receive incoming calls, but now that the port has changed it seems the PBX is unable to contact the SIP handset to connect incoming calls.

Can anyone explain what I’ve missed?

Thanks

Did you update the extensions to also reflect the port change?

Yep

Then I suggest you

sip set debug peer (peer)

and see what happens

Thanks,

Where would I define that? just on the linux command line? or in a specific config file like sip_custom.conf ?

In the asterisk cli interface, but maybe you should revert to 5060 until you understand the whole process better.

Thanks Dicko,

In fact it was you who suggested I change from port 5060 to a non-standard port! (In a different thread, concerning a security issue)

In general I have a pretty good understanding of “the whole process”. I’m fairly certain the issue is caused by my home firewall, as calls can get in and out of the PBX no problem, they just can’t seem to make it from my PBX (on a VPS) into my handset (on my home internet connection) despite me having opened the appropriate port on the firewall. The thing that makes it so odd is that I can place outgoing calls from my handset without fail, it’s only when the PBX tries to ring my phone that it fails.

Will have a look at the CLI debug info as a start, many thanks.

Ok so I immediately got some debug info.

This gets thrown to the CLI every couple seconds:

Retransmitting #4 (no NAT) to 192.168.42.46:5060:
OPTIONS sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP (my PBX ip):7777;branch=z9hG4bK30987408
Max-Forwards: 70
From: “Unknown” <sip:[email protected](my PBX ip):7777>;tag=as3911c4c3
To: sip:[email protected]:5060
Contact: <sip:[email protected](my PBX ip):7777>
Call-ID: [email protected](my PBX ip):7777
CSeq: 102 OPTIONS
User-Agent: FPBX-2.9.0(1.8.5.0)
Date: Fri, 09 Aug 2013 16:25:01 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0


Really destroying SIP dialog ‘[email protected](my PBX ip):7777’ Method: OPTIONS

Found the problem. Almost wish I hadn’t, as it’s so completely rudimentary that it’s almost embarrassing to mention (but I will, on the off chance it helps someone foolish enough to suffer the same problem as I have).

When I changed the port on my router I seem to have accidentally changed the IP address as well!

My router was trying to forward the incoming traffic to the wrong host on my local network.

Now I think it’s time for me to go sit in a corner and think about what I’ve done hehe

Asterisk thinks your extension 420 will answer on port 5060 , it’s probably confused because it is 420