You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
559 B
Bash
22 lines
559 B
Bash
#!/bin/bash
|
|
|
|
if [ "$EUID" -ne 0 ]
|
|
then echo "Please run as root"
|
|
exit
|
|
fi
|
|
|
|
pjsip() {
|
|
printf "\n\n[$ID]\ntype=endpoint\ncontext=$CONTEXT\ndisallow=all\nallow=ulaw\nallow=alaw\nallow=g722\nauth=$ID\naors=$ID\n\n"
|
|
printf "[$ID]\ntype=auth\nauth_type=userpass\npassword=$PASSWORD\nusername=$ID\n\n[$ID]\ntype=aor\nmax_contacts=3"
|
|
} >> /etc/asterisk/pjsip.conf
|
|
|
|
printf "Asterisk PJSIP User Wizard - Quick-N-Dirty (Like your mom!)\n\n"
|
|
printf "Enter User ID: "
|
|
read ID
|
|
printf "Enter default context: "
|
|
read CONTEXT
|
|
printf "Auth Password: "
|
|
read PASSWORD
|
|
|
|
|
|
pjsip; |