Basic BLF setup questions for a multitenant PBX

Good morning community;

All SIP accounts on my multitenant Asterisk 1.8 PBX have a unique 6 digits combination (XXXXXX);
On top of this, each tenant may have the same extension number configured in their PBX (2001, 2002, etc);
When a call comes in, it is dialed this way: Dial(“SIP/XXXXXX”);
An extension can call another extension by using the 4 digits extension number as well;
…all of this works fine.

  1. If I want to configure BLF for all PBX tenants, do I just create a “blf” context and put all 6 digits account numbers in there and configure each phone on the platform to use the account number as its BLF value? Or is there a better way to do this for my context? e.g.

exten = 111111,hint,SIP/111111
exten = 222222,hint,SIP/222222
exten = 333333,hint,SIP/333333

  1. I also don’t quite understand how the “BLF call pickup prefix” on the grandstream phones comes into place and how it would integrate into this dialplan? If someone could ELI5 that would also be appreciated.

As always, thank you !

There’s zero support for Asterisk 1.8. It’s been EOL and dead for years now. You’re going to need to update to get proper support.

Sure, I fully understand it, but I would believe that the dialplan BLF configuration remained the same since it’s still documented the same way:

My question is generally speaking, how do we do achieve this in my business context; so it’s not really syntax related.

OK so you’re hints can be in any context. The peer/endpoint just needs to belong to that context so it can subscribe to them and watch them. So where you put your Hints in your dialplan code is up to you.

As for the Call Pickup Prefix, that is what you prefix calls for Directed Call Pickup. So if it defaults to ** then it means it will send **<digits> to the system when you use it. That will require in your dialplan to have matches for **XXX or whatever length(s) your extensions are for the pickup. You’ll need to use the Pickup() function and tell it what to use to pickup the call.

And since this is multi-tenanted you’ll need to do this so you don’t have cross-tenant issues. You don’t want Tenant A to be able to subscriber and watch the hints for Tenant B. Nor do you want A to be able to pickup or see anything related to B and vice versa.

We really can’t get you help on your business context/logic setups. That’s up to you.

Ok, gotcha, so I need to have them subscribed in different contexts at firsts so that they dont subscribe to accounts they don’t need to access to such as:

exten = 333333,hint,SIP/333333
exten = 333777,hint,SIP/333777

exten = 444444,hint,SIP/444444
exten = 444777,hint,SIP/444777

And so for what regards the Directed Call Pickup, then, from what I understand what you are saying, the **XXXX code handling shall be placed in the same outgoing call context as when they normally call and should be handled similarly to this:

exten => _**2001.,1,Pickup(333333@pbx-a)
exten => _**2002.,1,Pickup(333777@pbx-a)

exten => _**2001.,1,Pickup(444444@pbx-a)
exten => _**2002.,1,Pickup(444777@pbx-a)

Does this look ok?

Thanks !

No, you need to pick up the channel not the hint. Pickup() has 3 methods that can be used to pickup a call on a channel described here. Basically if it’s just Pickup() then it will attempt to pickup any channel that belongs to call groups the channel picking up the call has in its pickup_groups. If it is PickUp(exten@PICKUPMARK) then it will look for a channel that has that exten and PICKUPMARK set on it. If it’s PickUp(exten[@context]) then it will pickup the call for the specified extension in that context. If no context is used, then the current context the picking up channel is in.

Excellent explanation I know where I am heading with this from now on.
Thanks a mil and have a great day