Summary: | ASTERISK-10820: [patch] Include action: getcategory for the GUI | ||
Reporter: | Brandon Kruse (bkruse) | Labels: | |
Date Opened: | 2007-11-19 13:05:42.000-0600 | Date Closed: | 2007-12-26 16:18:07.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/ManagerInterface |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) v1.11306.patch | |
Description: | This patch is against trunk rev 89422 and would also be useful in 1.4 (I will submit patch for that too if necessary, but I guess it is a new feature, but would be extremely useful for now.) Anyways, here is a sample: (all examples included in mandesc) action: getcontext filename: extensions.conf context: DID_trunk_1 | ||
Comments: | By: Jason Parker (jparker) 2007-11-20 11:22:42.000-0600 I didn't test it, but it looked okay. The only comment I had was on the use of context vs category. It should probably use category everywhere, rather than context. By: Brandon Kruse (bkruse) 2007-11-20 11:40:40.000-0600 Ahh! I did use category everywhere, and pari told me to change it to context. :) Will re-upload a patch with category instead. This will help when we need to grab a quick context out of a file(obviously) the big problem was very large files and dialplans, which can happen rather quickly if you have a lot of users. Not to mention that the gui developers are using localhost, so when actually putting this in a real world and sending that much data over the connection can render it almost inoperable Also uploading patch for listcategories for getting all the contexts out of a file. (very useful also) -bk By: Brandon Kruse (bkruse) 2007-11-20 13:31:51.000-0600 This now has 2 functions for helping the gui, and using category terminology instead of context. -bk By: Tilghman Lesher (tilghman) 2007-11-20 18:05:29.000-0600 How useful is this if you have a file where the category name could be duplicated (i.e. iax.conf)? You may want to have another parameter, where you specify the category offset, in terms of 1, 2, 3, so that you only return a single stated category, instead of all matching categories, concatenated together. By: Brandon Kruse (bkruse) 2007-11-21 01:34:40.000-0600 Tighlman: Good idea! I will do this. By: Brandon Kruse (bkruse) 2007-11-26 11:07:57.000-0600 I do agree, I want this to be correct. However, the get categories (to list categories) is just to see if the category exists or not (though it might be right for the gui devs, it could be broken for someone else who wants to use it. :/ ) I will look into the offset method, to be able to do this (when returning the context's content) Thanks, -bk By: Tilghman Lesher (tilghman) 2007-12-24 23:39:51.000-0600 Any updates? By: Brandon Kruse (bkruse) 2007-12-26 16:17:55.000-0600 Tighlman, Kevin said he would take care of the code if gui developers told us. Closed, thanks anyways :/ |