Marcin p.
2008-12-09 14:05:06 UTC
Helo.
The new problem has just appear.
After established logical connection I try send the data from file (G.711 bits
received during incomig call).
I made this function (in VS 2007):
SendDataB3Req(DWORD dwApplId,BYTE bPLCI, WORD wNCCI, WORD DataLength, WORD
DataNumber, char DataBuffor[1024+1])
{
CAPI_MSG CAPIMsg;
DWORD capi_error;
CString MSG;
CAPIMsg.header.appl_id = (WORD)dwApplId;
CAPIMsg.header.command = _DATA_B3_R;
CAPIMsg.header.number = 0;
CAPIMsg.header.controller = 1;
CAPIMsg.header.plci = bPLCI;
CAPIMsg.header.ncci = wNCCI;
CAPIMsg.header.length = (WORD)(sizeof(CAPIMsg.header)+10);
CAPIMsg.info.data_b3_req.Data=(DWORD)&DataBuffor; //DWORD
CAPIMsg.info.data_b3_req.Data_Length =DataLength;//DataLength; //WORD
CAPIMsg.info.data_b3_req.Flags=0; //WORD
CAPIMsg.info.data_b3_req.Number=DataNumber; //WORD
capi_error = CAPI_PUT_MESSAGE( dwApplId, &CAPIMsg );
}
During logigal connection apllication takes:
char *FileName = "received.dat";
FILE *plik = NULL;
plik = fopen(FileName,"r");
memset(&DataBuffor,0,1025);
fread(DataBuffor,sizeof(char),1024,plik);
for (int i=0;i<40;i++)
{
SendDataB3Req(dwApplId,bPLCI,wNCCI,1024,i,DataBuffor);
WaitForConfirmation(dwApplId);
}
In telephon a hear only some cyclical noises. No voice.
It is correct in pointer to the data area?
Meaby is something wrong in size of data?
Martin
The new problem has just appear.
After established logical connection I try send the data from file (G.711 bits
received during incomig call).
I made this function (in VS 2007):
SendDataB3Req(DWORD dwApplId,BYTE bPLCI, WORD wNCCI, WORD DataLength, WORD
DataNumber, char DataBuffor[1024+1])
{
CAPI_MSG CAPIMsg;
DWORD capi_error;
CString MSG;
CAPIMsg.header.appl_id = (WORD)dwApplId;
CAPIMsg.header.command = _DATA_B3_R;
CAPIMsg.header.number = 0;
CAPIMsg.header.controller = 1;
CAPIMsg.header.plci = bPLCI;
CAPIMsg.header.ncci = wNCCI;
CAPIMsg.header.length = (WORD)(sizeof(CAPIMsg.header)+10);
CAPIMsg.info.data_b3_req.Data=(DWORD)&DataBuffor; //DWORD
CAPIMsg.info.data_b3_req.Data_Length =DataLength;//DataLength; //WORD
CAPIMsg.info.data_b3_req.Flags=0; //WORD
CAPIMsg.info.data_b3_req.Number=DataNumber; //WORD
capi_error = CAPI_PUT_MESSAGE( dwApplId, &CAPIMsg );
}
During logigal connection apllication takes:
char *FileName = "received.dat";
FILE *plik = NULL;
plik = fopen(FileName,"r");
memset(&DataBuffor,0,1025);
fread(DataBuffor,sizeof(char),1024,plik);
for (int i=0;i<40;i++)
{
SendDataB3Req(dwApplId,bPLCI,wNCCI,1024,i,DataBuffor);
WaitForConfirmation(dwApplId);
}
In telephon a hear only some cyclical noises. No voice.
It is correct in pointer to the data area?
Meaby is something wrong in size of data?
Martin