System suddenly restarted, stuck in startup/reboot loop


I ran that command again, and it’s actually just scrolling a perpetual stream of registration/authentication errors…

NOTICE[12885] res_pjsip/pjsip_distributor.c: Request ‘REGISTER’ from (each phone) failed - Failed to authenticate and No matching endpoint found

(Moussa) #82

I looked at my working Polycom phone and the Transport was set as DNSnaptr. It seems that the phone was working when your was set as DNSnaptr as well.

  • is it possible to check again with the Polycom phone’s Transport is set as DNSnaptr

Per Polycom:
DNSnaptr : The phone performs NAPTR and SRV look-ups that discover the transport, ports, and servers. DNSnaptr is the default transport method.

(Dave Burgess) #83

This usually means that you’ve set the extension (on the server) up in (for example) Chan-SIP and are trying to reach it on the PJ-SIP port (or the other way around). If PJ-SIP is on 5060, the extensions are set up in Chan-SIP on the Extensions tab.

(Moussa) #84

but his extensions are PJSIP and he is using the right port.


The phones (per their old/existing configuration) are all set to use port 5060. I assume I could change this but doubt I would want to, correct?

If I set the extensions in FreePBX to use "SIP [chan_pjsip] then it says:

If I set the extensions to use "SIP (Legacy) [chan_sip] then it says:

…EVEN THOUGH, if I go to the Advanced tab on this extension, it does say port 5060. So, not sure what the discrepancy is there.

(Dave Burgess) #86

If you are getting the PJ-SIP error “No matching endpoint found”, the extension either is not set up at all or that it’s set up in Chan-SIP.

You know precisely which ones are causing the problem - it’s in the error message. Mike’s phone, for example, on extension 220, is not correctly set up in the Extensions Module in FreePBX. Log in and double check the settings. Change one of them (the password, for example) and save it. The error message should change from “No Matching Endpoint Found” to “Password Not Correct.”

Also, there is an Integrated Firewall that you need to be aware of. If you have too many password fails, the phone can get “jailed”. Restarting the firewall (“fwconsole firewall restart” at a console prompt) should clear that if it’s actually a problem. You can also temporarily disable the firewall till you get everything running.


I tried setting a couple to SIP Legacy (CHAN_SIP) and they just show up as Unknown in Asterisk Info:

Those are the ones that say CHAN_SIP is listening on port 5160.

So I think I need to stick with PJSIP.


Yeah, I just didn’t want to set up 20 extensions in the wrong format so I was just working with two or three for now. But now that (I think) I know to do them all in PJSIP, I’ll go ahead and set up all of them.

(Moussa) #89

Is the phone registered now?


Ugh, still no luck. The phones are all over the place.

I’ve added every extension plus second lines (18 total extensions right now… 9 phones in use w/ 2 lines each… that’s at least how the old system was set up). I’ve gone into all nine Polycom IP web interfaces and pasted all 18 secrets.

For a little while three of the phones randomly worked. I could make outgoing calls outside the shop and call between those three phones w/ intra-office extensions. Extension 223 could dial 221 and 226… but if I dialed 222 it wouldn’t do anything (just silence) until I deleted and re-created a new 222 extension. And if I dialed all the others, they wouldn’t ring but would go straight to voicemail (“on the phone” default greeting). I have no idea why a few phones could call each other but none of the others.

I opened the Polycom web interfaces in multiple tabs and cycled between them; they are identical settings except for obviously the extension # itself and the secret I pasted into the password authentication. On paper, 223 should work identically to 224… except those two can’t connect to each other. But 223 and 226 could.

Under Asterisk Info it showed all phones online except for 222 and 224, for some random reason. Those two showed offline. I tried rebooting the phones with no luck, so then I restarted DHADi and Asterisk from within FreePBX… and now NONE of the phones show online. All are offline and just show “Connecting to…” when trying to dial any outgoing call (regular outside numbers OR intra-office)… even 223, 226 and 221 which were online and able to make calls ten minutes ago.

I absolutely cannot get these phones to register and STAY registered… any logical reason why some would work, some wouldn’t? And why, when restarting, NONE of them will connect?


I just rebooted the whole system… rather than just the DHADi & Asterisk restart, I went to system admin, power options and rebooted the entire thing from there.

Now 221, 226 and 229 are online; all others are offline.

I just can’t find any rhyme or reason for which ones decide to be online or off… they all have identical settings.


I did find one interesting discrepancy. These settings are on the same phone (223), and again these are the settings that were pre-configured and used to work with the old system. But, I am just noticing that under the SIP settings it has the transport for the Outbound Proxy and Server 1 both set to UDPonly. But under Lines (both line 1 and line 2) it has the transport set to DNSnaptr.

Not sure if that matters, but that’s how all the phones were programmed before.

(Moussa) #93

To have working system you need to

  1. Working Trunk
  2. Register the phones
  3. have outbound route and
  4. Inbound route

Being able to call the shop with 223, 221 and 226 (or any ONLINE extension) means that 1 and 3 are working. 2 is working for some of the phones and you need to find if it is the extensions or the phones for all the others. I wish there is a way to “DUPLICATE” a working extension with a click.

I did not have to change anything in the SIP setting of the phone.

tail -F /var/log/asterisk/full should help

If you have a phone that less critical, you could try taking screenshots, factory resetting the phone, update the phone to the most recent firmware, fill the Line information and see if this will register the phone.


Is anything from this screenshot of our old system relevant?

MAC Address of each phone? Custom templates used? Or were these strictly for Endpoint Manager?

At this point we’re about ready to buy Endpoint Manager if that will get them up and running.


I think you will find Polycoms using udp transport work fine with FreePBX

(Moussa) #96

@cwaz13 You are halfway there. You have a system that can make calls. Some extensions/phones are registered and some are not. It is a matter of finding the difference between what is working and what is not.


Once this epic thread is resolved, someone ought to combine it into a single wiki page or post (or a book at the pace this thing is going) for future rookies to benefit from. :slight_smile:

Maybe @cwaz13 can put it on the documentation wiki and earn himself a Sangoma t-shirt or whatever they are giving away as a consolation prize!

(Luke C) #98

I think this thread proves, when a production PBX is “down”. Just hire a consultant that can get you back up and running in a timely manner.

If this were my company, and I didn’t have any first hand knowledge of this kind of stuff. I wouldn’t throw my “IT” guy in the water, and say “sink or swim”.

With that being said, kudos to the OP for his efforts. Hope he gets a happy ending…:slight_smile:


Yeah, we had tried calling about 10 different companies in the region, and none of them (literally zero) dealt with FreePBX. Most I.T. companies were non-starters, and the couple of phone companies are providing quotes for their own systems but were of no help with a FreePBX system. So that’s how I got thrown into the water… basically because no one else around here could or would, figuring it out while waiting for a possible new system from one of those companies.

That said, we got one of those quotes back and it was exorbitant, so probably a good thing I kept working on it… as I did finally get it up and working.

It seemed like the system was stuck in a loop of trying to get all 9 phones to be registered (because they were plugged in and on the network?) but because they still had the old configurations it was freaking out if it had a problem with any of them. Every time I rebooted, a different random selection of phones would work while others wouldn’t. I think that’s what was causing problems if I only tested 2 or 3 updated extensions while the other 8 were still using the old configs and making the system sad. So I went in and updated every extension that was plugged in, every secondary line, all with new secret passwords and changed to UDP, and now they are all online.

The other thing I had to do — is this normal? — is enable Call Waiting on every extension to be able to make internal calls. I couldn’t figure out why only a few extensions could call each other while others would go straight to voicemail, and when I looked at the extension list it showed those few with green checkmarks in the “CW” column. So I turned on CW for all extensions and now it seems to be working for incoming and outgoing calls, intra-office and outside. Functionally it all seems to be okay.

Thanks so much for your help everyone. :sunglasses:


Actually I do have one more (hopefully last) question. The caller ID seems to be a little wonky now. Before it always used to properly show the caller ID incoming AND outgoing — i.e. if I called 219-464-0123, it would show that number on the phone screen for the outgoing call… and of course incoming calls all showed the number and/or caller name.

Now, my outgoing calls show “To:CID:2191234567” (our phone number) instead of WHO I am calling.

And for calls that come in, it is actually just showing the IP address of the server… instead of a name and/or number, our phones show “” for the incoming caller ID.

Is there something I’m missing?