Forum Discussion
Graph API: create a PSTN call and invite a PSTN participant
yisroelperton: i don't know what exact was the cause: whether a SBC configuration or a Microsoft update. But it works now
relkniw, thank you for that update. Which API call did you use the peer-to-peer, or group call?
I'm using this page for reference:
https://learn.microsoft.com/en-us/graph/api/application-post-calls?view=graph-rest-1.0&tabs=http#example-9-create-peer-to-peer-pstn-call-with-service-hosted-media
- relkniwFeb 09, 2023Brass Contributor
yisroelperton peer-to-peer
- yisroelpertonFeb 09, 2023Copper ContributorHi, I have been using the peer-to-peer API call, and I have the bot making the call for a Team User and a PSTN number, and the call goes through for the Team user, but not for the PSTN number? Would you be able to know which example you were using in the documentation page?
Thank you.- relkniwFeb 10, 2023Brass Contributor
yisroelperton
This is my code for the MakeCall:var call = new Call
{
CallbackUri = Config.CurrentValue.CallBackUrl + ConfigurationConstants.CallbackSuffixCallEvents,
TenantId = Config.CurrentValue.ApplicationClient.TenantId,Source = new ParticipantInfo
{
Identity = new IdentitySet
{
// 05.11.2021 GW Handle PSTN calls
AdditionalData = new Dictionary<string, object>()
{
{"applicationInstance", new Identity()
{
DisplayName = Config.CurrentValue.ApplicationClient.DisplayName,
Id = Config.CurrentValue.ApplicationClient.BotUserObjectId
}
}
}},
Region = null,
LanguageId = null
},
Targets = new List<InvitationParticipantInfo>() { device },
RequestedModalities = new List<Modality> { Modality.Audio },
MediaConfig = new ServiceHostedMediaConfig { },
Direction = CallDirection.Outgoing,
};
var result = await graphAppClient.Communications.Calls
.Request(RequestHeader)
.AddResponseAsync(call);
- prasanth2023Jan 12, 2024Copper ContributorI am developing an application using Graph API to call a PSTN number - call state changes to establishing , But not receiving call on the landline number. Also call satus is not changed to established . can someone help?