public IResponse CallHangup(uint session, HangupReason reason = HangupReason.Normal) { try { string result = _client.Post(new Uri(PhoneCallEndpoint.CallHangup(session, reason), UriKind.Relative), null); CallHangupResponseJson callResponse = JsonConvert.DeserializeObject <CallHangupResponseJson>(result); IResponse respone = null; if (callResponse.Success) { respone = new CallHangupResponse(); } else { respone = Utils.ErrorResponse(result); } return(respone); } catch { throw; } }
internal static string CallHangup(uint session, HangupReason reason) { string api = "/api/call/dail"; api = string.Concat(api, "?session=", session); api = string.Concat(api, "&reason=", reason.ToString().ToLower()); return(api); }