Re: [Asterisk-java-users] parsing dial plan extension patterns
Brought to you by:
srt
From: Martin S. <ma...@be...> - 2007-09-13 18:27:16
|
Hi Aaron, I think the Asterisk JTAPI has some code that parses the dialplan and internally uses Asterisk-Java. Last I tried, it failed to parse the dialplan on one of my virtual machines, but I don't remember if that was Asterisk 1.4 or 1.2. I believe some of the requirements of JTAPI included providing information about available outgoing lines and detecting pre-existing calls on startup, both of which could require some dialplan analysis. Though I have no need for it, the idea of parsing the dialplan does sound intriguing to me. I would imagine others would find it useful too. When I first considered it (when I tried to use Asterisk JTAPI a few months back), I assumed the most useful part of parsing the dialplan would be finding syntax errors without having to fiddle with the dialplan on a production system. Finally, I think you'll find that Asterisk itself obviously has a parser for the dialplan and AEL, and that they would be trivial to port. You might even be able to drop those source files into a JINI wrapper and call them from Java, which would be a very simple solution. But yes, I'm interested. No, I have no business requirements for it, but do keep us informed if you attempt it :). I can't imagine there'd be a strong case for NOT including that kind of functionality in AJ. Besides, the actions to get configuration files already exist in the manager interface :). Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 > -----Original Message----- > From: ast...@li...=20 > [mailto:ast...@li...] On=20 > Behalf Of Aaron Evans > Sent: Thursday, September 13, 2007 11:51 AM > To: ast...@li... > Subject: [Asterisk-java-users] parsing dial plan extension patterns >=20 > Hi all, >=20 > I didn't see anything in the asterisk java API for parsing dial plan > extension patterns and I suppose it might be beyond the scope of the > problems the API solves anyway. >=20 > But I was wondering if anyone knows of any utilities out there for > parsing patterns. >=20 > Specifically, I'd like to be able to parse a pattern and determine: >=20 > 1. If the set of possible matches is bounded or not (ie.=20 > fixed length). > 2. In the case of bounded sets, whether it is purely numeric. > 3. Some kind of match function to see if a given string matches the > pattern (perhaps by converting to a regular expression). It would be > cool if the match pattern could also accept a caller ID number as well > in case there is a filter there as well. > 4. In the case of bounded sets, being able to iterate through=20 > the possibilities. >=20 > I realize this is quite a laundry list. I'll need to implement > something myself for my specific cases if there is nothing out there > already... >=20 > -aaron >=20 > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 |