Integrate XMPP Chat with my own application

configuration
Tags: #<Tag:0x00007f24bd017be0>

(FAK) #1

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.


#2

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?


(FAK) #3

how can I connect it with Freepbx ?

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


(Simon Telephonics) #4

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


(FAK) #5

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


(FAK) #6

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”


(FAK) #7

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 ?


(FAK) #8

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
    }
}

}


(FAK) #9

@billsimon
do you have any idea what is this


#10

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


(FAK) #11

nope I am using Freepbx (httpd)

Freepbx 15


#12

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


(Simon Telephonics) #13

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?

https://wiki.freepbx.org/display/FPG/XMPP+Chat+Management says that the underlying software is Let’s Chat. Documentation for Let’s Chat is here: https://sdelements.github.io/lets-chat/


(FAK) #14

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


How to differentiate between auto call answer ivr and real audio of human
#15

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.


(FAK) #16

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


(FAK) #17

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


(system) closed #18

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