Jaiku By Telephone

From rukapedia
Jump to: navigation, search

This an Asterisk AGI script that uses PHPAGI and class.jaiku.php to allow you to update your Jaiku presence message from a regular land-line telephone.

Source Code

You can browse the source code from a browser, or grab the latest version of the source code using Subversion at:

You can grab the latest version of the source code using Subversion at:

svn://svn.reinvented.net/Jaiku/JaikuPHP/jaiku-agi.php

or

http://svn.reinvented.net/Jaiku/JaikuPHP/jaiku-agi.php

Installation

You need to having a working Asterisk installation to use this script at all. You also need to have PHPAGI installed in a location that your PHP can find.

Move the jaiku-agi.php script into your Asterisk AGI scripts directory (often /var/lib/asterisk/agi-bin) and make sure the permissions are set so that it's accessible by your Asterisk and that it's set to be executable. Modify the line:

$j = new Jaiku("username","password",'screenname');

and replace with your own Jaiku.com username, password and screen name.

Finally, set up an Asterisk extension that calls the script.

If you're using FreePBX, you can:

  1. Navigate to Setup | Ring Groups.
  2. Create a new Ring Group called "Jaiku Presence Update."
  3. Enter an invalid extension in the "extension list" -- something like "XXX".
  4. Set the ring time to 1.
  5. Under Destination, select Custom App, and enter custom-jaiku,s,1
  6. In /etc/asterisk/extensions_custom.conf, enter:
[custom-jaiku]
exten => s,1,agi(jaiku-agi.php)

If all goes according to plan, you should be able to pick up a handset, dial the number for the Ring Group you created, and the script should answer.

Text Entry

When you're prompted to enter a new Jaiku status message, you must use the text input method described here. This is not the same text input method you'll be used to if you use a mobile phone to compose text messages, but it's similar. The basic idea is that you enter each letter followed by a * press. Enter 0* for space and # to finish.

Here It In Action

This weblog post contains a link to this MP3 file that is a recording of a telephone call illustrating use of the script.

Known Issues

The confirmation menu doesn't allow options to be selected while it's being read. This is an easy thing to change, but I haven't yet.

It's assumed that the Jaiku update worked properly -- no errors are reported.

Release Notes

2006-12-24 - v0.1 - Initial release.