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.
103 lines
2.3 KiB
103 lines
2.3 KiB
phpAMI 1.0 |
|
|
|
iaxPeers |
|
Envia "ManagerAction_IAXpeers" |
|
|
|
lista de IAX peer |
|
|
|
return: Ver listEvent() |
|
link: https://wiki.asterisk.org/wiki/display/AST/ManagerAction_IAXpeers |
|
access: public |
|
array iaxPeers () |
|
|
|
-------------Interface AMI------------- |
|
Action: IAXpeers |
|
|
|
Response: Success |
|
EventList: start |
|
Message: Peer status list will follow |
|
|
|
Event: PeerEntry |
|
Channeltype: IAX2 |
|
ObjectName: demo/asterisk |
|
ChanObjectType: peer |
|
IPaddress: 216.207.245.47 |
|
IPport: 4569 |
|
Dynamic: no |
|
Trunk: no |
|
Encryption: no |
|
Status: Unmonitored |
|
|
|
Event: PeerEntry |
|
Channeltype: IAX2 |
|
ObjectName: eltercera |
|
ChanObjectType: peer |
|
IPaddress: (null) |
|
IPport: 0 |
|
Dynamic: yes |
|
Trunk: no |
|
Encryption: no |
|
Status: Unmonitored |
|
|
|
Event: PeerlistComplete |
|
EventList: Complete |
|
ListItems: 2 |
|
--------------------------------------- |
|
|
|
----------------Ejemplo---------------- |
|
include "phpAMI.php"; |
|
$ami=new phpAMI("admin","admin"); |
|
$login=$ami->login(); |
|
if($login["Response"]=="Success"){ |
|
print_r($ami->iaxPeers()); |
|
$ami->logoff(); |
|
} |
|
--------------------------------------- |
|
|
|
----------Respuesta de phpAMI---------- |
|
Array |
|
( |
|
[Response] => Success |
|
[EventList] => start |
|
[Message] => Peer status list will follow |
|
[List] => Array |
|
( |
|
[demo/asterisk] => Array |
|
( |
|
[Event] => PeerEntry |
|
[Channeltype] => IAX2 |
|
[ObjectName] => demo/asterisk |
|
[ChanObjectType] => peer |
|
[IPaddress] => 216.207.245.47 |
|
[IPport] => 4569 |
|
[Dynamic] => no |
|
[Trunk] => no |
|
[Encryption] => no |
|
[Status] => Unmonitored |
|
) |
|
|
|
[eltercera] => Array |
|
( |
|
[Event] => PeerEntry |
|
[Channeltype] => IAX2 |
|
[ObjectName] => eltercera |
|
[ChanObjectType] => peer |
|
[IPaddress] => (null) |
|
[IPport] => 0 |
|
[Dynamic] => yes |
|
[Trunk] => no |
|
[Encryption] => no |
|
[Status] => Unmonitored |
|
) |
|
|
|
) |
|
|
|
[ListInfo] => Array |
|
( |
|
[Event] => PeerlistComplete |
|
[EventList] => Complete |
|
[ListItems] => 2 |
|
) |
|
|
|
) |
|
---------------------------------------
|
|
|