|
Revision 8411, 0.8 kB
(checked in by Maikel, 3 years ago)
|
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)
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
global $db; |
|---|
| 5 |
$sql = "SELECT capturegroups_groups_id AS id FROM capturegroups_groups AS g"; |
|---|
| 6 |
$results = $db->getAll($sql, array(), DB_FETCHMODE_ASSOC); |
|---|
| 7 |
if(DB::IsError($results)) { |
|---|
| 8 |
$results = null; |
|---|
| 9 |
} |
|---|
| 10 |
|
|---|
| 11 |
// unsubscribe all capturegroups |
|---|
| 12 |
foreach ($results as $row) |
|---|
| 13 |
{ |
|---|
| 14 |
capturegroups_unsubscribe($row["id"]); |
|---|
| 15 |
} |
|---|
| 16 |
|
|---|
| 17 |
$sql = " |
|---|
| 18 |
DROP TABLE `capturegroups_extens`; |
|---|
| 19 |
"; |
|---|
| 20 |
|
|---|
| 21 |
$check = $db->query($sql); |
|---|
| 22 |
|
|---|
| 23 |
if(DB::IsError($check)) { |
|---|
| 24 |
die_freepbx("Cannot drop capturegroups_extens table"); |
|---|
| 25 |
} |
|---|
| 26 |
|
|---|
| 27 |
$sql = " |
|---|
| 28 |
DROP TABLE `capturegroups_groups`; |
|---|
| 29 |
"; |
|---|
| 30 |
|
|---|
| 31 |
$check = $db->query($sql); |
|---|
| 32 |
|
|---|
| 33 |
if(DB::IsError($check)) { |
|---|
| 34 |
die_freepbx("Cannot drop capturegroups_groups table"); |
|---|
| 35 |
} |
|---|
| 36 |
|
|---|
| 37 |
$sql = " |
|---|
| 38 |
DROP TABLE `capturegroups_v_extens_free`; |
|---|
| 39 |
"; |
|---|
| 40 |
|
|---|
| 41 |
$check = $db->query($sql); |
|---|
| 42 |
|
|---|
| 43 |
if(DB::IsError($check)) { |
|---|
| 44 |
die_freepbx("Cannot drop capturegroups_v_extens_free table"); |
|---|
| 45 |
} |
|---|
| 46 |
?> |
|---|