我安装并配置了 Tigase 服务器,用于在多个 Asterisk 服务器之间分配设备状态。服务器工作正常。它的配置文件如下:
--cluster-mode = true
config-type = --gen-config-def
--debug = server,xmpp,net
--user-db = mysql
--admins = admin@localhost
--user-db-uri = jdbc:mysql://localhost/tigasedb?user=root&password=no
--virt-hosts = localhost
--comp-name-3 = message-archive
--comp-class-3 = tigase.archive.MessageArchiveComponent
--comp-class-2 = tigase.socks5.Socks5ProxyComponent
--comp-name-2 = proxy
--comp-class-1 = tigase.muc.MUCComponent
--comp-name-1 = muc
--sm-plugins = +message-archive-xep-0136
#--ssl-container-class=tigase.extras.io.PEMSSLContextContainer
#--ssl-container-class=tigase.io.SSLContextContainer
--comp-name-1=pubsub
--comp-class-1=tigase.pubsub.PubSubComponent
我在两个不同的系统上安装了两个星号服务器。我还在两者上编译了 res_xmpp 并使用以下配置文件对其进行了配置:
[general]
debug=yes
autoregister=yes
collection_nodes=yes
pubsub_autocreate=yes
[tigase]
type=client
serverhost=192.168.20.105
username=server1@localhost/voip1
pubsub_node=pubsub.192.168.20.105
secret=123456
priority=25
port=5222
usetls=yes
usesasl=yes
status=available
statusmessage="I am available"
timeout=5
buddy=server2@localhost/voip2
distribute_events=yes
我其中一台服务器的用户名是 server1@localhost/voip1,另一台是 server2@localhost/voip2。现在 xmpp 模块可以正常工作了。但是 pubsub 事件没有正确分发。如您所见,我使用 IP 地址来区分我的 Tigase 服务器。如果我在 res_xmpp 模块的 pubsub_node 选项中使用相同的 IP 地址,服务器将返回“未实现功能”错误,错误代码为 501;因此,我使用了 pubsub.192.168.20.105 并将其设置在两台服务器的 /etc/hosts 中,没有错误消息,但我也不会收到事件!!!我怎样才能解决这个问题?