[OpenSIPStack] Problem with RTP_UDP:: Open
Brought to you by:
joegenbaclor
From: Claudio M. <cmi...@gm...> - 2008-01-16 18:51:43
|
Hi, I was working in a softphone and I started to use the method RTP_UDP::Open, but something went wrong. int MediaBasica::OpenSinkRTPChannel(/*int channelID*/ OpalTransport_maritaca & transport,std::string IP4address ) { WORD firstPort = requestRTPPort(transport); // this method gets a possible port to be used. WORD nextPort = firstPort; PIPSocket::Address endereco_local; PString not_buda = IP4address; transport.localAddress = not_buda ; // transport is a variable used inside the class MediaBasica endereco_local = not_buda; while (!transport.maritaca.session_udp->Open( transport.localAddress /**socklocal*/, firstPort, firstPort,'R',NULL,NULL)) { At this moment my program stop working. Everything has valid values. I used the PTRACE log to see exactly where it had stopped, and I found this in RTP.cxx BOOL RTP_UDP::Open(PIPSocket::Address _localAddress, WORD portBase, WORD portMax, BYTE tos, PSTUNClient * stun, RTP_QOS * rtpQos) { // save local address PTRACE(1,"1"); // I put this ptrace localAddress = _localAddress; PTRACE(1,"2");// I put this ptrace localDataPort = (WORD)(portBase&0xfffe); PTRACE(1,"3");// I put this ptrace localControlPort = (WORD)(localDataPort + 1); My output is 1, everything is ok until this line. What did I do wrong ? Thanks in advance Claudio Miceli de Farias |