Hey everyone, issue still seem to persist since I still get "Call source identity invalid.". In our case we are using Direct Routing scenario to receive and create calls via PSTN. There are already Application Instance accounts in use for Teams Call Queues which forward to external numbers thanks to Virtual Phone System license.
To assign a phone number to the bot I partly followed the instructions here linked at the create PSTN call examples but had to slightly change the Powershell commands from "Set-CsOnlineVoiceApplicationInstance" to "Set-CsOnlineApplicationInstance" since I need to assign the number via "-OnpremPhoneNumber" (for Direct Routing scenario) parameter and need to "Grant-CsOnlineVoiceRoutingPolicy" afterwards to allow routing via Session Border Controller (SBC).
Peer-to-Peer calls are working well as also shown in the create call examples the difference is for sure one is an identity type "applicationInstance" and the other "application", see the different source settings below.
Peer-to-Peer Source setting
"source": {
"@odata.type": "#microsoft.graph.participantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"application": {
"@odata.type": "#microsoft.graph.identity",
"displayName": "calling bot",
"id": "XXXXX-XXXXX-XXXXX-XXXX-XXXXX"
}
},
"region": null,
"languageId": null
}
PSTN Source setting
"source": {
"@odata.type": "#microsoft.graph.participantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"applicationInstance": {
"@odata.type": "#microsoft.graph.identity",
"displayName": "calling bot",
"id": "XXXXX-XXXXX-XXXXX-XXXX-XXXXX"
},
},
"countryCode": null,
"endpointType": null,
"region": null,
"languageId": null
}