webrtc - Asterisk MessageSend 使用 PJSIP 发送到多个设备
问题描述
我目前有一个使用 WebRTC -> Asterisk 的设置,我可以在其中调用和发送消息。当我从 A -> B 拨打电话时,B 的所有注册设备都会被调用(所以如果他多次登录)。
然而,使用 MessageSend SIP 消息只发送给一个注册的,而不是全部。我怎样才能让它发送到所有注册的设备?
是否有可能,如果没有,是否有任何其他方式可以在 Asterisk 内部完成?
(使用星号 15.5)。
谢谢!
解决方案
Asterisk(至少在使用 PJSIP 时)和给定的端点会去除任何 URI 详细信息,并且只会使用端点并且不会遍历所有已注册的联系人。
From messge.c 'msg_send_exec' 从 res_pjsip_messaging.c 'get_outbound_endpoint' 获取出站
/* attempt to extract the endpoint name */
if ((aor_uri = strchr(name, '/'))) {
/* format was 'endpoint/(aor_name | uri)' */
*aor_uri++ = '\0';
} else if ((aor_uri = strchr(name, '@'))) {
/* format was 'endpoint@domain' - discard the domain */
*aor_uri = '\0';
/*
* We may want to match without any user options getting
* in the way.
*/
AST_SIP_USER_OPTIONS_TRUNCATE_CHECK(name);
}
/* at this point, if name is not empty then it
might be an endpoint, so try to retrieve it */
if (ast_strlen_zero(name)
|| !(endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint",
name))) {
/* an endpoint was not found, so assume sending directly
to a uri and use the default outbound endpoint */
*uri = ast_strdup(to);
return ast_sip_default_outbound_endpoint();
}
据我了解,如果您只使用 URI(如 pjsip:123.12.123.12:1234),它只会查找始终相同的默认端点。
推荐阅读
- intellij-idea - Grails 4-IntelliJ IDEA 版本 19 增加了编译时间
- c# - 如何通过 C# powershell SDK 正确运行 Install-WindowsFeature
- python - 如何使用 Flask & SQL Server 作为后端删除记录?
- numpy - 提高广播乘法和1-广播的性能
- sql - SQL 将单个结果显示为总数的百分比
- laravel - 如何使用 laravel 8 livewire 创建子组件?
- python - 计数图未在 plotly python 中显示
- c# - apiprotector.net 错误 已添加具有相同密钥的项目。密钥:X-API-保护器
- amazon-s3 - 如果对象在 s3 存储桶的特定文件夹中存在超过 7 小时,则会收到通知
- r - R中的二元变量组合分析