Thread: [Asterisk-java-users] AGI Thread does not break at call Hangup
Brought to you by:
srt
From: Zoumana T. <zou...@gm...> - 2014-04-02 22:46:57
|
Hi everybody, During an incoming call handled by AGI, i would like to detect where the caller hangup and then break the IVR scenario at this precise point. For example: Here is my AGI content: *public void service(AgiRequest request, AgiChannel channel) throws AgiException { for(int i=0; i <3; i++){ System.out.println("playing"+(i+1)); channel.streamFile("svi/jingle"); } hangup();}* Each audio play has 7 seconds duration. Even i hangup the call during the "playing 1", AGI keeps executing all the sequences. This is the output: *INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1playing1playing2playing3Apr 3, 2014 12:26:52 AM org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1* Thanks! Regards, Zoumana |
From: Yves A. <yv...@gm...> - 2014-04-02 23:17:27
|
hi, normally you would get an exception at any method that accesses a hungup channel. this bevaviour is strange. which version of asterisk and aj are you using? add a system.out.println(channel.getChannelStatus()); before streaming and post the output... yves Am 03.04.2014 00:46, schrieb Zoumana TRAORE: > Hi everybody, > > During an incoming call handled by AGI, i would like to detect > where the caller hangup and then break the IVR scenario at this > precise point. > > For example: > Here is my AGI content: > / > public void service(AgiRequest request, AgiChannel channel) throws > AgiException { > > for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > channel.streamFile("svi/jingle"); > } > hangup(); > } > / > Each audio play has 7 seconds duration. > Even i hangup the call during the "playing 1", AGI keeps executing all > the sequences. > This is the output: > > /INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > playing1 > playing2 > playing3 > Apr 3, 2014 12:26:52 AM > org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript > INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > / > Thanks! > > Regards, > Zoumana > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Zoumana T. <zou...@gm...> - 2014-04-02 23:46:04
|
Hi Yves, Thanks for helping me out. Yes, i found that strange too. Asterisk 11.5 AJ 0.3.1 Here is the code: public void service(AgiRequest request, AgiChannel channel) throws AgiException { for(int i=0; i <3; i++){ System.out.println("playing"+(i+1)); System.out.println("channelStatus="+channel.getChannelStatus()); channel.streamFile("svi/jingle"); } hangup(); } Here is the output (there is something interesting indeed, channelStatus=-1 after my hangup, i could try to use that for my need if nobody sees something more suitable) INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 playing1 channelStatus=6 playing2 channelStatus=-1 playing3 channelStatus=-1 Apr 3, 2014 1:42:37 AM org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 Thanks *--- * *Zoumana TRAORE* mob. (+33)0699783622 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm...>: > hi, > > normally you would get an exception at any method that accesses a hungup > channel. this bevaviour is strange. > which version of asterisk and aj are you using? > add a system.out.println(channel.getChannelStatus()); before streaming and > post the output... > > yves > > Am 03.04.2014 00:46, schrieb Zoumana TRAORE: > > Hi everybody, > > During an incoming call handled by AGI, i would like to detect > where the caller hangup and then break the IVR scenario at this precise > point. > > For example: > Here is my AGI content: > > > > > > > > > > * public void service(AgiRequest request, AgiChannel channel) throws > AgiException { for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > channel.streamFile("svi/jingle"); } hangup(); } * > Each audio play has 7 seconds duration. > Even i hangup the call during the "playing 1", AGI keeps executing all > the sequences. > This is the output: > > > > > > > > *INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > playing1 playing2 playing3 Apr 3, 2014 12:26:52 AM > org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript INFO: End > AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 * > Thanks! > > Regards, > Zoumana > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-04-03 10:21:43
|
hi, please upgrade to latest asterisk-java first... it is somewhat 1.x.x now. this might already bring the expected behaviour. regards, yves Am 03.04.2014 01:45, schrieb Zoumana TRAORE: > Hi Yves, > > Thanks for helping me out. > Yes, i found that strange too. > Asterisk 11.5 > AJ 0.3.1 > > Here is the code: > public void service(AgiRequest request, AgiChannel channel) throws > AgiException { > > for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > System.out.println("channelStatus="+channel.getChannelStatus()); > channel.streamFile("svi/jingle"); > } > hangup(); > } > > > Here is the output (there is something interesting indeed, > channelStatus=-1 after my hangup, i could try to use that for my need > if nobody sees something more suitable) > INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > playing1 > channelStatus=6 > playing2 > channelStatus=-1 > playing3 > channelStatus=-1 > Apr 3, 2014 1:42:37 AM > org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript > INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > > Thanks > > > > *--- > * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm... > <mailto:yv...@gm...>>: > > hi, > > normally you would get an exception at any method that accesses a > hungup channel. this bevaviour is strange. > which version of asterisk and aj are you using? > add a system.out.println(channel.getChannelStatus()); before > streaming and post the output... > > yves > > Am 03.04.2014 00 <tel:03.04.2014%2000>:46, schrieb Zoumana TRAORE: >> Hi everybody, >> >> During an incoming call handled by AGI, i would like to detect >> where the caller hangup and then break the IVR scenario at this >> precise point. >> >> For example: >> Here is my AGI content: >> / >> public void service(AgiRequest request, AgiChannel channel) >> throws AgiException { >> >> for(int i=0; i <3; i++){ >> System.out.println("playing"+(i+1)); >> channel.streamFile("svi/jingle"); >> } >> hangup(); >> } >> / >> Each audio play has 7 seconds duration. >> Even i hangup the call during the "playing 1", AGI keeps >> executing all the sequences. >> This is the output: >> >> /INFO: Begin AgiScript SVILegoAgi on Asterisk-Java >> DaemonPool-1-thread-1 >> playing1 >> playing2 >> playing3 >> Apr 3, 2014 12:26:52 AM >> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript >> INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >> / >> Thanks! >> >> Regards, >> Zoumana >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Zoumana T. <zou...@gm...> - 2014-04-03 10:51:00
|
Hi Yves, Thanks, yes maybe. But i will stick for the moment to the 0.3.1 as 1.0.0 is still a milestone and we are on production + i have wrote some codes on 0.3.1 thread pool and queue management for our needs. I will wait 1.0.0 to go general availability to migrate. Following your track on *channel.getChannelStatus* and doing something like this: * public void service(AgiRequest request, AgiChannel channel) throws AgiException { boolean hangup = false; while(channel.getChannelStatus() != -1 && !hangup){ for(int i=0; i <3; i++){ System.out.println("playing"+(i+1)); System.out.println("channelStatus="+channel.getChannelStatus()); channel.streamFile("svi/jingle"); if(i==2){ hangup=true; } if(channel.getChannelStatus() == -1){ break; } } } hangup();* * }* I've reached the expected behaviour. Many Thanks Regards, Zoumana *---* *Zoumana TRAORE* mob. (+33)0699783622 2014-04-03 12:21 GMT+02:00 Yves A. <yv...@gm...>: > hi, > > please upgrade to latest asterisk-java first... it is somewhat 1.x.x now. > this might already bring the expected behaviour. > > regards, > yves > > Am 03.04.2014 01:45, schrieb Zoumana TRAORE: > > Hi Yves, > > Thanks for helping me out. > Yes, i found that strange too. > Asterisk 11.5 > AJ 0.3.1 > > Here is the code: > public void service(AgiRequest request, AgiChannel channel) throws > AgiException { > > for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > > System.out.println("channelStatus="+channel.getChannelStatus()); > channel.streamFile("svi/jingle"); > } > hangup(); > } > > > Here is the output (there is something interesting indeed, > channelStatus=-1 after my hangup, i could try to use that for my need if > nobody sees something more suitable) > INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > playing1 > channelStatus=6 > playing2 > channelStatus=-1 > playing3 > channelStatus=-1 > Apr 3, 2014 1:42:37 AM > org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript > INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 > > Thanks > > > > > *--- * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm...>: > >> hi, >> >> normally you would get an exception at any method that accesses a hungup >> channel. this bevaviour is strange. >> which version of asterisk and aj are you using? >> add a system.out.println(channel.getChannelStatus()); before streaming >> and post the output... >> >> yves >> >> Am 03.04.2014 00:46, schrieb Zoumana TRAORE: >> >> Hi everybody, >> >> During an incoming call handled by AGI, i would like to detect >> where the caller hangup and then break the IVR scenario at this precise >> point. >> >> For example: >> Here is my AGI content: >> >> >> >> >> >> >> >> >> >> * public void service(AgiRequest request, AgiChannel channel) throws >> AgiException { for(int i=0; i <3; i++){ >> System.out.println("playing"+(i+1)); >> channel.streamFile("svi/jingle"); } hangup(); } * >> Each audio play has 7 seconds duration. >> Even i hangup the call during the "playing 1", AGI keeps executing all >> the sequences. >> This is the output: >> >> >> >> >> >> >> >> *INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >> playing1 playing2 playing3 Apr 3, 2014 12:26:52 AM >> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript INFO: End >> AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 * >> Thanks! >> >> Regards, >> Zoumana >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-04-07 09:57:54
|
Hi, for me it is quite unlikely that there will (ever) be an official release of 1.0 version... The work on this project seems abandoned unfortunately. yves Am 03.04.2014 12:50, schrieb Zoumana TRAORE: > Hi Yves, > > Thanks, yes maybe. > But i will stick for the moment to the 0.3.1 as 1.0.0 is still a > milestone and we are on production + i have wrote some codes on 0.3.1 > thread pool and queue management for our needs. I will wait 1.0.0 to > go general availability to migrate. > > Following your track on /channel.getChannelStatus/ and doing something > like this: > > / public void service(AgiRequest request, AgiChannel channel) > throws AgiException { > > boolean hangup = false; > while(channel.getChannelStatus() != -1 && !hangup){ > for(int i=0; i <3; i++){ > System.out.println("playing"+(i+1)); > System.out.println("channelStatus="+channel.getChannelStatus()); > channel.streamFile("svi/jingle"); > if(i==2){ > hangup=true; > } > if(channel.getChannelStatus() == -1){ > break; > } > } > } > hangup();// > }/ > > I've reached the expected behaviour. > Many Thanks > > Regards, > Zoumana > > *--- > * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-03 12:21 GMT+02:00 Yves A. <yv...@gm... > <mailto:yv...@gm...>>: > > hi, > > please upgrade to latest asterisk-java first... it is somewhat > 1.x.x now. this might already bring the expected behaviour. > > regards, > yves > > Am 03.04.2014 01 <tel:03.04.2014%2001>:45, schrieb Zoumana TRAORE: >> Hi Yves, >> >> Thanks for helping me out. >> Yes, i found that strange too. >> Asterisk 11.5 >> AJ 0.3.1 >> >> Here is the code: >> public void service(AgiRequest request, AgiChannel channel) >> throws AgiException { >> >> for(int i=0; i <3; i++){ >> System.out.println("playing"+(i+1)); >> System.out.println("channelStatus="+channel.getChannelStatus()); >> channel.streamFile("svi/jingle"); >> } >> hangup(); >> } >> >> >> Here is the output (there is something interesting indeed, >> channelStatus=-1 after my hangup, i could try to use that for my >> need if nobody sees something more suitable) >> INFO: Begin AgiScript SVILegoAgi on Asterisk-Java >> DaemonPool-1-thread-1 >> playing1 >> channelStatus=6 >> playing2 >> channelStatus=-1 >> playing3 >> channelStatus=-1 >> Apr 3, 2014 1:42:37 AM >> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript >> INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >> >> Thanks >> >> >> >> *--- >> * >> >> *Zoumana TRAORE* >> >> mob. (+33)0699783622 <tel:%28%2B33%290699783622> >> >> >> 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm... >> <mailto:yv...@gm...>>: >> >> hi, >> >> normally you would get an exception at any method that >> accesses a hungup channel. this bevaviour is strange. >> which version of asterisk and aj are you using? >> add a system.out.println(channel.getChannelStatus()); before >> streaming and post the output... >> >> yves >> >> Am 03.04.2014 00 <tel:03.04.2014%2000>:46, schrieb Zoumana >> TRAORE: >>> Hi everybody, >>> >>> During an incoming call handled by AGI, i would like to detect >>> where the caller hangup and then break the IVR scenario at >>> this precise point. >>> >>> For example: >>> Here is my AGI content: >>> / >>> public void service(AgiRequest request, AgiChannel channel) >>> throws AgiException { >>> >>> for(int i=0; i <3; i++){ >>> System.out.println("playing"+(i+1)); >>> channel.streamFile("svi/jingle"); >>> } >>> hangup(); >>> } >>> / >>> Each audio play has 7 seconds duration. >>> Even i hangup the call during the "playing 1", AGI keeps >>> executing all the sequences. >>> This is the output: >>> >>> /INFO: Begin AgiScript SVILegoAgi on Asterisk-Java >>> DaemonPool-1-thread-1 >>> playing1 >>> playing2 >>> playing3 >>> Apr 3, 2014 12:26:52 AM >>> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript >>> INFO: End AgiScript SVILegoAgi on Asterisk-Java >>> DaemonPool-1-thread-1 >>> / >>> Thanks! >>> >>> Regards, >>> Zoumana >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Zoumana T. <zou...@gm...> - 2014-04-07 11:01:35
|
Hi, Maybe some volunteers could take over this task. I would be part of it. Thank you for the info. *---* *Zoumana TRAORE* 2014-04-07 11:57 GMT+02:00 Yves A. <yv...@gm...>: > Hi, > > for me it is quite unlikely that there will (ever) be an official release > of 1.0 version... The work on this project seems abandoned unfortunately. > > yves > > > Am 03.04.2014 12:50, schrieb Zoumana TRAORE: > > Hi Yves, > > Thanks, yes maybe. > But i will stick for the moment to the 0.3.1 as 1.0.0 is still a milestone > and we are on production + i have wrote some codes on 0.3.1 thread pool and > queue management for our needs. I will wait 1.0.0 to go general > availability to migrate. > > Following your track on *channel.getChannelStatus* and doing something > like this: > > > > > > > > > > > > > > > > > > * public void service(AgiRequest request, AgiChannel channel) throws > AgiException { boolean hangup = false; > while(channel.getChannelStatus() != -1 && !hangup){ for(int > i=0; i <3; i++){ System.out.println("playing"+(i+1)); > > System.out.println("channelStatus="+channel.getChannelStatus()); > channel.streamFile("svi/jingle"); if(i==2){ > hangup=true; } > if(channel.getChannelStatus() == -1){ break; > } } } hangup();* > * }* > > I've reached the expected behaviour. > Many Thanks > > Regards, > Zoumana > > > *--- * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-03 12:21 GMT+02:00 Yves A. <yv...@gm...>: > >> hi, >> >> please upgrade to latest asterisk-java first... it is somewhat 1.x.x now. >> this might already bring the expected behaviour. >> >> regards, >> yves >> >> Am 03.04.2014 01:45, schrieb Zoumana TRAORE: >> >> Hi Yves, >> >> Thanks for helping me out. >> Yes, i found that strange too. >> Asterisk 11.5 >> AJ 0.3.1 >> >> Here is the code: >> public void service(AgiRequest request, AgiChannel channel) throws >> AgiException { >> >> for(int i=0; i <3; i++){ >> System.out.println("playing"+(i+1)); >> >> System.out.println("channelStatus="+channel.getChannelStatus()); >> channel.streamFile("svi/jingle"); >> } >> hangup(); >> } >> >> >> Here is the output (there is something interesting indeed, >> channelStatus=-1 after my hangup, i could try to use that for my need if >> nobody sees something more suitable) >> INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >> playing1 >> channelStatus=6 >> playing2 >> channelStatus=-1 >> playing3 >> channelStatus=-1 >> Apr 3, 2014 1:42:37 AM >> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript >> INFO: End AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >> >> Thanks >> >> >> >> >> *--- * >> >> *Zoumana TRAORE* >> >> mob. (+33)0699783622 >> >> >> 2014-04-03 1:17 GMT+02:00 Yves A. <yv...@gm...>: >> >>> hi, >>> >>> normally you would get an exception at any method that accesses a hungup >>> channel. this bevaviour is strange. >>> which version of asterisk and aj are you using? >>> add a system.out.println(channel.getChannelStatus()); before streaming >>> and post the output... >>> >>> yves >>> >>> Am 03.04.2014 00 <03.04.2014%2000>:46, schrieb Zoumana TRAORE: >>> >>> Hi everybody, >>> >>> During an incoming call handled by AGI, i would like to detect >>> where the caller hangup and then break the IVR scenario at this precise >>> point. >>> >>> For example: >>> Here is my AGI content: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> * public void service(AgiRequest request, AgiChannel channel) throws >>> AgiException { for(int i=0; i <3; i++){ >>> System.out.println("playing"+(i+1)); >>> channel.streamFile("svi/jingle"); } hangup(); } * >>> Each audio play has 7 seconds duration. >>> Even i hangup the call during the "playing 1", AGI keeps executing all >>> the sequences. >>> This is the output: >>> >>> >>> >>> >>> >>> >>> >>> *INFO: Begin AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 >>> playing1 playing2 playing3 Apr 3, 2014 12:26:52 AM >>> org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript INFO: End >>> AgiScript SVILegoAgi on Asterisk-Java DaemonPool-1-thread-1 * >>> Thanks! >>> >>> Regards, >>> Zoumana >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees_APR > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Murthy G. <mga...@nt...> - 2014-04-10 00:01:59
|
I would be grateful if Yves or someone can answer my basic question. The Event object has a hostname attribute. But it is coming up as null. Using a proxy, for example: astman, will populate that field. How do they do that? Is there anyother way? I also am grateful if someone can post a clip about astman proxy. Thank you so much. Murthy |
From: Murthy G. <mga...@nt...> - 2014-04-10 00:41:36
|
The following seems to work. Is this the correct way? ManagerConnection source= (ManagerConnection) event.getSource(); if (source == null) { logger.error("Cannot get source"); } else { logger.info("source:" + source.getHostname()); } ________________________________ From: Murthy Gandikota [mailto:mga...@nt...] Sent: Wednesday, April 09, 2014 4:27 PM To: ast...@li... Subject: [Asterisk-java-users] How to get the source/hostname of an Event I would be grateful if Yves or someone can answer my basic question. The Event object has a hostname attribute. But it is coming up as null. Using a proxy, for example: astman, will populate that field. How do they do that? Is there anyother way? I also am grateful if someone can post a clip about astman proxy. Thank you so much. Murthy |
From: Yves A. <yv...@gm...> - 2014-04-10 07:39:50
|
hi, I never needed that info so far... maybe it depends on asterisk version, configuration or similar... did you look into the sources? I cant do so right now.... I´ll be back next monday.. until then only email is possible... regards, yves Am 10.04.2014 02:41, schrieb Murthy Gandikota: > > The following seems to work. Is this the correct way? > > ManagerConnectionsource= (ManagerConnection) event.getSource(); > > *if*(source == *null*) { > > logger.error("Cannot get source"); > > } *else*{ > > logger.info("source:"+ source.getHostname()); > > } > > ------------------------------------------------------------------------ > > *From:*Murthy Gandikota [mailto:mga...@nt...] > *Sent:* Wednesday, April 09, 2014 4:27 PM > *To:* ast...@li... > *Subject:* [Asterisk-java-users] How to get the source/hostname of an > Event > > I would be grateful if Yves or someone can answer my basic question. > > The Event object has a hostname attribute. But it is coming up as null. > > Using a proxy, for example: astman, will populate that field. How do > they do that? > > Is there anyother way? > > I also am grateful if someone can post a clip about astman proxy. > > Thank you so much. > > Murthy > > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Chris M. <ch...@mr...> - 2014-04-10 00:54:56
|
Hi I have an object that includes its own knowledge of configuration that receives the event (read: a wrapper) and this calls setHostname on each event. HTH Chris On 10/04/2014 10:03 am, "Murthy Gandikota" <mga...@nt...> wrote: > I would be grateful if Yves or someone can answer my basic question. > > > > The Event object has a hostname attribute. But it is coming up as null. > > > > Using a proxy, for example: astman, will populate that field. How do they > do that? > > > > Is there anyother way? > > > > I also am grateful if someone can post a clip about astman proxy. > > > > Thank you so much. > > > > Murthy > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |