#!/usr/bin/ksh
typeset minpuid=17053200001
maxrec=30
#touch ./subscriber_data
output="./subscriber_data"
domain=dat05.test.com
maxpubid=$minpuid+$maxrec
echo
echo "############################################################"
echo "## Starting to generate $maxrec records in file \$output! "
echo "## In progress ...... "
echo "## appending...... "
>> $output
while (( $minpuid<=$maxpubid ))
do
echo "#Subscriber $minpuid" >> $output
echo "PRIVATE_ID=privid${minpuid}@$domain" >> $output
echo "PASSWORD=noauth" >> $output
echo "PRSET_INDEX = 5" >> $output
echo "SERVER_CAP_INDEX=10" >> $output
echo "NUMPUID=2" >> $output
echo " PUBLIC_ID=sip:+${minpuid}@$domain" >> $output
echo " BARRING=0" >> $output
echo " PROFILE_ID=90" >> $output
echo "#" >> $output
echo " PUBLIC_ID=tel:+${minpuid}" >> $output
echo " BARRING=0" >> $output
echo " PROFILE_ID=90" >> $output
echo "#" >> $output
((minpuid=$minpuid+1))
done
echo "## done...... "
typeset minpuid=17053200001
maxrec=30
#touch ./subscriber_data
output="./subscriber_data"
domain=dat05.test.com
maxpubid=$minpuid+$maxrec
echo
echo "############################################################"
echo "## Starting to generate $maxrec records in file \$output! "
echo "## In progress ...... "
echo "## appending...... "
>> $output
while (( $minpuid<=$maxpubid ))
do
echo "#Subscriber $minpuid" >> $output
echo "PRIVATE_ID=privid${minpuid}@$domain" >> $output
echo "PASSWORD=noauth" >> $output
echo "PRSET_INDEX = 5" >> $output
echo "SERVER_CAP_INDEX=10" >> $output
echo "NUMPUID=2" >> $output
echo " PUBLIC_ID=sip:+${minpuid}@$domain" >> $output
echo " BARRING=0" >> $output
echo " PROFILE_ID=90" >> $output
echo "#" >> $output
echo " PUBLIC_ID=tel:+${minpuid}" >> $output
echo " BARRING=0" >> $output
echo " PROFILE_ID=90" >> $output
echo "#" >> $output
((minpuid=$minpuid+1))
done
echo "## done...... "