graph api json respond calling bot

%3CLINGO-SUB%20id%3D%22lingo-sub-2572558%22%20slang%3D%22en-US%22%3Egraph%20api%20json%20respond%20calling%20bot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2572558%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22question-body%20post-body%22%3E%3CP%3EHaving%20problem%20to%20answer%20call%20from%20team%20member%20to%20my%20bot.%3CBR%20%2F%3EI%20was%20trying%20to%20follow%20this%20documentation%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fcall-answer%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fcall-answer%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%3C%2FA%3E%3CBR%20%2F%3EUnfortunately%20the%20JSON%20respond%20completely%20different%20what%20I'm%20getting.%3CBR%20%2F%3ESo%20when%20I%20try%20to%20call%20my%20bot%20this%20is%20a%20JSON%20I%20received.%3C%2FP%3E%3CP%3E%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.commsNotifications'%2C%3CBR%20%2F%3E'value'%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.commsNotification'%2C%3CBR%20%2F%3E'changeType'%3A%20'created'%2C%3CBR%20%2F%3E'resource'%3A%20'%2Fapp%2Fcalls%2F541f5b00-2585-4d55-ad61-fdad7cff677d'%2C%3CBR%20%2F%3E'resourceUrl'%3A%20'%2Fcommunications%2Fcalls%2F541f5b00-2585-4d55-ad61-fdad7cff677d'%2C%3CBR%20%2F%3E'resourceData'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.call'%2C%3CBR%20%2F%3E'state'%3A%20'incoming'%2C%3CBR%20%2F%3E'direction'%3A%20'incoming'%2C%3CBR%20%2F%3E'callbackUri'%3A%20'%3CA%20href%3D%22https%3A%2F%2F66c6ddc322b2.ngrok.io%2Fcommunications%2Fcalls%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2F66c6ddc322b2.ngrok.io%2Fcommunications%2Fcalls%3C%2FA%3E'%2C%3CBR%20%2F%3E'source'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.participantInfo'%2C%3CBR%20%2F%3E'id'%3A%20'b3188a12-8ad7-4031-8d9e-836eb5247741'%2C%3CBR%20%2F%3E'identity'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.identitySet'%2C%3CBR%20%2F%3E'encrypted'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.identity'%2C%3CBR%20%2F%3E'id'%3A%20'1vt5xhpuezigcqho1cbxzophhekurkt71lex3lsziu_3qk4qtnzgsqxbtrqistfxgpw6gsbcilclv8ikh0ixtkps4wruxmprlt_ieqmrtuajjok_rof6pzz0gghgynzqa'%2C%3CBR%20%2F%3E'tenantId'%3A%20'f28c76a9-a6fc-4371-bf61-e1172823c083'%2C%3CBR%20%2F%3E'identityProvider'%3A%20'None'%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E'endpointType'%3A%20'default'%2C%3CBR%20%2F%3E'region'%3A%20'uk'%2C%3CBR%20%2F%3E'languageId'%3A%20'en-gb'%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E'targets'%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.invitationParticipantInfo'%2C%3CBR%20%2F%3E'identity'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.identitySet'%2C%3CBR%20%2F%3E'application'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.identity'%2C%3CBR%20%2F%3E'id'%3A%20'd8649dc1-f4d5-4631-bb12-481cf6f1e84b'%2C%3CBR%20%2F%3E'identityProvider'%3A%20'AAD'%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E'endpointType'%3A%20'default'%2C%3CBR%20%2F%3E'id'%3A%20'd145de98-6cc7-4a23-a385-2ed86fa6fe4d'%2C%3CBR%20%2F%3E'region'%3A%20None%2C%3CBR%20%2F%3E'languageId'%3A%20None%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%5D%2C%3CBR%20%2F%3E'tenantId'%3A%20'f28c76a9-a6fc-4371-bf61-e1172823c083'%2C%3CBR%20%2F%3E'myParticipantId'%3A%20'd145de98-6cc7-4a23-a385-2ed86fa6fe4d'%2C%3CBR%20%2F%3E'callChainId'%3A%20'8f3fbeb2-eeb9-457e-8f19-3639fbebbf04'%2C%3CBR%20%2F%3E'incomingContext'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.incomingContext'%2C%3CBR%20%2F%3E'sourceParticipantId'%3A%20'b3188a12-8ad7-4031-8d9e-836eb5247741'%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E'id'%3A%20'541f5b00-2585-4d55-ad61-fdad7cff677d'%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3E----After%20the%20first%20respond%20immediately%20my%20bot%20receives%20this%20JSON%20twice%20and%20drops%20a%20call---%3C%2FP%3E%3CP%3E%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.commsNotifications'%2C%3CBR%20%2F%3E'value'%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.commsNotification'%2C%3CBR%20%2F%3E'changeType'%3A%20'deleted'%2C%3CBR%20%2F%3E'resource'%3A%20'%2Fapp%2Fcalls%2Fec1f6100-b4f3-45f2-9fa2-93a31f48ef85'%2C%3CBR%20%2F%3E'resourceUrl'%3A%20'%2Fcommunications%2Fcalls%2Fec1f6100-b4f3-45f2-9fa2-93a31f48ef85'%2C%3CBR%20%2F%3E'resourceData'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.call'%2C%3CBR%20%2F%3E'state'%3A%20'terminated'%2C%3CBR%20%2F%3E'resultInfo'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.resultInfo'%2C%3CBR%20%2F%3E'code'%3A%20408%2C%3CBR%20%2F%3E'subcode'%3A%208544%2C%3CBR%20%2F%3E'message'%3A%20'Callee%20could%20not%20be%20reached.'%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E'terminationReason'%3A%20'Callee%20could%20not%20be%20reached.'%2C%3CBR%20%2F%3E'direction'%3A%20'incoming'%2C%3CBR%20%2F%3E'callbackUri'%3A%20'%3CA%20href%3D%22https%3A%2F%2F66c6ddc322b2.ngrok.io%2Fcommunications%2Fcalls%2Fhub%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2F66c6ddc322b2.ngrok.io%2Fcommunications%2Fcalls%2Fhub%3C%2FA%3E'%2C%3CBR%20%2F%3E'source'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.participantInfo'%2C%3CBR%20%2F%3E'id'%3A%20'67d0f35b-ca0c-4f40-9ad6-d38fc5476d6a'%2C%3CBR%20%2F%3E'identity'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.identitySet'%2C%3CBR%20%2F%3E'encrypted'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.identity'%2C%3CBR%20%2F%3E'id'%3A%20'1vt5xhpuezigcqho1cbxzophhekurkt71lex3lsziu_3qk4qtnzgsqxbtrqistfxgpw6gsbcilclv8ikh0ixtkps4wruxmprlt_ieqmrtuajjok_rof6pzz0gghgynzqa'%2C%3CBR%20%2F%3E'tenantId'%3A%20'f28c76a9-a6fc-4371-bf61-e1172823c083'%2C%3CBR%20%2F%3E'identityProvider'%3A%20'None'%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E'endpointType'%3A%20'default'%2C%3CBR%20%2F%3E'region'%3A%20'uk'%2C%3CBR%20%2F%3E'languageId'%3A%20'en-gb'%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E'targets'%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.invitationParticipantInfo'%2C%3CBR%20%2F%3E'identity'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.identitySet'%2C%3CBR%20%2F%3E'application'%3A%20%7B%3CBR%20%2F%3E'%40odata.type'%3A%20'%23microsoft.graph.identity'%2C%3CBR%20%2F%3E'id'%3A%20'd8649dc1-f4d5-4631-bb12-481cf6f1e84b'%2C%3CBR%20%2F%3E'identityProvider'%3A%20'AAD'%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E'endpointType'%3A%20'default'%2C%3CBR%20%2F%3E'id'%3A%20'dec2fd90-6eac-4b9e-abd8-d469da8f4cb1'%2C%3CBR%20%2F%3E'region'%3A%20None%2C%3CBR%20%2F%3E'languageId'%3A%20None%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%5D%2C%3C%2FP%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Having problem to answer call from team member to my bot.
I was trying to follow this documentation https://docs.microsoft.com/en-us/graph/api/call-answer?view=graph-rest-1.0&tabs=http
Unfortunately the JSON respond completely different what I'm getting.
So when I try to call my bot this is a JSON I received.

{
'@odata.type': '#microsoft.graph.commsNotifications',
'value': [
{
'@odata.type': '#microsoft.graph.commsNotification',
'changeType': 'created',
'resource': '/app/calls/541f5b00-2585-4d55-ad61-fdad7cff677d',
'resourceUrl': '/communications/calls/541f5b00-2585-4d55-ad61-fdad7cff677d',
'resourceData': {
'@odata.type': '#microsoft.graph.call',
'state': 'incoming',
'direction': 'incoming',
'callbackUri': 'https://66c6ddc322b2.ngrok.io/communications/calls',
'source': {
'@odata.type': '#microsoft.graph.participantInfo',
'id': 'b3188a12-8ad7-4031-8d9e-836eb5247741',
'identity': {
'@odata.type': '#microsoft.graph.identitySet',
'encrypted': {
'@odata.type': '#microsoft.graph.identity',
'id': '1vt5xhpuezigcqho1cbxzophhekurkt71lex3lsziu_3qk4qtnzgsqxbtrqistfxgpw6gsbcilclv8ikh0ixtkps4wruxmprlt_ieqmrtuajjok_rof6pzz0gghgynzqa',
'tenantId': 'f28c76a9-a6fc-4371-bf61-e1172823c083',
'identityProvider': 'None'
}
},
'endpointType': 'default',
'region': 'uk',
'languageId': 'en-gb'
},
'targets': [
{
'@odata.type': '#microsoft.graph.invitationParticipantInfo',
'identity': {
'@odata.type': '#microsoft.graph.identitySet',
'application': {
'@odata.type': '#microsoft.graph.identity',
'id': 'd8649dc1-f4d5-4631-bb12-481cf6f1e84b',
'identityProvider': 'AAD'
}
},
'endpointType': 'default',
'id': 'd145de98-6cc7-4a23-a385-2ed86fa6fe4d',
'region': None,
'languageId': None
}
],
'tenantId': 'f28c76a9-a6fc-4371-bf61-e1172823c083',
'myParticipantId': 'd145de98-6cc7-4a23-a385-2ed86fa6fe4d',
'callChainId': '8f3fbeb2-eeb9-457e-8f19-3639fbebbf04',
'incomingContext': {
'@odata.type': '#microsoft.graph.incomingContext',
'sourceParticipantId': 'b3188a12-8ad7-4031-8d9e-836eb5247741'
},
'id': '541f5b00-2585-4d55-ad61-fdad7cff677d'
}
}
]
}

----After the first respond immediately my bot receives this JSON twice and drops a call---

{
'@odata.type': '#microsoft.graph.commsNotifications',
'value': [
{
'@odata.type': '#microsoft.graph.commsNotification',
'changeType': 'deleted',
'resource': '/app/calls/ec1f6100-b4f3-45f2-9fa2-93a31f48ef85',
'resourceUrl': '/communications/calls/ec1f6100-b4f3-45f2-9fa2-93a31f48ef85',
'resourceData': {
'@odata.type': '#microsoft.graph.call',
'state': 'terminated',
'resultInfo': {
'@odata.type': '#microsoft.graph.resultInfo',
'code': 408,
'subcode': 8544,
'message': 'Callee could not be reached.'
},
'terminationReason': 'Callee could not be reached.',
'direction': 'incoming',
'callbackUri': 'https://66c6ddc322b2.ngrok.io/communications/calls/hub',
'source': {
'@odata.type': '#microsoft.graph.participantInfo',
'id': '67d0f35b-ca0c-4f40-9ad6-d38fc5476d6a',
'identity': {
'@odata.type': '#microsoft.graph.identitySet',
'encrypted': {
'@odata.type': '#microsoft.graph.identity',
'id': '1vt5xhpuezigcqho1cbxzophhekurkt71lex3lsziu_3qk4qtnzgsqxbtrqistfxgpw6gsbcilclv8ikh0ixtkps4wruxmprlt_ieqmrtuajjok_rof6pzz0gghgynzqa',
'tenantId': 'f28c76a9-a6fc-4371-bf61-e1172823c083',
'identityProvider': 'None'
}
},
'endpointType': 'default',
'region': 'uk',
'languageId': 'en-gb'
},
'targets': [
{
'@odata.type': '#microsoft.graph.invitationParticipantInfo',
'identity': {
'@odata.type': '#microsoft.graph.identitySet',
'application': {
'@odata.type': '#microsoft.graph.identity',
'id': 'd8649dc1-f4d5-4631-bb12-481cf6f1e84b',
'identityProvider': 'AAD'
}
},
'endpointType': 'default',
'id': 'dec2fd90-6eac-4b9e-abd8-d469da8f4cb1',
'region': None,
'languageId': None
}
],

0 Replies