我想在 ejabberd 服务器中配置房间
1)通过配置ejabberd的配置文件创建两个具有房间名称的房间
Room Names will be 1) visitors 2) native
2)不允许用户创建房间
3)用户可以加入通过 ejabberd 服务器配置的任何房间
到目前为止我已经配置了以下值mod_muc
{mod_muc, [
%%{host, "conference.@HOST@"},
{access, muc},
{access_create, muc_admin},
{access_persistent, muc_admin},
{access_admin, muc_admin},
{max_room_id,2},
{max_room_name,2},
{max_room_desc,300},
{default_room_options,
[
{persistent, true}
]}
]},
{mod_muc_log,[
{access_log, muc},
{cssfile, false},
{dirname, [email protected]},
{outdir, "/var/lib/ejabberd/muclogs"},
{timezone, universal},
{spam_prevention, true},
]},
我从 strophe 的客户端界面传递以下值
JID : [email protected]
Password: userpassword
Room: [email protected]
Nickname:user1
但我不知道在哪里指定两个房间名称并在文件中分别配置它们
通过上述配置,我收到来自服务器的以下响应
<body xmlns='http://jabber.org/protocol/httpbind'>
<presence xmlns='jabber:client'
from='[email protected]'
to='[email protected]/40570047311328899827978413'
type='error'>
<error code='404' type='cancel'>
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Conference room does not exist</text>
</error>
</presence>
<presence xmlns='jabber:client'
from='[email protected]/40570047311328899827978413'
to='[email protected]/40570047311328899827978413'
type='error'>
<priority>-1</priority>
<error code='403' type='auth'>
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Room creation is denied by service policy</text>
</error>
<error code='404' type='cancel'>
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Conference room does not exist</text>
</error>
</presence>
</body>
在存在处理程序中,我注意到我的发件人 ID 与我的房间 ID 不匹配