MS graph API don't send codeStatus when answering to a call

Viewed 332

I have a bot which should answer to calls, here's MS doc

Actually I can Answer a call (MS Team unhook the call ) but I get no response status code or error. In documentation it mentioned that I should get a 202 accepted status code see here ( api method right after initialisation):

client
    .api('/me')
    .get((err, res) => {
        console.log(res); // prints info about authenticated user
    });

I have tried to check res.statusCode but I get no content. How can I get response from MS Teams API ?

2 Answers

appHostedMediaConfig requires use of the C# Media SDK. Please refer to the documentation describing the options. GitHub site contains documentation and samples for using the C# SDK. If the bot is participating in a multiparty call, the bot needs tenant consent for one or more of the Calls permissions.

You can use other SDKs when using serviceHostedMediaConfig for IVR scenarios. answer does not return a response body but 202 Accepted. I saw attempts from the bot using this method. However, it was used with removeFromDefaultAudioGroup: true which is for advanced audio routing. I suggest starting without the advanced features.

To continue with the call, setup your notification handler. Our service took down the call with the bot because your handler was not responding. Wait for the established notification before sending IVR commands.

statusCode isn't a property of the response object, it is part of the rawResponse object. Your method needs to include the full set of response objects:

client
    .api('/me')
    .get((err, res, rawResponse) => {
        console.log(rawResponse.statusCode);
    });
Related