There is a bug in iOS 5.1 and 5.1.1 where the devices audio engine can crash in certain situations when using the plug in headphones and mic. This will cause a problem with outgoing audio and due to the way SIP works could also cause an issue with incoming audio. We have already notified Apple of the issue and they should have it resolved in an upcoming update.
In the meantime, we have a workaround.
Tap on settings, then preferences, then Sound. Turn echo suppression off. This should get rid of the issue. One note. Having echo suppression off will likely have no effect when using the phone the normal way or with the headphones w/mic, but it will likely cause echo to increase for the other side of your calls when using speaker.