forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.2 KiB
54 lines
1.2 KiB
phpAMI 1.0 |
|
|
|
listCategories |
|
Envia "ManagerAction_ListCategories" |
|
|
|
Lista las categorias en un archivo de configuracion |
|
|
|
return: Array ( [Response] => Success [list] => Array ( [0] => general [1] => eltercera ) ) |
|
link: https://wiki.asterisk.org/wiki/display/AST/ManagerAction_ListCategories |
|
access: public |
|
array listCategories (string $file) |
|
string $file: Archivo |
|
|
|
-------------Interface AMI------------- |
|
Action: ListCategories |
|
Filename: sip.conf |
|
|
|
Response: Success |
|
Category-000000: general |
|
Category-000001: eltercera |
|
Category-000002: srodriguez |
|
Category-000003: ipphone |
|
Category-000004: astersik10 |
|
--------------------------------------- |
|
|
|
----------------Ejemplo---------------- |
|
include "phpAMI.php"; |
|
$ami=new phpAMI("admin","admin"); |
|
$login=$ami->login(); |
|
if($login["Response"]=="Success"){ |
|
print_r($ami->listCategories ("sip.conf")); |
|
$ami->logoff(); |
|
} |
|
--------------------------------------- |
|
|
|
----------Respuesta de phpAMI---------- |
|
|
|
Array |
|
( |
|
[Response] => Success |
|
[list] => Array |
|
( |
|
[0] => general |
|
[1] => eltercera |
|
) |
|
|
|
) |
|
si el archivo no existe responde: |
|
Array |
|
( |
|
[Response] => Error |
|
[Message] => Config file not found |
|
) |
|
---------------------------------------
|
|
|