From: drowe67 Date: Wed, 10 Feb 2010 00:18:35 +0000 (+0000) Subject: don't try to register none voip line X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=36dda1442160192b03a84c576db1d03dc612b9d2;p=freetel-svn-tracking.git don't try to register none voip line git-svn-id: https://svn.code.sf.net/p/freetel/code@146 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/mini-asterisk-gui/cgi-bin/set_voiplines.pl b/mini-asterisk-gui/cgi-bin/set_voiplines.pl index 980931f2..3fd3b91c 100644 --- a/mini-asterisk-gui/cgi-bin/set_voiplines.pl +++ b/mini-asterisk-gui/cgi-bin/set_voiplines.pl @@ -3,13 +3,14 @@ # David Rowe 12 Jan 2010 # # Replaces fields in sip.conf, outputs new sip.conf contents to stdout +# Gets run when "OK" is pressed on the Voip Lines screen $user = $ARGV[0]; $pass = $ARGV[1]; $host = $ARGV[2]; $provider_new = $ARGV[3]; -# We need to slurp up the mini asterisk provider and spit them +# We need to slurp up the mini asterisk providers and spit them # back out. All must be commented out except for the one that # is selected. Hopefully non-mini asterisk content of sip.conf # won't be affected. @@ -44,9 +45,15 @@ while () { # at the moment (one VOIP line) #print "XX provider_new='$provider_new' '$1' '$2' '$3'\n"; - - # note fine /$user seems to be necessary so that incoming VOIP - # calls work. I really doin't get the syntax but messed around for + + # commentout register if "none" selected + + if ($user eq "none") { + print ";"; + } + + # note final /$user seems to be necessary so that incoming VOIP + # calls work. I really don't get the syntax but messed around for # hours until it worked! print "register => $user\@$user/$user; $3\n"; diff --git a/mini-asterisk-gui/cgi-bin/voiplines.sh b/mini-asterisk-gui/cgi-bin/voiplines.sh index 41039400..1e8c292d 100644 --- a/mini-asterisk-gui/cgi-bin/voiplines.sh +++ b/mini-asterisk-gui/cgi-bin/voiplines.sh @@ -58,7 +58,7 @@ perl ./voiplines.pl cat <  - Sometime it takes a few seconds to connect + Sometimes it takes a few seconds to connect your Voip Line. After clicking OK refresh your browser to update Voip Line status.