Thread: [Asterisk-java-users] Unable to create the extension "exten => 1300, 1, Agi(agi://localhost/hello.a
Brought to you by:
srt
From: Satya P. <sat...@dh...> - 2008-04-10 02:30:07
|
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 |
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 > |
From: Will B. <wb...@vo...> - 2008-04-10 12:21:00
|
Was wondering if anyone would know what I am doing wrong. I am running trixbox pro and have installed the Asterisk Desktop Manager to try an example program of the java-asterisk AMI. With little effort I was able to get the dialing out to work without a problem, but I can't get the ADM to recognize an incoming call, or do the system tray etc... Also tried setting callevent=yes in the general section of sip.conf as suggested on the ADM forums. My pbx is at a datacenter and ADM is running behind my cable modem router. Was wondering if I was running into some kind of router firewall issue. Tried wireshark and did not see anything that looked like packed were getting stranded. I wish I could tell if asterisk was actually even trying to deliver the notification to the ADM? Also if someone knows of some good documentation on AMI, would love to know about it. Not sure where to go from here? Any suggestions would be much appreciated. Thanks Will Berger |
From: Stefan R. <ste...@re...> - 2008-04-11 06:19:34
Attachments:
signature.asc
|
Hi Will, Trixbox Pro uses a modified protocol to pass events (xml-like). We are currently integrating support for that into Asterisk-Java for 1.0.0. Until that's finished you won't be able to make full use of ADM with Trixbox Pro. =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Maciek T. <mlo...@gm...> - 2008-04-10 15:27:14
|
Hi all, I want to develop application that will monitor cluster of Asterisk hosts. I'm wondering if asterisk-java is able to handle events form many boxes. My first idea was one main class implementing EventListner and several manager connections with main class as event listener. But problem comes up when main class have to find out origin of event (eg. Hostname or IP address). There is no property such "Source" in events classes. Next attempt may be multithread application with some common synchronized resources. Any more ideas?? Regards, Maciek |
From: Martin S. <ma...@be...> - 2008-04-10 17:52:15
|
Hi Maciek, I know Gaetan has created a patch to AstManProxy that allows it to work with AJ, and I believe AstManProxy does attach information about what server the event originally came from. You may be able to combine AstManProxy and Asterisk-Java in such a way that you wouldn't have to modify either, and only write your program to read the extra field for the original server that fired the event. See http://dev.mcit.be/various/astmanproxy-asterisk-java.html. Cheers, Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221 > -----Original Message----- > From: ast...@li... > [mailto:ast...@li...] On > Behalf Of Maciek Tokarski > Sent: Thursday, April 10, 2008 11:27 AM > To: ast...@li... > Subject: [Asterisk-java-users] Multihost events monitoring > > Hi all, > I want to develop application that will monitor cluster of > Asterisk hosts. > I'm wondering if asterisk-java is able to handle events form > many boxes. My > first idea was one main class implementing EventListner and > several manager > connections with main class as event listener. But problem > comes up when > main class have to find out origin of event (eg. Hostname or > IP address). > There is no property such "Source" in events classes. > > Next attempt may be multithread application with some common > synchronized > resources. > > Any more ideas?? > > Regards, Maciek > > > -------------------------------------------------------------- > ----------- > 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 > |
From: Maciek T. <mlo...@gm...> - 2008-05-21 08:49:31
|
Hi, there is way to find out form wich host we've got event. I've wrote appliction that initializes several ManagerConnection instances to several hosts, main application is listnerer to every connection. In onManagerEvent function I do something like that: String host=((ManagerConnection)(event.getSource())).getHostname(); and now host variable holds the hostname. Regards, Maciek 2008/4/10 Maciek Tokarski <mlo...@gm...>: > Hi all, > I want to develop application that will monitor cluster of Asterisk hosts. > I'm wondering if asterisk-java is able to handle events form many boxes. My > first idea was one main class implementing EventListner and several manager > connections with main class as event listener. But problem comes up when > main class have to find out origin of event (eg. Hostname or IP address). > There is no property such "Source" in events classes. > > Next attempt may be multithread application with some common synchronized > resources. > > Any more ideas?? > > Regards, Maciek > > -- Pozdrawiam Maciek Tokarski |
From: Satya P. <sat...@dh...> - 2008-04-11 00:20:22
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Hello Tomas<br> <br> Thanks for your detailed response. <br> I followed the steps and added the custom entry to extensions_custom.conf, ran the "reload" but did not know how to verify if the context is created correctly. But while creating the inbound route got struck again. In FreePBX 2.4, I do not see "Custom App" dropdown on "Set Destination" section. What I see is two radio buttons, "Terminate Call" with a drop down of Hangup/busy/congestion/...etc, the other dorpdown is "Extensions", which shows extensions I created using FreePBX. <br> <br> Is there anything else to be done here to use the custom app?<br> <br> Thanks for your help<br> Satya<br> <br> <br> <blockquote cite="mid:47F...@dh..." type="cite"><small>From: Tomás Laureano Peralta Tormey <a class="moz-txt-link-rfc2396E" href="mailto:tomas.tormey@gm..."><tomas.tormey@gm...></a> - 2008-04-10 03:59</small></blockquote> <blockquote cite="mid:47F...@dh..." type="cite"> Hello Satya:<br> Yes, you can integrate Asterisk-Java and FreePBX without any dirty work around.<br> Let's see how this could be achieved.<br> <br> The first thing you should know about FreePBX configuration files is<br> that any modules that generates any configuration files, usually use<br> the name <configuration file>_additional.conf. Normally, a base<br> configuration file will include this FreePBX generated file. For<br> example, the base extensions.conf file that comes with FreePBX<br> includes (among others) the files extensions_additional.conf.<br> It doesn't make any sense to modify extensions_additional.conf,<br> because the next time that changes are applied from the interface,<br> this file will be regenerated; dropping any changes done by hand.<br> Also, the base config file (in this case, extensions.conf) shouldn't<br> be edited. There is a better way to integrate your self developed<br> contexts, extensions and priorities.<br> Most of the base config files of FreePBX include a file named<br> <configuration file>_custom.conf. In this case, you should edit<br> extensions_custom.conf and add your custom context.<br> For example:<br> <br> [custom-myAsteriskJavaApp]<br> exten => 1300,1,Agi(agi://localhost/hello.agi)<br> <br> Now, if you run an "extensions reload" command from the CLI, a new<br> context will be available. We are going to use this context to<br> integrate Asterisk-Java.<br> <br> To attach an inbound route to your Asterisk-Java application, you<br> will need to create a new Inbound route and select "Custom App" in the<br> "Set Destination" combo box. By using "Custom App", any incoming call<br> that matches this inbound route will be delivered to a context (which<br> must start with the "custom-" prefix) available to Asterisk. Copy the<br> name of this new context, the extension and the priority<br> (custom-myAsteriskJavaApp,1300,1) to the input box. Submit the changes<br> and apply the changes to Asterisk.<br> <br> You can now test an incoming call to the DID 1300 and have fun with<br> Asterisk-Java.<br> <br> Your mileage may vary but you should be able to have this example<br> working with little modifications. Let us know if you have any<br> problem.<br> <br> Best regards, Tomás. <br> </blockquote> <br> <blockquote cite="mid:47F...@dh..." type="cite">Hi<br> I'm a new user with Asterisk & Asterisk-Java <br> I installed Asterisk using PBX in a FLASH, which is a bundle of Asterisk 1.4, FreePBX 2.4 and Cent OS <br> I'm able to create trunk/inbound route/extension easily using the FreePBX GUI, it works great with a soft phone <br> <br> 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. <br> <br> If I use FreePBX, can't I setup Asterisk-Java? Is there a work around? <br> I appreciate any help with this <br> <br> Thanks <br> Satya <br> <br> </blockquote> <br> </body> </html> |
From: T. L. P. T. <tom...@gm...> - 2008-04-11 01:28:14
|
Hello Satya: I'm running FreePBX 2.3.1.0 on my lab so I can't tell you exactly how yo solve this issue. Actually, this issue isn't directly related to Asterisk-Java. But doing some research in Google point out that the version 2.4 of FreePBX has some changes in the "Custom App" drop down menu. From: http://freepbx.org/trac/browser/freepbx/tags/2.4.0/CHANGES Addition of Custom Applications Module. Provides a place to register custom > extension numbers as well as custom destinations that are to be used in > FreePBX. Replaces the old Custom Destinations choice that was available in > each module. > Maybe you could try installing this module in FreePBX and doing some tests. To verify if a context (and extension) is available to Asterisk, you can run this command from the CLI: show dialplan <exten>@<context> (Asterisk 1.2 or older) dialplan show <exten>@<context> (Asterisk 1.4) For example: labbox*CLI> show dialplan 1300@custom-myAsteriskJavaApp [ Context 'custom-myAsteriskJavaApp' created by 'pbx_config' ] '1300' => 1. Agi(agi://localhost/hello.agi) [pbx_config] -= 1 extension (1 priority) in 1 context. =- labbox*CLI> Best regards, Tomás. On Thu, Apr 10, 2008 at 9:20 PM, Satya Parimi <sat...@dh...> wrote: > > Hello Tomas > > Thanks for your detailed response. > I followed the steps and added the custom entry to extensions_custom.conf, > ran the "reload" but did not know how to verify if the context is created > correctly. But while creating the inbound route got struck again. In FreePBX > 2.4, I do not see "Custom App" dropdown on "Set Destination" section. What I > see is two radio buttons, "Terminate Call" with a drop down of > Hangup/busy/congestion/...etc, the other dorpdown is "Extensions", which > shows extensions I created using FreePBX. > > Is there anything else to be done here to use the custom app? > > Thanks for your help > Satya > > > > From: Tomás Laureano Peralta Tormey <tomas.tormey@gm...> - 2008-04-10 03:59 > 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. > > > > 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 > > |
From: Satya P. <sat...@dh...> - 2008-04-17 01:25:19
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Hi Tomas<br> <br> Thanks for all your help<br> Yes, In FreePBX 2.4 the custom extension is moved to tools<br> Here is what I did with FreePBX 2.4.......<br> I created a custom extension from "Tools/Custom Extensions" menu, 1300 as extension and custom-myAsteriskJavaApp as description.<br> Then from "Tools/Custom Destinations" menu created a destination, "custom-myAsteriskJavaApp,1300,1" as custom destination, and myAsteriskJavaApp as the description. Then I could see a new radio button "Custom Applications" in the inbound route screen, I could attach my custom app to the incoming route<br> <br> Now it works. I made two more mistakes which I took a long time to figure out what went wrong. Let me share it<br> 1. I used Asterisk server ip to create custom extension in extensions_custom.conf, right thing is to use the ip of the server running Asterisk-Java<br> 2. I created HelloAgiScript.java in a package "com.asteriskjava", but haven't given the package name in fastagi-mapping.properties, so it wasn't finding the class <br> <br> Now I'm all set<br> <br> Thanks<br> Satya<br> <br> Tomás Laureano Peralta Tormey wrote: <blockquote cite="mid:b00...@ma..." type="cite">Hello Satya:<br> I'm running FreePBX <a moz-do-not-send="true" href="http://2.3.1.0">2.3.1.0</a> on my lab so I can't tell you exactly how yo solve this issue. Actually, this issue isn't directly related to Asterisk-Java.<br> But doing some research in Google point out that the version 2.4 of FreePBX has some changes in the "Custom App" drop down menu.<br> <br> From: <a moz-do-not-send="true" href="http://freepbx.org/trac/browser/freepbx/tags/2.4.0/CHANGES">http://freepbx.org/trac/browser/freepbx/tags/2.4.0/CHANGES</a><br> <br> <blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Addition of Custom Applications Module. Provides a place to register custom extension numbers as well as custom destinations that are to be used in FreePBX. Replaces the old Custom Destinations choice that was available in each module.<br> </blockquote> <br> Maybe you could try installing this module in FreePBX and doing some tests.<br> <br> To verify if a context (and extension) is available to Asterisk, you can run this command from the CLI:<br> show dialplan <exten>@<context> (Asterisk 1.2 or older)<br> dialplan show <exten>@<context> (Asterisk 1.4)<br> <br> For example:<br> <br> labbox*CLI> show dialplan 1300@custom-myAsteriskJavaApp<br> [ Context 'custom-myAsteriskJavaApp' created by 'pbx_config' ]<br> '1300' => 1. Agi(agi://localhost/hello.agi) [pbx_config]<br> <br> -= 1 extension (1 priority) in 1 context. =-<br> labbox*CLI> <br> <br> Best regards, Tomás.<br> <a moz-do-not-send="true" href="https://lists.sourceforge.net/lists/listinfo/asterisk-java-users"></a></blockquote> </body> </html> |
From: T. L. P. T. <tom...@gm...> - 2008-04-17 02:55:19
|
Hello Satya: Thank you for sharing your experience with FreePBX and Asterisk-Java. Best regards, Tomás. On Wed, Apr 16, 2008 at 10:25 PM, Satya Parimi <sat...@dh...> wrote: > > Hi Tomas > > Thanks for all your help > Yes, In FreePBX 2.4 the custom extension is moved to tools > Here is what I did with FreePBX 2.4....... > I created a custom extension from "Tools/Custom Extensions" menu, 1300 as > extension and custom-myAsteriskJavaApp as description. > Then from "Tools/Custom Destinations" menu created a destination, > "custom-myAsteriskJavaApp,1300,1" as custom destination, and > myAsteriskJavaApp as the description. Then I could see a new radio button > "Custom Applications" in the inbound route screen, I could attach my custom > app to the incoming route > > Now it works. I made two more mistakes which I took a long time to figure > out what went wrong. Let me share it > 1. I used Asterisk server ip to create custom extension in > extensions_custom.conf, right thing is to use the ip of the server running > Asterisk-Java > 2. I created HelloAgiScript.java in a package "com.asteriskjava", but > haven't given the package name in fastagi-mapping.properties, so it > wasn't finding the class > > Now I'm all set > > Thanks > Satya > > > Tomás Laureano Peralta Tormey wrote: > Hello Satya: > I'm running FreePBX 2.3.1.0 on my lab so I can't tell you exactly how yo > solve this issue. Actually, this issue isn't directly related to > Asterisk-Java. > But doing some research in Google point out that the version 2.4 of > FreePBX has some changes in the "Custom App" drop down menu. > > From: http://freepbx.org/trac/browser/freepbx/tags/2.4.0/CHANGES > > > > Addition of Custom Applications Module. Provides a place to register > custom extension numbers as well as custom destinations that are to be used > in FreePBX. Replaces the old Custom Destinations choice that was available > in each module. > > > > Maybe you could try installing this module in FreePBX and doing some > tests. > > To verify if a context (and extension) is available to Asterisk, you can > run this command from the CLI: > show dialplan <exten>@<context> (Asterisk 1.2 or older) > dialplan show <exten>@<context> (Asterisk 1.4) > > For example: > > labbox*CLI> show dialplan 1300@custom-myAsteriskJavaApp > [ Context 'custom-myAsteriskJavaApp' created by 'pbx_config' ] > '1300' => 1. Agi(agi://localhost/hello.agi) > [pbx_config] > > -= 1 extension (1 priority) in 1 context. =- > labbox*CLI> > > Best regards, Tomás. > > ------------------------------------------------------------------------- > 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 > > |