Six alerts are already written for all three alert categories. These all obey the result from the corresponding message function.
The beep alerts simply sound the terminal bell by calling
ding. They are enabled by default.
The echo alerts display a message in the echo area by calling
message. They are enabled by default.
The switch alerts switch to the buffer where the event occurred
(chat buffer for incoming messages, roster buffer for presence
changes, browse buffer for completed queries). They are disabled by
default. Take care when using them, as they may interrupt your
editing.
The display alerts display but do not select the buffer in
question, using the function display-buffer. See Choosing a Window for Display, for information about customizing its behaviour.
The wave alerts play a sound file by calling
play-sound-file. No sound files are provided. To use this,
enter the names of the sound files in
jabber-alert-message-wave, jabber-alert-presence-wave
and jabber-alert-info-wave, respectively.
The screen alerts send a message through the Screen terminal
manager (see http://www.gnu.org/software/screen/). They do no
harm if called when you don't use Screen.
The ratpoison alerts send a message through the Ratpoison
window manager (see http://ratpoison.sourceforge.net/). They
do no harm if used when you're not running X, but if you are running X
with another window manager, the ratpoison processes will never exit.
You can look at them with list-processes.1
All these functions are in the jabber-alert.el file. You can
use them as templates or inspiration for your own alerts.