Maximum PBX stack exceeded

We are having issues with this:

[2017-05-16 13:30:31] WARNING[32615][C-00002516]: pbx.c:2461 pbx_find_extension: Maximum PBX stack exceeded

We were having issues with it before but then we condensed 6 outbound routes into 1 and the warning went away for a while. We have been adding more ring groups and parking lots since then and it has returned. At one point when we added a single parking lot the warning occurred then when we removed it then the warning went away.

Right now I think we are a little above the border between when this happens and when it doesn’t happen. I asked on the asterisk forums and this is related to having includes go 128 levels deep. I’ve looked the best I can and I can’t tell how its possibly going that deep.

We have ~15 outbound routes, 60 parking lots, 138 ring groups, 13 queues, 103 time conditions, 90 announcements, 900 extensions (though only about 700 are actual phones).

It seems that adding another parking lot caused the issue to pop up again but why would another parking lot add another level of include depth? Looking at the dial plan it looks like it would increase the number of includes on the 5th level of includes but why does it add depth?

3 posts were merged into an existing topic: Custom Context Extension Blocks