> I have a single freepbx machine that is using inbound routes to send calls to 
> the proper school district

This is just routing "PSTN" calls to/from the correct PBX, and you're looking 
for a box to distribute calls to the correct location (along with some 'on net' 
routing to avoid sending calls that should be from one pbx to another to the 
actual PSTN)?

There are some modules like dbalias, dialplan, carrierroute, dispatcher, etc. 
that can be used for this, but you can use sqlops to write arbitrary queries to 
your DB for call routing.

First assess the source of the initialI NVITE - is this from a PSTN or one of 
your PBXs? This is the first of the three A's (Authentication, Authorization, 
and Accounting).  You can do this by IP address (the permissions module is 
helpful here, or again, roll your own),  If it's from one of your PBXs,  you'll 
know who to account the call to. It's also possible to issue an authentication 
challenge (auth and auth_db modules) rather than authenticating by IP address.  
Usually you'd peer with PSTN  carriers by IP address.

Next, determine the destination and if the calling party has permissions to 
reach it.  For inbound calls from the PSTN, this is looking up the RURI user in 
a table (try the alias_db module) to determine if the number belongs to one of 
your PBXs, and if so which one.  If it's from the PSTN and isn't a known number 
reject it (404 not found), and if it is for a PBX, relay it to the PBX.  If the 
initial invite is from one of your PBXs, still check to see if it's in your DB 
(an on-net number) and if so, route it.  If it's destined for the PSTN, then 
check any rules on whether or not the call is allowed (i.e. international 
calling might not be allowed to every country), and route it.

That's the general jumping of point.  You might have other needs (failover 
routing, caller id dips, etc), but that should get you started.

Regards,
Kaufman

From: Wayne Wenthin via sr-users <sr-users@lists.kamailio.org>
Sent: Tuesday, April 9, 2024 3:06 PM
To: sr-users@lists.kamailio.org
Cc: Wayne Wenthin <wayne.went...@cascadetech.org>
Subject: [SR-Users] Newbie looking for advice


CAUTION: This email originated from outside the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.

Hi All,

I'm new to Kamailio but have been running dozens of Freepbx systems for the 
last 10 years.   We are an Education Service District and service K-12 schools. 
Many of these we provide dial tone to, the rest we have connections to to 
provide for toll avoidance and backup outbound calling when the LEC fails. Our 
main focus is to save schools money that can be used for education instead of 
infrastructure.

Right now I have a single freepbx machine that is using inbound routes to send 
calls to the proper school district. I would like to replace this with a 
Kamailio server instead but can't seem to get my mind around the best way to do 
this.
I have 119 inbound routes in my current system with 22 trunks to the other 
districts. This may increase in the future as we try to migrate districts off 
of the expensive systems to a more open source way of calling.
Currently calls between districts take the route out of the system just to come 
right back in to be routed to a different district.   I would like to avoid 
that if possible.
I've been trying to educate myself on the best practice in this type of 
structure but can't seem to figure out the best way to make this work. Most of 
the videos and websites assume a pretty intimate knowledge of Kamailio. That 
and the database structure doesn't make sense to me.
I would like to keep each freepbx as its own registrar as we have lots of 
crossover with extensions and a few of the districts have their own staff that 
manage that aspect of the machines. .
Any suggestions would be appreciated.  Please ask questions if this just looks 
like I'm rambling.

--
Wayne Wenthin
Wide Area Network Administrator | CTA@MESD
503.257.1562  Phone/Fax
www.cascadetech.org<http://www.cascadetech.org/>

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to