[h323plus] Minor issues with upnp

J.C Mercier jcmerc5 at gmail.com
Sun Feb 5 14:12:49 EST 2012


Thanks Simon and all,

I've tested the simpleplus app and it seems to function well except for one
thing. When I have my RTP ports set to 10000 - 11000, when I make a call,
the upnp only maps to 55000 - 55003 both internal and external ports.
Therefore i'm not able to receive any audio or video because 55000 - 55003
are not the ports that i configured.  In h323rtp.cxx i noticed a call;

WORD firstPort = endpoint.GetRtpIpPortPair();  etc.. then a call to open
the ports;

  while (!rtp.Open(localAddress,
                   nextPort, nextPort,
                   endpoint.GetRtpIpTypeofService(),
                   conn,
#ifdef P_STUN
                   meth,
#else
                   NULL,
#endif
                   rtpQos))

which should retrieve the ports that i had set (between 10000 - 11000) but
this doesn't seem to work accordingly and uses different local ports (55000
+).

Any ideas why this could be the case?

Thanks for all your help.

Josh

On Sun, Feb 5, 2012 at 10:42 AM, Simon Horne <s.horne at packetizer.com> wrote:

> Josh****
>
> ** **
>
> I have checked in fixes to ensure both UPnP test Mapping are deleted and
> also removed a double delete that was causing a segfault at shutdown.  I
> also added UPnP support to simple. ****
>
> ** **
>
> You should see this in the tracelog when UPnP creates the maps for
> RTP/RTCP ports****
>
> 2012/02/06 01:34:43.080               4
> upnpcp.cxx(480)        UPnP     Created map UDP 192.168.1.3:55000 to
> a.b.c.d:55000****
>
> 2012/02/06 01:34:43.122               4
> upnpcp.cxx(480)        UPnP     Created map UDP 192.168.1.3:55001 to
> a.b.c.d:55001****
>
> 2012/02/06 01:34:43.122               3
> upnpcp.cxx(1186)      UPnP     UDP mapped ports 192.168.1.3 55000-55001 to
> a.b.c.d 55000-55001****
>
> 2012/02/06 01:34:43.122               4
> h323.cxx(2579)          H323      RTP NAT Connection Callback! Session: 1*
> ***
>
> 2012/02/06 01:34:43.122               4
> rtp.cxx(1482)            RTP        NAT Method UPnP created NAT ports 55000
> 55001****
>
> ** **
>
> Simon****
>
> ** **
>
> *From:* h323plus-bounces at lists.packetizer.com [mailto:
> h323plus-bounces at lists.packetizer.com] *On Behalf Of *J.C Mercier
> *Sent:* 05 February 2012 08:47
> *To:* h323plus at lists.packetizer.com
> *Subject:* [h323plus] Minor issues with upnp****
>
> ** **
>
> Hi all,
>
> If i may first note, I've compiled the latest h323plus with no problem,
> but when i go to compile the simpleplus program, it gives an unresolved
> error for H46019UDPSocket::GetPeerAddress(...).   This happens because
> H323_H46024A and H323_H46024B are disabled and GetPeerAddress is defined
> within H323_H46024A but declared within H323_H46019M. I did a minor work
> around and it now compiles fine.
>
> Another issue I came upon, when I initialize UPNP during the h323
> initialization, during the UPnPThread::TestMapping()  function call, it
> manages to map both ports (11000 and 11001) but after calling
> RemoveMap(extPort,true);  and  RemoveMap(extPort+1,true), only 11001 is
> removed and not 11000. I tested this with different port range and it
> produces the same results (one unmapped and not the other). Is this
> supposed to be the case or is something wrong somewhere?
>
> Although, after closing the program, both ports are unmapped successfully.
> But another problem that happens every time I close the program is a memory
> access violation at;
>
>     ~IxNATNumberOfEntriesCallback() { delete m_pointer; } from
>
> interface IxNATNumberOfEntriesCallback : public INATNumberOfEntriesCallback
>
> Any reason why this could be the case?
>
> Lastly, when upnp is initialized, making a call doesn't seem to open and
> map the ports at all. What else should be done aside from initializing
> upnp?
>
> Your help and suggestions will be greatly appreciated.
>
> Thanks
>
> Josh ****
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.packetizer.com/pipermail/h323plus/attachments/20120205/d7bf242a/attachment.htm>


More information about the h323plus mailing list