+0
I would have come if only you had rung me.
Can if only be used this way? Strange.
Or does this sentence mean other than it was my wish you rang me because than I could have come, which/what I wanted so much.
2nd question: which or what?
Comments  
I would have come if only you had rung me.

This is correct, but it means something else:

You just had to call me, and I would have come. (But you didn't call.)

or in a modified version of your interpretation:

I wish you had rung me, then I would have come. (You didn't call.)

Or in other words:
The only condition for my arrival was that you had called me.
Answer to the second question: definitely which. What doesn't make sense here at all.
Teachers: We supply a list of EFL job vacancies
Thanks. I got it now.
PastsimpleAnswer to the second question: definitely which. What doesn't make sense here at all.



What I must do is write a letter (correct) = Write a letter is what I must do (correct) = I could have come, what I wanted so much.
I see analogy between the two examples.
Inchoateknowledge
PastsimpleAnswer to the second question: definitely which. What doesn't make sense here at all.



What I must do is write a letter (correct) = Write a letter is what I must do (correct) = I could have come, what I wanted so much.
I see analogy between the two examples.

Hi Inchoateknowledge

What I must do is write a letter. (OK)
What I must do is to write a letter. (OK)
Write a letter is what I must do. (wrong)
To write a letter is what I must do. (OK, very formal)
Writing a letter is what I must do. (OK)

I could have come, which I wanted so much. (The antecedent is the entire main clause.)

Both the full infinitive (to hear) and the gerund (hearing) can be the subject of a clause:
To hear him sing is an unforgettable experience.
Hearing him sing is...

People usually say it with a preparatory it:
It's an unforgettable experience to hear him sing.

Cheers
CB
Students: We have free audio pronunciation exercises.
I see
thx