使用节点 esl 远程连接 freeswitch 失败
Connecting freeswitch remotely using node esl fails
我正在尝试使用 ESL 远程连接到 FreeSwitch 服务。
连接机器和 FS 服务都在我的本地 VM 中,2 个不同的 VM
但是我得到以下错误
[WARNING] mod_event_socket.c:2639 IP 10.95.38.254 Rejected by acl "loopback.auto"
/autoload_configs/event_socket.conf.xml
<configuration name="event_socket.conf" description="Socket Client">
<settings>
<param name="listen-ip" value="0.0.0.0"/>
<param name="listen-port" value="8021"/>
<param name="password" value="ClueCon"/>
</settings>
</configuration>
脚本:
var conn = new esl.Connection('10.191.73.254', 8021, 'ClueCon', function() {
conn.api('status', function(res) {
console.log(' >> Connected >> ');
console.log(res.getBody());
});
});
您需要在 event_socket.conf.xml
中明确使用 apply-inbound-acl
。如果应用 none,则默认环回 ACL 用于 ESL。
我在 acl.config.xml 中添加了以下几行并且它工作正常
/auto_configs/acl.config.xml
<list name="loopback.auto" default="allow">
<node type="allow" cidr="10.95.38.0/24"/>
</list>
我正在尝试使用 ESL 远程连接到 FreeSwitch 服务。 连接机器和 FS 服务都在我的本地 VM 中,2 个不同的 VM
但是我得到以下错误
[WARNING] mod_event_socket.c:2639 IP 10.95.38.254 Rejected by acl "loopback.auto"
/autoload_configs/event_socket.conf.xml
<configuration name="event_socket.conf" description="Socket Client">
<settings>
<param name="listen-ip" value="0.0.0.0"/>
<param name="listen-port" value="8021"/>
<param name="password" value="ClueCon"/>
</settings>
</configuration>
脚本:
var conn = new esl.Connection('10.191.73.254', 8021, 'ClueCon', function() {
conn.api('status', function(res) {
console.log(' >> Connected >> ');
console.log(res.getBody());
});
});
您需要在 event_socket.conf.xml
中明确使用 apply-inbound-acl
。如果应用 none,则默认环回 ACL 用于 ESL。
我在 acl.config.xml 中添加了以下几行并且它工作正常
/auto_configs/acl.config.xml
<list name="loopback.auto" default="allow">
<node type="allow" cidr="10.95.38.0/24"/>
</list>