We broke FreePBX again!

From the people that brought you the account code validation bug (See here: http://www.freepbx.org/forum/freepbx/tips-and-tricks/a-word-of-warning) We bring you the amazing Misc App hard limit!

Yes we’ve managed to break one our FreePBX installs yet again by doing somewhat stupid stuff

First off this is an old version of FreePbx (, I have my reasons for this so please no flames about upgrading.

So here’s what happened, lets start with the symptoms:

Suddenly towards the end of the business day yesterday SOME out bound routes where simply not working, namely our North American long distance route which is a catch all for stuff not going local, pattern 1NXXNXXXXXX. Looking at the log the calls where getting: " rejected because extension not found". However other routes where working namely the local ones with more specific patterns.

We killed asterisk and still the problem persisted, obviously a dial plan problem. So we looked at what had recently changed by doing Diffs on the conf files from the previous days backups(Thanks to Mitch, the first baron of Bash for his command line skills). We eventually narrowed it down to the addition of three misc apps. We disabled the apps and problem solved.

But why?

It was now early evening so we where somewhat free to experiment. We re-enabled the apps and tried various patterns in the expectation that the pattern was somehow munging up the dial plan. Nope!

So then I thought maybe there is somehow a limit on the amount of Misc apps you can have. We deleted the three apps and viola working system. We then deleted three unused apps, added back in the apps we had previously deleted and the system was still working. Mitch then pointed out that we currently had 50 misc apps, a nice round number. This leads us to the conclusion that you are limited to 50 misc apps or things start going weird.

Why? Don’t know but its definitely some sort of context thing.

Does the problem extend passed 2.8.04? Don’t know…

So a word of warning if your coming up to 50 misc apps be careful!

Sorry if this has been discussed before. I did a couple of quick searches and couldn’t find anything.

Right. Cancel life insurance policy on Philippe.

Does anyone know at what version the misc app context thing got changed?

It’s a context thing I’m pretty sure.

It’s also a 2.8 thing I’m pretty sure.

It’s also nothing to do with 50 miscapps, it has to do with the total included contexts in another context in Asterisk. It usually manifests itself when people are running custom-contexts because of how many contexts that can add.

Anyhow … in later versions of FreePBX, miscapps creates a single context and put’s all of them in there instead of one context per misc-apps which would manifest this issue much quicker.

So … I know you didn’t want to be flamed about upgrading and I’m not going to flame about it as it’s everyone’s choice what they run. Upgrading is always a mixed bag, in FreePBX it always fixes a lot more then it breaks; this would be one example.

What is the earliest version of FreePbx that would fix the issue?

Phillipe what happens if you get hit by a meteorite? Should we be buying a life insurance policy on you or are there others that have the same level of knowledge regarding the inner workings of FreePbx?

Just kidding…kind of…

There are about 4 others with Phillipe’s level of experience. They are just not community leaders so they almost never reply.

2.10 I believe maybe 2.9


try svn log on the module, it’s not that far down the list as there has not been that much stuff done to it other than bug fixes like this:)