Asterisk jabber not connecting to XMPP server (Ejabberd)

Hello, I cannot connect to XMPP server. I tried to connect IM clients and they do fine, but Asterisk won’t connect to it. Followed same proccess for both at XMPP server.

This is what CLI shows:

[code]emea_ha1*CLI> jabber show connections
Jabber Users and their status:
[asterisk] - Disconnected

Number of users: 1[/code]


autoregister = yes

type = client
serverhost =
pubsub_node =
username =
port = 5222
secret = mysecret
distribute_events = yes
status = available
usetls = no
usesasl = no
buddy =[/code]

I set usetls and usesasl to ‘no’ because that’s how it is configured now in XMPP srvr.

This is the debugging information when “jabber set debug on” is executed from Asterisk CLI:

[code]JABBER: asterisk OUTGOING: <?xml version='1.0'?><stream:stream xmlns:stream=‘’ xmlns=‘jabber:client’ to=‘’ version=‘1.0’>

JABBER: asterisk INCOMING: <?xml version='1.0'?><stream:stream xmlns=‘jabber:client’ xmlns:stream=‘’ id=‘706326287’ from=‘’ version=‘1.0’ xml:lang=‘en’>stream:featuresDIGEST-MD5SCRAM-SHA-1PLAIN</stream:features>

JABBER: asterisk OUTGOING: server1asterisk0142cb4f7fc4d9ca4b339f82bde9ba5f8df621fb

JABBER: asterisk INCOMING: [/code]

What can be stopping Asterisk from connecting to XMPP server. Ejabberd shows this line in console once every few seconds:

Why Ejabberd says Asterisk user is connected but Asterisk does not? It’s awkward :-/

Thanks for helping.

I have simmilar situation. My xmpp.conf:


statusmessage="Asterisk is up and running"

when I do xmpp show connections I get:

[code]Jabber Users and their status:
[ejabberd] - Authenticating

Number of clients: 1

And communication goes like this:

<--- XMPP sent to 'ejabberd' --->
<?xml version='1.0'?><stream:stream xmlns:stream='' xmlns='jabber:client' to='' version='1.0'>

<--- XMPP received from 'ejabberd' --->
<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='' id='4191260427' from='' version='1.0' xml:lang='en'><stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism></mechanisms><c xmlns='' hash='sha-1' node='' ver='luSjFLdmRycJRxfAe3qWRHbn8TE='/></stream:features>

<--- XMPP sent to 'ejabberd' --->
<iq type='set' id='aaafj' to=''><query xmlns='jabber:iq:auth'><username>jabberAdmin</username><resource>asterisk-xmpp</resource><digest>d4b4569afadda8a51c890cb3424d1d432294ce2b</digest></query></iq>

<--- XMPP received from 'ejabberd' --->
<iq from='' id='aaafj' type='error'><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>

Ejabberd is operational and tested with Pidgin. Although the messaging with Pidging is different. Instead if <if type=‘set’…:

<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5' xmlns:ga='' ga:client-uses-full-bind-result='true'/> .

Is it possible to change how Asterisk talks to ejabberd? Or any other suggestion what to do?

It works now. I put usesasl=yes and it works. I didnt put it before because I red somewhere that SASL doesnt work with LDAP. But it works. So now I have Asterisk talking to Ejabberd which has LDAP authorization.

I am a bit disapointed that JABBER_STATUS isnt working right… :frowning: