Vipin4u123
December 27th, 2005, 04:43 AM
Hi All............
I know this is not right place for my question. But i need help, it's urgent so this. Sorry........
My problem is in TAPI(Telephony Application Programming Interface). I want to make and receive calls from my VC++ application. Now i can place and receive calls from any phones. But the problem is, when i place or receive a call, i couldn't send my voice to remote phone i.e. the party on the other end cannot hear my voice via phone.
The code i use for it is as follows....
BOOL CTapi::MakeCall(char *szTelephoneNumber)
{
DWORD dwCountryCode = 0;
LPLINECALLPARAMS lpCallParams = (LPLINECALLPARAMS)malloc(sizeof(LINECALLPARAMS)+1024);
memset(lpCallParams,0,sizeof(LINECALLPARAMS)+1024);
lpCallParams->dwTotalSize = sizeof(LINECALLPARAMS)+1024;
lpCallParams->dwBearerMode = LINEBEARERMODE_VOICE;
lpCallParams->dwMediaMode = LINEMEDIAMODE_AUTOMATEDVOICE;//LINEMEDIAMODE_DATAMODEM;
lpCallParams->dwCallParamFlags = LINECALLPARAMFLAGS_IDLE;
lpCallParams->dwAddressMode = LINEADDRESSMODE_ADDRESSID;
lpCallParams->dwAddressID = 0;
//lpCallParams->dwCallParamFlags = LINECALLPARAMFLAGS_BLOCKID;
// Address we are dialing.
lpCallParams->dwDisplayableAddressOffset = sizeof(LINECALLPARAMS);
lpCallParams->dwDisplayableAddressSize = strlen(szTelephoneNumber);
strcpy((LPSTR)lpCallParams+sizeof(LINECALLPARAMS), szTelephoneNumber);
LONG lResult = lineMakeCall(m_hLine,&m_hCall,szTelephoneNumber,dwCountryCode,lpCallParams);
if(lResult < 0) {
AfxMessageBox("lineMakeCall() failed");
return FALSE;
}
return TRUE;
}
This function was success and the remote party can accept that call. But the remote party couldn't hear my voice.
I'm not use any wave API for sending my voice to remote party through phone. Is it needed?.
The one thing that i know is whenever we want to play a wav file through phone we can use wave API for that.
What's solution for my problem.
If anyone know anything about this, please post your replay.
If u can, just send one mail to this id with answer,
vipin4u123@yahoo.com
Thanks inadvance
With hope
Vipin Vijayan
I know this is not right place for my question. But i need help, it's urgent so this. Sorry........
My problem is in TAPI(Telephony Application Programming Interface). I want to make and receive calls from my VC++ application. Now i can place and receive calls from any phones. But the problem is, when i place or receive a call, i couldn't send my voice to remote phone i.e. the party on the other end cannot hear my voice via phone.
The code i use for it is as follows....
BOOL CTapi::MakeCall(char *szTelephoneNumber)
{
DWORD dwCountryCode = 0;
LPLINECALLPARAMS lpCallParams = (LPLINECALLPARAMS)malloc(sizeof(LINECALLPARAMS)+1024);
memset(lpCallParams,0,sizeof(LINECALLPARAMS)+1024);
lpCallParams->dwTotalSize = sizeof(LINECALLPARAMS)+1024;
lpCallParams->dwBearerMode = LINEBEARERMODE_VOICE;
lpCallParams->dwMediaMode = LINEMEDIAMODE_AUTOMATEDVOICE;//LINEMEDIAMODE_DATAMODEM;
lpCallParams->dwCallParamFlags = LINECALLPARAMFLAGS_IDLE;
lpCallParams->dwAddressMode = LINEADDRESSMODE_ADDRESSID;
lpCallParams->dwAddressID = 0;
//lpCallParams->dwCallParamFlags = LINECALLPARAMFLAGS_BLOCKID;
// Address we are dialing.
lpCallParams->dwDisplayableAddressOffset = sizeof(LINECALLPARAMS);
lpCallParams->dwDisplayableAddressSize = strlen(szTelephoneNumber);
strcpy((LPSTR)lpCallParams+sizeof(LINECALLPARAMS), szTelephoneNumber);
LONG lResult = lineMakeCall(m_hLine,&m_hCall,szTelephoneNumber,dwCountryCode,lpCallParams);
if(lResult < 0) {
AfxMessageBox("lineMakeCall() failed");
return FALSE;
}
return TRUE;
}
This function was success and the remote party can accept that call. But the remote party couldn't hear my voice.
I'm not use any wave API for sending my voice to remote party through phone. Is it needed?.
The one thing that i know is whenever we want to play a wav file through phone we can use wave API for that.
What's solution for my problem.
If anyone know anything about this, please post your replay.
If u can, just send one mail to this id with answer,
vipin4u123@yahoo.com
Thanks inadvance
With hope
Vipin Vijayan