複数のアスタリスク サーバー間でデバイスの状態を分散するために、Tigase サーバーをインストールして構成しました。サーバーは正常に動作します。その構成ファイルは次のとおりです。
--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
i は、2 つの異なるシステムに 2 つのアスタリスク サーバーをインストールしました。また、両方で 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
私のサーバーの 1 つのユーザー名は server1@localhost/voip1 で、もう 1 つのサーバーのユーザー名は server2@localhost/voip2 です。xmpp モジュールが正しく動作するようになりました。しかし、pubsub イベントは正しく配信されません。ご覧のとおり、Tigase サーバーを識別するために IP アドレスを使用しました。res_xmpp モジュールの pubsub_node オプションで同じ IP アドレスを使用すると、サーバーはエラー コード 501 で「機能が実装されていません」というエラーを返します。このため、私はpubsub.192.168.20.105を使用し、これを両方のサーバーの/etc/hostsに設定しましたが、エラーメッセージはありませんが、イベントも取得しません!!! どうすればこれを修正できますか?