Thread View: borland.public.delphi.activex.controls.using
5 messages
5 total messages
Started by Allen
Wed, 23 Nov 2005 20:19
Delphi 6 and TAPI3 again (Imported TLB)
Author: Allen
Date: Wed, 23 Nov 2005 20:19
Date: Wed, 23 Nov 2005 20:19
81 lines
3610 bytes
3610 bytes
First things first; I've applied the two corrections to the imported
TLB as mentioned in a posting to
borland.public.delphi.activex.controls.using titled "D6 Type library
import bugs" and that hasn't appeared to solve the problem.
I'm using Delphi6 with the latest updates, running on WinXP SP2, and
using the Panasonic KX-TDA TSP (TCP/IP mode) to a TDA200 PBX.
Other applications, such as the Panasonic CallMonitor, work fine. My
own application, when using the TAPIEx library components works fine
as well; I'm just trying to save myself the $800 for the
unlimited-line "professional" version of that library.
My app can list all addresses and control them (dial numbers,
enter/leave DnD, etc) just fine. The problem comes in when trying to
get events.
===Code snippet===
var
addr : ITAddress;
media : ITMediaSupport;
addrs : IEnumAddress;
begin
myTAPI.Initialize;
myTAPI.EventFilter := iSomeValue; // See comments below
myTAPI.Connect;
addrs := myTAPI.EnumerateAddresses;
addrs.Reset;
addrs.Next(1, addr, lwCeltFetched);
while (lwCeltFetched > 0) do
begin
if addr.QueryInterface(IID_ITMediaSupport, media) = S_OK then
iRes := myTapi.RegisterCallNotifications(addr, true, false,
media.MediaTypes, 1);
end;
end;
===end===
RegisterCallNotifications alwas returns a successful-looking result,
but the event itself is never fired. I've set EventFilter (iSomeValue
above) to several values trying to test this, including the catch all:
mytapi.EventFilter :=
TE_TAPIOBJECT OR
TE_ADDRESS OR
TE_CALLNOTIFICATION OR
TE_CALLSTATE OR
TE_CALLMEDIA OR
TE_CALLHUB OR
TE_CALLINFOCHANGE OR
TE_PRIVATE OR
TE_REQUEST OR
TE_AGENT OR
TE_AGENTSESSION OR
TE_QOSEVENT OR
TE_AGENTHANDLER OR
TE_ACDGROUP OR
TE_QUEUE OR
TE_DIGITEVENT OR
TE_GENERATEEVENT OR
TE_ASRTERMINAL OR
TE_TTSTERMINAL OR
TE_FILETERMINAL OR
TE_TONETERMINAL OR
TE_PHONEEVENT OR
TE_TONEEVENT OR
TE_GATHERDIGITS OR
TE_ADDRESSDEVSPECIFIC OR
TE_PHONEDEVSPECIFIC;
No matter how hard I bang my head into the wall, I can't seem to get
call notification events (or any events so far for that matter) to
work; The TTAPI.OnEvent never fires. I've also tried every
combination of true/false for fOwner and fMonitor, to no avail.
Is there anything else I could be missing here?
Has anyone successfully imported this TLB into Delphi6 and got it
working?
Re: Delphi 6 and TAPI3 again (Imported TLB)
Author: Andreas Marschall [MVP TAPI]
Date: Thu, 24 Nov 2005 13:07
Date: Thu, 24 Nov 2005 13:07
108 lines
4480 bytes
4480 bytes
"Allen" <newsbounce@optonline.net> schrieb im Newsbeitrag news:0ei9o15sgc75pv9qjksr5hjs8s2udc0dsa@4ax.com... > First things first; I've applied the two corrections to the imported > TLB as mentioned in a posting to > borland.public.delphi.activex.controls.using titled "D6 Type library > import bugs" and that hasn't appeared to solve the problem. > > I'm using Delphi6 with the latest updates, running on WinXP SP2, and > using the Panasonic KX-TDA TSP (TCP/IP mode) to a TDA200 PBX. Allen, I'm neither a Delphi programmer nor familiar with this TSP / PBX but s.b. ... > Other applications, such as the Panasonic CallMonitor, work fine. My > own application, when using the TAPIEx library components works fine > as well; I'm just trying to save myself the $800 for the > unlimited-line "professional" version of that library. > > My app can list all addresses and control them (dial numbers, > enter/leave DnD, etc) just fine. The problem comes in when trying to > get events. > > ===Code snippet=== > var > addr : ITAddress; > media : ITMediaSupport; > addrs : IEnumAddress; > > begin > myTAPI.Initialize; > myTAPI.EventFilter := iSomeValue; // See comments below > myTAPI.Connect; What is this ::Connect() method? ITTAPI doesn't have such a method. Only ITBasicCallControl does. Any possibility that you've mixed up things? > addrs := myTAPI.EnumerateAddresses; > addrs.Reset; > addrs.Next(1, addr, lwCeltFetched); Shouldn't this ::Next be placed inside the loop? > while (lwCeltFetched > 0) do > begin > if addr.QueryInterface(IID_ITMediaSupport, media) = S_OK then > iRes := myTapi.RegisterCallNotifications(addr, true, false, > media.MediaTypes, 1); > end; > end; > ===end=== > > RegisterCallNotifications alwas returns a successful-looking result, > but the event itself is never fired. I've set EventFilter (iSomeValue > above) to several values trying to test this, including the catch all: > > mytapi.EventFilter := > TE_TAPIOBJECT OR > TE_ADDRESS OR > TE_CALLNOTIFICATION OR > TE_CALLSTATE OR > TE_CALLMEDIA OR > TE_CALLHUB OR > TE_CALLINFOCHANGE OR > TE_PRIVATE OR > TE_REQUEST OR > TE_AGENT OR > TE_AGENTSESSION OR > TE_QOSEVENT OR > TE_AGENTHANDLER OR > TE_ACDGROUP OR > TE_QUEUE OR > TE_DIGITEVENT OR > TE_GENERATEEVENT OR > TE_ASRTERMINAL OR > TE_TTSTERMINAL OR > TE_FILETERMINAL OR > TE_TONETERMINAL OR > TE_PHONEEVENT OR > TE_TONEEVENT OR > TE_GATHERDIGITS OR > TE_ADDRESSDEVSPECIFIC OR > TE_PHONEDEVSPECIFIC; > > No matter how hard I bang my head into the wall, I can't seem to get > call notification events (or any events so far for that matter) to > work; The TTAPI.OnEvent never fires. I've also tried every > combination of true/false for fOwner and fMonitor, to no avail. > > > Is there anything else I could be missing here? > > Has anyone successfully imported this TLB into Delphi6 and got it > working? -- 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.
Re: Delphi 6 and TAPI3 again (Imported TLB)
Author: Riki Wiki
Date: Fri, 25 Nov 2005 21:44
Date: Fri, 25 Nov 2005 21:44
15 lines
1457 bytes
1457 bytes
Hoi Allen and Andreas This newsgroup do not officially exist. That is why there are so few posts around here. The group you should be using is called: borland.public.delphi.com.activex.using Also, when you repost your question/message, you must use the Borland news server, otherwise most people will never see your postings. Take a look here: <http://tinyurl.com/8m5nw> which links to <http://delphi.wikicities.com/wiki/Delphi_Newsgroups> Further, multi posting is a bad habit.
Re: Delphi 6 and TAPI3 again (Imported TLB)
Author: Allen
Date: Tue, 29 Nov 2005 16:54
Date: Tue, 29 Nov 2005 16:54
82 lines
4332 bytes
4332 bytes
On Thu, 24 Nov 2005 14:07:46 +0100, "Andreas Marschall [MVP TAPI]" <Andreas.Marschall@I-B-A-M.de> wrote: >> begin >> myTAPI.Initialize; >> myTAPI.EventFilter := iSomeValue; // See comments below >> myTAPI.Connect; > >What is this ::Connect() method? >ITTAPI doesn't have such a method. >Only ITBasicCallControl does. >Any possibility that you've mixed up things? It was imported via the ActiveX import function in the Delphi IDE (in the TLB). If I don't call it, it would just error out on everything below. To be honest, I don't know why it's exported by the ActiveX control but not listed in the TAPI3 documentation. >> addrs := myTAPI.EnumerateAddresses; >> addrs.Reset; >> addrs.Next(1, addr, lwCeltFetched); > >Shouldn't this ::Next be placed inside the loop? If you look at the next bit of code, it's "obvious" why I call Next() right away. Next takes lwCeltFetched and writes into it how many addresses were fetched. If I don't call it before I enter the loop, then I haven't retrieved any address objects yet, and the QueryInterface will result in an access violation since the 'addr' object is not a valid pointer to anything. > >> while (lwCeltFetched > 0) do >> begin >> if addr.QueryInterface(IID_ITMediaSupport, media) = S_OK then >> iRes := myTapi.RegisterCallNotifications(addr, true, false, >> media.MediaTypes, 1); >> end; >> end; >> ===end=== What you might be looking at is the screwup here when I was creating the little test application. I did add an additional call to Next() inside the while..do loop, but the one prior to the loop still had to be there. At any rate, I was totally unable to get to the bottom of this, and so resorted to "ye ole' standby" method of getting things done. First, I got a tapi.h translation. Thankfully project JEDI has a very nice one, like most of their Win32 API translations. Second, I just sat down and dug into the Platform SDK, and went ahead using TAPI 2.2 and the method of doing things provided by it. Everything is working fine that way, with the "hidden window" callback method. I know it may be depreciated some day, but I doubt it will be during the lifetime of this application, and even if so, systems like the one I'm working on don't tend to upgrade to the latest and greatest OS or anything else of that nature very often. Thanks for the reply anyway, there are legions of us Delphi developers out there having problems with the TAPI3 interface, and it seems the only way to use it so far is to buy a massively overpriced component. One example is the TAPIEx (www.tapiex.com) component, which comes in four flavors (lite, std, pro, ent) with each flavor having several licensing options determining how many "lines" they support. The cheapest one, "TAPIEx Lite -- 1 Line", which is totally worthless for what I'm doing, is $99. The basic one I'd need, "TAPIEx Professional -- Unlimited Lines" is $800. I'm not above paying for a good tool or component when it delivers, but I'm not going to spend nearly a grand on something that's wrapping (just some, not all!) of the functionality provided in Windows for free. Anyway, thanks again for trying to help out. -Allen
Re: Delphi 6 and TAPI3 again (Imported TLB)
Author: Huang
Date: Thu, 01 Dec 2005 08:10
Date: Thu, 01 Dec 2005 08:10
7 lines
1595 bytes
1595 bytes
Allen, I Faced the same problem when programming tapi3 in delphi 7 using the tapi3.dll. have you ever make things done ? I don't wanna pay fees to buy a component, for there is no budget for this project in our company. Can anybody help me ? Wensheng
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads