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.
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.
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.
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:
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:
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.