473,394 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

TAPI events in PHP

4
Hi all,

I'm using PHP to connect to a TAPI phone.
To create a call, I do the following (it works fine):
Expand|Select|Wrap|Line Numbers
  1. $tapi = new COM("TAPI.TAPI.1");
  2. $res = $tapi->Initialize();
  3. $objCollAddresses = $tapi->Addresses;
  4. for($i = 1; $i <= $objCollAddresses->Count; $i++)
  5. {
  6.     if(strpos($objCrtAddress->AddressName, IP_OFFICE_PHONE) !== false)
  7.     {
  8.         $gobjAddress = $objCollAddresses->Item($i);
  9.     }
  10. }
  11. if($gobjAddress != null)
  12. {
  13.      $NewCall = $gobjAddress->CreateCall("xxxxxxxxx", LINEADDRESSTYPE_PHONENUMBER, LINEMEDIAMODE_INTERACTIVEVOICE);
  14.      $NewCall->connect(false);
  15.      sleep(50);
  16.      $NewCall->Disconnect(DC_NORMAL);
  17. }
  18. $res = $tapi->Shutdown();
Now, I'm trying to receive events.

First, I created the following class:
Expand|Select|Wrap|Line Numbers
  1. class ITTAPIEventNotification
  2. {
  3.     var $terminated = false;
  4.     function Event($TapiEvent, $pEvent)
  5.     {
  6.         print "ITTAPIEventNotification::Event CALLED!\n";
  7.         $this->terminated = true;
  8.     }
  9. }
Then I do the following:
Expand|Select|Wrap|Line Numbers
  1. $events = new ITTAPIEventNotification();
  2. $res = com_event_sink($tapi, $events, "Event");
  3. $tapi->EventFilter = 0x1FFFF; // all events
And then I add the following at the end of my script:
Expand|Select|Wrap|Line Numbers
  1. while(!$events->terminated)
  2. {
  3.     print ".";
  4.     com_message_pump(4000);
  5. }
But I'm not receiving any event. I'm doing anything wrong? Can someone point me in the rigth direction?

Thanks
Jun 9 '10 #1
6 9324
lgrave
4
Anyone knows if the parameter sinkinterface in com_event_sink that I should use is "Event"?
Jun 11 '10 #2
Did you ever work this out? I am trying to do the same, and haven't got any further.
Dec 28 '13 #3
lgrave
4
Hi mpcaddy, sorry to inform you, but my conclusion back in 2010 was that this is impossible to do in PHP. I had to switch to C++ and implement everything using TAPI3.
By the way, TAPI&TAPI3 is a outdated microsoft technology, a complete nightmare! Run away from this if you can!
Dec 29 '13 #4
@lgrave
Yeah I wanted to run away from it, the only problem being is the phone system I want to interface with (Samsung OfficeServ 7200) the only way for receiving the information is through TAPI provided via their OpenTSP driver through their OfficeServ Link software. So I am kind of stuck with it unfortunately.
Dec 30 '13 #5
Hello @lgrave,
First off, I would like to say thank you for making your hard work open source. But am yet to enjoy it tho :), I just can't seem to get the TapiAdapter.exe to run. It just exits everytime I run it. Is there something I need to do before running TapiAdapter.exe. It took me a while to get it to compile, but now frustration is setting in. Am hoping its something little am missing.
Any help is greatly appreciated.
Thanks!
Apr 19 '16 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: futureofphp | last post by:
Hi, Just out of curiosity, Can I use TAPI (Telephone API) in PHP. Create an answering machine that can answer calls and respond, also detect DTMF tones using TAPI? I havent heard of such a...
0
by: Damon | last post by:
I am using the following code (primarily wizard created) to dial a phone number on an access form via the on double click event. Application.Run "utility.wlib_AutoDial", stDialStr I want to...
5
by: David | last post by:
Hello. Where can I find some examples of using TAPI in C#? And is there any site or newsgroup for TAPI?
11
by: BizTalk Architect | last post by:
Hello, I am days into this problem and I cant make heads or tails of it. Please post suggestions, I dont care how crazy they sound. Scenario: I have a TAPI C# application. (TAPI 3.0)
1
by: ahmed fat-hi | last post by:
hi every body to make a call using TAPI i do the following: 1- initiate connectiion 2- Select an Address 3- make a call when i make a call i execute the function ITAddress::CreateCall the...
3
by: perspolis | last post by:
Hi all thanks in advance to read my post. I created a TAPI application and in this application I monitor the digits that user enter by phone.. it works well when I call from a phone but it...
7
by: StevenVibert | last post by:
I'm rewriting a C++ TAPI app I wrote a while ago in C#. Everything works fine for the first call. Unfortunately, all subsequent calls are completely ignored by TAPI until I restart the app again....
1
by: Dr.Sameh Ali | last post by:
I am trying to build IVR system using c# . i know that .net wrapper for tapi does not work well. but it seems that many made it work. So my question: Is there any hope to find a working code that...
0
jackb
by: jackb | last post by:
Hi there. Is there any solution such that I could connect to some TAPI access number using TAPI in .NET, and then could send messages? E.g. consider SprintPCS; I could send message to any...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.