0

In H.323 how does the endpoint to endpoint message protocol works? Most of the example i have seen involving gatekeeper in the middle but in reality i want to make a simple Endpoint to Endpoint H.323 player using (c/java/lua/php/d tcp/udp)

What is the RAW message protocols that i should be sending for example in SIP i have found such packets gets sent (https://gist.github.com/1151125)

Nicolas Kaiser
  • 1,628
  • 2
  • 14
  • 26

3 Answers3

3

There are several layers of protocols used in H.323: RAS, Q.931, H.245 and then RTP and RTCP

RAS messages are sent over UDP. They are the communication between an endpoint and his gatekeeper in most scenarios: you register to the gatekeeper using RRQ, you start initiating a call using ARQ, etc. Once the admission part of the call (ARQ) is done, the gatekeeper sends an ACF - admission confirm - where he states where you need to send your Q.931 SETUP message to.

Q.931 messages are usually sent over TCP. They are used to establish a call between endpoints. They can be routed through a gatekeeper or any other mediating device or they can be sent directly between endpoints. The initial Q.931 message sent is SETUP, followed eventually by a Q.931 CONNECT message.

Once Q.931 is established, H.245 is then signaled to deal with call control (exchanging capabilities and opening up logical channels). This can be done tunneled over Q.931 or on a separate TCP connection. And again - you might end up having this routed through a gatekeeper or done directly between endpoints.

RTP and RTCP is the end of the H.245 negotiation and it is where the actual media is found.

Tsahi Levent-Levi
  • 2,351
  • 2
  • 18
  • 26
  • SETUP when you say it means we are sending a packets of 8 bytes with header and commands. CONNECT when you say, it means we are sending a second request to connect? But i am confused on one thing, that is single byte and multi-byte here mentioned e.g: http://www.freesoft.org/CIE/Topics/126.htm –  Aug 17 '11 at 15:46
  • 1
    Not really... SETUP and CONNECT are Q.931 messages sent over TCP. Each one has an arbitrary number of bytes, depending on the actual content of the message itself. Another aspect is the fact that Q.931 is an ISDN protocol. When used with H.323, there's an added User Information Element that has real ASN.1 "stuff" inside it. You can learn more here: http://www.packetizer.com/ipmc/h323/standards.html. This is the ASN.1 part of a SETUP message: http://www.packetizer.com/ipmc/h323/h2250_asn.html#H323-MESSAGES.Setup-UUIE – Tsahi Levent-Levi Aug 19 '11 at 15:31
0

There is an open source implementation in C++: OpenH323 (points to wikipedia which has some more links to the OpenH323 pages).

Andreas Dolk
  • 113,398
  • 19
  • 180
  • 268
  • Thanks for the link. But i want to just make the Signaling without media. And avoid using more dependencies for this stack. So that i can patch in my Java or Php or cross platforms too without facing lot of compatibility issues. –  Aug 17 '11 at 20:36
  • 1
    @89899.3K: I would rethink that strategy. Encoding and decoding H.323 messages is hideously complicated if you don't use a specialized library. And don't even if you have an ASN.1 compiler, getting it to do proper PER encoding (not BER!) is probably more than you want to handle. – Gene Vincent Aug 18 '11 at 19:27
  • @Gene Vincent: What i still believe its all about packets switching. Here to there with RX/TX way and it always worked. But i am getting very scared and curious to break this once again. Like i was in begin scared with SIP, finally i wrote that. I really would appreciate with some more details on this. –  Aug 18 '11 at 20:31
0

Here's a wireshark capture sample of a H323 call: http://wiki.wireshark.org/SampleCaptures http://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=view&target=rtp_example.raw.gz

Responding to the comments, the implementation complexity of SIP in a regular programming language is not a fair comparison. SIP is plain text, designed for simplicity and comprehension. The gist of the library support you need there is string manipulation.

And trust me, implementing H323 on your own without libraries is not like implementing SIP in a language without strings, it's like implementing SIP without a compiler.

Szocske
  • 7,466
  • 2
  • 20
  • 24