Investors of AT&T (T 1.17%) have suffered significant stock price swings throughout 2022. Shares hit a 52-week high in May, a low of $14.46 on Oct. 13, then zoomed past $18 after third-quarter earnings results were released on Oct. 20.

The wild ride may not be over given the uncertain macroeconomic environment this year. But the one constant AT&T has delivered is outstanding customer growth. This fact provides a compelling reason to invest in AT&T. After all, the veteran telecom behemoth is capturing customers from rivals in a highly competitive U.S. market.

Yet reasons exist that warrant waiting to pull the trigger. So let's examine AT&T with an eye on the long term to determine if it's time to buy.

AT&T's tumultuous year

AT&T's stock volatility this year is due to several reasons. The company cut its hefty dividend nearly in half after spinning off WarnerMedia, its big entertainment asset, in April, as AT&T abandoned its Hollywood ambitions to focus on its core telecom business and reduce its mountain of debt.

This was followed in July with a cut to AT&T's free-cash-flow (FCF) forecast for the year, from $16 billion to $14 billion. Inflation had driven up company costs more than expected, and caused customer payment delays, totaling a $2 billion hit to the company in Q2. This put pressure on AT&T's cash flow at a time when the company's capital investments ramped up to expand its fiber optic and 5G networks.

As a result, and coupled with AT&T's decision to raise prices, which could cause customers to flee to competitors, I thought it prudent to wait for Q3 results before considering an investment. Now that these results are out, it may be time to buy shares.

AT&T's successes

AT&T's Q3 results were excellent. The company has seen consecutive quarterly growth in its postpaid mobile phone subscribers, the telecom industry's most valuable customer segment, since Q2 of 2020, when the coronavirus pandemic's onset caused a drop that quarter. AT&T exited Q3 with 83.6 million postpaid subscribers, the company's highest total in years.

Thanks to its healthy customer growth, AT&T saw Q3 wireless service revenue jump 5.6% year over year, the strongest growth in over a decade. The company also saw equipment sales rise 7.2% year over year, hitting $4.9 billion, the highest Q3 total in years, as customers upgraded to 5G-enabled devices.

That's not all. AT&T's nascent Internet-of-Things (IoT) business provides another avenue of growth. This sector is expected to expand from 9.7 billion IoT devices in 2020 to 29 billion by 2030. AT&T exited Q3 with over 100 million IoT connections, the first U.S. telecom carrier to do so. The company also marked the 30th consecutive quarter of over 1 million connected cars added to its network.

AT&T's current streak of success started when John Stankey became the CEO in the summer of 2020. He quickly began divesting the entertainment assets that previous leadership spent billions to acquire, which mired AT&T in tremendous debt.

This shift in focus and resources enabled AT&T's current success, and the company is investing $24 billion over this year and next to expand its 5G and fiber optic networks. As Stankey stated, AT&T's goal is "creating sustainable and scalable businesses that drive a free cash flow flywheel for many years."

Is AT&T stock a buy?

Speaking of FCF, that's the one area to keep an eye on in Q4 earnings. AT&T's 2022 FCF stood at $8 billion through three quarters, which means the telecom needs to generate $6 billion to hit its revised target of $14 billion.

Last year, excluding divested businesses, AT&T's Q4 FCF was $5.3 billion. AT&T anticipates lower capital expenditures in Q4, which will help, but if the company misses its FCF target, its stock price could drop.

This is one reason why further stock price volatility could rear its head. So depending on your appetite for risk, it may be worth waiting to buy shares until Q4 results are out.

Otherwise, AT&T is proving to be a compelling investment for the long term. Under Stankey, AT&T has steadily cut costs, reduced debt, and grown customers and revenue. These results show AT&T possesses a solid strategy that's working.

I think AT&T's current track record of success proves it's worth investing in, and combined with its attractive dividend, currently yielding about 6%, AT&T makes a worthwhile investment over the long run.