Browser-Phone
Browser-Phone copied to clipboard
Text chat is not working
Chat is not working in the latest version.
Error message in console:
[Apr 18 16:01:04] ERROR[15962][C-00000000]: translate.c:1351 ast_translator_best_choice: Cannot determine best translation path since one capability supports no formats [Apr 18 16:01:04] WARNING[15962][C-00000000]: channel.c:6249 ast_request: No translator path exists for channel type SIP (native (g723|ulaw|alaw|gsm|g726|g726aal2|adpcm|slin|slin|slin|slin|slin|slin|slin|slin|slin|lpc10|g729|speex|speex|speex|ilbc|g722|siren7|siren14|testlaw|g719|opus|silk|silk|silk|silk)) to (none) [Apr 18 16:01:04] WARNING[15962][C-00000000]: app_dial.c:2527 dial_exec_full: Unable to create channel of type 'SIP' (cause 58 - Bearer capability not available) == Everyone is busy/congested at this time (1:0/0/1)
I've configured XMPP and I get the below error:
WebSocket connection to 'wss://bp.erss.in/ws' failed: Error during WebSocket handshake: Unexpected response code: 400
Console log says: WebSocket connection from '192.168.2.8:34462' could not be accepted - no protocols out of 'xmpp' supported
You will need to decide if you are going to use SIP or XMPP.
SIP is not very good at all to use as a chat platform. Its very simple, and doesn't contain any features we are used to, without building it yourself. In this case you have to handle the incoming messages with a message context and process it (send the message on) with dial-plan. https://github.com/InnovateAsterisk/Browser-Phone#chan_pjsip
XMPP is better, but you will now have to setup and run an XMPP server. I used Openfire as my test server ( https://xmpp.org/software/servers/). In this case, behind the scenes, the browser phone will establish two websocket connections, one to the SIP server (normally Asterisk), and the other to Openfire.
When you type out a text message, the system will then send the text via XMPP (if you of course have the Chat Engline on XMPP).
I've configured XMPP Server. Still getting the following error:
405 HTTP method GET is not supported by this URL org.jivesoftware.openfire.websocket.OpenfireWebSocketServlet-84ec6a1
It could be that you are connecting to the Openfire legacy http port, not the websocket port. Unless you have configured Openfire differently to default it will be 7443 for secure websocket connections. This is all available on the settings pages, and you can change it to another port available there.
Which version of openfire are you using? I'm using openfire version 4.7.1
Yes, 4.7.1.
I think it's pretty much the defaults.
Im not sure why its showing the old version number... im pretty sure i upgraded it.
Now getting the error as XMPP failed to connect.
Now getting the error as XMPP failed to connect.
Created the user with name profileUser in ejabberd and this error is resolved.
The message is not getting delivered. There is only a single blue tick in the message.
Selecting Buddy: 10105 MESSAGE: sip:[email protected] (extension) Last Activity for 10105 is now: 2022-04-20 07:52:25 UTC Message Accepted: 165044114562457A
Nice work so far! (The problem you have now, is that you are still sending as SIP messages)
Now you need to build a peer relationship. This is done by making another XMPP user, first in Openfire, and then in the Browser Phone. So in your case 10105 must be a full XMPP peer user like 10100.
The way the browser phone builds peers, is a little different, (and admittedly needs some work,) but there is no accept/decline system that is typical of XMPP... its a little closer to Whatsapp, that also assumes that if you have manually added a contact, and that contact now sends you a message, then it should be allowed, right? Well, its the same here.
So, now that 10105 is a full SIP&XMPP peer, remove the 10105 SIP peer you have in 10100's buddy list, and add the new buddy as in XMPP peer - see below:

You will notice that all the information about the peer cannot be set, that's because it will be collected automatically.
When you add the peer, and send the peer a message, the peer is automatically build on the peer side, so you can both communicate, again, quite similar whatsapp... but without the block option. This is because of a basic assumption this software makes, and that is it will only be used in a single silo format - as in no public domain.
Is it mandatory to add the buddy for receiving the chat messages?