BLF on extensions using custom context

I’ve implemented a custom context to prevent a few of my extensions from calling eachother. I’m not doing this for any multi-tenant purposes, we just don’t want our guys dorm calling the girls dorm or visa versa. This is what we are using in our custom context.

[from-restricted-exts]
exten => _25Z/_26Z,1,Goto(app-blackhole,congestion,1)
exten => _26Z/_25Z,1,Goto(app-blackhole,congestion,1)
exten => _[*0-9]!,1,Goto(from-internal,${EXTEN},1)
exten => h,1,Hangup()

This works fine, but I noticed it prevented the extensions using the custom context from receiving blf hints. I did some digging and found that adding subscribecontext=ext-local to chan sip settings allowed them to update for other extensions. But after doing that, I noticed none of my extensions were able to do blf for parking, DND, and follow me. Is there something I need to add to the custom context to allow those extensions to receive hints?

1 Like

Seriously, they aren’t allowed cellphones?

If I was a college kid , I would find the in-house geek that surely already realized that you have an Asterisk Based system (Alison’s voice gives it away) then the geek can hack you unmercifully. Remember that the enemy is often better armed than you (The art of war. Sun-Tzu , probably 25 hundred years ago :wink: )

It’s actually a boarding high-school. And I’m actually a student myself. So I don’t consider my fellow students enemies. But it is something the school wants, and I’m in charge of making it happen. Maybe if the right student figured out that we were using asterisk, they could take advantage of it, but in general, we’re offering the students a better option than existed before, where they had to use phone cards to make calls to the US, and a relatively secure option if set up properly, which is what I’m attempting to do, so I doubt many of them will immediately think “phone phreaking,” and be able to pull it off.

But I’m still having problems with BLF while using a custom context. I think I need to add hints to the context, but I’m not sure how to do that. I also noticed that even when I take off the subscribecontext setting, the default context extensions don’t seem to update BLFs monitoring the custom context extensions. Surely there is a simple solution, I’m just having a hard time grasping even the surface asterisk details.

Rather than rebuild this particular wheel, there are several Commercial modules that can be used for this. Class Of Service (which is apparently the Swiss Army Knife of context modules) would seem to be an excellent place to start. It can be used for many different functions, not the least of which is limiting who can call whom.

Another solution to your problem might also be to approach this from a different perspective. While writing your custom context seems logical, you have seen first-hand that there are second and third-order problems that can’t even be solved yet. For example, changing this so that all of the calls to the women’s dorm are handled through an outbound route, and all of the calls to the men’s dorm are handled through a different outbound route. This would yield a setup that looks amazingly like what you’ve already set up without the need for custom code.

I started working on this, I made some intra company outbound routes. And later when I went to make some more changes, I got this error.

I can’t undo the changes I made because I can’t access the module. I also tried disabling extension routes, but that didn’t fix anything. What can I do to fix the module?

How we all wish this would support blocking ext to ext.

Try reloading, fwconsole reload.

Thanks, that worked to fix the error.

But I’m not having success matching internal calls using a wildcard. In my case, I want all calls going from 26Z to 25Z to require a code. But even without using 26Z in the caller ID, I can’t get it to match.

Isn’t this what should be required?

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