PHP Classes

Stumped, Decision making script

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in

      Top level forums  >  PHP Specialists  >  General  >  Stumped, Decision making script  
Subject:Stumped, Decision making script
Summary:Looking for help with decision making script
Date:2012-09-25 01:29:27
Update:2012-09-25 01:40:19

  1. Stumped, Decision making script   Reply   Report abuse  
Picture of matt matt - 2012-09-25 01:40:19

I want to make a script that helps me configure the correct ShoreTel configuration. Those of you who don't know ShoreTel it is a Unified Communication Solution - or a phone system.

There are different appliances that work together through racking and stacking. I want to make a tool that I can put in how many phones there are how many analog lines, analog extensions, and how many digital lines trunk groups to configure the correct appliances for the solution.

The problem is that it is very dynamic. Each appliance has a certain amount of ports and analog lines it can support.

For example the SG90 can support 90 IP phones or it can support 8 analog lines or 8 analog extensions. Each analog line takes up 5 IP resources so if you had 4 analog lines and 70 IP phones the appliance would be maxed out because you would calculate 70 plus 5 * 4 = 20. 20 + 70 = 90. 90 is the max amount of IP resources the system can handle.

There are different appliances too such as an SG50 it can support 50 IP phones or 4 analog lines or 4 analog extensions. Once again if all 4 analog lines are in use you can only hook up 30 IP phones to it because 20 of the IP resources are being used up by the analog lines.

For larger installations these switches are racked and stacked in order to meet the larger requirements, but the way they are chosen is very precise. For example if there were 175 Phones you would use 2 90s as that would give you exactly 180 IP phones, however if they had 2 analog lines that would require you to use an additional switch or you could use a 120 and a 90 instead.

This kind of decision making is simple for me and I can quickly analyze all the options, however, when I think of making a script for it. I quickly find I would have boolean statement within boolean statement and loops within loops and even then I don't believe I am analyzing all the combinations for larger installations that may need to use 10 or 20 of these switches stacked...

How do programming languages deal with configuration techniques multiple options. I realize this is complex answer, but I do not know where to even begin learning how to do this.

I have some MySql skill and also basic scripting, but need to understand the fundamentals better on something like this.