asterisk-java-users Mailing List for Asterisk-Java Library (Page 3)
Brought to you by:
srt
You can subscribe to this list here.
2005 |
Jan
|
Feb
(8) |
Mar
(33) |
Apr
(36) |
May
(19) |
Jun
(21) |
Jul
(53) |
Aug
(30) |
Sep
(36) |
Oct
(34) |
Nov
(43) |
Dec
(72) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(123) |
Feb
(75) |
Mar
(86) |
Apr
(46) |
May
(41) |
Jun
(29) |
Jul
(76) |
Aug
(38) |
Sep
(39) |
Oct
(68) |
Nov
(16) |
Dec
(17) |
2007 |
Jan
(34) |
Feb
(18) |
Mar
(39) |
Apr
(30) |
May
(20) |
Jun
(10) |
Jul
(59) |
Aug
(54) |
Sep
(60) |
Oct
(22) |
Nov
(14) |
Dec
(10) |
2008 |
Jan
(34) |
Feb
(67) |
Mar
(65) |
Apr
(67) |
May
(60) |
Jun
(51) |
Jul
(88) |
Aug
(75) |
Sep
(47) |
Oct
(143) |
Nov
(54) |
Dec
(42) |
2009 |
Jan
(46) |
Feb
(80) |
Mar
(162) |
Apr
(159) |
May
(200) |
Jun
(34) |
Jul
(46) |
Aug
(59) |
Sep
(5) |
Oct
(35) |
Nov
(73) |
Dec
(30) |
2010 |
Jan
(23) |
Feb
(50) |
Mar
(8) |
Apr
(24) |
May
(19) |
Jun
(49) |
Jul
(56) |
Aug
(35) |
Sep
(26) |
Oct
(79) |
Nov
(39) |
Dec
(34) |
2011 |
Jan
(27) |
Feb
(22) |
Mar
(28) |
Apr
(12) |
May
(16) |
Jun
(19) |
Jul
(1) |
Aug
(64) |
Sep
(19) |
Oct
(11) |
Nov
(17) |
Dec
(12) |
2012 |
Jan
(6) |
Feb
(8) |
Mar
(15) |
Apr
(43) |
May
(41) |
Jun
(14) |
Jul
(32) |
Aug
(3) |
Sep
(4) |
Oct
(7) |
Nov
(11) |
Dec
(11) |
2013 |
Jan
(35) |
Feb
(11) |
Mar
(23) |
Apr
(25) |
May
(37) |
Jun
(47) |
Jul
(25) |
Aug
(21) |
Sep
|
Oct
(1) |
Nov
(9) |
Dec
|
2014 |
Jan
(26) |
Feb
(2) |
Mar
(18) |
Apr
(41) |
May
(7) |
Jun
(7) |
Jul
(24) |
Aug
(5) |
Sep
(6) |
Oct
(8) |
Nov
(9) |
Dec
(7) |
2015 |
Jan
(7) |
Feb
(15) |
Mar
(8) |
Apr
(12) |
May
(7) |
Jun
|
Jul
|
Aug
(5) |
Sep
(1) |
Oct
(3) |
Nov
(30) |
Dec
(3) |
2016 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
(4) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Zoumana T. <zou...@gm...> - 2015-11-13 10:33:59
|
+1 on package naming try with agi_parsing.HelloAgiScript as suggested by Yves networking seems to be fine as your server is getting the request to serve the AGI *---* *Zoumana TRAORE* 2015-11-13 11:25 GMT+01:00 Yves <yv...@gm...>: > Hi, > > Are your HelloAGIScript(2)-Classes defined in a package? > If so, you have to prefix the full packagepath....: > > hello.agi = path.to.my.class.HelloAgiScript > hello2.agi = path.to.my.other.class.HelloAgiScript2 > > Also, check, state of the AGI-Server, and if you´re on different machines > (as it seems) also Network, Firewall.... > > regards, > yves > > > Am 13.11.2015 um 10:11 schrieb Abdul Basit: > > > Here is another class path setting still no luck :( > ------------------------------ > From: bas...@ho... > To: ast...@li... > Date: Fri, 13 Nov 2015 14:06:01 +0500 > Subject: Re: [Asterisk-java-users] FW: SEVERE: No script configured for > URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi')) > > > > I already snapshot in my previous file including with the source code, > here is the class path screen short > > > *fastagi-mapping.properties* > hello.agi = HelloAgiScript > hello2.agi = HelloAgiScript2 > > > > regards, > AB > > > ------------------------------ > From: zou...@gm... > Date: Fri, 13 Nov 2015 09:57:20 +0100 > To: ast...@li... > Subject: Re: [Asterisk-java-users] FW: SEVERE: No script configured for > URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi')) > > Please share your mapping file content and the screenshot of your eclipse > project classpath > > Regards > > > *--- **Zoumana TRAORE* > > > 2015-11-13 9:45 GMT+01:00 Abdul Basit < <bas...@ho...> > bas...@ho...>: > > > Hi > > I am facing this issue ""SEVERE: No script configured for URL 'agi:// > 10.168.30.1/hello2.agi' (script 'hello2.agi')"" , i did googled a lot > but unable to find the solution. > > > any one help please. > I already Set fastagi-mapping.properties in class path , and also on the > other path to be on safe, but no luck also the source code attached for > the reference:( > > Asterisk Logs > agi://10.168.30.1/hello2.agi: No script configured for URL 'agi:// > 10.168.30.1/hello2.agi' (script 'hello2.agi') > -- <PJSIP/1000-00000005>AGI Script agi://10.168.30.1/hello2.agi > completed, returning 0 > > > > *and on Eclipse Console when call trigger form softphone *Nov 13, 2015 > 3:48:43 PM org.asteriskjava.fastagi.internal.AgiConnectionHandler run > SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' > (script 'hello2.agi') > > > > This is the Dial Plan > exten => 999,1,Agi(agi://10.168.30.1/hello2.agi) > > > > > Regards, > AB > > > > ------------------------------ > To: ast...@li... > From: yv...@gm... > Date: Thu, 12 Nov 2015 12:28:30 +0100 > Subject: Re: [Asterisk-java-users] sample asterisk dial plan integration > with AGI java project (Eclipse) > > Hi, > > the internet is full of examples... even the docs show it...: > > https://maven.reucon.com/projects/public/asterisk-java/1.0.0/tutorial.html > > http://www.jcgonzalez.com/asterisk-handle-calls-with-java-example > > A google search on "asterisk-java agi example" results in tons of info. > > regards, > yves > > > Am 12.11.2015 um 10:41 schrieb Abdul Basit: > > Hi all, > > I am new to asterisk, i would be very appreciate if any one would like to > share sample dial plan integration with AGI based on Java Eclipse. thx > > > I manage to setup Asterisk Environment in my machine. thx > > > > > > Regards, > AB > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------ > [image: Avast logo] <https://www.avast.com/antivirus> > > Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. > www.avast.com <https://www.avast.com/antivirus> > > > > ------------------------------------------------------------------------------ > _______________________________________________ Asterisk-java-users > mailing list Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > _______________________________________________ Asterisk-java-users > mailing list Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > _______________________________________________ Asterisk-java-users > mailing list Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------ > [image: Avast logo] <https://www.avast.com/antivirus> > > Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. > www.avast.com <https://www.avast.com/antivirus> > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves <yv...@gm...> - 2015-11-13 10:25:14
|
Hi, Are your HelloAGIScript(2)-Classes defined in a package? If so, you have to prefix the full packagepath....: hello.agi = path.to.my.class.HelloAgiScript hello2.agi = path.to.my.other.class.HelloAgiScript2 Also, check, state of the AGI-Server, and if you´re on different machines (as it seems) also Network, Firewall.... regards, yves Am 13.11.2015 um 10:11 schrieb Abdul Basit: > > Here is another class path setting still no luck :( > ------------------------------------------------------------------------ > From: bas...@ho... > To: ast...@li... > Date: Fri, 13 Nov 2015 14:06:01 +0500 > Subject: Re: [Asterisk-java-users] FW: SEVERE: No script configured > for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi')) > > > > I already snapshot in my previous file including with the source code, > here is the class path screen short > > > *fastagi-mapping.properties* > > > hello.agi = HelloAgiScript > hello2.agi = HelloAgiScript2 > > > > regards, > AB > > > ------------------------------------------------------------------------ > From: zou...@gm... > Date: Fri, 13 Nov 2015 09:57:20 +0100 > To: ast...@li... > Subject: Re: [Asterisk-java-users] FW: SEVERE: No script configured > for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi')) > > Please share your mapping file content and the screenshot of your > eclipse project classpath > > Regards > > *--- > **Zoumana TRAORE* > > > 2015-11-13 9:45 GMT+01:00 Abdul Basit <bas...@ho... > <mailto:bas...@ho...>>: > > > Hi > > I am facing this issue ""SEVERE: No script configured for URL > 'agi://10.168.30.1/hello2.agi <http://10.168.30.1/hello2.agi>' > (script 'hello2.agi')"" , i did googled a lot but unable to find > the solution. > > > any one help please. > I already Set fastagi-mapping.properties in class path , and also > on the other path to be on safe, but no luck also the source code > attached for the reference:( > > Asterisk Logs > agi://10.168.30.1/hello2.agi <http://10.168.30.1/hello2.agi>: No > script configured for URL 'agi://10.168.30.1/hello2.agi > <http://10.168.30.1/hello2.agi>' (script 'hello2.agi') > -- <PJSIP/1000-00000005>AGI Script > agi://10.168.30.1/hello2.agi <http://10.168.30.1/hello2.agi> > completed, returning 0 > > > _and on Eclipse Console when call trigger form softphone > _Nov 13, 2015 3:48:43 PM > org.asteriskjava.fastagi.internal.AgiConnectionHandler run > SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi > <http://10.168.30.1/hello2.agi>' (script 'hello2.agi') > > > > This is the Dial Plan > exten => 999,1,Agi(agi://10.168.30.1/hello2.agi > <http://10.168.30.1/hello2.agi>) > > > > > Regards, > AB > > > > ------------------------------------------------------------------------ > To: ast...@li... > <mailto:ast...@li...> > From: yv...@gm... <mailto:yv...@gm...> > Date: Thu, 12 Nov 2015 12:28:30 +0100 > Subject: Re: [Asterisk-java-users] sample asterisk dial plan > integration with AGI java project (Eclipse) > > Hi, > > the internet is full of examples... even the docs show it...: > > https://maven.reucon.com/projects/public/asterisk-java/1.0.0/tutorial.html > > http://www.jcgonzalez.com/asterisk-handle-calls-with-java-example > > A google search on "asterisk-java agi example" results in tons of > info. > > regards, > yves > > > Am 12.11.2015 um 10:41 schrieb Abdul Basit: > > Hi all, > > I am new to asterisk, i would be very appreciate if any one > would like to share sample dial plan integration with AGI > based on Java Eclipse. thx > > > I manage to setup Asterisk Environment in my machine. thx > > > > > > Regards, > AB > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------ > Avast logo <https://www.avast.com/antivirus> > > Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. > www.avast.com <https://www.avast.com/antivirus> > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------------ > _______________________________________________ Asterisk-java-users > mailing list Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > ------------------------------------------------------------------------------ > _______________________________________________ Asterisk-java-users > mailing list Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus |
From: Abdul B. <bas...@ho...> - 2015-11-13 09:11:32
|
Here is another class path setting still no luck :( From: bas...@ho... To: ast...@li... Date: Fri, 13 Nov 2015 14:06:01 +0500 Subject: Re: [Asterisk-java-users] FW: SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi')) I already snapshot in my previous file including with the source code, here is the class path screen short fastagi-mapping.properties hello.agi = HelloAgiScript hello2.agi = HelloAgiScript2 regards, AB From: zou...@gm... Date: Fri, 13 Nov 2015 09:57:20 +0100 To: ast...@li... Subject: Re: [Asterisk-java-users] FW: SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi')) Please share your mapping file content and the screenshot of your eclipse project classpath Regards --- Zoumana TRAORE 2015-11-13 9:45 GMT+01:00 Abdul Basit <bas...@ho...>: Hi I am facing this issue ""SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi')"" , i did googled a lot but unable to find the solution. any one help please. I already Set fastagi-mapping.properties in class path , and also on the other path to be on safe, but no luck also the source code attached for the reference:( Asterisk Logs agi://10.168.30.1/hello2.agi: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi') -- <PJSIP/1000-00000005>AGI Script agi://10.168.30.1/hello2.agi completed, returning 0 and on Eclipse Console when call trigger form softphone Nov 13, 2015 3:48:43 PM org.asteriskjava.fastagi.internal.AgiConnectionHandler run SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi') This is the Dial Plan exten => 999,1,Agi(agi://10.168.30.1/hello2.agi) Regards, AB To: ast...@li... From: yv...@gm... Date: Thu, 12 Nov 2015 12:28:30 +0100 Subject: Re: [Asterisk-java-users] sample asterisk dial plan integration with AGI java project (Eclipse) Hi, the internet is full of examples... even the docs show it...: https://maven.reucon.com/projects/public/asterisk-java/1.0.0/tutorial.html http://www.jcgonzalez.com/asterisk-handle-calls-with-java-example A google search on "asterisk-java agi example" results in tons of info. regards, yves Am 12.11.2015 um 10:41 schrieb Abdul Basit: Hi all, I am new to asterisk, i would be very appreciate if any one would like to share sample dial plan integration with AGI based on Java Eclipse. thx I manage to setup Asterisk Environment in my machine. thx Regards, AB ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. www.avast.com ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Abdul B. <bas...@ho...> - 2015-11-13 09:06:10
|
I already snapshot in my previous file including with the source code, here is the class path screen short fastagi-mapping.properties hello.agi = HelloAgiScript hello2.agi = HelloAgiScript2 regards, AB From: zou...@gm... Date: Fri, 13 Nov 2015 09:57:20 +0100 To: ast...@li... Subject: Re: [Asterisk-java-users] FW: SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi')) Please share your mapping file content and the screenshot of your eclipse project classpath Regards --- Zoumana TRAORE 2015-11-13 9:45 GMT+01:00 Abdul Basit <bas...@ho...>: Hi I am facing this issue ""SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi')"" , i did googled a lot but unable to find the solution. any one help please. I already Set fastagi-mapping.properties in class path , and also on the other path to be on safe, but no luck also the source code attached for the reference:( Asterisk Logs agi://10.168.30.1/hello2.agi: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi') -- <PJSIP/1000-00000005>AGI Script agi://10.168.30.1/hello2.agi completed, returning 0 and on Eclipse Console when call trigger form softphone Nov 13, 2015 3:48:43 PM org.asteriskjava.fastagi.internal.AgiConnectionHandler run SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi') This is the Dial Plan exten => 999,1,Agi(agi://10.168.30.1/hello2.agi) Regards, AB To: ast...@li... From: yv...@gm... Date: Thu, 12 Nov 2015 12:28:30 +0100 Subject: Re: [Asterisk-java-users] sample asterisk dial plan integration with AGI java project (Eclipse) Hi, the internet is full of examples... even the docs show it...: https://maven.reucon.com/projects/public/asterisk-java/1.0.0/tutorial.html http://www.jcgonzalez.com/asterisk-handle-calls-with-java-example A google search on "asterisk-java agi example" results in tons of info. regards, yves Am 12.11.2015 um 10:41 schrieb Abdul Basit: Hi all, I am new to asterisk, i would be very appreciate if any one would like to share sample dial plan integration with AGI based on Java Eclipse. thx I manage to setup Asterisk Environment in my machine. thx Regards, AB ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. www.avast.com ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Zoumana T. <zou...@gm...> - 2015-11-13 08:57:46
|
Please share your mapping file content and the screenshot of your eclipse project classpath Regards *---* *Zoumana TRAORE* 2015-11-13 9:45 GMT+01:00 Abdul Basit <bas...@ho...>: > > Hi > > I am facing this issue ""SEVERE: No script configured for URL 'agi:// > 10.168.30.1/hello2.agi' (script 'hello2.agi')"" , i did googled a lot > but unable to find the solution. > > > any one help please. > I already Set fastagi-mapping.properties in class path , and also on the > other path to be on safe, but no luck also the source code attached for > the reference:( > > Asterisk Logs > agi://10.168.30.1/hello2.agi: No script configured for URL 'agi:// > 10.168.30.1/hello2.agi' (script 'hello2.agi') > -- <PJSIP/1000-00000005>AGI Script agi://10.168.30.1/hello2.agi > completed, returning 0 > > > > *and on Eclipse Console when call trigger form softphone*Nov 13, 2015 > 3:48:43 PM org.asteriskjava.fastagi.internal.AgiConnectionHandler run > SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' > (script 'hello2.agi') > > > > This is the Dial Plan > exten => 999,1,Agi(agi://10.168.30.1/hello2.agi) > > > > > Regards, > AB > > > > ------------------------------ > To: ast...@li... > From: yv...@gm... > Date: Thu, 12 Nov 2015 12:28:30 +0100 > Subject: Re: [Asterisk-java-users] sample asterisk dial plan integration > with AGI java project (Eclipse) > > Hi, > > the internet is full of examples... even the docs show it...: > > https://maven.reucon.com/projects/public/asterisk-java/1.0.0/tutorial.html > > http://www.jcgonzalez.com/asterisk-handle-calls-with-java-example > > A google search on "asterisk-java agi example" results in tons of info. > > regards, > yves > > > Am 12.11.2015 um 10:41 schrieb Abdul Basit: > > Hi all, > > I am new to asterisk, i would be very appreciate if any one would like to > share sample dial plan integration with AGI based on Java Eclipse. thx > > > I manage to setup Asterisk Environment in my machine. thx > > > > > > Regards, > AB > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------ > [image: Avast logo] <https://www.avast.com/antivirus> > > Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. > www.avast.com <https://www.avast.com/antivirus> > > > > ------------------------------------------------------------------------------ > _______________________________________________ Asterisk-java-users > mailing list Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Abdul B. <bas...@ho...> - 2015-11-13 08:45:48
|
Hi I am facing this issue ""SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi')"" , i did googled a lot but unable to find the solution. any one help please. I already Set fastagi-mapping.properties in class path , and also on the other path to be on safe, but no luck also the source code attached for the reference:( Asterisk Logs agi://10.168.30.1/hello2.agi: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi') -- <PJSIP/1000-00000005>AGI Script agi://10.168.30.1/hello2.agi completed, returning 0 and on Eclipse Console when call trigger form softphone Nov 13, 2015 3:48:43 PM org.asteriskjava.fastagi.internal.AgiConnectionHandler run SEVERE: No script configured for URL 'agi://10.168.30.1/hello2.agi' (script 'hello2.agi') This is the Dial Plan exten => 999,1,Agi(agi://10.168.30.1/hello2.agi) Regards, AB To: ast...@li... From: yv...@gm... Date: Thu, 12 Nov 2015 12:28:30 +0100 Subject: Re: [Asterisk-java-users] sample asterisk dial plan integration with AGI java project (Eclipse) Hi, the internet is full of examples... even the docs show it...: https://maven.reucon.com/projects/public/asterisk-java/1.0.0/tutorial.html http://www.jcgonzalez.com/asterisk-handle-calls-with-java-example A google search on "asterisk-java agi example" results in tons of info. regards, yves Am 12.11.2015 um 10:41 schrieb Abdul Basit: Hi all, I am new to asterisk, i would be very appreciate if any one would like to share sample dial plan integration with AGI based on Java Eclipse. thx I manage to setup Asterisk Environment in my machine. thx Regards, AB ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. www.avast.com ------------------------------------------------------------------------------ _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Jhoan O. <jho...@gm...> - 2015-11-12 14:41:37
|
Onli for linux. i never have used Asterisk in Windows, is not recommended. 2015-11-12 9:35 GMT-05:00 Alessio Turini <al...@cr...>: > Ok thanks, the problem happens in Windows and in Linux. > What is the script for Windows? > Ale > > > > Il 12/11/2015 15.24, Jhoan Orozco ha scritto: > > - what is the different between Managerfactory and ServerAsterisk? > > Well, I am not a expert in this, but i always use Managerfactory, i never > have used ServerAsterisk. > > - what is the best stable library of asterisk-java? > > i use asterisk-java-2.0.0.CI-20151004.214526-116.jar > <https://nexus.reucon.com/content/repositories/opensource-snapshots/org/asteriskjava/asterisk-java/2.0.0.CI-SNAPSHOT/asterisk-java-2.0.0.CI-20151004.214526-116.jar> its > website is: > https://nexus.reucon.com/content/repositories/opensource-snapshots/org/asteriskjava/asterisk-java/2.0.0.CI-SNAPSHOT/asterisk-java-2.0.0.CI-20151004.214526-116.jar > > > > - Is possible that Asterisk reload o restart, what is the best pratices to > manage failure of connection? (for ServerAsterisk and ManagerFactory) > > The best practice is adding these lines in you sh script launcher: > > ulimit -u unlimited > ulimit -n 50000 > > > If you reload, is posible that around 15 hours next, happend the same! > > > I hope help you! > > > > > 2015-11-12 9:12 GMT-05:00 Alessio Turini <al...@cr...>: > >> Hi dear, >> I like you, I would to be your friend :), I use 1.0.0.CI-SNAPSHOT >> and asterisk and program are in differents hosts, some question below... >> - what is the different between Managerfactory and ServerAsterisk? >> - what is the best stable library of asterisk-java? >> - Is possible that Asterisk reload o restart, what is the best pratices >> to manage failure of connection? (for ServerAsterisk and ManagerFactory) >> >> Thanks Ale >> >> >> >> >> Il 12/11/2015 13.19, Yves ha scritto: >> >> my thoughts after taking a quick look...: >> >> I don´t see something essentially wrong... the listener only works, as >> long the object is "alive"... using it in a thread is ok, but i don´t see >> the code that initializes and finally "runs" the thread.. >> maybe you have deadslocks, or any other multithread related problems... >> or just a network-problem... (are asterisk and your programm running on >> different machines?) >> getting the managerconnection the way you do it should work, but it may >> be better to go the recommended way (don´t know your environment) and use >> the managerfactory. >> are you using at least the asterisk-java 1.0 api? >> using a serverlistener does not fire much info... a managereventlistener >> would give you much more information... >> maybe the thread-sleeptime of 20secs is too long... >> are you sure, that your asterisk is fine all the time? maybe there are >> interference with reloads, crashes and so on? what do asterisk-logs say >> (increase verbosity or use debug log) when connections failes? >> normally the managerconnection reestablishes the socketconnection, but >> this is not very stable... this only seems to work if the connection breaks >> after issuing a command... so relying on the result of getState >> is quite useless... you should fire an action to reliably check the >> availability... this should of course be a command that does not consume >> much resources.. e.g. core show version etc. >> >> yves >> >> >> >> >> Am 12.11.2015 um 11:15 schrieb Alessio Turini: >> >> Ok, thanks for the answers. >> The code in answer is similar as mine, I try to insert a portion of >> project below , the class EventoAsterisk after a couple of hours(15 h) >> doesn't grab the events, >> There is a mode to check this type of connection? >> In the method run, i try to check mc object but the result is always >> connected. >> Thanks Ale >> >> >> class ManagerAsterisk extends Thread { >> >> private String host; >> private String user; >> private String psw; >> private DefaultAsteriskServer serverA; >> private ManagerConnection mc; >> private EventoAsterisk eventi; >> >> ManagerAsterisk(String host, String user, String psw) { >> Log.info("DefaultAsteriskServer start "); >> this.host= host; >> this.user= user; >> this.psw= psw; >> serverA = new DefaultAsteriskServer(host, user, psw); >> serverA.initialize(); >> >> mc = serverA.getManagerConnection(); >> >> >> } >> >> ManagerConnection getManagerConnection() { >> return serverA.getManagerConnection(); >> } >> >> void addAsteriskServerListener(EventoAsterisk eventi) { >> this.eventi = eventi; >> serverA.addAsteriskServerListener(eventi); >> } >> >> void removeAsteriskServerListener(EventoAsterisk eventi) { >> Log.info("ManagerAsterisk.removeAsteriskServerListener - eventi >> :" + eventi); >> serverA.removeAsteriskServerListener(eventi); >> } >> >> @Override >> public void run() { >> try { >> while (true) { >> Log.info("ManagerAsterisk.run - state (pre sleep) :" + >> mc.getState().name() + " - " + mc.getState()); >> Thread.sleep(20 * 1000); >> ManagerConnectionState stato = mc.getState(); >> Log.info("ManagerAsterisk.run - state :" + >> mc.getState().name() + " - " + mc.getState()); >> >> if (!stato.equals(ManagerConnectionState.INITIAL) && >> !stato.equals(ManagerConnectionState.CONNECTING) && >> !stato.equals(ManagerConnectionState.CONNECTED)) { >> Log.info("ManagerAsterisk.run - reacreate :" + stato); >> serverA = new DefaultAsteriskServer(host, user, psw); >> mc = serverA.getManagerConnection(); >> mc.addEventListener(new ConnessioneAsterisk()); >> serverA.addAsteriskServerListener(eventi); >> stato = mc.getState(); >> Log.info("ManagerAsterisk.run - reacreated :" + >> stato); >> } >> } >> } catch (InterruptedException ex) { >> Log.error("ManagerAsterisk.run" + ex, ex); >> } >> >> } >> } >> >> >> Il 12/11/2015 10.50, Zoumana TRAORE ha scritto: >> >> Hi Alessio, >> >> You probably need to share a part of the code so we can help. >> I assume you did not maintain some how you AMI Connection. >> >> Here is how i did it using PingThread provided by the AJ library >> >> @Autowired >> private PingThread pingThread; >> >> /** >> * <p> >> * Connect to Asterisk Server via Live API >> * </p> >> * @return >> */ >> public void connect(){ >> asteriskServer = new DefaultAsteriskServer(asteriskLiveHost, >> asteriskUsername, asteriskPassword); >> asteriskServer.initialize(); >> pingThread.addConnection(asteriskServer.getManagerConnection()); >> } >> >> >> And you fire the PingThread for instance at your app boot-up >> if(pingThread != null && !pingThread.isAlive()){ >> pingThread.start(); >> } >> >> >> Regards, >> >> *--- * >> >> *Zoumana TRAORE* >> >> 2015-11-12 10:28 GMT+01:00 Yves < <yv...@gm...>yv...@gm...>: >> >>> Hi Alessio, >>> >>> as my glassbowl is currently under repair, I cannot guess your source >>> code.... so why not append it to your next eMail so that we can have a look >>> at it? >>> >>> regards, >>> yves >>> >>> >>> Am 12.11.2015 um 09:11 schrieb Alessio Turini: >>> >>> Dear, >>> I've a problem with the class DefaultAsteriskServer and the >>> connection with the Asterisk (V. 11.19.0), i'll try to explain below (and >>> sorry for my english) >>> >>> I develop a program that links inbound call with a couple of events, I >>> use the class DefaultAsteriskServer and the listener >>> addAsteriskServerListener(MyClass). >>> MyClass checks every call and makes different operation based on type of >>> call. >>> The program is ok but after 10/20 hours goes to Hollywood, this means >>> that the listener not link events. >>> The class DefaultAsteriskServer is declared in a static object that wrap >>> it. >>> I would to ask, there is a timeout of connection between Asterisk and >>> DefaultAsteriskServer , can i check the connection between the two actor? >>> I tried to check the state of ManagerConnection (get by >>> getManagerConnection() on DefaultAsteriskServer ) but the result is always >>> connected and not help me to restablished a connection. >>> >>> Thanks in advance, Alessio >>> >>> >>> -- >>> *Dott. Alessio Turini* >>> IT Dept - Credires >>> Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy >>> +39 0587 467716 <%2B39%200587%20467716> - +39 3457427943 >>> <%2B39%203457427943> - <a.t...@cr...>a.t...@cr... >>> Le informazioni contenute in questo messaggio di posta elettronica e/o >>> nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il >>> loro utilizzo è consentito esclusivamente al destinatario del messaggio, >>> per le finalità indicate nel messaggio stesso. Qualora riceveste questo >>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di >>> darcene notizia via e-mail all'indirizzo <in...@cr...> >>> in...@cr... o telefonicamente allo +390587467700 e procedere alla >>> distruzione del messaggio stesso, cancellandolo dal Vostro sistema; >>> costituisce comportamento contrario ai principi dettati dal Dlgs 196/2003 >>> il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo >>> ad altri soggetti, copiarlo, od utilizzarlo per finalità, diverse. >>> This message and any attachments are solely for the intended recipient >>> and may contain confidential or privileged information. Its use is allowed >>> only to the intended recipient, for the purpose indicated in the message >>> itself. If you are not the intended recipient, please notify us by email to >>> in...@cr... or by phone to +390587467700 and permanently delete >>> this message and any attachments in your system. Keeping, disclosure also >>> in part, distribution to other recipients, copying of the information >>> included in this message and any attachments or using this information for >>> different purposes is prohibited as per regulation Dlgs 196/2003. >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------ >>> [image: Avast logo] <https://www.avast.com/antivirus> >>> >>> Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. >>> www.avast.com <https://www.avast.com/antivirus> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> -- >> *Dott. Alessio Turini* >> IT Dept - Credires >> Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy >> +39 0587 467716 <%2B39%200587%20467716> - +39 3457427943 >> <%2B39%203457427943> - a.t...@cr... >> Le informazioni contenute in questo messaggio di posta elettronica e/o >> nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il >> loro utilizzo è consentito esclusivamente al destinatario del messaggio, >> per le finalità indicate nel messaggio stesso. Qualora riceveste questo >> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di >> darcene notizia via e-mail all'indirizzo <in...@cr...> >> in...@cr... o telefonicamente allo +390587467700 e procedere alla >> distruzione del messaggio stesso, cancellandolo dal Vostro sistema; >> costituisce comportamento contrario ai principi dettati dal Dlgs 196/2003 >> il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo >> ad altri soggetti, copiarlo, od utilizzarlo per finalità, diverse. >> This message and any attachments are solely for the intended recipient >> and may contain confidential or privileged information. Its use is allowed >> only to the intended recipient, for the purpose indicated in the message >> itself. If you are not the intended recipient, please notify us by email to >> <in...@cr...>in...@cr... or by phone to +390587467700 and >> permanently delete this message and any attachments in your system. >> Keeping, disclosure also in part, distribution to other recipients, copying >> of the information included in this message and any attachments or using >> this information for different purposes is prohibited as per regulation >> Dlgs 196/2003. >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------ >> [image: Avast logo] <https://www.avast.com/antivirus> >> >> Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. >> www.avast.com <https://www.avast.com/antivirus> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> -- >> *Dott. Alessio Turini* >> IT Dept - Credires >> Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy >> +39 0587 467716 <%2B39%200587%20467716> - +39 3457427943 >> <%2B39%203457427943> - a.t...@cr... >> Le informazioni contenute in questo messaggio di posta elettronica e/o >> nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il >> loro utilizzo è consentito esclusivamente al destinatario del messaggio, >> per le finalità indicate nel messaggio stesso. Qualora riceveste questo >> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di >> darcene notizia via e-mail all'indirizzo in...@cr... o >> telefonicamente allo +390587467700 e procedere alla distruzione del >> messaggio stesso, cancellandolo dal Vostro sistema; costituisce >> comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere >> il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri >> soggetti, copiarlo, od utilizzarlo per finalità, diverse. >> This message and any attachments are solely for the intended recipient >> and may contain confidential or privileged information. Its use is allowed >> only to the intended recipient, for the purpose indicated in the message >> itself. If you are not the intended recipient, please notify us by email to >> in...@cr... or by phone to +390587467700 and permanently delete >> this message and any attachments in your system. Keeping, disclosure also >> in part, distribution to other recipients, copying of the information >> included in this message and any attachments or using this information for >> different purposes is prohibited as per regulation Dlgs 196/2003. >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > -- > *Dott. Alessio Turini* > IT Dept - Credires > Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy > +39 0587 467716 - +39 3457427943 - a.t...@cr... > Le informazioni contenute in questo messaggio di posta elettronica e/o > nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il > loro utilizzo è consentito esclusivamente al destinatario del messaggio, > per le finalità indicate nel messaggio stesso. Qualora riceveste questo > messaggio senza esserne il destinatario, Vi preghiamo cortesemente di > darcene notizia via e-mail all'indirizzo in...@cr... o > telefonicamente allo +390587467700 e procedere alla distruzione del > messaggio stesso, cancellandolo dal Vostro sistema; costituisce > comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere > il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri > soggetti, copiarlo, od utilizzarlo per finalità, diverse. > This message and any attachments are solely for the intended recipient and > may contain confidential or privileged information. Its use is allowed only > to the intended recipient, for the purpose indicated in the message itself. > If you are not the intended recipient, please notify us by email to > in...@cr... or by phone to +390587467700 and permanently delete this > message and any attachments in your system. Keeping, disclosure also in > part, distribution to other recipients, copying of the information included > in this message and any attachments or using this information for different > purposes is prohibited as per regulation Dlgs 196/2003. > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Alessio T. <al...@cr...> - 2015-11-12 14:35:38
|
Ok thanks, the problem happens in Windows and in Linux. What is the script for Windows? Ale Il 12/11/2015 15.24, Jhoan Orozco ha scritto: > - what is the different between Managerfactory and ServerAsterisk? > > Well, I am not a expert in this, but i always use Managerfactory, i > never have used ServerAsterisk. > > - what is the best stable library of asterisk-java? > > i use asterisk-java-2.0.0.CI-20151004.214526-116.jar > <https://nexus.reucon.com/content/repositories/opensource-snapshots/org/asteriskjava/asterisk-java/2.0.0.CI-SNAPSHOT/asterisk-java-2.0.0.CI-20151004.214526-116.jar> its > website is: > https://nexus.reucon.com/content/repositories/opensource-snapshots/org/asteriskjava/asterisk-java/2.0.0.CI-SNAPSHOT/asterisk-java-2.0.0.CI-20151004.214526-116.jar > > > > - Is possible that Asterisk reload o restart, what is the best > pratices to manage failure of connection? (for ServerAsterisk and > ManagerFactory) > > The best practice is adding these lines in you sh script launcher: > > ulimit -u unlimited > ulimit -n 50000 > > > If you reload, is posible that around 15 hours next, happend the same! > > > I hope help you! > > > > > 2015-11-12 9:12 GMT-05:00 Alessio Turini <al...@cr... > <mailto:al...@cr...>>: > > Hi dear, > I like you, I would to be your friend :), I use > 1.0.0.CI-SNAPSHOT and asterisk and program are in differents > hosts, some question below... > - what is the different between Managerfactory and ServerAsterisk? > - what is the best stable library of asterisk-java? > - Is possible that Asterisk reload o restart, what is the best > pratices to manage failure of connection? (for ServerAsterisk and > ManagerFactory) > > Thanks Ale > > > > > Il 12/11/2015 13.19, Yves ha scritto: >> my thoughts after taking a quick look...: >> >> I don´t see something essentially wrong... the listener only >> works, as long the object is "alive"... using it in a thread is >> ok, but i don´t see the code that initializes and finally "runs" >> the thread.. >> maybe you have deadslocks, or any other multithread related >> problems... or just a network-problem... (are asterisk and your >> programm running on different machines?) >> getting the managerconnection the way you do it should work, but >> it may be better to go the recommended way (don´t know your >> environment) and use the managerfactory. >> are you using at least the asterisk-java 1.0 api? >> using a serverlistener does not fire much info... a >> managereventlistener would give you much more information... >> maybe the thread-sleeptime of 20secs is too long... >> are you sure, that your asterisk is fine all the time? maybe >> there are interference with reloads, crashes and so on? what do >> asterisk-logs say (increase verbosity or use debug log) when >> connections failes? >> normally the managerconnection reestablishes the >> socketconnection, but this is not very stable... this only seems >> to work if the connection breaks after issuing a command... so >> relying on the result of getState >> is quite useless... you should fire an action to reliably check >> the availability... this should of course be a command that does >> not consume much resources.. e.g. core show version etc. >> >> yves >> >> >> >> >> Am 12.11.2015 um 11:15 schrieb Alessio Turini: >>> Ok, thanks for the answers. >>> The code in answer is similar as mine, I try to insert a portion >>> of project below , the class EventoAsterisk after a couple of >>> hours(15 h) doesn't grab the events, >>> There is a mode to check this type of connection? >>> In the method run, i try to check mc object but the result is >>> always connected. >>> Thanks Ale >>> >>> >>> class ManagerAsterisk extends Thread { >>> >>> private String host; >>> private String user; >>> private String psw; >>> private DefaultAsteriskServer serverA; >>> private ManagerConnection mc; >>> private EventoAsterisk eventi; >>> >>> ManagerAsterisk(String host, String user, String psw) { >>> Log.info("DefaultAsteriskServer start "); >>> this.host= host; >>> this.user= user; >>> this.psw= psw; >>> serverA = new DefaultAsteriskServer(host, user, psw); >>> serverA.initialize(); >>> >>> mc = serverA.getManagerConnection(); >>> >>> >>> } >>> >>> ManagerConnection getManagerConnection() { >>> return serverA.getManagerConnection(); >>> } >>> >>> void addAsteriskServerListener(EventoAsterisk eventi) { >>> this.eventi = eventi; >>> serverA.addAsteriskServerListener(eventi); >>> } >>> >>> void removeAsteriskServerListener(EventoAsterisk eventi) { >>> Log.info("ManagerAsterisk.removeAsteriskServerListener - eventi >>> :" + eventi); >>> serverA.removeAsteriskServerListener(eventi); >>> } >>> >>> @Override >>> public void run() { >>> try { >>> while (true) { >>> Log.info("ManagerAsterisk.run - state (pre >>> sleep) :" + mc.getState().name() + " - " + mc.getState()); >>> Thread.sleep(20 * 1000); >>> ManagerConnectionState stato = mc.getState(); >>> Log.info("ManagerAsterisk.run - state :" + >>> mc.getState().name() + " - " + mc.getState()); >>> >>> if >>> (!stato.equals(ManagerConnectionState.INITIAL) && >>> !stato.equals(ManagerConnectionState.CONNECTING) && >>> !stato.equals(ManagerConnectionState.CONNECTED)) { >>> Log.info("ManagerAsterisk.run - reacreate :" >>> + stato); >>> serverA = new DefaultAsteriskServer(host, >>> user, psw); >>> mc = serverA.getManagerConnection(); >>> mc.addEventListener(new ConnessioneAsterisk()); >>> serverA.addAsteriskServerListener(eventi); >>> stato = mc.getState(); >>> Log.info("ManagerAsterisk.run - reacreated >>> :" + stato); >>> } >>> } >>> } catch (InterruptedException ex) { >>> Log.error("ManagerAsterisk.run" + ex, ex); >>> } >>> >>> } >>> } >>> >>> >>> Il 12/11/2015 10.50, Zoumana TRAORE ha scritto: >>>> Hi Alessio, >>>> >>>> You probably need to share a part of the code so we can help. >>>> I assume you did not maintain some how you AMI Connection. >>>> >>>> Here is how i did it using PingThread provided by the AJ library >>>> >>>> @Autowired >>>> private PingThread pingThread; >>>> >>>> /** >>>> * <p> >>>> * Connect to Asterisk Server via Live API >>>> * </p> >>>> * @return >>>> */ >>>> public void connect(){ >>>> asteriskServer = new >>>> DefaultAsteriskServer(asteriskLiveHost, asteriskUsername, >>>> asteriskPassword); >>>> asteriskServer.initialize(); >>>> pingThread.addConnection(asteriskServer.getManagerConnection()); >>>> } >>>> >>>> >>>> And you fire the PingThread for instance at your app boot-up >>>> if(pingThread != null && !pingThread.isAlive()){ >>>> pingThread.start(); >>>> } >>>> >>>> >>>> Regards, >>>> *--- >>>> * >>>> >>>> *Zoumana TRAORE* >>>> >>>> >>>> 2015-11-12 10:28 GMT+01:00 Yves <yv...@gm... >>>> <mailto:yv...@gm...>>: >>>> >>>> Hi Alessio, >>>> >>>> as my glassbowl is currently under repair, I cannot guess >>>> your source code.... so why not append it to your next >>>> eMail so that we can have a look at it? >>>> >>>> regards, >>>> yves >>>> >>>> >>>> Am 12.11.2015 um 09:11 schrieb Alessio Turini: >>>>> Dear, >>>>> I've a problem with the class DefaultAsteriskServer >>>>> and the connection with the Asterisk (V. 11.19.0), i'll >>>>> try to explain below (and sorry for my english) >>>>> >>>>> I develop a program that links inbound call with a couple >>>>> of events, I use the class DefaultAsteriskServer and the >>>>> listener addAsteriskServerListener(MyClass). >>>>> MyClass checks every call and makes different operation >>>>> based on type of call. >>>>> The program is ok but after 10/20 hours goes to Hollywood, >>>>> this means that the listener not link events. >>>>> The class DefaultAsteriskServer is declared in a static >>>>> object that wrap it. >>>>> I would to ask, there is a timeout of connection between >>>>> Asterisk and DefaultAsteriskServer , can i check the >>>>> connection between the two actor? >>>>> I tried to check the state of ManagerConnection (get by >>>>> getManagerConnection() on DefaultAsteriskServer ) but the >>>>> result is always connected and not help me to restablished >>>>> a connection. >>>>> >>>>> Thanks in advance, Alessio >>>>> >>>>> >>>>> -- >>>>> *Dott. Alessio Turini* >>>>> IT Dept - Credires >>>>> Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy >>>>> +39 0587 467716 <tel:%2B39%200587%20467716> - +39 >>>>> 3457427943 <tel:%2B39%203457427943> - a.t...@cr... >>>>> <mailto:a.t...@cr...> >>>>> Le informazioni contenute in questo messaggio di posta >>>>> elettronica e/o nel/i file/s allegato/i, sono da >>>>> considerarsi strettamente riservate. Il loro utilizzo è >>>>> consentito esclusivamente al destinatario del messaggio, >>>>> per le finalità indicate nel messaggio stesso. Qualora >>>>> riceveste questo messaggio senza esserne il destinatario, >>>>> Vi preghiamo cortesemente di darcene notizia via e-mail >>>>> all'indirizzo in...@cr... <mailto:in...@cr...> o >>>>> telefonicamente allo +390587467700 <tel:%2B390587467700> e >>>>> procedere alla distruzione del messaggio stesso, >>>>> cancellandolo dal Vostro sistema; costituisce >>>>> comportamento contrario ai principi dettati dal Dlgs >>>>> 196/2003 il trattenere il messaggio stesso, divulgarlo >>>>> anche in parte, distribuirlo ad altri soggetti, copiarlo, >>>>> od utilizzarlo per finalità, diverse. >>>>> This message and any attachments are solely for the >>>>> intended recipient and may contain confidential or >>>>> privileged information. Its use is allowed only to the >>>>> intended recipient, for the purpose indicated in the >>>>> message itself. If you are not the intended recipient, >>>>> please notify us by email to in...@cr... >>>>> <mailto:in...@cr...> or by phone to +390587467700 >>>>> <tel:%2B390587467700> and permanently delete this message >>>>> and any attachments in your system. Keeping, disclosure >>>>> also in part, distribution to other recipients, copying of >>>>> the information included in this message and any >>>>> attachments or using this information for different >>>>> purposes is prohibited as per regulation Dlgs 196/2003. >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> >>>>> >>>>> _______________________________________________ >>>>> Asterisk-java-users mailing list >>>>> Ast...@li... >>>>> <mailto:Ast...@li...> >>>>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>>> >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> Avast logo <https://www.avast.com/antivirus> >>>> >>>> Diese E-Mail wurde von Avast Antivirus-Software auf Viren >>>> geprüft. >>>> www.avast.com <https://www.avast.com/antivirus> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Asterisk-java-users mailing list >>>> Ast...@li... >>>> <mailto:Ast...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> >>>> _______________________________________________ >>>> Asterisk-java-users mailing list >>>> Ast...@li... >>>> <mailto:Ast...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> -- >>> *Dott. Alessio Turini* >>> IT Dept - Credires >>> Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy >>> +39 0587 467716 <tel:%2B39%200587%20467716> - +39 3457427943 >>> <tel:%2B39%203457427943> - a.t...@cr... >>> <mailto:a.t...@cr...> >>> Le informazioni contenute in questo messaggio di posta >>> elettronica e/o nel/i file/s allegato/i, sono da considerarsi >>> strettamente riservate. Il loro utilizzo è consentito >>> esclusivamente al destinatario del messaggio, per le finalità >>> indicate nel messaggio stesso. Qualora riceveste questo >>> messaggio senza esserne il destinatario, Vi preghiamo >>> cortesemente di darcene notizia via e-mail all'indirizzo >>> in...@cr... <mailto:in...@cr...> o telefonicamente >>> allo +390587467700 <tel:%2B390587467700> e procedere alla >>> distruzione del messaggio stesso, cancellandolo dal Vostro >>> sistema; costituisce comportamento contrario ai principi dettati >>> dal Dlgs 196/2003 il trattenere il messaggio stesso, divulgarlo >>> anche in parte, distribuirlo ad altri soggetti, copiarlo, od >>> utilizzarlo per finalità, diverse. >>> This message and any attachments are solely for the intended >>> recipient and may contain confidential or privileged >>> information. Its use is allowed only to the intended recipient, >>> for the purpose indicated in the message itself. If you are not >>> the intended recipient, please notify us by email to >>> in...@cr... <mailto:in...@cr...> or by phone to >>> +390587467700 <tel:%2B390587467700> and permanently delete this >>> message and any attachments in your system. Keeping, disclosure >>> also in part, distribution to other recipients, copying of the >>> information included in this message and any attachments or >>> using this information for different purposes is prohibited as >>> per regulation Dlgs 196/2003. >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> ------------------------------------------------------------------------ >> Avast logo <https://www.avast.com/antivirus> >> >> Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. >> www.avast.com <https://www.avast.com/antivirus> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- > *Dott. Alessio Turini* > IT Dept - Credires > Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy > +39 0587 467716 <tel:%2B39%200587%20467716> - +39 3457427943 > <tel:%2B39%203457427943> - a.t...@cr... > <mailto:a.t...@cr...> > Le informazioni contenute in questo messaggio di posta elettronica > e/o nel/i file/s allegato/i, sono da considerarsi strettamente > riservate. Il loro utilizzo è consentito esclusivamente al > destinatario del messaggio, per le finalità indicate nel messaggio > stesso. Qualora riceveste questo messaggio senza esserne il > destinatario, Vi preghiamo cortesemente di darcene notizia via > e-mail all'indirizzo in...@cr... <mailto:in...@cr...> o > telefonicamente allo +390587467700 <tel:%2B390587467700> e > procedere alla distruzione del messaggio stesso, cancellandolo dal > Vostro sistema; costituisce comportamento contrario ai principi > dettati dal Dlgs 196/2003 il trattenere il messaggio stesso, > divulgarlo anche in parte, distribuirlo ad altri soggetti, > copiarlo, od utilizzarlo per finalità, diverse. > This message and any attachments are solely for the intended > recipient and may contain confidential or privileged information. > Its use is allowed only to the intended recipient, for the purpose > indicated in the message itself. If you are not the intended > recipient, please notify us by email to in...@cr... > <mailto:in...@cr...> or by phone to +390587467700 > <tel:%2B390587467700> and permanently delete this message and any > attachments in your system. Keeping, disclosure also in part, > distribution to other recipients, copying of the information > included in this message and any attachments or using this > information for different purposes is prohibited as per regulation > Dlgs 196/2003. > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- *Dott. Alessio Turini* IT Dept - Credires Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy +39 0587 467716 - +39 3457427943 - a.t...@cr... Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail all'indirizzo in...@cr... o telefonicamente allo +390587467700 e procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema; costituisce comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità, diverse. This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. Its use is allowed only to the intended recipient, for the purpose indicated in the message itself. If you are not the intended recipient, please notify us by email to in...@cr... or by phone to +390587467700 and permanently delete this message and any attachments in your system. Keeping, disclosure also in part, distribution to other recipients, copying of the information included in this message and any attachments or using this information for different purposes is prohibited as per regulation Dlgs 196/2003. |
From: Jhoan O. <jho...@gm...> - 2015-11-12 14:25:11
|
- what is the different between Managerfactory and ServerAsterisk? Well, I am not a expert in this, but i always use Managerfactory, i never have used ServerAsterisk. - what is the best stable library of asterisk-java? i use asterisk-java-2.0.0.CI-20151004.214526-116.jar <https://nexus.reucon.com/content/repositories/opensource-snapshots/org/asteriskjava/asterisk-java/2.0.0.CI-SNAPSHOT/asterisk-java-2.0.0.CI-20151004.214526-116.jar> its website is: https://nexus.reucon.com/content/repositories/opensource-snapshots/org/asteriskjava/asterisk-java/2.0.0.CI-SNAPSHOT/asterisk-java-2.0.0.CI-20151004.214526-116.jar - Is possible that Asterisk reload o restart, what is the best pratices to manage failure of connection? (for ServerAsterisk and ManagerFactory) The best practice is adding these lines in you sh script launcher: ulimit -u unlimited ulimit -n 50000 If you reload, is posible that around 15 hours next, happend the same! I hope help you! 2015-11-12 9:12 GMT-05:00 Alessio Turini <al...@cr...>: > Hi dear, > I like you, I would to be your friend :), I use 1.0.0.CI-SNAPSHOT and > asterisk and program are in differents hosts, some question below... > - what is the different between Managerfactory and ServerAsterisk? > - what is the best stable library of asterisk-java? > - Is possible that Asterisk reload o restart, what is the best pratices to > manage failure of connection? (for ServerAsterisk and ManagerFactory) > > Thanks Ale > > > > > Il 12/11/2015 13.19, Yves ha scritto: > > my thoughts after taking a quick look...: > > I don´t see something essentially wrong... the listener only works, as > long the object is "alive"... using it in a thread is ok, but i don´t see > the code that initializes and finally "runs" the thread.. > maybe you have deadslocks, or any other multithread related problems... or > just a network-problem... (are asterisk and your programm running on > different machines?) > getting the managerconnection the way you do it should work, but it may be > better to go the recommended way (don´t know your environment) and use the > managerfactory. > are you using at least the asterisk-java 1.0 api? > using a serverlistener does not fire much info... a managereventlistener > would give you much more information... > maybe the thread-sleeptime of 20secs is too long... > are you sure, that your asterisk is fine all the time? maybe there are > interference with reloads, crashes and so on? what do asterisk-logs say > (increase verbosity or use debug log) when connections failes? > normally the managerconnection reestablishes the socketconnection, but > this is not very stable... this only seems to work if the connection breaks > after issuing a command... so relying on the result of getState > is quite useless... you should fire an action to reliably check the > availability... this should of course be a command that does not consume > much resources.. e.g. core show version etc. > > yves > > > > > Am 12.11.2015 um 11:15 schrieb Alessio Turini: > > Ok, thanks for the answers. > The code in answer is similar as mine, I try to insert a portion of > project below , the class EventoAsterisk after a couple of hours(15 h) > doesn't grab the events, > There is a mode to check this type of connection? > In the method run, i try to check mc object but the result is always > connected. > Thanks Ale > > > class ManagerAsterisk extends Thread { > > private String host; > private String user; > private String psw; > private DefaultAsteriskServer serverA; > private ManagerConnection mc; > private EventoAsterisk eventi; > > ManagerAsterisk(String host, String user, String psw) { > Log.info("DefaultAsteriskServer start "); > this.host= host; > this.user= user; > this.psw= psw; > serverA = new DefaultAsteriskServer(host, user, psw); > serverA.initialize(); > > mc = serverA.getManagerConnection(); > > > } > > ManagerConnection getManagerConnection() { > return serverA.getManagerConnection(); > } > > void addAsteriskServerListener(EventoAsterisk eventi) { > this.eventi = eventi; > serverA.addAsteriskServerListener(eventi); > } > > void removeAsteriskServerListener(EventoAsterisk eventi) { > Log.info("ManagerAsterisk.removeAsteriskServerListener - eventi :" > + eventi); > serverA.removeAsteriskServerListener(eventi); > } > > @Override > public void run() { > try { > while (true) { > Log.info("ManagerAsterisk.run - state (pre sleep) :" + > mc.getState().name() + " - " + mc.getState()); > Thread.sleep(20 * 1000); > ManagerConnectionState stato = mc.getState(); > Log.info("ManagerAsterisk.run - state :" + > mc.getState().name() + " - " + mc.getState()); > > if (!stato.equals(ManagerConnectionState.INITIAL) && > !stato.equals(ManagerConnectionState.CONNECTING) && > !stato.equals(ManagerConnectionState.CONNECTED)) { > Log.info("ManagerAsterisk.run - reacreate :" + stato); > serverA = new DefaultAsteriskServer(host, user, psw); > mc = serverA.getManagerConnection(); > mc.addEventListener(new ConnessioneAsterisk()); > serverA.addAsteriskServerListener(eventi); > stato = mc.getState(); > Log.info("ManagerAsterisk.run - reacreated :" + stato); > } > } > } catch (InterruptedException ex) { > Log.error("ManagerAsterisk.run" + ex, ex); > } > > } > } > > > Il 12/11/2015 10.50, Zoumana TRAORE ha scritto: > > Hi Alessio, > > You probably need to share a part of the code so we can help. > I assume you did not maintain some how you AMI Connection. > > Here is how i did it using PingThread provided by the AJ library > > @Autowired > private PingThread pingThread; > > /** > * <p> > * Connect to Asterisk Server via Live API > * </p> > * @return > */ > public void connect(){ > asteriskServer = new DefaultAsteriskServer(asteriskLiveHost, > asteriskUsername, asteriskPassword); > asteriskServer.initialize(); > pingThread.addConnection(asteriskServer.getManagerConnection()); > } > > > And you fire the PingThread for instance at your app boot-up > if(pingThread != null && !pingThread.isAlive()){ > pingThread.start(); > } > > > Regards, > > *--- * > > *Zoumana TRAORE* > > 2015-11-12 10:28 GMT+01:00 Yves <yv...@gm...>: > >> Hi Alessio, >> >> as my glassbowl is currently under repair, I cannot guess your source >> code.... so why not append it to your next eMail so that we can have a look >> at it? >> >> regards, >> yves >> >> >> Am 12.11.2015 um 09:11 schrieb Alessio Turini: >> >> Dear, >> I've a problem with the class DefaultAsteriskServer and the >> connection with the Asterisk (V. 11.19.0), i'll try to explain below (and >> sorry for my english) >> >> I develop a program that links inbound call with a couple of events, I >> use the class DefaultAsteriskServer and the listener >> addAsteriskServerListener(MyClass). >> MyClass checks every call and makes different operation based on type of >> call. >> The program is ok but after 10/20 hours goes to Hollywood, this means >> that the listener not link events. >> The class DefaultAsteriskServer is declared in a static object that wrap >> it. >> I would to ask, there is a timeout of connection between Asterisk and >> DefaultAsteriskServer , can i check the connection between the two actor? >> I tried to check the state of ManagerConnection (get by >> getManagerConnection() on DefaultAsteriskServer ) but the result is always >> connected and not help me to restablished a connection. >> >> Thanks in advance, Alessio >> >> >> -- >> *Dott. Alessio Turini* >> IT Dept - Credires >> Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy >> +39 0587 467716 <%2B39%200587%20467716> - +39 3457427943 >> <%2B39%203457427943> - <a.t...@cr...>a.t...@cr... >> Le informazioni contenute in questo messaggio di posta elettronica e/o >> nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il >> loro utilizzo è consentito esclusivamente al destinatario del messaggio, >> per le finalità indicate nel messaggio stesso. Qualora riceveste questo >> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di >> darcene notizia via e-mail all'indirizzo <in...@cr...> >> in...@cr... o telefonicamente allo +390587467700 e procedere alla >> distruzione del messaggio stesso, cancellandolo dal Vostro sistema; >> costituisce comportamento contrario ai principi dettati dal Dlgs 196/2003 >> il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo >> ad altri soggetti, copiarlo, od utilizzarlo per finalità, diverse. >> This message and any attachments are solely for the intended recipient >> and may contain confidential or privileged information. Its use is allowed >> only to the intended recipient, for the purpose indicated in the message >> itself. If you are not the intended recipient, please notify us by email to >> <in...@cr...>in...@cr... or by phone to +390587467700 and >> permanently delete this message and any attachments in your system. >> Keeping, disclosure also in part, distribution to other recipients, copying >> of the information included in this message and any attachments or using >> this information for different purposes is prohibited as per regulation >> Dlgs 196/2003. >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------ >> [image: Avast logo] <https://www.avast.com/antivirus> >> >> Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. >> www.avast.com <https://www.avast.com/antivirus> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > -- > *Dott. Alessio Turini* > IT Dept - Credires > Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy > +39 0587 467716 - +39 3457427943 - <a.t...@cr...> > a.t...@cr... > Le informazioni contenute in questo messaggio di posta elettronica e/o > nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il > loro utilizzo è consentito esclusivamente al destinatario del messaggio, > per le finalità indicate nel messaggio stesso. Qualora riceveste questo > messaggio senza esserne il destinatario, Vi preghiamo cortesemente di > darcene notizia via e-mail all'indirizzo <in...@cr...> > in...@cr... o telefonicamente allo +390587467700 e procedere alla > distruzione del messaggio stesso, cancellandolo dal Vostro sistema; > costituisce comportamento contrario ai principi dettati dal Dlgs 196/2003 > il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo > ad altri soggetti, copiarlo, od utilizzarlo per finalità, diverse. > This message and any attachments are solely for the intended recipient and > may contain confidential or privileged information. Its use is allowed only > to the intended recipient, for the purpose indicated in the message itself. > If you are not the intended recipient, please notify us by email to > in...@cr... or by phone to +390587467700 and permanently delete this > message and any attachments in your system. Keeping, disclosure also in > part, distribution to other recipients, copying of the information included > in this message and any attachments or using this information for different > purposes is prohibited as per regulation Dlgs 196/2003. > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------ > [image: Avast logo] <https://www.avast.com/antivirus> > > Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. > www.avast.com <https://www.avast.com/antivirus> > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > -- > *Dott. Alessio Turini* > IT Dept - Credires > Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy > +39 0587 467716 - +39 3457427943 - a.t...@cr... > Le informazioni contenute in questo messaggio di posta elettronica e/o > nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il > loro utilizzo è consentito esclusivamente al destinatario del messaggio, > per le finalità indicate nel messaggio stesso. Qualora riceveste questo > messaggio senza esserne il destinatario, Vi preghiamo cortesemente di > darcene notizia via e-mail all'indirizzo in...@cr... o > telefonicamente allo +390587467700 e procedere alla distruzione del > messaggio stesso, cancellandolo dal Vostro sistema; costituisce > comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere > il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri > soggetti, copiarlo, od utilizzarlo per finalità, diverse. > This message and any attachments are solely for the intended recipient and > may contain confidential or privileged information. Its use is allowed only > to the intended recipient, for the purpose indicated in the message itself. > If you are not the intended recipient, please notify us by email to > in...@cr... or by phone to +390587467700 and permanently delete this > message and any attachments in your system. Keeping, disclosure also in > part, distribution to other recipients, copying of the information included > in this message and any attachments or using this information for different > purposes is prohibited as per regulation Dlgs 196/2003. > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Alessio T. <al...@cr...> - 2015-11-12 14:18:56
|
Hi, I think this is could be a correct way, can I resolve to re-instance DefaultServerAsterisk in the wrapper every x time? (Patch solution :)) I would like to resolve this question, with an elegant solution as manage invariant state of DefaultServerAsterisk. Thanks Ale Il 12/11/2015 14.09, Jhoan Orozco ha scritto: > Hello, > > I developed an app around 1 year ago, and happened me the same. I > could resolve this issue whith this. > > When i launch my app, i do it across of a shell Script (start.sh file) > but at the begining you have to add these lines: > > ulimit -u unlimited > ulimit -n 50000 > > > > > Your problem is when your app reaches the maximun amount of network > connections or files opened. > > this my script. > > #!/bin/bash > echo "Starting.." > ulimit -u unlimited > ulimit -n 50000 > java -cp asterisk-java.jar:. org.asteriskjava.fastagi.DefaultAgiServer & > echo "Started!" > > > 2015-11-12 3:11 GMT-05:00 Alessio Turini <al...@cr... > <mailto:al...@cr...>>: > > Dear, > I've a problem with the class DefaultAsteriskServer and the > connection with the Asterisk (V. 11.19.0), i'll try to explain > below (and sorry for my english) > > I develop a program that links inbound call with a couple of > events, I use the class DefaultAsteriskServer and the listener > addAsteriskServerListener(MyClass). > MyClass checks every call and makes different operation based on > type of call. > The program is ok but after 10/20 hours goes to Hollywood, this > means that the listener not link events. > The class DefaultAsteriskServer is declared in a static object > that wrap it. > I would to ask, there is a timeout of connection between Asterisk > and DefaultAsteriskServer , can i check the connection between the > two actor? > I tried to check the state of ManagerConnection (get by > getManagerConnection() on DefaultAsteriskServer ) but the result > is always connected and not help me to restablished a connection. > > Thanks in advance, Alessio > > > -- > *Dott. Alessio Turini* > IT Dept - Credires > Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy > +39 0587 467716 <tel:%2B39%200587%20467716> - +39 3457427943 > <tel:%2B39%203457427943> - a.t...@cr... > <mailto:a.t...@cr...> > Le informazioni contenute in questo messaggio di posta elettronica > e/o nel/i file/s allegato/i, sono da considerarsi strettamente > riservate. Il loro utilizzo è consentito esclusivamente al > destinatario del messaggio, per le finalità indicate nel messaggio > stesso. Qualora riceveste questo messaggio senza esserne il > destinatario, Vi preghiamo cortesemente di darcene notizia via > e-mail all'indirizzo in...@cr... <mailto:in...@cr...> o > telefonicamente allo +390587467700 <tel:%2B390587467700> e > procedere alla distruzione del messaggio stesso, cancellandolo dal > Vostro sistema; costituisce comportamento contrario ai principi > dettati dal Dlgs 196/2003 il trattenere il messaggio stesso, > divulgarlo anche in parte, distribuirlo ad altri soggetti, > copiarlo, od utilizzarlo per finalità, diverse. > This message and any attachments are solely for the intended > recipient and may contain confidential or privileged information. > Its use is allowed only to the intended recipient, for the purpose > indicated in the message itself. If you are not the intended > recipient, please notify us by email to in...@cr... > <mailto:in...@cr...> or by phone to +390587467700 > <tel:%2B390587467700> and permanently delete this message and any > attachments in your system. Keeping, disclosure also in part, > distribution to other recipients, copying of the information > included in this message and any attachments or using this > information for different purposes is prohibited as per regulation > Dlgs 196/2003. > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- *Dott. Alessio Turini* IT Dept - Credires Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy +39 0587 467716 - +39 3457427943 - a.t...@cr... Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail all'indirizzo in...@cr... o telefonicamente allo +390587467700 e procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema; costituisce comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità, diverse. This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. Its use is allowed only to the intended recipient, for the purpose indicated in the message itself. If you are not the intended recipient, please notify us by email to in...@cr... or by phone to +390587467700 and permanently delete this message and any attachments in your system. Keeping, disclosure also in part, distribution to other recipients, copying of the information included in this message and any attachments or using this information for different purposes is prohibited as per regulation Dlgs 196/2003. |
From: Alessio T. <al...@cr...> - 2015-11-12 14:12:49
|
Hi dear, I like you, I would to be your friend :), I use 1.0.0.CI-SNAPSHOT and asterisk and program are in differents hosts, some question below... - what is the different between Managerfactory and ServerAsterisk? - what is the best stable library of asterisk-java? - Is possible that Asterisk reload o restart, what is the best pratices to manage failure of connection? (for ServerAsterisk and ManagerFactory) Thanks Ale Il 12/11/2015 13.19, Yves ha scritto: > my thoughts after taking a quick look...: > > I don´t see something essentially wrong... the listener only works, as > long the object is "alive"... using it in a thread is ok, but i don´t > see the code that initializes and finally "runs" the thread.. > maybe you have deadslocks, or any other multithread related > problems... or just a network-problem... (are asterisk and your > programm running on different machines?) > getting the managerconnection the way you do it should work, but it > may be better to go the recommended way (don´t know your environment) > and use the managerfactory. > are you using at least the asterisk-java 1.0 api? > using a serverlistener does not fire much info... a > managereventlistener would give you much more information... > maybe the thread-sleeptime of 20secs is too long... > are you sure, that your asterisk is fine all the time? maybe there are > interference with reloads, crashes and so on? what do asterisk-logs > say (increase verbosity or use debug log) when connections failes? > normally the managerconnection reestablishes the socketconnection, but > this is not very stable... this only seems to work if the connection > breaks after issuing a command... so relying on the result of getState > is quite useless... you should fire an action to reliably check the > availability... this should of course be a command that does not > consume much resources.. e.g. core show version etc. > > yves > > > > > Am 12.11.2015 um 11:15 schrieb Alessio Turini: >> Ok, thanks for the answers. >> The code in answer is similar as mine, I try to insert a portion of >> project below , the class EventoAsterisk after a couple of hours(15 >> h) doesn't grab the events, >> There is a mode to check this type of connection? >> In the method run, i try to check mc object but the result is always >> connected. >> Thanks Ale >> >> >> class ManagerAsterisk extends Thread { >> >> private String host; >> private String user; >> private String psw; >> private DefaultAsteriskServer serverA; >> private ManagerConnection mc; >> private EventoAsterisk eventi; >> >> ManagerAsterisk(String host, String user, String psw) { >> Log.info("DefaultAsteriskServer start "); >> this.host= host; >> this.user= user; >> this.psw= psw; >> serverA = new DefaultAsteriskServer(host, user, psw); >> serverA.initialize(); >> >> mc = serverA.getManagerConnection(); >> >> >> } >> >> ManagerConnection getManagerConnection() { >> return serverA.getManagerConnection(); >> } >> >> void addAsteriskServerListener(EventoAsterisk eventi) { >> this.eventi = eventi; >> serverA.addAsteriskServerListener(eventi); >> } >> >> void removeAsteriskServerListener(EventoAsterisk eventi) { >> Log.info("ManagerAsterisk.removeAsteriskServerListener - >> eventi :" + eventi); >> serverA.removeAsteriskServerListener(eventi); >> } >> >> @Override >> public void run() { >> try { >> while (true) { >> Log.info("ManagerAsterisk.run - state (pre sleep) :" >> + mc.getState().name() + " - " + mc.getState()); >> Thread.sleep(20 * 1000); >> ManagerConnectionState stato = mc.getState(); >> Log.info("ManagerAsterisk.run - state :" + >> mc.getState().name() + " - " + mc.getState()); >> >> if (!stato.equals(ManagerConnectionState.INITIAL) && >> !stato.equals(ManagerConnectionState.CONNECTING) && >> !stato.equals(ManagerConnectionState.CONNECTED)) { >> Log.info("ManagerAsterisk.run - reacreate :" + >> stato); >> serverA = new DefaultAsteriskServer(host, user, psw); >> mc = serverA.getManagerConnection(); >> mc.addEventListener(new ConnessioneAsterisk()); >> serverA.addAsteriskServerListener(eventi); >> stato = mc.getState(); >> Log.info("ManagerAsterisk.run - reacreated :" + >> stato); >> } >> } >> } catch (InterruptedException ex) { >> Log.error("ManagerAsterisk.run" + ex, ex); >> } >> >> } >> } >> >> >> Il 12/11/2015 10.50, Zoumana TRAORE ha scritto: >>> Hi Alessio, >>> >>> You probably need to share a part of the code so we can help. >>> I assume you did not maintain some how you AMI Connection. >>> >>> Here is how i did it using PingThread provided by the AJ library >>> >>> @Autowired >>> private PingThread pingThread; >>> >>> /** >>> * <p> >>> * Connect to Asterisk Server via Live API >>> * </p> >>> * @return >>> */ >>> public void connect(){ >>> asteriskServer = new DefaultAsteriskServer(asteriskLiveHost, >>> asteriskUsername, asteriskPassword); >>> asteriskServer.initialize(); >>> pingThread.addConnection(asteriskServer.getManagerConnection()); >>> } >>> >>> >>> And you fire the PingThread for instance at your app boot-up >>> if(pingThread != null && !pingThread.isAlive()){ >>> pingThread.start(); >>> } >>> >>> >>> Regards, >>> *--- >>> * >>> >>> *Zoumana TRAORE* >>> >>> >>> 2015-11-12 10:28 GMT+01:00 Yves <yv...@gm... >>> <mailto:yv...@gm...>>: >>> >>> Hi Alessio, >>> >>> as my glassbowl is currently under repair, I cannot guess your >>> source code.... so why not append it to your next eMail so that >>> we can have a look at it? >>> >>> regards, >>> yves >>> >>> >>> Am 12.11.2015 um 09:11 schrieb Alessio Turini: >>>> Dear, >>>> I've a problem with the class DefaultAsteriskServer and the >>>> connection with the Asterisk (V. 11.19.0), i'll try to explain >>>> below (and sorry for my english) >>>> >>>> I develop a program that links inbound call with a couple of >>>> events, I use the class DefaultAsteriskServer and the listener >>>> addAsteriskServerListener(MyClass). >>>> MyClass checks every call and makes different operation based >>>> on type of call. >>>> The program is ok but after 10/20 hours goes to Hollywood, this >>>> means that the listener not link events. >>>> The class DefaultAsteriskServer is declared in a static object >>>> that wrap it. >>>> I would to ask, there is a timeout of connection between >>>> Asterisk and DefaultAsteriskServer , can i check the connection >>>> between the two actor? >>>> I tried to check the state of ManagerConnection (get by >>>> getManagerConnection() on DefaultAsteriskServer ) but the >>>> result is always connected and not help me to restablished a >>>> connection. >>>> >>>> Thanks in advance, Alessio >>>> >>>> >>>> -- >>>> *Dott. Alessio Turini* >>>> IT Dept - Credires >>>> Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy >>>> +39 0587 467716 <tel:%2B39%200587%20467716> - +39 3457427943 >>>> <tel:%2B39%203457427943> - a.t...@cr... >>>> Le informazioni contenute in questo messaggio di posta >>>> elettronica e/o nel/i file/s allegato/i, sono da considerarsi >>>> strettamente riservate. Il loro utilizzo è consentito >>>> esclusivamente al destinatario del messaggio, per le finalità >>>> indicate nel messaggio stesso. Qualora riceveste questo >>>> messaggio senza esserne il destinatario, Vi preghiamo >>>> cortesemente di darcene notizia via e-mail all'indirizzo >>>> in...@cr... o telefonicamente allo +390587467700 >>>> <tel:%2B390587467700> e procedere alla distruzione del >>>> messaggio stesso, cancellandolo dal Vostro sistema; costituisce >>>> comportamento contrario ai principi dettati dal Dlgs 196/2003 >>>> il trattenere il messaggio stesso, divulgarlo anche in parte, >>>> distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per >>>> finalità, diverse. >>>> This message and any attachments are solely for the intended >>>> recipient and may contain confidential or privileged >>>> information. Its use is allowed only to the intended recipient, >>>> for the purpose indicated in the message itself. If you are not >>>> the intended recipient, please notify us by email to >>>> in...@cr... or by phone to +390587467700 >>>> <tel:%2B390587467700> and permanently delete this message and >>>> any attachments in your system. Keeping, disclosure also in >>>> part, distribution to other recipients, copying of the >>>> information included in this message and any attachments or >>>> using this information for different purposes is prohibited as >>>> per regulation Dlgs 196/2003. >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> >>>> _______________________________________________ >>>> Asterisk-java-users mailing list >>>> Ast...@li... >>>> <mailto:Ast...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> ------------------------------------------------------------------------ >>> Avast logo <https://www.avast.com/antivirus> >>> >>> Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. >>> www.avast.com <https://www.avast.com/antivirus> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> -- >> *Dott. Alessio Turini* >> IT Dept - Credires >> Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy >> +39 0587 467716 - +39 3457427943 - a.t...@cr... >> Le informazioni contenute in questo messaggio di posta elettronica >> e/o nel/i file/s allegato/i, sono da considerarsi strettamente >> riservate. Il loro utilizzo è consentito esclusivamente al >> destinatario del messaggio, per le finalità indicate nel messaggio >> stesso. Qualora riceveste questo messaggio senza esserne il >> destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail >> all'indirizzo in...@cr... o telefonicamente allo +390587467700 e >> procedere alla distruzione del messaggio stesso, cancellandolo dal >> Vostro sistema; costituisce comportamento contrario ai principi >> dettati dal Dlgs 196/2003 il trattenere il messaggio stesso, >> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, >> od utilizzarlo per finalità, diverse. >> This message and any attachments are solely for the intended >> recipient and may contain confidential or privileged information. Its >> use is allowed only to the intended recipient, for the purpose >> indicated in the message itself. If you are not the intended >> recipient, please notify us by email to in...@cr... or by phone >> to +390587467700 and permanently delete this message and any >> attachments in your system. Keeping, disclosure also in part, >> distribution to other recipients, copying of the information included >> in this message and any attachments or using this information for >> different purposes is prohibited as per regulation Dlgs 196/2003. >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------ > Avast logo <https://www.avast.com/antivirus> > > Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. > www.avast.com <https://www.avast.com/antivirus> > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- *Dott. Alessio Turini* IT Dept - Credires Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy +39 0587 467716 - +39 3457427943 - a.t...@cr... Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail all'indirizzo in...@cr... o telefonicamente allo +390587467700 e procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema; costituisce comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità, diverse. This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. Its use is allowed only to the intended recipient, for the purpose indicated in the message itself. If you are not the intended recipient, please notify us by email to in...@cr... or by phone to +390587467700 and permanently delete this message and any attachments in your system. Keeping, disclosure also in part, distribution to other recipients, copying of the information included in this message and any attachments or using this information for different purposes is prohibited as per regulation Dlgs 196/2003. |
From: Jhoan O. <jho...@gm...> - 2015-11-12 13:09:45
|
Hello, I developed an app around 1 year ago, and happened me the same. I could resolve this issue whith this. When i launch my app, i do it across of a shell Script (start.sh file) but at the begining you have to add these lines: ulimit -u unlimited ulimit -n 50000 Your problem is when your app reaches the maximun amount of network connections or files opened. this my script. #!/bin/bash echo "Starting.." ulimit -u unlimited ulimit -n 50000 java -cp asterisk-java.jar:. org.asteriskjava.fastagi.DefaultAgiServer & echo "Started!" 2015-11-12 3:11 GMT-05:00 Alessio Turini <al...@cr...>: > Dear, > I've a problem with the class DefaultAsteriskServer and the connection > with the Asterisk (V. 11.19.0), i'll try to explain below (and sorry for my > english) > > I develop a program that links inbound call with a couple of events, I use > the class DefaultAsteriskServer and the listener > addAsteriskServerListener(MyClass). > MyClass checks every call and makes different operation based on type of > call. > The program is ok but after 10/20 hours goes to Hollywood, this means that > the listener not link events. > The class DefaultAsteriskServer is declared in a static object that wrap > it. > I would to ask, there is a timeout of connection between Asterisk and > DefaultAsteriskServer , can i check the connection between the two actor? > I tried to check the state of ManagerConnection (get by > getManagerConnection() on DefaultAsteriskServer ) but the result is always > connected and not help me to restablished a connection. > > Thanks in advance, Alessio > > > -- > *Dott. Alessio Turini* > IT Dept - Credires > Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy > +39 0587 467716 - +39 3457427943 - a.t...@cr... > Le informazioni contenute in questo messaggio di posta elettronica e/o > nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il > loro utilizzo è consentito esclusivamente al destinatario del messaggio, > per le finalità indicate nel messaggio stesso. Qualora riceveste questo > messaggio senza esserne il destinatario, Vi preghiamo cortesemente di > darcene notizia via e-mail all'indirizzo in...@cr... o > telefonicamente allo +390587467700 e procedere alla distruzione del > messaggio stesso, cancellandolo dal Vostro sistema; costituisce > comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere > il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri > soggetti, copiarlo, od utilizzarlo per finalità, diverse. > This message and any attachments are solely for the intended recipient and > may contain confidential or privileged information. Its use is allowed only > to the intended recipient, for the purpose indicated in the message itself. > If you are not the intended recipient, please notify us by email to > in...@cr... or by phone to +390587467700 and permanently delete this > message and any attachments in your system. Keeping, disclosure also in > part, distribution to other recipients, copying of the information included > in this message and any attachments or using this information for different > purposes is prohibited as per regulation Dlgs 196/2003. > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves <yv...@gm...> - 2015-11-12 12:19:39
|
my thoughts after taking a quick look...: I don´t see something essentially wrong... the listener only works, as long the object is "alive"... using it in a thread is ok, but i don´t see the code that initializes and finally "runs" the thread.. maybe you have deadslocks, or any other multithread related problems... or just a network-problem... (are asterisk and your programm running on different machines?) getting the managerconnection the way you do it should work, but it may be better to go the recommended way (don´t know your environment) and use the managerfactory. are you using at least the asterisk-java 1.0 api? using a serverlistener does not fire much info... a managereventlistener would give you much more information... maybe the thread-sleeptime of 20secs is too long... are you sure, that your asterisk is fine all the time? maybe there are interference with reloads, crashes and so on? what do asterisk-logs say (increase verbosity or use debug log) when connections failes? normally the managerconnection reestablishes the socketconnection, but this is not very stable... this only seems to work if the connection breaks after issuing a command... so relying on the result of getState is quite useless... you should fire an action to reliably check the availability... this should of course be a command that does not consume much resources.. e.g. core show version etc. yves Am 12.11.2015 um 11:15 schrieb Alessio Turini: > Ok, thanks for the answers. > The code in answer is similar as mine, I try to insert a portion of > project below , the class EventoAsterisk after a couple of hours(15 h) > doesn't grab the events, > There is a mode to check this type of connection? > In the method run, i try to check mc object but the result is always > connected. > Thanks Ale > > > class ManagerAsterisk extends Thread { > > private String host; > private String user; > private String psw; > private DefaultAsteriskServer serverA; > private ManagerConnection mc; > private EventoAsterisk eventi; > > ManagerAsterisk(String host, String user, String psw) { > Log.info("DefaultAsteriskServer start "); > this.host= host; > this.user= user; > this.psw= psw; > serverA = new DefaultAsteriskServer(host, user, psw); > serverA.initialize(); > > mc = serverA.getManagerConnection(); > > > } > > ManagerConnection getManagerConnection() { > return serverA.getManagerConnection(); > } > > void addAsteriskServerListener(EventoAsterisk eventi) { > this.eventi = eventi; > serverA.addAsteriskServerListener(eventi); > } > > void removeAsteriskServerListener(EventoAsterisk eventi) { > Log.info("ManagerAsterisk.removeAsteriskServerListener - > eventi :" + eventi); > serverA.removeAsteriskServerListener(eventi); > } > > @Override > public void run() { > try { > while (true) { > Log.info("ManagerAsterisk.run - state (pre sleep) :" + > mc.getState().name() + " - " + mc.getState()); > Thread.sleep(20 * 1000); > ManagerConnectionState stato = mc.getState(); > Log.info("ManagerAsterisk.run - state :" + > mc.getState().name() + " - " + mc.getState()); > > if (!stato.equals(ManagerConnectionState.INITIAL) && > !stato.equals(ManagerConnectionState.CONNECTING) && > !stato.equals(ManagerConnectionState.CONNECTED)) { > Log.info("ManagerAsterisk.run - reacreate :" + stato); > serverA = new DefaultAsteriskServer(host, user, psw); > mc = serverA.getManagerConnection(); > mc.addEventListener(new ConnessioneAsterisk()); > serverA.addAsteriskServerListener(eventi); > stato = mc.getState(); > Log.info("ManagerAsterisk.run - reacreated :" + > stato); > } > } > } catch (InterruptedException ex) { > Log.error("ManagerAsterisk.run" + ex, ex); > } > > } > } > > > Il 12/11/2015 10.50, Zoumana TRAORE ha scritto: >> Hi Alessio, >> >> You probably need to share a part of the code so we can help. >> I assume you did not maintain some how you AMI Connection. >> >> Here is how i did it using PingThread provided by the AJ library >> >> @Autowired >> private PingThread pingThread; >> >> /** >> * <p> >> * Connect to Asterisk Server via Live API >> * </p> >> * @return >> */ >> public void connect(){ >> asteriskServer = new DefaultAsteriskServer(asteriskLiveHost, >> asteriskUsername, asteriskPassword); >> asteriskServer.initialize(); >> pingThread.addConnection(asteriskServer.getManagerConnection()); >> } >> >> >> And you fire the PingThread for instance at your app boot-up >> if(pingThread != null && !pingThread.isAlive()){ >> pingThread.start(); >> } >> >> >> Regards, >> *--- >> * >> >> *Zoumana TRAORE* >> >> >> 2015-11-12 10:28 GMT+01:00 Yves <yv...@gm... <mailto:yv...@gm...>>: >> >> Hi Alessio, >> >> as my glassbowl is currently under repair, I cannot guess your >> source code.... so why not append it to your next eMail so that >> we can have a look at it? >> >> regards, >> yves >> >> >> Am 12.11.2015 um 09:11 schrieb Alessio Turini: >>> Dear, >>> I've a problem with the class DefaultAsteriskServer and the >>> connection with the Asterisk (V. 11.19.0), i'll try to explain >>> below (and sorry for my english) >>> >>> I develop a program that links inbound call with a couple of >>> events, I use the class DefaultAsteriskServer and the listener >>> addAsteriskServerListener(MyClass). >>> MyClass checks every call and makes different operation based on >>> type of call. >>> The program is ok but after 10/20 hours goes to Hollywood, this >>> means that the listener not link events. >>> The class DefaultAsteriskServer is declared in a static object >>> that wrap it. >>> I would to ask, there is a timeout of connection between >>> Asterisk and DefaultAsteriskServer , can i check the connection >>> between the two actor? >>> I tried to check the state of ManagerConnection (get by >>> getManagerConnection() on DefaultAsteriskServer ) but the result >>> is always connected and not help me to restablished a connection. >>> >>> Thanks in advance, Alessio >>> >>> >>> -- >>> *Dott. Alessio Turini* >>> IT Dept - Credires >>> Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy >>> +39 0587 467716 <tel:%2B39%200587%20467716> - +39 3457427943 >>> <tel:%2B39%203457427943> - a.t...@cr... >>> <mailto:a.t...@cr...> >>> Le informazioni contenute in questo messaggio di posta >>> elettronica e/o nel/i file/s allegato/i, sono da considerarsi >>> strettamente riservate. Il loro utilizzo è consentito >>> esclusivamente al destinatario del messaggio, per le finalità >>> indicate nel messaggio stesso. Qualora riceveste questo >>> messaggio senza esserne il destinatario, Vi preghiamo >>> cortesemente di darcene notizia via e-mail all'indirizzo >>> in...@cr... o telefonicamente allo +390587467700 >>> <tel:%2B390587467700> e procedere alla distruzione del messaggio >>> stesso, cancellandolo dal Vostro sistema; costituisce >>> comportamento contrario ai principi dettati dal Dlgs 196/2003 il >>> trattenere il messaggio stesso, divulgarlo anche in parte, >>> distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per >>> finalità, diverse. >>> This message and any attachments are solely for the intended >>> recipient and may contain confidential or privileged >>> information. Its use is allowed only to the intended recipient, >>> for the purpose indicated in the message itself. If you are not >>> the intended recipient, please notify us by email to >>> in...@cr... or by phone to +390587467700 >>> <tel:%2B390587467700> and permanently delete this message and >>> any attachments in your system. Keeping, disclosure also in >>> part, distribution to other recipients, copying of the >>> information included in this message and any attachments or >>> using this information for different purposes is prohibited as >>> per regulation Dlgs 196/2003. >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> ------------------------------------------------------------------------ >> Avast logo <https://www.avast.com/antivirus> >> >> Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. >> www.avast.com <https://www.avast.com/antivirus> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- > *Dott. Alessio Turini* > IT Dept - Credires > Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy > +39 0587 467716 - +39 3457427943 - a.t...@cr... > Le informazioni contenute in questo messaggio di posta elettronica e/o > nel/i file/s allegato/i, sono da considerarsi strettamente riservate. > Il loro utilizzo è consentito esclusivamente al destinatario del > messaggio, per le finalità indicate nel messaggio stesso. Qualora > riceveste questo messaggio senza esserne il destinatario, Vi preghiamo > cortesemente di darcene notizia via e-mail all'indirizzo > in...@cr... o telefonicamente allo +390587467700 e procedere alla > distruzione del messaggio stesso, cancellandolo dal Vostro sistema; > costituisce comportamento contrario ai principi dettati dal Dlgs > 196/2003 il trattenere il messaggio stesso, divulgarlo anche in parte, > distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità, > diverse. > This message and any attachments are solely for the intended recipient > and may contain confidential or privileged information. Its use is > allowed only to the intended recipient, for the purpose indicated in > the message itself. If you are not the intended recipient, please > notify us by email to in...@cr... or by phone to +390587467700 > and permanently delete this message and any attachments in your > system. Keeping, disclosure also in part, distribution to other > recipients, copying of the information included in this message and > any attachments or using this information for different purposes is > prohibited as per regulation Dlgs 196/2003. > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus |
From: Yves <yv...@gm...> - 2015-11-12 11:28:40
|
Hi, the internet is full of examples... even the docs show it...: https://maven.reucon.com/projects/public/asterisk-java/1.0.0/tutorial.html http://www.jcgonzalez.com/asterisk-handle-calls-with-java-example A google search on "asterisk-java agi example" results in tons of info. regards, yves Am 12.11.2015 um 10:41 schrieb Abdul Basit: > Hi all, > > I am new to asterisk, i would be very appreciate if any one would like > to share sample dial plan integration with AGI based on Java Eclipse. thx > > > I manage to setup Asterisk Environment in my machine. thx > > > > > > Regards, > AB > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus |
From: Alessio T. <al...@cr...> - 2015-11-12 10:15:53
|
Ok, thanks for the answers. The code in answer is similar as mine, I try to insert a portion of project below , the class EventoAsterisk after a couple of hours(15 h) doesn't grab the events, There is a mode to check this type of connection? In the method run, i try to check mc object but the result is always connected. Thanks Ale class ManagerAsterisk extends Thread { private String host; private String user; private String psw; private DefaultAsteriskServer serverA; private ManagerConnection mc; private EventoAsterisk eventi; ManagerAsterisk(String host, String user, String psw) { Log.info("DefaultAsteriskServer start "); this.host= host; this.user= user; this.psw= psw; serverA = new DefaultAsteriskServer(host, user, psw); serverA.initialize(); mc = serverA.getManagerConnection(); } ManagerConnection getManagerConnection() { return serverA.getManagerConnection(); } void addAsteriskServerListener(EventoAsterisk eventi) { this.eventi = eventi; serverA.addAsteriskServerListener(eventi); } void removeAsteriskServerListener(EventoAsterisk eventi) { Log.info("ManagerAsterisk.removeAsteriskServerListener - eventi :" + eventi); serverA.removeAsteriskServerListener(eventi); } @Override public void run() { try { while (true) { Log.info("ManagerAsterisk.run - state (pre sleep) :" + mc.getState().name() + " - " + mc.getState()); Thread.sleep(20 * 1000); ManagerConnectionState stato = mc.getState(); Log.info("ManagerAsterisk.run - state :" + mc.getState().name() + " - " + mc.getState()); if (!stato.equals(ManagerConnectionState.INITIAL) && !stato.equals(ManagerConnectionState.CONNECTING) && !stato.equals(ManagerConnectionState.CONNECTED)) { Log.info("ManagerAsterisk.run - reacreate :" + stato); serverA = new DefaultAsteriskServer(host, user, psw); mc = serverA.getManagerConnection(); mc.addEventListener(new ConnessioneAsterisk()); serverA.addAsteriskServerListener(eventi); stato = mc.getState(); Log.info("ManagerAsterisk.run - reacreated :" + stato); } } } catch (InterruptedException ex) { Log.error("ManagerAsterisk.run" + ex, ex); } } } Il 12/11/2015 10.50, Zoumana TRAORE ha scritto: > Hi Alessio, > > You probably need to share a part of the code so we can help. > I assume you did not maintain some how you AMI Connection. > > Here is how i did it using PingThread provided by the AJ library > > @Autowired > private PingThread pingThread; > > /** > * <p> > * Connect to Asterisk Server via Live API > * </p> > * @return > */ > public void connect(){ > asteriskServer = new DefaultAsteriskServer(asteriskLiveHost, > asteriskUsername, asteriskPassword); > asteriskServer.initialize(); > pingThread.addConnection(asteriskServer.getManagerConnection()); > } > > > And you fire the PingThread for instance at your app boot-up > if(pingThread != null && !pingThread.isAlive()){ > pingThread.start(); > } > > > Regards, > *--- > * > > *Zoumana TRAORE* > > > 2015-11-12 10:28 GMT+01:00 Yves <yv...@gm... <mailto:yv...@gm...>>: > > Hi Alessio, > > as my glassbowl is currently under repair, I cannot guess your > source code.... so why not append it to your next eMail so that we > can have a look at it? > > regards, > yves > > > Am 12.11.2015 um 09:11 schrieb Alessio Turini: >> Dear, >> I've a problem with the class DefaultAsteriskServer and the >> connection with the Asterisk (V. 11.19.0), i'll try to explain >> below (and sorry for my english) >> >> I develop a program that links inbound call with a couple of >> events, I use the class DefaultAsteriskServer and the listener >> addAsteriskServerListener(MyClass). >> MyClass checks every call and makes different operation based on >> type of call. >> The program is ok but after 10/20 hours goes to Hollywood, this >> means that the listener not link events. >> The class DefaultAsteriskServer is declared in a static object >> that wrap it. >> I would to ask, there is a timeout of connection between Asterisk >> and DefaultAsteriskServer , can i check the connection between >> the two actor? >> I tried to check the state of ManagerConnection (get by >> getManagerConnection() on DefaultAsteriskServer ) but the result >> is always connected and not help me to restablished a connection. >> >> Thanks in advance, Alessio >> >> >> -- >> *Dott. Alessio Turini* >> IT Dept - Credires >> Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy >> +39 0587 467716 <tel:%2B39%200587%20467716> - +39 3457427943 >> <tel:%2B39%203457427943> - a.t...@cr... >> <mailto:a.t...@cr...> >> Le informazioni contenute in questo messaggio di posta >> elettronica e/o nel/i file/s allegato/i, sono da considerarsi >> strettamente riservate. Il loro utilizzo è consentito >> esclusivamente al destinatario del messaggio, per le finalità >> indicate nel messaggio stesso. Qualora riceveste questo messaggio >> senza esserne il destinatario, Vi preghiamo cortesemente di >> darcene notizia via e-mail all'indirizzo in...@cr... >> <mailto:in...@cr...> o telefonicamente allo +390587467700 >> <tel:%2B390587467700> e procedere alla distruzione del messaggio >> stesso, cancellandolo dal Vostro sistema; costituisce >> comportamento contrario ai principi dettati dal Dlgs 196/2003 il >> trattenere il messaggio stesso, divulgarlo anche in parte, >> distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per >> finalità, diverse. >> This message and any attachments are solely for the intended >> recipient and may contain confidential or privileged information. >> Its use is allowed only to the intended recipient, for the >> purpose indicated in the message itself. If you are not the >> intended recipient, please notify us by email to in...@cr... >> <mailto:in...@cr...> or by phone to +390587467700 >> <tel:%2B390587467700> and permanently delete this message and any >> attachments in your system. Keeping, disclosure also in part, >> distribution to other recipients, copying of the information >> included in this message and any attachments or using this >> information for different purposes is prohibited as per >> regulation Dlgs 196/2003. >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------ > Avast logo <https://www.avast.com/antivirus> > > Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. > www.avast.com <https://www.avast.com/antivirus> > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- *Dott. Alessio Turini* IT Dept - Credires Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy +39 0587 467716 - +39 3457427943 - a.t...@cr... Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail all'indirizzo in...@cr... o telefonicamente allo +390587467700 e procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema; costituisce comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità, diverse. This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. Its use is allowed only to the intended recipient, for the purpose indicated in the message itself. If you are not the intended recipient, please notify us by email to in...@cr... or by phone to +390587467700 and permanently delete this message and any attachments in your system. Keeping, disclosure also in part, distribution to other recipients, copying of the information included in this message and any attachments or using this information for different purposes is prohibited as per regulation Dlgs 196/2003. |
From: Zoumana T. <zou...@gm...> - 2015-11-12 10:14:44
|
Hello, I think that you have to unsubscribe by yourself at https://lists.sourceforge.net/lists/listinfo/asterisk-java-users Regards *---* *Zoumana TRAORE* 2015-11-12 10:59 GMT+01:00 Oscar Alvarez <osc...@gm...>: > Hi, > > Can you remove my acount from the mail list? > > Thx > > Regards, > > -- > Oscar Alvarez > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Oscar A. <osc...@gm...> - 2015-11-12 09:59:54
|
Hi, Can you remove my acount from the mail list? Thx Regards, -- Oscar Alvarez |
From: Zoumana T. <zou...@gm...> - 2015-11-12 09:51:07
|
Hi Alessio, You probably need to share a part of the code so we can help. I assume you did not maintain some how you AMI Connection. Here is how i did it using PingThread provided by the AJ library @Autowired private PingThread pingThread; /** * <p> * Connect to Asterisk Server via Live API * </p> * @return */ public void connect(){ asteriskServer = new DefaultAsteriskServer(asteriskLiveHost, asteriskUsername, asteriskPassword); asteriskServer.initialize(); pingThread.addConnection(asteriskServer.getManagerConnection()); } And you fire the PingThread for instance at your app boot-up if(pingThread != null && !pingThread.isAlive()){ pingThread.start(); } Regards, *---* *Zoumana TRAORE* 2015-11-12 10:28 GMT+01:00 Yves <yv...@gm...>: > Hi Alessio, > > as my glassbowl is currently under repair, I cannot guess your source > code.... so why not append it to your next eMail so that we can have a look > at it? > > regards, > yves > > > Am 12.11.2015 um 09:11 schrieb Alessio Turini: > > Dear, > I've a problem with the class DefaultAsteriskServer and the connection > with the Asterisk (V. 11.19.0), i'll try to explain below (and sorry for my > english) > > I develop a program that links inbound call with a couple of events, I use > the class DefaultAsteriskServer and the listener > addAsteriskServerListener(MyClass). > MyClass checks every call and makes different operation based on type of > call. > The program is ok but after 10/20 hours goes to Hollywood, this means that > the listener not link events. > The class DefaultAsteriskServer is declared in a static object that wrap > it. > I would to ask, there is a timeout of connection between Asterisk and > DefaultAsteriskServer , can i check the connection between the two actor? > I tried to check the state of ManagerConnection (get by > getManagerConnection() on DefaultAsteriskServer ) but the result is always > connected and not help me to restablished a connection. > > Thanks in advance, Alessio > > > -- > *Dott. Alessio Turini* > IT Dept - Credires > Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy > +39 0587 467716 - +39 3457427943 - a.t...@cr... > Le informazioni contenute in questo messaggio di posta elettronica e/o > nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il > loro utilizzo è consentito esclusivamente al destinatario del messaggio, > per le finalità indicate nel messaggio stesso. Qualora riceveste questo > messaggio senza esserne il destinatario, Vi preghiamo cortesemente di > darcene notizia via e-mail all'indirizzo in...@cr... o > telefonicamente allo +390587467700 e procedere alla distruzione del > messaggio stesso, cancellandolo dal Vostro sistema; costituisce > comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere > il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri > soggetti, copiarlo, od utilizzarlo per finalità, diverse. > This message and any attachments are solely for the intended recipient and > may contain confidential or privileged information. Its use is allowed only > to the intended recipient, for the purpose indicated in the message itself. > If you are not the intended recipient, please notify us by email to > in...@cr... or by phone to +390587467700 and permanently delete this > message and any attachments in your system. Keeping, disclosure also in > part, distribution to other recipients, copying of the information included > in this message and any attachments or using this information for different > purposes is prohibited as per regulation Dlgs 196/2003. > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------ > [image: Avast logo] <https://www.avast.com/antivirus> > > Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. > www.avast.com <https://www.avast.com/antivirus> > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Abdul B. <bas...@ho...> - 2015-11-12 09:41:50
|
Hi all, I am new to asterisk, i would be very appreciate if any one would like to share sample dial plan integration with AGI based on Java Eclipse. thx I manage to setup Asterisk Environment in my machine. thx Regards, AB |
From: Yves <yv...@gm...> - 2015-11-12 09:29:08
|
Hi Alessio, as my glassbowl is currently under repair, I cannot guess your source code.... so why not append it to your next eMail so that we can have a look at it? regards, yves Am 12.11.2015 um 09:11 schrieb Alessio Turini: > Dear, > I've a problem with the class DefaultAsteriskServer and the > connection with the Asterisk (V. 11.19.0), i'll try to explain below > (and sorry for my english) > > I develop a program that links inbound call with a couple of events, I > use the class DefaultAsteriskServer and the listener > addAsteriskServerListener(MyClass). > MyClass checks every call and makes different operation based on type > of call. > The program is ok but after 10/20 hours goes to Hollywood, this means > that the listener not link events. > The class DefaultAsteriskServer is declared in a static object that > wrap it. > I would to ask, there is a timeout of connection between Asterisk and > DefaultAsteriskServer , can i check the connection between the two actor? > I tried to check the state of ManagerConnection (get by > getManagerConnection() on DefaultAsteriskServer ) but the result is > always connected and not help me to restablished a connection. > > Thanks in advance, Alessio > > > -- > *Dott. Alessio Turini* > IT Dept - Credires > Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy > +39 0587 467716 - +39 3457427943 - a.t...@cr... > Le informazioni contenute in questo messaggio di posta elettronica e/o > nel/i file/s allegato/i, sono da considerarsi strettamente riservate. > Il loro utilizzo è consentito esclusivamente al destinatario del > messaggio, per le finalità indicate nel messaggio stesso. Qualora > riceveste questo messaggio senza esserne il destinatario, Vi preghiamo > cortesemente di darcene notizia via e-mail all'indirizzo > in...@cr... o telefonicamente allo +390587467700 e procedere alla > distruzione del messaggio stesso, cancellandolo dal Vostro sistema; > costituisce comportamento contrario ai principi dettati dal Dlgs > 196/2003 il trattenere il messaggio stesso, divulgarlo anche in parte, > distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità, > diverse. > This message and any attachments are solely for the intended recipient > and may contain confidential or privileged information. Its use is > allowed only to the intended recipient, for the purpose indicated in > the message itself. If you are not the intended recipient, please > notify us by email to in...@cr... or by phone to +390587467700 > and permanently delete this message and any attachments in your > system. Keeping, disclosure also in part, distribution to other > recipients, copying of the information included in this message and > any attachments or using this information for different purposes is > prohibited as per regulation Dlgs 196/2003. > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus |
From: Alessio T. <al...@cr...> - 2015-11-12 08:30:50
|
Dear, I've a problem with the class DefaultAsteriskServer and the connection with the Asterisk (V. 11.19.0), i'll try to explain below (and sorry for my english) I develop a program that links inbound call with a couple of events, I use the class DefaultAsteriskServer and the listener addAsteriskServerListener(MyClass). MyClass checks every call and makes different operation based on type of call. The program is ok but after 10/20 hours goes to Hollywood, this means that the listener not link events. The class DefaultAsteriskServer is declared in a static object that wrap it. I would to ask, there is a timeout of connection between Asterisk and DefaultAsteriskServer , can i check the connection between the two actor? I tried to check the state of ManagerConnection (get by getManagerConnection() on DefaultAsteriskServer ) but the result is always connected and not help me to restablished a connection. Thanks in advance, Alessio -- *Dott. Alessio Turini* IT Dept - Credires Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy +39 0587 467716 - +39 3457427943 - a.t...@cr... Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail all'indirizzo in...@cr... o telefonicamente allo +390587467700 e procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema; costituisce comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità, diverse. This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. Its use is allowed only to the intended recipient, for the purpose indicated in the message itself. If you are not the intended recipient, please notify us by email to in...@cr... or by phone to +390587467700 and permanently delete this message and any attachments in your system. Keeping, disclosure also in part, distribution to other recipients, copying of the information included in this message and any attachments or using this information for different purposes is prohibited as per regulation Dlgs 196/2003. |
From: przeqpiciel <prz...@gm...> - 2015-10-05 04:58:10
|
if your really need looking for previous calls with incoming caller id then you really dont need agi/ami. Just do it with your dialplan and few query to your DB 2015-10-04 17:41 GMT+02:00 Emre Besirik <no...@gm...>: > Thanks for reply, > > I don’t have much time for this particular project but the project needs > is not much. > I’ve seen in some place that it can be set agi compatability in > /etc/asterisk/asterisk.conf (don’t know how though) > and maybe its enough for me. > all I need to do is; > > 1. get the previous call logs up to some point and their recordings > 2. register for future call events > 3. get all the phone book > > > And I’ve also seen the 2.0 snapshots. is it in a usable state at the > moment? or maybe if it’s not stable enough for production, do you think it > is ok to use 2.0 for a project simple is that? > > Which path should I take? > > Thanks > > Regards, > Emre Beşirik > no...@gm... > > > > On 04 Oct 2015, at 18:25, Faisal Iqbal <fi...@i2...> wrote: > > Yes asterisk Java supports up to 1.6 . you have to do the development > yourself to support new functionalities. > > Regards, > Faisal Iqbal > Sent from my Mobile > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Emre B. <no...@gm...> - 2015-10-04 15:42:02
|
Thanks for reply, I don’t have much time for this particular project but the project needs is not much. I’ve seen in some place that it can be set agi compatability in /etc/asterisk/asterisk.conf (don’t know how though) and maybe its enough for me. all I need to do is; get the previous call logs up to some point and their recordings register for future call events get all the phone book And I’ve also seen the 2.0 snapshots. is it in a usable state at the moment? or maybe if it’s not stable enough for production, do you think it is ok to use 2.0 for a project simple is that? Which path should I take? Thanks Regards, Emre Beşirik no...@gm... > On 04 Oct 2015, at 18:25, Faisal Iqbal <fi...@i2...> wrote: > > Yes asterisk Java supports up to 1.6 . you have to do the development yourself to support new functionalities. > > Regards, > Faisal Iqbal > Sent from my Mobile |
From: Emre B. <no...@gm...> - 2015-10-04 14:11:21
|
Hello list, I’m an Asterisk newbie and just need to develop a plug-in for it and while reading the docs I see the suported versions 1.0, 1.2 and 1.4 but when I checkout the versions from asterisk website I see 11.xx 12.xx (and my test server has 11.13.0) etc.. is there something I am missing or it’s just that asterisk-java support is very very old? Thanks Regards, Emre Beşirik no...@gm... |
From: Terrance D. <ter...@gm...> - 2015-09-05 04:29:49
|
Hello Everyone, We are using the standard server.originateToExtensionAsync(originateAction.getChannel(), originateAction.getContext(), originateAction.getExten(), originateAction.getPriority(), originateAction.getTimeout(), new CallerId("TEST", originateAction.getCallerId()), null, new OriginateCallback() { public void onDialing(final AsteriskChannel c) { channel = c; System.err.println("Dialing: " + channel); } public void onSuccess(AsteriskChannel c) { channel = c; System.out.println("Success: " + c); } public void onNoAnswer(AsteriskChannel c) { channel = c; System.out.println("No Answer: " + c.getState()); } public void onBusy(AsteriskChannel c) { channel = c; System.out.println("Busy: " + c); } public void onFailure(LiveException cause) { System.out.println("Failed: " + cause.getMessage()); } }); Thread.sleep(90000L); System.out.println("final state: " + channel); if (channel != null) { System.err.println("final state linked channels: " + channel.getLinkedChannelHistory()); } But it does not matter if I connect the call successfully, or busy on the other end, the calls always last on `onNoAnswer`. I really don't know how to check other than `c.getState` = up on a connected call. Thanks in Advance, Terrance |