Who to Check peer status by ami

hi
i try to check peer status if is busy or offline or online i use node.js asterisk-manager modules i try

ami.action({ 'action': 'SIPpeerstatus', '[Peer]':'7001' } ,function(data){ console.log(data); });
at this link https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_SIPpeerstatus but it return

{ response: 'Error', actionid: '1386388664486', message: 'Invalid/unknown command: SIPpeerstatus. Use Action: ListCommands to show available commands.' }

Why are you asking this on a discussion forum? It looks like a support request!

The nearest manager command that actually exists is:

ast_manager_register_xml("SIPshowpeer", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_sip_show_peer);

and its parameter is “Peer”, not “[Peer]”.

[code]

show SIP peer (text format).


<xi:include xpointer=“xpointer(/docs/manager[@name=‘Login’]/syntax/parameter[@name=‘ActionID’])” />

You may find that running the DEVICESTATE function is a more useful approach. You can use the get variable action to run functions.

The peer name you want to check.



Show one SIP peer with details on current status.


[/code]