Re: [Asterisk-java-users] question about getting peers using SipShowPeerAction (AMI)
Brought to you by:
srt
From: Stefan R. <ste...@re...> - 2007-08-10 00:52:48
|
Hi Robert, first thanks for your very well prepared question, it's a pleasure to reply to it :) > **** PeerStatusEvent: > org.asteriskjava.manager.event.PeerStatusEvent[dateReceived=3DThu Aug 0= 9 > 20:16:31 EDT 2007,privilege=3D'system,all',timestamp=3D'null',peer=3D'S= IP/test2',time=3D'97',cause=3D'null',peerstatus=3D'Reachable',systemHashc= ode=3D22618484] > ** Manager Response: org.asteriskjava.manager.response.ManagerError: > actionId=3D'null'; message=3D'Peer SIP/test2 not found.'; > response=3D'Error'; uniqueId=3D'null'; systemHashcode=3D10703525 The problem is that SipShowPeer requires only the name of the peer without the channel prefix ("SIP/"). Unfortunately the PeerStatus event returns the name with the channel prefix and Asterisk calls both attributes just "peer". I will have a look at the javadocs to make this more clear. For you this means you just have to strip the channel prefix before passing the peer name to the SipShowPeerAction. Hope that helps, Stefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |