Jemanden anrufen is about the activity of picking up the phone and calling a number.
Mit jemandem telefonieren is more about the actual conversation that is conducted on the phone (VoIP included).
Anrufen is a very short activity, whereas telefonieren can last for anything from a few seconds to several hours.
Ich habe dich gestern mehrmals angerufen, aber es war immer nur der Anrufbeantworter dran.
In this context, telefonieren would not work, because telefonieren implies that a conversation actually takes place.
Ich wollte mit dir telefonieren, aber es war immer nur der Anrufbeantworter dran.
Again, a conversation has not taken place, so this works. You cannot use anrufen when you describe the duration of the phone call.
Ich habe ihn zehn Minuten lang angerufen.
That means that I’ve tried for 10 minutes to get him on the line, but it sounds awkward. Better:
Ich habe zehn Minuten lang probiert, ihn anzurufen.
And this is also fine:
Ich hab ihn angerufen und zehn Minuten mit ihm gesprochen.
which is the same as
Wir haben zehn Minuten telefoniert.