Forum Discussion
Cannot initiate PSTN calls from bot
- Nov 08, 2021We could solve the problem. We used the wrong object ID for creating the call. After using the object ID from the assigned service user, it works.
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.
- relkniwNov 03, 2021Brass Contributor
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
- relkniwNov 08, 2021Brass ContributorWe could solve the problem. We used the wrong object ID for creating the call. After using the object ID from the assigned service user, it works.
- lukaszzwierkoApr 15, 2022Copper ContributorHi, would you mind sharing where exactly in the API / code do you user the service user object id instead of bot registration ID. Basically I'm trying to get the IncidentBot sample to call PSTN, I did all the configuration as described is this thread but getting the same error "DiagCode: 500#510543".
thanks in advance.
Łukasz