I have changed the active voice "I was buying a doll for my daughter when you called me" in to passive form as
"when you were called me a doll was being bought for my daughter by me".
is it correct?
Yes, but no native speaker would ever say it like that.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.