[Solution] Incoming calls and voicemail greeting dropping/disconnect/hangup

I have been banging my head against the desk trying to solve a problem where incoming calls were being disconnected/hang up after about 5-10 seconds. The same thing also happened to outgoing calls that reached my voicemail greeting.

I have solved the problem and wanted to post it here so that it may help anyone else experiencing the same issue as me. The problem is caused by a Retransmission Timeout which you will find in your Asterisk Log (/var/log/asterisk/full). It will look something like this.

WARNING[1860] chan_sip.c: Retransmission timeout reached on transmission for seqno 102 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions

Packet timed out after 6399ms with no response

WARNING[1860] chan_sip.c: Hanging up call - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).

This means data that is supposed to be recieved by Asterisk is not being receieved therefore it will terminate the call.

I discovered that this problem was caused by FreePBX/Asterisk not having the correct External IP address for my network in the settings.

Firstly go to www.whatismyip.com to find out your External IP address.

Then in your FreePBX Administration Panel, go to Settings>Asterisk SIP Settings on the top NavBar. On the page that opens, make sure Static IP is selected and type your IP address you obtained earlier into the "External IP" box.

IP Address

Save and Apply Config. You may need to restart your phone(s) and then you could be able to accept incoming calls and not have voicemail greetings drop out.

This information is contained in the wiki.

Additionally you can simply click auto configure and the system will determine the external IP for you.

Is your IP really static? If it is not as soon as your provider rotates your IP it will stop working again.