如何拨打电话:适用于自适应卡
how to make callto: works in adaptive card
我试图在自适应卡中按下按钮时发起呼叫(在 Microsoft 团队中)
我将 URL 添加为 callto:[useremail]
尽管当我在 chrome 的搜索栏中写这个时它有效,但是当按下自适应卡中的按钮时它在 chrome 页面上给我一个错误。
知道为什么会这样吗?
编辑:
这是我使用的样本卡:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"size": "small",
"style": "person",
"type": "Image",
"url": "https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg",
"selectAction":{
"type": "Action.OpenUrl",
"url": "callto:rex@gmail.com"
}
}
]
}
]
}
]
}
]
}
看起来 Teams 中的 links 不支持除通常的 HTTP/S 之外的任何协议。您可以使用重定向 URL 服务将您的调用 link 转换为 https link:https://www.cnet.com/news/10-links-to-shorten-your-links/
如果您需要动态生成对 link 的调用,我不确定这些服务中有多少具有您的机器人可以使用的 API。 TinyURL 虽然如此。
在您自己的域中托管您自己的重定向服务也非常简单。您甚至可以使用与您的机器人 运行 相同的域,因此您的 link 最终可能看起来像这样:https://rexbot.azurewebsites.net/api/callto/rex@gmail.com
此外,您可以考虑直接从 Teams 获得对此的支持。您可以请求他们支持更多 URL 协议。
我试图在自适应卡中按下按钮时发起呼叫(在 Microsoft 团队中) 我将 URL 添加为 callto:[useremail]
尽管当我在 chrome 的搜索栏中写这个时它有效,但是当按下自适应卡中的按钮时它在 chrome 页面上给我一个错误。 知道为什么会这样吗?
编辑: 这是我使用的样本卡:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"size": "small",
"style": "person",
"type": "Image",
"url": "https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg",
"selectAction":{
"type": "Action.OpenUrl",
"url": "callto:rex@gmail.com"
}
}
]
}
]
}
]
}
]
}
看起来 Teams 中的 links 不支持除通常的 HTTP/S 之外的任何协议。您可以使用重定向 URL 服务将您的调用 link 转换为 https link:https://www.cnet.com/news/10-links-to-shorten-your-links/
如果您需要动态生成对 link 的调用,我不确定这些服务中有多少具有您的机器人可以使用的 API。 TinyURL 虽然如此。
在您自己的域中托管您自己的重定向服务也非常简单。您甚至可以使用与您的机器人 运行 相同的域,因此您的 link 最终可能看起来像这样:https://rexbot.azurewebsites.net/api/callto/rex@gmail.com
此外,您可以考虑直接从 Teams 获得对此的支持。您可以请求他们支持更多 URL 协议。