How to decode a H323 packet?

884 Views Asked by At

I am looking for a third party library capable of decoding H323 packets. I think I should be able to use OpenH323. But since it's a large library, I don't know which class and function I should use to decode a packet. Any advice would be appreciated!

1

There are 1 best solutions below

0
On

OpenH323 isn't being maintained since many years now. You should use the successor H323Plus instead.

The logic is that you decode the received buffer into one of the H323Plus classes.

H225_RasMessage ras;
ras.Decode(buffer);

From there on you must check the tags in the messages and use references to subclass to access the specific fields.

if (ras.GetTag() == H225_RasMessage::e_gatekeeperConfirm) {
    H225_GatekeeperConfirm & gcf = ras;
    ...
} else ...

For Q.931 signaling messages, you have to strip the TPKT wrapping first.

If you want to avoid doing all this by hand, use the included framework and just subclass H323EndPoint, like the H323Plus sample application does.