SOLUTION: stuck on "calling..." or "ending call..."
Symptoms:
The dialer is stuck saying "calling..." and hanging up leaves you stuck on "ending call.." If you switch to another app the dialer still seems to be calling even if you left it with "ending call..." on screen.
People calling you hear a ring but your phone doesn't.
Killing the dialer manually gets full dialer functionality back but you still cannot dial out or receive voice calls.
Cause:
You have no Mobile Data connection. Either under Settings > General > Network > Mobile Data is turned off or the network has blocked Mobile Data due to a fault or lack of calling credit.
Also, for the described problem you have Settings > General > About > Diagnostics & Usage > Automatically Send selected.
Solution(s):
Kill the dialer app - this may work for some, but the problem will likely reoccur.
Restart your phone - again usually a temporary fix (if at all.)
Backup, Factory Reset and Restore - definitely will work for a much longer period but a lot of hassle and not a permanent fix.
Go to Settings > General > Network > Mobile Data and turn it back on (if unintentionally switched off.) If intentionally switched off, toggling on then off works for some. Again this is a temporary fix.
If you have calling restrictions affecting Mobile Data, get them lifted / buy more credit.
If none of the above work, select Settings > General > About > Diagnostics & Usage > Don't Send. N.B. if this your permanent solution don't expect next year's iPhone X to be quite as good as you hoped - Apple need this information to spot software bugs and guide phone design.
Also, if any of the above fail to work, try killing the dialer and/or restarting the phone again before trying other options.
Why does this happen?
I can only guess the code running the Diagnostics is hard wired to send out via Mobile Data, the status of your WiFi signal makes no difference. Still guessing I would say that some sort of log file is filling up during usage of various apps. When this file is full, no further data can be sent an no further log messages can be collected. For example, the dialer wouldn't be to interested in browsing through the address book but it would want to log a call made, the signal quality and whether the call got dropped. If the log is full it gets stuck posting its first message when you hit the dial button..
So, toggling the Mobile Data setting might get some of the data out of the log file and certainly a complete Restore would clear it all but it would still fill up again in time. Really, it's just a choice between getting Mobile Data back on / lifting calling restrictions or switching off the sending of Diagnostics & Usage denying Apple vital information on improving their products.
Hope this is of help!
Best Regards,
Andy @ POSitality
iPhone 4