Re: TAPI Won't Put My Modem On Hook Either.
- From: doctor_omega504@xxxxxxxxxxx
- Date: Tue, 24 Mar 2009 00:11:36 +0100
Hi Larry,
I'm not very familiar with c++, so i'm not sure i correctly interpreted your code, but there's a couple of things i don't get:
1) if in c++ is the same as c#, connect(true) is a blocking method... this means your code won't go on until call is disconnected. So theoricaly, you will call the disconnect in the second block of code always on an already disconnected call, making it useless and potentially dangerous.
2) as i supposed there is, also in c++ you have a ITAddress object (or something like that) representing the lines. And i suppose there is also in c++ a method to see how many calls are hanging on the line at a certain moment... have you tried checking / releasing those too?
Please forgive me if i said something oddly fool, but as i said, c++ is not my piece of cake.
In data 23 marzo 2009 alle ore 21:21:41, Larry Lindstrom <larryl_turbo@xxxxxxxxxxx> ha scritto:
Hi Again Folks:
Developing on XP Home, VS2008 Pro, C++, WIN32, no MFC.
Yes, I've looked at doctor_omega's thread from 3 days ago, and I
don't see the solution to my problem.
Last September, with help from you folks and Micorsoft's Outgoing
TAPI sample I added a dialer to my application.
It's working pretty well, but I can't force it to consistantly hang
up the modem.
The user is instructed to pick up the phone, press the "Dial"
button on the display.
I've witnessed times when the line was left open, the user unable
to make an outgoing call with their land line, until the application
was terminated. I haven't been able to duplicate this
consistantly.
The business end of the dialer looks like this.
hresult = basic_call_control_ptr->Connect( VARIANT_TRUE );
if ( FAILED(hresult) )
{
basic_call_control_ptr->Release();
basic_call_control_ptr = NULL;
*message_string_ptr += TEXT("make_a_call()\n");
*message_string_ptr += TEXT("Could not connect the
call.");
// DoMessage(L"Could not connect the call.");
return hresult;
}
else
{
hresult = basic_call_control_ptr->Disconnect( DC_NORMAL );
basic_call_control_ptr->Release();
basic_call_control_ptr = NULL;
}
As soon as Connect returns with a success, the modem hangs up. The
user's phone should be off hook at this point, holding the line open.
If, for some reason, the user's phone is on hook, this should make the
call, then hang up. That should keep the line available for the
user.
Am I mis-understanding how TAPI is supposed to work?
Do you see where this would fail to hang up the modem?
Thanks
Larry
--
"No one ever told computers were going to be polite"
.
- Follow-Ups:
- Re: TAPI Won't Put My Modem On Hook Either.
- From: Larry Lindstrom
- Re: TAPI Won't Put My Modem On Hook Either.
- References:
- TAPI Won't Put My Modem On Hook Either.
- From: Larry Lindstrom
- TAPI Won't Put My Modem On Hook Either.
- Prev by Date: TAPI Displays Unwanted Message When Call Made.
- Next by Date: Re: Problem in conference events in TAPI
- Previous by thread: TAPI Won't Put My Modem On Hook Either.
- Next by thread: Re: TAPI Won't Put My Modem On Hook Either.
- Index(es):
Relevant Pages
|