[Asterisk-Dev] Re: Asterisk H.323 driver

Charles Wang lazy.charles at gmail.com
Wed Mar 23 12:09:59 MST 2005


Hi, Chih-Wei:

I got asterisk from the CVS header. And make chan_h323 with your patch.

But I got these error messages, can you re-patch for it?


PWLib version is 1.8.1... ok
OpenH323 version is 1.15.1... ok
g++ -g -c -o ast_h323.o -march=i686 -DPBYTE_ORDER=PLITTLE_ENDIAN
-DNDEBUG -DDO_CRASH -DDEBUG_THREADS -pipe -Wall -fPIC
-Wmissing-prototypes -D_REENTRANT -D_GNU_SOURCE -I../../include
-I/root/pwlib/include  -I/root/openh323/include
-Wno-missing-prototypes ast_h323.cpp
ast_h323.cpp: In constructor `
   MyH323_ExternalRTPChannel::MyH323_ExternalRTPChannel(MyH323Connection&, 
   const H323Capability&, H323Channel::Directions, unsigned int)':
ast_h323.cpp:940: error: 'struct rtp_info' has no member named 'addr'
ast_h323.cpp:941: error: 'struct rtp_info' has no member named 'port'
make: *** [ast_h323.o] Error 1




On Wed, 23 Mar 2005 16:44:07 +0800, Chih-Wei Huang
<cwhuang at citron.com.tw> wrote:
> Attach another patch that fixes the RTP problem.
> 
> * Change rtp_info to avoid returning a pointer to a static buffer
> 
> typedef struct rtp_info {
>         struct sockaddr_in rtp_addr;
> } rtp_info_t;
> 
> * If no valid IP returned from on_external_rtp_create,
> try to determine IP by Openh323 stack.
> Now you need not to specify bindaddr in conf so the driver
> can work on a host with multiple network interfaces.
> 
> * Eliminate the usage of MyH323_ExternalRTPChannel.
> The class is unnecessary since original H323_ExternalRTPChannel
> is already good enough. Basically speaking, you override two methods
> of H323_ExternalRTPChannel to do two tasks in MyH323_ExternalRTPChannel:
>  1. Start(): call on_start_rtp_channel to start RTP thread
>  2. OnReceivedAckPDU(): also call on_start_rtp_channel
> 
> 1 is unnecessary since H323_ExternalRTPChannel::Start() just calls
> H323Channel::Open, which calls H323Connection::OnStartLogicalChannel.
> We can move all tasks into OnStartLogicalChannel.
> And 2 is also unnecessary because it duplicates the work done
> by Start(), and it will not be called on faststart situation.
> (On faststart you won't get OLCAck)
> In conclusion, we can move all tasks to do into OnStartLogicalChannel
> and use original H323_ExternalRTPChannel.
> 
> This approach is more like your old code in 1.0.5.
> Of course the old code is buggy, since it didn't correctly determine
> which situation to call on_start_rtp_channel.
> I like this approach since it call on_start_rtp_channel
> via a unique entry. The code is more compact and elegant(hopefully).
> 
> --
>    ~     Chih-Wei Huang (cwhuang at citron.com.tw)
>   'v'    CTO, Citron Network Inc. ( http://www.citron.com.tw/ )
>  // \\   GnuGK Project : http://www.gnugk.org/    (Developer)
> /(   )\  HomePage      : http://www.linux.org.tw/~cwhuang/
>  ^`~'^
> 
> 
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
> 
> 
> 


-- 

Best Regards
Charles



More information about the asterisk-dev mailing list