I've been having this problem ever since I got my Motorola Droid basically (November 2009). Sometimes my droid will dial the last number that was called by itself while it is locked.
Whenever I am done making a call or using my phone I hit the screen dim button at the top. Also I have the pattern lock code turned on. I also have a blue tooth headset that is always attached to my phone, its this Plantronics Discovery 925:
Amazon.com: Plantronics Discovery 925 Bluetooth Headset (Bulk): Electronics
Basically my droid will just call the last number that I have called on it's own. This happens when I have it in my pocket, and when I have it just sitting on a table with nothing touching the phone or my headset. Sometimes like when my friend is right next to me, he will say hey your calling me, and ill take my phone out of my pocket, hit the screen dim button, and I will see that it is still locked with the pattern lock, but that a call is underway (phone call icon is present in the top left)
I was wondering it somehow my bluetooth making these calls, but as far as I know there is no way to actually make a call directly from the bluetooth, and at any rate the phone is locked.
I recently read another post saying that this may be caused by the phone automatically going to the call log after ending a call, so I downloaded this App that was recommended called "Not Call Log" and I have set it to make the phone go to the home screen instead of the call log when calls end.
However just yesterday I have just seen it call by itself twice even after I installed this new app, so it seems the app is not solve the problem. I have seen many threads on this topic but none with any solutions except to use the Not Call Log app, which at least right now doesn't seem to be fixing the issue.
I'm wondering if anyone has any ideas about this or can point me to a thread that has some other things to try to solve this problem as it's getting sort of annoying.