PHP script for call status when using linksys/sipura devices

At the office we recently upgraded out phone system to use sip phones and chose some linksys SPA-941’s. I was looking for a way to display the caller ID of an incoming call on our computers and potentially the office display screen.

Ideally I wanted something that would connect on the SIP protocol and although there is probably something out there I haven’t had time to find it yet. As a quick (and slightly cumbersome) solution I rewrote a perl script I found here in to PHP.

It’s basically a class that connects to a linksys/sipura phone configuration page at a specified IP and reads the status out of the HTML, also grabbing the callers name and number. You’ll have to adapt it as necessary to poll the phone every x seconds. I’ve included an example file on how to use the class; at the moment the script will just print out the caller ID but you can do whatever you want with it, some examples could be:

  • store it in a database for call records
  • send the information to growl (mac only) to pop-up a message on the desktop
  • integrate the script in to your intranet

If anybody knows of a better way to get the caller ID from these phones, or by using a SIP client on a PC, please let me know!

Download the script here: php-linksys-status.zip

P.S. You’ll need curl (probably already installed) and PHP5 for this to work.

This entry was posted in Googled, Technology. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. elolelefly
    Posted December 27, 2008 at 6:38 pm | Permalink

    otrzktpcxxxfnundwell, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch ;)

  2. Posted March 22, 2009 at 2:30 pm | Permalink

    Please, can you email me and tell me a few more things about this, I am really fan of your blog…

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

  • Categories

  • Archives