XMPP "stream erro" when trying to connect BRIA Android client

I have purchased and installed XMPP Pro and User Management on my FreePBX server.

When activating XMPP client on BRIA Android client (192.168.0.157) then I get “stream error” from the XMPP server (192.168.0.250). Looks like XMPP server IP address is not valid (see Prosody log file at the end of this post). What am I missing ?

this is the freepbx generated prosody_additional.conf file :

this is my – Do NOT edit this file as it is auto-generated by FreePBX. All modifications to –
– this file must be done via the web gui. There are alternative files to make –
– custom modifications, details at: http://freepbx.org/configuration_files

modules_enabled = {
“admin_adhoc”;
“admin_telnet”;
“bosh”;
“console”;
“dialback”;
“disco”;
“groups”;
“legacyauth”;
“pep”;
“ping”;
“posix”;
“private”;
“roster”;
“saslauth”;
“tls”;
};
data_path = "/usr/com/prosody"
authentication = "internal_plain"
storage = "sql"
log = "/var/log/prosody/prosody.log"
pidfile = “/var/run/prosody/prosody.pid”;
sql = { driver = “MySQL”, database = “asterisk”, username = “freepbxuser”, password = “xxxxxxxxxxxxxxx”, host = “localhost” }
VirtualHost "localhost"
groups_file = "/etc/asterisk/prosody_groups.txt"
Component “conf.localhost” "muc"
Component "asterisk.localhost"
component_secret = "asterisk"
validate_from_addresses = “false”

this is the prosody_groups.txt file after defining user “test” with password “test” via FreePBX User Management:
[user]
[email protected]

XMPP set to YES

I did not link any extension yet (I tried this also but it did not make any difference), to make things simple. I suppose iSymphony is to be used for presence updates from FreePBX extensions - that’s my next step. First I want to register a user to the XMPP server.

this is the FreePBX XMPP jabber setting:
domain = localhost

Finally I have configured a BRIA Counterpath Android client as follows:

Username : test
Password : test
Domain : IP adres of FreePBX server (192.168.0.250)

BRIA Account advanced settings: all default (empty resource, priority 0)

In the Prosody server logfile I get the following:

Sep 28 13:33:54 general info Hello and welcome to Prosody version 0.9.1
Sep 28 13:33:54 general info Prosody is using the select backend for connection handling
Sep 28 13:33:54 portmanager info Activated service ‘s2s’ on []:5269
Sep 28 13:33:54 portmanager info Activated service ‘component’ on [127.0.0.1]:5347
Sep 28 13:33:54 modulemanager error The mod_console plugin has been renamed to mod_admin_telnet. Please update your config.
Sep 28 13:33:54 portmanager info Activated service ‘console’ on [127.0.0.1]:5582
Sep 28 13:33:54 portmanager info Activated service ‘http’ on [
]:5280
Sep 28 13:33:54 portmanager info Activated service ‘https’ on []:5281
Sep 28 13:33:54 portmanager info Activated service ‘c2s’ on [
]:5222
Sep 28 13:33:54 portmanager info Activated service ‘legacy_ssl’ on no ports
Sep 28 13:33:54 mod_posix info Prosody is about to detach from the console, disabling further console output
Sep 28 13:33:54 mod_posix info Successfully daemonized to PID 19626
Sep 28 13:33:54 localhost:groups info Groups loaded successfully
Sep 28 13:33:55 jcp1a33aa0 info Incoming Jabber component connection
Sep 28 13:33:55 asterisk.localhost:component info External component successfully authenticated
Sep 28 13:34:01 c2s1a99690 info Client connected
Sep 28 13:34:01 c2s1a99690 info c2s stream for <192.168.0.157> closed: This server does not serve 192.168.0.250
Sep 28 13:34:01 c2s1a99690 info Client disconnected: connection closed

1 Like

I found the problem : apparently you can’t use “localhost” in the XMPP/Jabber settings. You need to fill in a domain or the IP address of the server. Weird that FreePBX Wiki suggest “localhost” ???

Works fine for me. Though it looks like you have multiple ips addresses assigned to said server. That could be your issue.

There is a second NIC card in my server, but the eth1 interface is not active. As soon as “localhost” is used in stead of the IP address I get stream errors… This problem seems now resolved for the XMPP user I have created by not using “localhost” , but presence information from FreePBX extensions remain a problem. It looks like asterisk is still using “localhost” : this is what I find in Prosody log files:

Sep 29 22:36:44 mod_component info Disconnecting component, stream:error is: stream:errorasterisk.localhost does not match any configured external components</stream:error>

How is Asterisk presence handled in FreePBX ? Via iSymphony ? The iSymphony configuration and related configuration in the extension module is not clear to me - so I wonder how XMPP presence info of Asterisk extensions is handled and reported via XMPP. There is a link to extensions in the User Management module, so that’s why I was thinking that iSymphony is not really needed… Jabber settings in the extensions module seem to be linked with iSymphony, but they are also linked to users in the User Management module. So where is the correct binding to extensions?

Or do I need iSymphony V3 commercial module for Presence and IM to work in FreePBX? I’m not really interested in the Call Management features of iSymphony, just Presence and IM.

P.S. I checked iSymphony configuration and “localhost” is replaced everywhere by the server IP address., but this does not help me out. So I would appreciate some help in XMPP configuration in FreePBX.

Hey Woodpecker, I am wondering if you ever resolved this issue? I am going through the exact thing right now, but I can’t seem to find a solution for it. Were you running on a VM by any chance?

Hi - I was not using a VM - and had to replace localhost by the server’s IP address. Meanwhile I have installed FreePBX 12 and use VM via Proxmox. I will try again XMPP IM and presence one of these days and I will let you know if this issues is still there.

I’m seeing the same issue here. I have my root domain name set in the only option for XMPP but when i try and connect the prosody_debug log is showing

Nov 08 22:23:31 socket debug server.lua: accepted new client connection from 127.0.0.1:43055 to 5347
Nov 08 22:23:31 jcpaf1010 info Incoming Jabber component connection
Nov 08 22:23:31 mod_component info Disconnecting component, stream:error is: stream:errorasterisk.domainname.com does not match any configured external components</stream:error>
Nov 08 22:23:31 jcpaf1010 info component disconnected: nil (false)
Nov 08 22:23:31 socket debug server.lua: closed client handler and removed socket from list