Re: [Asterisk-java-users] Unable to create the extension "exten => 1300, 1, Agi(agi://localhost/hel
Brought to you by:
srt
From: T. L. P. T. <tom...@gm...> - 2008-04-10 03:59:53
|
Hello Satya: Yes, you can integrate Asterisk-Java and FreePBX without any dirty work around. Let's see how this could be achieved. The first thing you should know about FreePBX configuration files is that any modules that generates any configuration files, usually use the name <configuration file>_additional.conf. Normally, a base configuration file will include this FreePBX generated file. For example, the base extensions.conf file that comes with FreePBX includes (among others) the files extensions_additional.conf. It doesn't make any sense to modify extensions_additional.conf, because the next time that changes are applied from the interface, this file will be regenerated; dropping any changes done by hand. Also, the base config file (in this case, extensions.conf) shouldn't be edited. There is a better way to integrate your self developed contexts, extensions and priorities. Most of the base config files of FreePBX include a file named <configuration file>_custom.conf. In this case, you should edit extensions_custom.conf and add your custom context. For example: [custom-myAsteriskJavaApp] exten => 1300,1,Agi(agi://localhost/hello.agi) Now, if you run an "extensions reload" command from the CLI, a new context will be available. We are going to use this context to integrate Asterisk-Java. To attach an inbound route to your Asterisk-Java application, you will need to create a new Inbound route and select "Custom App" in the "Set Destination" combo box. By using "Custom App", any incoming call that matches this inbound route will be delivered to a context (which must start with the "custom-" prefix) available to Asterisk. Copy the name of this new context, the extension and the priority (custom-myAsteriskJavaApp,1300,1) to the input box. Submit the changes and apply the changes to Asterisk. You can now test an incoming call to the DID 1300 and have fun with Asterisk-Java. Your mileage may vary but you should be able to have this example working with little modifications. Let us know if you have any problem. Best regards, Tomás. On Wed, Apr 9, 2008 at 11:30 PM, Satya Parimi <sat...@dh...> wrote: > Hi > > I'm a new user with Asterisk & Asterisk-Java > I installed Asterisk using PBX in a FLASH, which is a bundle of Asterisk > 1.4, FreePBX 2.4 and Cent OS > I'm able to create trunk/inbound route/extension easily using the > FreePBX GUI, it works great with a soft phone > > Now I want to intercept the inbound call, so I'm trying to use > Asterisk-Java (release from 4/9/08). I followed the example but stumbled > on creating an extension as suggested. Since I used FreePBX it generates > the extensions.conf files, so I cannot edit that. Of course I tried to > edit that file to add "exten => 1300,1,Agi(agi://localhost/hello.agi)", > but that didn't work. It doesn't show up on FreePBX GUI, so I cannot > attach that to inbound route. > > If I use FreePBX, can't I setup Asterisk-Java? Is there a work around? > I appreciate any help with this > > Thanks > Satya > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |