Hi,
Wondering if anyone can provide some pointers to automate as much as possible the setup of a new 15 Freepbx with 300+ extensions + phones. The phones can be configured to point to the new Freepbx server tftp to grab .cfg files but it still leaves the creation of all the .cfg files and all the extensions on the new Freepbx server.
There is bulk extensions but that still requires manual creation for each extension. Is there any way to automate the extension creation?
Or you can manually create the config files once and upload them to the server.
For me, I would do it manually because I use Yealink phones and the unique bits per extension are only a few fields. So I make a template file that has most settings. Then a model based template if needed and then a cfg per MAC address that basically only has the extension credentials. I also put the /tftpboot folder into a private git repository to handle changes from anywhere.
That is assuming that once created, these wonât change much. If you need more dynamic changes, EPM is the best solution as long as the phones are supported.
Using EPM still requires manual configuration for ext.# user/pass right? Plan on using Yealink phones also. There is a cfg configurator but this too requires configuration for each phone due to credentials even though all the phones will have the same configuration.
I donât think the EPM will create all the extensions in Freepbx. It will still require the mac_addresses.cfg.
Normally (installation with 20 or so extensions) I would just create the extensions manually in Freepbx and configure the phones. But 300+ phones and extension creation in Freepbx is another issue which I would love to find a way to automate.
If in a new Freepbx 15 server having all the mac_address.cfg in /tftpboot would allow the ext/user/pass to be created 1st time from the phone booting up after loading its .cfg, would save a ton of time.
Youâre going to waste as much time building automation as he will just building it. Unless youâre going to repeatedly install these things like this, thereâs no point in âautomating â.
Edit: if you are doing this multiple times, then Iâm not gonna write you a script to make your money. Do it yourself.
For the extensions I think Bulk Handler can help you. Iâm guessing youâve got a list of user names and e-mails. You can build one extension, export the list, then easily copy the desired settings and names and upload it. Might save you some time.
This is just a bad idea all around. It was clearly not thought through outside of the âThis is what I wantâ logic. Putting a blank macaddress.cfg isnât going to do jack for creating extensions/users on the system.
How will FreePBX know what extensions to create? Is it going to start a 100? 1000? Itâs just going to guess which extensions it should have?
What is it going to name the extensions? The name that is also used for internal CallerID and ConnectedLine updates. Randomly going to make up a name?
Youâre using Yealinks so Iâll use that for this example. Say I have a few T30âs for break rooms or simple access phones but then I want everyone else on T-38Gâs, the reception phones as T-46Uâs with perhaps sidecars that the management being a T-5X phone. So now you have multiple models of a phone based on the users that will use them. How will a blank macaddress.cfg be able to determine which is which?
FreePBX/Asterisk is a multi-tech based system. This all works under the assumption that everything is SIP based. That canât be an absolute, at all.
How will it know that X amount of extensions donât need user accounts (UCP) because thereâs no need for them. How will it know which extensions need user accounts and what those user accounts should have permission for?
What about different configurations for the phones? I mean if there are T-46Uâs with sidecars and then some with out, how will you handle that? How will you handle X phones needing 5 BLFs and certain softkeys while Y phones donât need BLFs but different softkeys?
And this is just a quick 50K view I see based on this thread. I havenât even gotten into the real grit of how this would run, validations schemes and other backend things that would need to happen for a very poor deployment methodology.
Do this properly and create a .csv file to bulk important the extensions. I do this with hotels when needed and to do a bulk import of 100âs of extensions takes less than an hour which includes formatting the .csv file with a lot of details. The basic import has like less than a dozen required fields.
When I posed the question, it was a general question without a lot of detail obviously. There wonât be unique âhuman namesâ just basic ext. # => name with name = extension #. In other words ext. 100 will display as 100 and Freepbx username will be 100. The issue there of course is the password. Unless one uses the same password for all phones.
All the phones will be the same, Yealink T31P.
The phones go to different locations. but all locations will have l2tp/ipsec tunnel to the data center router. Inside each location they will have the same vlanID so that if they move some phones to other location(s) where they might be short, the phone will work. Of course if the moved phones were part of ring group, that will require manual change in Freepbx but thatâs no big deal. And not to mention any extension change in an IVR. Again thatâs not a big deal.
I donât quite get why you are saying something about blank mac.address.cfg. Every phone has to have (at least as far as I know) a unique mac.address.cfg file in /tftpboot.
The distributor has told me they will setup the redirector at Yealink to point to the IP address of the Freepbx server. But that just brings back the same problem, that is creating all the extensions in Freepbx with passwords. Somehow I see sorvaniâs point. Trying to automate will probably take twice as much time as to just create the 300+ extensions 1 by 1 in Freepbx.
As for extension numbering I would just start at 100 and move on. Since they are planning to move phones around, it doesnât make much sense to make naming convention based on a building number.
So use the Bulk Handler to import the extensions. Then use the EPMâs Bulk Import function to import the MACs of the phones, who they are assigned to and the profiles they should use.
All Yealinkâs service provides is having those phones reach out to their provisioning server which will push a config that has your provisioning server details. Youâre still going to need to create the profiles on the system for the phones to grab. If you donât youâll just have a bunch of âfile not foundâ errors in the logs while the phones request the configs that donât exist.
This is a couple hours of work (tops) that includes the time spent creating .csv files. The actual imports take minutes to process. Youâre making this a bigger task than it needs to be.
But where do the passwords for the extensions get made? If you create a .csv or after building the new Freepbx server, create one extension and then export it to .csv it will have a password for the one single extension. What about the other 300?
Thanks.
Do you have a directory full of Yealink config files that already have extension numbers and passwords within?
I know others are talking you out of it but if thatâs what you have then you can use the script I gave you earlier in the thread; just replace the simple for-loop with data that you get by scanning the cfg files in tftpboot⌠you can see how the password is set and everything.
That is a workable solution, but if the poster wants to set some different defaults for an extension, may not be settable via the API. For example, I donât think the API lets one set the accountcode on the extension?
That is why I would manually create 1 extension setup the way you want, then do a bulk export of the extension, incoming routes and user manager. Of course you have to decide if you are using the user manager, what defaults you want to use (using VM? What VM settings to set, inbound fax support? etc)
Then write a shell script that will write out the appropriate info for each additional extension into CSV files, then bulk import the files.
I agree with you. Using the Quick Create in a command line script is no different from using Quick Create in the GUI. Itâs good for generating a nearly featureless extension config. Except with a script you can do a bunch of them. If OP just wants to blast out several hundred extensions all set with defaults, itâs easy. For a bit more precision configuration, you and BlazeStudios have provided the better way.
This all requires the configurations to exist on the final destination server, in this case the FreePBX server. That means that 1) The extensions need to already exist. 2) The EPM has been used to create these configs. Zero touch provisioning solves none of the pre-existing steps needed. It only solves the not logging in to each phone to get the profile problem.
Yes, since others seemed to have the prerequisite steps in discussion, I thought I could add the ZTP as a method to be aware of to help expedite the login and eventual config update process. Still seems relevant to the topic at hand, but only a suggestion, not the only way.