Summary: | ASTERISK-03610: [patch] New manager commands for SIP (Not XML any more) | ||
Reporter: | Olle Johansson (oej) | Labels: | |
Date Opened: | 2005-03-01 08:05:56.000-0600 | Date Closed: | 2008-01-15 15:28:03.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) managerpeers.txt ( 1) managerpeers.txt ( 2) xmlpeers.txt | |
Description: | This patch adds * SIPpeers manager command * SIPshowpeer manager command Output in text or XML format. Also changes some text parsing in handle_request in order to avoid all those strcmps. Dislaimer on file ****** ADDITIONAL INFORMATION ****** The XML model is experimental until I've implemented this for IAX and possibly other commands as well. I don't want different names for the same thing in various parts of Asterisk, so I want to be able to change. This is documented in the source as well as in the help text for the manager commands. The manager commands will report in XMl if the "Accept: text/xml" header is present in the manager request. | ||
Comments: | By: twisted (twisted) 2005-03-01 09:52:37.000-0600 /me chokes on xml Anyway, I guess its ok? By: Olle Johansson (oej) 2005-03-01 10:12:31.000-0600 Sorry, did not mean to offend anyone :-) XML is better from a machine point of view than the stripped printf's. We can easily add a format like application/csv and print comma-separated data. By: twisted (twisted) 2005-03-01 10:36:56.000-0600 hahaha... Nah, I'm not offended, just trying to bring a bit-o-humour to the bugtracker. By: Olle Johansson (oej) 2005-03-01 14:23:41.000-0600 Content-type: application/msexcel Might also be an option... :-) By: twisted (twisted) 2005-03-01 15:25:25.000-0600 Gak! No!! Anyway, this could be useful, I mean, I know of some management applications that parse xml for other things, that could be adapted to use xml output from the manager interface. By: Mark Spencer (markster) 2005-03-01 23:28:34.000-0600 No XML. Manager is very easy to parse today because it's variable: value. Unless you can show to me that XML represents things which *cannot* reasonably be represented with the existing syntax, i have absolutely no interest in adding it in any form or fashion. By: Olle Johansson (oej) 2005-03-02 00:34:27.000-0600 Markster: let's discuss this next week, I think you are too stubborn and unflexible here. There's a lot of development tools out there that makes parsing XML much easier than parsing your own format. By: Olle Johansson (oej) 2005-03-02 00:34:47.000-0600 --refusal by markster--- By: Olle Johansson (oej) 2005-03-02 12:20:15.000-0600 Will clean this up and remove XML within a week or so, have to travel a bit... By: Olle Johansson (oej) 2005-03-09 01:17:54.000-0600 I can't figure out a good way to send multiple peers in a list. I do not think the status way of sending several channels is a good solution. Events should be unsolicited, requests should generate responses, not a list of events. Can we come up with a better syntax than that? By: Mark Spencer (markster) 2005-03-09 01:37:34.000-0600 To do multiple peers in the list, look how "Status" manager event is handled. You first send an ack ("Channel status will follow"), followed by individual "events" or "cli_fd"'s for each peer, followed by "StatusComplete". For more information, see action_status in manager.c. By: Olle Johansson (oej) 2005-03-09 23:15:01.000-0600 Yes, I've seen that (as mentioned above) and don't like the syntax, it's kind of weird. I'll see if I can come up with something similar... By: Olle Johansson (oej) 2005-03-10 01:53:13.000-0600 Ok, take a look at this version. Based on the Status command... By: Olle Johansson (oej) 2005-03-13 09:39:14.000-0600 markster: Please check when you have a moment... If this works, I'll start working on IAX2. By: Olle Johansson (oej) 2005-03-17 10:40:41.000-0600 - Removed duplicate ack - Removed Peerlist: in ACK ...according to Marks suggestions... By: Mark Spencer (markster) 2005-03-20 01:59:16.000-0600 Added to CVS with minor mods. Thanks! By: Digium Subversion (svnbot) 2008-01-15 15:28:03.000-0600 Repository: asterisk Revision: 5215 U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r5215 | markster | 2008-01-15 15:28:02 -0600 (Tue, 15 Jan 2008) | 2 lines Add SIPPeers and SIPShowPeer manager events (bug ASTERISK-3610 with mods) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=5215 |