Simpliest minimap app to make a call

Help
Alex
2007-08-21
2013-06-03
  • Alex
    Alex
    2007-08-21

    I tried to create a minimal calling app looking into simpleOPAL sample into
    OPAL (which is a successor of OpenH323) library. I use OpenAM project to test it. OpenAM works correctly with
    simpleOPAL.

    I have to create a successor of PProcess and override Main()

    PCREATE_PROCESS(TalkerProcess);

    TalkerProcess::TalkerProcess()
      : PProcess("Open Phone Abstraction Library", "SimpleOPAL",
                 MAJOR_VERSION, MINOR_VERSION, BUILD_TYPE, BUILD_NUMBER) {}

    void TalkerProcess::Main()
    {
            OpalManager manager;
            H323EndPoint h323ep(manager);

            manager.AddRouteEntry("h323:.* = pc:<da>"); // need I ?
            PArgList argList = this->GetArguments();
            PString currentCallToken;
            manager.SetUpCall(argList.GetParameter(0), "pc:*", currentCallToken);

            OpalCall * opalCall;
            while ((opalCall = manager.FindCallWithLock(currentCallToken)) != NULL)
                    PThread::Sleep(1000);
    }

    Openam is "opening a connection", "accepting call" and quickly "closing connection".
    SetUpCall() is non-blocking call. Breakpoint shows me that execution
    traps once to PThread::Sleep(1000), but soon leaves a cycle. Execution
    traps to destructor of H323EndPoint, then fails somewhere in
    destructor of OpalManager - in different places... :-(

    What I'm doing wrong ? I tried to add PCSSEndPoint to manager, but
    this doesn't help. I also experimented with another code of
    OpalManager successor and H323EndPoint in simpleOPAL and didn't get
    the reason.

    So, what should I add to make this minimal program hear the responce
    of openam (and answer to openam) ?

    Sorry for my bad C++, etc skills.

     
    • Alex
      Alex
      2007-08-22

      BTW, also, how can I play WAV right after making an outgoing call ? This shouldn't be answering machine like OpenAM as it accepts incoming connections and then plays a file, and it's OpenH323, not OPAL app.
      I tried to get into <OpalManager successor>::OnOpenMediaStream with OpalFileMediaStream, but it leads to different exceptions.

       
    • Alex
      Alex
      2007-08-23

      I "fixed" exceptions - now I just get silence in one of 2 channels instead of file played...

      Continued getting into things, I'm having plans to try IVR-like soft. I got EXPAT or what else, but PWLib/OPAL didn't found it to compile feature, so I can't use VoiceXML/simpleIVR.

      I'm going to try VoxGratia Woomera somehow...