Hi Simon and "chr_cb". First of all, thanks for your help. Today I was able to establish an audio only call between H323 and SIP using the gateway I'm developing. This is great but I still have some problems and I appreciate any help on this:
1) Like I said, it was an audio only call. I was able to compile the plugins with the packages from Ubuntu repositories (libx264-dev, libavcodec-dev and libavutil-dev) but my project also uses ffmpeg and x264 so I would like to compile with the latest source code from git we use. The config.log shows some errors and on the internet I saw somebody saying that only a specific version of ffmpeg allows the compilation. Is that true? If so, what would be the version of ffmpeg and x264 I should use? Again, I would like to reiterate that I only want to have H264 on my capabilities list (I don't want to capture/render video). Do I indeed need the plugin? Is there another way?
2) If I set the gateway capabilities in the beginning it works but I want so set them in a later time. Specifically, I receive the call and send an invite on hold to SIP. Then it will answer with 200 OK with SDP. In this moment, when I have the SIP SDP, I want to set the gateway capabilities based on what the SIP side supports. How can I do this? If I try to add in this moment it simply doesn't add them.
Thanks in advance.

2012/3/13 Simon Horne <s.horne@packetizer.com>
Diego

The plugins load default capability instances into the H323Endpoint.
When the H323Connection is created these capabilities are cloned
In H323Connection::OnSetLocalCapabilities()
Simply remove the unmatched capabilities
localCapabilities.Remove("H.264*");

The H323_ExternalRTPChannel does not handle RTP but can be used to not use
the internal RTP system. You can have your own external RTP stack or not
have one at all.
You needed to read and populate H245_H2250LogicalChannelParameters in the
send and receive message of the class with those of the SIP Client.

I do have serious doubts what you are planning will work not because it
can't technically work but because of the differences in H.323 and SIP with
Video. H.323 is very strict on rules while SIP is very loose on
interpretations.
Here are the problems
1. RTP packetization H.323 says strictly single NAL SIP is undefined 2
options (Single NAL/Fragmented units) . You will get video on the H.323 side
just fine but your SIP side with some devices may not be able to decode.
2. Payload Type for H.264 is specified as being flexible but a lot of SIP
implementations have them fixed (usually 96 or 97) so H.323 requests 103
SIP always ends 97  no video on the H.323 side. There is no way you can fix
this with signaling as SIP tells the other party what it is going to send
and H.323 tells the party what it wants to receive. You have to proxy the
media to fix the payload type number.

Good luck.

Simon

============================================================================
=============================================

From: Diego Carvalho [mailto:diego.cdomingos2010@gmail.com]
Sent: 14 March 2012 06:09
To: Simon Horne
Subject: Re: [h323plus] H323-SIP Gateway with H264 Support

Hi Simon, thanks for answering but I still have some doubts:
You said that this plugin will add the capability automatically. Actually,
as I said, I'm building a H323-SIP gateway so, for instance, when the SIP
endpoint is making a call I want to add the H264 capability only if the SIP
endpoint offers it. Will I be able to add the capability manually? For
instance, using localCapabilities.Add(new H323_H264Capability()). To
sumarize, I want to be able to add (or remove if it was automatically added
and the current call does not offer it) manualy the H264 capability.
Also I don't know if the H323_ExternalRTPChannel applies to my situation.
It's used to pass the RTP to another device. I don't want to handle the RTP
at all (to be clear: I don't want RTP arriving on the gateway's network
card). I want to send to h323 the RTP address/port SIP offered and
vice-versa, so the RTP will flow directly between the endpoints. Any
thoughts? Thanks in advance.
2012/3/13 Simon Horne <s.horne@packetizer.com>
Diego
 
H.264 is a video plugin in the plugin/video directory. You will need X264
and FFMPEG.  For Ubuntu they are libx264-dev  libavcodec-dev and
libavutil-dev.
 
You build the plugin .so and the helper (in the gpl subdirectory) and place
them both in the same directory as you app. The application will load them
at startup and automatically add the capability to the capabilityset etc
 
If you don’t want to use the plugin for RTP then have a look at the
H323_ExternalRTPChannel. This will bypass the RTP handling in the codec to
whatever you want.
http://www.voxgratia.org/docs/external_rtp.html
(its from 2004 but still current)
 
Simon
 
 
From: h323plus-bounces@lists.packetizer.com
[mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of Diego Carvalho
Sent: 14 March 2012 03:05
To: h323plus@lists.packetizer.com
Subject: [h323plus] H323-SIP Gateway with H264 Support
 
Hi all,
I'm working on a h323-sip gateway with video (H264) support and I'm facing
some problems. I'm new with H323plus and with h323 protocol itself (I'm
learning as I go) so excuse me if I say something stupid.
First of all, I believe that the stack can be used to build a gateway but it
seems that it's more focused on terminals. Am I right? So is it possible or
not to build a gateway using it?
Second, there is no native support for H264. The documentation shows the
class hierarchy. For audio we have, for instance, H323Cabability ->
H323RealTimeCapability -> H323AudioCapability -> H323_G711Cabability but we
don't have H323Cabability -> H323RealTimeCapability -> H323VideoCapability
-> H323_H264Cabability. I tried to create this one, extending from
H323Cabability -> H323RealTimeCapability -> H323VideoCapability ->
H323GenericVideoCabability and then I discovered that I would need to
override a function called CreateCodec to return a codec that handles the
video. But I don't want to handle the RTP media. I just want to put H264 in
the terminal capability set and establish a connection in a way that the
H323 and SIP terminals can exchange the media directly. I've heard about a
H264 plugin but it seems that it is for handling the media, so I don't know
if it fits my purpose. How can I achieve this? Is there any plan to support
H264 natively on H323plus? Also I need to get the remote RTP port. The only
way I found to do this is trough H323Connection::OnStartLocicalChannel but
this is called after a channel to handle the data is created and again, I
don't want to handle the RTP data. I appreciate any help. Thanks.