using ice candidates with jingle - xmpp

Im trying to do my first xmpp client with webrtc videochat using strophe with. strophe.jingle
There is very little documentation for it, so ive ended up pillaging example code to try and get it working.
I am successfully sending the videochat invite over to the other user via XMPP and the app is trying to setup the chat.
However its giving me errors about ICE Candidates like this (it throws 6-8):
addIceCandidate failed SyntaxError: Failed to execute 'addIceCandidate'
on 'RTCPeerConnection': The ICE candidate could not be added.
a=candidate 2565634929 1 udp 41819903 66.228.45.110 64264 typ relay
raddr 79.260.27.217 rport 58182 generation 0
Ive done enough searching to realize that i need to set ice server urls or something.
But i am at a loss as to how.
Ive tried:
var ice_config = {iceServers: [{url: 'stun:stun.l.google.com:19302'}]};
connection.jingle.ice_config = ice_config;
I am sending the invite like this
connection.send($pres({to:peer}));
connection.jingle.initiate(peer, connection.jid);
At this point i feel like its all over my head and its really hard to read up on it without any real documentation.
If anyone can throw me a bone, id be really really happy.

try removing the 'a=' from the line returned by
https://github.com/ESTOS/strophe.jingle/blob/master/strophe.jingle.session.js#L542
chrome changed the syntax of this at some point and seems to no longer accept the old syntax.
Update: turned out to be a bug. Check the updated version on github and file an issue there if it is still not working.

Related

Problem using signalr for chat application flutter

I had made a whole chat application using signalr as a socket with the online and offline facility. I am facing a few problems,
Signalr connection is always time out after some time, to overcome that I had condition if hubconnection is not connected then create new hubconnection (onResume app), but still it get hubconnection._callback got increased when sending message and not moving to server side socket. Again need to refresh whole app.
Can someone tell me whether this is problem because there are lot of operations going on and so signalr loses its connection as flutter is single thread and it cannot handle much? or should I use Isolate or inherit widget.
Summary problem:
I cannot send message in chat after sometime. It stores all message in hubconnection._callback and not going for server.
Is anything better solution to keep alive in both Android+iOS.
I had used https://pub.dev/packages/signalr_netcore package.
Please do not mention about firebase.
Any other logic suggestion is appreciable.
Thank you.
I've been using a different package, https://pub.dev/packages/signalr_core, which works fine without any particular issues what I have observed at the moment.
I'm only running about 10 listeners simultaneously, not sure if that is more or less than you. In the package I'm running you can establish connection with automatic reconnect. It looks like this:
HubConnectionBuilder().withAutomaticReconnect().withUrl(....)
It seems like your package have the same functionality... Have you tried that?

Closing the server after receiving TCP request

I'm building a JMeter script in which I'm sending a TCP messages (both fixed length and variable length) to a server. The problem is the server doesn't sends anything at the end of the response message that may indicate that the response message is ended, resulting in the test run keeps on running and if I stop it manually it gives a 500 (Read Exception). I've by-passed this situation by adding a response time-out and a response assertion but when I load test my script all the requests fail. I've tried putting \n, \r, setting end of line to 10 etc but all in vain.
Now I've already gotten some opinions like it is due to server side settings but my question is what exactly are those settings about. Because I've to explain this blocker to non-tech persons. So is there any way that this issue can be overcome or can anyone please tell me what exactly are the server side settings that need to be configured.
If your requests fail then your Response Assertion doesn't really act like a "workaround", either you configured it not properly or you're receiving something which is not expected by the assertion.
We cannot help you efficiently without seeing:
Your Response Assertion configuration
TCP Sampler (or whatever Sampler you're using) response from the View Results Tree listener
At least few lines from hte .jtl results file containing results of your "load test"
If you want to mark all the Samplers as successful no matter of the real outcome you can use JSR223 Assertion with the following one-liner:
prev.setSuccessful(true)
Make sure to put it "high enough" so all the Samplers would be in the Assertion's scope
With regards to the "server-side-settings" which we're supposed to "tell" - we don't know that "server" you're trying to test so if it's something free and open source we need to know that piece of software name.
If it's something your colleagues developed in house - I'm afraid we're not able to help at all, you'd better ask them.

Coffescripts not receiving data from broadcasted message relay job

Here's the code:
How to ensure the javascripts/channels/chatrooms.coffee is loading and receive: (data) works? Console.log data is not loading
I posted the problem the other day. It comes from a tutorial, but somewhere after continuing work on my project, I'm not sure where the bug came up,
But the message relay job posts on the server, and my config.yml has redis with redis up and running.
There have been similar bugs, but I've worked through those solutions and it's not enough. The received: (data) console log doesn't arrive in the js console of the browser.
The App subscriptions seem to all be in order according to the tutorial, I bet it's a really simple fix.
My messaging system still works, so it's not crucial to the project, but it's a difference of having the chat system work in realtime versus with a 4 second page-refresh delay.
The last problem I had was not including jquery for my other coffeescripts, so I'm guessing the channels coffeescripts is probably a one line fix.

How do I programmatically turn on/off Mute Groups on my Behringer X32?

I've got a Behringer X32 rack, which uses an extension of the OSC (Open Sound Control) protocol. This particular rack communicates via UDP packets on port 10023. A fellow named Patrick Maillot actually has some pretty extensive albeit unofficial documentation of the protocol, including multiple executables you can download to interact with the system (outside of the official Behringer apps).
What I would like to do is pretty simple, though I'm having a hard time getting up to speed with this. I want to be able to mute and subsequently un-mute Mute Group 1 on my device. The mute group is already set up; all I want to do is utilize the protocol to either activate or deactivate it.
I can successfully connect to the rack using the X32_Command.exe program. But wading through the documentation, here's what I came up with as my best guess for which commands I should be sending:
/config/mute/1/ON
/config/mute/1/OFF
However, I don't think I have the syntax right (or maybe I've just got the wrong set of commands altogether), because those don't seem to do anything. In the X32_Command.exe console application I appear to receive the following responses when issuing those commands, respectively:
->X, 20 B: /config/mute/1/ON~~~
->X, 20 B: /config/mute/1/OFF~~
However, nothing actually happens on the rack. The mute group isn't affected at all when I issue these commands. How do I get this working? What am I doing wrong?
Just saw this (better late than never). The correct syntax for X32_Commmand.exe would be (as stated in the documentation):
/config/mute/1 ,i 0
/config/mute/1 ,i 1

text-chat xmpp message stanzas never make it to the network - iphone project using libjingle

i thought it'd be better to rephrase. my earlier formulation of my question could have been better focused. the trouble with presence notifications, while real and still recurring, is kind of minor. the things i haven't figured out yet i can fake or work around. much less of a concern than getting basic text chat messages moving between users.
again, still fairly new with this combo of tech flavors - using libjingle as the heart (and liver and kidneys...) of an iphone xmpp/jabber app. got the sign on part, the presence notification/roster updating business actually seems to be working more or less as it should. but xmpp text chat message stanzas seem to vanish before making it out on the wire. capturing other network traffic, and perusing the pretty packets, i yeah, i can see the exchanges for sign on, etc. that got us going, but then nothing for chat.
i've checked and double checked how i'm putting together the stanzas, attributes, namespaces, etc. everything looks jim-dandy to me. i can see that a message is getting queued in the libjingle internal infrastructure. but no results on the ethernet.
hoping somebody who has played around with this stuff before might remember a similar stumbling block and can offer up a hint, suggestion, or pointer in the right direction.
thanks for any help.
mike