Implimenting PHP, TAPI under Linux

<?php?>

Well-Known Member
Joined
Nov 15, 2010
Messages
367
Reaction score
0
I require some advise and help, in reference to comunicating with a Samsung 7400 IPPABX from within my web application running on a Linux server.

I would like to be able to do "Click2Dial", where a customer or client can enter his telephone number in a web form and the submited form data can be used to instruct the telephony system to initialize a call from one extension to the customer's number. Additionally, I would like company employees to use an electronic phonebook, which will be integrated into the intranet web application, that will enable them to lookup another employee, supplier or client and initialize a call from within the intranet application.

I've found some resources on TAPI (telephone application programming interface) a COM based communication layer, and was wondering if TAPI would be the only way to interface with the IPPABX, or is there another way, maybe via sockets.

Any help will be highly appreciated.
 
As far as I can tell the only way is via sockets... but its more than that... you need to emulate a whole SIP stack client side... or... go the more complex route and have a SIP stack proxy to which you can send / rcv pure audio streams... that in turn talks SIP to the PBX...

As far as web tech goes... your only options are Flash ( that can do sockets + have access to microphone / speakers ) or Java Applet (yucko! - wouldnt even go there)


Last time i checked (about a year ago) there was'nt any full featured open source Flash based VoIP clients available... BUT... there are some click to calls available:

check out: http://truvoipbuzz.com/2010/10/zing...to-call-website-widget-video-review-giveaway/

and if you really want full featured and dont mind java applets (since its an intranet perhaps managing JRE installs is easier) you can check out http://www.mizu-voip.com/Products/WebPhone.aspx


hope it helps.
 
Thanks stricken, I had a look at the links,

but think that I didn't describe the cenario correctly as Wikipedia does, http://en.wikipedia.org/wiki/Click-to-call. This link, PDF, also describe a simmilar implimentation.

When running a Asterix or similar IPPABX, a Click2Dial (or rather RequestACall) can be envoked using PHP sockets :

Code:
#Based on the Click-To-Call script brought to you by VoipJots.com
#Modified by Rafael Cortes for Asterisk PBXS www.asteriskpbxs.com
#Slightly modified by NerdVittles.com for your calling pleasure.

$strHost = "127.0.0.1";

$strUser = "admin";

$strSecret = "amp111";

$strChannel = "SIP/502";

$strContext = "from-internal";

$strWaitTime = "30";

$strPriority = "1";

$strMaxRetry = "2";

$strName  = $_POST['txtname'];

$strExten = $_POST['txtphonenumber'];

$callNumber = $strExten;

$strCallerId = "Web-".$strName . " <$callNumber>";

$length = strlen($strExten);

if ($length == 10 && is_numeric($strExten))
{
  $oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed");
  fputs($oSocket, "Action: login\r\n");
  fputs($oSocket, "Events: off\r\n");
  fputs($oSocket, "Username: $strUser\r\n");
  fputs($oSocket, "Secret: $strSecret\r\n\r\n");
  fputs($oSocket, "Action: originate\r\n");
  fputs($oSocket, "Channel: $strChannel\r\n");
  fputs($oSocket, "WaitTime: $strWaitTime\r\n");
  fputs($oSocket, "CallerId: $strCallerId\r\n");
  fputs($oSocket, "Exten: $strExten\r\n");
  fputs($oSocket, "Context: $strContext\r\n"); 
  fputs($oSocket, "Priority: 1\r\n\r\n");
  fputs($oSocket, "Action: Logoff\r\n\r\n");
  sleep(3);
  fclose($oSocket);
}

Thus I was wondering if the Samsung OfficeServe 7400 IPPABX would support a similar command set, I however could not find a developer API or reference guide yet.
 
Top
Sign up to the MyBroadband newsletter
X