Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing a custom xmpp client: Endpoint ID does not match channel bundle ID #531

Closed
timadevelop opened this issue May 17, 2020 · 4 comments
Closed

Comments

@timadevelop
Copy link

Hey guys,

I'm trying to write a custom xmpp client for Jitsi meet in C++.

I'm using the latest docker-jitsi-meet repo in order to run a local jitsi instance. Web client works fine, there are no problems.

But in my custom terminal client I'm getting this error:

Jicofo 2020-05-17 18:11:30.359 SEVERE: [314] org.jitsi.jicofo.AbstractChannelAllocator.log() jvbbrewery@internal-muc.meet.jitsi/8fe84fcdfdbc - the bridge indicated bad-request: <iq to='focus@auth.meet.jitsi/focus28022956168278' from='jvbbrewery@internal-muc.meet.jitsi/8fe84fcdfdbc' id='7C6vp-2134' type='error'><error type='modify'><bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>Endpoint ID does not match channel bundle ID</text></error></iq>

(Endpoint ID does not match channel bundle ID )


Here's how I see the process:

(Based on this answer: https://community.jitsi.org/t/how-jitsi-work/14482/2?u=timadevelop and this diagram: https://www.gliffy.com/go/publish/7649541/

  1. My client connects to the xmpp through 5222 port, authenticates using ANONYMOUS, creates session using <bind> and <session> stanzas and sends <conference> stanza to jicofo.
  2. Jicofo creates a room, joins the room, and makes the one who requested to create the room an owner in the room, if he is the first one.
  3. The client receives the succesfull response from jicofo and joins the room
  4. Nothing happens, here as there is just one participant.
  5. A second participant joins, jicofo sees that and starts the process of connecting both clients
  • sends an IQ to the jvb component address to allocate channels for both participants.
  • uses the allocated channels data to create jingle session-initiate, which then sends to both clients
  1. Clients accept it and start sending and they are now connected using jvb.

But here's what I get :(

  1. OK.
  2. It works, Everything is OK
  3. Everything is OK, I can even send and respond to messages, also I send <ping> and <presence> stanzas.
  4. Yep, right.
  5. Right, jicofo starts to connect my client & web client, BUT:
  • jicofo sends iq to jvb - at this point, jicofo tries to allocate channels for web & my clients. Everything should be fine, but JVB responds with Endpoint ID does not match channel bundle ID when jicofo tries to allocate channel for my client.
  • *jicofo sends jingle to the browser client, but not to my client due to the error above.
    and in jicofoc logs there's Jicofo 2020-05-17 18:11:31.037 WARNING: [30] org.jitsi.jicofo.JitsiMeetConferenceImpl.log() No jingle session yet for room@muc.meet.jitsi/urxvt
  1. My client has nothing to accept and jicofo logs something like No jingle session yet for room@muc.meet.jitsi/urxvt

Here are my logs my client and jicofo:

QXmppClientLog.log
jicofo.log


Could you help me with this issue? I'm not sure where am I wrong... Jicofo creates a conference, joins the room, my client appears in the room and even can send messages to others, can leave and rejoin the muc, but the call is not working because I don't get session-initiate jingle from jicofo. And there are also no error stanzas from jicofo.


I've read almost everything on https://community.jitsi.org/ and haven't found anything about this error, but I've found this code:

// The bridge indicated that our request is invalid. This does not

image

Also, I've read all these source files below and found out that Jicofo sets Bundle ID equal to Endpoint ID which is my nickname, is that right?

Thank you,

Vlad.

@bbaldino
Copy link
Member

bbaldino commented May 18, 2020

Thanks for the well-written report, clearly you've done your research :) In general this sort of thing should be posted over at community.jitsi.org, though, until we confirm there's an actual issue.

Can you include logs from the bridge with

 org.jitsi.videobridge.xmpp.XmppCommon.level=FINE

Added in /etc/jitsi/videobridge/logging.properties ? That will allow us to see the Colibri that the bridge is seeing that would generate this error.

Is your client doing max-bundle? (all RTP + RTCP sent and received over a single port?) This is required. If it is, perhaps it's not advertising its transport bundles correctly (it should be a single channel-bundle). Also, I don't see any session-initiate or session-accept in there your client logs?

@timadevelop
Copy link
Author

Thanks for the well-written report, clearly you've done your research :) In general this sort of thing should be posted over at community.jitsi.org, though, until we confirm there's an actual issue.

I think it's not an issue with jiicofo, it's me doing something wrong, I just can't figure out what exactly. I'm pretty new to jitsi (I've been playing with it just for the last week or less), so there may be some obvious mistakes from my side.

If you want I'll move this issue to the community.jitsi, but please do not remove this one until I've moved it to the community forum.

Can you include logs from the bridge with...

Yes, thank for that, here's the JVB log:

jvb.log

and jicofo (FINE)

jicofo.log

And I see the reason for the error (there's no <channel-bundle> in the allocate request iq), but why?
I thought I shound send bundle group on session-accept, but I do not get any session-initiate iq from focus.

<group semantics="BUNDLE" xmlns="urn:xmpp:jingle:apps:grouping:0">
	<content name="audio"/>
	<content name="video"/>
        <content name="data"/>
</group>

Is your client doing max-bundle? (all RTP + RTCP sent and received over a single port?) This is required. If it is, perhaps it's not advertising its transport bundles correctly (it should be a single channel-bundle). Also, I don't see any session-initiate or session-accept in there your client logs?

Do you mean rtcp-mux and bundle? I use gstreamer and they have rtp funnel which adds bundle capabilities, also I have rtpmux element, but these should be used after session-initiate in XMPP, right?

I should advertise my channel-bundle after session-initiate in session-accept jingle, is that right?

Or I should send something else to jicofo in order to promote my bundle & mux caps before I get session-initiate jingle?

@timadevelop
Copy link
Author

timadevelop commented May 18, 2020

@timadevelop
Copy link
Author

So, as @bbaldino said on the community forum, the problem is that my xmpp client library did not send disco features for mux & bundle standards because it actually does not support them.
See https://community.jitsi.org/t/writing-a-custom-xmpp-client-endpoint-id-does-not-match-channel-bundle-id/57699/3?u=timadevelop

Thank you, I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants