A 4 digit extension PBX connecting to a 3 digit pbx connecting to a SIP trunk

our company has a tenant on our PBX with a sub division to their company with their own tenant so 2 tenants connecting to 1 SIP trunk, one tenant has a 3 digit extension set up and the other has a 4 digit extension set up, we’re trying to set it up to where the 4 digit extension client connects through the 3 digit client to the SIP. Where would i start to get the asterisk server to notice if its a 4 digit extension that it sends it down the line and if its 3 digits to keep it upstream? The end goal idea is that both of them talk to each other and depending on if its a 4 digit or 3 digit extension it send it to the correct tennant, If it doesnt make sense or you need info please let me know. Thank you

On Thursday 17 April 2025 at 17:37:36, HollanT via Asterisk Community wrote:

our company has a tenant on our PBX

How have you configured Asterisk to understand the concept of “tenants”?

Do you use a graphical front-end management system for Asterisk? If so, what
is it?

Antony.


Pavlov is in the pub enjoying a pint.
The barman rings for last orders, and Pavlov jumps up exclaiming “Damn! I
forgot to feed the dog!”

we do use a ui to connect to the asterisk idk what information i can give without opening up ourselves to an attack but there 100% is a graphical front end that works with our server that has about 100 clients and 400 end points so i know its possible i just dont know where to start

On Thursday 17 April 2025 at 18:09:55, HollanT via Asterisk Community wrote:

we do use a ui to connect to the asterisk idk what information i can give
without opening up ourselves to an attack

Anyone who wants to attack you can find you anyway, but the point I was getting
at is that if you are using a front-end management system such as PBXware or
Issabel then you are far better off asking their support service / mailing
lists / forums than here where people (mostly) just know about Asterisk
itself.

Regard Asterisk as the engine of a car, and your question is how to control
the temperature of the heater - you need to talk to whomever designed the
dashboard, not the people who know about crankshafts and pistons.

Other than that, you’d have to show us details of your dialplan for anyone to
have much of a clue where to start with your question.

Antony.


In science, one tries to tell people
in such a way as to be understood by everyone
something that no-one ever knew before.

In poetry, it is the exact opposite.

  • Paul Dirac

in the sense that i dont want to give out too much information that wouldnt be out there already… I understand what youre getting at but maybe i didnt ask the question right yes we use pbxware but its designed to work with our asterisk… Custom PBX maybe i am asking the wrong questions in the wrong place but from what i understand we can configure asterisk through the cli using the right prompts to notice whether the the end point will be a 4 digit ext or a 3 digit ext, if im incorrect please tell me but i dont know if pbxware or bicom will be help with this specific problem…?

So you want to use three digit extensions that are initial substrings of valid four digit ones; I don’t like that design.

I’d have to try it, but I think you need to set a number timeout, so that it doesn’t wait too long for the fourth digit. I think you might also be able to do it with ! patterns, assuming all digits arrive at once. SIP and Asterisk have no concept of a trunk.

maybe i can help clear up some things, ideally itd be something like exten => xxx, 1,goto(tenant a) exten => xxxx, 1, goto(tenant b) and in tenant b any outbound calls forwarded to tenant a and leave from tenant a’s SIP. Is this possible, i kinda did a very simplified version of whats expected