Xmatik AG
Xmatik AG

Reputation: 11

Graph API: Transfer call to call queue

In a Teams AutoAttendant you can forward the call to a Call Queue. I am trying to achieve this same behavior with a Teams Bot.

An incoming call from the PSTN is answered by the bot. The bot answers the call and plays a prompt. After that the bot should transfer this call to a specific call queue!

I was able to transfer the call to a user without any trouble:

   callbackUrl: process.env.WebserviceUrl + '/api/calls/notifications',
   transferTarget: {
        endpointType: 'default',
        identity: {
            user: {
                id: '[User GUID]',
                displayName: 'User Name'
            },
        }
    }

Now I d'like to transfer the call to a Call Queue instead of a single user:

   callbackUrl: process.env.WebserviceUrl + '/api/calls/notifications',
   transferTarget: {
        endpointType: 'default',
        identity: {
            applicationInstance: {
                id: '[Application instance GUID]',
                displayName: 'Call Queue XY'
            },
        }
    }

I tried applicationInstance and application as key. I also tried with optional tenantId in the identity. Received Error is always:

403 - Forbidden
{
    error: {
        code: '7505',
        message: 'Request authorization tenant mismatch.',
        innerError: {
            date: '2020-06-24T03:37:16',
           'request-id': '5da7621f-dd3f-494e-a057-733e60c59bdb'
        }
    }
}

There is only one Tenant involved. So access key is obtained with the same tenantId as the Tenant the user and call queue are part of.

Maybe someone has a hint and can help me find the right way to achieve this.

EDIT: Redirecting an unanswered Call to the same Call Queue works without any troubles! If there is no way to Transfer an active call to the Queue, we will try to find a way for our use case with redirecting.

Upvotes: 1

Views: 549

Answers (0)

Related Questions