PHP web application + TAPI / VOIP telephone calls? - php

A client wants to use our (ERP) web application as some kind of incoming and outgoing calling software. He needs phonenumer recognition and to be able to dial a number by clicking with the mouse and then pick up his phone.
Somehow a TAPI or VOIP connection must be made on the clients computer, I think... for this I could create a small listener/dialer program (not in PHP, but in Delphi for example) that is installed on each client,but how would I let this communicate with the browser / web server?
Another way could be by installing our web application on the server of the client itself, which has a direct link to the telephone software server.
Has anybody ever done something like this in PHP ?
Any suggestions?

Is your ERP software written in php? You may want to integrate with Asterisk (and open source pbx) (and by extension FreePBX if your in php anyway)

I came across this site www.tropo.com which has an API that adds Voice and SMS support to PHP and other languages.

Related

Bidirectional communication between Adobe Air Apps

This whole thing started when I began working on an Adobe Air App that was until now a completely single player game. The question I have is whether it is possible to alert a user when it is their turn without using a polling technique ( without continually checking... is it my turn yet? ). The technologies I have at my disposal are pretty much just AIR, PHP, and MySQL. I currently have a shared hosting package with no ssh support in which I am sure I will change soon this year to a dedicated package with ssh support.
With these technologies would that be possible?
The idea / direction I have been going down is.
Setting up a PHP Socket Program to maintain the connection between users and having a common domain the AIR application(s) will connect to. For example. My phone would POST to my.domain.com which would execute a php script to start a Socket Server "exec("php /socket.php"); All users of the application would join a "pool" in the server if it was running in which - my theory is that - I can maintain bidirectional communication with them. The MySQL server can be used to track if the socket is open and who is currently in the pool. Is this possible?
I also think I would not be able to notify users when the app is closed as they would no longer be in the socket.
I'm just wondering if I am way off base here.
If you want to use existing notification ANE, you can get it from here :
ANE-Push-Notification
It works for both IOS and Android.
And if you want to start from scratch, this link is also useful :
Developing Native Extensions with Adobe
After a lot of research, and reviewing many alternative technologies, both ios and android offer native support for notifications to be sent to another device. I think the best option is to build an air native extension or find one that already exists to bridge the gap between the andriod or ios notification system. Here is a good resource to get started http://www.adobe.com/devnet/air/native-extensions-for-air.html

Creating a simple web service for conferences

There was an interesting challenge to create a web service that allows the 2nd people to communicate with each other voice, the voice has to be distorted. Of the languages ​​I use PHP, I would like to know if there are any formulaic solutions / libraries for this task?
Check this links:
Using HTML5:
http://www.sitepoint.com/html5-speech-input-fields/
Using Flash:
//stackoverflow.com/questions/7966044/how-can-i-make-microphone-sound-transfer-from-website-open-in-my-pc-to-websites
VoicePHP Application:
//voicephp.com/howitworks.html
But if you really want to build a communication system you should use VOIP (voice over IP) most successfully communication companies use it //en.wikipedia.org/wiki/Voice_over_IP
A good open source software which will work perfectly with PHP as well is Asterisk IP PBX
http://www.asterisk.org/

How load PHP website on the iPad simulator or device?

I have one .php web site and I want to put it in iPad application "web application".
I mean create UIWebView and load files in WebView, so my First question is, is it possible to create this webApp and can I run it on Xcode simulator?
What do I need for implementing this application (Apache, MySQL) inside ipad outside?
Basically I want to have all my .php class inside of app and run it via iPad app, it means that if I hadn't any internet I can run the application.
Since I want to run it in both iPad and XCode simulator.
Would you please give me some hints for implement this application?
A few points you need to think about:
App Store Approval - if you intend to market this app (i.e it's not for jailbroken devices via Cydia, or an in-house corporate app) then you will most likely run in to issues with the approval process.*
You're intending to bundle in a scripting language with your application. Now this may not be an issue depending on whether or not this is exposed to the end-user; but you do run the risk of Apple finding out and pulling the plug.
The alternative to bundling in a scripting language (PHP in your case) is going to be loading the code off of an external server. This is a no-no straight away, as Apple requires your application to have functionality offline - or atleast they did. Where this leaves all the Social Networking and other network-dependant apps... Well, I guess there are exceptions!
Device Performance - you're essentially intending to run a small web server on a mobile device; a tablet in this case. This could be very resource intensive, so is probably not wise. I personally wouldn't want my battery being drained because someone has decided that they want to bundle in a web server with their application.
Your implementation idea itself is sound, in the respect of using a UIWebView. You should probably check out the Apache Cordova/PhoneGap framework, and that should satisfy your needs and provide an off-the-shelf way of packaging up your web app. If you do need custom functionality then it's worth looking at anyway; plugins are relatively easy to develop, there's a wide range available already and the plans for cordova now are to allow developers to implement it into native applications. (Say, if only one view requires PhoneGap functionality etc)
Personally, I fail to see what requires PHP that can not be done via HTML5 and PhoneGap. There are storage options available, SQL options, you're using web technologies so can easily query external web services. It's also a lot safer with regards to app approval - as it's tried and tested; there are many applications build using such solutions already in the store.
I think you need a serious re-think. Otherwise, perhaps you could post some more details?
Please note that PHP is a server-side language. So do you want to run a server on your iPad? If so, you can develop PHP applications on a proper desktop/laptop and then view them on iPad Safari browser over Wifi.
Otherwise you can install LightHTTPd server with PHP libraries, MySQL, CURL and all from Cydia app store on a jailbroken iOS device to get a full environment. For Android there is this app PAW server available which can run an Apache server in such devices.
If you just want to check your website is working fine on small devices, or you want to check responsiveness of your website. Go to:Ipad Peek and run your website on given devices/simulators using url.
A simple google search pulled up this free framework: http://www.ipfaces.org/
I've never used to before, but it might do what you need.

package php as an android application?

I'm developing an Android app, and due to time circumstances, I started developing the project in PHP, together with a MySQL backend. is it possible to package the project folder as a APK where it could be opened within the tablet?
I understand Android applications are meant to be written in Java, and I have checked out:
http://phpforandroid.net/
But it doesn't answer if it was possible to package a complete PHP project as an APK.
No. Since PHP is a server side language you would have to run a webserver and a MySQL server on the device (like #deceze said).
Since you have already started development in PHP my recommendation would be to develop a web based application and have your users access it from a very lightweight client on the Android device. You could use something like PhoneGap or AppCelerator to develop a front end client app since I'm guessing your talents lie in web development :)
"When all you have is a hammer, you start to approach every problem as if it was a nail"
You're using the wrong tool for the job. PHP is not meant for writing interactive GUI applications, it's meant for running server side scripts or commandline scripts. Even if you could easily run PHP on an android phone (which you cant), it would be the wrong choice of language for a phone app.
You have two options
1) throw away the work you've done so far and redo it in a language more appropriate to the task at hand
2) deploy your application to a publicly accessible web server and run it via the handset's web browser.
If you think about it, you'd need to squeeze a web server, the PHP core, whatever extensions your application uses and a MySQL server onto a handheld device. This is seriously overkill.
And why MySQL? Android provides SQLite database support.

SIP subscription in PHP

I have several Snom VoIP phones in the office running off a virtual phone system in London somewhere.
I've written a small PHP app that lets me control the phone remotely - all it does in the background is cURL into my handset's web interface and control it that way.
However now I'd like my PHP app to know what other phones on the system are available/busy. I think the phone handsets do this by way of a SIP subscription with the virtual phone system, whereby my handset subscribes to feeds from all other handsets on the system and can then light/extinguish the busy lamp.
Am I going about this the right way? Is there any way I can have a PHP script subscribe to those notifications?
Many thanks in advance
This is not likely, but really depends on what you mean by a "PHP app". If it's a standard web-based application, you can't do anything about it. SIP communication is done over UDP sockets and requires you to listen all the time for responses.
If you mean an actual application, running all the time, then you need to implement the SUBSCRIBE/NOTIFY part of SIP spec and it is of course possible.
If you want to pull the statuses of other phones into your web application, I'd recommend setting up a server which will handle the standard SIP communication and subscribe to the phone's presence, then update the information in a local database. In the web app you can simply read the current status from the database and present it to the user.

Categories