Re: error return from "connect"



"Boyd" <Boyd@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:2A2B976C-89B6-4810-8B70-A7E3D40FE177@xxxxxxxxxxxxxxxx
> I reran the browser and queried the disconnect status event cause:
> =============
> ITCallStateEvent_2.get_State returned hr = 0x00000000
> CALL_STATE* pCallState = const int CS_DISCONNECTED = 3 (0x00000003)
>
> ITCallStateEvent_2.get_Cause returned hr = 0x00000000
> CALL_STATE_EVENT_CAUSE* pCEC = const int CEC_DISCONNECT_FAILED = 7
> (0x00000007)
> =============
> Of course the disconnect failed! Connection was never established! There is
> no dial tone!!!!!! An error of CEC_DISCONNECT_FAILED at this point is a
> somewhat not-helpful cause to report!!!!! Reporting that the DISCONNECT
> failed does not indicate WHY a DISCONNECT was attempted!!
> Is this an error in the TAPI3 error reporting?


Boyd,
it isn't TAPI3 (or any other OS part of TAPISRV) that is repsonsiblöe for
setting a CS / CEC.
It is the TSP!
And even the TSP relies on proper information from the corresponding telephony
device that it is driving.

Another thing: you seem to under the impression that a CS_DISCONNECTED is
always something _actively_ attempted by someone (TAPI app, TAPISRV, TSP).
This doesn't have to be the case!
CS_DISCONNECTED simply is the final call state of any call.
So an outgoing call transition from CS_INPROGRESS directly to CS_DISCONNECTED
if can't be connected and therefore can't transition to CS_CONNECTED.

Btw. CEC is reporting properly that the connect attempt failed. See MSDN:
CEC_DISCONNECT_FAILED
"The call failed to connect for some other reason."

O.k. it doesn't say specifically that it is due to no dial tone, but it
doesn't say anything wrong.


> I suppose I COULD create an event monitoring routine, register it with TAPI,
> enable event handling, monitor event states and causes, but would that give
> me more helpful error reporting?
> It seems, Matthias, you are saying there is no method of determining why the
> called failed (no dial tone). Correct?


If you need this specifc info you may want to consider using TAPI 2.x:
on LINE_CALLSTATE message with LINECALLSTATE_DISCONNECTED you may get
additional CallStateDetail. See MSDN:
LINEDISCONNECTMODE_NODIALTONE
"A dial tone was not detected within a service-provider defined timeout, at a
point during dialing when one was expected (such as at a "W" in the dialable
string). This can also occur without a service-provider-defined timeout period
or without a value specified in the dwWaitForDialTone member of the
LINEDIALPARAMS structure. (TAPI versions 1.4 and later)"


Try it with TAPI Browser TB20 before starting to code anything yourself.
See my TAPI and TSPI FAQ:

Q: Where can I download TAPI Browser ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Where_can

Q: Is there a user guide available for TAPI Browser TB20 ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there_1

I just checked with an internal voice modem driven by UniModem.TSP on XP/SP2
with TB20:
18:30.10.322 : Calling lineInitializeEx
lphLineApp=x26adc8
hInstance=x1000000
lpfnCallback=x10158d7
lpszFriendlyAppName=x6f42c
lpdwNumDevs=x6f404
lpdwAPIVersion=x6f498
->dwAPIVersion=x20000
lpInitExParams=x6f3ec
->dwOptions=x3
18:30.10.352 : lineInitializeEx returned SUCCESS
num line devs = 14
18:30.11.414 : Calling lineOpen
hLineApp=x800003dd
dwDeviceID=x0
lphLine=x26b618
APIVersion=x20000
dwExtVersion=x0
dwCallbackInstance=x0
dwPrivileges=x6
dwMediaModes=x4
lpCallParams=x0
18:30.12.345 : lineOpen returned SUCCESS
18:30.12.986 : Calling lineMakeCall
hLine=x1003e
lphCall=x269f58
lpszDestAddress=x6f3a4
dwCountryCode=x0
lpCallParams=x0
18:30.13.26 : lineMakeCall returned x103eb
18:30.13.56 : received LINE_REPLY
device=x0
cbInst=x0
param1=x103eb,
param2=x0,
param3=x10141,
18:30.13.96 : received LINE_CALLSTATE
device=x10141
cbInst=x0
param1=x10, DIALING
param2=x0,
param3=x0,
18:30.13.136 : received LINE_CALLSTATE
device=x10141
cbInst=x0
param1=x200, PROCEEDING
param2=x0,
param3=x0,
18:30.18.524 : received LINE_CALLSTATE
device=x10141
cbInst=x0
param1=x4000, DISCONNECTED
param2=x1000, NODIALTONE
param3=x0,
18:30.18.554 : received LINE_CALLSTATE
device=x10141
cbInst=x0
param1=x1, IDLE
param2=x0,
param3=x0,
18:30.18.594 : lineGetCallStatus returned SUCCESS
Call x10141 deallocated on IDLE

--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
* 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.


.



Relevant Pages

  • Re: About CTI & topTAPI
    ... Testing with the TAPI ... Grant Schenck Software ... > The best I can suggest is to run the TAPI Browser, ... > and address events and disconnect the phone ...
    (microsoft.public.win32.programmer.tapi)
  • Re: checking for caller id while still being able to make outgoing calls
    ... > you can use 2 threads for this: one with a message loop waiting for TAPI ... I call my ISDN AVM Fritz card with a normal telephone and disconnect ... lineInitialize returned SUCCESS ... lineGetCallStatus returned SUCCESS ...
    (microsoft.public.win32.programmer.tapi)
  • Re: TAPI help required problem with WinXP
    ... You should be able to reproduce the scenario using the MS TAPI ... from your browser tests to reinvestigate what your application is ... But if I disconnect call from ... > crash & my TAPI application receives call disconnected event. ...
    (microsoft.public.win32.programmer.tapi)
  • Re: TAPI Disconnect
    ... The thing to try is to carry out the same steps but using the MS TAPI ... Browser. ... BasicCallControl to Disconnect. ... But this statement causes the system hangs ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Reason for LINEDISCONNECTMODE_NOANSWER
    ... DestAddress at lineMakeCall(). ... >>>it takes some time and the connection is disconnected and nearly ... This can be regarded as a bug in the TAPI app. ... > We have several disconnect reasons. ...
    (microsoft.public.win32.programmer.tapi)