![]() |
Version 1.0 |
|||||||||||||||||
|
|
The form below loads the Media Plugin. The form allows you to manually call Media Plugin methods.
You may want to test the Media Plugin with a simple XIMSS session.
Use a regular "telnet"-type application to connect to a XIMSS server such as CommuniGate Pro.
End each command by pressing ctrl-@ to enter binary zero.
Select the Media Leg name Leg1 in the form above, and click the Create Leg button to create a Media Leg.
Click the Play Locally button to test the newly created leg.
You may want to lower the volume by setting a value in the 1-100 range using the Out Level button.
The test sound plays in loop for 2 minutes. To stop it, clear the field next to the Play Locally button and click that button.
Click the Get Local SDP button to retrieve the Media Leg Session Descriptor (in the XML format).
Start a call to a test destination (such as pbx@your_domain) using the copied SDP.You may receive one or several provisioning report messages from the server, followed by one success or failure report.
If the call fails, use the callKill command to release the "leg1" identifier, and make a new call attempt:Click the Activate Leg button to allow 2-way communication.
If you have connected to some IVR application, you can control it by selecting a command next to the Send DTMF button, and clicking that button.
If you have switched peers, or the peer application has switched its media streams, you will receive the callUpdate report message from the server:You may want to use the ActiveX component containing the CommuniGate Pro Media Plugin with your C++ programs.
The Plugin library Interface is defined in the CGateAV.tlb file, copy it to your development system.
The following sample code allows you to access the Media Plugin functions:
#import "CGateAV.tlb" named_guids
void MainInit(void) {
CoInitialize(NULL); // initialize COM libraries
}
void MainRetire(void) {
CoUninitialize(NULL); // retire COM libraries
}
bool MyTest(const char* legName) {
using CGATEAVLib::ICommuniGateAVPtr;
using CGATEAVLib::CommuniGateAV;
bstr_t leg = bstr_t(legName);
ICommuniGateAVPtr pControl;
if(pControl.CreateInstance(__uuidof(CommuniGateAV)) != S_OK) return(false);
pControl->CreateLeg(leg,"","");
pControl->Activate(leg);
bstr_t retrievedSDP = pControl->GetLocalSDP(leg,"xml");
pControl->DestroyLeg(leg);
return(true);
}