bkruse: trunk r1074 - in /trunk: ./ config/ config/images/ configs/
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Wed Jun 13 13:55:34 MST 2007
Author: bkruse
Date: Wed Jun 13 15:55:34 2007
New Revision: 1074
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1074
Log:
Added initial support for bandwidth.com. Todo: Add rules for incoming and outgoing calls so that they obey and align accordingly to bandwidth.com's specifications. This inclues adding the + sign before dialing out, and stripping it off when coming in.
Added:
trunk/config/images/bandwidth.gif (with props)
Modified:
trunk/config/trunks.html
trunk/configs/providers.conf.sample
trunk/todo.txt
Added: trunk/config/images/bandwidth.gif
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/images/bandwidth.gif?view=auto&rev=1074
==============================================================================
Binary file - no diff available.
Propchange: trunk/config/images/bandwidth.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: trunk/config/trunks.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/trunks.html?view=diff&rev=1074&r1=1073&r2=1074
==============================================================================
--- trunk/config/trunks.html (original)
+++ trunk/config/trunks.html Wed Jun 13 15:55:34 2007
@@ -35,6 +35,7 @@
'name','new','port','provider','registeriax','registersip','save','secret','trunkname','trunkstyleanalog','trunkstylecustomvoip',
'trunkstylevoip','username','zapchan'];
var provfieldnames = ['providerdesc', 'providerlogo'];
+var opt_userandpass = ['voip_user', 'voip_pass', 'username', 'secret'];
var isnewtrunk;
var dids_array = [];
var old_trunkname;
@@ -486,6 +487,9 @@
}else if (_$('trunkstylevoip').checked) {
_$('voip').style.display = "";
_$('voip').style.height =350;
+ for(var x=0; x < opt_userandpass.length; x++) {
+ _$(opt_userandpass[x]).style.display = "none";
+ }
}else if (_$('trunkstylecustomvoip').checked) {
_$('customvoip').style.display = "" ;
}
@@ -493,6 +497,7 @@
function localajaxinit() {
ASTGUI.events.add(document, 'mouseover', show_tooltip);
+ ASTGUI.events.add(_$('provider'), 'click', showhidefields);
setWindowTitle("Service Providers");
_$('devices').contentEditable = 'false';
_$('zapchan').splitchar=',';
@@ -512,17 +517,34 @@
) ;
for (var x =0; x< fieldnames.length; x++) {
+ if(!_$(fieldnames[x])) {
+ alert(fieldnames[x] + " does not exists.");
+ }
widgets[fieldnames[x]] = _$(fieldnames[x]);
widgets[fieldnames[x]].disabled = true;
}
- for (var x =0; x < provfieldnames.length ; x++) {
+ for (var x =0; x < provfieldnames.length ; x++) {
provwidgets[provfieldnames[x]] = _$(provfieldnames[x]);
provwidgets[provfieldnames[x]].disabled = true;
}
-
+
+
parent.astmanEngine.config2list("zapscan.conf", _$('zapchan'), new Array(), phonecallbacks);
}
+function showhidefields() {
+ var provname = _$('provider').value;
+ if(provname == "bandwidth") {
+ for(var x=0; x < opt_userandpass.length; x++) {
+ _$(opt_userandpass[x]).style.display="none";
+ }
+ } else {
+ for(var x=0; x < opt_userandpass.length; x++) {
+ _$(opt_userandpass[x]).style.display = "";
+ }
+ }
+
+}
function loadServiceProvidersintotable(){
var _spt = _$('serviceproviderstable');
@@ -1016,10 +1038,10 @@
</tr>
<tr><td colspan='2' align='center'><A href="#" id="providerlink"><img id='providerlogo' style='visibility:hidden;' border=0></A></td></tr>
<tr><td colspan='2' align='center'><div id='providerdesc' align='left' style='width:230px;height:100px; font-size:10px'></div></td></tr>
- <tr> <td class="field_text" tip="en,trunks,3">Username:</td>
+ <tr> <td id='voip_user' class="field_text" tip="en,trunks,3">Username:</td>
<td><input size='20' id='username' class="input8"></td>
</tr>
- <tr> <td class="field_text" tip="en,trunks,4">Password:</td>
+ <tr> <td id='voip_pass' class="field_text" tip="en,trunks,4">Password:</td>
<td><input type="password" size='20' id='secret' class="input8"></td>
</tr>
</table>
Modified: trunk/configs/providers.conf.sample
URL: http://svn.digium.com/view/asterisk-gui/trunk/configs/providers.conf.sample?view=diff&rev=1074&r1=1073&r2=1074
==============================================================================
--- trunk/configs/providers.conf.sample (original)
+++ trunk/configs/providers.conf.sample Wed Jun 13 15:55:34 2007
@@ -10,3 +10,16 @@
host = iaxtel.com
;trunk_username = iaxtel ; if set - the trunk created by the GUI will be by this name instead of trunk_x
regurl = http://www.iaxtel.com ; URL to providers home/signup page
+
+[bandwidth]
+providername = Bandwidth
+providerlogo = images/bandwidth.gif
+protocol = sip
+providerdesc = Bandwidth.com's SIP (Session Initiation Protocol) Trunking solution, combined with an IP-PBX, enables organizations to save money by consolidating their voice and data over a single IP circuit -- maximizing its usage by utilizing unused bandwidth. Note: No username or password required. Bandwidth.com uses IP based Authentication.
+hasiax = no
+hassip = yes
+registeriax = no
+registersip = yes
+host = bandwidth.com
+;trunk_username = number
+regurl = http://bandwidth.com
Modified: trunk/todo.txt
URL: http://svn.digium.com/view/asterisk-gui/trunk/todo.txt?view=diff&rev=1074&r1=1073&r2=1074
==============================================================================
--- trunk/todo.txt (original)
+++ trunk/todo.txt Wed Jun 13 15:55:34 2007
@@ -34,6 +34,8 @@
* In addition to build_action, if you are updating an extension, be able to easily add application specific parameteres
+* Add full support for bandwidth.com through the service providers page
+
Completed
----------
@@ -48,3 +50,5 @@
* Option to redirect a timerule to a ringGroup
* Make the GUI resolution independent - request from BSD_tech
+
+* Initial support for Bandwidth.com
More information about the asterisk-gui-commits
mailing list