pari: branch 2.0 r3701 - /branches/2.0/config/status.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Sat Aug 23 20:52:55 CDT 2008
Author: pari
Date: Sat Aug 23 20:52:54 2008
New Revision: 3701
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3701
Log:
Get the 'APP Name' from the config file
Nice idea brandon, its working great !
Modified:
branches/2.0/config/status.html
Modified: branches/2.0/config/status.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/status.html?view=diff&rev=3701&r1=3700&r2=3701
==============================================================================
--- branches/2.0/config/status.html (original)
+++ branches/2.0/config/status.html Sat Aug 23 20:52:54 2008
@@ -185,9 +185,16 @@
tmp_a[0] = "<span class='guiButton' onclick=\"show_Edit_ChannelDirection('" + chan.Channel +"')\">Transfer</span> " ;
tmp_a[1] = "<span class='guiButton' onclick=\"show_Edit_ChannelHangup('" + chan.Channel +"')\">Hangup</span> " ;
- var tmp_app = 'PlaceHolder AppName'; // We need to figure out how to get the app name
- // one suggestion by bkruse is that we can lookup in extensions.conf using 'chan.Extension, chan.Context, chan.Priority'
-
+ var tmp_app = '';
+
+ var tmp_dialplan_context = context2json({ filename:'extensions.conf' , context : chan.Context , usf: 0 });
+ if( ASTGUI.isArray( tmp_dialplan_context ) ){
+ var tmp_dialplan_lineIndex = tmp_dialplan_context.indexOfLike('exten='+ chan.Extension + ',' + chan.Priority +',');
+ if(tmp_dialplan_lineIndex != -1){
+ var tmp_dialplan_line = tmp_dialplan_context[tmp_dialplan_lineIndex];
+ tmp_app = ASTGUI.parseContextLine.getAppWithArgs(tmp_dialplan_line);
+ }
+ }
addCell( newRow , { html: '<i>' + tmp_app + '</i>' });
addCell( newRow , { html: tmp_a[0] , align:'center' });
addCell( newRow , { html: tmp_a[1] , align:'center' });
More information about the asterisk-gui-commits
mailing list