PDA

View Full Version : lineMakeCall doesn't seem to work with non-default LINECALLP


JohnJ
03-11-2003, 11:57 AM
I'm stumped.

I'm trying to make a data connection to a modem on my home PC.
I have some code that I've cobbled together from pieces
on the web, and everything seems to work well as long
as I call lineMakeCall without passing a LINECALLPARAMS
argument. I.e.:
dwReturn = lineMakeCall(
g_hLine, // handle to open line
&g_hCall, // return handle to call
szDialablePhoneNum, // phone number to dial
0, // default country code
0); // call parameters

The phone dials out, my modem picks up, and they try to synch up.
Unfortunately the XDA believes that this is a voice call, so no
connection is established.

Encouraged, I now try to pass in a LINECALLPARAMS argument
to inform my XDA that this is indeed a datacall:

LINECALLPARAMS CallParams;

memset(&CallParams, 0, sizeof(LINECALLPARAMS));

CallParams.dwTotalSize = sizeof(LINECALLPARAMS);
CallParams.dwBearerMode = LINEBEARERMODE_VOICE;
CallParams.dwMediaMode = LINEMEDIAMODE_DATAMODEM;
CallParams.dwCallParamFlags = LINECALLPARAMFLAGS_IDLE;
CallParams.dwAddressMode = LINEADDRESSMODE_ADDRESSID;
CallParams.dwAddressID = 0;

dwReturn = lineMakeCall(
g_hLine, // handle to open line
&g_hCall, // return handle to call
szDialablePhoneNum, // phone number to dial
0, // default country code
&CallParams); // call parameters

Unfortunately this simply doesn't work. The call appears to succeed.
I get all the right callback, telling me that it's dialing and dialing is
complete, etc. But my phone never rings!!

Anybody have any ideas?

UnKnOwN
03-11-2003, 12:07 PM
change dwBearerMode to "...DATA" and it will work

UnKnOwN

JohnJ
03-11-2003, 12:13 PM
Thanks,

I tried it and it didn't make any difference.
I must be doing something else wrong.

BTW I'm using a Siemens SX56 if it makes any difference.

-- John