Exemple #1
0
        public async Task ContinuePhoneAudio(string phoneNumber, CancellationToken cancellationToken)
        {
            if (string.IsNullOrEmpty(phoneNumber))
            {
                return;
            }

            PhoneAudioInvitation phoneAudioInvitation = new PhoneAudioInvitation()
            {
                OperationId = Guid.NewGuid().ToString(),
                PhoneNumber = phoneNumber
            };

            await HttpService.Post(Links.continuePhoneAudio, phoneAudioInvitation, cancellationToken);
        }
Exemple #2
0
        public async Task StartPhoneAudio(string phoneNumber, string to, string subject, Importance importance, CancellationToken cancellationToken)
        {
            if (string.IsNullOrEmpty(phoneNumber) || string.IsNullOrEmpty(to) || string.IsNullOrEmpty(subject))
            {
                return;
            }

            PhoneAudioInvitation invitation = new PhoneAudioInvitation()
            {
                PhoneNumber = phoneNumber,
                To          = to,
                Subject     = subject,
                Importance  = importance,
                OperationId = Guid.NewGuid().ToString(),
                ThreadId    = Guid.NewGuid().ToString()
            };

            await HttpService.Post(Links.startPhoneAudio, invitation, cancellationToken);
        }