This document was generated from CDN thread
Created by: David Fernandez Cubria on 10-09-2013 06:47:18 AM
We are developing a TAPI application with Cisco TSP. Everything works fine with a standard user, but when ww define a superprovider to control any CTI device we have problems.
According to Cisco documentation, it´s necessary to acquire the requested line with the class (CCiscoLineDevSpecificAcquire) indicating the "SEPXXXX" with which you want to work.
Currently we have defined something like this:
CCiscoLineDevSpecificAcquire mydev;
char name [16] = "SEP001BD4C66440";
strcpy (myDev.m_DeviceName, name);
lResult = lineDevSpecific (xxxxx, 0, NULL, myDev.lpParams (), myDev.dwSize ());
The problem is with this function --> lineDevSpecific. It needs to be clearly defined line (xxxxxx). In the TSP superprovider mode returns no lines. The question is:
1. How can we acquire the device SEP001BD4C66440 for TAPI application, if the TSP did not return any line with
Superprovider?.
LPHLINEAPP hLineApp=new ::HLINEAPP();
HINSTANCE hInstance=NULL;
DWORD * numDev = new
DWORD;*numDev=0;
LPLINEINITIALIZEEXPARAMS lineInitializeExParams=new LINEINITIALIZEEXPARAMS();
lineInitializeExParams->dwNeededSize = sizeof(LINEINITIALIZEEXPARAMS);
lineInitializeExParams->dwTotalSize = sizeof(LINEINITIALIZEEXPARAMS);
lineInitializeExParams->dwOptions=LINEINITIALIZEEXOPTION_USECOMPLETIONPORT;
DWORD *API= new DWORD(); *API=0x00020000;
lRet = lineInitializeEx(hLineApp,hInstance,lineCallbackFunc,"Cisco Sample Application", numDev, API, lineInitializeExParams); //The TSP did not return any line with Superprovider
if (lRet != 0)
{
cout << "Initialization Failed" << endl;f
return 0;
}
for (int index = 0;index < *numDev;index++)
{
LONG Result = lineNegotiateAPIVersion (*hLineApp,0, 0x00010000, 0x10000000,&dwAPIVersion, &ExtensionID);
lRet = lineNegotiateExtVersion(*hLineApp, index, TAPI_CURRENT_VERSION, 0x00020000, 0x00030001, &retExtVersion);
CCiscoLineDevSpecificAcquire myDev;char name[16] = "SEP001BD4C66440";
strcpy(myDev.m_DeviceName, name);
LONG lResulta=lineDevSpecific(hLine,0,0,myDev.lpParams(),myDev.dwSize());
lResulta=lineOpen(*hLineApp, index, &hLine,dwAPIVersion,(DWORD)retExtVersion,(DWORD)0,LINECALLPRIVILEGE_OWNER,LINEMEDIAMODE_INTERACTIVEVOICE,NULL);
}