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.
146 lines
3.4 KiB
146 lines
3.4 KiB
phpAMI 1.0 |
|
|
|
dahdiShowChannels |
|
Envia "ManagerAction_DAHDIShowChannels" |
|
|
|
obtiene el estado de canales DAHDI |
|
|
|
return: Ver listEvent() |
|
link: https://wiki.asterisk.org/wiki/display/AST/ManagerAction_DAHDIShowChannels |
|
access: public |
|
array dahdiShowChannels ([string $channel = null]) |
|
string $channel: canal DAHDI (default: todos) |
|
|
|
-------------Interface AMI------------- |
|
Response: Success |
|
Message: DAHDI channel status will follow |
|
|
|
Event: DAHDIShowChannels |
|
DAHDIChannel: 1 |
|
Channel: DAHDI/1-1 |
|
Uniqueid: 1330124751.77 |
|
AccountCode: |
|
Signalling: FXS Kewlstart |
|
SignallingCode: 8196 |
|
Context: movistar-in |
|
DND: Disabled |
|
Alarm: No Alarm |
|
|
|
Event: DAHDIShowChannels |
|
DAHDIChannel: 2 |
|
Channel: DAHDI/2-1 |
|
Uniqueid: 1330124739.76 |
|
AccountCode: |
|
Signalling: FXO Kewlstart |
|
SignallingCode: 4128 |
|
Context: home |
|
DND: Disabled |
|
Alarm: No Alarm |
|
|
|
Event: DAHDIShowChannels |
|
DAHDIChannel: 3 |
|
Signalling: FXS Kewlstart |
|
SignallingCode: 8196 |
|
Context: cantv-in |
|
DND: Disabled |
|
Alarm: No Alarm |
|
|
|
Event: DAHDIShowChannels |
|
DAHDIChannel: 4 |
|
Signalling: FXO Kewlstart |
|
SignallingCode: 4128 |
|
Context: cantv-in |
|
DND: Disabled |
|
Alarm: No Alarm |
|
|
|
Event: DAHDIShowChannelsComplete |
|
Items: 4 |
|
--------------------------------------- |
|
|
|
----------------Ejemplo---------------- |
|
include "phpAMI.php"; |
|
$ami=new phpAMI("admin","admin"); |
|
$login=$ami->login(); |
|
if($login["Response"]=="Success"){ |
|
print_r($ami->dahdiShowChannels()); |
|
$ami->logoff(); |
|
} |
|
--------------------------------------- |
|
|
|
----------Respuesta de phpAMI---------- |
|
Array |
|
( |
|
[Response] => Success |
|
[Message] => DAHDI channel status will follow |
|
[List] => Array |
|
( |
|
[1] => Array |
|
( |
|
[Event] => DAHDIShowChannels |
|
[DAHDIChannel] => 1 |
|
[Signalling] => FXS Kewlstart |
|
[SignallingCode] => 8196 |
|
[Context] => movistar-in |
|
[DND] => Disabled |
|
[Alarm] => No Alarm |
|
) |
|
|
|
[2] => Array |
|
( |
|
[Event] => DAHDIShowChannels |
|
[DAHDIChannel] => 2 |
|
[Signalling] => FXO Kewlstart |
|
[SignallingCode] => 4128 |
|
[Context] => home |
|
[DND] => Disabled |
|
[Alarm] => No Alarm |
|
) |
|
|
|
[3] => Array |
|
( |
|
[Event] => DAHDIShowChannels |
|
[DAHDIChannel] => 3 |
|
[Signalling] => FXS Kewlstart |
|
[SignallingCode] => 8196 |
|
[Context] => cantv-in |
|
[DND] => Disabled |
|
[Alarm] => No Alarm |
|
) |
|
|
|
[4] => Array |
|
( |
|
[Event] => DAHDIShowChannels |
|
[DAHDIChannel] => 4 |
|
[Signalling] => FXO Kewlstart |
|
[SignallingCode] => 4128 |
|
[Context] => cantv-in |
|
[DND] => Disabled |
|
[Alarm] => No Alarm |
|
) |
|
|
|
) |
|
|
|
[ListInfo] => Array |
|
( |
|
[Event] => DAHDIShowChannelsComplete |
|
[Items] => 4 |
|
) |
|
|
|
) |
|
Si el canal espesificado no existe responde: |
|
Array |
|
( |
|
[Response] => Success |
|
[Message] => DAHDI channel status will follow |
|
[List] => Array |
|
( |
|
) |
|
|
|
[ListInfo] => Array |
|
( |
|
[Event] => DAHDIShowChannelsComplete |
|
[Items] => 0 |
|
) |
|
|
|
) |
|
---------------------------------------
|
|
|