Teams & AudiocodeSBC Call Transfer - microsoft-teams

I have this issue where the call originated from external to the Teams user via direct routing. And when the team user transfers the call to another team user,the call transfer is failed.
I checked with MS support and they are saying that they send Invite,Refer to SBC but somehow AudiocodeSBC doesn't capture these Invite,Refer for the call transfer.
If the call originated from Teams to external, the call transfer works smoothly and SBC log shows Invite,Refer as it should be.

Related

How to Transfer a Party between two Teams Calls, via the Calls Graph API

We have a scenario with two group calls.
Call 1 has two Participants : Party "A" and a call handling BOT (BOT1)
Call 2 has three Participants : Party "B", Party "C" and a call handling BOT (BOT2)
All parties are normal Teams users.
We want to transfer Party B from Call 2 to Call 1 using BOT2
We are trying to do this with the Transfer() function, using example 5 from this reference
https://learn.microsoft.com/en-us/graph/api/call-transfer?view=graph-rest-1.0&tabs=csharp#example-5-call-transfer-from-a-group-call
However there is some confusion over what setting we should apply to the parameters.
I am assuming that the ID and DisplayName of the transferTarget should be those of Party C
What should the ID and Participant ID of the transferee be set to ?
Note that it is implicit that the ID is not that of Party C as given in the tranferTarget block,
This is because in the example referenced, the two values are different.
I have checked the sample code at
https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/bot-calling-meeting/
but this does not demonstrate transferring using the transferee block, just the simple case of transferring an user into a call.
Can anyone shed any light on what to set the transferTarget and transferee values to in order to meet the requirements of the scenario described ?
A consultative transfer means that the transferor can inform the person they want to transfer the call to (the transferee), before the transfer is made. This is opposed to transferring the call directly.
Transfer Target: The new party being introduced into a call with
the Transferee.
participantId : The ID of the target participant.
So the ID and display name should be target participant.
also please note the below supported scenario in Group call-
If bot wants to invite another PSTN to join, the P2P call will be escalated into a group call. So far we don't support escalation by adding PSTN. We are working on this feature now and it will be ready soon.
So, here are some scenarios:
P2P call between Bot and another peer (Teams user, PSTN), bot invites
another PSTN: Not supported.
P2P call between Bot and another peer (Teams user, PSTN), bot invites
another Teams user: Supported.
P2P call between Bot and another peer (Teams user, PSTN), bot invites
another bot: Supported.
Reference Document-https://learn.microsoft.com/en-us/graph/api/call-transfer?view=graph-rest-1.0&tabs=http#request-body

Retrieve caller-ID in Microsoft Teams in realtime

I'm trying to integrate Teams with an external service by using a Teams Bot/App. The app should call an external API with the caller-ID of the incoming PSTN call.
My success went so far, that I could get a list of the last calls but they were far away from being realtime and the caller-ID was masked.
Is it possible at all to "listen" to call metadata in realtime?
You can Retrieve the Call id by Subscribe for Microsoft Graph change notifications to be notified when your user's data changes, so you don't have to poll for changes. check Use the Microsoft Graph API to get change notifications also check this sample. when you subscribe to call

Call and online meeting bot - Peer to peer call is terminated automatically

I am trying to develop a simple bot that is supposed to answer incoming call made in personal chat with bot. The bot is employing application hosted media to play or get access to media streams. I am making use of classes and controllers that are implemented in Huebot sample project at Github. The bot is registered on MS Azure and i am using ngrok for local testing and debugging. While debugging after making the call, breakpoints are hit that are placed in 'CallsOnIncoming' or 'CallsOnUpdated' event handlers. So my bot configurations over Azure and in MS Teams seem to be correct. For setting up media platform, I have installed the wildcard SSL certificated issued by Let's Encrypt and CName records are created for corresponding tcp URLs exposed by ngrok. The environment is multi-tenant i.e. bot registration is done on another tenant, while bot is installed and tested in MS Teams on another tenant.
These are Media platform settings:
MediaPlatformInstanceSettings = new MediaPlatformInstanceSettings()
{
CertificateThumbprint = "0B687..................",
InstanceInternalPort = 8445,
InstancePublicPort = 15410,
InstancePublicIPAddress = new IPAddress(0x0),
ServiceFqdn = "4.mycustomdomain.com",
},
Here's the snapshot for ngrok:
The problem is, when call is made to the bot, after 5 to 10 seconds call is terminated automatically. Whereas he Call status should turn to 'Established' and the call shouldn't end until user does this.Please guide, what could be wrong.
The call is terminating because Teams can't connect to your media endpoint of the InstancePublicIPAddress / InstancePublicPort. It timesout (i believe in 15 seconds) and terminates the call when it can't get a media connection.
You need to put the IP address of 4.tcp.ngrok.io from your running ngrok settings above into it.
e.g.
InstancePublicIPAddress = Dns.GetHostEntry("4.tcp.ngrok.io").AddressList[0]
You may want to put error checking around the GetHostEntry call in production code.

Get call notification when a MS Teams user gets/make call from/to PSTN (configured through Direct Routing)

As per the document it seems like we have to use MS Calling bot endpoint to get the call notifications(i.e. the case when bot is involved in the call ). But in case, when we have used Direct Routing with own SIP Trunks in MS Teams for incoming/outgoing call to PSTN, How can we get notifications like call is being establishing, established, terminated, etc.?
Any suggestion or workaround will be appreciated.
#Bijay, This is currently not supported but it is in pipeline and should be available in future.

Closing a teams messaging extension modal from an external service

I'm opening (using OpenUrl) an external webpage I control. During loading of this web page, from the server I wish to close the teams modal either directly, or by invoking the teams client to resend message with a parameter, so the bot can respond with a close response (which I have working).
I'm able to do other tasks from an external service, like posting messages to existing or new chats. But when I try to set the activity type to invoke, I get BadRequest response.
Task Module modal dialog can be closed using microsoftTeams.tasks.submitTask() which is part of Microsoft Teams JavaScript client SDK. This will closed the Task Module and submit the data back to Bot.
Please take a look at Task Module sample to see how it's called from client code.

Resources