Change phone configs for 200+ phones to enable DHCP and change default gateway

Hey guys,

I’m looking to change a bunch of phones from using a static IP to grabbing one from DHCP while also editing the default gateway. I know I can physically do this from the phone, but if I could save myself from going to every phone in the building it would be immensely helpful.

I’m pretty new to FreePBX and Asterisk. I’ve set up plenty of phones, but the back end was handled by someone else until they left. I was tasked with VLANing off the phones. Which has gone flawlessly in a test environment, but this is the last hurdle. I don’t want to spend my weekend manually changing every phone.

Thank you for the assistance!

-Paul

I just posted a suggestion for freepbx 15 to have a command in EPM to factory reset phones. What would you like to see added in FreePBX 15?

This will help people like you.

I remember we had to do this once at a client with 40+ Grandstream phones, IIRC we wrote a curl script which logged into each phone, factory resetted the phone, and we obviously had DHCP option 66 activated, so as soon as the phone came back up it automatically provisioned with the correct extension. Good times…

Not sure it would be much help. I’d still need to touch phones to enter the IP for the phone server, as well as put in the user/password creds.

Unless there’s a way to push those…

In either case, a way to alter the configs on all the phones remotely at once would be immensely helpful.

This is called provisioning, and endpoint provisioning has been provided by the Endpoint Manager module for a very long time. Unless your time is worthless, any environment with more than a handful of phones should not be manually configuring phones, and I can’t for the life of me imagine how you ended up with 200 phones with static IPs.

You are probably stuck with touching every phone at this point, but with proper planning, it should be for the last time.

Not really sure how this post is supposed to be helpful to me. Like I mentioned I’ve inherited this system. Obviously I think it’s a bad idea how it was deployed, and is why I’m trying to simply/improve the process. The system was also using the same subnet and VLAN as other clients. I’m making improvements where I can.

Perhaps pointing me to a resource that would help me use this endpoint manager you speak of, but it seems that it’s fruitless based on your last comment. Your mention of endpoint manager module comes off a bit condescending… enlighten those that are new to the product.

Respectfully,

-P

Really don’t see how anything I said could be construed as condescending, certainly that wasn’t my intent. Links to EPM resources:


https://wiki.freepbx.org/display/FPG/EndPoint+Manager
https://wiki.freepbx.org/display/FPG/EPM-Supported+Devices

As a commercial module, it is only supported on the FreePBX Distro:
https://wiki.freepbx.org/display/PPS/How+to+detect+if+you+are+using+the+Official+FreePBX+Distro

There is also a competing free OSS endpoint manager that may work for you, but I have no experience with it to share.

You will have mac-based file named files in your configuration directort, depending on you phones, they are generally text baswd and suscetable to the linus atream editor

sed ‘s/currentstring/newstring/’ macnmed.cfg

Compare a static based file with a dhcp based one with the linux difference program

diff static.cfg dhcp.cfg

Apologies for misreading. Defining the statement of my previous post, and mentioning something that’s been around a very long time. Just kind of came of as unhelpful. I understand what provisioning is, and it’s something I do regularly with WAPs. Phones are just new territory for me. I’m also miffed by why we set up phones this way.

Thank you for the pointer to the resources. I’ll start reading/learning more…do you think this will help with my current issue? I also use Polycom devices. Would this EPM work with those?

Excellent suggestion. I’ll take a look. I know I’ve seen the config file before when digging around. I’ll compare the two from my test environment, and see what I can turn up.

I imaging editing this file, and rebuilding/rebooting the phone will spur the phone to change its settings?

…I imaging editing this file, and rebuilding/rebooting the phone will spur the phone to change its settings?..

Of course :wink: , that IS where the phones get their settings (unless you add some ‘local’ stuff, which would over-ride the mac.cfg settings )

Yeah, I think this is what I’ve run into. Basically every phone has an individual config because everyone has their username displayed on the device.

However, I did find that I can use the web interface to log into each phone to make the change. Still have to “touch” every phone, but at least I can do it all from my desk.

As for EPM…we have the free OSS endpoint manager. Doubt I’ll get the money holders to fork up the license costs within a reasonable time.

the local config only over-rides the setting that arte locally added/change, the underlying files will still have the description aof the method and likey an address/netmask/gateway/static for those statically provisioned and a simple DHCP intruction to replace the above ones

That’s crazy. Call it 200 phones at 5 minutes a piece - that’s almost 4 hours. It’s a wash after the second hour and money ahead at the third.

Note: Shhhh - I know, but that’s the line I’d start with for my money guy (converting static to DHCP is always manual…). There’s no reason to poke the obvious hole in the argument - you really do want to have EPM for managing this many phones.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.