# HG changeset patch # User Michael Schloh von Bennewitz # Date 1300983998 -3600 # Node ID 8ad5bb570338d8610ffe3bdbed9eb243aaa7ec13 # Parent 62f6047fe81ac26a6387c4575b733cd603d95149 Reformat comments and correct spacing throughout. diff -r 62f6047fe81a -r 8ad5bb570338 asterisk/wakeup.agi --- a/asterisk/wakeup.agi Thu Mar 24 14:54:25 2011 +0100 +++ b/asterisk/wakeup.agi Thu Mar 24 17:26:38 2011 +0100 @@ -63,12 +63,10 @@ } } - -############ send_file ############# -# Use this to send a wave file on # -# the channel # -# # -#################################### +############ send_file #### +# Use this to send a wave # +# file on the channel # +########################### sub send_file { my ($myfile) = @_; chomp($myfile); @@ -83,9 +81,7 @@ } ############ hangup ############### -# Use this to hand up a channel # -# the channel # -# # +# Use this to hang up a channel # #################################### sub hangup { if ($DEBUG == 1 ) { @@ -114,11 +110,9 @@ return $1; } -############ say_digits ############ -# Use this to say a digits # -# over the channel # -# # -#################################### +############ say_digits ################### +# Use this to say digits over the channel # +########################################### sub say_digits { my ($mynumber) = @_; chomp($mynumber); @@ -130,11 +124,10 @@ &checkresult($result); } -############ get_choice ############ -# Use this to receive a DTMF # -# choice from the channel # -# # -#################################### +######## get_choice ############ +# Use this to receive a DTMF # +# choice from the channel # +################################ sub get_choice { if ($DEBUG == 1 ) { print DEBUGOUT "Getting choice \n"; @@ -146,10 +139,9 @@ return $1; } -############ answer ############### -# Anser the channel # -# # -#################################### +###### answer ###### +# Anser the channel # +##################### sub answer { if ($DEBUG == 1 ) { print DEBUGOUT "Answering the channel \n"; @@ -239,11 +231,10 @@ my $myext = $aig[1]; return $myext; } -########### init_agi ############### -# Use this to initialize the AGI # -# variable # -# # -#################################### + +############### init_agi ################## +# Use this to initialize the AGI variable # +########################################### sub init_agi { while() { chomp; @@ -254,10 +245,10 @@ } } -############ ascii2num ############# -# Removes 48 to get a number out # -# of the asciss return # -#################################### +######### ascii2num ########## +# Removes 48 to get a number # +# out of the asciss return # +############################## sub ascii2num { my ($asc) = @_; my $ret; @@ -265,10 +256,8 @@ return $ret; } - -########### Welcome ############### +############# Welcome ############## # This is the welcome menu # -# # #################################### sub welcome { my $ret = 0; @@ -308,7 +297,6 @@ # want to manage already scheduled # # wakeup calls # #################################### - sub manage_calls { my $checker = "false"; my @calls; @@ -371,13 +359,12 @@ } $del = &send_file("goodbye"); } - } -######## schedule_new ############## -# This is the menu to schedule a # -# a new wakeup call # -#################################### +######## schedule_new ########## +# This is the menu to schedule # +# a new wakeup call # +################################ sub schedule_new { my $checker = "false"; my $ret_var; @@ -493,8 +480,7 @@ ######## get_time_string ########### # This will return the time string # -# when inputing a string like # -# hhmi # +# when inputing a string like hhmi # #################################### sub get_time_string { my ($intime) = @_; @@ -538,13 +524,11 @@ return $ret_val; } -############ new_time ############## -# This will return the time string # -# with a time set 10 minute into # -# the future # -# The string is # -# MMDDhhmi # -#################################### +############ new_time ################ +# This will return the time string # +# with a time set 10 minute into # +# the future. The string is MMDDhhmi # +###################################### sub new_time { my ($input) = @_; my @timedata; @@ -584,10 +568,10 @@ return $ret_val; } -########### snooze ################ -# This is the menu to snooze the # -# wakeup call # -#################################### +########### snooze ########## +# This is the menu to snooze # +# the wakeup call # +############################## sub snooze { my ($oldfile) = @_; my $newfile; @@ -694,11 +678,9 @@ return 0; } -########### main program ########### -# Here goes the main program # -# # -#################################### - +######## main program ######## +# Here goes the main program # +############################## my $numargs = $#ARGV + 1; if ($DEBUG == 1) { open (DEBUGOUT, '>', $debugfile) or die "Cannot open $debugfile for write :$!";