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.
45 lines
1.1 KiB
45 lines
1.1 KiB
phpAMI 1.0 |
|
|
|
queuePenalty |
|
Envia "ManagerAction_QueuePenalty" |
|
|
|
return: ver eventSimple() |
|
link: https://wiki.asterisk.org/wiki/display/AST/ManagerAction_QueuePenalty |
|
array queuePenalty (string $interface, string $penalty, [string $queue = null]) |
|
string $interface: Interface (SIP/testphone,DAHDI/1...) |
|
string $penalty: Prioridad de la interface |
|
string $queue: Cola |
|
|
|
-------------Interface AMI------------- |
|
Action: QueuePenalty |
|
Interface: sip/ipphone |
|
Penalty: 2 |
|
|
|
Response: Success |
|
Message: Interface penalty set successfully |
|
--------------------------------------- |
|
|
|
----------------Ejemplo---------------- |
|
include "phpAMI.php"; |
|
$ami=new phpAMI("admin","admin"); |
|
$login=$ami->login(); |
|
if($login["Response"]=="Success"){ |
|
print_r($ami->queuePenalty ("sip/ipphone","3")); |
|
$ami->logoff(); |
|
} |
|
--------------------------------------- |
|
|
|
----------Respuesta de phpAMI---------- |
|
Array |
|
( |
|
[Response] => Success |
|
[Message] => Interface penalty set successfully |
|
) |
|
Si hay un error: |
|
|
|
Array |
|
( |
|
[Response] => Error |
|
[Message] => Invalid interface, queuename or penalty |
|
) |
|
---------------------------------------
|
|
|