private QualityIndicator ConvertToNamedQuality(VATRPCall call) { var rating = (float)LinphoneAPI.linphone_call_get_current_quality(call.NativeCallPtr); if (rating >= 4.0) { return(QualityIndicator.Good); } if (rating >= 3.0) { return(QualityIndicator.Medium); } if (rating >= 2.0) { return(QualityIndicator.Poor); } if (rating >= 1.0) { return(QualityIndicator.VeryPoor); } if (rating >= 0) { return(QualityIndicator.ToBad); } return(QualityIndicator.Unknown); }