asterisk-java-users Mailing List for Asterisk-Java Library (Page 6)
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: Jorge <gus...@gm...> - 2015-01-16 07:35:50
|
Hi, Thank you very much for your answers. *Zoumana* Your try 1) seems to be the good way i would have done that. To debug more could you please share the Asterisk CLI logs when you run this ? The most strange thing is that I don´t see any change in the cli . Here you have the log form log file. [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] pbx.c: -- Executing [1200@ext-queues:2] Answer("DAHDI/i1/myTelephoneNumber-26", "") in new stack [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] pbx.c: -- Executing [1200@ext-queues:3] Set("DAHDI/i1/myTelephoneNumber-26", "__BLKVM_OVERRIDE=BLKVM/1200/DAHDI/i1/myTelephoneNumber-26") in new stack [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] pbx.c: -- Executing [1200@ext-queues:4] Set("DAHDI/i1/myTelephoneNumber-26", "__BLKVM_BASE=1200") in new stack [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] pbx.c: -- Executing [1200@ext-queues:5] Set("DAHDI/i1/myTelephoneNumber-26", "DB(BLKVM/1200/DAHDI/i1/myTelephoneNumber-26)=TRUE") in new stack [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] pbx.c: -- Executing [1200@ext-queues:6] ExecIf("DAHDI/i1/myTelephoneNumber-26", "1?Set(_DIAL_OPTIONS=trM(auto-blkvm))") in new stack [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] pbx.c: -- Executing [1200@ext-queues:7] Set("DAHDI/i1/myTelephoneNumber-26", "__NODEST=1200") in new stack [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] pbx.c: -- Executing [1200@ext-queues:8] Set("DAHDI/i1/myTelephoneNumber-26", "MONITOR_FILENAME=/var/spool/asterisk/monitor/q1200-20150116-082300-myServer-1421396580.53") in new stack [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] pbx.c: -- Executing [1200@ext-queues:9] Set("DAHDI/i1/myTelephoneNumber-26", "__MOHCLASS=none") in new stack [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] pbx.c: -- Executing [1200@ext-queues:10] Set("DAHDI/i1/myTelephoneNumber-26", "__CWIGNORE=TRUE") in new stack [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] pbx.c: -- Executing [1200@ext-queues:11] Queue("DAHDI/i1/myTelephoneNumber-26", "1200,tn,,") in new stack [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] res_musiconhold.c: -- Started music on hold, class 'none', on DAHDI/i1/myTelephoneNumber-26 [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] res_musiconhold.c: -- Stopped music on hold on DAHDI/i1/myTelephoneNumber-26 [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] app_queue.c: -- Hold time for 1200 is 0 minute(s) 0 seconds [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] app_queue.c: -- Told DAHDI/i1/myTelephoneNumber-26 in 1200 their queue position (which was 1) [Jan 16 08:23:00] VERBOSE[30650][C-0000002d] file.c: -- <DAHDI/i1/myTelephoneNumber-26> Playing 'queue-thankyou.gsm' (language 'en') [Jan 16 08:23:01] VERBOSE[30650][C-0000002d] res_musiconhold.c: -- Started music on hold, class 'none', on DAHDI/i1/myTelephoneNumber-26 [Jan 16 08:23:01] WARNING[30650][C-0000002d] format_wav.c: Read failed (type) [Jan 16 08:23:01] WARNING[30650][C-0000002d] file.c: Unable to open format wav [Jan 16 08:23:01] WARNING[30650][C-0000002d] res_musiconhold.c: Unable to open file '/var/lib/asterisk/mohmp3/.nomusic_reserved/silence': No such file or directory [Jan 16 08:23:01] VERBOSE[30650][C-0000002d] res_musiconhold.c: -- Stopped music on hold on DAHDI/i1/myTelephoneNumber-26 *Wayne* Your code gave the clue. It is possible to do on this way: entry.getChannel().redirect("myCall", "s", 1); Kind regards. Jorge ---------------------------------------------------------------------------------------------------------------------------------------------- <https://twitter.com/#%21/correderajorge> <http://www.correderajorge.es/> En función de la *Ley Orgánica 15/1999*, este mensaje de correo electrónico y sus documentos adjuntos están dirigidos *exclusivamente* a los destinatarios especificados y su información es de uso *estrictamente privado* salvo que se especifique lo contrario. La información contenida puede ser *confidencial* y/o estar *legalmente protegida*. Si usted recibe este mensaje por *error*, por favor comuníqueselo inmediatamente al remitente y *elimínelo* ya que carece de autorización de todo tipo. *Se prohíbe expresamente* la revelación, distribución, impresión o copia de toda o alguna parte de la información contenida en este mensaje 2015-01-16 1:00 GMT+01:00 Zoumana TRAORE <zou...@gm...>: > Hello, > > For 2) and 3) > What is maybe wrong is the fact that you are trying to make an > OriginalAction to an invalid channel name according to what is expected to > Dial command triggered later. I explain a bit: > > entry.getChannel().getName() return something like SIP/200-0000001 the > last part is generated by Asterisk. What is "Dialable" as channel for > OriginateAction is the beginning SIP/200 that explains the message > NoSuchChannelException. > > Also even you split that and set correctly to the action, i suppose that > will trigger another line/channel from the same caller not just merge back > to the current call. You can try it. > > Your try 1) seems to be the good way i would have done that. To debug more > could you please share the Asterisk CLI logs when you run this ? > > Regards, > Zoumana > Le 15 janv. 2015 21:47, "Jorge" <gus...@gm...> a écrit : > >> Hi, >> >> I am would like to use Asterisk-Java to transfer a call that is in a >> queue. >> >> The context is the next one. One call go to a queue so I detect the call >> with onNewQueueEntry and check if it goes to my queue. If it goes after >> doing several things I want to transfers it back to a extension. The main >> idea is detecting a call, doing things that can´t be done through the >> dialplan and give it back to the dialplan. >> >> As entry.getChannel has the channel that is in the queue I wanted to use >> this channel to transfer to the desired extension. I have done several >> attemps but nothing worked. >> >> public void onNewQueueEntry(final AsteriskQueueEntry entry) { >> // Si está en la cola que estamos monitorizando, procesa >> if(entry.getQueue().getName().equals(queueName)){ >> >> Dialplan >> >> [myCall] >> exten => s,1,NoOp(myCall) >> exten => s,n,Playback(es/digits/1) >> exten => s,n,Return() >> >> 1) >> Java-code >> AtxferAction action = new AtxferAction(entry.getChannel().getName(), >> "myCall", "s", 1); >> ManagerResponse response = >> Asterisk.getManagerConnection().sendAction(action); >> >> >> >> The answer is ok but nothing happens. >> org.asteriskjava.manager.response.ManagerResponse: actionId='null'; >> message='Atxfer successfully queued'; response='Success'; uniqueId='null'; >> systemHashcode=1928471006 >> >> >> 2) OriginateAction dial = new OriginateAction(); >> // // Sets the name of the channel to connect to the >> outgoing call. >> dial.setChannel(entry.getChannel().getName()); >> >> // Sets the name of the context of the extension to >> connect to. >> dial.setContext("myCall"); >> // Sets the extension to connect to >> dial.setExten("s"); >> dial.setPriority(1); >> ManagerResponse response = >> Asterisk.getManagerConnection().sendAction(dial); >> It gives me org.asteriskjava.live.NoSuchChannelException:Channel is not >> available >> >> 3) >> Asterisk.getAsteriskServer().originateToApplication(entry.getChannel().getName()", >> "myCall", "", 1000); >> It gives me org.asteriskjava.live.NoSuchChannelException:Channel is not >> available >> >> Could you let my know what I am doing wrong? >> >> Kind regards. >> >> >> >> ------------------------------------------------------------------------------ >> New Year. New Location. New Benefits. New Data Center in Ashburn, VA. >> GigeNET is offering a free month of service with a new server in Ashburn. >> Choose from 2 high performing configs, both with 100TB of bandwidth. >> Higher redundancy.Lower latency.Increased capacity.Completely compliant. >> http://p.sf.net/sfu/gigenet >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > http://p.sf.net/sfu/gigenet > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Zoumana T. <zou...@gm...> - 2015-01-16 00:00:37
|
Hello, For 2) and 3) What is maybe wrong is the fact that you are trying to make an OriginalAction to an invalid channel name according to what is expected to Dial command triggered later. I explain a bit: entry.getChannel().getName() return something like SIP/200-0000001 the last part is generated by Asterisk. What is "Dialable" as channel for OriginateAction is the beginning SIP/200 that explains the message NoSuchChannelException. Also even you split that and set correctly to the action, i suppose that will trigger another line/channel from the same caller not just merge back to the current call. You can try it. Your try 1) seems to be the good way i would have done that. To debug more could you please share the Asterisk CLI logs when you run this ? Regards, Zoumana Le 15 janv. 2015 21:47, "Jorge" <gus...@gm...> a écrit : > Hi, > > I am would like to use Asterisk-Java to transfer a call that is in a > queue. > > The context is the next one. One call go to a queue so I detect the call > with onNewQueueEntry and check if it goes to my queue. If it goes after > doing several things I want to transfers it back to a extension. The main > idea is detecting a call, doing things that can´t be done through the > dialplan and give it back to the dialplan. > > As entry.getChannel has the channel that is in the queue I wanted to use > this channel to transfer to the desired extension. I have done several > attemps but nothing worked. > > public void onNewQueueEntry(final AsteriskQueueEntry entry) { > // Si está en la cola que estamos monitorizando, procesa > if(entry.getQueue().getName().equals(queueName)){ > > Dialplan > > [myCall] > exten => s,1,NoOp(myCall) > exten => s,n,Playback(es/digits/1) > exten => s,n,Return() > > 1) > Java-code > AtxferAction action = new AtxferAction(entry.getChannel().getName(), > "myCall", "s", 1); > ManagerResponse response = > Asterisk.getManagerConnection().sendAction(action); > > > > The answer is ok but nothing happens. > org.asteriskjava.manager.response.ManagerResponse: actionId='null'; > message='Atxfer successfully queued'; response='Success'; uniqueId='null'; > systemHashcode=1928471006 > > > 2) OriginateAction dial = new OriginateAction(); > // // Sets the name of the channel to connect to the > outgoing call. > dial.setChannel(entry.getChannel().getName()); > > // Sets the name of the context of the extension to > connect to. > dial.setContext("myCall"); > // Sets the extension to connect to > dial.setExten("s"); > dial.setPriority(1); > ManagerResponse response = > Asterisk.getManagerConnection().sendAction(dial); > It gives me org.asteriskjava.live.NoSuchChannelException:Channel is not > available > > 3) > Asterisk.getAsteriskServer().originateToApplication(entry.getChannel().getName()", > "myCall", "", 1000); > It gives me org.asteriskjava.live.NoSuchChannelException:Channel is not > available > > Could you let my know what I am doing wrong? > > Kind regards. > > > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > http://p.sf.net/sfu/gigenet > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Wayne M. <way...@th...> - 2015-01-15 23:56:15
|
Hi, I use the Live Manager API to do the following. I have an active channels HashMap which holds Channel objects. When I get a new channel I want to deal with, I add it to the active channels list. Then I have the following helper method: /** * Redirects the given channel to the given extension * @param channelID Channel to redirect * @param to extension to send channel to */ public void redirectCall(String channelID, String to){ AsteriskChannel channel = activeChannels.get(channelID); channel.redirect(autoAnswerContext, to, DEFAULT_PRIORITY); //autoAnswerContext is part of my dial plan that sets the auto answer flags //If you want to redirect to a queue use this instead //channel.redirect(defaultContext, queueNumber, DEFAULT_PRIORITY); } Which all seems straight forward enough, however you mentioned outgoing calls which gave me a problem too. I found the following weirdness to be true: If I create an outgoing call, I will get a couple of channels including an initial one for the party I'm calling. For some reason peculiar to queues, if I then transfer this party to a queue the initial channel ID I was holding gets dropped and a new channel is generated once the party is in the queue. At this stage the channel always remains the same no matter what you do to the party but this initial channel change confused the heck out of me. Hope this helps, for way more code than is here have a look through: https://github.com/waynemerricks/asteriskphone/blob/wip-work/src/com/thevoiceasia/phonebox/asterisk/AsteriskManager.java On 2015-01-15 20:45, Jorge wrote: > Hi, > > I am would like to use Asterisk-Java to transfer a call that is in a > queue. > > The context is the next one. One call go to a queue so I detect the > call with onNewQueueEntry and check if it goes to my queue. If it > goes > after doing several things I want to transfers it back to a > extension. > The main idea is detecting a call, doing things that can´t be done > through the dialplan and give it back to the dialplan. > > As entry.getChannel has the channel that is in the queue I wanted to > use this channel to transfer to the desired extension. I have done > several attemps but nothing worked. > > public void onNewQueueEntry(final AsteriskQueueEntry entry) { > // Si está en la cola que estamos monitorizando, > procesa > if(entry.getQueue().getName().equals(queueName)){ > > Dialplan > > [myCall] > exten => s,1,NoOp(myCall) > exten => s,n,Playback(es/digits/1) > exten => s,n,Return() > > 1) > Java-code > AtxferAction action = new > AtxferAction(entry.getChannel().getName(), "myCall", "s", 1); > ManagerResponse response = > Asterisk.getManagerConnection().sendAction(action); > > The answer is ok but nothing happens. > org.asteriskjava.manager.response.ManagerResponse: actionId=null; > message=Atxfer successfully queued; response=Success; uniqueId=null; > systemHashcode=1928471006 > > 2) OriginateAction dial = new > OriginateAction(); > // // Sets the name of the channel to > connect to the outgoing call. > > dial.setChannel(entry.getChannel().getName()); > > // Sets the name of the context of the > extension to connect to. > dial.setContext("myCall"); > // Sets the extension to connect to > dial.setExten("s"); > dial.setPriority(1); > ManagerResponse response = > Asterisk.getManagerConnection().sendAction(dial); > It gives me org.asteriskjava.live.NoSuchChannelException:Channel is > not available > > 3) > > Asterisk.getAsteriskServer().originateToApplication(entry.getChannel().getName()", > "myCall", "", 1000); > It gives me org.asteriskjava.live.NoSuchChannelException:Channel is > not available > > Could you let my know what I am doing wrong? > > Kind regards. |
From: Jorge <gus...@gm...> - 2015-01-15 20:46:25
|
Hi, I am would like to use Asterisk-Java to transfer a call that is in a queue. The context is the next one. One call go to a queue so I detect the call with onNewQueueEntry and check if it goes to my queue. If it goes after doing several things I want to transfers it back to a extension. The main idea is detecting a call, doing things that can´t be done through the dialplan and give it back to the dialplan. As entry.getChannel has the channel that is in the queue I wanted to use this channel to transfer to the desired extension. I have done several attemps but nothing worked. public void onNewQueueEntry(final AsteriskQueueEntry entry) { // Si está en la cola que estamos monitorizando, procesa if(entry.getQueue().getName().equals(queueName)){ Dialplan [myCall] exten => s,1,NoOp(myCall) exten => s,n,Playback(es/digits/1) exten => s,n,Return() 1) Java-code AtxferAction action = new AtxferAction(entry.getChannel().getName(), "myCall", "s", 1); ManagerResponse response = Asterisk.getManagerConnection().sendAction(action); The answer is ok but nothing happens. org.asteriskjava.manager.response.ManagerResponse: actionId='null'; message='Atxfer successfully queued'; response='Success'; uniqueId='null'; systemHashcode=1928471006 2) OriginateAction dial = new OriginateAction(); // // Sets the name of the channel to connect to the outgoing call. dial.setChannel(entry.getChannel().getName()); // Sets the name of the context of the extension to connect to. dial.setContext("myCall"); // Sets the extension to connect to dial.setExten("s"); dial.setPriority(1); ManagerResponse response = Asterisk.getManagerConnection().sendAction(dial); It gives me org.asteriskjava.live.NoSuchChannelException:Channel is not available 3) Asterisk.getAsteriskServer().originateToApplication(entry.getChannel().getName()", "myCall", "", 1000); It gives me org.asteriskjava.live.NoSuchChannelException:Channel is not available Could you let my know what I am doing wrong? Kind regards. |
From: MT <moh...@gm...> - 2014-12-16 05:32:51
|
thank you so much wayne, you help me a lot. On Mon, Dec 15, 2014 at 8:14 PM, Wayne Merricks < way...@th...> wrote: > > Even with AsteriskServerListener you still need a class that is running > to keep the connections open. As soon as your main thread dies, all the > objects are killed off and you're back to square one. > > I use the Asterisk Live interface with the server listener just because > you can do things in one line of code that the older stuff took several to > do. > > I have a page on github if you want to look through it but there is a lot > of code there that does all sorts of weird stuff that you won't be > interested in. Effectively I have a variation of the previous example > that goes something like this: > > public class Server extends Thread implements AsteriskServerListener { > > private AsteriskServer asterisk; > > public Server(){ > > asterisk = new DefaultAsteriskServer("host", "user", "pass"); > > } > > public void connect() throws ManagerCommunicationException { > > asterisk.initialize(); > asterisk.addAsteriskServerListener(this); > > } > > public void disconnect(){ > > asterisk.shutdown(); > > } > > public static void main(String[] args) throws ManagerCommunicationException { > > Server srv = new Server(); > srv.connect(); > > boolean go = true; > > while(go){ > > try{ > > sleep(1000); > > }catch(InterruptedException e){ > > go = false; > e.printStackTrace(); > > } > > } > > srv.disconnect(); > > } > > //AsteriskServerListener > public void onNewAsteriskChannel(AsteriskChannel channel){ > > //Do stuff with the new channel here (probably add a property change listener) > > } > > public void onNewQueueEntry(AsteriskQueueEntry entry){ > > //Do stuff with the queue entries here > > } > > } > > > Beware of typos, I've just cut and paste this from previous code and may > have missed stuff out. > > Wayne Merricks > The Voice Asia > > On 15/12/14 15:43, MT wrote: > > thanks again, > > do you suggest using loop and sleep or AsteriskServerListener? > > On Mon, Dec 15, 2014 at 7:06 PM, Wayne Merricks < > way...@th...> wrote: >> >> Apologies I missed off the while loop at the top e.g: >> >> boolean go = true; >> >> //Do any prep work here >> >> while(go){ >> >> try{ >> sleep(1000); >> }catch(InterruptedException e){ >> go = false; >> e.printStackTrace(); >> } >> >> } >> >> //Do any clean up here >> >> Wayne Merricks >> The Voice Asia >> >> On 15/12/14 15:26, MT wrote: >> >> hi wayne, >> >> thanks for your reply, >> I need to monitor events forever not just for a period of time >> >> On Mon, Dec 15, 2014 at 6:22 PM, Wayne Merricks < >> way...@th...> wrote: >>> >>> You could just loop the sleep bit. >>> >>> I use the live interfaces which makes things a bit more readable but it >>> still boils down to having a class somewhere that just does: >>> >>> public void run() { >>> >>> try{ >>> sleep(whatever amount of time); >>> }catch(InterruptedException e){ >>> e.printStackTrace(); >>> } >>> >>> } >>> >>> Wayne Merricks >>> The Voice Asia >>> >>> On 15/12/14 14:05, MT wrote: >>> >>> Hi, >>> >>> I use very long thread.sleep for listening to events for a long time and >>> when times out with some daemon tools I start application again, I want to >>> know is there any better solution? >>> >>> I use following way: >>> >>> public class Monitor extends AbstractManagerEventListener { >>> >>> private ManagerConnection managerConnection; >>> >>> public Monitor() throws IOException { >>> ManagerConnectionFactory factory = new ManagerConnectionFactory( >>> "localhost", "user", "pass"); >>> this.managerConnection = factory.createManagerConnection(); >>> } >>> >>> public void run() throws IOException, AuthenticationFailedException, >>> TimeoutException, InterruptedException { >>> >>> managerConnection.addEventListener(this); >>> managerConnection.login(); >>> Thread.sleep(new Long(1000000000)); >>> } >>> >>> public static void main(String[] args) throws Exception { >>> Monitor helloEvents; >>> >>> helloEvents = new Monitor(); >>> helloEvents.run(); >>> } >>> >>> public void onManagerEvent(ManagerEvent event) { >>> // Do Something >>> } >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREEhttp://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >>> >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREEhttp://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREEhttp://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Wayne M. <way...@th...> - 2014-12-15 16:44:16
|
Even with AsteriskServerListener you still need a class that is running to keep the connections open. As soon as your main thread dies, all the objects are killed off and you're back to square one. I use the Asterisk Live interface with the server listener just because you can do things in one line of code that the older stuff took several to do. I have a page on github if you want to look through it but there is a lot of code there that does all sorts of weird stuff that you won't be interested in. Effectively I have a variation of the previous example that goes something like this: public class Server extends Thread implements AsteriskServerListener { private AsteriskServer asterisk; public Server(){ asterisk = new DefaultAsteriskServer("host", "user", "pass"); } public void connect() throws ManagerCommunicationException { asterisk.initialize(); asterisk.addAsteriskServerListener(this); } public void disconnect(){ asterisk.shutdown(); } public static void main(String[] args) throws ManagerCommunicationException { Server srv = new Server(); srv.connect(); boolean go = true; while(go){ try{ sleep(1000); }catch(InterruptedException e){ go = false; e.printStackTrace(); } } srv.disconnect(); } //AsteriskServerListener public void onNewAsteriskChannel(AsteriskChannel channel){ //Do stuff with the new channel here (probably add a property change listener) } public void onNewQueueEntry(AsteriskQueueEntry entry){ //Do stuff with the queue entries here } } Beware of typos, I've just cut and paste this from previous code and may have missed stuff out. Wayne Merricks The Voice Asia On 15/12/14 15:43, MT wrote: > thanks again, > > do you suggest using loop and sleep or AsteriskServerListener? > > On Mon, Dec 15, 2014 at 7:06 PM, Wayne Merricks > <way...@th... > <mailto:way...@th...>> wrote: > > Apologies I missed off the while loop at the top e.g: > > boolean go = true; > > //Do any prep work here > > while(go){ > > try{ > sleep(1000); > }catch(InterruptedException e){ > go = false; > e.printStackTrace(); > } > > } > > //Do any clean up here > > Wayne Merricks > The Voice Asia > > On 15/12/14 15:26, MT wrote: >> hi wayne, >> >> thanks for your reply, >> I need to monitor events forever not just for a period of time >> >> On Mon, Dec 15, 2014 at 6:22 PM, Wayne Merricks >> <way...@th... >> <mailto:way...@th...>> wrote: >> >> You could just loop the sleep bit. >> >> I use the live interfaces which makes things a bit more >> readable but it still boils down to having a class somewhere >> that just does: >> >> public void run() { >> >> try{ >> sleep(whatever amount of time); >> }catch(InterruptedException e){ >> e.printStackTrace(); >> } >> >> } >> >> Wayne Merricks >> The Voice Asia >> >> On 15/12/14 14:05, MT wrote: >>> Hi, >>> >>> I use very long thread.sleep for listening to events for a >>> long time and when times out with some daemon tools I start >>> application again, I want to know is there any better solution? >>> >>> I use following way: >>> >>> public class Monitor extends AbstractManagerEventListener { >>> >>> private ManagerConnection managerConnection; >>> >>> public Monitor() throws IOException { >>> ManagerConnectionFactory factory = new >>> ManagerConnectionFactory( >>> "localhost", "user", "pass"); >>> this.managerConnection = >>> factory.createManagerConnection(); >>> } >>> >>> public void run() throws IOException, >>> AuthenticationFailedException, >>> TimeoutException, InterruptedException { >>> >>> managerConnection.addEventListener(this); >>> managerConnection.login(); >>> Thread.sleep(new Long(1000000000)); >>> } >>> >>> public static void main(String[] args) throws Exception { >>> Monitor helloEvents; >>> >>> helloEvents = new Monitor(); >>> helloEvents.run(); >>> } >>> >>> public void onManagerEvent(ManagerEvent event) { >>> // Do Something >>> } >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and >> Dashboards >> with Interactivity, Sharing, Native Excel Exports, App >> Integration & more >> Get technology previously reserved for billion-dollar >> corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and > Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration > & more > Get technology previously reserved for billion-dollar > corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: MT <moh...@gm...> - 2014-12-15 15:44:24
|
thanks again, do you suggest using loop and sleep or AsteriskServerListener? On Mon, Dec 15, 2014 at 7:06 PM, Wayne Merricks < way...@th...> wrote: > > Apologies I missed off the while loop at the top e.g: > > boolean go = true; > > //Do any prep work here > > while(go){ > > try{ > sleep(1000); > }catch(InterruptedException e){ > go = false; > e.printStackTrace(); > } > > } > > //Do any clean up here > > Wayne Merricks > The Voice Asia > > On 15/12/14 15:26, MT wrote: > > hi wayne, > > thanks for your reply, > I need to monitor events forever not just for a period of time > > On Mon, Dec 15, 2014 at 6:22 PM, Wayne Merricks < > way...@th...> wrote: >> >> You could just loop the sleep bit. >> >> I use the live interfaces which makes things a bit more readable but it >> still boils down to having a class somewhere that just does: >> >> public void run() { >> >> try{ >> sleep(whatever amount of time); >> }catch(InterruptedException e){ >> e.printStackTrace(); >> } >> >> } >> >> Wayne Merricks >> The Voice Asia >> >> On 15/12/14 14:05, MT wrote: >> >> Hi, >> >> I use very long thread.sleep for listening to events for a long time and >> when times out with some daemon tools I start application again, I want to >> know is there any better solution? >> >> I use following way: >> >> public class Monitor extends AbstractManagerEventListener { >> >> private ManagerConnection managerConnection; >> >> public Monitor() throws IOException { >> ManagerConnectionFactory factory = new ManagerConnectionFactory( >> "localhost", "user", "pass"); >> this.managerConnection = factory.createManagerConnection(); >> } >> >> public void run() throws IOException, AuthenticationFailedException, >> TimeoutException, InterruptedException { >> >> managerConnection.addEventListener(this); >> managerConnection.login(); >> Thread.sleep(new Long(1000000000)); >> } >> >> public static void main(String[] args) throws Exception { >> Monitor helloEvents; >> >> helloEvents = new Monitor(); >> helloEvents.run(); >> } >> >> public void onManagerEvent(ManagerEvent event) { >> // Do Something >> } >> >> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREEhttp://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREEhttp://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Wayne M. <way...@th...> - 2014-12-15 15:36:17
|
Apologies I missed off the while loop at the top e.g: boolean go = true; //Do any prep work here while(go){ try{ sleep(1000); }catch(InterruptedException e){ go = false; e.printStackTrace(); } } //Do any clean up here Wayne Merricks The Voice Asia On 15/12/14 15:26, MT wrote: > hi wayne, > > thanks for your reply, > I need to monitor events forever not just for a period of time > > On Mon, Dec 15, 2014 at 6:22 PM, Wayne Merricks > <way...@th... > <mailto:way...@th...>> wrote: > > You could just loop the sleep bit. > > I use the live interfaces which makes things a bit more readable > but it still boils down to having a class somewhere that just does: > > public void run() { > > try{ > sleep(whatever amount of time); > }catch(InterruptedException e){ > e.printStackTrace(); > } > > } > > Wayne Merricks > The Voice Asia > > On 15/12/14 14:05, MT wrote: >> Hi, >> >> I use very long thread.sleep for listening to events for a long >> time and when times out with some daemon tools I start >> application again, I want to know is there any better solution? >> >> I use following way: >> >> public class Monitor extends AbstractManagerEventListener { >> >> private ManagerConnection managerConnection; >> >> public Monitor() throws IOException { >> ManagerConnectionFactory factory = new >> ManagerConnectionFactory( >> "localhost", "user", "pass"); >> this.managerConnection = factory.createManagerConnection(); >> } >> >> public void run() throws IOException, >> AuthenticationFailedException, >> TimeoutException, InterruptedException { >> >> managerConnection.addEventListener(this); >> managerConnection.login(); >> Thread.sleep(new Long(1000000000)); >> } >> >> public static void main(String[] args) throws Exception { >> Monitor helloEvents; >> >> helloEvents = new Monitor(); >> helloEvents.run(); >> } >> >> public void onManagerEvent(ManagerEvent event) { >> // Do Something >> } >> >> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and > Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration > & more > Get technology previously reserved for billion-dollar > corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: MT <moh...@gm...> - 2014-12-15 15:27:20
|
hi wayne, thanks for your reply, I need to monitor events forever not just for a period of time On Mon, Dec 15, 2014 at 6:22 PM, Wayne Merricks < way...@th...> wrote: > > You could just loop the sleep bit. > > I use the live interfaces which makes things a bit more readable but it > still boils down to having a class somewhere that just does: > > public void run() { > > try{ > sleep(whatever amount of time); > }catch(InterruptedException e){ > e.printStackTrace(); > } > > } > > Wayne Merricks > The Voice Asia > > On 15/12/14 14:05, MT wrote: > > Hi, > > I use very long thread.sleep for listening to events for a long time and > when times out with some daemon tools I start application again, I want to > know is there any better solution? > > I use following way: > > public class Monitor extends AbstractManagerEventListener { > > private ManagerConnection managerConnection; > > public Monitor() throws IOException { > ManagerConnectionFactory factory = new ManagerConnectionFactory( > "localhost", "user", "pass"); > this.managerConnection = factory.createManagerConnection(); > } > > public void run() throws IOException, AuthenticationFailedException, > TimeoutException, InterruptedException { > > managerConnection.addEventListener(this); > managerConnection.login(); > Thread.sleep(new Long(1000000000)); > } > > public static void main(String[] args) throws Exception { > Monitor helloEvents; > > helloEvents = new Monitor(); > helloEvents.run(); > } > > public void onManagerEvent(ManagerEvent event) { > // Do Something > } > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREEhttp://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Wayne M. <way...@th...> - 2014-12-15 15:09:33
|
You could just loop the sleep bit. I use the live interfaces which makes things a bit more readable but it still boils down to having a class somewhere that just does: public void run() { try{ sleep(whatever amount of time); }catch(InterruptedException e){ e.printStackTrace(); } } Wayne Merricks The Voice Asia On 15/12/14 14:05, MT wrote: > Hi, > > I use very long thread.sleep for listening to events for a long time > and when times out with some daemon tools I start application again, I > want to know is there any better solution? > > I use following way: > > public class Monitor extends AbstractManagerEventListener { > > private ManagerConnection managerConnection; > > public Monitor() throws IOException { > ManagerConnectionFactory factory = new ManagerConnectionFactory( > "localhost", "user", "pass"); > this.managerConnection = factory.createManagerConnection(); > } > > public void run() throws IOException, AuthenticationFailedException, > TimeoutException, InterruptedException { > > managerConnection.addEventListener(this); > managerConnection.login(); > Thread.sleep(new Long(1000000000)); > } > > public static void main(String[] args) throws Exception { > Monitor helloEvents; > > helloEvents = new Monitor(); > helloEvents.run(); > } > > public void onManagerEvent(ManagerEvent event) { > // Do Something > } > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: MT <moh...@gm...> - 2014-12-15 14:05:40
|
Hi, I use very long thread.sleep for listening to events for a long time and when times out with some daemon tools I start application again, I want to know is there any better solution? I use following way: public class Monitor extends AbstractManagerEventListener { private ManagerConnection managerConnection; public Monitor() throws IOException { ManagerConnectionFactory factory = new ManagerConnectionFactory( "localhost", "user", "pass"); this.managerConnection = factory.createManagerConnection(); } public void run() throws IOException, AuthenticationFailedException, TimeoutException, InterruptedException { managerConnection.addEventListener(this); managerConnection.login(); Thread.sleep(new Long(1000000000)); } public static void main(String[] args) throws Exception { Monitor helloEvents; helloEvents = new Monitor(); helloEvents.run(); } public void onManagerEvent(ManagerEvent event) { // Do Something } |
From: Yves A. <yv...@gm...> - 2014-11-26 12:37:12
|
Hi, asterisk v13 came out far after asterisk-java 1.0, so chances, that something does not work as expected are very high. From my experience I can say that most things work, but some things do not or do not work as before, so be aware of this and test your application in any detail if it works with asterisk v13. Especially (new) events are not supported and some changes on old well-known events have been applied also. yves Am 26.11.2014 um 12:25 schrieb Zoumana TRAORE: > Hello, > > The lib seems not to be maintained no more by the original developper > (so i doubt about to fact to release some upgrades...) > I've been using the current release with some officially unsupported > versions but no side effects until now. > > Regards > > *--- > * > > *Zoumana TRAORE* > > > 2014-11-26 10:22 GMT+01:00 Riipinen Petri <pet...@in... > <mailto:pet...@in...>>: > > Hello there, > > I'm trying to use Asterisk-Java (1.0.0.M3) with Asterisk v13 and > it looks like it works for my simple test use. However, when > logging in to Asterisk, I get this log entry: > --- > WARNING: Unsupported protocol version 'Asterisk Call > Manager/2.5.0'. Use at your own risk. > --- > > I guess that means that Asterisk-Java hasn't been really ensured > to work with Asterisk v13. > > Does anyone know of any plans to upgrade Asterisk-Java to work > with Asterisk v13? Or has anyone tested the currently available > version so that it works with Asterisk v13 properly? > > Regards, > - Petri > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and > Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration > & more > Get technology previously reserved for billion-dollar > corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. http://www.avast.com |
From: Zoumana T. <zou...@gm...> - 2014-11-26 11:26:15
|
Hello, The lib seems not to be maintained no more by the original developper (so i doubt about to fact to release some upgrades...) I've been using the current release with some officially unsupported versions but no side effects until now. Regards *---* *Zoumana TRAORE* 2014-11-26 10:22 GMT+01:00 Riipinen Petri <pet...@in...>: > Hello there, > > I'm trying to use Asterisk-Java (1.0.0.M3) with Asterisk v13 and it looks > like it works for my simple test use. However, when logging in to Asterisk, > I get this log entry: > --- > WARNING: Unsupported protocol version 'Asterisk Call Manager/2.5.0'. Use > at your own risk. > --- > > I guess that means that Asterisk-Java hasn't been really ensured to work > with Asterisk v13. > > Does anyone know of any plans to upgrade Asterisk-Java to work with > Asterisk v13? Or has anyone tested the currently available version so that > it works with Asterisk v13 properly? > > Regards, > - Petri > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Riipinen P. <pet...@in...> - 2014-11-26 09:35:08
|
Hello there, I'm trying to use Asterisk-Java (1.0.0.M3) with Asterisk v13 and it looks like it works for my simple test use. However, when logging in to Asterisk, I get this log entry: --- WARNING: Unsupported protocol version 'Asterisk Call Manager/2.5.0'. Use at your own risk. --- I guess that means that Asterisk-Java hasn't been really ensured to work with Asterisk v13. Does anyone know of any plans to upgrade Asterisk-Java to work with Asterisk v13? Or has anyone tested the currently available version so that it works with Asterisk v13 properly? Regards, - Petri |
From: Diego G. <di...@pr...> - 2014-11-13 11:46:50
|
100 calls 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 Wed, Nov 12, 2014 at 5:58 PM, Jhoan Orozco <jho...@gm...> wrote: > Cuantas llamadas concurrentes vas a tener? > > Hay dos formas de hacerlo. > > 2014-11-11 15:20 GMT-05:00 Diego Guimarães <di...@ni...>: > >> Hello! I need to send the originate command action, and wait for a >> return: busy, congestion, no answer, answer .. >> how can I do? >> *Diego Guimarães* >> *dCAP (Digium Certified Asterisk Professional)* >> Nextel : 88*15973 >> (Mobile) celular: (34) - 9268-9999 >> >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-11-13 08:11:38
|
Hello, would you mind answering in english, please...? You can originate the call using originateaction in a synchronous and asynchronous manner (see doc). synchronous call waits until call is established, failed or got an timeout. asynchronous call returns immediately and reports the callstates via a callbackhandler. instead of a callbackhandler you can pass also NULL and implement your own callhandler by investigating the events... pls don´t expect anybody to write you a full documented example at the first shot.... but read the documentation and tutorials... examples for doing this can be found over and over by using google... regards yves Am 12.11.2014 um 20:58 schrieb Jhoan Orozco: > Cuantas llamadas concurrentes vas a tener? > > Hay dos formas de hacerlo. > > 2014-11-11 15:20 GMT-05:00 Diego Guimarães <di...@ni... > <mailto:di...@ni...>>: > > Hello! I need to send the originate command action, and wait for a > return: busy, congestion, no answer, answer .. > how can I do? > *Diego Guimarães* > /dCAP (Digium Certified Asterisk Professional)/ > Nextel : 88*15973 > (Mobile) celular: (34) - 9268-9999 > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push > notifications. > Take corrective actions from your mobile device. > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Jhoan O. <jho...@gm...> - 2014-11-12 19:58:28
|
Cuantas llamadas concurrentes vas a tener? Hay dos formas de hacerlo. 2014-11-11 15:20 GMT-05:00 Diego Guimarães <di...@ni...>: > Hello! I need to send the originate command action, and wait for a return: > busy, congestion, no answer, answer .. > how can I do? > *Diego Guimarães* > *dCAP (Digium Certified Asterisk Professional)* > Nextel : 88*15973 > (Mobile) celular: (34) - 9268-9999 > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Diego G. <di...@ni...> - 2014-11-11 20:20:25
|
Hello! I need to send the originate command action, and wait for a return: busy, congestion, no answer, answer .. how can I do? *Diego Guimarães* *dCAP (Digium Certified Asterisk Professional)* Nextel : 88*15973 (Mobile) celular: (34) - 9268-9999 |
From: Peter K. <pet...@ed...> - 2014-10-20 14:10:17
|
Just a stupid question. When you build a simple dialplan does calling pres work as expected ? Or does your telefonie provider even support this feature ? peter -----Ursprüngliche Nachricht----- Von: Daniele Renda <dan...@gm...> Gesendet: Mon 20 Oktober 2014 15:41 An: ast...@li... Betreff: Re: [Asterisk-java-users] setCallingPres() don't work Hi Yves, yes I yet done this....but unfortunally the caller id is not hidden... In case I'll try the ogher suggestion if there isn't a better way. Thanks very much 2014-10-20 15:37 GMT+02:00 Yves A. <yv...@gm... <mailto:yv...@gm...> >: you're originating the call by giving a context, prio, exten... so go to your dialplan [context] and insert set(...) at the given exten/prio pos. if you´re unsure... post your dialplan.. or try the other suggestion and compile dahdi into your asterisk... yves Am 20.10.2014 um 12:50 schrieb Daniele Renda: Hi Yves, thanks for your suggestion. Unfortunally I'm originating the call from the code OriginateAction action = new OriginateAction(); action.setAsync(true); action.setChannel("SIP/provider/phonenumber"); action.setContext(context)); action.setExten(exten); action.setPriority(priority); action.setTimeout(asteriskTimeout); action.setCallerId(telefonata.getCallerId()); action.setCallingPres(3); So I think using set(CALLERID(num-pres)=prohib) the callerid can't be oscured because the call is yet made at that point. Others idea? Thanks 2014-10-19 22:46 GMT+02:00 Yves A. <yv...@gm... <mailto:yv...@gm...> >: out of my stomach one of these steps: - use set(CALLERID(num-pres)=prohib) from within the dialplan or - compile libpri and dahdi into your asterisk yves Am 19.10.2014 um 18:22 schrieb Daniele Renda: Hi guys, someone can help me? Thanks! 2014-10-14 17:41 GMT+02:00 Daniele Renda <dan...@gm... <mailto:dan...@gm...> >: Hi, I'm using Asterisk 11.12.1 with Asterisk Java 1.0.0.M3. I'm trying to hide the callerId when I create an originateasync. When I want to display the callerid I do: action.setCallerId(telefonata.getCallerId()); action.setCallingPres(3); instead when I want to hide it I do: action.setCallingPres(32); unfortunally seems that the call is not sent by asterisk. I see that "This property is only available on BRIstuffed Asterisk servers." But how I can hide the caller id if I'm using a sip trunking asterisk server? Thanks very much -- Daniele Renda -- Daniele Renda ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho <http://p.sf.net/sfu/Zoho> _______________________________________________ Asterisk-java-users mailing list Ast...@li... <mailto:Ast...@li...> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho <http://p.sf.net/sfu/Zoho> _______________________________________________ Asterisk-java-users mailing list Ast...@li... <mailto:Ast...@li...> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- Daniele Renda ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho <http://p.sf.net/sfu/Zoho> _______________________________________________ Asterisk-java-users mailing list Ast...@li... <mailto:Ast...@li...> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho <http://p.sf.net/sfu/Zoho> _______________________________________________ Asterisk-java-users mailing list Ast...@li... <mailto:Ast...@li...> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- Daniele Renda ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users Mehr News und Informationen aus der Welt der EDAG Group können Sie in unserem interaktiven EMAG-Magazin (http://www.edag.de/de/services/corporate-services/newsletter.html) nachlesen! More news and information about the EDAG Group can be found in our interactive EMAG-Magazine (http://www.edag.de/en/services/corporate-services/newsletter.html)! ------------------------------------------------------------------------------ Registergericht/Court of jurisdiction: Amtsgericht Wiesbaden, HRB 27623 USt.-Id: DE 292 939 239 Vorstand / Executive Board: Werner Kropsbauer (CEO), Jörg Ohlsen (CTO), Harald Poeschke (COO), Jürgen Vogt (CFO) Aufsichtsratsvorsitzender / Chairman of the Supervisory Board: Thomas Eichelmann Hauptsitz/Headquarters: EDAG Engineering AG, Kreuzberger Ring 40, 65205 Wiesbaden Deutschland/Germany / www.edag.com This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. |
From: Daniele R. <dan...@gm...> - 2014-10-20 13:40:31
|
Hi Yves, yes I yet done this....but unfortunally the caller id is not hidden... In case I'll try the ogher suggestion if there isn't a better way. Thanks very much 2014-10-20 15:37 GMT+02:00 Yves A. <yv...@gm...>: > you're originating the call by giving a context, prio, exten... so go to > your dialplan [context] and insert set(...) at the given exten/prio pos. > if you´re unsure... post your dialplan.. > > or try the other suggestion and compile dahdi into your asterisk... > > yves > > Am 20.10.2014 um 12:50 schrieb Daniele Renda: > > Hi Yves, > thanks for your suggestion. > > Unfortunally I'm originating the call from the code > > OriginateAction action = new OriginateAction(); > action.setAsync(true); > action.setChannel("SIP/provider/phonenumber"); > action.setContext(context)); > action.setExten(exten); > action.setPriority(priority); > action.setTimeout(asteriskTimeout); > action.setCallerId(telefonata.getCallerId()); > action.setCallingPres(3); > > So I think using > > set(CALLERID(num-pres)=prohib) > > the callerid can't be oscured because the call is yet made at that point. > > Others idea? > > Thanks > > 2014-10-19 22:46 GMT+02:00 Yves A. <yv...@gm...>: > >> out of my stomach one of these steps: >> >> - use >> >> set(CALLERID(num-pres)=prohib) >> >> from within the dialplan >> or >> - compile libpri and dahdi into your asterisk >> >> yves >> >> >> Am 19.10.2014 um 18:22 schrieb Daniele Renda: >> >> Hi guys, >> someone can help me? >> >> Thanks! >> >> 2014-10-14 17:41 GMT+02:00 Daniele Renda <dan...@gm...>: >> >>> Hi, >>> I'm using Asterisk 11.12.1 with Asterisk Java 1.0.0.M3. >>> >>> I'm trying to hide the callerId when I create an originateasync. >>> >>> When I want to display the callerid I do: >>> >>> action.setCallerId(telefonata.getCallerId()); >>> action.setCallingPres(3); >>> >>> instead when I want to hide it I do: >>> >>> action.setCallingPres(32); >>> >>> unfortunally seems that the call is not sent by asterisk. >>> >>> I see that "This property is only available on BRIstuffed Asterisk >>> servers." But how I can hide the caller id if I'm using a sip trunking >>> asterisk server? >>> >>> Thanks very much >>> >>> -- >>> Daniele Renda >>> >> >> >> >> -- >> Daniele Renda >> >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device.http://p.sf.net/sfu/Zoho >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://p.sf.net/sfu/Zoho >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device.http://p.sf.net/sfu/Zoho > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Daniele Renda |
From: Yves A. <yv...@gm...> - 2014-10-20 13:37:13
|
you're originating the call by giving a context, prio, exten... so go to your dialplan [context] and insert set(...) at the given exten/prio pos. if you´re unsure... post your dialplan.. or try the other suggestion and compile dahdi into your asterisk... yves Am 20.10.2014 um 12:50 schrieb Daniele Renda: > Hi Yves, > thanks for your suggestion. > > Unfortunally I'm originating the call from the code > > OriginateAction action = new OriginateAction(); > action.setAsync(true); > action.setChannel("SIP/provider/phonenumber"); > action.setContext(context)); > action.setExten(exten); > action.setPriority(priority); > action.setTimeout(asteriskTimeout); > action.setCallerId(telefonata.getCallerId()); > action.setCallingPres(3); > > So I think using > > set(CALLERID(num-pres)=prohib) > > the callerid can't be oscured because the call is yet made at that point. > > Others idea? > > Thanks > > 2014-10-19 22:46 GMT+02:00 Yves A. <yv...@gm... > <mailto:yv...@gm...>>: > > out of my stomach one of these steps: > > - use > > set(CALLERID(num-pres)=prohib) > > from within the dialplan > or > - compile libpri and dahdi into your asterisk > > yves > > > Am 19.10.2014 um 18:22 schrieb Daniele Renda: >> Hi guys, >> someone can help me? >> >> Thanks! >> >> 2014-10-14 17:41 GMT+02:00 Daniele Renda <dan...@gm... >> <mailto:dan...@gm...>>: >> >> Hi, >> I'm using Asterisk 11.12.1 with Asterisk Java 1.0.0.M3. >> >> I'm trying to hide the callerId when I create an originateasync. >> >> When I want to display the callerid I do: >> >> action.setCallerId(telefonata.getCallerId()); >> action.setCallingPres(3); >> >> instead when I want to hide it I do: >> >> action.setCallingPres(32); >> >> unfortunally seems that the call is not sent by asterisk. >> >> I see that "This property is only available on BRIstuffed >> Asterisk servers." But how I can hide the caller id if I'm >> using a sip trunking asterisk server? >> >> Thanks very much >> >> -- >> Daniele Renda >> >> >> >> >> -- >> Daniele Renda >> >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://p.sf.net/sfu/Zoho >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push > notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Daniele R. <dan...@gm...> - 2014-10-20 10:50:06
|
Hi Yves, thanks for your suggestion. Unfortunally I'm originating the call from the code OriginateAction action = new OriginateAction(); action.setAsync(true); action.setChannel("SIP/provider/phonenumber"); action.setContext(context)); action.setExten(exten); action.setPriority(priority); action.setTimeout(asteriskTimeout); action.setCallerId(telefonata.getCallerId()); action.setCallingPres(3); So I think using set(CALLERID(num-pres)=prohib) the callerid can't be oscured because the call is yet made at that point. Others idea? Thanks 2014-10-19 22:46 GMT+02:00 Yves A. <yv...@gm...>: > out of my stomach one of these steps: > > - use > > set(CALLERID(num-pres)=prohib) > > from within the dialplan > or > - compile libpri and dahdi into your asterisk > > yves > > > Am 19.10.2014 um 18:22 schrieb Daniele Renda: > > Hi guys, > someone can help me? > > Thanks! > > 2014-10-14 17:41 GMT+02:00 Daniele Renda <dan...@gm...>: > >> Hi, >> I'm using Asterisk 11.12.1 with Asterisk Java 1.0.0.M3. >> >> I'm trying to hide the callerId when I create an originateasync. >> >> When I want to display the callerid I do: >> >> action.setCallerId(telefonata.getCallerId()); >> action.setCallingPres(3); >> >> instead when I want to hide it I do: >> >> action.setCallingPres(32); >> >> unfortunally seems that the call is not sent by asterisk. >> >> I see that "This property is only available on BRIstuffed Asterisk >> servers." But how I can hide the caller id if I'm using a sip trunking >> asterisk server? >> >> Thanks very much >> >> -- >> Daniele Renda >> > > > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device.http://p.sf.net/sfu/Zoho > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Daniele Renda |
From: Yves A. <yv...@gm...> - 2014-10-19 20:46:55
|
out of my stomach one of these steps: - use set(CALLERID(num-pres)=prohib) from within the dialplan or - compile libpri and dahdi into your asterisk yves Am 19.10.2014 um 18:22 schrieb Daniele Renda: > Hi guys, > someone can help me? > > Thanks! > > 2014-10-14 17:41 GMT+02:00 Daniele Renda <dan...@gm... > <mailto:dan...@gm...>>: > > Hi, > I'm using Asterisk 11.12.1 with Asterisk Java 1.0.0.M3. > > I'm trying to hide the callerId when I create an originateasync. > > When I want to display the callerid I do: > > action.setCallerId(telefonata.getCallerId()); > action.setCallingPres(3); > > instead when I want to hide it I do: > > action.setCallingPres(32); > > unfortunally seems that the call is not sent by asterisk. > > I see that "This property is only available on BRIstuffed Asterisk > servers." But how I can hide the caller id if I'm using a sip > trunking asterisk server? > > Thanks very much > > -- > Daniele Renda > > > > > -- > Daniele Renda > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Daniele R. <dan...@gm...> - 2014-10-19 16:22:39
|
Hi guys, someone can help me? Thanks! 2014-10-14 17:41 GMT+02:00 Daniele Renda <dan...@gm...>: > Hi, > I'm using Asterisk 11.12.1 with Asterisk Java 1.0.0.M3. > > I'm trying to hide the callerId when I create an originateasync. > > When I want to display the callerid I do: > > action.setCallerId(telefonata.getCallerId()); > action.setCallingPres(3); > > instead when I want to hide it I do: > > action.setCallingPres(32); > > unfortunally seems that the call is not sent by asterisk. > > I see that "This property is only available on BRIstuffed Asterisk > servers." But how I can hide the caller id if I'm using a sip trunking > asterisk server? > > Thanks very much > > -- > Daniele Renda > -- Daniele Renda |
From: Raffi K. <rkr...@nt...> - 2014-10-14 16:30:15
|
I will be attending AstriCon, Oct 22-24, in Las Vegas. I would be interested in meeting other Java developers working with Asterisk, to share experiences. Regards, Raffi |