Forum Discussion
Create peer-to-peer PSTN call with service hosted media - Not working -Call source identity invalid
- Jan 02, 2024
-
To make a peer-to-peer PSTN call, you don't necessarily need a Resource Account user. The Resource Account user is typically used for scenarios where you want to assign a phone number to a specific resource, such as a meeting room or a shared device. Since you are focused on outgoing calls at the moment, you can remove the Resource Account user if it's not required for your use case.
-
The purchased phone number can be assigned to either an E3 licensee assigned user or a Teams Phone with Calling Plan user. It depends on your specific requirements and how you want to manage the phone number. If you assign the phone number to an E3 licensee assigned user, that user will be able to make and receive calls using that number. On the other hand, if you assign the phone number to a Teams Phone with Calling Plan user, that user will have the calling plan associated with the phone number.
If you have waited for more than 24 hours and the phone number is not listing for the Resource Account user, it's possible that there might be some delay or issue with the assignment process. You can try assigning the phone number to the Teams Phone with Calling Plan user that you created and see if it gets listed for that user.
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
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.
-
Hello prasanth2023 - Thanks for raising your query.
We will look into it and let you know the updates.
- prasanth2023Dec 25, 2023Copper ContributorThanks ChetanSharma-msft looking forward for it.
The current state is like the phone number is assigned to Resource account, but still we are unable to make call via graph API via C#. we are getting the same error - call source identity Invalid- prasanth2023Dec 25, 2023Copper Contributor
I am using the below PowerShell script to make the call. The calls are not receiving on the other end, But the call state shows as Established....
$TenantId = "bc2a8d6c-49d3-40ba-a541-XXXXXXX"$ClientId = "9cc48ef5-d9e7-40a7-8ed7-XXXXXXX"$ClientSecret = "Wm58Q~ecjJdkVWQzWKVSYoTsykcRvpmA67aXXXXXX"$TokenBody = @{Grant_Type = "client_credentials"Scope = "https://graph.microsoft.com/.default"Client_Id = $ClientIdClient_Secret = $ClientSecret}$TokenResponse = Invoke-RestMethod -Uri "https://login.microsoftonline.com/$TenantId/oauth2/v2.0/token" -Method POST -Body $TokenBody -ContentType "application/x-www-form-urlencoded"$AccessToken = $TokenResponse.access_token# Convert the AccessToken to a SecureString$SecureAccessToken = $AccessToken | ConvertTo-SecureString -AsPlainText -Force# Connect to Microsoft Graph using SecureStringConnect-MgGraph -AccessToken $SecureAccessToken$params = @{"@odata.type" = "#microsoft.graph.call"callbackUri = "https://bot.contoso.com/callback"source = @{"@odata.type" = "#microsoft.graph.participantInfo"identity = @{"@odata.type" = "#microsoft.graph.identitySet"applicationInstance = @{"@odata.type" = "#microsoft.graph.identity"displayName = "Calling Bot"id = "77c05ef4-9f20-4351-9590-XXXXXXXXX"}}countryCode = $nullendpointType = $nullregion = $nulllanguageId = $null}targets = @(@{"@odata.type" = "#microsoft.graph.invitationParticipantInfo"identity = @{"@odata.type" = "#microsoft.graph.identitySet"phone = @{"@odata.type" = "#microsoft.graph.identity"id = "+14086220061"}}})requestedModalities = @("audio")mediaConfig = @{"@odata.type" = "#microsoft.graph.serviceHostedMediaConfig"}tenantId = "bc2a8d6c-49d3-40ba-a541-XXXXXXXXXX"}New-MgCommunicationCall -BodyParameter $paramsHow to check and fix this issue? can you help?
- ChetanSharma-msftDec 27, 2023
Microsoft
Hello prasanth2023 - Sorry for delay in response.
We will check with engineering team and let you know the updates.