yate/scripts/noroute.pl
anthm 8f630fea09 update comments
git-svn-id: http://yate.null.ro/svn/yate/trunk@249 acf43c95-373e-0410-b603-e72c3f656dc1
2005-02-25 23:10:39 +00:00

34 lines
1,001 B
Perl
Executable file

#!/usr/bin/perl
#######################################################
#
# noroute.pl is an demo script module for Yate using Yate.pm
# Copyright Anthony Minessale II <anthmct@yahoo.com>
# This Module is released under the GNU Public License
# If you find this software useful, donations are welcome
# at paypal:anthmct@yahoo.com
#
$|=1;
use lib 'scripts/';
use Yate;
use Data::Dumper;
sub demo($) {
my $message = shift;
printf STDERR "hello time is %s and binded is %s i'll return undef so the next module gets a chance....\n",
$message->param("time"),$message->header("binded");
# return ("true");
return undef;
}
sub demo2($) {
my $message = shift;
printf STDERR "hello again time is %s and binded is %s I'll return false to put and end to it.\n",
$message->param("time"),$message->header("binded");
return ("true","tone/dial");
}
my $message = new YateMessage();
$message->install("engine.timer",\&demo);
$message->install("call.route",\&demo2);
$message->listen();