I’m using PHP to connect to a TAPI phone.
To create a call, I do the following (it works fine):
$tapi = new COM("TAPI.TAPI.1");
$res = $tapi->Initialize();
$objCollAddresses = $tapi->Addresses;
for($i = 1; $i <= $objCollAddresses->Count; $i++)
if(strpos($objCrtAddress->AddressName, IP_OFFICE_PHONE) !== false)
$gobjAddress = $objCollAddresses->Item($i);
if($gobjAddress != null)
$NewCall = $gobjAddress->CreateCall("xxxxxxxxx", LINEADDRESSTYPE_PHONENUMBER, LINEMEDIAMODE_INTERACTIVEVOICE);
$res = $tapi->Shutdown();
Now, I’m trying to receive events.
First, I created the following class:
var $terminated = false;
function Event($TapiEvent, $pEvent)
print "ITTAPIEventNotification::Event CALLED!\n";
$this->terminated = true;
Then I do the following:
$events = new ITTAPIEventNotification();
$res = com_event_sink($tapi, $events, "Event");
$tapi->EventFilter = 0x1FFFF; // all events
And then I add the following at the end of my script:
But I’m not receiving any event. I’m doing anything wrong? Can someone point me in the rigth direction?
Anyone knows if the parameter sinkinterface in com_event_sink that I should use is "Event"?
Did you ever work this out? I am trying to do the same, and haven’t got any further.
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!
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.
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.