#!/bin/sh
#
# example how to use the "-t command" option
# use this for custom call notification
#
# how to use:
# $ gtk-imonc -t telmond.sh <router>

#echo "HOME: $HOME" # example for inherited environment
#echo "DATE: $TELMOND_CALL_DATE"
#echo "CALLER: $TELMOND_CALLER"
#echo "CALLEE: $TELMOND_CALLEE"

# this one does quite the same as gtk-imonc would do anyway if telmond-popup enabled
# it opens a message window showing the call. except that this window closes itself after
# $timeout seconds.

timeout=5
ignore_msn="4711"

if [ "$TELMOND_CALLEE" == "$ignore_msn" ]; then
exit 0;
fi

xmessage -center -timeout $timeout "DATE: $TELMOND_CALL_DATE
CALLER: $TELMOND_CALLER
CALLEE: $TELMOND_CALLEE"


syntax highlighted by Code2HTML, v. 0.9.1