From: horse69 Date: Thu, 30 Aug 2012 06:46:16 +0000 (+0000) Subject: git-svn-id: https://svn.code.sf.net/p/freetel/code@649 01035d8c-6547-0410-b346-abe4f9... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=f35aa3206ec1552c6d7df2d7b94c4d28adac15f6;p=freetel-svn-tracking.git git-svn-id: https://svn.code.sf.net/p/freetel/code@649 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/mini-asterisk-gui2/minicommon.js b/mini-asterisk-gui2/minicommon.js index ccaa53f0..ff83c87c 100644 --- a/mini-asterisk-gui2/minicommon.js +++ b/mini-asterisk-gui2/minicommon.js @@ -20,6 +20,8 @@ var ip_ext = []; var network = "no"; +// incomming calls are routed to these extensions + var reception = ["6002"]; function loadExtensions() { @@ -128,6 +130,26 @@ function loadExtensionsConf(doc,status) { ip_ext[ext] = ""; } } + + // Save the reception numbers if they exist + // Should match one line only + // exten => s,1,Dial(Zap/4&SIP/6011) ;; mini-asterisk - don't remove this comment + + if(line.indexOf("exten => s,1,Dial") != -1) { + // for each Zap/ read in a single digit and convert to extension + ret = line.indexOf("Zap/"); + i=0; + if (ret != -1) + reception [i++] = analog_ext[line.substr(ret+4,1)]; + + // for each SIP/ read in four digits + ret = line.indexOf("SIP/"); +// for( x in ret ) + if (ret != -1) + reception [i++] = line.substr(ret+4,4); + + + } } );