Esempio n. 1
0
        public async Task <AudioMode> GetAudioModeAsync(string ip)
        {
            var url = CreateUrl(ip, "api/audioalgorithm");
            var audioAlgorithmResponse = await HttpService.GetWithBaresipResponseAsync <BaresipAudioAlgorithmResponse>(url);

            return(new AudioMode
            {
                EncoderAudioAlgoritm = BaresipMapper.MapToAudioAlgorithm(audioAlgorithmResponse.EncoderAudioAlgoritm),
                DecoderAudioAlgoritm = BaresipMapper.MapToAudioAlgorithm(audioAlgorithmResponse.DecoderAudioAlgoritm)
            });
        }
Esempio n. 2
0
        public async Task <LineStatus> GetLineStatusAsync(string ip, string lineEncoder = "Line1")
        {
            var url        = CreateUrl(ip, "api/linestatus");
            var lineStatus = await HttpService.GetWithBaresipResponseAsync <BaresipLineStatus>(url);

            return(new LineStatus
            {
                LineEncoder = "Line1",
                DisconnectReason = BaresipMapper.MapToDisconnectReason(lineStatus.Call.Code),
                StatusCode = BaresipMapper.MapToLineStatusCode(lineStatus.State),
                RemoteAddress = lineStatus.Call.RemoteAddress
            });
        }