Changeset 8411

Show
Ignore:
Timestamp:
10/16/09 15:50:31 (2 years ago)
Author:
Maikel
Message:

Modifica el callerid para sip de los usuarios suscritos a un grupo de captura con el nombre del usuario (tal como se encuentra en la tabla users)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • contributed_modules/modules/capturegroups/functions.inc.php

    r8395 r8411  
    5858          $sql = "REPLACE INTO sip VALUES ($extension, 'pickupgroup', '$virtual_extension', 0)"; 
    5959          sql($sql); 
     60          $sql = "UPDATE sip set data=(SELECT name FROM users WHERE extension=$extension LIMIT 1) WHERE keyword='callerid' AND id='$extension' LIMIT 1"; 
     61          sql($sql); 
     62 
    6063          // creamos el hint para la extension, asi la podemos monitorear 
    6164          $hint = "SIP/". $extension . "&Custom:DND". $extension; 
  • contributed_modules/modules/capturegroups/install.php

    r8395 r8411  
    11<?php 
    22 
     3$sql = " 
     4CREATE TABLE IF NOT EXISTS `capturegroups_groups` ( 
     5  `capturegroups_groups_id` int(10) unsigned NOT NULL auto_increment, 
     6  `v_exten` smallint(5) unsigned NOT NULL, 
     7  `desc` varchar(20) NOT NULL, 
     8  PRIMARY KEY  (`capturegroups_groups_id`) 
     9) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=latin1; 
     10"; 
     11 
     12$check = $db->query($sql); 
     13 
     14if(DB::IsError($check)) { 
     15  die_freepbx("Can not create capturegroups_groups table"); 
     16} 
     17 
     18$sql = " 
     19CREATE TABLE IF NOT EXISTS  `capturegroups_extens` ( 
     20  `capturegroups_groups_id` int(10) unsigned NOT NULL, 
     21  `exten` varchar(20) NOT NULL 
     22) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
     23"; 
     24 
     25$check = $db->query($sql); 
     26 
     27if(DB::IsError($check)) { 
     28        die_freepbx("Can not create capturegroups_extens table"); 
     29} 
     30 
     31$sql = " 
     32CREATE TABLE IF NOT EXISTS `capturegroups_v_extens_free` ( 
     33  `v_exten` smallint(5) unsigned NOT NULL, 
     34  PRIMARY KEY  (`v_exten`) 
     35) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
     36"; 
     37 
     38$check = $db->query($sql); 
     39 
     40if(DB::IsError($check)) { 
     41        die_freepbx("Can not create capturegroups_v_extens_free table"); 
     42} 
    343?> 
  • contributed_modules/modules/capturegroups/install.sql

    r8395 r8411  
    1 CREATE TABLE IF NOT EXISTS `capturegroups_groups` ( 
    2   `capturegroups_groups_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 
    3   `v_exten` smallint(5) unsigned NOT NULL, 
    4   `desc` varchar(20) NOT NULL, 
    5   PRIMARY KEY (`capturegroups_groups_id`) 
    6 ) ENGINE=MyISAM AUTO_INCREMENT=1 ; 
    7  
    8 CREATE TABLE IF NOT EXISTS `capturegroups_extens` ( 
    9    `capturegroups_groups_id` int(10) unsigned NOT NULL, 
    10   `exten` varchar(20) NOT NULL 
    11 ) ENGINE=MyISAM AUTO_INCREMENT=1 ; 
    12  
    13  
    14  
  • contributed_modules/modules/capturegroups/module.xml

    r8395 r8411  
    22  <rawname>capturegroups</rawname> 
    33  <name>Capture Groups</name> 
    4   <version>0.2</version> 
     4  <version>0.3</version> 
    55  <changelog> 
    66    *0.1* Test New Module 
    77    *0.2* Se sale del grupo de captura apropiadamente, antes no se desuscribia. Busqueda de extensiones. Grupos y extensiones virtuales son ahora automaticos 
     8    *0.3* Modifica el callerid para sip de los usuarios suscritos a un grupo de captura con el nombre del usuario (tal como se encuentra en la tabla users) 
    89  </changelog> 
    910  <type>setup</type> 
    1011  <category>Inbound Call Control</category> 
    1112  <description> 
    12     This module allow the administrator to quickly create and administrate 
    13 capture groups. It will configure every extension's capturegroup and 
    14 pickupgroup automatically. 
     13    Capture Groups Module - Allows for extensions to subscribe to a context that will let them know when other phones in that context are ringing and makes it possible to capture the calls 
    1514  </description> 
    1615  <menuitems> 
  • contributed_modules/modules/capturegroups/uninstall.php

    r8395 r8411  
    1515} 
    1616 
     17$sql = " 
     18DROP TABLE `capturegroups_extens`; 
     19"; 
     20 
     21$check = $db->query($sql); 
     22 
     23if(DB::IsError($check)) { 
     24        die_freepbx("Cannot drop capturegroups_extens table"); 
     25} 
     26 
     27$sql = " 
     28DROP TABLE `capturegroups_groups`; 
     29"; 
     30 
     31$check = $db->query($sql); 
     32 
     33if(DB::IsError($check)) { 
     34        die_freepbx("Cannot drop capturegroups_groups table"); 
     35} 
     36 
     37$sql = " 
     38DROP TABLE `capturegroups_v_extens_free`; 
     39"; 
     40 
     41$check = $db->query($sql); 
     42 
     43if(DB::IsError($check)) { 
     44        die_freepbx("Cannot drop capturegroups_v_extens_free table"); 
     45} 
    1746?> 
  • contributed_modules/modules/capturegroups/uninstall.sql

    r8395 r8411  
    1 DROP TABLE `capturegroups_extens`; 
    2 DROP TABLE `capturegroups_groups`;