question

ColinStone-4300 avatar image
2 Votes"
ColinStone-4300 asked ColinStone-4300 commented

Initiate then decline a call using Microsoft Graph call is sending connected event

Hello,

This is demonstrated in the incidentbot provided by Microsoft. If I create a call in example 1 of application-post-calls and then cancel it I get a state of the call as connected when it clearly isn't. This poses a problem in Click to dial type applications where, for example, I must be in the call first before calling the recipient.

Steps to reproduce is to make a call in the same way as [1] and then when the bot calls teams immediately decline on teams. You will get the connected event and ideally unless i am missing something you should get the terminated event. In the Incident bot just make a call via the makeCallcontroller.cs (MakeOutgoingCallAsync) and decline.

Just wanted to know whether my thinking is correct or am i missing something. It would seem to be a bug to me.

Thanks.


office-teams-app-devmicrosoft-graph-teamworkmicrosoft-graph-cloud-communications
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ColinStone-4300 let us look into this and get back to you.

0 Votes 0 ·
JarnoHolsteinANYWHERE365-3208 avatar image
0 Votes"
JarnoHolsteinANYWHERE365-3208 answered ColinStone-4300 commented

Does the Teams client you are calling have VoiceMail configured?
If it does then wat might be happening is that your bot is connected to the voicemail endpoint of the Teams user.
So:
-Bot calls user
-user rejects call
-call gets send to voicemail
-call gets established to voicemail
-after voicemail ends call gets terminated

You can check this in the settings of the Teams client. Settings -> Calls -> Call answering rules -> if unanswered -> Voicemail .
If you set the "if unanswered" setting to "Do nothing" instead of "Voicemail" you should be getting terminated events on rejecting the call.

Hope this helps.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Many thanks for the reply. That absolutely makes sense. Sometimes you can't see the forest for the trees.

Unfortunately still doesn't help. In many of the click to dial providers globally that use a dial back mechanism, you as the caller must answer the phone first, then it dials the recipient. So unless there is a way (which I suspect there is not) to know that the caller has actually answered the phone rather than going through to voicemail there is no clean solution. After all, I cannot ask a caller to turn off voice mail as a workaround because in normal cases this is not acceptable.

I am amazed that you cannot simply give the device id (i.e. your phone/pc) and say make a call to XXX and the device performs the task. Then if you have PSTN dialing packages the XXX could be a teams person or a PSTN. All events in the standard Graph API would then handle the state of the call.

Thanks so much again. I was looking for a complicated solution.

0 Votes 0 ·
NikithaMSFT-0176 avatar image
0 Votes"
NikithaMSFT-0176 answered NikithaMSFT-0176 edited

We are not able to repro the issue at our end. When you initiate using bot and user reacted to that call you will receive responder event on incident bot and there you can handle the status of the call please check this docs.

Thanks,

Nikitha.



If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ColinStone-4300 avatar image
0 Votes"
ColinStone-4300 answered ColinStone-4300 commented

Hello, many thanks for the reply. In order to make this problem as simple as I can i have used the standard case of incidents/raise sample in your readme of the IncidentBot project.

I have taken screenshots from the debugger, postman and the ngrok local response pages to assist in explanation. I have attached the pdf here and i hope that you see my problem.

the very nature of getting an established event is where the problem lies. It should say terminated but not after 5 minutes when it is terminated by the bot.

Many thanks
82674-teamscallingeventproblem.pdf



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Are you calling the bot from stack overflow and bot rejects the call? Could you please conform?

0 Votes 0 ·

Many thanks for the reply. Just to clarify. I am using RemoteMediaSamples and setting up in the exact way as the repo requires. I hook up with ngrok having configured the bot on the relevant sites again all in the readme. Then I use postman to post to the incidents/raise endpoint. There are no outside sites (i.e. stack overflow) it is a out of the box setup. the repo is working, the bot is calling me, i simply decline on teams. You will see from the PDF i posted the events that are triggered and the screenshots of the processes i follow to replicate.

As i said before the bot needs to dial me first (since I am integrating click-to-dial and calling my client), i must answer and then it will add more people into the call. but without this event triggering correctly (event should not be connected - since i declined the call)

hope that helps.

0 Votes 0 ·
kwaghmode-8567 avatar image
0 Votes"
kwaghmode-8567 answered ColinStone-4300 commented

@ColinStone-4300 Did you find any solution to get actual user event "rejected" or is there any other info in teams event request by which we can determine user action?

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

yes - the accepted answer is correct. i had voicemail on so when you decline it goes to voicemail. once 5 minutes of silence (or the length of voicemail) ends then you get a terminated event. You disable voicemail and you get the terminated event immediately. So it makes sense the approach. Hope that helps.

0 Votes 0 ·

Thanks for reply. My scenario is same, but I want to know whether call is rejected or missed by the user before it goes to voice mail.

0 Votes 0 ·

I only pressed cancel on teams, didn't check the other use case. I would have thought it would be the same result depending on voicemail enabled or not.

0 Votes 0 ·