The only supported way to connect external equipment to the iPhone is through the iPod accessory protocol via a 30-pin connector. Details of this program are at http://developer.apple.com/ipod/accessories.html . This is not a free program, and the 30-pin connector only supports some features, but it is the only option available today.
source share