Re: [Asterisk-java-users] How to get the source/hostname of an Event
Brought to you by:
srt
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 |