Opal is the letters of Open Phone Abstract Library, which is still an open source VoIP protocol stack developed by Equivalence. It has been developed in 2001 until it is not officially released, and only from cvs: http: // CVS. SourceForge.Net/viewcvs.py/openh323/opal downloads the latest version, and now the 2.05bate version has a lot of questions, but these don't prevent me from optimistic about Opal. Opal still uses PWLIB as a development library. The latest PWLib actually only PTLIB, Equivalence has stopped developing the PWLIB's GUI, and the GUI turned to more powerful wxwindows. The maximum feature of OPAL as the next-generation protocol stack of OpenH323 is to join the support for the SIP protocol. OPAL retains most of the OpenH323, and joins the base class for an abstract description of EndPoint, Connection, making it new protocols and devices. It is more simple and convenient.
The most important classes in OPAL are new: OpalManager, which is the same as the H323ndPoint position in OpenH323, which defines the most basic operations in the OPAL system, so each application must derive a class from OpalManager, and then overload virtual functions Implement your own operation. OpalManager :: SetUpCall (partyA, partyB, token); call, partyA a session initiator, partyB recipient is a session OpalManager :: OnIncomingConnection (connection); answer, the answer returns TRUE, then returns FLASH rejected OpalManager :: AdjustMediaFormats (connection , MediaFormats; Adjusting Media Format OpalManager :: ClearCall (Token, REASON, SYNC) Clear Call, Sync If null is NULL, it will not wait for quick return OPALENDPOINT is the base class, H323, SIP, PSTN, IVR, LID, sound card. The endpoints are inherited in this class, and it is worth noting here that even the sound card devices also see a endpoint. OpalpcssendPoint is a more important class in Endpoing. After all, the call or the sound card is used, and the constructor of opalpcssendpoint must reference an instance of the derived OpalManager class.
The following specific example simpleopal is explained: opal = new mymanager; // Newly built an instance if (opal-> initialise (args)) // call mymanager :: initialise () function initialization Opal-> main (args); // Waiting for the user to enter the command cout << "EXITING" << getName () << endl; delete opal; // Wipe PP section initialise () function code: setVideoInputDevice (video); // Set input video device ... setVideooutputDevice (VideoOutputDevice ); // Output video device ... setAudiojitterdelay (minjitter, maxiitter); // Sound jitter cache minimum and maximum ... setMediaformatmask (args.getoptionstring ('d'). Lines ()); // Shielded Media format setMediaformatorder (args.getoptionstring ('p'). Lines ()); // Media format usage sequence ... setTranslationAddress (args.getoptionstring ("translate"); // Set external IP address ... set *** Ports (r GS.GetOptionString ("TCP-BASE"). Asunsigned (), args.getoptionstring ("tcp-max"). asunSigned ()); // Settings related port setstunserver (args.getoptionstring ("stun")); / / Use Stun Server ... pcssep = new mypcssendpoint (* this); // Newly build a MyPCSsendPoint instance PCSsep-> setSoundDevice (args, "sound", psoundchannel :: recorder) // set related play sound equipment ... H323EP = New H323ndPoint (* this); // H323EP initialization H323EP-> DisablefastStart (args.hasoption ('f')); // Close fast dial mode H323EP-> disableh245tunneling (args.hasoption ('t'));
// Close H245 channel mode H323EP-> addaliasName (aliases [i]); // Add nickname H323EP-> setInitialbandWidth; // Limit bandwidth H323EP-> StartListeners // Now start listening, the default is TCP : 1720H323EP-> setgatekeeperpassword (args.getoptionstring ('p')); // Register the password required by the Netlear H323EP-> UsegateKeeper (GKHOST, GKIDENTIFER, GKINTERFACE) // Register> SiPep = New SiPENDPOINT (* This); // SIP also comes to SIPEP-> SetUseRagent ("SIP-User-Agent")); // Setting User Agent, UseERAGENT is equivalent to EndPointSIpep-> setProxy (args.getoptionstring) of OpenH323 "SIP-Proxy")); // Set the SIP agent, here Proxy is equivalent to GatekeePersiPep-> setmimeform ("use-long-mime") in H323; // mime header SIPEP-> StartListeners // Listening start, default is TCP: 5060 and UDP: 5060MAIN () function partial code: IF (pcssep! = Null &&! Pcssep-> incomingconnectionToken) {// Be careful, there is a phone to IF (cmd = = "n") PCSsep-> CLEA RCALL (pcssep-> incomingconnectionToken, // I don't pick OpalConnection :: endedbyrefusal); Else IF (cmd == "y") PCSsep-> acceptincomingconnection (pcssep-> // Hello, Xiaoli? incomingConnectionToken;} ... opalall * call = findcallwithlock (currentCallToken); // Let me see that the call if (call! = null) {cout << "clearing call" << * Call << Endl; Call -> Clear (); // nonsense so much, hit the IP phone, hit Call-> unlock (); ... if (Potsep! =
NULL) / / Is it a computer or a machine? SetupCall ("Pots: *", Params [1], CurrentCallToken; // Holder Bar (PSTN) Else SetupCall ("PC: *", params [1], currentcalltoken); // PC does not want money, 嘿 嘿 opal The example MFC is not available at all. OpenPhone's GUI uses wxwindows, so you must have wxwindows to be properly compiled. OpalGW I have tried many times, I can't let others register, it seems that the road to opal is still very long, but Equivalence has developed has gradually turned from OpenH323 to OPAL, and I believe that a stable opal will be released.
Copyright Notice: 9CBS is this BLOG managed service provider. If this paper involves copyright issues, 9CBS does not assume relevant responsibilities, please contact the copyright owner directly with the article Author.