From: horse69 Date: Sat, 27 Oct 2012 23:54:19 +0000 (+0000) Subject: git-svn-id: https://svn.code.sf.net/p/freetel/code@844 01035d8c-6547-0410-b346-abe4f9... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=36be80a4a2007323a9b7ff86a829d1e1b1c3dadc;p=freetel-svn-tracking.git git-svn-id: https://svn.code.sf.net/p/freetel/code@844 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/mini-asterisk-gui2/voiplines.js b/mini-asterisk-gui2/voiplines.js index 3ea29f84..b5d88463 100644 --- a/mini-asterisk-gui2/voiplines.js +++ b/mini-asterisk-gui2/voiplines.js @@ -21,30 +21,36 @@ function initialise() { function initialisePage() { // - /* var icon = 'Analog Phone OK'; + var tickicon = 'Provider OK'; + var crossicon = 'No provider found'; var html = ''; + var providerfound = 0; + + // Check if provider is up + // asterisk sip register + + if (providerfound == 1) { + html += tickicon; + } else { + html += crossicon; + } - html += ''; - - // print out info - - html += ''; - html += ''; - html += ''; - // this image will only come up if internet connection is present - html += ''; - html += ''; - - html += '

Voip Lines

Mini Asterisk GUI2 Revision XXX
Brought to you by the Free Telephony Project
 
'; + document.getElementById("voiplinestatus").innerHTML = html; - // document.getElementById("voiplines").innerHTML += html; -*/ } function onClickApply() { -//take username, password and host. Insert to file. Restart sip. +//take provider, username, password and host. + +// Save old sip.conf +// Make new sip.conf with provider uncommented + +// Modify extensions.conf for new provider +// asterisk dialplan reload + +// asterisk sip reload } @@ -64,20 +70,20 @@ function changeProvider() { document.getElementById('info').textContent = "No provider selected"; } else if (selection == "SIPNAT" ) { // fill sipnat - document.getElementById('user').value = "sipnat"; - document.getElementById('host').value = "sipnathost"; + document.getElementById('user').value = "user"; + document.getElementById('host').value = "192.168.1.28"; document.getElementById('pass').value = "xxxxxx"; - document.getElementById('info').textContent = "You reach your ITSP via a NAT router ...most common"; + document.getElementById('info').textContent = "You reach your ITSP via a NAT router ...the most common setup"; } else if (selection == "SIP" ) { // fill sip - document.getElementById('user').value = "sip"; - document.getElementById('host').value = "siphost"; + document.getElementById('user').value = "user"; + document.getElementById('host').value = "192.168.1.28"; document.getElementById('pass').value = "xxxxxx"; document.getElementById('info').textContent = "No NAT router between your Phone system and your ITSP"; } else if (selection == "JAZMIN" ) { // fill jazmin - document.getElementById('user').value = "jazmin"; - document.getElementById('host').value = "jazminhost"; + document.getElementById('user').value = "username"; + document.getElementById('host').value = "sip.jazmin.net.au"; document.getElementById('pass').value = "xxxxxx"; document.getElementById('info').textContent = "Jazmin are a South Australian ITSP"; } else {