Now I'm usinga TAPI3 Browser.
I initialize tapi, RegisterCallNotification (with EventFilter set) on
the 3 extensions involved.
I can make a call from A to B, and viceversa.
I can put in HOLD state A or B
(the called address , if I call ITBasicCallControl->Hold on the "main
call" I created,
the caller address , if I call ITBasicCallControl->Hold on "the
call seen on the other side", retrieved through
ITCallNotificationEvent.
If I call TRANSFER method (in both cases, call working, or call in
Hold state)
it doesn't fails, but the consultation call doesn't start (the phone
doesn't ring,
and FINISH doesn't work.)
I tried to pick up manually the phone C where I want to transfer the
call, but it is not connected
(I thought "maybe it doesn't ring but it is waiting for me to pick
up")
I see events, but I cannot see "useful" events to be managed when I
try to transfer the call.
Any idea? thanks.
carlx,
you may want to try it without doing an explicit hold for the 1st call.
Just create the consultation call.
When executing ::Transfer() the 1st call should be automatically placed on
hold.
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
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.
> carlx,
> you may want to try it without doing an explicit hold for the 1st call.
> Just create the consultation call.
> When executing ::Transfer() the 1st call should be automatically placed on
> hold.
Thanks Andreas,
but I tried both...
After Transfer(), on a phone I can listen hold music.
The other one doesn't start the consultation call, and in a few
seconds I hear "busy tone" on it.
This is the TAPI3Browser log for one test:
-------------------------------------------------------------------
ITTAPI.CreateInstance ITTAPI_1
returned hr = 0x00000000
ITTAPI_1.Initialize returned hr = 0x00000000
ITTAPI_1.put_EventFilter
long plFilterMask : 67108863 (0x03ffffff)
returned hr = 0x00000000
ITTAPI_1.AdviseEventNotification returned hr = 0x00000000
cookie 990
ITTAPI_1.get_Addresses returned hr = 0x00000000
VARIANT* pVariant = ITCollection2_1
ITCollection2_1.get_Item
long Index : 216 (0x000000d8)
returned hr = 0x00000000
VARIANT* pVariant = ITAddress2_1
ITCollection2_1.get_Item
long Index : 261 (0x00000105)
returned hr = 0x00000000
VARIANT* pVariant = ITAddress2_2
ITCollection2_1.get_Item
long Index : 260 (0x00000104)
returned hr = 0x00000000
VARIANT* pVariant = ITAddress2_3
ITAddress2_1.CreateCall
BSTR pDestAddress : 138
long lAddressType : 1 (0x00000001)
long lMediaTypes : 8 (0x00000008)
returned hr = 0x00000000
ITBasicCallControl** ppCall = ITBasicCallControl2_1
ITBasicCallControl2_1.Connect
VARIANT_BOOL fSync : 1
returned hr = 0x00000000
ITCallHubEvent_1
TAPI_EVENT const int TE_CALLHUB
ITCallStateEvent_1
TAPI_EVENT const int TE_CALLSTATE
ITCallInfoChangeEvent_1
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallInfoChangeEvent_2
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallInfoChangeEvent_3
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallInfoChangeEvent_4
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallInfoChangeEvent_5
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallInfoChangeEvent_6
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallStateEvent_2
TAPI_EVENT const int TE_CALLSTATE
ITCallInfoChangeEvent_7
TAPI_EVENT const int TE_CALLINFOCHANGE
ITAddress2_1.CreateCall
BSTR pDestAddress : 137
long lAddressType : 1 (0x00000001)
long lMediaTypes : 8 (0x00000008)
returned hr = 0x00000000
ITBasicCallControl** ppCall = ITBasicCallControl2_2
ITBasicCallControl2_1.Transfer
ITBasicCallControl* pCall : ITBasicCallControl2_2
VARIANT_BOOL fSync : 1
returned hr = 0x80040007
TAPI_E_CALLUNAVAIL source (null) description (null)
ITCallStateEvent_3
TAPI_EVENT const int TE_CALLSTATE
ITCallStateEvent_4
TAPI_EVENT const int TE_CALLSTATE
ITCallInfoChangeEvent_8
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallInfoChangeEvent_9
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallInfoChangeEvent_10
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallInfoChangeEvent_11
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallInfoChangeEvent_12
TAPI_EVENT const int TE_CALLINFOCHANGE
ITCallHubEvent_2
TAPI_EVENT const int TE_CALLHUB
ITCallStateEvent_5
TAPI_EVENT const int TE_CALLSTATE
ITCallInfoChangeEvent_13
TAPI_EVENT const int TE_CALLINFOCHANGE
ITAddressEvent_1
TAPI_EVENT const int TE_ADDRESS
ITAddressDeviceSpecificEvent_1
TAPI_EVENT const int TE_ADDRESSDEVSPECIFIC
ITCallHubEvent_3
TAPI_EVENT const int TE_CALLHUB
ITCallStateEvent_6
TAPI_EVENT const int TE_CALLSTATE
ITAddressEvent_1.get_Event returned hr = 0x00000000
ADDRESS_EVENT* pEvent = const int AE_RINGING = 2 (0x00000002)
ITAddressEvent_1.get_Address returned hr = 0x00000000
ITAddress** ppAddress = ITAddress2_4
ITAddress2_4.get_AddressName returned hr = 0x00000000
BSTR* ppName = EXT0101
ITCollection2_1.Release
ITAddress2_1.Release
ITAddress2_2.Release
ITAddress2_3.Release
ITBasicCallControl2_1.Release
ITCallHubEvent_1.Release
ITCallStateEvent_1.Release
ITCallInfoChangeEvent_1.Release
ITCallInfoChangeEvent_2.Release
ITCallInfoChangeEvent_3.Release
ITCallInfoChangeEvent_4.Release
ITCallInfoChangeEvent_5.Release
ITCallInfoChangeEvent_6.Release
ITCallStateEvent_2.Release
ITCallInfoChangeEvent_7.Release
ITBasicCallControl2_2.Release
ITCallStateEvent_3.Release
ITCallStateEvent_4.Release
ITCallInfoChangeEvent_8.Release
ITCallInfoChangeEvent_9.Release
ITCallInfoChangeEvent_10.Release
ITCallInfoChangeEvent_11.Release
ITCallInfoChangeEvent_12.Release
ITCallHubEvent_2.Release
ITCallStateEvent_5.Release
ITCallInfoChangeEvent_13.Release
ITAddressEvent_1.Release
ITAddressDeviceSpecificEvent_1.Release
ITCallHubEvent_3.Release
ITCallStateEvent_6.Release
ITAddress2_4.Release
ITTAPI_1.Shutdown returned hr = 0x00000000
ITTAPI_1.Release
does it work when the first call is an incoming call?
Best regards,
Matthias Moetje
-------------------------------------
TAPI WIKI: http://www.tapi.info
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------
"carlx" <ca...@mail.com> wrote in message
news:bdbe86e7-ce3c-40bb...@i7g2000prf.googlegroups.com...
It doesn't work, I obtain the same results.
In this case, I create the call from EXT138 to EXT101, then I
retrieved the call "from the point of view
of EXT101" using ITCallNotificationEvent, as follows:
### ITCallNotificationEvent_1.get_Call returned hr = 0x00000000
### ITCallInfo** ppCall = ITCallInfo2_1
###
### ITCallInfo2_1.QueryInterface ITBasicCallControl2
### returned hr = 0x00000000
### ITBasicCallControl2_2
Then I create the consultation call:
### ITAddress2_1.CreateCall
### BSTR pDestAddress : 137
### long lAddressType : 1 (0x00000001)
### long lMediaTypes : 8 (0x00000008)
### returned hr = 0x00000000
### ITBasicCallControl** ppCall = ITBasicCallControl2_3
###
### ITBasicCallControl2_2.Transfer
### ITBasicCallControl* pCall : ITBasicCallControl2_3
### VARIANT_BOOL fSync : 1
### returned hr = 0x80040007
### TAPI_E_CALLUNAVAIL source (null) description (null)
I think Panasonic need the consultation call to be "more than simply
created" :
I think I have to create the cons. call,
DO SOMETHING ON IT, then call TBasicCallControl2_2.Transfer
I tried to call Connect(), Dial(), Hold(), bot I couldn't accomplish
anything.
In Panasonic TAPI specification, I read these lines...they seems to be
the key of everything,
but are related to tapi2 lineSetupTransfer, and I cannot figure out
exactly what does it mean for a Tapi3 application
~lphConsultCall
~A pointer to an hCall handle. This location is then loaded with a
handle identifying the
~temporary consultation call. When setting up a call for transfer, a
consultation call is
~automatically allocated that enables lineDial to dial the address
associated with the
~new transfer destination of the call. The originating party can carry
on a conversation
~over this consultation call prior to completing the transfer. The
call state of
~hConsultCall is not applicable.
~This transfer procedure may not be valid for some line devices. The
application may
~need to ignore the new consultation call and unhold an existing held
call (using
~lineUnhold) to identify the destination of the transfer. On switches
that support crossaddress
~call transfer, the consultation call can exist on a different address
than the
~call to be transferred. It may also be necessary that the
consultation call be set up as
~an entirely new call, by lineMakeCall, to the destination of the
transfer. Which forms of
~transfer are available are specified in the call's address
capabilities.
Thanks.
carlx,
does it work with JulMar test tool Phone.exe?
http://www.julmar.com/tapi/
Yes, Julmar Phone.exe can transfer call, it works.
I read the code: the operations (tapi2) are :
SetupTransfer(&pCCall);
pCCall->WaitForFeature(LINECALLFEATURE_DIAL, 5000)
pCCall->Dial()
pCall->CompleteTransfer(pCCall, &pConfOwner, dwTransferType));
Now I think in TAPI3 they become:
ITAddress->CreateCall(consultation call)
ConsultationCallITBasicCallControl->Connect
OldCallITBasicCallControl-
>Transfer(ConsultationCallITBasicCallControl)
ConsultationCallITBasicCallControl->Finish
Now i cannot succeed in Connect. May be I miss what would be in TAPI3
"wait for LINECALLFEATURE_DIAL."
I'll try to compile julmar phone.exe in Visual Studio and see what
happens through breakpoints.
thanks
I'm guessing if Panasonic TSP can be managed from TAPI3 , or not.
Panasonic documentation is only related to TAPI2,
the operations needed to transfer a call are a bit different in TAPI2
and TAPI3,
I start thinking that nobody fully controls Panasonic TDA100 through
TAPI3.
I wrote to Panasonic support for PBXs, I'm waiting for an answer.
Thanks.
carlx,
lineSetupTransfer(), lineDial(), lineCompleteTransfer() sequence in TAPI2
correspond with ::CreateCall(), ::Transfer(), ::Finish() sequence in TAPI3.
::Connect() isn't part of the game:
http://msdn2.microsoft.com/en-us/library/ms734809.aspx
> Now i cannot succeed in Connect. May be I miss what would be in TAPI3
> "wait for LINECALLFEATURE_DIAL."
I guess Phone.exe is checking if (LINECALLSTATUS.dwCallFeatures &
LINECALLFEATURE_DIAL) via lineGetCallStatus().
There is no TAPI3 correspondence for this.
> I guess Phone.exe is checking if (LINECALLSTATUS.dwCallFeatures &
> LINECALLFEATURE_DIAL) via lineGetCallStatus().
> There is no TAPI3 correspondence for this.
this is not true. The equivalent is:
ITAddressCapabilities::get_AddressCapability(AC_CALLFEATURES1,
LINECALLFEATURE_DIAL)
The LINECALLFEATURE_... and LINECALLFEATURE2_... constants are
not part of the TAPI3 typelib, you must either include tapi.h or use
the .bas file for VB6 (which was included in some PSDK versions).
Matthias,
are you sure that ITAddressCapabilities corresponds with the dynamic info in
LINECALLSTATUS (that I'm refering to) or is it the equivalent for the static
info in LINEADDRESSCAPS ?
IMO it's the latter.
I checked it on an address, with and without a call connected and with
or without a consultation call
"created", the value seems to be a constant.
ITAddressCapabilities_4.get_AddressCapability
ADDRESS_CAPABILITY AddressCap : 24 (## 24 is AC_CALLFEATURES1 ###)
returned hr = 0x00000000
long* plCapability = -1358455306 (0xaf079df6)
(and LINECALLFEATURE_DIAL is 0x40)
I keep on thinking that the Panasonic TSP has been developed for
TAPI2, and so it is not compliant with some TAPI3 stuff....but nobody
from Panasonic Italy replied on my e-mail yet
carlx,
thanks for the clarification.
> I keep on thinking that the Panasonic TSP has been developed for
> TAPI2, and so it is not compliant with some TAPI3 stuff....but nobody
> from Panasonic Italy replied on my e-mail yet
Usually any 32-bit TSP can be used bot from TAPI2 (Win95/NT4 and later) and
TAPI3 (W2k and later).
But some clarification from the manufacturer would of course be helpful...
you were right, LINECALLSTATUS is only used internally
by TAPI3.
By looking at the TAPI3 source I found something interesting, though:
When a TSP supports LINECALLFEATURE_DIAL, a consultation
call (for transfer or conference) is made through
lineDial, otherwise through lineMakeCall, so this
might be an explanation why it fails with TAPI3
but not with TAPI2. The TSP would need to stop
reporting LINECALLFEATURE_DIAL to fix the problem.
Best regards,
Matthias Moetje
-------------------------------------
TAPI WIKI: http://www.tapi.info
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------
"Andreas Marschall [MVP TAPI]" <Andreas....@I-B-A-M.de> wrote in
message news:eVP8mGJl...@TK2MSFTNGP03.phx.gbl...
basically there is no such thing like a TAPI3 TSP.
Although there are a few features a TSP may implement to support
TAPI3 applications, these are not required. All TSPs should work
with TAPI3. If my suspicion is correct that the TSP advertises
LINECALLFEATURE_DIAL while it does not accept lineDial
in this situation, this is just a TSP bug.
Best regards,
Matthias Moetje
-------------------------------------
TAPI WIKI: http://www.tapi.info
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------
"carlx" <ca...@mail.com> wrote in message
news:66de8284-f70b-4c72...@d21g2000prf.googlegroups.com...
Matthias,
thanks for the clarification.
> By looking at the TAPI3 source I found something interesting, though:
> When a TSP supports LINECALLFEATURE_DIAL, a consultation
> call (for transfer or conference) is made through
> lineDial, otherwise through lineMakeCall,
Interesting finding.
> so this
> might be an explanation why it fails with TAPI3
> but not with TAPI2. The TSP would need to stop
> reporting LINECALLFEATURE_DIAL to fix the problem.
Sounds like a TSP issue...
I need to add transfer to an existing TAPI3 application for this TSP.
Two questions:
- Is there any problem with using TAPI2 within the TAPI3 application
to do the consultation set up and transfer or conference?
- Although I can find the line in TAPI2, attempt to acquire ownership
and then look for the first call, I was wondering if there was any way
to determine the TAPI2 line and call from my TAPI3 objects. For
instance, can I find "hCall" from "ITBasicCallControl", and "HLINE" from
"ITAddress"?
Thanks to all,
Richard
Matthias Moetje [MVP] wrote:
> Carl,
>
> basically there is no such thing like a TAPI3 TSP.
>
> Although there are a few features a TSP may implement to support
> TAPI3 applications, these are not required. All TSPs should work
> with TAPI3. If my suspicion is correct that the TSP advertises
> LINECALLFEATURE_DIAL while it does not accept lineDial
> in this situation, this is just a TSP bug.
>
>
> Best regards,
>
> Matthias Moetje
> -------------------------------------
> TAPI WIKI: http://www.tapi.info
> -------------------------------------
> TERASENS GmbH
> Augustenstra�e 24
Richard,
there is no way for a TAPI app to cross-reference TAPI2 handles with TAPI
objects.
I do not recommend mixing TAPI2 and TAPI3 in one app.
A TAPI app should either use TAPI2 or TAPI3.
In your case TAPI2 is recommended because the mentioned TAPI3 issues with
the Panasonic TSP don't occur.
So for call handling in those scenarios you need to build a TAPI2 app
anyway,
and I don't see that it will you save you much TAPI2 coding if you mix it
with TAPI3.
If you need TAPI2 sample code you may want to take at the JulMar TAPI test
tool Phone.exe,
that is available with open source (C++) from www.julmar.com/tapi
In addition, See my TAPI and TSPI FAQ:
Q: How do I transfer a call with TAPI2 ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_How_do_2
Q: How do I make a conference with TAPI2 ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_How_do_3
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++ 2003-2008
Thanks. Unfortunately it is not feasible to switch the whole app to
TAPI2. This is an existing TAPI3 app (actually a DLL) that I am trying
to get transfer working for against the Panasonic TSP. I don't have the
time or budget to rewrite things from scratch.
I'll just plug away and hope that nothing too serious happens.
Cheers,
Richard