From: drowe67 Date: Sat, 16 Jan 2010 04:15:12 +0000 (+0000) Subject: removed some unused files X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=ecedf78763baca96f08785007d44be8655da8657;p=freetel-svn-tracking.git removed some unused files git-svn-id: https://svn.code.sf.net/p/freetel/code@120 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/easy-asterisk-gui/cgi-bin/anphone.png b/easy-asterisk-gui/cgi-bin/anphone.png deleted file mode 100644 index 9783372f..00000000 Binary files a/easy-asterisk-gui/cgi-bin/anphone.png and /dev/null differ diff --git a/easy-asterisk-gui/cgi-bin/ipphone.png b/easy-asterisk-gui/cgi-bin/ipphone.png deleted file mode 100644 index f9578db1..00000000 Binary files a/easy-asterisk-gui/cgi-bin/ipphone.png and /dev/null differ diff --git a/easy-asterisk-gui/cgi-bin/phoneline.jpg b/easy-asterisk-gui/cgi-bin/phoneline.jpg deleted file mode 100644 index 21078c3e..00000000 Binary files a/easy-asterisk-gui/cgi-bin/phoneline.jpg and /dev/null differ diff --git a/easy-asterisk-gui/cgi-bin/set_voiplines.pl b/easy-asterisk-gui/cgi-bin/set_voiplines.pl new file mode 100755 index 00000000..89c435d4 --- /dev/null +++ b/easy-asterisk-gui/cgi-bin/set_voiplines.pl @@ -0,0 +1,94 @@ +#!/sbin/microperl +# set_voiplines.pl +# David Rowe 12 Jan 2010 +# +# Replaces fields in sip.conf, outputs new sip.conf contents to stdout + +$user = $ARGV[0]; +$pass = $ARGV[1]; +$host = $ARGV[2]; +$stanza_new = $ARGV[3]; + +# We need to slurp up the easy asterisk provider and spit them +# back out. All must be commented out except for the one that +# is selected. Hopefully non-easy asterisk content of sip.conf +# won't be affected. + +open SIP, "/etc/asterisk/sip.conf"; +$provider = ""; +while () { + + # start of any new stanza switches off parsing. It may get + # switched back on below if it contains easy-asterisk + # keyword. This allows non-easy asterisk SIP stanzas to be + # included in sip.conf + + if (/\[/) { + $stanza = ""; + } + + # look for commented or uncommented easy asterisk provider stanza + + if (/\[(.*)\] .* easy-asterisk/) { + $stanza = $1; + } + + if ($stanza eq "") { + # we are not in an easy-asterisk provider stanza + + if (/;*register => (\S*)@(\S*).*;.*(easy-asterisk.*)/) { + # an easy-asterisk register line + + #print "XX stanza_new='$stanza_new' '$1' '$2' '$3'\n"; + + if ($2 eq $stanza_new) { + print "register => $user\@$stanza_new; $3\n"; + } + else { + print ";register => $1\@$2 ; $3\n"; + } + } + else { + # OK so this is a regular sip.conf line, just echo to stdout + print $_; + } + } + else { + # OK, we are in an easy-asterisk stanza + + # strip off any leading ";" + + $_ =~ s/^\;//; + + if ($stanza eq $stanza_new) { + + # this stanza should be uncommented + + if (/^user=/) { + print "user=$user\n"; + } + if (/^username=/) { + print "username=$user\n"; + } + elsif (/^fromuser=/) { + print "fromuser=$user\n"; + } + elsif (/^secret=/) { + print "secret=$pass\n"; + } + elsif (/^host=/) { + print "host=$host\n"; + } + else { + print $_; + } + } + else { + # comment out unused easy-asterisk stanzas + print ";$_"; + } + } + +} +close SIP; + diff --git a/easy-asterisk-gui/cgi-bin/voipline.jpg b/easy-asterisk-gui/cgi-bin/voipline.jpg deleted file mode 100644 index d84b1052..00000000 Binary files a/easy-asterisk-gui/cgi-bin/voipline.jpg and /dev/null differ diff --git a/easy-asterisk-gui/set_voiplines.pl b/easy-asterisk-gui/set_voiplines.pl deleted file mode 100755 index 89c435d4..00000000 --- a/easy-asterisk-gui/set_voiplines.pl +++ /dev/null @@ -1,94 +0,0 @@ -#!/sbin/microperl -# set_voiplines.pl -# David Rowe 12 Jan 2010 -# -# Replaces fields in sip.conf, outputs new sip.conf contents to stdout - -$user = $ARGV[0]; -$pass = $ARGV[1]; -$host = $ARGV[2]; -$stanza_new = $ARGV[3]; - -# We need to slurp up the easy asterisk provider and spit them -# back out. All must be commented out except for the one that -# is selected. Hopefully non-easy asterisk content of sip.conf -# won't be affected. - -open SIP, "/etc/asterisk/sip.conf"; -$provider = ""; -while () { - - # start of any new stanza switches off parsing. It may get - # switched back on below if it contains easy-asterisk - # keyword. This allows non-easy asterisk SIP stanzas to be - # included in sip.conf - - if (/\[/) { - $stanza = ""; - } - - # look for commented or uncommented easy asterisk provider stanza - - if (/\[(.*)\] .* easy-asterisk/) { - $stanza = $1; - } - - if ($stanza eq "") { - # we are not in an easy-asterisk provider stanza - - if (/;*register => (\S*)@(\S*).*;.*(easy-asterisk.*)/) { - # an easy-asterisk register line - - #print "XX stanza_new='$stanza_new' '$1' '$2' '$3'\n"; - - if ($2 eq $stanza_new) { - print "register => $user\@$stanza_new; $3\n"; - } - else { - print ";register => $1\@$2 ; $3\n"; - } - } - else { - # OK so this is a regular sip.conf line, just echo to stdout - print $_; - } - } - else { - # OK, we are in an easy-asterisk stanza - - # strip off any leading ";" - - $_ =~ s/^\;//; - - if ($stanza eq $stanza_new) { - - # this stanza should be uncommented - - if (/^user=/) { - print "user=$user\n"; - } - if (/^username=/) { - print "username=$user\n"; - } - elsif (/^fromuser=/) { - print "fromuser=$user\n"; - } - elsif (/^secret=/) { - print "secret=$pass\n"; - } - elsif (/^host=/) { - print "host=$host\n"; - } - else { - print $_; - } - } - else { - # comment out unused easy-asterisk stanzas - print ";$_"; - } - } - -} -close SIP; -