Re: [Asterisk-java-users] hello world
Brought to you by:
srt
From: Zoumana T. <zou...@gm...> - 2015-04-20 20:38:22
|
Hello first of all :-) No, from the output nothing more will come up until you trigger a call that your HelloWorld AGI will handle. As an AGI script this is supposed to handle Inbound call (..CallIn) obviously. If you have not a clear view on what you have to do for this, here it is: - 1) in your fastagi-mapping.properties you will have to put something like this helloworld.agi = ExampleCallIn - 2) in the extensions.conf (in /etc/asterisk) of your asterisk server, in the right context (default if you don't know) exten => s,1,Agi(agi://localhost/helloworld.agi - 3) then make a call from a softphone connected to your asterisk with credentials defined in sip.conf (in /etc/asterisk) You will then get your output In stead of just pasting block of code, please say a bit about the problem your are facing and your goal so people can help you (not every body will read all your email to then understand your problem) Regards, Zoumana *---* *Zoumana TRAORE* 2015-04-20 21:52 GMT+02:00 thufir <haw...@gm...>: > First go at this as so: > > thufir@dur:~/NetBeansProjects/HelloAsterisk/src$ > thufir@dur:~/NetBeansProjects/HelloAsterisk/src$ javac -cp > asterisk-java.jar ExampleCallIn.java > thufir@dur:~/NetBeansProjects/HelloAsterisk/src$ > thufir@dur:~/NetBeansProjects/HelloAsterisk/src$ java -cp > asterisk-java.jar org.asteriskjava.fastagi.DefaultAgiServer > Apr 20, 2015 12:19:20 PM org.asteriskjava.fastagi.DefaultAgiServer startup > INFO: Listening on *:4573. > ^Cthufir@dur:~/NetBeansProjects/HelloAsterisk/src$ > thufir@dur:~/NetBeansProjects/HelloAsterisk/src$ > thufir@dur:~/NetBeansProjects/HelloAsterisk/src$ ls > asterisk-java.jar ExampleCallIn.class ExampleCallIn.java > fastagi-mapping.properties > thufir@dur:~/NetBeansProjects/HelloAsterisk/src$ > thufir@dur:~/NetBeansProjects/HelloAsterisk/src$ cat ExampleCallIn.java > import org.asteriskjava.fastagi.AgiChannel; > import org.asteriskjava.fastagi.AgiException; > import org.asteriskjava.fastagi.AgiRequest; > import org.asteriskjava.fastagi.BaseAgiScript; > > public class ExampleCallIn extends BaseAgiScript { > > @Override > public void service(AgiRequest request, AgiChannel channel) throws > AgiException { > answer(); > exec("Playback", "tt-monkeys"); > hangup(); > } > } > thufir@dur:~/NetBeansProjects/HelloAsterisk/src$ > > > > but, shouldn't it be doing something more than that when it runs? I > would hope to see output like "playing monkeys" or similar. > > > The git page: > > https://github.com/srt/asterisk-java > > doesn't really specify what the output should be. Asterisk log shows: > > > [Apr 20 12:09:30] NOTICE[1189] chan_sip.c: Registration from > '<sip:200@192.168.0.19>' failed for '192.168.0.19:52732' - Wrong password > [Apr 20 12:14:31] NOTICE[1189] chan_sip.c: Registration from > '<sip:200@192.168.0.19>' failed for '192.168.0.19:52732' - Wrong password > thufir@dur:~$ > > > so that's a configuration problem? Can't login to asterisk? > > > > > > > thanks, > > Thufir > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live > exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- > event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |