I have built a simple TAPI app that will run on a machine on the LAN that connects to the office PBX, it allows me to receive dial, answer, hangup etc commands (which I was planning on receiving via a udp packet). I did this with the intention to integrate the office CRM system to the phone system.
Having done this and testing using a simple python app to send the udp packets I find myself wondering how to send the udp packets to this app given that the CRM system is a web app written in php/javascript.
We use Firefox in the office and so I was going to start with a Firefox extension, but I thought I would ask and see if anyone has any experience on sending udp packets over a lan from a browser using java or flash or from a browser extension/plugin.
Or is there a better cross browser way to send commands to an app on a network pc when the web app is hosted online?
Maybe in the CRM you could use javascript and JSONP to make a request to a local HTTP server, and that server could then send the UDP packets instead.
Related
Having a simple PHP script running on a web server in my local network, how can I auto discover this script (or better the server hosting the script) using an external client (e.g., an Android app).
I am aware that this will not be possible with a pure PHP script hosted on a web server. I need to bind a socket to the broadcast address 255.255.255.255 or some multicast address.
Maybe a python script could do, e.g., http://stuvel.eu/blog/186/start-xbmc-from-remote
Apache ZooKeeper seems interesting but too big and complicated at the same time.
What other options are their? Does some of the "big" web servers provide some kind of easy to use service discovery?
I am new to web services and planning to design a php webservice for my android app on my local machine which will send some user informations to database and generate some JSON data. But the problem is i am little confused about how to test it.
For example lets say that my webservice will locate on my local machine like below http://localhost:80/webservice/register.php
And my ip address is 192.168.1.X
Than is it possible for my android app to use this web service by using this url http://192.168.1.X:80/webservice/register.php
Normally since webservices are on the internet any program can access them. But i thought that i can test my webservice with my android app since both my pc and android device are on the same subnet.
If someone make things clear and tell me a way for testing a web service locally i appreciated
This is possible to call the web service in the local network also from the android app. But Your device and Your server on which Web Service running must have on the same network and Your firewall or any proxy server must be off on the server.
I have a number of phones on my network and I would like to be able to send a number to one based on extension for it to dial.
I have looked into TAPI and the PHP COM events but I don't understand it all that well and how to apply it to my setup.
Does anyone have any experience with using PHP to send commands to an IP phone on their network?
If these are Cisco IP Phones you can look at using the Ip Phone Services API: http://developer.cisco.com/web/ipps
Look specifically at "Dial" Telephony URI in the Application Development Notes
Each IP phone has a web server on it, you can use standard http(s) posts to send XML commands to the phone. You can completely control the phone in this manner.
You have to understand that client-server communication is a bit unidirectional. From iPhone to server you can easily send messages (and get responses), but to send a message from server to iPhone you have to implement socket connection between them, so the iPhone will always "listen" to what the server is "saying". Also, push notifications are a way to send messages from server to device, but it's not your case, I guess.
I want to control a robot from the web, the robot is connected to Android device. The operation will be as the following :
a web application written using JavaScript and HTML runs on desktop computer which takes the keyboard input from the user and send them to the android device connected to the robot.
the android device receive the commands and then send them to Arduino board which used to control the robot.
But how should I deliver the data to the Android device which doesn't has a static IP address?
I have two approaches to solve that :
the JavaScript application sends the keyboard input to a web server runs PHP and MySQL , then the php application store the data on the MySQL database. An application runs on Android connected to that web server and extract the data from the MySQL database.
the JavaScript sends the data to the web server. The android application connected to the web server receives the data directly so the web server is just used as a relay.
The first approach is easy to do but its slow , so my question is...
How to implement the second approach and which web technologies should I use to implement it? And how to make the web server works as relay between two sides?
PS : I am planning to use 000webhost.com as web server. so I will not use my own server
You can either have your Android application poll the webserver for outstanding commands. This is a little inefficient in terms of data usage, but if you're on an unlimited 3G plan / wi-fi, you could live with it. It will be very easy to implement.
Alternatively, set up a TCP server on your server, and have your Android application open a socket connection with the server. This way, your web application can send commands to the server which will immediately stream them to the Android device. It will be slightly harder to implement, but will be more efficient and robust if done right.
PS - Most shared servers don't allow you to open a TCP server on your host so you might be forced to go with the first option.
PPS - I wasn't aware of Google Cloud Messaging. It seems to be a good solution for you what you're attempting to achieve. You should have a look into it.
I want a develop a web application with php, and I want a run my apps with a android device. But my device will not be connected to internet, so I must create a local server on the device to run my php code. Is it possible? And if it's possible how?
Based on this page, developing Web Server for mobile devices is still on the research phase. Most probably you would need to use some kind of simulator for Android and develop your App on powerful desktop PC.
EDIT: Looks like such a server exists for Android.
Please use KSWEB.apk. This app supports PHP, SQL, html, csc, but it requires 3 android devices. The first serves as router, the 2nd device is a local server and the 3rd devices is a monitor.
I'm not sure about your need to have a web server running on your phone, but if you have a wireless router and your phone can connect to it, can you not install an Apache server with PHP support on your development PC and access it via your phone's wireless connection?