asterisk-java-users Mailing List for Asterisk-Java Library (Page 18)
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: Diego G. <di...@pr...> - 2013-04-12 16:52:03
|
Friend, there is no listener for dtmf. You need to get these changes in the channel. Diego Augusto Costa Guimarães Gerente TI - Praia Clube *dCAP (Digium Certified Asterisk Professional)* Pabx: (34) 3256-3116 (Mobile) celular: (34) - 9268-9999 Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: die...@gm... On Fri, Apr 12, 2013 at 11:03 AM, vinethan jain <vin...@gm...> wrote: > i stil cant get even if i tried > String s= event.getDigit().toString(); > > > i need a listener for > > > public void onDtmfEvent(DtmfEvent e1) > { > String s= e1.getDigit().toString(); > System.out.println("s = "+s); > } > > > my main class is like this > or u can see below in my reply section > > public class El implements > ManagerFactoryParameters,ManagerEventListener,Serializable,EventListener > > when ever an dtmf event is captured my prog is not calling > onDtmfEvent(DtmfEvent e1); > > please i need help > > > my whole program > > > > import java.io.IOException; > import java.io.Serializable; > > import org.asteriskjava.manager.AuthenticationFailedException; > import org.asteriskjava.manager.ManagerConnection; > import org.asteriskjava.manager.ManagerConnectionFactory; > import org.asteriskjava.manager.ManagerEventListener; > import org.asteriskjava.manager.TimeoutException; > import org.asteriskjava.manager.action.EventGeneratingAction; > import org.asteriskjava.manager.action.StatusAction; > import org.asteriskjava.manager.event.ManagerEvent; > import org.asteriskjava.live.CallerId; > import org.asteriskjava.*; > import java.lang.Object; > import java.nio.channels.Channel; > > > import javax.net.ssl.ManagerFactoryParameters; > > import org.asteriskjava.live.*; > import org.asteriskjava.manager.*; > import org.asteriskjava.manager.action.*; > import org.asteriskjava.manager.event.*; > import org.asteriskjava.manager.internal.*; > import org.asteriskjava.manager.response.*; > import org.asteriskjava.util.*; > import org.asteriskjava.util.internal.*; > > import org.asteriskjava.live.*; > import org.asteriskjava.manager.action.PlayDtmfAction; > import org.asteriskjava.live.AsteriskServer; > import org.asteriskjava.live.AsteriskChannel; > import org.asteriskjava.live.AsteriskQueue; > import org.asteriskjava.live.MeetMeRoom; > import org.asteriskjava.live.DefaultAsteriskServer; > import org.asteriskjava.live.ManagerCommunicationException; > > > > > import org.asteriskjava.manager.event.ManagerEvent; > import org.asteriskjava.manager.event.DtmfEvent; > import java.util.EventObject; > import java.lang.Object; > import sunw.util.EventListener; > > > > public class El implements > ManagerFactoryParameters,ManagerEventListener,Serializable,EventListener > { > private ManagerConnection managerConnection; > private AsteriskServer asteriskServer; > > > > public El() throws IOException > { > asteriskServer = new DefaultAsteriskServer("xx.xx.xx.xx", > "asterisk", "vinethan"); > ManagerConnectionFactory factory = new > ManagerConnectionFactory("xx.xx.xx.xx", "asterisk", "vinethan"); > this.managerConnection = factory.createManagerConnection(); > > > } > > public void run() throws IOException, > AuthenticationFailedException,TimeoutException, > InterruptedException,ManagerCommunicationException > { > > managerConnection.addEventListener(this); > > > > > > int p = managerConnection.getPort(); > > managerConnection.login(); > > // request channel state > managerConnection.sendAction(new StatusAction()); > > > > > > > > Thread.sleep(100000); > > > System.out.print("s = "); > > > managerConnection.logoff(); > } > > public void onManagerEvent(ManagerEvent event) > { > > // just print received events > > System.out.println(event); > } > > public void onDtmfEvent(DtmfEvent e1) > { > String s= e1.getDigit().toString(); > System.out.println("s = "+s); > } > > public static void main(String[] args) throws Exception > { > El helloEvents; > helloEvents = new El(); > helloEvents.run(); > } > } > > > > On Fri, Apr 12, 2013 at 6:15 PM, < > ast...@li...> wrote: > >> Send Asterisk-java-users mailing list submissions to >> ast...@li... >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> or, via email, send a message with subject or body 'help' to >> ast...@li... >> >> You can reach the person managing the list at >> ast...@li... >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Asterisk-java-users digest..." >> >> >> Today's Topics: >> >> 1. Re: Asterisk-java-users Digest, Vol 82, Issue 3 (Diego Guimar?es) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 12 Apr 2013 09:45:02 -0300 >> From: Diego Guimar?es <di...@pr...> >> Subject: Re: [Asterisk-java-users] Asterisk-java-users Digest, Vol 82, >> Issue 3 >> To: ast...@li... >> Message-ID: >> <CAJWx+B5ze9jGVjcO-yXPpqvjnysC1L8vQi0Z9+7= >> px9...@ma...> >> Content-Type: text/plain; charset="iso-8859-1" >> >> you need change this: String s= e1.getDigit(); >> for >> >> String s= e1.getDigit().toString(); >> >> >> Diego Augusto Costa Guimar?es >> Gerente TI - Praia Clube >> *dCAP (Digium Certified Asterisk Professional)* >> Pabx: (34) 3256-3116 >> (Mobile) celular: (34) - 9268-9999 >> Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: >> die...@gm... >> >> >> On Fri, Apr 12, 2013 at 9:35 AM, vinethan jain <vin...@gm...> >> wrote: >> >> > i still cant get it can any one help me with full code please... >> > >> > >> > >> > On Fri, Apr 12, 2013 at 5:19 PM, < >> > ast...@li...> wrote: >> > >> >> Send Asterisk-java-users mailing list submissions to >> >> ast...@li... >> >> >> >> To subscribe or unsubscribe via the World Wide Web, visit >> >> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> or, via email, send a message with subject or body 'help' to >> >> ast...@li... >> >> >> >> You can reach the person managing the list at >> >> ast...@li... >> >> >> >> When replying, please edit your Subject line so it is more specific >> >> than "Re: Contents of Asterisk-java-users digest..." >> >> >> >> >> >> Today's Topics: >> >> >> >> 1. i am to log (vinethan jain) >> >> 2. need help in capturing dtmf event (vinethan jain) >> >> 3. Re: (no subject) (Diego Guimar?es) >> >> 4. Re: i am to log (Diego Guimar?es) >> >> >> >> >> >> ---------------------------------------------------------------------- >> >> >> >> Message: 1 >> >> Date: Fri, 12 Apr 2013 13:55:40 +0530 >> >> From: vinethan jain <vin...@gm...> >> >> Subject: [Asterisk-java-users] i am to log >> >> To: ast...@li... >> >> Message-ID: >> >> <CALPiqmcx3KBhFKC8oDEU3NUgH3rETyQvoARL1m3hJtk6rA= >> >> cc...@ma...> >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> >> >> i am able to print dtmf events but i need to capture that dtmf digit >> and >> >> store it in a string. >> >> >> >> please help me with the coding >> >> -------------- next part -------------- >> >> An HTML attachment was scrubbed... >> >> >> >> ------------------------------ >> >> >> >> Message: 2 >> >> Date: Fri, 12 Apr 2013 16:42:52 +0530 >> >> From: vinethan jain <vin...@gm...> >> >> Subject: [Asterisk-java-users] need help in capturing dtmf event >> >> To: ast...@li... >> >> Message-ID: >> >> < >> >> CAL...@ma...> >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> >> >> need help in capturing dtmf event, >> >> i am very new to this, >> >> any help will be greatly appreciated >> >> >> >> >> >> >> >> >> >> >> >> >> >> import java.io.IOException; >> >> import java.io.Serializable; >> >> >> >> import org.asteriskjava.manager.AuthenticationFailedException; >> >> import org.asteriskjava.manager.ManagerConnection; >> >> import org.asteriskjava.manager.ManagerConnectionFactory; >> >> import org.asteriskjava.manager.ManagerEventListener; >> >> import org.asteriskjava.manager.TimeoutException; >> >> import org.asteriskjava.manager.action.EventGeneratingAction; >> >> import org.asteriskjava.manager.action.StatusAction; >> >> import org.asteriskjava.manager.event.ManagerEvent; >> >> import org.asteriskjava.live.CallerId; >> >> import org.asteriskjava.*; >> >> import java.lang.Object; >> >> import java.nio.channels.Channel; >> >> import java.util.EventObject; >> >> >> >> import javax.net.ssl.ManagerFactoryParameters; >> >> >> >> import org.asteriskjava.live.*; >> >> import org.asteriskjava.manager.*; >> >> import org.asteriskjava.manager.action.*; >> >> import org.asteriskjava.manager.event.*; >> >> import org.asteriskjava.manager.internal.*; >> >> import org.asteriskjava.manager.response.*; >> >> import org.asteriskjava.util.*; >> >> import org.asteriskjava.util.internal.*; >> >> import org.asteriskjava.manager.event.ManagerEvent; >> >> import org.asteriskjava.live.*; >> >> import org.asteriskjava.manager.action.PlayDtmfAction; >> >> import org.asteriskjava.live.AsteriskServer; >> >> import org.asteriskjava.live.AsteriskChannel; >> >> import org.asteriskjava.live.AsteriskQueue; >> >> import org.asteriskjava.live.MeetMeRoom; >> >> import org.asteriskjava.live.DefaultAsteriskServer; >> >> import org.asteriskjava.live.ManagerCommunicationException; >> >> import java.util.EventObject; >> >> import com.sun.org.apache.xml.internal.dtm.DTMFilter; >> >> >> >> import org.asteriskjava.manager.event.DtmfEvent; >> >> >> >> import sunw.util.EventListener; >> >> >> >> >> >> >> >> public class El implements >> >> >> ManagerFactoryParameters,ManagerEventListener,Serializable,EventListener >> >> { >> >> private ManagerConnection managerConnection; >> >> >> >> >> >> >> >> >> >> public El() throws IOException >> >> { >> >> >> >> ManagerConnectionFactory factory = new >> >> ManagerConnectionFactory("10.20.52.100", "asterisk", "vinethan"); >> >> this.managerConnection = factory.createManagerConnection(); >> >> >> >> } >> >> >> >> public void run() throws IOException, >> >> AuthenticationFailedException,TimeoutException, >> >> InterruptedException,ManagerCommunicationException >> >> { >> >> >> >> managerConnection.addEventListener(this); >> >> >> >> >> >> >> >> >> >> >> >> int p = managerConnection.getPort(); >> >> >> >> managerConnection.login(); >> >> >> >> // request channel state >> >> managerConnection.sendAction(new StatusAction()); >> >> >> >> >> >> >> >> Thread.sleep(100000); >> >> managerConnection.logoff(); >> >> } >> >> >> >> public void onManagerEvent(ManagerEvent event) >> >> { >> >> // just print received events >> >> System.out.println(event); >> >> } >> >> >> >> public void onDtmfEvent(DtmfEvent e1) >> >> { >> >> String s= e1.getDigit(); >> >> System.out.println("s = "+s); >> >> } >> >> >> >> public static void main(String[] args) throws Exception >> >> { >> >> El helloEvents; >> >> helloEvents = new El(); >> >> helloEvents.run(); >> >> } >> >> } >> >> -------------- next part -------------- >> >> An HTML attachment was scrubbed... >> >> >> >> ------------------------------ >> >> >> >> Message: 3 >> >> Date: Fri, 12 Apr 2013 08:48:28 -0300 >> >> From: Diego Guimar?es <di...@pr...> >> >> Subject: Re: [Asterisk-java-users] (no subject) >> >> To: ast...@li... >> >> Message-ID: >> >> < >> >> CAJ...@ma...> >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> >> >> is, I already thought of that. But AJ is very wrong not to provide it, >> >> does >> >> anyone need this? I think it's essential. >> >> >> >> >> >> Diego Augusto Costa Guimar?es >> >> Gerente TI - Praia Clube >> >> *dCAP (Digium Certified Asterisk Professional)* >> >> Pabx: (34) 3256-3116 >> >> (Mobile) celular: (34) - 9268-9999 >> >> Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: >> >> die...@gm... >> >> >> >> >> >> On Fri, Apr 12, 2013 at 5:17 AM, Yves A. <yv...@gm...> wrote: >> >> >> >> > hi, >> >> > >> >> > if you fire a "core show channel <channelid> command from the cli you >> >> cann >> >> > see every info you need. >> >> > so, if you are in need of getting infos that AJ can?t provide, but >> the >> >> cli >> >> > can... then you can use >> >> > CommandAction Class from AJ to fire any command as if you were on cli >> >> and >> >> > parse the output. >> >> > >> >> > yves >> >> > >> >> > Am 12.04.2013 09:33, schrieb Shitian Long: >> >> > >> >> > I think you could try AsteriskServer class. probably you will find >> >> > the information you want. >> >> > >> >> > On Apr 1, 2013, at 8:41 PM, Diego Guimar?es <die...@gm...> >> >> wrote: >> >> > >> >> > how can I get the value of the cdr duration in the channel? because >> >> > CallDetailRecord is only created after the call is finished. >> >> > >> >> > Diego Augusto Costa Guimar?es >> >> > Gerente TI - Praia Clube >> >> > *dCAP (Digium Certified Asterisk Professional)* >> >> > Pabx: (34) 3256-3116 >> >> > (Mobile) celular: (34) - 9268-9999 >> >> > Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: >> >> > die...@gm... >> >> > >> >> > >> >> > >> >> >> ------------------------------------------------------------------------------ >> >> > Own the Future-Intel® Level Up Game Demo Contest 2013 >> >> > Rise to greatness in Intel's independent game demo contest. >> >> > Compete for recognition, cash, and the chance to get your game >> >> > on Steam. $5K grand prize plus 10 genre and skill prizes. >> >> > Submit your demo by 6/6/13. >> >> > >> >> >> http://p.sf.net/sfu/intel_levelupd2d_______________________________________________ >> >> > Asterisk-java-users mailing list >> >> > Ast...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> ------------------------------------------------------------------------------ >> >> > Precog is a next-generation analytics platform capable of advanced >> >> > analytics on semi-structured data. The platform includes APIs for >> >> building >> >> > apps and a phenomenal toolset for data science. Developers can use >> >> > our toolset for easy data analysis & visualization. Get a free >> account! >> >> http://www2.precog.com/precogplatform/slashdotnewsletter >> >> > >> >> > >> >> > >> >> > _______________________________________________ >> >> > Asterisk-java-users mailing listAsterisk-java-users >> >> @lists.sourceforge.nethttps:// >> >> lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> ------------------------------------------------------------------------------ >> >> > Precog is a next-generation analytics platform capable of advanced >> >> > analytics on semi-structured data. The platform includes APIs for >> >> building >> >> > apps and a phenomenal toolset for data science. Developers can use >> >> > our toolset for easy data analysis & visualization. Get a free >> account! >> >> > http://www2.precog.com/precogplatform/slashdotnewsletter >> >> > _______________________________________________ >> >> > Asterisk-java-users mailing list >> >> > Ast...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > >> >> > >> >> -------------- next part -------------- >> >> An HTML attachment was scrubbed... >> >> >> >> ------------------------------ >> >> >> >> Message: 4 >> >> Date: Fri, 12 Apr 2013 08:49:12 -0300 >> >> From: Diego Guimar?es <di...@pr...> >> >> Subject: Re: [Asterisk-java-users] i am to log >> >> To: ast...@li... >> >> Message-ID: >> >> < >> >> CAJ...@ma...> >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> >> >> asteriskChannel.getDtmfReceived().toString() >> >> >> >> >> >> Diego Augusto Costa Guimar?es >> >> Gerente TI - Praia Clube >> >> *dCAP (Digium Certified Asterisk Professional)* >> >> Pabx: (34) 3256-3116 >> >> (Mobile) celular: (34) - 9268-9999 >> >> Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: >> >> die...@gm... >> >> >> >> >> >> On Fri, Apr 12, 2013 at 5:25 AM, vinethan jain <vin...@gm...> >> >> wrote: >> >> >> >> > >> >> > i am able to print dtmf events but i need to capture that dtmf digit >> and >> >> > store it in a string. >> >> > >> >> > please help me with the coding >> >> > >> >> > >> >> > >> >> > >> >> >> ------------------------------------------------------------------------------ >> >> > Precog is a next-generation analytics platform capable of advanced >> >> > analytics on semi-structured data. The platform includes APIs for >> >> building >> >> > apps and a phenomenal toolset for data science. Developers can use >> >> > our toolset for easy data analysis & visualization. Get a free >> account! >> >> > http://www2.precog.com/precogplatform/slashdotnewsletter >> >> > _______________________________________________ >> >> > Asterisk-java-users mailing list >> >> > Ast...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > >> >> > >> >> -------------- next part -------------- >> >> An HTML attachment was scrubbed... >> >> >> >> ------------------------------ >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Precog is a next-generation analytics platform capable of advanced >> >> analytics on semi-structured data. The platform includes APIs for >> building >> >> apps and a phenomenal toolset for data science. Developers can use >> >> our toolset for easy data analysis & visualization. Get a free account! >> >> http://www2.precog.com/precogplatform/slashdotnewsletter >> >> >> >> ------------------------------ >> >> >> >> _______________________________________________ >> >> Asterisk-java-users mailing list >> >> Ast...@li... >> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> >> End of Asterisk-java-users Digest, Vol 82, Issue 3 >> >> ************************************************** >> >> >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Precog is a next-generation analytics platform capable of advanced >> > analytics on semi-structured data. The platform includes APIs for >> building >> > apps and a phenomenal toolset for data science. Developers can use >> > our toolset for easy data analysis & visualization. Get a free account! >> > http://www2.precog.com/precogplatform/slashdotnewsletter >> > _______________________________________________ >> > Asterisk-java-users mailing list >> > Ast...@li... >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> > >> > >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> >> ------------------------------ >> >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> >> ------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> End of Asterisk-java-users Digest, Vol 82, Issue 5 >> ************************************************** >> > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: vinethan j. <vin...@gm...> - 2013-04-12 14:03:18
|
i stil cant get even if i tried String s= event.getDigit().toString(); i need a listener for public void onDtmfEvent(DtmfEvent e1) { String s= e1.getDigit().toString(); System.out.println("s = "+s); } my main class is like this or u can see below in my reply section public class El implements ManagerFactoryParameters,ManagerEventListener,Serializable,EventListener when ever an dtmf event is captured my prog is not calling onDtmfEvent(DtmfEvent e1); please i need help my whole program import java.io.IOException; import java.io.Serializable; import org.asteriskjava.manager.AuthenticationFailedException; import org.asteriskjava.manager.ManagerConnection; import org.asteriskjava.manager.ManagerConnectionFactory; import org.asteriskjava.manager.ManagerEventListener; import org.asteriskjava.manager.TimeoutException; import org.asteriskjava.manager.action.EventGeneratingAction; import org.asteriskjava.manager.action.StatusAction; import org.asteriskjava.manager.event.ManagerEvent; import org.asteriskjava.live.CallerId; import org.asteriskjava.*; import java.lang.Object; import java.nio.channels.Channel; import javax.net.ssl.ManagerFactoryParameters; import org.asteriskjava.live.*; import org.asteriskjava.manager.*; import org.asteriskjava.manager.action.*; import org.asteriskjava.manager.event.*; import org.asteriskjava.manager.internal.*; import org.asteriskjava.manager.response.*; import org.asteriskjava.util.*; import org.asteriskjava.util.internal.*; import org.asteriskjava.live.*; import org.asteriskjava.manager.action.PlayDtmfAction; import org.asteriskjava.live.AsteriskServer; import org.asteriskjava.live.AsteriskChannel; import org.asteriskjava.live.AsteriskQueue; import org.asteriskjava.live.MeetMeRoom; import org.asteriskjava.live.DefaultAsteriskServer; import org.asteriskjava.live.ManagerCommunicationException; import org.asteriskjava.manager.event.ManagerEvent; import org.asteriskjava.manager.event.DtmfEvent; import java.util.EventObject; import java.lang.Object; import sunw.util.EventListener; public class El implements ManagerFactoryParameters,ManagerEventListener,Serializable,EventListener { private ManagerConnection managerConnection; private AsteriskServer asteriskServer; public El() throws IOException { asteriskServer = new DefaultAsteriskServer("xx.xx.xx.xx", "asterisk", "vinethan"); ManagerConnectionFactory factory = new ManagerConnectionFactory("xx.xx.xx.xx", "asterisk", "vinethan"); this.managerConnection = factory.createManagerConnection(); } public void run() throws IOException, AuthenticationFailedException,TimeoutException, InterruptedException,ManagerCommunicationException { managerConnection.addEventListener(this); int p = managerConnection.getPort(); managerConnection.login(); // request channel state managerConnection.sendAction(new StatusAction()); Thread.sleep(100000); System.out.print("s = "); managerConnection.logoff(); } public void onManagerEvent(ManagerEvent event) { // just print received events System.out.println(event); } public void onDtmfEvent(DtmfEvent e1) { String s= e1.getDigit().toString(); System.out.println("s = "+s); } public static void main(String[] args) throws Exception { El helloEvents; helloEvents = new El(); helloEvents.run(); } } On Fri, Apr 12, 2013 at 6:15 PM, < ast...@li...> wrote: > Send Asterisk-java-users mailing list submissions to > ast...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > or, via email, send a message with subject or body 'help' to > ast...@li... > > You can reach the person managing the list at > ast...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Asterisk-java-users digest..." > > > Today's Topics: > > 1. Re: Asterisk-java-users Digest, Vol 82, Issue 3 (Diego Guimar?es) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 12 Apr 2013 09:45:02 -0300 > From: Diego Guimar?es <di...@pr...> > Subject: Re: [Asterisk-java-users] Asterisk-java-users Digest, Vol 82, > Issue 3 > To: ast...@li... > Message-ID: > <CAJWx+B5ze9jGVjcO-yXPpqvjnysC1L8vQi0Z9+7= > px9...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > you need change this: String s= e1.getDigit(); > for > > String s= e1.getDigit().toString(); > > > Diego Augusto Costa Guimar?es > Gerente TI - Praia Clube > *dCAP (Digium Certified Asterisk Professional)* > Pabx: (34) 3256-3116 > (Mobile) celular: (34) - 9268-9999 > Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: > die...@gm... > > > On Fri, Apr 12, 2013 at 9:35 AM, vinethan jain <vin...@gm...> wrote: > > > i still cant get it can any one help me with full code please... > > > > > > > > On Fri, Apr 12, 2013 at 5:19 PM, < > > ast...@li...> wrote: > > > >> Send Asterisk-java-users mailing list submissions to > >> ast...@li... > >> > >> To subscribe or unsubscribe via the World Wide Web, visit > >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > >> or, via email, send a message with subject or body 'help' to > >> ast...@li... > >> > >> You can reach the person managing the list at > >> ast...@li... > >> > >> When replying, please edit your Subject line so it is more specific > >> than "Re: Contents of Asterisk-java-users digest..." > >> > >> > >> Today's Topics: > >> > >> 1. i am to log (vinethan jain) > >> 2. need help in capturing dtmf event (vinethan jain) > >> 3. Re: (no subject) (Diego Guimar?es) > >> 4. Re: i am to log (Diego Guimar?es) > >> > >> > >> ---------------------------------------------------------------------- > >> > >> Message: 1 > >> Date: Fri, 12 Apr 2013 13:55:40 +0530 > >> From: vinethan jain <vin...@gm...> > >> Subject: [Asterisk-java-users] i am to log > >> To: ast...@li... > >> Message-ID: > >> <CALPiqmcx3KBhFKC8oDEU3NUgH3rETyQvoARL1m3hJtk6rA= > >> cc...@ma...> > >> Content-Type: text/plain; charset="iso-8859-1" > >> > >> i am able to print dtmf events but i need to capture that dtmf digit and > >> store it in a string. > >> > >> please help me with the coding > >> -------------- next part -------------- > >> An HTML attachment was scrubbed... > >> > >> ------------------------------ > >> > >> Message: 2 > >> Date: Fri, 12 Apr 2013 16:42:52 +0530 > >> From: vinethan jain <vin...@gm...> > >> Subject: [Asterisk-java-users] need help in capturing dtmf event > >> To: ast...@li... > >> Message-ID: > >> < > >> CAL...@ma...> > >> Content-Type: text/plain; charset="iso-8859-1" > >> > >> need help in capturing dtmf event, > >> i am very new to this, > >> any help will be greatly appreciated > >> > >> > >> > >> > >> > >> > >> import java.io.IOException; > >> import java.io.Serializable; > >> > >> import org.asteriskjava.manager.AuthenticationFailedException; > >> import org.asteriskjava.manager.ManagerConnection; > >> import org.asteriskjava.manager.ManagerConnectionFactory; > >> import org.asteriskjava.manager.ManagerEventListener; > >> import org.asteriskjava.manager.TimeoutException; > >> import org.asteriskjava.manager.action.EventGeneratingAction; > >> import org.asteriskjava.manager.action.StatusAction; > >> import org.asteriskjava.manager.event.ManagerEvent; > >> import org.asteriskjava.live.CallerId; > >> import org.asteriskjava.*; > >> import java.lang.Object; > >> import java.nio.channels.Channel; > >> import java.util.EventObject; > >> > >> import javax.net.ssl.ManagerFactoryParameters; > >> > >> import org.asteriskjava.live.*; > >> import org.asteriskjava.manager.*; > >> import org.asteriskjava.manager.action.*; > >> import org.asteriskjava.manager.event.*; > >> import org.asteriskjava.manager.internal.*; > >> import org.asteriskjava.manager.response.*; > >> import org.asteriskjava.util.*; > >> import org.asteriskjava.util.internal.*; > >> import org.asteriskjava.manager.event.ManagerEvent; > >> import org.asteriskjava.live.*; > >> import org.asteriskjava.manager.action.PlayDtmfAction; > >> import org.asteriskjava.live.AsteriskServer; > >> import org.asteriskjava.live.AsteriskChannel; > >> import org.asteriskjava.live.AsteriskQueue; > >> import org.asteriskjava.live.MeetMeRoom; > >> import org.asteriskjava.live.DefaultAsteriskServer; > >> import org.asteriskjava.live.ManagerCommunicationException; > >> import java.util.EventObject; > >> import com.sun.org.apache.xml.internal.dtm.DTMFilter; > >> > >> import org.asteriskjava.manager.event.DtmfEvent; > >> > >> import sunw.util.EventListener; > >> > >> > >> > >> public class El implements > >> ManagerFactoryParameters,ManagerEventListener,Serializable,EventListener > >> { > >> private ManagerConnection managerConnection; > >> > >> > >> > >> > >> public El() throws IOException > >> { > >> > >> ManagerConnectionFactory factory = new > >> ManagerConnectionFactory("10.20.52.100", "asterisk", "vinethan"); > >> this.managerConnection = factory.createManagerConnection(); > >> > >> } > >> > >> public void run() throws IOException, > >> AuthenticationFailedException,TimeoutException, > >> InterruptedException,ManagerCommunicationException > >> { > >> > >> managerConnection.addEventListener(this); > >> > >> > >> > >> > >> > >> int p = managerConnection.getPort(); > >> > >> managerConnection.login(); > >> > >> // request channel state > >> managerConnection.sendAction(new StatusAction()); > >> > >> > >> > >> Thread.sleep(100000); > >> managerConnection.logoff(); > >> } > >> > >> public void onManagerEvent(ManagerEvent event) > >> { > >> // just print received events > >> System.out.println(event); > >> } > >> > >> public void onDtmfEvent(DtmfEvent e1) > >> { > >> String s= e1.getDigit(); > >> System.out.println("s = "+s); > >> } > >> > >> public static void main(String[] args) throws Exception > >> { > >> El helloEvents; > >> helloEvents = new El(); > >> helloEvents.run(); > >> } > >> } > >> -------------- next part -------------- > >> An HTML attachment was scrubbed... > >> > >> ------------------------------ > >> > >> Message: 3 > >> Date: Fri, 12 Apr 2013 08:48:28 -0300 > >> From: Diego Guimar?es <di...@pr...> > >> Subject: Re: [Asterisk-java-users] (no subject) > >> To: ast...@li... > >> Message-ID: > >> < > >> CAJ...@ma...> > >> Content-Type: text/plain; charset="iso-8859-1" > >> > >> is, I already thought of that. But AJ is very wrong not to provide it, > >> does > >> anyone need this? I think it's essential. > >> > >> > >> Diego Augusto Costa Guimar?es > >> Gerente TI - Praia Clube > >> *dCAP (Digium Certified Asterisk Professional)* > >> Pabx: (34) 3256-3116 > >> (Mobile) celular: (34) - 9268-9999 > >> Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: > >> die...@gm... > >> > >> > >> On Fri, Apr 12, 2013 at 5:17 AM, Yves A. <yv...@gm...> wrote: > >> > >> > hi, > >> > > >> > if you fire a "core show channel <channelid> command from the cli you > >> cann > >> > see every info you need. > >> > so, if you are in need of getting infos that AJ can?t provide, but the > >> cli > >> > can... then you can use > >> > CommandAction Class from AJ to fire any command as if you were on cli > >> and > >> > parse the output. > >> > > >> > yves > >> > > >> > Am 12.04.2013 09:33, schrieb Shitian Long: > >> > > >> > I think you could try AsteriskServer class. probably you will find > >> > the information you want. > >> > > >> > On Apr 1, 2013, at 8:41 PM, Diego Guimar?es <die...@gm...> > >> wrote: > >> > > >> > how can I get the value of the cdr duration in the channel? because > >> > CallDetailRecord is only created after the call is finished. > >> > > >> > Diego Augusto Costa Guimar?es > >> > Gerente TI - Praia Clube > >> > *dCAP (Digium Certified Asterisk Professional)* > >> > Pabx: (34) 3256-3116 > >> > (Mobile) celular: (34) - 9268-9999 > >> > Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: > >> > die...@gm... > >> > > >> > > >> > > >> > ------------------------------------------------------------------------------ > >> > Own the Future-Intel® Level Up Game Demo Contest 2013 > >> > Rise to greatness in Intel's independent game demo contest. > >> > Compete for recognition, cash, and the chance to get your game > >> > on Steam. $5K grand prize plus 10 genre and skill prizes. > >> > Submit your demo by 6/6/13. > >> > > >> > http://p.sf.net/sfu/intel_levelupd2d_______________________________________________ > >> > Asterisk-java-users mailing list > >> > Ast...@li... > >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > >> > > >> > > >> > > >> > > >> > > >> > ------------------------------------------------------------------------------ > >> > Precog is a next-generation analytics platform capable of advanced > >> > analytics on semi-structured data. The platform includes APIs for > >> building > >> > apps and a phenomenal toolset for data science. Developers can use > >> > our toolset for easy data analysis & visualization. Get a free > account! > >> http://www2.precog.com/precogplatform/slashdotnewsletter > >> > > >> > > >> > > >> > _______________________________________________ > >> > Asterisk-java-users mailing listAsterisk-java-users > >> @lists.sourceforge.nethttps:// > >> lists.sourceforge.net/lists/listinfo/asterisk-java-users > >> > > >> > > >> > > >> > > >> > > >> > ------------------------------------------------------------------------------ > >> > Precog is a next-generation analytics platform capable of advanced > >> > analytics on semi-structured data. The platform includes APIs for > >> building > >> > apps and a phenomenal toolset for data science. Developers can use > >> > our toolset for easy data analysis & visualization. Get a free > account! > >> > http://www2.precog.com/precogplatform/slashdotnewsletter > >> > _______________________________________________ > >> > Asterisk-java-users mailing list > >> > Ast...@li... > >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > >> > > >> > > >> -------------- next part -------------- > >> An HTML attachment was scrubbed... > >> > >> ------------------------------ > >> > >> Message: 4 > >> Date: Fri, 12 Apr 2013 08:49:12 -0300 > >> From: Diego Guimar?es <di...@pr...> > >> Subject: Re: [Asterisk-java-users] i am to log > >> To: ast...@li... > >> Message-ID: > >> < > >> CAJ...@ma...> > >> Content-Type: text/plain; charset="iso-8859-1" > >> > >> asteriskChannel.getDtmfReceived().toString() > >> > >> > >> Diego Augusto Costa Guimar?es > >> Gerente TI - Praia Clube > >> *dCAP (Digium Certified Asterisk Professional)* > >> Pabx: (34) 3256-3116 > >> (Mobile) celular: (34) - 9268-9999 > >> Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: > >> die...@gm... > >> > >> > >> On Fri, Apr 12, 2013 at 5:25 AM, vinethan jain <vin...@gm...> > >> wrote: > >> > >> > > >> > i am able to print dtmf events but i need to capture that dtmf digit > and > >> > store it in a string. > >> > > >> > please help me with the coding > >> > > >> > > >> > > >> > > >> > ------------------------------------------------------------------------------ > >> > Precog is a next-generation analytics platform capable of advanced > >> > analytics on semi-structured data. The platform includes APIs for > >> building > >> > apps and a phenomenal toolset for data science. Developers can use > >> > our toolset for easy data analysis & visualization. Get a free > account! > >> > http://www2.precog.com/precogplatform/slashdotnewsletter > >> > _______________________________________________ > >> > Asterisk-java-users mailing list > >> > Ast...@li... > >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > >> > > >> > > >> -------------- next part -------------- > >> An HTML attachment was scrubbed... > >> > >> ------------------------------ > >> > >> > >> > ------------------------------------------------------------------------------ > >> Precog is a next-generation analytics platform capable of advanced > >> analytics on semi-structured data. The platform includes APIs for > building > >> apps and a phenomenal toolset for data science. Developers can use > >> our toolset for easy data analysis & visualization. Get a free account! > >> http://www2.precog.com/precogplatform/slashdotnewsletter > >> > >> ------------------------------ > >> > >> _______________________________________________ > >> Asterisk-java-users mailing list > >> Ast...@li... > >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > >> > >> > >> End of Asterisk-java-users Digest, Vol 82, Issue 3 > >> ************************************************** > >> > > > > > > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of advanced > > analytics on semi-structured data. The platform includes APIs for > building > > apps and a phenomenal toolset for data science. Developers can use > > our toolset for easy data analysis & visualization. Get a free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > ------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > End of Asterisk-java-users Digest, Vol 82, Issue 5 > ************************************************** > |
From: Diego G. <di...@pr...> - 2013-04-12 12:45:11
|
you need change this: String s= e1.getDigit(); for String s= e1.getDigit().toString(); Diego Augusto Costa Guimarães Gerente TI - Praia Clube *dCAP (Digium Certified Asterisk Professional)* Pabx: (34) 3256-3116 (Mobile) celular: (34) - 9268-9999 Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: die...@gm... On Fri, Apr 12, 2013 at 9:35 AM, vinethan jain <vin...@gm...> wrote: > i still cant get it can any one help me with full code please... > > > > On Fri, Apr 12, 2013 at 5:19 PM, < > ast...@li...> wrote: > >> Send Asterisk-java-users mailing list submissions to >> ast...@li... >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> or, via email, send a message with subject or body 'help' to >> ast...@li... >> >> You can reach the person managing the list at >> ast...@li... >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Asterisk-java-users digest..." >> >> >> Today's Topics: >> >> 1. i am to log (vinethan jain) >> 2. need help in capturing dtmf event (vinethan jain) >> 3. Re: (no subject) (Diego Guimar?es) >> 4. Re: i am to log (Diego Guimar?es) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 12 Apr 2013 13:55:40 +0530 >> From: vinethan jain <vin...@gm...> >> Subject: [Asterisk-java-users] i am to log >> To: ast...@li... >> Message-ID: >> <CALPiqmcx3KBhFKC8oDEU3NUgH3rETyQvoARL1m3hJtk6rA= >> cc...@ma...> >> Content-Type: text/plain; charset="iso-8859-1" >> >> i am able to print dtmf events but i need to capture that dtmf digit and >> store it in a string. >> >> please help me with the coding >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> >> ------------------------------ >> >> Message: 2 >> Date: Fri, 12 Apr 2013 16:42:52 +0530 >> From: vinethan jain <vin...@gm...> >> Subject: [Asterisk-java-users] need help in capturing dtmf event >> To: ast...@li... >> Message-ID: >> < >> CAL...@ma...> >> Content-Type: text/plain; charset="iso-8859-1" >> >> need help in capturing dtmf event, >> i am very new to this, >> any help will be greatly appreciated >> >> >> >> >> >> >> import java.io.IOException; >> import java.io.Serializable; >> >> import org.asteriskjava.manager.AuthenticationFailedException; >> import org.asteriskjava.manager.ManagerConnection; >> import org.asteriskjava.manager.ManagerConnectionFactory; >> import org.asteriskjava.manager.ManagerEventListener; >> import org.asteriskjava.manager.TimeoutException; >> import org.asteriskjava.manager.action.EventGeneratingAction; >> import org.asteriskjava.manager.action.StatusAction; >> import org.asteriskjava.manager.event.ManagerEvent; >> import org.asteriskjava.live.CallerId; >> import org.asteriskjava.*; >> import java.lang.Object; >> import java.nio.channels.Channel; >> import java.util.EventObject; >> >> import javax.net.ssl.ManagerFactoryParameters; >> >> import org.asteriskjava.live.*; >> import org.asteriskjava.manager.*; >> import org.asteriskjava.manager.action.*; >> import org.asteriskjava.manager.event.*; >> import org.asteriskjava.manager.internal.*; >> import org.asteriskjava.manager.response.*; >> import org.asteriskjava.util.*; >> import org.asteriskjava.util.internal.*; >> import org.asteriskjava.manager.event.ManagerEvent; >> import org.asteriskjava.live.*; >> import org.asteriskjava.manager.action.PlayDtmfAction; >> import org.asteriskjava.live.AsteriskServer; >> import org.asteriskjava.live.AsteriskChannel; >> import org.asteriskjava.live.AsteriskQueue; >> import org.asteriskjava.live.MeetMeRoom; >> import org.asteriskjava.live.DefaultAsteriskServer; >> import org.asteriskjava.live.ManagerCommunicationException; >> import java.util.EventObject; >> import com.sun.org.apache.xml.internal.dtm.DTMFilter; >> >> import org.asteriskjava.manager.event.DtmfEvent; >> >> import sunw.util.EventListener; >> >> >> >> public class El implements >> ManagerFactoryParameters,ManagerEventListener,Serializable,EventListener >> { >> private ManagerConnection managerConnection; >> >> >> >> >> public El() throws IOException >> { >> >> ManagerConnectionFactory factory = new >> ManagerConnectionFactory("10.20.52.100", "asterisk", "vinethan"); >> this.managerConnection = factory.createManagerConnection(); >> >> } >> >> public void run() throws IOException, >> AuthenticationFailedException,TimeoutException, >> InterruptedException,ManagerCommunicationException >> { >> >> managerConnection.addEventListener(this); >> >> >> >> >> >> int p = managerConnection.getPort(); >> >> managerConnection.login(); >> >> // request channel state >> managerConnection.sendAction(new StatusAction()); >> >> >> >> Thread.sleep(100000); >> managerConnection.logoff(); >> } >> >> public void onManagerEvent(ManagerEvent event) >> { >> // just print received events >> System.out.println(event); >> } >> >> public void onDtmfEvent(DtmfEvent e1) >> { >> String s= e1.getDigit(); >> System.out.println("s = "+s); >> } >> >> public static void main(String[] args) throws Exception >> { >> El helloEvents; >> helloEvents = new El(); >> helloEvents.run(); >> } >> } >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> >> ------------------------------ >> >> Message: 3 >> Date: Fri, 12 Apr 2013 08:48:28 -0300 >> From: Diego Guimar?es <di...@pr...> >> Subject: Re: [Asterisk-java-users] (no subject) >> To: ast...@li... >> Message-ID: >> < >> CAJ...@ma...> >> Content-Type: text/plain; charset="iso-8859-1" >> >> is, I already thought of that. But AJ is very wrong not to provide it, >> does >> anyone need this? I think it's essential. >> >> >> Diego Augusto Costa Guimar?es >> Gerente TI - Praia Clube >> *dCAP (Digium Certified Asterisk Professional)* >> Pabx: (34) 3256-3116 >> (Mobile) celular: (34) - 9268-9999 >> Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: >> die...@gm... >> >> >> On Fri, Apr 12, 2013 at 5:17 AM, Yves A. <yv...@gm...> wrote: >> >> > hi, >> > >> > if you fire a "core show channel <channelid> command from the cli you >> cann >> > see every info you need. >> > so, if you are in need of getting infos that AJ can?t provide, but the >> cli >> > can... then you can use >> > CommandAction Class from AJ to fire any command as if you were on cli >> and >> > parse the output. >> > >> > yves >> > >> > Am 12.04.2013 09:33, schrieb Shitian Long: >> > >> > I think you could try AsteriskServer class. probably you will find >> > the information you want. >> > >> > On Apr 1, 2013, at 8:41 PM, Diego Guimar?es <die...@gm...> >> wrote: >> > >> > how can I get the value of the cdr duration in the channel? because >> > CallDetailRecord is only created after the call is finished. >> > >> > Diego Augusto Costa Guimar?es >> > Gerente TI - Praia Clube >> > *dCAP (Digium Certified Asterisk Professional)* >> > Pabx: (34) 3256-3116 >> > (Mobile) celular: (34) - 9268-9999 >> > Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: >> > die...@gm... >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Own the Future-Intel® Level Up Game Demo Contest 2013 >> > Rise to greatness in Intel's independent game demo contest. >> > Compete for recognition, cash, and the chance to get your game >> > on Steam. $5K grand prize plus 10 genre and skill prizes. >> > Submit your demo by 6/6/13. >> > >> http://p.sf.net/sfu/intel_levelupd2d_______________________________________________ >> > Asterisk-java-users mailing list >> > Ast...@li... >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> > >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Precog is a next-generation analytics platform capable of advanced >> > analytics on semi-structured data. The platform includes APIs for >> building >> > apps and a phenomenal toolset for data science. Developers can use >> > our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> > >> > >> > >> > _______________________________________________ >> > Asterisk-java-users mailing listAsterisk-java-users >> @lists.sourceforge.nethttps:// >> lists.sourceforge.net/lists/listinfo/asterisk-java-users >> > >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Precog is a next-generation analytics platform capable of advanced >> > analytics on semi-structured data. The platform includes APIs for >> building >> > apps and a phenomenal toolset for data science. Developers can use >> > our toolset for easy data analysis & visualization. Get a free account! >> > http://www2.precog.com/precogplatform/slashdotnewsletter >> > _______________________________________________ >> > Asterisk-java-users mailing list >> > Ast...@li... >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> > >> > >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> >> ------------------------------ >> >> Message: 4 >> Date: Fri, 12 Apr 2013 08:49:12 -0300 >> From: Diego Guimar?es <di...@pr...> >> Subject: Re: [Asterisk-java-users] i am to log >> To: ast...@li... >> Message-ID: >> < >> CAJ...@ma...> >> Content-Type: text/plain; charset="iso-8859-1" >> >> asteriskChannel.getDtmfReceived().toString() >> >> >> Diego Augusto Costa Guimar?es >> Gerente TI - Praia Clube >> *dCAP (Digium Certified Asterisk Professional)* >> Pabx: (34) 3256-3116 >> (Mobile) celular: (34) - 9268-9999 >> Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: >> die...@gm... >> >> >> On Fri, Apr 12, 2013 at 5:25 AM, vinethan jain <vin...@gm...> >> wrote: >> >> > >> > i am able to print dtmf events but i need to capture that dtmf digit and >> > store it in a string. >> > >> > please help me with the coding >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Precog is a next-generation analytics platform capable of advanced >> > analytics on semi-structured data. The platform includes APIs for >> building >> > apps and a phenomenal toolset for data science. Developers can use >> > our toolset for easy data analysis & visualization. Get a free account! >> > http://www2.precog.com/precogplatform/slashdotnewsletter >> > _______________________________________________ >> > Asterisk-java-users mailing list >> > Ast...@li... >> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> > >> > >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> >> ------------------------------ >> >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> >> ------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> End of Asterisk-java-users Digest, Vol 82, Issue 3 >> ************************************************** >> > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: vinethan j. <vin...@gm...> - 2013-04-12 12:35:13
|
i still cant get it can any one help me with full code please... On Fri, Apr 12, 2013 at 5:19 PM, < ast...@li...> wrote: > Send Asterisk-java-users mailing list submissions to > ast...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > or, via email, send a message with subject or body 'help' to > ast...@li... > > You can reach the person managing the list at > ast...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Asterisk-java-users digest..." > > > Today's Topics: > > 1. i am to log (vinethan jain) > 2. need help in capturing dtmf event (vinethan jain) > 3. Re: (no subject) (Diego Guimar?es) > 4. Re: i am to log (Diego Guimar?es) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 12 Apr 2013 13:55:40 +0530 > From: vinethan jain <vin...@gm...> > Subject: [Asterisk-java-users] i am to log > To: ast...@li... > Message-ID: > <CALPiqmcx3KBhFKC8oDEU3NUgH3rETyQvoARL1m3hJtk6rA= > cc...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > i am able to print dtmf events but i need to capture that dtmf digit and > store it in a string. > > please help me with the coding > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 2 > Date: Fri, 12 Apr 2013 16:42:52 +0530 > From: vinethan jain <vin...@gm...> > Subject: [Asterisk-java-users] need help in capturing dtmf event > To: ast...@li... > Message-ID: > < > CAL...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > need help in capturing dtmf event, > i am very new to this, > any help will be greatly appreciated > > > > > > > import java.io.IOException; > import java.io.Serializable; > > import org.asteriskjava.manager.AuthenticationFailedException; > import org.asteriskjava.manager.ManagerConnection; > import org.asteriskjava.manager.ManagerConnectionFactory; > import org.asteriskjava.manager.ManagerEventListener; > import org.asteriskjava.manager.TimeoutException; > import org.asteriskjava.manager.action.EventGeneratingAction; > import org.asteriskjava.manager.action.StatusAction; > import org.asteriskjava.manager.event.ManagerEvent; > import org.asteriskjava.live.CallerId; > import org.asteriskjava.*; > import java.lang.Object; > import java.nio.channels.Channel; > import java.util.EventObject; > > import javax.net.ssl.ManagerFactoryParameters; > > import org.asteriskjava.live.*; > import org.asteriskjava.manager.*; > import org.asteriskjava.manager.action.*; > import org.asteriskjava.manager.event.*; > import org.asteriskjava.manager.internal.*; > import org.asteriskjava.manager.response.*; > import org.asteriskjava.util.*; > import org.asteriskjava.util.internal.*; > import org.asteriskjava.manager.event.ManagerEvent; > import org.asteriskjava.live.*; > import org.asteriskjava.manager.action.PlayDtmfAction; > import org.asteriskjava.live.AsteriskServer; > import org.asteriskjava.live.AsteriskChannel; > import org.asteriskjava.live.AsteriskQueue; > import org.asteriskjava.live.MeetMeRoom; > import org.asteriskjava.live.DefaultAsteriskServer; > import org.asteriskjava.live.ManagerCommunicationException; > import java.util.EventObject; > import com.sun.org.apache.xml.internal.dtm.DTMFilter; > > import org.asteriskjava.manager.event.DtmfEvent; > > import sunw.util.EventListener; > > > > public class El implements > ManagerFactoryParameters,ManagerEventListener,Serializable,EventListener > { > private ManagerConnection managerConnection; > > > > > public El() throws IOException > { > > ManagerConnectionFactory factory = new > ManagerConnectionFactory("10.20.52.100", "asterisk", "vinethan"); > this.managerConnection = factory.createManagerConnection(); > > } > > public void run() throws IOException, > AuthenticationFailedException,TimeoutException, > InterruptedException,ManagerCommunicationException > { > > managerConnection.addEventListener(this); > > > > > > int p = managerConnection.getPort(); > > managerConnection.login(); > > // request channel state > managerConnection.sendAction(new StatusAction()); > > > > Thread.sleep(100000); > managerConnection.logoff(); > } > > public void onManagerEvent(ManagerEvent event) > { > // just print received events > System.out.println(event); > } > > public void onDtmfEvent(DtmfEvent e1) > { > String s= e1.getDigit(); > System.out.println("s = "+s); > } > > public static void main(String[] args) throws Exception > { > El helloEvents; > helloEvents = new El(); > helloEvents.run(); > } > } > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 3 > Date: Fri, 12 Apr 2013 08:48:28 -0300 > From: Diego Guimar?es <di...@pr...> > Subject: Re: [Asterisk-java-users] (no subject) > To: ast...@li... > Message-ID: > < > CAJ...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > is, I already thought of that. But AJ is very wrong not to provide it, does > anyone need this? I think it's essential. > > > Diego Augusto Costa Guimar?es > Gerente TI - Praia Clube > *dCAP (Digium Certified Asterisk Professional)* > Pabx: (34) 3256-3116 > (Mobile) celular: (34) - 9268-9999 > Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: > die...@gm... > > > On Fri, Apr 12, 2013 at 5:17 AM, Yves A. <yv...@gm...> wrote: > > > hi, > > > > if you fire a "core show channel <channelid> command from the cli you > cann > > see every info you need. > > so, if you are in need of getting infos that AJ can?t provide, but the > cli > > can... then you can use > > CommandAction Class from AJ to fire any command as if you were on cli and > > parse the output. > > > > yves > > > > Am 12.04.2013 09:33, schrieb Shitian Long: > > > > I think you could try AsteriskServer class. probably you will find > > the information you want. > > > > On Apr 1, 2013, at 8:41 PM, Diego Guimar?es <die...@gm...> > wrote: > > > > how can I get the value of the cdr duration in the channel? because > > CallDetailRecord is only created after the call is finished. > > > > Diego Augusto Costa Guimar?es > > Gerente TI - Praia Clube > > *dCAP (Digium Certified Asterisk Professional)* > > Pabx: (34) 3256-3116 > > (Mobile) celular: (34) - 9268-9999 > > Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: > > die...@gm... > > > > > > > ------------------------------------------------------------------------------ > > Own the Future-Intel® Level Up Game Demo Contest 2013 > > Rise to greatness in Intel's independent game demo contest. > > Compete for recognition, cash, and the chance to get your game > > on Steam. $5K grand prize plus 10 genre and skill prizes. > > Submit your demo by 6/6/13. > > > http://p.sf.net/sfu/intel_levelupd2d_______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of advanced > > analytics on semi-structured data. The platform includes APIs for > building > > apps and a phenomenal toolset for data science. Developers can use > > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > > > > > > > _______________________________________________ > > Asterisk-java-users mailing listAsterisk-java-users > @lists.sourceforge.nethttps:// > lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of advanced > > analytics on semi-structured data. The platform includes APIs for > building > > apps and a phenomenal toolset for data science. Developers can use > > our toolset for easy data analysis & visualization. Get a free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 4 > Date: Fri, 12 Apr 2013 08:49:12 -0300 > From: Diego Guimar?es <di...@pr...> > Subject: Re: [Asterisk-java-users] i am to log > To: ast...@li... > Message-ID: > < > CAJ...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > asteriskChannel.getDtmfReceived().toString() > > > Diego Augusto Costa Guimar?es > Gerente TI - Praia Clube > *dCAP (Digium Certified Asterisk Professional)* > Pabx: (34) 3256-3116 > (Mobile) celular: (34) - 9268-9999 > Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: > die...@gm... > > > On Fri, Apr 12, 2013 at 5:25 AM, vinethan jain <vin...@gm...> wrote: > > > > > i am able to print dtmf events but i need to capture that dtmf digit and > > store it in a string. > > > > please help me with the coding > > > > > > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of advanced > > analytics on semi-structured data. The platform includes APIs for > building > > apps and a phenomenal toolset for data science. Developers can use > > our toolset for easy data analysis & visualization. Get a free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > ------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > End of Asterisk-java-users Digest, Vol 82, Issue 3 > ************************************************** > |
From: Diego G. <di...@pr...> - 2013-04-12 11:50:21
|
use to.string() in e1.getDigit(); Diego Augusto Costa Guimarães Gerente TI - Praia Clube *dCAP (Digium Certified Asterisk Professional)* Pabx: (34) 3256-3116 (Mobile) celular: (34) - 9268-9999 Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: die...@gm... On Fri, Apr 12, 2013 at 8:12 AM, vinethan jain <vin...@gm...> wrote: > need help in capturing dtmf event, > i am very new to this, > any help will be greatly appreciated > > > > > > > import java.io.IOException; > import java.io.Serializable; > > import org.asteriskjava.manager.AuthenticationFailedException; > import org.asteriskjava.manager.ManagerConnection; > import org.asteriskjava.manager.ManagerConnectionFactory; > import org.asteriskjava.manager.ManagerEventListener; > import org.asteriskjava.manager.TimeoutException; > import org.asteriskjava.manager.action.EventGeneratingAction; > import org.asteriskjava.manager.action.StatusAction; > import org.asteriskjava.manager.event.ManagerEvent; > import org.asteriskjava.live.CallerId; > import org.asteriskjava.*; > import java.lang.Object; > import java.nio.channels.Channel; > import java.util.EventObject; > > import javax.net.ssl.ManagerFactoryParameters; > > import org.asteriskjava.live.*; > import org.asteriskjava.manager.*; > import org.asteriskjava.manager.action.*; > import org.asteriskjava.manager.event.*; > import org.asteriskjava.manager.internal.*; > import org.asteriskjava.manager.response.*; > import org.asteriskjava.util.*; > import org.asteriskjava.util.internal.*; > import org.asteriskjava.manager.event.ManagerEvent; > import org.asteriskjava.live.*; > import org.asteriskjava.manager.action.PlayDtmfAction; > import org.asteriskjava.live.AsteriskServer; > import org.asteriskjava.live.AsteriskChannel; > import org.asteriskjava.live.AsteriskQueue; > import org.asteriskjava.live.MeetMeRoom; > import org.asteriskjava.live.DefaultAsteriskServer; > import org.asteriskjava.live.ManagerCommunicationException; > import java.util.EventObject; > import com.sun.org.apache.xml.internal.dtm.DTMFilter; > > import org.asteriskjava.manager.event.DtmfEvent; > > import sunw.util.EventListener; > > > > public class El implements > ManagerFactoryParameters,ManagerEventListener,Serializable,EventListener > { > private ManagerConnection managerConnection; > > > > > public El() throws IOException > { > > ManagerConnectionFactory factory = new > ManagerConnectionFactory("10.20.52.100", "asterisk", "vinethan"); > this.managerConnection = factory.createManagerConnection(); > > } > > public void run() throws IOException, > AuthenticationFailedException,TimeoutException, > InterruptedException,ManagerCommunicationException > { > > managerConnection.addEventListener(this); > > > > > > int p = managerConnection.getPort(); > > managerConnection.login(); > > // request channel state > managerConnection.sendAction(new StatusAction()); > > > > Thread.sleep(100000); > managerConnection.logoff(); > } > > public void onManagerEvent(ManagerEvent event) > { > // just print received events > System.out.println(event); > } > > public void onDtmfEvent(DtmfEvent e1) > { > String s= e1.getDigit(); > System.out.println("s = "+s); > } > > public static void main(String[] args) throws Exception > { > El helloEvents; > helloEvents = new El(); > helloEvents.run(); > } > } > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Diego G. <di...@pr...> - 2013-04-12 11:49:20
|
asteriskChannel.getDtmfReceived().toString() Diego Augusto Costa Guimarães Gerente TI - Praia Clube *dCAP (Digium Certified Asterisk Professional)* Pabx: (34) 3256-3116 (Mobile) celular: (34) - 9268-9999 Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: die...@gm... On Fri, Apr 12, 2013 at 5:25 AM, vinethan jain <vin...@gm...> wrote: > > i am able to print dtmf events but i need to capture that dtmf digit and > store it in a string. > > please help me with the coding > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Diego G. <di...@pr...> - 2013-04-12 11:48:35
|
is, I already thought of that. But AJ is very wrong not to provide it, does anyone need this? I think it's essential. Diego Augusto Costa Guimarães Gerente TI - Praia Clube *dCAP (Digium Certified Asterisk Professional)* Pabx: (34) 3256-3116 (Mobile) celular: (34) - 9268-9999 Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: die...@gm... On Fri, Apr 12, 2013 at 5:17 AM, Yves A. <yv...@gm...> wrote: > hi, > > if you fire a "core show channel <channelid> command from the cli you cann > see every info you need. > so, if you are in need of getting infos that AJ can´t provide, but the cli > can... then you can use > CommandAction Class from AJ to fire any command as if you were on cli and > parse the output. > > yves > > Am 12.04.2013 09:33, schrieb Shitian Long: > > I think you could try AsteriskServer class. probably you will find > the information you want. > > On Apr 1, 2013, at 8:41 PM, Diego Guimarães <die...@gm...> wrote: > > how can I get the value of the cdr duration in the channel? because > CallDetailRecord is only created after the call is finished. > > Diego Augusto Costa Guimarães > Gerente TI - Praia Clube > *dCAP (Digium Certified Asterisk Professional)* > Pabx: (34) 3256-3116 > (Mobile) celular: (34) - 9268-9999 > Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: > die...@gm... > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. > http://p.sf.net/sfu/intel_levelupd2d_______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account!http://www2.precog.com/precogplatform/slashdotnewsletter > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: vinethan j. <vin...@gm...> - 2013-04-12 11:12:59
|
need help in capturing dtmf event, i am very new to this, any help will be greatly appreciated import java.io.IOException; import java.io.Serializable; import org.asteriskjava.manager.AuthenticationFailedException; import org.asteriskjava.manager.ManagerConnection; import org.asteriskjava.manager.ManagerConnectionFactory; import org.asteriskjava.manager.ManagerEventListener; import org.asteriskjava.manager.TimeoutException; import org.asteriskjava.manager.action.EventGeneratingAction; import org.asteriskjava.manager.action.StatusAction; import org.asteriskjava.manager.event.ManagerEvent; import org.asteriskjava.live.CallerId; import org.asteriskjava.*; import java.lang.Object; import java.nio.channels.Channel; import java.util.EventObject; import javax.net.ssl.ManagerFactoryParameters; import org.asteriskjava.live.*; import org.asteriskjava.manager.*; import org.asteriskjava.manager.action.*; import org.asteriskjava.manager.event.*; import org.asteriskjava.manager.internal.*; import org.asteriskjava.manager.response.*; import org.asteriskjava.util.*; import org.asteriskjava.util.internal.*; import org.asteriskjava.manager.event.ManagerEvent; import org.asteriskjava.live.*; import org.asteriskjava.manager.action.PlayDtmfAction; import org.asteriskjava.live.AsteriskServer; import org.asteriskjava.live.AsteriskChannel; import org.asteriskjava.live.AsteriskQueue; import org.asteriskjava.live.MeetMeRoom; import org.asteriskjava.live.DefaultAsteriskServer; import org.asteriskjava.live.ManagerCommunicationException; import java.util.EventObject; import com.sun.org.apache.xml.internal.dtm.DTMFilter; import org.asteriskjava.manager.event.DtmfEvent; import sunw.util.EventListener; public class El implements ManagerFactoryParameters,ManagerEventListener,Serializable,EventListener { private ManagerConnection managerConnection; public El() throws IOException { ManagerConnectionFactory factory = new ManagerConnectionFactory("10.20.52.100", "asterisk", "vinethan"); this.managerConnection = factory.createManagerConnection(); } public void run() throws IOException, AuthenticationFailedException,TimeoutException, InterruptedException,ManagerCommunicationException { managerConnection.addEventListener(this); int p = managerConnection.getPort(); managerConnection.login(); // request channel state managerConnection.sendAction(new StatusAction()); Thread.sleep(100000); managerConnection.logoff(); } public void onManagerEvent(ManagerEvent event) { // just print received events System.out.println(event); } public void onDtmfEvent(DtmfEvent e1) { String s= e1.getDigit(); System.out.println("s = "+s); } public static void main(String[] args) throws Exception { El helloEvents; helloEvents = new El(); helloEvents.run(); } } |
From: vinethan j. <vin...@gm...> - 2013-04-12 08:25:46
|
i am able to print dtmf events but i need to capture that dtmf digit and store it in a string. please help me with the coding |
From: Yves A. <yv...@gm...> - 2013-04-12 08:16:38
|
hi, if you fire a "core show channel <channelid> command from the cli you cann see every info you need. so, if you are in need of getting infos that AJ can´t provide, but the cli can... then you can use CommandAction Class from AJ to fire any command as if you were on cli and parse the output. yves Am 12.04.2013 09:33, schrieb Shitian Long: > I think you could try AsteriskServer class. probably you will find > the information you want. > > On Apr 1, 2013, at 8:41 PM, Diego Guimarães <die...@gm... > <mailto:die...@gm...>> wrote: > >> how can I get the value of the cdr duration in the channel? because >> CallDetailRecord is only created after the call is finished. >> >> Diego Augusto Costa Guimarães >> Gerente TI - Praia Clube >> /dCAP (Digium Certified Asterisk Professional)/ >> Pabx: (34) 3256-3116 >> (Mobile) celular: (34) - 9268-9999 >> Chat Google Talk: die...@gm... <mailto:die...@gm...> >> Skype: diegoacguimares MSN: die...@gm... >> <mailto:die...@gm...> >> >> ------------------------------------------------------------------------------ >> Own the Future-Intel® Level Up Game Demo Contest 2013 >> Rise to greatness in Intel's independent game demo contest. >> Compete for recognition, cash, and the chance to get your game >> on Steam. $5K grand prize plus 10 genre and skill prizes. >> Submit your demo by 6/6/13. >> http://p.sf.net/sfu/intel_levelupd2d_______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Shitian L. <lon...@gm...> - 2013-04-12 07:34:00
|
I think you could try AsteriskServer class. probably you will find the information you want. On Apr 1, 2013, at 8:41 PM, Diego Guimarães <die...@gm...> wrote: > how can I get the value of the cdr duration in the channel? because CallDetailRecord is only created after the call is finished. > > Diego Augusto Costa Guimarães > Gerente TI - Praia Clube > dCAP (Digium Certified Asterisk Professional) > Pabx: (34) 3256-3116 > (Mobile) celular: (34) - 9268-9999 > Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: die...@gm... > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d_______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: sekar <che...@re...> - 2013-04-12 07:21:33
|
1. HOW TO GET DTMF EVENTS LOGGED IN CLI ?2. HOW TO CAPTURE A DTMF EVENT? - Manager Event |
From: Yves A. <yv...@gm...> - 2013-04-11 09:02:02
|
hi, thats the wrong approach... the java-agi scripts are handled by the agi-server, not by an app server like tomcat... there is a tutorial on how to use (start / stop / mapping) the agi server on the page where your link points to. yves Am 11.04.2013 10:49, schrieb Oscar Alvarez: > Yes, > > But I need info to create the servlet. > > In dialplan, I put anything like this: > > exten => 1001,1,AGI(agi://ip_Tomcat/app1) > > > I like that app1 answer tha call and hangup. > > > import net.sf.asterisk.fastagi.AGIChannel; > import net.sf.asterisk.fastagi.AGIException; > import net.sf.asterisk.fastagi.AGIRequest; > import net.sf.asterisk.fastagi.AbstractAGIScript; > > public class HelloAGIScript extends AbstractAGIScript > { > public void service(AGIRequest request, AGIChannel channel) > throws AGIException > { > // Answer the channel... > answer(channel); > > > // ...and hangup. > hangup(channel); > } > } > What is the mode tu mapping this?? > I wold find a tutorial likethis <http://www.asterisk-java.org/0.2/tutorial.html> but running in a Tomcat. > Thxx > > > 2013/4/11 Yves A. <yv...@gm... <mailto:yv...@gm...>> > > hi, > > you just have to put the asterisk-java jar file in the library > path of your tomcat (tomcat/lib) or your web-app (WEB-INF/lib). > > yves > > Am 11.04.2013 09:29, schrieb Oscar Alvarez: >> Hi, >> >> Where can I find some info for this. I need deploy the >> asterisk-java in a Tomcat servlet. >> Do you know any tutorial? >> >> Thxxx >> >> -- >> Oscar Alvarez >> >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for > building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free > account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -- > Oscar Alvarez > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Oscar A. <osc...@gm...> - 2013-04-11 08:49:24
|
Yes, But I need info to create the servlet. In dialplan, I put anything like this: exten => 1001,1,AGI(agi://ip_Tomcat/app1) I like that app1 answer tha call and hangup. import net.sf.asterisk.fastagi.AGIChannel; import net.sf.asterisk.fastagi.AGIException; import net.sf.asterisk.fastagi.AGIRequest; import net.sf.asterisk.fastagi.AbstractAGIScript; public class HelloAGIScript extends AbstractAGIScript { public void service(AGIRequest request, AGIChannel channel) throws AGIException { // Answer the channel... answer(channel); // ...and hangup. hangup(channel); } } What is the mode tu mapping this?? I wold find a tutorial like this <http://www.asterisk-java.org/0.2/tutorial.html> but running in a Tomcat. Thxx 2013/4/11 Yves A. <yv...@gm...> > hi, > > you just have to put the asterisk-java jar file in the library path of > your tomcat (tomcat/lib) or your web-app (WEB-INF/lib). > > yves > > Am 11.04.2013 09:29, schrieb Oscar Alvarez: > > Hi, > > Where can I find some info for this. I need deploy the asterisk-java in > a Tomcat servlet. > Do you know any tutorial? > > Thxxx > > -- > Oscar Alvarez > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account!http://www2.precog.com/precogplatform/slashdotnewsletter > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Oscar Alvarez |
From: Yves A. <yv...@gm...> - 2013-04-11 08:32:41
|
hi, you just have to put the asterisk-java jar file in the library path of your tomcat (tomcat/lib) or your web-app (WEB-INF/lib). yves Am 11.04.2013 09:29, schrieb Oscar Alvarez: > Hi, > > Where can I find some info for this. I need deploy the asterisk-java > in a Tomcat servlet. > Do you know any tutorial? > > Thxxx > > -- > Oscar Alvarez > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Oscar A. <osc...@gm...> - 2013-04-11 07:29:54
|
Hi, Where can I find some info for this. I need deploy the asterisk-java in a Tomcat servlet. Do you know any tutorial? Thxxx -- Oscar Alvarez |
From: GregLHorton <gre...@gm...> - 2013-04-08 00:14:21
|
I am trying to figure out how to force a transfer to voicemail. I can transfer calls between my lines fine, but I need to be able to force a caller to my VM or anybody else's VM. Any help appreciated! -Greg -- View this message in context: http://old.nabble.com/How-to-Transfer-to-Voicemail-using-A-J-tp35261716p35261716.html Sent from the Asterisk-Java Users mailing list archive at Nabble.com. |
From: GregLHorton <gre...@gm...> - 2013-04-08 00:14:03
|
Hi all, I have an app with a dialer module, that can dial into a conference normally. If my conference room is 1024, then I can pass 1024 to initiateCall() to dial into the conference. If a password is required, digits entered in the dialer do not get passed to the endpoint that detects the password digits. THis is because I normally use PlayDtmfAction for this purpose and that requires a channel like SIP/100-000034ab. I do not see where this type of channel identifier is applicable to the conference room I just dialed into. This is using MeetMe on Asterisk 10.0. I tried things like MEETME_ROOMNUM=1024, MEETME/1024, etc with no luck. Just wild guesses of course :). Any help appreciated! Greg -- View this message in context: http://old.nabble.com/Can%27t-play-DTMF-from-my-dialer-app-to-conference-endpoint-tp35261710p35261710.html Sent from the Asterisk-Java Users mailing list archive at Nabble.com. |
From: Diego G. <die...@gm...> - 2013-04-01 18:41:56
|
how can I get the value of the cdr duration in the channel? because CallDetailRecord is only created after the call is finished. Diego Augusto Costa Guimarães Gerente TI - Praia Clube *dCAP (Digium Certified Asterisk Professional)* Pabx: (34) 3256-3116 (Mobile) celular: (34) - 9268-9999 Chat Google Talk: die...@gm... Skype: diegoacguimares MSN: die...@gm... |
From: Salman J. <sal...@gm...> - 2013-03-25 13:50:26
|
Thanks a lot for clear explanation, it worked. Just want to share what I did with the community: In extensions_custom.conf: [from-internal-custom] include => invoke-fastagi [invoke-fastagi] exten => 1001,1,AGI(agi://192.168.1.106/hello.agi) In FreePBX UI, created a Custom Destination: invoke-fastagi,1001,1 Reconfigured my Inbound Route to point to the created custom destination instead of 1001 Extension. Called from my phone, and my Java program executed smoothly! Thanks, Salman On Mon, Mar 25, 2013 at 4:41 AM, Yves A. <yv...@gm...> wrote: > Hi, > > this question is more related to freepbx than asterisk-java... but anyway: > > it looks like your inbound route tries to make a call to your extension > 1001 as a SIP call, not as an AGI call... > check your freepbx-settings... the inbound route shout not point to an > extension, but to a custom destination instead. > you have to declare the custom destination via freepbx webfrontend and > afterward write this custom destination > in the appropriate config file where in turn you call your java-AGI (like > the way you did in your context written in your question).. > > regards, > yves > > > Am 25.03.2013 03:12, schrieb Salman Jamali: > > Hi, > > I am having difficulty in configuring an inbound route for asterisk-java: > callcentric sip did -> freepbx distro/asterisk -> asterisk-java (this > fails) > callcentric sip did -> freepbx distro/asterisk -> X-Lite (works smoothly) > > My configuration is FreePBX Distro 2.210 w/ Asterisk 1.8.20 on CentOS. I > successfully configured my callcentric sip trunk, an extension, and an > inbound route. I can receive calls on X-lite. Now, I am trying to work my > way through the Asterisk-java FastAGI tutorial to be able to handle inbound > calls in my subclass of BaseAgiScript. But before my java code gets > invoked, asterisk aborts the call. Following is the relevant information > (please ask for anything else if required): > > -------------------------------------------------------------------------------------------------------------------------------------------- > Asterisk-java Log: (no activity here) > > prompt$ java -jar asterisk-java.jar > Mar 24, 2013 9:05:58 PM org.asteriskjava.fastagi.DefaultAgiServer startup > INFO: Listening on *:4573. > .. > > -------------------------------------------------------------------------------------------------------------------------------------------- > Asterisk Log: > > -- Executing [s@macro-dial-one:33] > ExecIf("SIP/callcentric-00000007", "0?Set(CHANNEL(musicclass)=)") in new > stack > -- Executing [s@macro-dial-one:34] > GosubIf("SIP/callcentric-00000007", "0?qwait,1()") in new stack > -- Executing [s@macro-dial-one:35] Set("SIP/callcentric-00000007", > "__CWIGNORE=") in new stack > -- Executing [s@macro-dial-one:36] Set("SIP/callcentric-00000007", > "__KEEPCID=TRUE") in new stack > -- Executing [s@macro-dial-one:37] GotoIf("SIP/callcentric-00000007", > "0?usegoto,1") in new stack > -- Executing [s@macro-dial-one:38] GotoIf("SIP/callcentric-00000007", > "1?godial") in new stack > -- Goto (macro-dial-one,s,42) > -- Executing [s@macro-dial-one:42] Dial("SIP/callcentric-00000007", > "SIP/1001,,tr") in new stack > [2013-03-24 21:06:19] WARNING[3195]: app_dial.c:2345 dial_exec_full: > Unable to create channel of type 'SIP' (cause 20 - Subscriber absent) > == Everyone is busy/congested at this time (1:0/0/1) > -- Executing [s@macro-dial-one:43] ExecIf("SIP/callcentric-00000007", > "0?Set(DIALSTATUS=)") in new stack > -- Executing [s@macro-dial-one:44] > GosubIf("SIP/callcentric-00000007", "0?s-CHANUNAVAIL,1()") in new stack > -- Executing [s@macro-dial-one:45] > MacroExit("SIP/callcentric-00000007", "") in new stack > -- Executing [s@macro-exten-vm:15] Set("SIP/callcentric-00000007", > "SV_DIALSTATUS=CHANUNAVAIL") in new stack > -- Executing [s@macro-exten-vm:16] > GosubIf("SIP/callcentric-00000007", "0?docfu,1()") in new stack > -- Executing [s@macro-exten-vm:17] > GosubIf("SIP/callcentric-00000007", "0?docfb,1()") in new stack > -- Executing [s@macro-exten-vm:18] Set("SIP/callcentric-00000007", > "DIALSTATUS=CHANUNAVAIL") in new stack > -- Executing [s@macro-exten-vm:19] ExecIf("SIP/callcentric-00000007", > "0?MacroExit()") in new stack > -- Executing [s@macro-exten-vm:20] GotoIf("SIP/callcentric-00000007", > "1?s-CHANUNAVAIL,1") in new stack > -- Goto (macro-exten-vm,s-CHANUNAVAIL,1) > -- Executing [s-CHANUNAVAIL@macro-exten-vm:1] > GotoIf("SIP/callcentric-00000007", "0?exit,1") in new stack > -- Executing [s-CHANUNAVAIL@macro-exten-vm:2] > PlayTones("SIP/callcentric-00000007", "congestion") in new stack > -- Executing [s-CHANUNAVAIL@macro-exten-vm:3] > Congestion("SIP/callcentric-00000007", "10") in new stack > == Spawn extension (macro-exten-vm, s-CHANUNAVAIL, 3) exited non-zero on > 'SIP/callcentric-00000007' in macro 'exten-vm' > == Spawn extension (from-did-direct, 1001, 2) exited non-zero on > 'SIP/callcentric-00000007' > -- Executing [h@from-did-direct:1] Macro("SIP/callcentric-00000007", > "hangupcall,") in new stack > -- Executing [s@macro-hangupcall:1] > GotoIf("SIP/callcentric-00000007", "1?theend") in new stack > -- Goto (macro-hangupcall,s,3) > -- Executing [s@macro-hangupcall:3] > ExecIf("SIP/callcentric-00000007", "0?Set(CDR(recordingfile)=)") in new > stack > -- Executing [s@macro-hangupcall:4] > Hangup("SIP/callcentric-00000007", "") in new stack > == Spawn extension (macro-hangupcall, s, 4) exited non-zero on > 'SIP/callcentric-00000007' in macro 'hangupcall' > == Spawn extension (from-did-direct, h, 1) exited non-zero on > 'SIP/callcentric-00000007'[/code][/size] > > -------------------------------------------------------------------------------------------------------------------------------------------- > extensions_custom.conf (contexts tried: default, from-pstn, from-trunk .. > none worked) > > [from-pstn-custom] > exten => 1001,1,AGI(agi://192.168.1.106:4573/hello.agi)[/code]<http://192.168.1.106:4573/hello.agi%29%5B/code%5D> > > -------------------------------------------------------------------------------------------------------------------------------------------- > SIP trunk peer details (From Callcentric's configuration instructions for > FreePBX) > > context=from-pstn > fromdomain=callcentric.com > fromuser=177723XXXXX > host=callcentric.com > insecure=port,invite > secret=password > type=peer > defaultuser=177723XXXXX > disallowed_methods=UPDATE > directmedia=no > videosupport=no > disallow=all > allow=ulaw > > -------------------------------------------------------------------------------------------------------------------------------------------- > sip_general_custom.conf (From Callcentric's configuration instructions for > FreePBX) > > context=from-pstn > srvlookup=yes > session-timers=refuse > session-expires=180 > session-minse=90 > session-refresher=uas > > -------------------------------------------------------------------------------------------------------------------------------------------- > SIP detailed logs: > > localhost*CLI> sip set debug on > SIP Debugging enabled > Really destroying SIP dialog '05b1a0c008559d24301bde7a0879ed4f@[::1]' > Method: REGISTER > > <--- SIP read from UDP:204.11.192.161:5060 ---> > INVITE sip:17772380367@71.62.43.250:5060 SIP/2.0 > v: SIP/2.0/UDP 204.11.192.161:5060 > ;branch=z9hG4bK-065a4117c11d04df12a8cf3dafa2af77 > f: <sip:16617480240@66.193.176.35>;tag=3573164592-373269 > t: <sip:163...@ss...> > i: 238...@ms... > CSeq: 1 INVITE > Max-Forwards: 8 > m: > <sip:6e1ae09b353f7d72cc21a7cf0cd89f6e@204.11.192.161:5060;transport=udp><sip:6e1ae09b353f7d72cc21a7cf0cd89f6e@204.11.192.161:5060;transport=udp> > Supported: timer > c: application/sdp > l: 350 > > v=0 > o=NexTone-MSW 2147483647 2147483647 IN IP4 204.11.192.161 > s=sip call > c=IN IP4 204.11.192.161 > t=0 0 > m=audio 54366 RTP/AVP 18 0 8 101 > a=fmtp:18 annexb=no > a=fmtp:101 0-15 > a=rtpmap:101 telephone-event/8000 > a=rtpmap:8 PCMA/8000 > a=rtpmap:0 PCMU/8000 > a=rtpmap:18 G729/8000 > a=ptime:20 > a=sendrecv > a=silenceSupp:off - - - - > a=setup:actpass > <-------------> > --- (11 headers 16 lines) --- > Sending to 204.11.192.161:5060 (NAT) > Using INVITE request as basis request - > 238...@ms... > No matching peer for '16617480240' from '204.11.192.161:5060' > == Using SIP RTP TOS bits 184 > == Using SIP RTP CoS mark 5 > Found RTP audio format 18 > Found RTP audio format 0 > Found RTP audio format 8 > Found RTP audio format 101 > Found audio description format telephone-event for ID 101 > Found audio description format PCMA for ID 8 > Found audio description format PCMU for ID 0 > Found audio description format G729 for ID 18 > Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0x10c > (ulaw|alaw|g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc > (ulaw|alaw) > Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 > (telephone-event|), combined - 0x1 (telephone-event|) > Peer audio RTP is at port 204.11.192.161:54366 > Looking for 17772380367 in from-pstn (domain 71.62.43.250) > list_route: hop: > <sip:6e1ae09b353f7d72cc21a7cf0cd89f6e@204.11.192.161:5060;transport=udp><sip:6e1ae09b353f7d72cc21a7cf0cd89f6e@204.11.192.161:5060;transport=udp> > > <--- Transmitting (NAT) to 204.11.192.161:5060 ---> > SIP/2.0 100 Trying > Via: SIP/2.0/UDP 204.11.192.161:5060 > ;branch=z9hG4bK-065a4117c11d04df12a8cf3dafa2af77;received=204.11.192.161;rport=5060 > From: <sip:16617480240@66.193.176.35>;tag=3573164592-373269 > To: <sip:163...@ss...> > Call-ID: 238...@ms... > CSeq: 1 INVITE > Server: FPBX-2.10.1(1.8.20.1) > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH > Supported: replaces > Contact: <sip:17772380367@71.62.43.250:5060> > Content-Length: 0 > > <--- Reliably Transmitting (NAT) to 204.11.192.161:5060 ---> > SIP/2.0 503 Service Unavailable > Via: SIP/2.0/UDP 204.11.192.161:5060 > ;branch=z9hG4bK-065a4117c11d04df12a8cf3dafa2af77;received=204.11.192.161;rport=5060 > From: <sip:16617480240@66.193.176.35>;tag=3573164592-373269 > To: <sip:163...@ss...>;tag=as5f64e106 > Call-ID: 238...@ms... > CSeq: 1 INVITE > Server: FPBX-2.10.1(1.8.20.1) > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH > Supported: replaces > X-Asterisk-HangupCause: Subscriber absent > X-Asterisk-HangupCauseCode: 20 > Content-Length: 0 > <------------> > > -------------------------------------------------------------------------------------------------------------------------------------------- > Any help will be highly appreciated, thanks! > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today:http://p.sf.net/sfu/appdyn_d2d_mar > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- -salman The Messenger of Allah (sallallahu alaihi wa-sallam) said: *“The people most severely tested are the Prophets, then the righteous, then the next best and the next best. A man will be tested in accordance with the degree of his religious commitment; the stronger his religious commitment, the stronger his test.”* Tuhfat al-Ahwadhi (7:78) |
From: Yves A. <yv...@gm...> - 2013-03-25 08:41:37
|
Hi, this question is more related to freepbx than asterisk-java... but anyway: it looks like your inbound route tries to make a call to your extension 1001 as a SIP call, not as an AGI call... check your freepbx-settings... the inbound route shout not point to an extension, but to a custom destination instead. you have to declare the custom destination via freepbx webfrontend and afterward write this custom destination in the appropriate config file where in turn you call your java-AGI (like the way you did in your context written in your question).. regards, yves Am 25.03.2013 03:12, schrieb Salman Jamali: > Hi, > > I am having difficulty in configuring an inbound route for asterisk-java: > callcentric sip did -> freepbx distro/asterisk -> asterisk-java (this > fails) > callcentric sip did -> freepbx distro/asterisk -> X-Lite (works smoothly) > > My configuration is FreePBX Distro 2.210 w/ Asterisk 1.8.20 on CentOS. > I successfully configured my callcentric sip trunk, an extension, and > an inbound route. I can receive calls on X-lite. Now, I am trying to > work my way through the Asterisk-java FastAGI tutorial to be able to > handle inbound calls in my subclass of BaseAgiScript. But before my > java code gets invoked, asterisk aborts the call. Following is the > relevant information (please ask for anything else if required): > -------------------------------------------------------------------------------------------------------------------------------------------- > Asterisk-java Log: (no activity here) > > prompt$ java -jar asterisk-java.jar > Mar 24, 2013 9:05:58 PM org.asteriskjava.fastagi.DefaultAgiServer startup > INFO: Listening on *:4573. > .. > -------------------------------------------------------------------------------------------------------------------------------------------- > Asterisk Log: > > -- Executing [s@macro-dial-one:33] > ExecIf("SIP/callcentric-00000007", "0?Set(CHANNEL(musicclass)=)") in > new stack > -- Executing [s@macro-dial-one:34] > GosubIf("SIP/callcentric-00000007", "0?qwait,1()") in new stack > -- Executing [s@macro-dial-one:35] Set("SIP/callcentric-00000007", > "__CWIGNORE=") in new stack > -- Executing [s@macro-dial-one:36] Set("SIP/callcentric-00000007", > "__KEEPCID=TRUE") in new stack > -- Executing [s@macro-dial-one:37] > GotoIf("SIP/callcentric-00000007", "0?usegoto,1") in new stack > -- Executing [s@macro-dial-one:38] > GotoIf("SIP/callcentric-00000007", "1?godial") in new stack > -- Goto (macro-dial-one,s,42) > -- Executing [s@macro-dial-one:42] > Dial("SIP/callcentric-00000007", "SIP/1001,,tr") in new stack > [2013-03-24 21:06:19] WARNING[3195]: app_dial.c:2345 dial_exec_full: > Unable to create channel of type 'SIP' (cause 20 - Subscriber absent) > == Everyone is busy/congested at this time (1:0/0/1) > -- Executing [s@macro-dial-one:43] > ExecIf("SIP/callcentric-00000007", "0?Set(DIALSTATUS=)") in new stack > -- Executing [s@macro-dial-one:44] > GosubIf("SIP/callcentric-00000007", "0?s-CHANUNAVAIL,1()") in new stack > -- Executing [s@macro-dial-one:45] > MacroExit("SIP/callcentric-00000007", "") in new stack > -- Executing [s@macro-exten-vm:15] Set("SIP/callcentric-00000007", > "SV_DIALSTATUS=CHANUNAVAIL") in new stack > -- Executing [s@macro-exten-vm:16] > GosubIf("SIP/callcentric-00000007", "0?docfu,1()") in new stack > -- Executing [s@macro-exten-vm:17] > GosubIf("SIP/callcentric-00000007", "0?docfb,1()") in new stack > -- Executing [s@macro-exten-vm:18] Set("SIP/callcentric-00000007", > "DIALSTATUS=CHANUNAVAIL") in new stack > -- Executing [s@macro-exten-vm:19] > ExecIf("SIP/callcentric-00000007", "0?MacroExit()") in new stack > -- Executing [s@macro-exten-vm:20] > GotoIf("SIP/callcentric-00000007", "1?s-CHANUNAVAIL,1") in new stack > -- Goto (macro-exten-vm,s-CHANUNAVAIL,1) > -- Executing [s-CHANUNAVAIL@macro-exten-vm:1] > GotoIf("SIP/callcentric-00000007", "0?exit,1") in new stack > -- Executing [s-CHANUNAVAIL@macro-exten-vm:2] > PlayTones("SIP/callcentric-00000007", "congestion") in new stack > -- Executing [s-CHANUNAVAIL@macro-exten-vm:3] > Congestion("SIP/callcentric-00000007", "10") in new stack > == Spawn extension (macro-exten-vm, s-CHANUNAVAIL, 3) exited > non-zero on 'SIP/callcentric-00000007' in macro 'exten-vm' > == Spawn extension (from-did-direct, 1001, 2) exited non-zero on > 'SIP/callcentric-00000007' > -- Executing [h@from-did-direct:1] > Macro("SIP/callcentric-00000007", "hangupcall,") in new stack > -- Executing [s@macro-hangupcall:1] > GotoIf("SIP/callcentric-00000007", "1?theend") in new stack > -- Goto (macro-hangupcall,s,3) > -- Executing [s@macro-hangupcall:3] > ExecIf("SIP/callcentric-00000007", "0?Set(CDR(recordingfile)=)") in > new stack > -- Executing [s@macro-hangupcall:4] > Hangup("SIP/callcentric-00000007", "") in new stack > == Spawn extension (macro-hangupcall, s, 4) exited non-zero on > 'SIP/callcentric-00000007' in macro 'hangupcall' > == Spawn extension (from-did-direct, h, 1) exited non-zero on > 'SIP/callcentric-00000007'[/code][/size] > -------------------------------------------------------------------------------------------------------------------------------------------- > extensions_custom.conf (contexts tried: default, from-pstn, from-trunk > .. none worked) > > [from-pstn-custom] > exten => 1001,1,AGI(agi://192.168.1.106:4573/hello.agi)[/code] > <http://192.168.1.106:4573/hello.agi%29[/code]> > -------------------------------------------------------------------------------------------------------------------------------------------- > SIP trunk peer details (From Callcentric's configuration instructions > for FreePBX) > > context=from-pstn > fromdomain=callcentric.com <http://callcentric.com> > fromuser=177723XXXXX > host=callcentric.com <http://callcentric.com> > insecure=port,invite > secret=password > type=peer > defaultuser=177723XXXXX > disallowed_methods=UPDATE > directmedia=no > videosupport=no > disallow=all > allow=ulaw > -------------------------------------------------------------------------------------------------------------------------------------------- > sip_general_custom.conf (From Callcentric's configuration instructions > for FreePBX) > > context=from-pstn > srvlookup=yes > session-timers=refuse > session-expires=180 > session-minse=90 > session-refresher=uas > -------------------------------------------------------------------------------------------------------------------------------------------- > SIP detailed logs: > > localhost*CLI> sip set debug on > SIP Debugging enabled > Really destroying SIP dialog '05b1a0c008559d24301bde7a0879ed4f@[::1]' > Method: REGISTER > > <--- SIP read from UDP:204.11.192.161:5060 > <http://204.11.192.161:5060> ---> > INVITE sip:17772380367@71.62.43.250:5060 > <http://sip:17772380367@71.62.43.250:5060> SIP/2.0 > v: SIP/2.0/UDP > 204.11.192.161:5060;branch=z9hG4bK-065a4117c11d04df12a8cf3dafa2af77 > f: <sip:16617480240@66.193.176.35 > <mailto:sip%3A16617480240@66.193.176.35>>;tag=3573164592-373269 > t: <sip:163...@ss... > <mailto:sip%3A1...@ss...>> > i: 238...@ms... > <mailto:238...@ms...> > CSeq: 1 INVITE > Max-Forwards: 8 > m: > <sip:6e1ae09b353f7d72cc21a7cf0cd89f6e@204.11.192.161:5060;transport=udp> > Supported: timer > c: application/sdp > l: 350 > > v=0 > o=NexTone-MSW 2147483647 2147483647 IN IP4 204.11.192.161 > s=sip call > c=IN IP4 204.11.192.161 > t=0 0 > m=audio 54366 RTP/AVP 18 0 8 101 > a=fmtp:18 annexb=no > a=fmtp:101 0-15 > a=rtpmap:101 telephone-event/8000 > a=rtpmap:8 PCMA/8000 > a=rtpmap:0 PCMU/8000 > a=rtpmap:18 G729/8000 > a=ptime:20 > a=sendrecv > a=silenceSupp:off - - - - > a=setup:actpass > <-------------> > --- (11 headers 16 lines) --- > Sending to 204.11.192.161:5060 <http://204.11.192.161:5060> (NAT) > Using INVITE request as basis request - > 238...@ms... > <mailto:238...@ms...> > No matching peer for '16617480240' from '204.11.192.161:5060 > <http://204.11.192.161:5060>' > == Using SIP RTP TOS bits 184 > == Using SIP RTP CoS mark 5 > Found RTP audio format 18 > Found RTP audio format 0 > Found RTP audio format 8 > Found RTP audio format 101 > Found audio description format telephone-event for ID 101 > Found audio description format PCMA for ID 8 > Found audio description format PCMU for ID 0 > Found audio description format G729 for ID 18 > Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0x10c > (ulaw|alaw|g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - > 0xc (ulaw|alaw) > Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 > (telephone-event|), combined - 0x1 (telephone-event|) > Peer audio RTP is at port 204.11.192.161:54366 > <http://204.11.192.161:54366> > Looking for 17772380367 in from-pstn (domain 71.62.43.250) > list_route: hop: > <sip:6e1ae09b353f7d72cc21a7cf0cd89f6e@204.11.192.161:5060;transport=udp> > > <--- Transmitting (NAT) to 204.11.192.161:5060 > <http://204.11.192.161:5060> ---> > SIP/2.0 100 Trying > Via: SIP/2.0/UDP > 204.11.192.161:5060;branch=z9hG4bK-065a4117c11d04df12a8cf3dafa2af77;received=204.11.192.161;rport=5060 > From: <sip:16617480240@66.193.176.35 > <mailto:sip%3A16617480240@66.193.176.35>>;tag=3573164592-373269 > To: <sip:163...@ss... > <mailto:sip%3A1...@ss...>> > Call-ID: 238...@ms... > <mailto:238...@ms...> > CSeq: 1 INVITE > Server: FPBX-2.10.1(1.8.20.1) > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, > INFO, PUBLISH > Supported: replaces > Contact: <sip:17772380367@71.62.43.250:5060 > <http://sip:17772380367@71.62.43.250:5060>> > Content-Length: 0 > > <--- Reliably Transmitting (NAT) to 204.11.192.161:5060 > <http://204.11.192.161:5060> ---> > SIP/2.0 503 Service Unavailable > Via: SIP/2.0/UDP > 204.11.192.161:5060;branch=z9hG4bK-065a4117c11d04df12a8cf3dafa2af77;received=204.11.192.161;rport=5060 > From: <sip:16617480240@66.193.176.35 > <mailto:sip%3A16617480240@66.193.176.35>>;tag=3573164592-373269 > To: <sip:163...@ss... > <mailto:sip%3A1...@ss...>>;tag=as5f64e106 > Call-ID: 238...@ms... > <mailto:238...@ms...> > CSeq: 1 INVITE > Server: FPBX-2.10.1(1.8.20.1) > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, > INFO, PUBLISH > Supported: replaces > X-Asterisk-HangupCause: Subscriber absent > X-Asterisk-HangupCauseCode: 20 > Content-Length: 0 > <------------> > -------------------------------------------------------------------------------------------------------------------------------------------- > Any help will be highly appreciated, thanks! > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Salman J. <sal...@gm...> - 2013-03-25 02:12:42
|
Hi, I am having difficulty in configuring an inbound route for asterisk-java: callcentric sip did -> freepbx distro/asterisk -> asterisk-java (this fails) callcentric sip did -> freepbx distro/asterisk -> X-Lite (works smoothly) My configuration is FreePBX Distro 2.210 w/ Asterisk 1.8.20 on CentOS. I successfully configured my callcentric sip trunk, an extension, and an inbound route. I can receive calls on X-lite. Now, I am trying to work my way through the Asterisk-java FastAGI tutorial to be able to handle inbound calls in my subclass of BaseAgiScript. But before my java code gets invoked, asterisk aborts the call. Following is the relevant information (please ask for anything else if required): -------------------------------------------------------------------------------------------------------------------------------------------- Asterisk-java Log: (no activity here) prompt$ java -jar asterisk-java.jar Mar 24, 2013 9:05:58 PM org.asteriskjava.fastagi.DefaultAgiServer startup INFO: Listening on *:4573. .. -------------------------------------------------------------------------------------------------------------------------------------------- Asterisk Log: -- Executing [s@macro-dial-one:33] ExecIf("SIP/callcentric-00000007", "0?Set(CHANNEL(musicclass)=)") in new stack -- Executing [s@macro-dial-one:34] GosubIf("SIP/callcentric-00000007", "0?qwait,1()") in new stack -- Executing [s@macro-dial-one:35] Set("SIP/callcentric-00000007", "__CWIGNORE=") in new stack -- Executing [s@macro-dial-one:36] Set("SIP/callcentric-00000007", "__KEEPCID=TRUE") in new stack -- Executing [s@macro-dial-one:37] GotoIf("SIP/callcentric-00000007", "0?usegoto,1") in new stack -- Executing [s@macro-dial-one:38] GotoIf("SIP/callcentric-00000007", "1?godial") in new stack -- Goto (macro-dial-one,s,42) -- Executing [s@macro-dial-one:42] Dial("SIP/callcentric-00000007", "SIP/1001,,tr") in new stack [2013-03-24 21:06:19] WARNING[3195]: app_dial.c:2345 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent) == Everyone is busy/congested at this time (1:0/0/1) -- Executing [s@macro-dial-one:43] ExecIf("SIP/callcentric-00000007", "0?Set(DIALSTATUS=)") in new stack -- Executing [s@macro-dial-one:44] GosubIf("SIP/callcentric-00000007", "0?s-CHANUNAVAIL,1()") in new stack -- Executing [s@macro-dial-one:45] MacroExit("SIP/callcentric-00000007", "") in new stack -- Executing [s@macro-exten-vm:15] Set("SIP/callcentric-00000007", "SV_DIALSTATUS=CHANUNAVAIL") in new stack -- Executing [s@macro-exten-vm:16] GosubIf("SIP/callcentric-00000007", "0?docfu,1()") in new stack -- Executing [s@macro-exten-vm:17] GosubIf("SIP/callcentric-00000007", "0?docfb,1()") in new stack -- Executing [s@macro-exten-vm:18] Set("SIP/callcentric-00000007", "DIALSTATUS=CHANUNAVAIL") in new stack -- Executing [s@macro-exten-vm:19] ExecIf("SIP/callcentric-00000007", "0?MacroExit()") in new stack -- Executing [s@macro-exten-vm:20] GotoIf("SIP/callcentric-00000007", "1?s-CHANUNAVAIL,1") in new stack -- Goto (macro-exten-vm,s-CHANUNAVAIL,1) -- Executing [s-CHANUNAVAIL@macro-exten-vm:1] GotoIf("SIP/callcentric-00000007", "0?exit,1") in new stack -- Executing [s-CHANUNAVAIL@macro-exten-vm:2] PlayTones("SIP/callcentric-00000007", "congestion") in new stack -- Executing [s-CHANUNAVAIL@macro-exten-vm:3] Congestion("SIP/callcentric-00000007", "10") in new stack == Spawn extension (macro-exten-vm, s-CHANUNAVAIL, 3) exited non-zero on 'SIP/callcentric-00000007' in macro 'exten-vm' == Spawn extension (from-did-direct, 1001, 2) exited non-zero on 'SIP/callcentric-00000007' -- Executing [h@from-did-direct:1] Macro("SIP/callcentric-00000007", "hangupcall,") in new stack -- Executing [s@macro-hangupcall:1] GotoIf("SIP/callcentric-00000007", "1?theend") in new stack -- Goto (macro-hangupcall,s,3) -- Executing [s@macro-hangupcall:3] ExecIf("SIP/callcentric-00000007", "0?Set(CDR(recordingfile)=)") in new stack -- Executing [s@macro-hangupcall:4] Hangup("SIP/callcentric-00000007", "") in new stack == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/callcentric-00000007' in macro 'hangupcall' == Spawn extension (from-did-direct, h, 1) exited non-zero on 'SIP/callcentric-00000007'[/code][/size] -------------------------------------------------------------------------------------------------------------------------------------------- extensions_custom.conf (contexts tried: default, from-pstn, from-trunk .. none worked) [from-pstn-custom] exten => 1001,1,AGI(agi://192.168.1.106:4573/hello.agi)[/code] -------------------------------------------------------------------------------------------------------------------------------------------- SIP trunk peer details (From Callcentric's configuration instructions for FreePBX) context=from-pstn fromdomain=callcentric.com fromuser=177723XXXXX host=callcentric.com insecure=port,invite secret=password type=peer defaultuser=177723XXXXX disallowed_methods=UPDATE directmedia=no videosupport=no disallow=all allow=ulaw -------------------------------------------------------------------------------------------------------------------------------------------- sip_general_custom.conf (From Callcentric's configuration instructions for FreePBX) context=from-pstn srvlookup=yes session-timers=refuse session-expires=180 session-minse=90 session-refresher=uas -------------------------------------------------------------------------------------------------------------------------------------------- SIP detailed logs: localhost*CLI> sip set debug on SIP Debugging enabled Really destroying SIP dialog '05b1a0c008559d24301bde7a0879ed4f@[::1]' Method: REGISTER <--- SIP read from UDP:204.11.192.161:5060 ---> INVITE sip:17772380367@71.62.43.250:5060 SIP/2.0 v: SIP/2.0/UDP 204.11.192.161:5060 ;branch=z9hG4bK-065a4117c11d04df12a8cf3dafa2af77 f: <sip:16617480240@66.193.176.35>;tag=3573164592-373269 t: <sip:163...@ss...> i: 238...@ms... CSeq: 1 INVITE Max-Forwards: 8 m: <sip:6e1ae09b353f7d72cc21a7cf0cd89f6e@204.11.192.161:5060;transport=udp> Supported: timer c: application/sdp l: 350 v=0 o=NexTone-MSW 2147483647 2147483647 IN IP4 204.11.192.161 s=sip call c=IN IP4 204.11.192.161 t=0 0 m=audio 54366 RTP/AVP 18 0 8 101 a=fmtp:18 annexb=no a=fmtp:101 0-15 a=rtpmap:101 telephone-event/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:18 G729/8000 a=ptime:20 a=sendrecv a=silenceSupp:off - - - - a=setup:actpass <-------------> --- (11 headers 16 lines) --- Sending to 204.11.192.161:5060 (NAT) Using INVITE request as basis request - 238...@ms... No matching peer for '16617480240' from '204.11.192.161:5060' == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 Found RTP audio format 18 Found RTP audio format 0 Found RTP audio format 8 Found RTP audio format 101 Found audio description format telephone-event for ID 101 Found audio description format PCMA for ID 8 Found audio description format PCMU for ID 0 Found audio description format G729 for ID 18 Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0x10c (ulaw|alaw|g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw) Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|) Peer audio RTP is at port 204.11.192.161:54366 Looking for 17772380367 in from-pstn (domain 71.62.43.250) list_route: hop: <sip:6e1ae09b353f7d72cc21a7cf0cd89f6e@204.11.192.161:5060 ;transport=udp> <--- Transmitting (NAT) to 204.11.192.161:5060 ---> SIP/2.0 100 Trying Via: SIP/2.0/UDP 204.11.192.161:5060 ;branch=z9hG4bK-065a4117c11d04df12a8cf3dafa2af77;received=204.11.192.161;rport=5060 From: <sip:16617480240@66.193.176.35>;tag=3573164592-373269 To: <sip:163...@ss...> Call-ID: 238...@ms... CSeq: 1 INVITE Server: FPBX-2.10.1(1.8.20.1) Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces Contact: <sip:17772380367@71.62.43.250:5060> Content-Length: 0 <--- Reliably Transmitting (NAT) to 204.11.192.161:5060 ---> SIP/2.0 503 Service Unavailable Via: SIP/2.0/UDP 204.11.192.161:5060 ;branch=z9hG4bK-065a4117c11d04df12a8cf3dafa2af77;received=204.11.192.161;rport=5060 From: <sip:16617480240@66.193.176.35>;tag=3573164592-373269 To: <sip:163...@ss...>;tag=as5f64e106 Call-ID: 238...@ms... CSeq: 1 INVITE Server: FPBX-2.10.1(1.8.20.1) Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces X-Asterisk-HangupCause: Subscriber absent X-Asterisk-HangupCauseCode: 20 Content-Length: 0 <------------> -------------------------------------------------------------------------------------------------------------------------------------------- Any help will be highly appreciated, thanks! |
From: Yves A. <yv...@gm...> - 2013-03-20 20:40:58
|
sekar, how did you test? your program runs for 10 seconds and then quits. so you have to start your programm, during the call is running and press your keys on the phone to see the event... i would suggest to : - modify your programm, so that it keeps running, until you kill the process, so you have more time for setting up the call, test some things and see the upcoming events... keep in mind, that: -you have to configure your phone (sip.conf) to use dtmf correctly... most common setting is "dtmfmode=inband" -detecting dtmf works only for bridged channels... (just picking up the phone and typing some numbers does not fire any events..) -you will receive ANY dtfm-detected event... so if you have an asterisk where more than one call is running at one time, you must take care to store the user input for the correct call... (therefore watch the uniqueIDs or at least channelIDs) -(not) receiving events may be an issue of userprivileges... the user "manager" you refer in your code must have appropriate userrights configured in "manager.conf" - if you want to realize some kind of IVR, you should develop an agi-script. regards, yves Am 20.03.2013 13:46, schrieb sekar: > Hi Yves, > Thanks for the reply.!! > > My problem : > > I have been working in asterisk for past one month. > > My code: > > > import java.io.IOException; > > import net.sf.asterisk.manager.AuthenticationFailedException; > import net.sf.asterisk.manager.ManagerConnection; > import net.sf.asterisk.manager.ManagerConnectionFactory; > import net.sf.asterisk.manager.ManagerEventHandler; > import net.sf.asterisk.manager.TimeoutException; > import net.sf.asterisk.manager.action.StatusAction; > import net.sf.asterisk.manager.event.ManagerEvent; > > public class HelloEvents implements ManagerEventHandler > { > private ManagerConnection managerConnection; > > public HelloEvents() throws IOException > { > ManagerConnectionFactory factory = new ManagerConnectionFactory(); > > this.managerConnection = factory.getManagerConnection("localhost", > "manager", "pa55w0rd"); > } > > public void run() throws IOException, AuthenticationFailedException, > TimeoutException, InterruptedException > { > // register for events > managerConnection.addEventHandler(this); > > // connect to Asterisk and log in > managerConnection.login(); > > // request channel state > managerConnection.sendAction(new StatusAction()); > > // wait 10 seconds for events to come in > Thread.sleep(10000); > > // and finally log off and disconnect > managerConnection.logoff(); > } > > public void handleEvent(ManagerEvent event) > { > // just print received events > System.out.println(event); > } > > public static void main(String[] args) throws Exception > { > HelloEvents helloEvents; > > helloEvents = new HelloEvents(); > helloEvents.run(); > } > } > This is the code given on asterisk java example. > > Manager Event recognizes connector event, log in and log out actions > are detected. > > DtmfEvent is a subclass of manager event. > > Does public void handleEvent(ManagerEvent event) listens to DTMF ? > > If not prescribe me with the listener and the corresponding event . > > 1. I have found DTMFEvent on the api but haven't found any > corresponding listener for that > DTMFEvent extends ManagerEvent > > 2.My application should store the keypress of the user in the > database. > Two ways of doing it: > 1. Read Appication > 2. DTMF events > > Suggest me which is the efficient way of doing it. > > > From: "Yves A." <yv...@gm...> > Sent: Wed, 20 Mar 2013 16:53:31 > To: ast...@li... > Subject: Re: [Asterisk-java-users] DTMF DETECT( Manager Events) > hi, > > are you writing to the correct mailinglist? > this list is for questions regarding asterisk-java... so if you have > problems reading dtmf tones via asterisk-java... you´re in the right > place, but > you should be a bit more specific... and post your code / efforts so far. > If it is a general asterisk question, this is the wrong place... there > is a general asterisk-users mailing list... but i am sure, this > question was asked > 100 times before. > On the voip-info page you refer to is a link at the bottom of the page > in the "see also" section...: > http://www.voip-info.org/wiki/view/Asterisk+cmd+Read > > regards, > yves > > Am 20.03.2013 07:40, schrieb sekar: > > 201...@f4..." > type="cite">I have completely read > > *http://www.voip-info.org/wiki/view/Asterisk+DTMF * > > > article but couldn't find an example anywhere online regarding > capturing DTMF events on asterisk . Having this problem for 2 > weeks . It would be very helpful if you reply with an example > > Cheers > > > > > > <http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?> > Get your own *FREE* website and domain with business email > solutions, click here > <http://www.rediffmail.com/cgi-bin/red.cgi?red=http%3A%2F%2Ftrack%2Erediff%2Ecom%2Fclick%3Furl%3D%5F%5F%5Fhttp%3A%2F%2Fhosting%2Erediff%2Ecom%2Frediffmailpro%2Fbusiness%2Demail%3Fsc%5Fcid%3Dsig%5F%5F%5F%26amp%3Bcmp%3Dsig%26amp%3Blnk%3Dsig%26amp%3Bnsrv1%3Dhost&isImage=0&BlockImage=0&rediffng=0> > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > <http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?> > Get your own *FREE* website and domain with business email solutions, > click here > <http://track.rediff.com/click?url=___http://hosting.rediff.com/rediffmailpro/business-email?sc_cid=sig___&cmp=sig&lnk=sig&nsrv1=host> > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: sekar <che...@re...> - 2013-03-20 12:46:31
|
Hi Yves,Thanks for the reply.!! My problem : I have been working in asterisk for past one month. My code: import java.io.IOException; import net.sf.asterisk.manager.AuthenticationFailedException; import net.sf.asterisk.manager.ManagerConnection; import net.sf.asterisk.manager.ManagerConnectionFactory; import net.sf.asterisk.manager.ManagerEventHandler; import net.sf.asterisk.manager.TimeoutException; import net.sf.asterisk.manager.action.StatusAction; import net.sf.asterisk.manager.event.ManagerEvent; public class HelloEvents implements ManagerEventHandler { private ManagerConnection managerConnection; public HelloEvents() throws IOException { ManagerConnectionFactory factory = new ManagerConnectionFactory(); this.managerConnection = factory.getManagerConnection("localhost", "manager", "pa55w0rd"); } public void run() throws IOException, AuthenticationFailedException, TimeoutException, InterruptedException { // register for events managerConnection.addEventHandler(this); // connect to Asterisk and log in managerConnection.login(); // request channel state managerConnection.sendAction(new StatusAction()); // wait 10 seconds for events to come in Thread.sleep(10000); // and finally log off and disconnect managerConnection.logoff(); } public void handleEvent(ManagerEvent event) { // just print received events System.out.println(event); } public static void main(String[] args) throws Exception { HelloEvents helloEvents; helloEvents = new HelloEvents(); helloEvents.run(); } }This is the code given on asterisk java example. Manager Event recognizes connector event, log in and log out actions are detected. DtmfEvent is a subclass of manager event. Does public void handleEvent(ManagerEvent event) listens to DTMF ? If not prescribe me with the listener and the corresponding event . 1. I have found DTMFEvent on the api but haven't found any corresponding listener for that DTMFEvent extends ManagerEvent 2.My application should store the keypress of the user in the database. Two ways of doing it: 1. Read Appication 2. DTMF events Suggest me which is the efficient way of doing it. From: "Yves A." <yv...@gm...> Sent: Wed, 20 Mar 2013 16:53:31 To: ast...@li... Subject: Re: [Asterisk-java-users] DTMF DETECT( Manager Events) hi, are you writing to the correct mailinglist? this list is for questions regarding asterisk-java... so if you have problems reading dtmf tones via asterisk-java... you´re in the right place, but you should be a bit more specific... and post your code / efforts so far. If it is a general asterisk question, this is the wrong place... there is a general asterisk-users mailing list... but i am sure, this question was asked 100 times before. On the voip-info page you refer to is a link at the bottom of the page in the "see also" section...: http://www.voip-info.org/wiki/view/Asterisk+cmd+Read regards, yves Am 20.03.2013 07:40, schrieb sekar: |
From: Yves A. <yv...@gm...> - 2013-03-20 11:23:00
|
hi, are you writing to the correct mailinglist? this list is for questions regarding asterisk-java... so if you have problems reading dtmf tones via asterisk-java... you´re in the right place, but you should be a bit more specific... and post your code / efforts so far. If it is a general asterisk question, this is the wrong place... there is a general asterisk-users mailing list... but i am sure, this question was asked 100 times before. On the voip-info page you refer to is a link at the bottom of the page in the "see also" section...: http://www.voip-info.org/wiki/view/Asterisk+cmd+Read regards, yves Am 20.03.2013 07:40, schrieb sekar: > I have completely read > > *http://www.voip-info.org/wiki/view/Asterisk+DTMF * > > > article but couldn't find an example anywhere online regarding > capturing DTMF events on asterisk . Having this problem for 2 weeks . > It would be very helpful if you reply with an example > > Cheers > > > > > > <http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?> > Get your own *FREE* website and domain with business email solutions, > click here > <http://track.rediff.com/click?url=___http://hosting.rediff.com/rediffmailpro/business-email?sc_cid=sig___&cmp=sig&lnk=sig&nsrv1=host> > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |