question about LINEBEARERMODE_PASSTHROUGH

Win32 Programming

    Next

  • 1. Tapi compatible Handset
    Hi, can anyone plz suggest some of the Tapi compatible handset names and where they can be available.i want to connect to my modem(56k PCI). I am using Unimodem.tsp and windows2000 professional. Regards Srini
  • 2. NR_SCROUTE Problem
    (I am using a D/41 EPCI board) I am writing an application in which I dial in on one line, dial out on another line, then route these two lines together. This part works. When I dial in I also play a wave file to the caller. After the calls are complete I try the same exact thing and it does not work. I can tell that the wave file is being played because I see the EOD event fire but I hear nothing. Even if I restart the application it does not work. I have to restart the board. Has anyone had this problem? If so, any info would help. Thanx in avance Tony
  • 3. lineOpen: which MediaMode to select?
    What LINEMEDIAMODE_ are supported by your modem (LINEADDRESSCAPS.dwAvailableMediaModes, LINEDEVCAPS.dwMediaModes) ? What LINEMEDIAMODE_ did you set in CallParams at lineOpen / lineMakeCall ? "Jack" <replyto@newsgroup> schrieb im Newsbeitrag news: XXXX@XXXXX.COM ... > Hello, > When using Unimodem and selecting MediaMode in lineOpen as > LINEMEDIAMODE_INTERACTIVEVOICE + LINEMEDIAMODE_DATAMODEM > and making a voice call why the connected call is in LINEMEDIAMODE_DATAMODEM > mode? > Shouldn't it be in LINEMEDIAMODE_INTERACTIVEVOICE ? > How Tapi decides which mode to choose? > >

question about LINEBEARERMODE_PASSTHROUGH

Postby Crespo » Fri, 21 Apr 2006 23:45:28 GMT

 I use TAPI3 to program. when the call i made  is in its connected state, i
use ITCallInfo->put_CallInfoLong(CIL_BEARERMODE,LINEBEARERMODE_PASSTHROUGH)
and do some direct control to the modem device. But when I disconnect the
call by using ITBasicCallControl->Disconnect,I found I could not make a new
call on the same ITAddress again. I have checked my codes and was sure that
all objects about the calls I created have been released,  if I Enumerate
call information on the ITAddress object ,the previous call still existed
before trying to make a new call. Could you give me some help on how to
release the previous call using TAPI3.

  Thank you in advance
wu huanfa



Re: question about LINEBEARERMODE_PASSTHROUGH

Postby Andreas Marschall [MVP TAPI] » Sat, 22 Apr 2006 11:29:00 GMT

"Crespo" < XXXX@XXXXX.COM > schrieb im Newsbeitrag



wu,
do you also CloseHandle() all used handles for the direct modem communication?

UniModem.TSP can only manage one call at a time.
If there is any call related reference to the old call then it can't manage a
new one.

Are you using .NET ?

-- 
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
 http://www.**--****.com/ 's_TAPI_and_TSPI_FAQ.htm
My TotoTools (a collection of free, mostly TAPI related tools):
 http://www.**--****.com/ 's_Toto_Tools.htm
TAPI development around the world (Frappr! map):
 http://www.**--****.com/ 
* Please post all messages and replies to the newsgroup so all may
* benefit from the discussion.  Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.




Re: question about LINEBEARERMODE_PASSTHROUGH

Postby Crespo » Sat, 22 Apr 2006 14:16:14 GMT

r Andreas,
Many thanks, You are most kind to answer my question. Yes,I have closed
the file handle gotten from ITLegacyCallMediaControl2->GetID(XXXX) and I
only mange one call at a time, I think I must have something related to the
old call forgotten to release.
My codes is just listed like belowed:

1. make a call:
hr =
pAddress->CreateCall(bstrAddressToCall,LINEADDRESSTYPE_PHONENUMBER,TAPIMEDIA
TYPE_AUDIO,&g_pCurrentCall);
hr = g_pCurrentCall->Connect(VARIANT_TRUE);

2. Process call state of connected:
IEnumCall* ppCallEnum = NULL;
HRESULT hr = pAddress->EnumerateCalls(&ppCallEnum);

ITCallInfo * pCallInfo = NULL;
hr = ppCallEnum->Next(1,&pCallInfo,NULL);

CString csDeviceName = "comm/datamodem";
BSTR bstrDeviceName = csDeviceName.AllocSysString();

ITLegacyCallMediaControl2 * pCallMediaControl = NULL;
hr =
g_pCurrentCall->QueryInterface(IID_ITLegacyCallMediaControl2,(void**)&pCallM
ediaControl);
hr =
pCallInfo->put_CallInfoLong(CIL_BEARERMODE,LINEBEARERMODE_PASSTHROUGH);

DWORD size = 0;
BYTE *pVarDeviceID;
hr = pCallMediaControl->GetID(bstrDeviceName,&size,&pVarDeviceID);
memcpy( &hCommFile, pVarDeviceID, 4 );
hCommFile = *(LPHANDLE)pVarDeviceID;

CloseHandle(hCommFile);
pCallMediaControl->Release();
ppCallEnum->Release();
pCallInfo->Release();

if(g_pCurrentCall)
{
HRESULT hr = g_pCurrentCall->Disconnect(DC_NORMAL);
g_pCurrentCall->Release();
}

g_pCurrentCall = NULL;
pCallStateEvent->Release();
pCallStateEvent = NULL;

For simplity, here I have not supplied codes handling HRESULT errors
returned from every called TAPI object's method.
During my debugging, I found if I put LINEBEARERMODE_VOICE instead of
LINEBEARERMODE_PASSTHROUGH, my codes will work fine and I can make a new
call again.

I am using c++ in .net environment.

Best Regards

Crespo.wu


"Andreas Marschall [MVP TAPI]" < XXXX@XXXXX.COM >
news:eQ7$ XXXX@XXXXX.COM ...
"Crespo" < XXXX@XXXXX.COM > schrieb im Newsbeitrag
news:eb% XXXX@XXXXX.COM ...
ITCallInfo->put_CallInfoLong(CIL_BEARERMODE,LINEBEARERMODE_PASSTHROUGH)
new
that

wu,
do you also CloseHandle() all used handles for the direct modem
communication?

UniModem.TSP can only manage one call at a time.
If there is any call related reference to the old call then it can't manage
a
new one.

Are you using .NET ?

--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto?Tools (a collection of free, mostly TAPI related tools):
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm
TAPI development around the world (Frappr! map):
http://www.frappr.com/TAPIaroundTheWorld
* Please post all messages and replies to the newsgroup so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no
rights.




Return to Win32 Programming

 

Who is online

Users browsing this forum: No registered users and 45 guest