Following Reboot all PJSIP Tech is Offline

Hello, we have a local Freepbx Server that we use to run a phone system at our office. Over the weekend the power went out, when I returned to the office on Monday and turned it back on I found that none of the phone would connect to the system. This was strange to me as in the past restarting the server would usually fix issues with phone not connecting. At this time we are operating off of a failover phone located in the office, but it is preferred if our actual phone system could be working again.

I eventually found on the Asterisk Info screen that all of the extensions and our trunk that are set up as PJSIP are showing offline. I am assuming this has something to do with the issue at hand, but I am unsure. See the picture below for reference.

I have attempted a handful of troubleshooting techniques that I have found online and none of them have worked. I apologize in advance as I am not overly familiar with FreePBX or Asterisk.

Any assistance or troubleshooting tips will be greatly appreciated.

Look in the Asterisk logs for clues about why the registration is failing. Do you see the phone registration attempts? What do the phone endpoint logs say? Any network/Firewall changes that might have caused this? Make sure Fail2Ban is not blocking IPs.

Hello, thank you for responding to my post.

The Asterisk Logs provide the following Red (I am assuming error) Messages.

Some of my troubleshooting was specifically pointed at solving the “Unable to retrieve PJSIP transport ‘’” error, I had no luck with that.

Sorry but I am unsure how to get to the endpoint logs.

The original problem started before any Firewall Changes would have been made. I tried messing with some of the Firewall settings during my troubleshooting (it has worked for other issues I have had before) but nothing worked there either. Perhaps I didn’t try the correct things.

Sorry but I am unsure how to see Fail2Ban. On my dashboard the Fail2Ban has a fire next to it, could this be the issue?

Sorry again for my overall lack of ability with this system, the boss sort of just dropped me onto it.

As an update I made some changes to the Firewall Page and Fail2Ban now has a Checkmark and appears to be running.

This has done nothing to solve the issues, the phones are still down and the Asterisk Info Page still shows the PJSIP items as offline.

Did you change you PJSIP port, and the Asterisk reboot set it into effect?

In the SIP Settings, the port was different so I changed my PJSIP Listening Port to 5062 and that matches my trunk’s port and the ports on each of my phone’s.

Following a reboot of the Server, this has not solved the issue.

Also, I tried turning off the Firewall just to see if the phones would work, this did not work either. To me this points that it is not a Firewall Issue. I have turned the Firewall back on.


I tried the sngrep command you recommended.

I see the following.

next step is to man sngrep :wink: , but the quick answer is the interface is fully navigable with arrow keys and the enter button.

I.E. Pick one, hit enter, and look at the messages.

1 Like

As a point of pedantic correct grammatical style, that should really be ‘i.e.’ (a contraction of the latin ‘id est’). (But check your preferred dictionary, thesaurus, style guide)

1 Like

I used sngrep and navigated to a few different lines, they all look about the same when I press enter on them. Please see the below.

I tried typing in “man sngrep” and that is well out of my expertise.

In the meantime I had been in communication from someone from fiverr, in working with him we had Inbound Calls and InterOffice calls working for a while, but eventually the same issue has returned. He indicated that it looked like the issue was coming from our provider (FlowRoute).

The following line was reported as being the issue:
– Contact SSA-Flowroute-Trunk/sip:[email protected]:5062 is now Unreachable

I was going to attempt to reach out to FlowRoute Support soon.

sngrep shows the session, if you don’t get a reply to the register, then look to your extension provisioning and router, it’s hard to see in the photo but what are 10.0.0,240 and because 236 doesn’t seem to get the call is the Phone Server itself. is one of the Extensions in the Office.

You need to resolve your 5060/5062 port disparity, servers must be listening on and extensions must be registering to the same port

I just checked a few of the individual extension settings, they seem to look for 5062 on SIP Server 1 and 5060 on SIP Server 2, I am guessing having the 5060 on SIP 2 is a precaution for if the system reverts to looking for 5060.

In the Asterisk SIP Settings PJSIP is listening on 5062.

As of just recently, the extensions are apparently working and we are able to receive inbound calls, though I am unsure if this will actually stay working.

It is only Outbound Calls that we are struggling with at this point. I believe communicating with our provider may help us pinpoint the issue with that.

You and only you are responsible for port assignments, the system will never ‘revert’ to what you didn’t set it to. You and only you are responsible for making sure all your routers are passing traffic transparently between your extensions and your server, most all calls will have two legs, the A leg between the extension and the server, the server is a back-to-back-user-agent, so will open another session to the chosen trunk, (the B leg), this session must also have both SIP (the call ) and SDP ( the media/audio) routed without hindrance on both the A and the B leg.

sngrep will see both these ‘legs’ and both SIP and SDP sessions opened and closed…

It really is that easy in principal :wink:

Alright, I will look into that then.

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