When they installed the generator, they had to also install a transfer switch which means they had to kill the power to the building.

I'm willing to bet they didn't turn off everything, like your phone system and it had to go to the UPS.

Like everyone else said, UPS was probably bad or on the edge of being bad. When I was taking care of Fire Alarms at a school District, I got into the habit of testing everything that was battery backed up once a year and replaced the batteries every 5 years.

I have seen way too many UPS units that have never been touched since they were installed and many were so overloaded they would never of worked correctly even if new.