OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread?

310 Views Asked by At

I am currently in the process of writing an application using OPAL that makes H323 calls. I have looked online for a number of working examples and have managed to put something together that resembles what it should look like, at present I am able to call an external ip via my application but when I accept the call it craps out and dies.

Leaving me with:

0:12.949               SetUpCall:8752       as
sert.cxx(259)   Assertion fail: Transport not terminated when reattaching thread
, file d:\voip\software\opal\src\opal\transports.cxx, line 1021
PAssertFunc(0xde3f88, 0xffffffffd228226f, 0, 0) + 0x82
PAssertFunc(0x10d6e5f8, 0x3fd, 0, 0x10d6eb98) + 0x15b
OpalTransport::AttachThread(0xde5870, 0xffffffffd22fc76b, 0, 0) + 0x96
H323Connection::SetUpConnection(0xffffffffd22fc713, 0, 0, 0xde6ea8) + 0x196
AsynchCallSetUp(0x10d3572c, 0, 0, 0xdd0108) + 0x7c
PThread1Arg<PSafePtr<OpalConnection,PSafePtrBase> >::Main(0xffffffffd2282faf

From what I have deduced, perhaps incorrectly if that there is a thread lock issue caused (possibly arising from the fact my application is sending my expected H323 call, but it is also throwing in a call from sip:fred straight after, I have no idea why).

My current enpoint is set up as follows:

    bool OpalManagerLite::Init()
{
    h323EP = new MyH323EndPoint(*this);

    SetAudioJitterDelay(20, 1000);
    DisableDetectInBandDTMF(true);

    if(!InitEndpoint(h323EP))
    {
        return false;
    }

    if (h323EP != NULL) {
      AddRouteEntry("pc:.* = h323:<da>");
      AddRouteEntry("h323:.* = pc:<da>");

      AddRouteEntry("pots:.*\\*.*\\*.* = h323:<dn2ip>");
      AddRouteEntry("h323:.*\\*.*\\*.* = pots:<dn2ip>");

      AddRouteEntry("h323:.* = pots:<da>");
      AddRouteEntry("pots:.* = h323:<da>");
    }


    PString defaultSrcEP = "pc:*";
    srcEP = defaultSrcEP;

    return true;
}

bool OpalManagerLite::InitEndpoint(MyH323EndPoint * h323EP)
{
    h323EP->DisableFastStart(true);
    h323EP->DisableH245Tunneling(true);
    h323EP->ForceSymmetricTCS(true);



    h323EP->SetLocalUserName("Ronnie");
    h323EP->SetDefaultLocalPartyName("Ronnie");

    PStringArray listeners; // Default listeners opened

    OpalListenerTCP *toListen = new OpalListenerTCP(*h323EP,
            PIPSocket::GetDefaultIpAny(), NULL, NULL);


    if (!h323EP->StartListeners(listeners))
    {
        return false;
    }

    return true;
}

My call is as you would expect when making a call e.g. SetUpCall(srcEP, ip, callToken);

Any help would be greatly appreciated as to why this is occurring, I know I must of tripped up somewhere I just cannot see where.

0

There are 0 best solutions below