BT has successfully defended a £1.3 billion class action over allegations it “disproportionately overcharged” its landline customers.