Show
Ignore:
Timestamp:
05/29/09 14:01:54 (3 years ago)
Author:
seanmh
Message:

1.0.0 Added backward compatibility support for 2.0 rev 1104.

Fixed bug in which a flawed context would prevent orphaned parked calls from ringing back to the parking extension if parked via the panel.
Made debug menu always visible.
Added server debug menu.
Debug logs now show on main module page.
Multiple debug options can now be set at once.
Added database column checks in installation script to handle module upgrades.
Added default FreePBX page context to configuration.
Added admin username and password fields to the main module page.
Added originate timeout field to main module page.
Added auto reload and enable page status checkboxes to main module page.
Added global Jabber connection configuration fields on main module page.
Added email and cell phone fields to extension page.
Added Jabber connection configuration override fields to extension page.
Added Jabber username and password fields to extension page.
Added auto answer checkbox to extension page.
Modified database debug tables to account for new tables and columns.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • contributed_modules/modules/isymphony/isymphony-php-library/isymphony.php

    r6438 r7772  
    44 *Author       : Michael Yara 
    55 *Created      : June 15, 2008 
    6  *Last Updated : August 22, 2008 
    7  *History      : 0.2  
     6 *Last Updated : May 27, 2009 
     7 *History      : 0.4  
    88 *Purpose      : Contains all functions used to interact with the iSymphony configuration. 
    99 *Copyright    : 2008 HEHE Enterprises, LLC 
     
    2828$ISERROR = ""; 
    2929 
     30//Tracker variables for improved running time 
     31$IN_LOCATION = false; 
     32$IN_TENNAT = false; 
     33 
    3034//Connection methods------------------------------------------------------------------------------- 
    3135/*############################################### 
     
    4347  if(($SOCKET = socket_create(AF_INET, SOCK_STREAM, 0)) && (socket_connect($SOCKET, $HOST, $PORT))) {    
    4448     
    45     //Check version to modify property arrays if necessary 
    46     //Modify for 2.1     
    47     if((($versionResult = getiSymphonyServerVersion()) !== false) && (strstr($versionResult, "2.1") !== false)) { 
    48       isymphony_modify_property_arrays_2_1(); 
     49    //Check version and revision number to modify property arrays if necessary 
     50    if((($versionResult = getiSymphonyServerVersion()) !== false) && (($revisionResult = getiSymphonyServerRevision()) !== false)) { 
     51       
     52      //Modify for 2.1 
     53      if((strstr($versionResult, "2.1") !== false)) { 
     54         
     55        //Modify for rev 1493 and above 
     56        if($revisionResult >= 1493) { 
     57          isymphony_modify_property_arrays_2_1_1493(); 
     58         
     59        //Modify for rev 1489 through 1493 
     60        } else if($revisionResult >= 1489) { 
     61          isymphony_modify_property_arrays_2_1_1489(); 
     62           
     63        //Modify for post rev 1489   
     64        } else { 
     65          isymphony_modify_property_arrays_2_1(); 
     66        } 
     67      } 
    4968    } 
    50  
    5169    return true; 
    5270  } else { 
     
    6381function iSymphonyDisconnect() { 
    6482   
    65   global $SOCKET; 
     83  global $SOCKET, $IN_LOCATION, $IN_TENNAT; 
     84   
     85  $IN_LOCATION = false; 
     86  $IN_TENNAT = false; 
    6687   
    6788  if(($SOCKET !== null) && ($SOCKET)) { 
     
    19341955 
    19351956/*############################################### 
     1957 * Gets the server revision 
     1958 * Takes: nothing 
     1959 * Returns: server revision if successful or false if error occurred   
     1960 */  
     1961function getiSymphonyServerRevision() { 
     1962   
     1963  if(($serverVersion = getiSymphonyServerVersion()) === false) { 
     1964    return false; 
     1965  } 
     1966   
     1967  //Parse our server revision number from server version 
     1968  $serverRevison = ereg_replace("[^0-9]+", '', substr($serverVersion, strpos($serverVersion, "rev"))); 
     1969   
     1970  //If revision number is not numeric something went wrong in the parsing. If so return false. 
     1971  if(!is_numeric($serverRevison)) { 
     1972    $ISERROR = "Error: Parsed server version was non numeric."; 
     1973    return false; 
     1974  } 
     1975   
     1976  return $serverRevison; 
     1977} 
     1978 
     1979/*############################################### 
    19361980 * Shutdown the iSymphony server 
    19371981 * Takes: nothing 
  • contributed_modules/modules/isymphony/isymphony-php-library/library/classes.php

    r6438 r7772  
    44 *Author       : Michael Yara 
    55 *Created      : June 15, 2008 
    6  *Last Updated : August 22, 2008 
    7  *History      : 0.4 
     6 *Last Updated : May 27, 2009 
     7 *History      : 0.5 
    88 *Purpose      : Contains declarations of all property classes.  
    99 *Copyright    : 2008 HEHE Enterprises, LLC 
     
    6363 *    asterisk_password: Asterisk manager password(STRING) 
    6464 *    originate_timeout: Amount of time an originator will be rung on an origination event in milliseconds(INTEGER) 
     65 *    reload_on_dial_plan_reload: Flag used to reload this location when the dial plan reloads(BOOLEAN[true or false]) 
    6566 *    jabber_host: Jabber host name(STRING) 
     67 *    jabber_domain: Jabber domain name(STRING) 
     68 *    jabber_resource: Jabber resource name(STRING) 
    6669 *    jabber_port: Jabber port(INTEGER) 
    6770 *    device_user_mode: (BOOLEAN[true or false]) 
     
    8790  var $asterisk_login = ""; 
    8891  var $asterisk_password = ""; 
    89   var $originate_timeout = ""; 
     92  var $reload_on_dial_plan_reload = ""; 
    9093  var $jabber_host = ""; 
     94  var $jabber_domain = ""; 
     95  var $jabber_resource = ""; 
    9196  var $jabber_port = ""; 
    9297  var $device_user_mode = ""; 
     
    167172 *    record_file_extension: File extensions used for recorded calls(STRING) 
    168173 *    mix_mode: Flag used to mix incoming and outgoing recorded call channels(BOOLEAN[true or false]) 
     174 *    page_status_enabled: Flag used to enable page status(BOOLEAN[true or false]) 
     175 *    page_context: Page context used to suppress paging status(STRING) 
    169176 * 
    170177 * Methods: 
     
    192199  var $record_file_extension = ""; 
    193200  var $mix_mode = ""; 
     201  var $page_status_enabled = ""; 
     202  var $page_context = ""; 
    194203   
    195204  //Methods 
     
    268277  *   voice_mail: Voice mail box number of this extension(STRING) 
    269278  *   agent: Agent number associated with this extension(STRING) 
     279  *   auto_answer: Flag used to indicate if origination call back should be auto answered. 
    270280  * 
    271281  * Methods: 
     
    293303  var $voice_mail = ""; 
    294304  var $agent = ""; 
     305  var $auto_answer = ""; 
    295306   
    296307  //Methods 
     
    326337     
    327338    global $extensionPropertyArray; 
    328      
     339          
    329340    //Move to tenant mode 
    330341    if(!moveToTenant($location, $tenant)) { 
     
    364375  *   name: Username for profile(STRING) 
    365376  *   password: Password for profile(STRING) 
     377  *   jabber_host: Jabber host name(STRING) 
     378  *   jabber_domain: Jabber domain name(STRING) 
     379  *   jabber_resource: Jabber resource name(STRING) 
     380  *   jabber_port: Jabber port(INTEGER) 
    366381  *   jabber_user_name: Jabber username(STRING) 
    367382  *   jabber_password: Jabber password(STRING) 
     
    386401  var $name = ""; 
    387402  var $password = ""; 
     403  var $jabber_host = ""; 
     404  var $jabber_domain = ""; 
     405  var $jabber_resource = ""; 
     406  var $jabber_port = "";   
    388407  var $jabber_user_name = ""; 
    389408  var $jabber_password = ""; 
  • contributed_modules/modules/isymphony/isymphony-php-library/library/helper.php

    r5878 r7772  
    44 *Author       : Michael Yara 
    55 *Created      : June 15, 2008 
    6  *Last Updated : June 18, 2008 
    7  *History      : 0.1 Beta   
     6 *Last Updated : January 27, 2009 
     7 *History      : 0.2 Beta   
    88 *Purpose      : Contains utility functions used by the library.  
    99 *Copyright    : 2008 HEHE Enterprises, LLC 
     
    154154} 
    155155 
     156/*############################################### 
     157 * Removes an element from an array by value 
     158 * Takes: an array and the element to be removed 
     159 * Returns: and new re-orderd array without the removed element 
     160 */ 
     161function remove_element($arr, $val){ 
     162  foreach ($arr as $key => $value){ 
     163    if ($arr[$key] == $val){ 
     164      unset($arr[$key]); 
     165    } 
     166  } 
     167  return $arr = array_values($arr); 
     168} 
    156169 
    157170?> 
  • contributed_modules/modules/isymphony/isymphony-php-library/library/navigation.php

    r5878 r7772  
    44 *Author       : Michael Yara 
    55 *Created      : June 15, 2008 
    6  *Last Updated : June 18, 2008 
    7  *History      : 0.1 Beta   
     6 *Last Updated : May 7, 2009 
     7 *History      : 0.2 Beta   
    88 *Purpose      : Contains functions used to navigate through different modes of the CLI.  
    99 *Copyright    : 2008 HEHE Enterprises, LLC 
    1010 */ 
     11 
    1112 
    1213/*############################################### 
     
    2728 */ 
    2829function moveToLocation($location) { 
    29    
    30   //Move to server 
    31   if(!moveToServer()) { 
    32     return false; 
    33   }  
     30  global $IN_LOCATION;   
    3431     
    3532  //Move to location 
    36   return checkAndSetErrorNone("location $location"); 
     33  $moved = checkAndSetErrorNone("location $location"); 
     34  $IN_LOCATION = $moved; 
     35  return $moved; 
    3736} 
    3837 
     
    4342 */ 
    4443function moveToTenant($location, $tenant) { 
     44  global $IN_LOCATION, $IN_TENANT; 
    4545   
    4646  //Move to location 
    47   if(!moveToLocation($location)) { 
    48     return false; 
    49   } 
    50    
    51   //Move to tenant 
    52   return checkAndSetErrorNone("tenant $tenant"); 
     47  if(!$IN_LOCATION) { 
     48    if(!moveToLocation($location)) { 
     49      return false; 
     50    } 
     51  } 
     52   
     53  //Move to tenant 
     54  $moved = checkAndSetErrorNone("tenant $tenant"); 
     55  $IN_TENANT = $moved; 
     56  return $moved; 
    5357} 
    5458 
     
    5963 */ 
    6064function moveToExtension($location, $tenant, $extension) { 
    61    
    62   //Move to tenant 
    63   if(!moveToTenant($location, $tenant)) { 
    64     return false; 
     65  global $IN_TENANT; 
     66   
     67  //Move to tenant 
     68  if(!$IN_TENANT) { 
     69    if(!moveToTenant($location, $tenant)) { 
     70      return false; 
     71    } 
    6572  } 
    6673   
     
    7582 */ 
    7683function moveToProfile($location, $tenant, $profile) { 
    77    
    78   //Move to tenant 
    79   if(!moveToTenant($location, $tenant)) { 
    80     return false; 
     84  global $IN_TENANT; 
     85   
     86  //Move to tenant 
     87  if(!$IN_TENANT) { 
     88    if(!moveToTenant($location, $tenant)) { 
     89      return false; 
     90    } 
    8191  } 
    8292   
     
    91101 */ 
    92102function moveToQueue($location, $tenant, $queue) { 
    93    
    94   //Move to tenant 
    95   if(!moveToTenant($location, $tenant)) { 
    96     return false; 
     103  global $IN_TENANT; 
     104   
     105  //Move to tenant 
     106  if(!$IN_TENANT) { 
     107    if(!moveToTenant($location, $tenant)) { 
     108      return false; 
     109    } 
    97110  } 
    98111   
     
    107120 */ 
    108121function moveToConferenceRoom($location, $tenant, $room) { 
    109    
    110   //Move to tenant 
    111   if(!moveToTenant($location, $tenant)) { 
    112     return false; 
     122  global $IN_TENANT; 
     123   
     124  //Move to tenant 
     125  if(!$IN_TENANT) { 
     126    if(!moveToTenant($location, $tenant)) { 
     127      return false; 
     128    } 
    113129  } 
    114130   
  • contributed_modules/modules/isymphony/isymphony-php-library/library/property_arrays.php

    r6438 r7772  
    44 *Author       : Michael Yara 
    55 *Created      : June 15, 2008 
    6  *Last Updated : August 22, 2008 
    7  *History      : 0.3  
     6 *Last Updated : May 27, 2009 
     7 *History      : 0.5 
    88 *Purpose      : Contains arrays witch describe all configuration object property names along with functions to modify 
    99 *         the arrays for specific versions of the server.  
     
    2626$conferenceRoomPermissionPropertyArray = array("steal_call","transfer_to","originate_to","mute_users","kick_users"); 
    2727 
     28//Property array modification functions-------------------------------------------------------------------------------------------------------------- 
     29function isymphony_modify_property_arrays_2_1() { 
     30  global $locationPropertyArray, $extensionPropertyArray, $tenantPropertyArray; 
     31   
     32  //New modifications 
     33  array_push($locationPropertyArray, "device_user_mode"); 
     34   
     35  array_push($tenantPropertyArray, "page_status_enabled"); 
     36  array_push($tenantPropertyArray, "page_context"); 
     37   
     38  $extensionPropertyArray = remove_element($extensionPropertyArray, "agent"); 
     39} 
    2840 
    29 function isymphony_modify_property_arrays_2_1() { 
    30   global $locationPropertyArray; 
    31   array_push($locationPropertyArray, "device_user_mode"); 
     41function isymphony_modify_property_arrays_2_1_1489() { 
     42  global $locationPropertyArray, $extensionPropertyArray, $tenantPropertyArray, $profilePropertyArray; 
     43   
     44  //Apply 2.1 modifications 
     45  isymphony_modify_property_arrays_2_1(); 
     46   
     47  //New modifications 
     48  array_push($locationPropertyArray, "reload_on_dial_plan_reload"); 
     49  array_push($locationPropertyArray, "jabber_domain"); 
     50  array_push($locationPropertyArray, "jabber_resource"); 
     51   
     52  array_push($profilePropertyArray, "jabber_host"); 
     53  array_push($profilePropertyArray, "jabber_domain"); 
     54  array_push($profilePropertyArray, "jabber_resource"); 
     55  array_push($profilePropertyArray, "jabber_port"); 
     56
     57 
     58function isymphony_modify_property_arrays_2_1_1493() { 
     59  global $locationPropertyArray, $extensionPropertyArray, $tenantPropertyArray, $profilePropertyArray; 
     60   
     61  //Apply 2.1 1489 modifications 
     62  isymphony_modify_property_arrays_2_1_1489(); 
     63   
     64  //New modifications 
     65  array_push($extensionPropertyArray, "auto_answer"); 
    3266} 
    3367?>