This issue is for a: (Create outbound call Error: Not allowed to impersonate)
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
1- The azure communication service is connected to multi cognitive service.
2- The mobile number is linked to the Azure Communication Service.
3- The Ngrok is running and working fine.
Any log messages given by the failure
Not allowed to impersonate.
OS and Version?
Windows 10.
Versions
.Net Framework v4.7.2
Mention any other details that might be useful
The issue error appear when call CreateCallConnectionAsync method.
The SourceIdentity is retrieved successfully from CreateUserAsync method.
var source = new CommunicationUserIdentifier(callConfiguration.SourceIdentity);
var target = new PhoneNumberIdentifier(targetPhoneNumber);
var createCallOption = new CreateCallOptions(
new Uri(callConfiguration.AppCallbackUrl),
new List<MediaType> { MediaType.Audio },
new List<EventSubscriptionType> { EventSubscriptionType.ParticipantsUpdated, EventSubscriptionType.DtmfReceived }
);
createCallOption.AlternateCallerId = new PhoneNumberIdentifier(callConfiguration.SourcePhoneNumber);
var call = await callClient.CreateCallConnectionAsync(source,
new List<CommunicationIdentifier>() { target },
createCallOption, reportCancellationToken)
.ConfigureAwait(false);
private static async Task<CommunicationUserIdentifier> CreateUser(string connectionString)
{
var client = new CommunicationIdentityClient(connectionString);
var user = await client.CreateUserAsync().ConfigureAwait(false);
return user.Value;
}
This issue is for a: (Create outbound call Error: Not allowed to impersonate)
Minimal steps to reproduce
Any log messages given by the failure
OS and Version?
Versions
Mention any other details that might be useful