[Asterisk-Dev] Manager XML

Nicolás Gudiño nicolas at house.com.ar
Wed Mar 2 03:10:54 MST 2005


Hi Olle,

Olle E. Johansson wrote:

> Marks response was that he doesn't want to see any XML in manager. 
> Period.
>
> This upset me a bit, so in a childish way I simply closed the bug 
> reports...
>
> I will discuss this with him at von next week, but if you have any 
> opinions pro and con XML in manager, please respond!
>
> Remember, I am not suggesting that we remove the current format,
> just add a new optional parseable format with complete data instead of 
> the stripped data being presented in the CLI.
>

XML generates some strong views/opinions, it might be bloated if we only 
want to have a machine parsable format for 'sip show peers', 'iax show 
peers' and the like on the manager. Maybe we can use the same manager 
format for displaying full peer data, just like when you request Status 
(Action: Status). It generates an event for each allocated channel, like:

Event: Status
Channel: SIP/15-963a
CallerID: "Nicolas" <15>
Account: 15
State: Up
Context: sip
Extension: 901
Priority: 2
Seconds: 7
Uniqueid: 1109757521.6370

As we already have manager event PeerStatus on the form:

Event: PeerStatus
Peer: SIP/18
PeerStatus: Registered

We can extend this event to show all the information available for all 
peers when requesting a 'SIPpeers', like:

Event: PeerStatus
Peer: SIP/18
Name: 18
Username: my_really_long_username_that_is_stripped_when_using_the_cli
Host: 192.168.1.1
Dynamic: Yes
Nat: No
Mask: 255.255.255.255.
Port: 5060
Status: OK
Lag: 54 ms

I would really like to have a machine parseable output from the manager 
for 'sip show peers', 'iax show peers', 'show agents' , 'show 
parkedcalls', etc.. If its XML thats ok... if its 'manager formatted' 
that ok by me too!...

Regards,

--
Nicolas Gudino



More information about the asterisk-dev mailing list