Integrate XMPP Chat with my own application

hi Guys,

I want to integrate XMPP Chat of Freepbx with my own application.
how can I use the XMPP Chat Server of Freepbx with my application.

Any suggestions and guides.

XMPP is an open and free to use standard. With that, there are lots of FOSS chat applications out there. Have you tried to obtain one, and try to connect it to FreePBX to see what happens?

how can I connect it with Freepbx ?

if you can chare me the link for any of the free applications.

https://xmpp.org/software/clients.html

1 Like

Where can I look for the Backend configuration files of the XMPP Server ?

I have downloaded the PSI but when I enter the server ip in host section of the register account it says “you have entered an invalid server name”

I have enabled the xmpp module for my website application but it’s now asked me for wss://mysite.com//xmpp-websocket

I know Freepbx is using Prosody for xmpp but where are the config files located ?

using this guide as a reference.

check websocket portion.

https://m.conversejs.org/docs/html/setup.html

It asked for this link

localhost:5280/xmpp-websocket

server {
listen 443
server_name mysite.com;
ssl on;
ssl_certificate /path/to/fullchain.pem; # Properly set the path here
ssl_certificate_key /path/to/privkey.pem; # Properly set the path here

    location = / {
        root    /path/to/converse.js/;  # Properly set the path here
        index   index.html;
    }
    location /xmpp-websocket {
        proxy_http_version 1.1;
        proxy_pass http://127.0.0.1:5280;
        proxy_buffering off;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 86400;
    }
    # CORS
    location ~ .(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
        add_header Access-Control-Allow-Origin "*"; # Decide here whether you want to allow all or only a particular domain
        root   /path/to/converse.js/;  # Properly set the path here
    }
}

}

@billsimon
do you have any idea what is this

That looks like an nginx ‘server’ clause, are you using nginx?

nope I am using Freepbx (httpd)

Freepbx 15

Sorry, never tried proxying with apache, presumably it would need to be rewritten to suit

No. I don’t even know what you are doing. You stated:

What is your application?

Then you asked about free applications, so I gave you a page with a list. Now you are asking how to configure them, but what does this have to do with FreePBX?

Sangoma Documentation says that the underlying software is Let’s Chat. Documentation for Let’s Chat is here: Let's Chat — Self-hosted chat for small teams

actually we are building an app on top of Freepbx Server. we have achieved the Audio video calling over webrtc and now we are using FreeChat feature of Freepbx (XMPP)

we are integrating conversejs libraries into our application to build chat client.
Please check the below link for reference guide.

https://m.conversejs.org/docs/html/setup.html

1 Like

If you are using apache, you will first need to set up a reverse proxy

and then rewrite it for apache, or use nginx ,apache and nginx can co-exist if they don’t encroach on the other’s ports.

But as you have been already asked “What has this to do with FreePBX?” you apparently got those bits working, so I suggest if all this is above your pay-grade you should spring for a consultant.

1 Like

Does Freepbx 15 comes with installed Let’sChat server or we have to install it separately on Freepbx 15.

Let’s chat is already setup on the PBX so we build libraries on node js with php application and it worked.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.