progressing multiple IP issue, IP0X solution working OK
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 11 Feb 2010 00:28:45 +0000 (00:28 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 11 Feb 2010 00:28:45 +0000 (00:28 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@152 01035d8c-6547-0410-b346-abe4f91aad63

mini-asterisk-gui/README.txt
mini-asterisk-gui/cgi-bin/ipphones.sh
mini-asterisk-gui/cgi-bin/phones.sh
mini-asterisk-gui/cgi-bin/voiplines.pl
mini-asterisk-gui/etc/asterisk/sip.conf

index 2593a17cbb01fca71cfa2e26cce611836fa592d2..b0b988a7f7074e281318807efdd6913e0198546c 100644 (file)
@@ -146,6 +146,9 @@ The msh shell on the IP0X is fairly basic (no functions, several
 quirks).  The shell script has been coded so that it runs OK on the
 IP0X, which is upwards compatable to x86.
 
+You can customise Mini Asterisk by adding your own banner to in
+banner.html.
+
 [[install]]
 Installation
 ------------
@@ -272,11 +275,13 @@ cgi.assign = ( ".sh" => "/bin/sh",".pl" => "/usr/bin/perl" )
 Contributions
 -------------
 
-I especially welcome sip.conf entries for your favourite ITSP (VOIP
+I especially welcome sip.conf entries for your favourite ITSP (VOIP
 service) to help populate the Provider field of the
 link:mini/voiplines.sh.html[Voip Line Screen].
 
-Suggestions and patches for new features are also very welcome.
+. Suggestions and patches for new features are also very welcome.
+
+. Help making the web pages look nicer.
 
 [[support]]
 Support
index eef2102382433d949db1583052bfa50b2c16f1c3..69d3b03d28ee88a642c7b92c0db7cc6b6885a75b 100644 (file)
@@ -16,7 +16,19 @@ if [ $? -eq 1 ]; then
 fi
 
 more=`echo "$QUERY_STRING" | grep -oe "more=[^&?]*" | sed -n "s/more=//p"`
-ipaddress=`ifconfig | sed -n 's/.*inet addr:\(.*\)  Bcast.*/\1/p' | head -n 1`
+
+# Build list of interface IPs based on what sort of machine we are
+# running on.  For IP0X we just print the IP of the first interface.
+# For other machines the situation is a bit more complex so we print
+# all of them.  I figure anyone with multiple interfaces will know
+# enough about what they are doing to figure out the right one to use.
+
+ipaddress=`ifconfig | sed -n 's/.*inet addr:\(.*\)  Bcast.*/\1/p'`
+
+cat /proc/cpuinfo | grep "CPU:.*ADSP" > /dev/null
+if [ $? -eq 0 ]; then
+    ipaddress=`echo $ipaddress | awk '{ print $1 }'`
+fi
 
 # Construct the web page -------------------------------
 
index 8439124dc5642e93d06b5641d9a7116ee0ff39ce..03a526d25583e3c4e39e11b1b96216a7eb3e0c43 100644 (file)
@@ -27,7 +27,18 @@ if [ $dns_packet_loss = "0" ]; then
   fi
 fi
 
-ipaddress=`ifconfig | sed -n 's/.*inet addr:\(.*\)  Bcast.*/\1/p' | head -n 1`
+# Build list of interface IPs based on what sort of machine we are
+# running on.  For IP0X we just print the IP of the first interface.
+# For other machines the situation is a bit more complex so we print
+# all of them.  I figure anyone with multiple interfaces will know
+# enough about what they are doing to figure out the right one to use.
+
+ipaddress=`ifconfig | sed -n 's/.*inet addr:\(.*\)  Bcast.*/\1/p'`
+
+cat /proc/cpuinfo | grep "CPU:.*ADSP" > /dev/null
+if [ $? -eq 0 ]; then
+    ipaddress=`echo $ipaddress |  awk '{ print $1 }'`
+fi
 
 # Construct the web page -------------------------------
 
index 96166c65d668ee2d9d5c9b16fc99a921be3bb029..7f21ae434970240ff48c4cabb63102ed7d8c46ab 100644 (file)
@@ -97,7 +97,7 @@ foreach (@providers) {
     print "hosts[\'$_\'] = \'$host{$_}\';\n";
     print "users[\'$_\'] = \'$user{$_}\';\n";
     print "passwords[\'$_\'] = \'$pass{$_}\';\n";
-    print "comments[\'$_\'] = \"$comment{$_}\";\n";
+    print "comments[\'$_\'] = \'$comment{$_}\';\n";
 }
 print "</script>\n";
 
index 733d1c817f0c1304ab53fd4a51adba77c468991d..7981f9ca655c6fd26b7c0ec4a809fa5e50f35e55 100644 (file)
@@ -605,20 +605,20 @@ qualify=yes
 ;allow=ulaw,alaw
 ;qualify=yes
 
-;[user] ; "OEG" mini-asterisk do not remove this comment
-;; OEG are a South Australian ITSP
-;host=voip.oeg.com.au
-;secret=pass
-;username=your user number
-;fromdomain=voip.oeg.com.au
-;fromuser=your user number
-;insecure=port,invite
-;type=friend
-;disallow=all
-;allow=ulaw,alaw
-;dtmfmod=rfc2833
-;qualify=yes
-;canreinvite=no
+;[user] ; "Jazmin" mini-asterisk do not remove this comment
+;; <a href="http://www.jazmin.com.au/">Jazmin</a> are a South Australian ITSP
+;host=sip.jazmin.net.au     
+;secret=<Password>                      
+;username=<username>                                                      
+;fromdomain=sip.jazmin.net.au                                         
+;fromuser=<username>                                                     
+;insecure=port,invite     
+;type=friend                                         
+;disallow=all             
+;allow=ulaw               
+;allow=alaw               
+;dtmfmod=rfc2833                                                    
+;qualify=yes                                                   
+;canreinvite=no                                                     
 ;nat=yes
-;context=default