public bool HangUp(string hostAddress, Codec codec) { var cmd = new CommandIkusNetHangUp { Codec = (IkusNetCodec)codec }; return(SendConfigurationCommand(hostAddress, cmd)); }
public async Task <bool> HangUpAsync(string hostAddress, string deviceEncoder = "Program") { // If the device have multiple encoders to hang up var deviceLineEncoder = string.IsNullOrEmpty(deviceEncoder) || deviceEncoder == "null" ? "Program" : deviceEncoder; IkusNetCodec hangupSelectedEncoder = IkusNetCodec.Program; try { hangupSelectedEncoder = (IkusNetCodec)Enum.Parse(typeof(IkusNetCodec), deviceLineEncoder, true); } catch (Exception) { hangupSelectedEncoder = IkusNetCodec.Program; } var cmd = new CommandIkusNetHangUp { Codec = hangupSelectedEncoder }; return(await SendConfigurationCommandAsync(hostAddress, cmd)); }