Index: addmailbox =================================================================== RCS file: /usr/cvsroot/asterisk/addmailbox,v retrieving revision 1.2 diff -u -r1.2 addmailbox --- addmailbox 21 Nov 2003 05:52:14 -0000 1.2 +++ addmailbox 16 Dec 2003 23:39:25 -0000 @@ -2,17 +2,23 @@ clear VMHOME=/var/spool/asterisk/voicemail SNDHOME=/var/lib/asterisk/sounds -echo -echo "Enter Voicemail Context of the mailbox you are creating." -echo "The context is the value between the square brackets in" -echo "the voicemail.conf file." -echo "(DEFAULT: default)" -echo -n "Voicemail Context: " -read context -echo -echo "Enter the Mailbox number of the voicemail box you are creating." -echo -n "Mailbox Number: " -read mailbox +if [ -z $1 ] +then + echo + echo "Enter Voicemail Context of the mailbox you are creating." + echo "The context is the value between the square brackets in" + echo "the voicemail.conf file." + echo "(DEFAULT: default)" + echo -n "Voicemail Context: " + read context + echo + echo "Enter the Mailbox number of the voicemail box you are creating." + echo -n "Mailbox Number: " + read mailbox +else + mailbox=$1 + context=$2 +fi context=${context:-default}