Askozia Forums
May 21, 2012, 08:45:43 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: r403 Duplicate SIP Extensions  (Read 556 times)
devon
Guest
« on: February 10, 2008, 08:38:27 pm »

r403 allows creation of duplicate sip extensions. After looking through /usr/local/www/phones_sip_edit.php I can see that it looks for a match in an array built by function 'pbx_get_extensions' in /etc/inc/pbx.inc which calls function 'sip_get_extensions' in /etc/inc/sip.inc. Should the strings highlighted below in red be 'phone' instead of 'phones'?


/**
 * Returns an array of all assigned phone extensions
 */
function sip_get_extensions() {
   global $config;
   
   $extensions = array();

   if (is_array($config['sip']['phones'])) {
      foreach($config['sip']['phones'] as $phone) {
         $extensions[] = $phone['extension'];
      }
   }

   return $extensions;
}

Logged
Michael
Askozia Staff
Hero Member
*

Karma: 49
Posts: 1020


View Profile
« Reply #1 on: February 11, 2008, 12:56:16 pm »

Nice find, thanks! All of the phones' extensions were being gathered incorrectly (stupid copy and paste). I've changed them for the next image. Some work is still needed to properly check for duplicate extensions system-wide.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.052 seconds with 19 queries.