Oct 26 2021 03:30 AM
Hi everybody,
within my calling bot I try to initiate a PSTN call like https://docs.microsoft.com/en-us/graph/api/application-post-calls?view=graph-rest-1.0&tabs=http#exam... or invite a PSTN as new participant to an Existing call like https://docs.microsoft.com/en-us/graph/api/participant-invite?view=graph-rest-1.0&tabs=http#example-...
I always get following exception:
InternalServerError
Microsoft.Graph.ServiceException: Code: 9999
Message: Unknown internal server error.
Inner error:
AdditionalData:
date: 2021-10-26T10:15:50
request-id: 58538d09-d622-4d61-854e-61606e0f6530
client-request-id: 58538d09-d622-4d61-854e-61606e0f6530
ClientRequestId: 58538d09-d622-4d61-854e-61606e0f6530
at Microsoft.Graph.HttpProvider.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at RC_MsGraphLink.Controllers.GraphApi.GraphHandler.MakeCall(InvitationParticipantInfo device) in C:\Users\GeW\Documents\tfshome\GLOBAL\MAIN\RC_MsGraphLink\RC_MsGraphLink\Controllers\GraphApi\GraphHandlerCallControl.cs:line 45
My bot has assigned a PSTN number and could be called from extern. Everything also works fine if I try the scenarios with MS Teams Users.
We also followed the instrucions from https://docs.microsoft.com/en-us/graph/cloud-communications-phone-number#assign-a-phone-number-to-yo...
There is a similar problem described here:
https://techcommunity.microsoft.com/t5/teams-developer/initiate-pstn-call-from-teams-to-public-landl...
Any ideas?
Thanks for yout help.
Regards
Gerd
Oct 26 2021 10:05 AM
We are looking into the issue.We will update you
Thanks,
Nivedipa
------------------------------------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
Nov 03 2021 03:21 AM - edited Nov 03 2021 05:50 AM
@Nivedipa-MSFTHi Nivedipa,
I could solve the "InternalServerError" by using following c# code:
AdditionalData = new Dictionary<string, object>()
{
{"phone", new Identity() { Id = pDevice} }
}
instad of
AdditionalData = new Dictionary<string, object>()
{
{"phone", "{\"@odata.type\":\"#microsoft.graph.identity\",\"id\":\"+12345678901\"}"}
}
But now I have annother problem: After sending the MakeCall Request I get an establishing Event and immediately an Terminated Event with an Error:
"value": [
{
"changeType": "Updated",
"resourceUrl": "/communications/calls/911f6100-723b-400b-9053-893f686f3131",
"resource": "/app/calls/911f6100-723b-400b-9053-893f686f3131",
"resourceData": {
"@odata.type": "#microsoft.graph.call",
"state": "establishing",
"callChainId": "ef0c7f6a-974b-4700-8525-d74fe4d924c2"
},
"@odata.type": "#microsoft.graph.commsNotification"
}
],
"@odata.type": "#microsoft.graph.commsNotifications"
}
{
"value": [
{
"changeType": "Deleted",
"resourceUrl": "/communications/calls/911f6100-723b-400b-9053-893f686f3131",
"resource": "/app/calls/911f6100-723b-400b-9053-893f686f3131",
"resourceData": {
"@odata.type": "#microsoft.graph.call",
"state": "terminated",
"resultInfo": {
"@odata.type": "#microsoft.graph.resultInfo",
"code": 500,
"subcode": 9999,
"message": "Get Outbound routing - failed getting userId from billedUserMri: 28:d86f4970-a209-46f1-ad06-87137338eac2. DiagCode: 500#510543"
},
"callChainId": "ef0c7f6a-974b-4700-8525-d74fe4d924c2",
"terminationSender": {
"@odata.type": "#microsoft.graph.identitySet",
"phone": {
"@odata.type": "#microsoft.graph.identity",
"id": "+41*********",
"displayName": "4:+41*******",
"identityProvider": "None"
}
}
},
"@odata.type": "#microsoft.graph.commsNotification"
}
],
"@odata.type": "#microsoft.graph.commsNotifications"
}
The service user for the bot has an "Microsoft 365 E3" and a "Microsoft 365 Phone System" license.
And I am able to make call from a PSTN number to the bot.
Any idea?
Regards
Gerd
Nov 08 2021 01:25 AM
SolutionDec 13 2021 07:51 AM
Hi relkniw
Could you please show where do you get the correct object id that works in your case? There seem to be several options and we are not sure which one is correct.
Thanks a lot.
Dec 13 2021 08:13 AM
Hi ecastan1,
I think you have created a new service user in the Azure AD for your calling bot by using a powershell command. Something like New-CsOnlineApplicationInstance -UserPrincipalName
<new userid> -ApplicationId <ClientId>. Then you have to use the object id of that new created user.
Hope that answers your question.
Regards
Gerd
Dec 13 2021 08:42 AM
Apr 15 2022 06:24 AM
Apr 15 2022 07:53 AM
Nov 08 2021 01:25 AM
Solution