Creating Dialplan from java application

Hi All ,

Is it possible to create a dialplan from java application ? if yes , how ?

I’m guessing you can add your contexts to the extensions.conf if you use plain asterisk, add rows for the dialplan to DB if you are using Realtime and send it commands trough AMI.

Thanks navaismo for your reply ,

I have check java docs and i have found that there are some commands like

asterisk-java.org/development/ap … hod_detail

how to make use from this command inside my java application ?

What are you actually trying to do? I tend to get the impression that this is homework! For example, you can obviously and trivially write extensions.conf from a Java program, and I also found some aspects of the Java and unavailable device thread, which had nothing to do with Java, strange.

thanks david55 for your reply,

Actually i am trying to write a dialplan in the java application (not in extensions.conf) so that if there are any changes in my dialplan , i ll just modify my java application , instead of modifying every time the file “extensions.conf”

Is it possible ?

Yes. But it make no sense to me to do so, unless you have been given it as a homework exercise, or you have a boss with an obsession with Java, but no understanding of programming.

It is trivially possible, because you can embed the contents of extensions.conf as a series of write’s.

Can you please explain why you must use Java and what you are trying to achieve that gives a benefit over directly coding the dialplan.

(There are mechanisms to incrementally add dialplan details using AMI, but these are used because of the desired user interface for configuration, not because of language choice. The dialplan never exists in the code of the configuration program, although it may exist in an associated database, or other data file. If this is what you are really doing, what prevents your use of or adapting existing, non-Java, Asterisk GUIs?)