As far as carrier testing, ATT didn't even get to see an iPhone until December, 2006, a month before it was first shown in public. Even the engineers at Apple were kept in the dark, working on bits and pieces, and only a few had access to complete units.
The iPhone was field tested in secret for about 2-1/2 months before sales launch. This is a little longer than most phones.
Here is an article about it.
One of the first things the field testers noticed was that the volume was weak. Interestingly, for months after first sales, it was still a complaint. Looks like production was already in full swing and only later models were fixed. (Yes, I know they tried software fixes.)
Apparently due to secrecy, the field testers were mostly trying out reception, and not the features so much, or it would've had perhaps more contact and SMS features right away. It doesn't look like ATT got to give much input before launch.
Another oddity: because of the secrecy, the ATT
laboratory tests of the iPhone radio were carried out earlier in 2007 without full devices. That is, ATT only got radio test units, with no other software.
Kevin
(telco contract engineer)