C++/VB - TSP setting hCall to idle after creating conference

Asked By fdecker
02-Feb-10 07:19 PM
Was just testing a different TSP for a PBX with multiple TSP's that
can be installed.  When creating a direct conference from an existing
call, it creates the conference just fine, but as soon as it does I am
left with only 2 call handles, the hConsultCall and the hConf.  The
hCall from the original call goes idle.  The TSP reports REMOVECALL in
its capabilities, but if I try to remove just one call from my
remaining call handles, it just idles all the calls.  Would you call
this a bug or a design feature? ;)  Any thoughts from this TB log?
Thanks!

lineInitialize returned SUCCESS
num line devs =3D 17
lineOpen returned SUCCESS
Calling lineMakeCall
hLine=3Dx103a4
lphCall=3Dx339348
lpszDestAddress=3Dx12ecec
dwCountryCode=3Dx0
lpCallParams=3Dx0
lineMakeCall returned x10291
received LINE_REPLY
device=3Dx0
cbInst=3Dx0
param1=3Dx10291,
param2=3Dx0,
param3=3Dx10371,
received LINE_CALLSTATE
device=3Dx10371
cbInst=3Dx0
param1=3Dx8, DIALTONE
param2=3Dx0,
param3=3Dx0,
received LINE_CALLSTATE
device=3Dx10371
cbInst=3Dx0
param1=3Dx20, RINGBACK
param2=3Dx0,
param3=3Dx0,
received LINE_CALLINFO
device=3Dx10371
cbInst=3Dx0
param1=3Dx0,
param2=3Dx0,
param3=3Dx0,
received LINE_CALLINFO
device=3Dx10371
cbInst=3Dx0
param1=3Dx18040, CALLID CALLERID CALLEDID
param2=3Dx0,
param3=3Dx0,
received LINE_CALLINFO
device=3Dx10371
cbInst=3Dx0
param1=3Dx18040, CALLID CALLERID CALLEDID
param2=3Dx0,
param3=3Dx0,
received LINE_CALLSTATE
device=3Dx10371    <-------------------- first call connected (10371)
cbInst=3Dx0
param1=3Dx100, CONNECTED
param2=3Dx0,
param3=3Dx0,
received LINE_CALLINFO
device=3Dx10371
cbInst=3Dx0
param1=3Dx18040, CALLID CALLERID CALLEDID
param2=3Dx0,
param3=3Dx0,
Calling lineSetupConference
hCall=3Dx10371
hLine=3Dx103a4
lphConfCall=3Dx339380
lphConsultCall=3Dx3393b8
dwNumParties=3Dx3
lpCallParams=3Dx0
lineSetupConference returned x101f9
received LINE_REPLY
device=3Dx0
cbInst=3Dx0
param1=3Dx101f9,
param2=3Dx0,
param3=3Dx10260,
received LINE_CALLSTATE
device=3Dx10371   <----------------------- first call goes conferenced
cbInst=3Dx0
param1=3Dx800, CONFERENCED
param2=3Dx0,
param3=3Dx0,
received LINE_CALLSTATE
device=3Dx10260    <----------- second call goes on hold pending conf,
should be handle to the conf
cbInst=3Dx0                          (10260)
param1=3Dx1000, ONHOLDPENDCONF
param2=3Dx0,
param3=3Dx0,
received LINE_CALLSTATE
device=3Dx1034f  <-------- third call goes to the dialing state, this
is the actual 2nd =E2=80=9Cphysical=E2=80=9D call
cbInst=3Dx0		this should be the handle to the consult call (1034f)
param1=3Dx8, DIALTONE
TAPIaroundTheWorld
(1)
LineRemoveFromConference
(1)
DwDeviceID
(1)
LineSetupConference
(1)
DwCallbackInstance
(1)
LineInitializeEx
(1)
LpszDestAddress
(1)
LphConsultCall
(1)
  Andreas Marschall [exMVP TAPI] replied to fdecker
03-Feb-10 06:39 AM
Fred,
if the TSP does not maintain a proper conference call handle tree,
then I regard this a TSP bug.
But do(es) the issue(s) occur also if you do the lineDial() correctly on the
consultCall and not like shown below wrongly on the confCall?

Doing lineDial() on the confCall should return LINEERR_INVALCALLSTATE
instead of dialling /reporting on the consultCall.
So this seems to be another TSP bug.

The duplicate LINECALLSTATE_DALTONE for the consultCall and
LINECALLSTATE_CONNETED for the confCall  seems to be TSP bugs too.

Regarding "REMOVECALL ": are you refering to LINECALLFEATURE_REMOVEFROMCONF
?
A lineRemoveFromConference() should only remove that conference leg that is
referenced in the call handle, i.e. hCall or hConsultCall. The call state
must be LINECALLSTATE_CONFERENCED.
If you want to remove your own party instead then you would use lineDrop()
on the hConfCall in LINECALLSTATE_CONNETED.

What TSP are you using?

--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++ 2003-2008
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto® Tools (a collection of free, mostly TAPI related tools):
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm
TAPI development around the world (Frappr! map):
http://www.frappr.com/TAPIaroundTheWorld
* 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.
  fdecker replied to Andreas Marschall [exMVP TAPI]
03-Feb-10 04:14 PM
Andreas,

TAPI Browser was guessing the wrong call handles on the lineDial.
Same with lineAddToConference.  I had to check the calls in the TB
middle window and manually type in the handles over what it put in
there.  Is this normal?  I had to try it a few times in order to enter
everything in time before my setup conference failed because the
phones only hold a dialtone for a short time ;)

Quick question: Where is it documented that dial functions return a
call handle in param3 of the LINE_REPLY?  I have looked everywhere and
all I can find is that this parameter is "unused".

This is the Call Manager Express TSP.  The regular call manager works
fine.  It looks like we will be working with the company to fix it.

Here is the new log with comments:

lineInitialize returned SUCCESS
num line devs = 17
Calling lineOpen
hLineApp=x800003ff
dwDeviceID=x10
lphLine=x338528
APIVersion=x20000
dwExtVersion=x0
dwCallbackInstance=x0
dwPrivileges=x6
dwMediaModes=x4
lpCallParams=x0
lineOpen returned SUCCESS
Calling lineMakeCall  <------------------- dial first call
hLine=x101be
lphCall=x339348
lpszDestAddress=x12ed74
dwCountryCode=x0
lpCallParams=x0
lineMakeCall returned x10102
received LINE_REPLY
device=x0
cbInst=x0
param1=x10102,
param2=x0,
param3=x10057,
received LINE_CALLSTATE
device=x10057
cbInst=x0
param1=x8, DIALTONE
param2=x0,
param3=x0,
received LINE_CALLINFO
device=x10057
cbInst=x0
param1=x100000, DISPLAY
param2=x0,
param3=x0,
received LINE_CALLSTATE
device=x10057
cbInst=x0
param1=x20, RINGBACK
param2=x0,
param3=x0,
received LINE_CALLINFO
device=x10057
cbInst=x0
param1=x0,
param2=x0,
param3=x0,
received LINE_CALLINFO
device=x10057
cbInst=x0
param1=x100000, DISPLAY
param2=x0,
param3=x0,
received LINE_CALLINFO
device=x10057
cbInst=x0
param1=x18040, CALLID CALLERID CALLEDID
param2=x0,
param3=x0,
received LINE_CALLSTATE
device=x10057   <------------------ First call is hCall [10057]
cbInst=x0
param1=x100, CONNECTED
param2=x0,
param3=x0,
received LINE_CALLINFO
device=x10057
cbInst=x0
param1=x100000, DISPLAY
param2=x0,
param3=x0,
received LINE_CALLINFO
device=x10057
cbInst=x0
param1=x18040, CALLID CALLERID CALLEDID
param2=x0,
param3=x0,
Calling lineSetupConference
hCall=x10057    <---------------------  correct hCall is set
  Andreas Marschall [exMVP TAPI] replied to fdecker
05-Feb-10 03:48 AM
Fred,
I do not think that TB20 is "guessing" a call handle.
It takes the one that is highlighted in the middle pane as default.



I do not have a documentation for this either.



If you want to use TAPI 2.x then you need to use lineInitializeEx() instead
of lineInitialize().




Interesting question: what is the content of *lphConfCall ?
Unfortunately "Dump buffer contents" does not show the relevant mem.


Yes, seems to be.


Yes, seems to be.


Yes, seems to be.
Create New Account
help
thing useful to the beginners. please give any sample codes. Win32 TAPI Discussions INVALPOINTERwhat (1) TAPIaroundTheWorld (1) MakeCallRequestID (1) DwMaxNumActiveCalls (1) DwPermanentLineID (1) DwDeviceClassesOffset (1) DwProviderInfoOffset (1) LpszFriendlyAppName (1) Andreas, Thanks de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the lineInitializeEx returned SUCCESS num line devs = 10 18:35.33.484 : Calling lineNegotiateAPIVersion hLineApp = x80000377 dwDeviceID = x9 dwAPILowVersion = x10000 dwAPIHighVersion = x10000000 lpdwAPIVersion = x6f4cc lpExtensionID = x6f4b4 18:35.33.484 : lineNegotiateAPIVersion returned x0, .ID1 = x0, .ID2 = x0, .ID3 = x0, 18:36.6.953 : Calling lineGetDevCaps hLineApp = x80000377 dwDeviceID = x9 APIVersion = x20000 dwExtVersion = x0 lpLineDevCaps = x2659b0 18:36.6.953 : lineGetDevCaps returned SUCCESS LINEDEVCAPS line / d 6e676169 6974736f 00007363 xxxxxxxx iagnostics. . 18:36.23.593 : Calling lineOpen hLineApp = x80000377 dwDeviceID = x9 lphLine = x269278 APIVersion = x20000 dwExtVersion = x0 dwCallbackInstance = x0 dwPrivileges = x1 dwMediaModes = x10 lpCallParams = x0 18:36.23.593 : lineOpen returned SUCCESS 18 lineInitializeEx returned SUCCESS num line devs = 10 18:35.33.484 : Calling lineNegotiateAPIVersion hLineApp = x80000377 dwDeviceID = x9 dwAPILowVersion = x10000 dwAPIHighVersion = x10000000 lpdwAPIVersion = x6f4cc lpExtensionID = x6f4b4 18:35.33.484 : lineNegotiateAPIVersion returned
ID and device ID and their significance. Thanks, Mohit Win32 TAPI Discussions LINEDEVCAPS.dwPermananetLineID (1) TAPIaroundTheWorld (1) DwPermanentLineID (1) LineGetDevCaps (1) DwDeviceID (1) LineOpen (1) Windows (1) ReplySo (1) Mohit, dwDeviceID range from 0 to num_devices - 1. It is assigned by TAPISRV. It is used to re-usage because its value is to be unique and constant, as opposed to the dwDeviceID that can change when other device are added / removed. - - Best Regards Andreas Marschall Microsoft MVP de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the Andreas for your reply So, does TAPI or TAPI Application make any mapaping between the dwDeviceID and dwPermanentLineID? For an example, initially a TSP detects 5 line device then it will TAPISRV just passes he dwPermanentLineID from the TSP to the TAPI app for a requested dwDeviceID via lineGetDevCaps(). It is up to the TAPI app to do any mapping it requires the way it should be in general. Just two things: - TAPISRV may re-use the dwDeviceID and re-assign the same - TSP may assign new dwPermanentLineID if it get un-installed
Visual (1) Tool (1) Andreas Marschall (1) Report (1) TSPI (1) Andy, TB20 expects the dwDeviceID in hexadecimal format (without the "0x"). dwDeviceID ranges from 0 to num_devs -1, where num_devs is returned by lineInitializeEx(). - - Best Regards Andreas de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the confers no rights. Andrea, Thank you so much for the reply. I tried some different dwDeviceID by TAPI Browser but those connect line SUCCESS are NOT the TAPI lines, such as de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the SUCCESS 1:12.34.297 : Calling lineShutdown 1:12.34.297 : lineShutdown returned SUCCESS / * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * Use dwDeviceID as 6 which is TAPI, but get LINEERR_OPERATIONFAILED * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** / 1:18.26.31 : Calling lineInitialize 1 de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the
track of number of application that have opend the line? Thanks, Mohit Win32 TAPI Discussions TAPIaroundTheWorld (1) DwDeviceID (1) ExMVP (1) LineClose (1) LineOpen (1) Windows (1) Frappr (1) HtLine (1) Mohit, no, TSPI_lineOpen() is always only be called once for a dwDeviceID. This takes place on the 1st lineOpen() for this dwDeviceID. The last lineClose() will trigger the one and only TSPI_lineClose() for this dwDeviceID. Additional lineOpen() / lineClose() for this dwDeviceID between TSPI_lineOpen() / TSPI_lineClose() may trigger a TSPI_lineSetDefaultMediaDetection() or TSPI_lineConditionalMediaDetection(). Please see MSDN for details. - - Best de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the
cannot find anything. . . Please help, I am at a loss here! - - Mike Win32 TAPI Discussions TAPIaroundTheWorld (1) Andreas.Marschall (1) LineGetProviderList (1) LineGetDevConfig (1) LineSetDevConfig (1) ExMVP (1) VPN (1) LineConfigProvider de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the de / Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http: / / www.frappr.com / TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the