[asterisk-dev] chan_h323 status in 1.8 branch ?

Pavel Troller patrol at sinus.cz
Wed Mar 2 06:04:36 CST 2011


Hi!
  I was playing a little with chan_h323 in 1.8 SVN branch (version:
Asterisk SVN-branch-1.8-r309084M). It seems it has a lot of issues. It was
compiled with h323plus-1.19.0 (the latest which asterisk configure script
allows) and with the latest pwlib-1.x (pwlib 2.x has issues with BOOL 
typedef and chan_h323 doesn't compile with it).
  1) The whole asterisk crashes upon unload - corrupted memory. The backtrace
is useless - corrupted stack. I didn't find a cause of this.
  2) Without a patch, it doesn't accept peers, always complaining that ai_family
is not supported. The following patch fixes it:

Index: channels/chan_h323.c
===================================================================
--- channels/chan_h323.c	(revision 309090)
+++ channels/chan_h323.c	(working copy)
@@ -1542,6 +1542,8 @@
 			{
 				struct ast_sockaddr tmp;
 
+				tmp.ss.ss_family = AF_INET;
+
 				if (ast_get_ip(&tmp, v->value)) {
 					ast_log(LOG_ERROR, "Could not determine IP for %s\n", v->value);
 					ASTOBJ_UNREF(peer, oh323_destroy_peer);
  
  3) Incoming calls are complaining similarly - that address family is not
supported by protocol - when a RTP socket has to be opened. Asterisk then
immediately crashes again. The following (experimental) patch is fixing it:
Index: res/res_rtp_asterisk.c
===================================================================
--- res/res_rtp_asterisk.c      (revision 309090)
+++ res/res_rtp_asterisk.c      (working copy)
@@ -413,6 +413,9 @@

 static int create_new_socket(const char *type, int af)
  {
  +       if (af != AF_INET6)
  +               af = AF_INET;
  +
          int sock = socket(af, SOCK_DGRAM, 0);

	          if (sock < 0) {

  My first version tested for af == AF_UNSPEC but it didn't help, it looks
that some garbage is coming in the af but not just zero. Now I'm allowing just
inet6 (for other protocols, i.e. SIP) and inet. I didn't find a real cause of
this problem.

  4) With both the patches above, I can call to the 1.8 system (from 1.6 one,
which works relatively stable). However, the called person doesn't hear the
caller, there is a ringback tone (strange, a ringback for the CALLED party),
while calling party can hear a real audio from the called one. Simultaneously,
asterisk (1.8) complains:
[Mar  2 12:56:44] WARNING[27537]: chan_h323.c:930 oh323_indicate: OH323: Don't know how to indicate condition 22 on ip$x.x.x.x:43175/4408

After all that, I stopped my further experiments, feeling it as a waste of 
time.
  Are there plans to bring chan_h323 back inline to a good working condition ?
I would need it to migrate from 1.6 asterisk (with a rather limited support)
into 1.8 (because it's LTS).

  With regards,
    Pavel



More information about the asterisk-dev mailing list