FreePBX Custom Context Module, a case study!

We all use FreePBX, a graphical interface on Asterisk to manage our extensions, define trunks and do everything we gotta do with our VoIP network. However, I was faced with yet another challenge recently and I found Custom Context, a 3rd party module to easily write context rules for your internal extensions, very useful.

The Challenge

Our call center unit has lots of personnel, and as the nature of the job dictates, they find themselves in quite unique pickles in a daily basis. Guess what happens when one of their computers doesn’t start (for a mere reason that the power cable was loose) or they SIP phone doesn’t get any IP from DHCP (again most probably coz their ethernet cable isn’t properly fixed into the network adaptor)? They know the IT personnels’ direct phone extensions and just call anyone they think is more knowledgeable. Most often they just call the chief IT person. What’s wrong with that? Some people get lots of support calls, some others don’t receive any!

IT department internal extensions have a pattern of 2XX, i.e. for example my phone number in 299. The call center’s internal numbers follow 5XX pattern. What I wanted to do was disallowing call center personnel calling IT department directly and defining a queue with a number like 3500, that they could only call that number. Everyday, some of the IT personnel would log themselves in the aforementiond queue, thus all call center calls dialing 3500 would be answered by them. This way you can define a chart that everyday only one or two IT people have the responsibility of answering call center calls and others do more useful stuff!

The Solution

At first you have to install Custom Context module. I found a good manual in here (It’s in Persian, if you can’t read Persian, search for it, they are other English manuals online). Now you have to go to your newly installed module and define a Custom Context containing the pattern of all extensions you don’t want to be dialled. How? Easy peasy japaneasy guys. Just make a new Custom Context, and inside it, in the Dial Rules, enter 2XX for your pattern. This is the pattern that we wana prohibit the Call Center personnel from calling. Now you have to scroll down, in the Internal Dial Plan section, should set ext-local equal to Deny Rules. Please notice that ext-local is a combo box with 4 options. If you choose Deny, means people that you’re gonna set this Custom Context for, won’t be able to call any other extension in the PBX! Yes, it doesn’t have to do anything with the Dial Plan box above anymore, if you choose Deny, means people under this Custom Context can not call any other internal number! So, we always set this to Allow, unless we wana deny some certain numbers, or allow some certain numbers (depending on your policy). In here, we choose Deny Rules, because we want the call center personnel to be able to call every other extension in the company, except those three digit numbers starting with 2.

A picture is worth a thousand words, so, here it goes:

FreePBX Custom Context module configuration

Don’t forget to set ext-queues combo box to Allow, as it’s shown at the bottom of the picture above, or you won’t be able to call any queue. We’re almost done. You only have to edit every call center extension and join it in the Custom Context you defined above. They won’t be able to dial any 2XX extension! Now go and make your 3500 queue and put a password for it. Give this number as the IT Help Desk number to the call center personnel. Everyday some of you IT guys can log into your queue and wait for their beautiful calls ;)

Leave a Reply