asterisk-java-users Mailing List for Asterisk-Java Library (Page 9)
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: Yves A. <yv...@gm...> - 2014-04-26 09:36:56
|
hi, state ringing occurs only once per call... but as always there may be exceptions... whenever the phone stops ringing after dial finished and nobody picked up, it will again fire "ringing" if it is dialed again during the same call... this may happen e.g. if your extension is part of a queue or if your dialplan says to call a phone again after dial-timeout... so if dialplan reaches a dial command, and the extension is available, it will give you an event. concerning channelstatedesc: yes, up means channel is picked up. depending on what you do you´ll receive other events too signalling that the call is "up" or "bridged" or "linked". I always recommend to write a catch all listener and print out any event during a testcall to see what happens when, because sometime things really depend on dialpan and of course on version of asterisk you´re using. yves Am 25.04.2014 16:35, schrieb Zoumana TRAORE: > Yes with CDR implementation i will be forced to wait the end of the call. > For << realtime>> > i had a idea to put listener on NewStateEvent to look for > channelStateDesc Ringing value. > -But i don't know if this event comes up for every ringtone so i can > measure and even count. > -the other question: does channelStateDesc Up mean the call has been > picked -up ? If not, do you (or someone) know the event triggered by > Answer on a channel ? > > Zoumana > > > *--- > * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-25 16:16 GMT+02:00 Yves A. <yv...@gm... > <mailto:yv...@gm...>>: > > OK, i thought you would need that information in realtime or right > in that moment when the call is picked up... > > yves > > > Am 25.04.2014 16:07, schrieb Zoumana TRAORE: >> Hello Yves, >> >> Yes i was looking for native way. >> I think i will get CDR(duration|billsec) withing AJ to do so... >> it should work. >> >> Thank you for your answer. >> >> Regards, >> Zoumana >> >> >> >> *--- >> * >> >> *Zoumana TRAORE* >> >> mob. (+33)0699783622 <tel:%28%2B33%290699783622> >> >> >> 2014-04-25 15:58 GMT+02:00 Yves A. <yv...@gm... >> <mailto:yv...@gm...>>: >> >> Hi, >> >> natively...? no. >> you could of course extend either asterisk or asterisk-java >> or use listener to calculate the time yourself. >> >> or you move any call into a queue first... queues will give >> you the ringtime, but have the disadvantage, >> that the call is TAKEN immediately (and produces costs on the >> customers / callers side). >> >> yves >> >> Am 25.04.2014 14:39, schrieb Zoumana TRAORE: >>> Hello everybody, >>> >>> Is there a way on a channel to retrieve ringing time? >>> (through AMI or AGI APIs) >>> >>> Regards, >>> >>> *--- >>> * >>> >>> *Zoumana TRAORE* >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Start Your Social Network Today - Download eXo Platform >>> Build your Enterprise Intranet with eXo Platform Software >>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready >>> Get Started Now And Turn Your Intranet Into A Collaboration Platform >>> http://p.sf.net/sfu/ExoPlatform >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> ------------------------------------------------------------------------------ >> Start Your Social Network Today - Download eXo Platform >> Build your Enterprise Intranet with eXo Platform Software >> Java Based Open Source Intranet - Social, Extensible, Cloud Ready >> Get Started Now And Turn Your Intranet Into A Collaboration >> Platform >> http://p.sf.net/sfu/ExoPlatform >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Start Your Social Network Today - Download eXo Platform >> Build your Enterprise Intranet with eXo Platform Software >> Java Based Open Source Intranet - Social, Extensible, Cloud Ready >> Get Started Now And Turn Your Intranet Into A Collaboration Platform >> http://p.sf.net/sfu/ExoPlatform >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Zoumana T. <zou...@gm...> - 2014-04-25 14:35:59
|
Yes with CDR implementation i will be forced to wait the end of the call. For << realtime>> i had a idea to put listener on NewStateEvent to look for channelStateDesc Ringing value. -But i don't know if this event comes up for every ringtone so i can measure and even count. -the other question: does channelStateDesc Up mean the call has been picked -up ? If not, do you (or someone) know the event triggered by Answer on a channel ? Zoumana *---* *Zoumana TRAORE* mob. (+33)0699783622 2014-04-25 16:16 GMT+02:00 Yves A. <yv...@gm...>: > OK, i thought you would need that information in realtime or right in > that moment when the call is picked up... > > yves > > > Am 25.04.2014 16:07, schrieb Zoumana TRAORE: > > Hello Yves, > > Yes i was looking for native way. > I think i will get CDR(duration|billsec) withing AJ to do so... it should > work. > > Thank you for your answer. > > Regards, > Zoumana > > > > > *--- * > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-25 15:58 GMT+02:00 Yves A. <yv...@gm...>: > >> Hi, >> >> natively...? no. >> you could of course extend either asterisk or asterisk-java or use >> listener to calculate the time yourself. >> >> or you move any call into a queue first... queues will give you the >> ringtime, but have the disadvantage, >> that the call is TAKEN immediately (and produces costs on the customers / >> callers side). >> >> yves >> >> Am 25.04.2014 14:39, schrieb Zoumana TRAORE: >> >> Hello everybody, >> >> Is there a way on a channel to retrieve ringing time? >> (through AMI or AGI APIs) >> >> Regards, >> >> >> *--- * >> >> *Zoumana TRAORE* >> >> >> >> >> ------------------------------------------------------------------------------ >> Start Your Social Network Today - Download eXo Platform >> Build your Enterprise Intranet with eXo Platform Software >> Java Based Open Source Intranet - Social, Extensible, Cloud Ready >> Get Started Now And Turn Your Intranet Into A Collaboration Platformhttp://p.sf.net/sfu/ExoPlatform >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Start Your Social Network Today - Download eXo Platform >> Build your Enterprise Intranet with eXo Platform Software >> Java Based Open Source Intranet - Social, Extensible, Cloud Ready >> Get Started Now And Turn Your Intranet Into A Collaboration Platform >> http://p.sf.net/sfu/ExoPlatform >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platformhttp://p.sf.net/sfu/ExoPlatform > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-04-25 14:18:21
|
OK, i thought you would need that information in realtime or right in that moment when the call is picked up... yves Am 25.04.2014 16:07, schrieb Zoumana TRAORE: > Hello Yves, > > Yes i was looking for native way. > I think i will get CDR(duration|billsec) withing AJ to do so... it > should work. > > Thank you for your answer. > > Regards, > Zoumana > > > > *--- > * > > *Zoumana TRAORE* > > mob. (+33)0699783622 <tel:%28%2B33%290699783622> > > > 2014-04-25 15:58 GMT+02:00 Yves A. <yv...@gm... > <mailto:yv...@gm...>>: > > Hi, > > natively...? no. > you could of course extend either asterisk or asterisk-java or use > listener to calculate the time yourself. > > or you move any call into a queue first... queues will give you > the ringtime, but have the disadvantage, > that the call is TAKEN immediately (and produces costs on the > customers / callers side). > > yves > > Am 25.04.2014 14:39, schrieb Zoumana TRAORE: >> Hello everybody, >> >> Is there a way on a channel to retrieve ringing time? >> (through AMI or AGI APIs) >> >> Regards, >> >> *--- >> * >> >> *Zoumana TRAORE* >> >> >> >> >> ------------------------------------------------------------------------------ >> Start Your Social Network Today - Download eXo Platform >> Build your Enterprise Intranet with eXo Platform Software >> Java Based Open Source Intranet - Social, Extensible, Cloud Ready >> Get Started Now And Turn Your Intranet Into A Collaboration Platform >> http://p.sf.net/sfu/ExoPlatform >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Zoumana T. <zou...@gm...> - 2014-04-25 14:08:04
|
Hello Yves, Yes i was looking for native way. I think i will get CDR(duration|billsec) withing AJ to do so... it should work. Thank you for your answer. Regards, Zoumana *--- * *Zoumana TRAORE* mob. (+33)0699783622 2014-04-25 15:58 GMT+02:00 Yves A. <yv...@gm...>: > Hi, > > natively...? no. > you could of course extend either asterisk or asterisk-java or use > listener to calculate the time yourself. > > or you move any call into a queue first... queues will give you the > ringtime, but have the disadvantage, > that the call is TAKEN immediately (and produces costs on the customers / > callers side). > > yves > > Am 25.04.2014 14:39, schrieb Zoumana TRAORE: > > Hello everybody, > > Is there a way on a channel to retrieve ringing time? > (through AMI or AGI APIs) > > Regards, > > > *--- * > > *Zoumana TRAORE* > > > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platformhttp://p.sf.net/sfu/ExoPlatform > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-04-25 14:00:22
|
Hi, natively...? no. you could of course extend either asterisk or asterisk-java or use listener to calculate the time yourself. or you move any call into a queue first... queues will give you the ringtime, but have the disadvantage, that the call is TAKEN immediately (and produces costs on the customers / callers side). yves Am 25.04.2014 14:39, schrieb Zoumana TRAORE: > Hello everybody, > > Is there a way on a channel to retrieve ringing time? > (through AMI or AGI APIs) > > Regards, > > *--- > * > > *Zoumana TRAORE* > > > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Zoumana T. <zou...@gm...> - 2014-04-25 12:40:19
|
Hello everybody, Is there a way on a channel to retrieve ringing time? (through AMI or AGI APIs) Regards, *---* *Zoumana TRAORE* |
From: Yves A. <yv...@gm...> - 2014-04-21 13:21:24
|
Hi, yes, you can use these events. To trace a call, especially take a look at: NewChannelEvent JoinEvent AgentCalledEvent QueueMemberStatusEvent DialEvent BridgeEvent NewStateEvent HangupEvent LeaveEvent To understand whats going on during a call (which is very dependent on your dialplan), just write an EventListener that prints out any event to a logfile / console and place a testcall (should be done on an asterisk that has nothing to do than serve your testcalls...) than analyze the output to see, which event is generated when and has which attributes... but again... things may vary between asterisk-versions and changes to your dialplan. A good way to get certain information at well defined points is to use UserEvents. You define them in your dialplan and if your listener catches UserEvents, you can reduce your coding as you serve the needed information yourself. yves Am 20.04.2014 10:32, schrieb Jorge: > I have just seen that it could be better to use Agents. > > http://www.asterisk-java.org/development/apidocs/org/asteriskjava/manager/event/AgentsEvent.html > > I think I will implement as soon as possible and I will let you know. > > 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 > > > > 2014-04-20 10:00 GMT+02:00 Jorge <gus...@gm... > <mailto:gus...@gm...>>: > > Thank you for your answer. > > I want to implement a way to recognize incoming calls for sip > extensions that are waiting to incoming calls from telephone > network in a queue. That is to say I have n sip extensions in a > queue, so people call from outside the sip network to the queue. > From here Asterisk send the incoming call to one available sip > extension to the queue. I want to detect that the telephone with > number xxxxxx is calling to the sip extension Sip/xxx . > > 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 > > > > 2014-04-16 22:22 GMT+02:00 Yves A. <yv...@gm... > <mailto:yv...@gm...>>: > > hi, > > the behaviour is very depending on your asterisk version and > dialplan. you could try to catch any bridge-event and keep > track of the sip extensions this way... but as always... > if you would describe your objective or why you are trying to > do what you do, I could go more in detail with help or > suggestions as there are sooooo many ways to get the > device or extension state. > > regards, > yves > > Am 16.04.2014 19:21, schrieb Jorge: >> Thank you for your help, but I still didn't it work. When I >> get the caller Id it is empty. >> >> My structure is the next one : >> I have n sip extensions inside a queue. When an incomming >> call gets inside it goes directly to the queue waitng for an >> available sip extension. What I am doing is attaching a >> listener to each new channel created. When I get >> evt.getPropertyName().equals("dialingExtension") I obtain the >> source and the dialing extension. >> As it comes from the pstn it creates an channel called >> dadhi/incomingTlfNumber@context this channel goes inside the >> queue and converts into something like Local/2501@queue.... . >> The main problem is that this channel Local/2501@queue... is >> automatically created with caller id empty when I detect the >> changing property (tested with asterisk-java) >> >> In conclusion I am able to get the channel FROM THE QUEUE >> that is calling the Sip extension but it has the caller id >> EMPTY. >> >> I am wirting my hearth so I could have wirtten some wrong >> labels. >> >> >> 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 >> >> >> >> 2014-04-14 17:45 GMT+02:00 Wayne Merricks >> <way...@th... >> <mailto:way...@th...>>: >> >> fyi messed up my else ifs they should be else if to the >> evt.getPropertyName() block not the ChannelState bit. >> >> Wayne Merricks >> The Voice Asia >> >> On 14/04/14 16:17, Wayne Merricks wrote: >>> Hi, >>> >>> Normally you would loop through the channels until you >>> find the extension you're looking at with >>> channel.getCallerId().getNumber() >>> >>> Then you can see if it is linked with another channel by >>> channel.getLinkedChannel() and get the caller id from >>> that in the same way. >>> >>> If you're doing this in "real time", the way I do it is >>> to register an AsteriskServerListener and then for every >>> new channel add a PropertyChangeListener >>> >>> You then need to figure out what type of events you want >>> to listen to and which ones to ignore (hint you get a >>> lot of events). >>> >>> To help you narrow it down most likely all you need are >>> the following: >>> >>> public void propertyChange(PropertyChangeEvent evt){ >>> >>> if(evt.getPropertyName().equals("state") && evt.getSource() instanceof AsteriskChannel){ >>> >>> if(evt.getNewValue() instanceof ChannelState){ >>> ChannelState state = (ChannelState)evt.getNewValue(); >>> //Then look at state.getStatus() for things like RING or RINGING or HUNGUP or BUSY >>> //You can get the channel in question by doing evt.getSource() >>> >>> }else if(evt.getPropertyName().equals("currentExtension") && evt.getOldValue() == null){ >>> //The evt.getNewValue() here will have an Extension object which you can use to see what this channel is ringing >>> //Note you get a lot of dialplan messages here that you can skip, they're usually with a context of macro-auto-blkvm >>> //but this varies depending on what Asterisk system you use >>> }else if(evt.getPropertyName().equals("linkedChannel") && evt.getSource() instanceof AsteriskChannel){ >>> //You get these when two channels connect to each other e.g. when someone picks up a call >>> //You will get at least two of these for both sides of the call >>> } >>> } >>> } >>> >>> Hope this gets you started, >>> >>> Wayne Merricks >>> The Voice Asia >>> On 14/04/14 14:15, Jorge wrote: >>>> How can I get from this event the phone that is >>>> callling this extension? >>>> >>>> I am looking in to asteriskServer.getChannels(); but >>>> the channel is not created when the status changed. >>>> >>>> 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 >>>> >>>> >>>> >>>> 2014-04-13 11:03 GMT+02:00 Miguel Santiago >>>> <m.s...@gm... >>>> <mailto:m.s...@gm...>>: >>>> >>>> I think you can Use ExtensionStatusEvent in order >>>> to know what you need >>>> >>>> El 10/04/2014 20:57, "Jorge" <gus...@gm... >>>> <mailto:gus...@gm...>> escribió: >>>> >>>> Hi: >>>> >>>> I would like to know if it is possible to >>>> implement a listener or check if a sip >>>> extension is busy with a call. And in case it >>>> is answering a call how to know which number is >>>> calling. >>>> >>>> Kind Regards >>>> >>>> Jorge >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> 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... >>>> <mailto:Ast...@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 >>>> _______________________________________________ >>>> Asterisk-java-users mailing list >>>> Ast...@li... >>>> <mailto:Ast...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Learn Graph Databases - Download FREE O'Reilly Book >>>> "Graph Databases" is the definitive new guide to graph databases and their >>>> applications. Written by three acclaimed leaders in the field, >>>> this first edition is now available. Download your free book today! >>>> http://p.sf.net/sfu/NeoTech >>>> >>>> >>>> _______________________________________________ >>>> Asterisk-java-users mailing list >>>> Ast...@li... <mailto:Ast...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Learn Graph Databases - Download FREE O'Reilly Book >>> "Graph Databases" is the definitive new guide to graph databases and their >>> applications. Written by three acclaimed leaders in the field, >>> this first edition is now available. Download your free book today! >>> http://p.sf.net/sfu/NeoTech >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph >> databases and their >> applications. Written by three acclaimed leaders in the >> field, >> this first edition is now available. Download your free >> book today! >> http://p.sf.net/sfu/NeoTech >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/NeoTech >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph > databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book > today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Jorge <gus...@gm...> - 2014-04-20 08:33:27
|
I have just seen that it could be better to use Agents. http://www.asterisk-java.org/development/apidocs/org/asteriskjava/manager/event/AgentsEvent.html I think I will implement as soon as possible and I will let you know. 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 2014-04-20 10:00 GMT+02:00 Jorge <gus...@gm...>: > Thank you for your answer. > > I want to implement a way to recognize incoming calls for sip extensions > that are waiting to incoming calls from telephone network in a queue. That > is to say I have n sip extensions in a queue, so people call from outside > the sip network to the queue. From here Asterisk send the incoming call to > one available sip extension to the queue. I want to detect that the > telephone with number xxxxxx is calling to the sip extension Sip/xxx . > > 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 > > > > 2014-04-16 22:22 GMT+02:00 Yves A. <yv...@gm...>: > > hi, >> >> the behaviour is very depending on your asterisk version and dialplan. >> you could try to catch any bridge-event and keep track of the sip >> extensions this way... but as always... >> if you would describe your objective or why you are trying to do what you >> do, I could go more in detail with help or suggestions as there are sooooo >> many ways to get the >> device or extension state. >> >> regards, >> yves >> >> Am 16.04.2014 19:21, schrieb Jorge: >> >> Thank you for your help, but I still didn't it work. When I get the >> caller Id it is empty. >> >> My structure is the next one : >> I have n sip extensions inside a queue. When an incomming call gets >> inside it goes directly to the queue waitng for an available sip extension. >> What I am doing is attaching a listener to each new channel created. When I >> get evt.getPropertyName().equals("dialingExtension") I obtain the source >> and the dialing extension. >> As it comes from the pstn it creates an channel called >> dadhi/incomingTlfNumber@context this channel goes inside the queue and >> converts into something like Local/2501@queue.... . The main problem is >> that this channel Local/2501@queue... is automatically created with >> caller id empty when I detect the changing property (tested with >> asterisk-java) >> >> In conclusion I am able to get the channel FROM THE QUEUE that is >> calling the Sip extension but it has the caller id EMPTY. >> >> I am wirting my hearth so I could have wirtten some wrong labels. >> >> >> 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 >> >> >> >> 2014-04-14 17:45 GMT+02:00 Wayne Merricks <way...@th... >> >: >> >>> fyi messed up my else ifs they should be else if to the >>> evt.getPropertyName() block not the ChannelState bit. >>> >>> Wayne Merricks >>> The Voice Asia >>> >>> On 14/04/14 16:17, Wayne Merricks wrote: >>> >>> Hi, >>> >>> Normally you would loop through the channels until you find the >>> extension you're looking at with channel.getCallerId().getNumber() >>> >>> Then you can see if it is linked with another channel by >>> channel.getLinkedChannel() and get the caller id from that in the same way. >>> >>> If you're doing this in "real time", the way I do it is to register an >>> AsteriskServerListener and then for every new channel add a >>> PropertyChangeListener >>> >>> You then need to figure out what type of events you want to listen to >>> and which ones to ignore (hint you get a lot of events). >>> >>> To help you narrow it down most likely all you need are the following: >>> >>> public void propertyChange(PropertyChangeEvent evt){ >>> >>> if(evt.getPropertyName().equals("state") && evt.getSource() instanceof AsteriskChannel){ >>> >>> if(evt.getNewValue() instanceof ChannelState){ >>> >>> ChannelState state = (ChannelState)evt.getNewValue(); >>> //Then look at state.getStatus() for things like RING or RINGING or HUNGUP or BUSY >>> //You can get the channel in question by doing evt.getSource() >>> >>> }else if(evt.getPropertyName().equals("currentExtension") && evt.getOldValue() == null){ >>> >>> //The evt.getNewValue() here will have an Extension object which you can use to see what this channel is ringing >>> //Note you get a lot of dialplan messages here that you can skip, they're usually with a context of macro-auto-blkvm >>> //but this varies depending on what Asterisk system you use >>> >>> }else if(evt.getPropertyName().equals("linkedChannel") && evt.getSource() instanceof AsteriskChannel){ >>> >>> //You get these when two channels connect to each other e.g. when someone picks up a call >>> //You will get at least two of these for both sides of the call >>> >>> } >>> >>> } >>> >>> } >>> >>> >>> Hope this gets you started, >>> >>> Wayne Merricks >>> The Voice Asia >>> >>> On 14/04/14 14:15, Jorge wrote: >>> >>> How can I get from this event the phone that is callling this extension? >>> >>> I am looking in to asteriskServer.getChannels(); but the channel is not >>> created when the status changed. >>> >>> 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 >>> >>> >>> >>> 2014-04-13 11:03 GMT+02:00 Miguel Santiago <m.s...@gm...>: >>> >>>> I think you can Use ExtensionStatusEvent in order to know what you need >>>> El 10/04/2014 20:57, "Jorge" <gus...@gm...> escribió: >>>> >>>>> Hi: >>>>> >>>>> I would like to know if it is possible to implement a listener or >>>>> check if a sip extension is busy with a call. And in case it is answering a >>>>> call how to know which number is calling. >>>>> >>>>> Kind Regards >>>>> >>>>> Jorge >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> 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 >>>>> >>>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> 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 >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Learn Graph Databases - Download FREE O'Reilly Book >>> "Graph Databases" is the definitive new guide to graph databases and their >>> applications. Written by three acclaimed leaders in the field, >>> this first edition is now available. Download your free book today!http://p.sf.net/sfu/NeoTech >>> >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Learn Graph Databases - Download FREE O'Reilly Book >>> "Graph Databases" is the definitive new guide to graph databases and their >>> applications. Written by three acclaimed leaders in the field, >>> this first edition is now available. Download your free book today!http://p.sf.net/sfu/NeoTech >>> >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Learn Graph Databases - Download FREE O'Reilly Book >>> "Graph Databases" is the definitive new guide to graph databases and >>> their >>> applications. Written by three acclaimed leaders in the field, >>> this first edition is now available. Download your free book today! >>> http://p.sf.net/sfu/NeoTech >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today!http://p.sf.net/sfu/NeoTech >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/NeoTech >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > |
From: Jorge <gus...@gm...> - 2014-04-20 08:01:13
|
Thank you for your answer. I want to implement a way to recognize incoming calls for sip extensions that are waiting to incoming calls from telephone network in a queue. That is to say I have n sip extensions in a queue, so people call from outside the sip network to the queue. From here Asterisk send the incoming call to one available sip extension to the queue. I want to detect that the telephone with number xxxxxx is calling to the sip extension Sip/xxx . 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 2014-04-16 22:22 GMT+02:00 Yves A. <yv...@gm...>: > hi, > > the behaviour is very depending on your asterisk version and dialplan. you > could try to catch any bridge-event and keep track of the sip extensions > this way... but as always... > if you would describe your objective or why you are trying to do what you > do, I could go more in detail with help or suggestions as there are sooooo > many ways to get the > device or extension state. > > regards, > yves > > Am 16.04.2014 19:21, schrieb Jorge: > > Thank you for your help, but I still didn't it work. When I get the caller > Id it is empty. > > My structure is the next one : > I have n sip extensions inside a queue. When an incomming call gets inside > it goes directly to the queue waitng for an available sip extension. What I > am doing is attaching a listener to each new channel created. When I get > evt.getPropertyName().equals("dialingExtension") I obtain the source and > the dialing extension. > As it comes from the pstn it creates an channel called > dadhi/incomingTlfNumber@context this channel goes inside the queue and > converts into something like Local/2501@queue.... . The main problem is > that this channel Local/2501@queue... is automatically created with > caller id empty when I detect the changing property (tested with > asterisk-java) > > In conclusion I am able to get the channel FROM THE QUEUE that is > calling the Sip extension but it has the caller id EMPTY. > > I am wirting my hearth so I could have wirtten some wrong labels. > > > 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 > > > > 2014-04-14 17:45 GMT+02:00 Wayne Merricks <way...@th...> > : > >> fyi messed up my else ifs they should be else if to the >> evt.getPropertyName() block not the ChannelState bit. >> >> Wayne Merricks >> The Voice Asia >> >> On 14/04/14 16:17, Wayne Merricks wrote: >> >> Hi, >> >> Normally you would loop through the channels until you find the extension >> you're looking at with channel.getCallerId().getNumber() >> >> Then you can see if it is linked with another channel by >> channel.getLinkedChannel() and get the caller id from that in the same way. >> >> If you're doing this in "real time", the way I do it is to register an >> AsteriskServerListener and then for every new channel add a >> PropertyChangeListener >> >> You then need to figure out what type of events you want to listen to and >> which ones to ignore (hint you get a lot of events). >> >> To help you narrow it down most likely all you need are the following: >> >> public void propertyChange(PropertyChangeEvent evt){ >> >> if(evt.getPropertyName().equals("state") && evt.getSource() instanceof AsteriskChannel){ >> >> if(evt.getNewValue() instanceof ChannelState){ >> >> ChannelState state = (ChannelState)evt.getNewValue(); >> //Then look at state.getStatus() for things like RING or RINGING or HUNGUP or BUSY >> //You can get the channel in question by doing evt.getSource() >> >> }else if(evt.getPropertyName().equals("currentExtension") && evt.getOldValue() == null){ >> >> //The evt.getNewValue() here will have an Extension object which you can use to see what this channel is ringing >> //Note you get a lot of dialplan messages here that you can skip, they're usually with a context of macro-auto-blkvm >> //but this varies depending on what Asterisk system you use >> >> }else if(evt.getPropertyName().equals("linkedChannel") && evt.getSource() instanceof AsteriskChannel){ >> >> //You get these when two channels connect to each other e.g. when someone picks up a call >> //You will get at least two of these for both sides of the call >> >> } >> >> } >> >> } >> >> >> Hope this gets you started, >> >> Wayne Merricks >> The Voice Asia >> >> On 14/04/14 14:15, Jorge wrote: >> >> How can I get from this event the phone that is callling this extension? >> >> I am looking in to asteriskServer.getChannels(); but the channel is not >> created when the status changed. >> >> 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 >> >> >> >> 2014-04-13 11:03 GMT+02:00 Miguel Santiago <m.s...@gm...>: >> >>> I think you can Use ExtensionStatusEvent in order to know what you need >>> El 10/04/2014 20:57, "Jorge" <gus...@gm...> escribió: >>> >>>> Hi: >>>> >>>> I would like to know if it is possible to implement a listener or >>>> check if a sip extension is busy with a call. And in case it is answering a >>>> call how to know which number is calling. >>>> >>>> Kind Regards >>>> >>>> Jorge >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> 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 >>>> >>>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today!http://p.sf.net/sfu/NeoTech >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today!http://p.sf.net/sfu/NeoTech >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/NeoTech >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today!http://p.sf.net/sfu/NeoTech > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-04-19 23:23:41
|
hi, I don´t see a reason why whispering to a known sip channel should not work without the use of local channels.... did you try? if its not working as expected pls. post your code and dialplan... local channels are a way to call into a dialplan, not to a "phone"... normally you would originate a call between to "phones" (extensions), but if you want to execute some kind of "logic" before bridging the two ends, the use of local channels makes this not only much easier but is sometimes the only way to go. take a look at the dial command itself... it expects type/identifier as first argument, e.g. SIP/123 or DAHDI/g0/123456... so without "local" as an asterisk-specific channel type you would not be able to call into a dialplan to execute dialplan logic at one (or more) legs of the call. regards, yves Am 19.04.2014 00:00, schrieb Murthy Gandikota: > > The answer to all of your questions is "Yes". > > My question was about Local/s@whisper which as you know connects to > the [whisper] context in the dialplan that plays, in the case of our > app, a pre-recorded message (e.g. "There is a caller on line"). > > The question is: if I know the SIP channel of the agent and the host > on which the agent is registered, why can't I use that info? At the > moment, my app works perfectly with Local. So you may consider my > question as exploratory. In other words, what exactly will Local buy us? > > Thanks for your reply and I look forward to hearing from you. > > ------------------------------------------------------------------------ > > *From:*Yves A. [mailto:yv...@gm...] > *Sent:* Thursday, April 17, 2014 2:16 PM > *To:* ast...@li... > *Subject:* Re: [Asterisk-java-users] Local channel > > Hi, > > originateAction works as described in the docs. If you have problems > or questions regarding this action, it would be necessary to know what > extensions / channels you want to bridge and to see the part of the > dialplan that is behind the contexts your using... > > What Do you mean with "whisper"...? Some kind of announcement to the > agent before the caller is transferred to the meetme or some kind of > supervision where the supervisor can listen to the conversation and > talk to the agent (only the agent can hear the supervisors voice)..? > Why did you use local channels at all? This makes only sense, if you > want to connect the called party with a part of your dialplan..? Is > the "whisperer" > not a human being, but some kind of IVR or voicefile to be played? > > yves > > Am 17.04.2014 19:12, schrieb Murthy Gandikota: > >> I am dealing with an application consisting of agents and callers. >> The agents are hooked up to a meetme bridge. When a caller comes in >> and wants to get on the meetme with an agent, I use AMI's >> OriginateAction class to whisper on the agent's channel using Local >> extension. >> >> originateAction.setChannel("Local/s@whisper"); >> >> My question is, if I know the hostname and SIP channel, is there any >> way to whisper to the agent without using the Local? >> >> The documentation on originateAction says, the channel has the same >> parameters as the DIAL command. How can I implement this without >> using Local >> >> Thanks >> >> Murthy >> >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/NeoTech >> >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Murthy G. <mga...@nt...> - 2014-04-18 22:00:19
|
The answer to all of your questions is "Yes". My question was about Local/s@whisper which as you know connects to the [whisper] context in the dialplan that plays, in the case of our app, a pre-recorded message (e.g. "There is a caller on line"). The question is: if I know the SIP channel of the agent and the host on which the agent is registered, why can't I use that info? At the moment, my app works perfectly with Local. So you may consider my question as exploratory. In other words, what exactly will Local buy us? Thanks for your reply and I look forward to hearing from you. ________________________________ From: Yves A. [mailto:yv...@gm...] Sent: Thursday, April 17, 2014 2:16 PM To: ast...@li... Subject: Re: [Asterisk-java-users] Local channel Hi, originateAction works as described in the docs. If you have problems or questions regarding this action, it would be necessary to know what extensions / channels you want to bridge and to see the part of the dialplan that is behind the contexts your using... What Do you mean with "whisper"...? Some kind of announcement to the agent before the caller is transferred to the meetme or some kind of supervision where the supervisor can listen to the conversation and talk to the agent (only the agent can hear the supervisors voice)..? Why did you use local channels at all? This makes only sense, if you want to connect the called party with a part of your dialplan..? Is the "whisperer" not a human being, but some kind of IVR or voicefile to be played? yves Am 17.04.2014 19:12, schrieb Murthy Gandikota: I am dealing with an application consisting of agents and callers. The agents are hooked up to a meetme bridge. When a caller comes in and wants to get on the meetme with an agent, I use AMI's OriginateAction class to whisper on the agent's channel using Local extension. originateAction.setChannel("Local/s@whisper"); My question is, if I know the hostname and SIP channel, is there any way to whisper to the agent without using the Local? The documentation on originateAction says, the channel has the same parameters as the DIAL command. How can I implement this without using Local Thanks Murthy ------------------------------------------------------------------------ ------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Yves A. <yv...@gm...> - 2014-04-17 21:17:55
|
Hi, originateAction works as described in the docs. If you have problems or questions regarding this action, it would be necessary to know what extensions / channels you want to bridge and to see the part of the dialplan that is behind the contexts your using... What Do you mean with "whisper"...? Some kind of announcement to the agent before the caller is transferred to the meetme or some kind of supervision where the supervisor can listen to the conversation and talk to the agent (only the agent can hear the supervisors voice)..? Why did you use local channels at all? This makes only sense, if you want to connect the called party with a part of your dialplan..? Is the "whisperer" not a human being, but some kind of IVR or voicefile to be played? yves Am 17.04.2014 19:12, schrieb Murthy Gandikota: > > I am dealing with an application consisting of agents and callers. The > agents are hooked up to a meetme bridge. When a caller comes in and > wants to get on the meetme with an agent, I use AMI's OriginateAction > class to whisper on the agent's channel using Local extension. > > originateAction.setChannel("Local/s@whisper"); > > My question is, if I know the hostname and SIP channel, is there any > way to whisper to the agent without using the Local? > > The documentation on originateAction says, the channel has the same > parameters as the DIAL command. How can I implement this without using > Local > > Thanks > > Murthy > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Murthy G. <mga...@nt...> - 2014-04-17 17:12:19
|
I am dealing with an application consisting of agents and callers. The agents are hooked up to a meetme bridge. When a caller comes in and wants to get on the meetme with an agent, I use AMI's OriginateAction class to whisper on the agent's channel using Local extension. originateAction.setChannel("Local/s@whisper"); My question is, if I know the hostname and SIP channel, is there any way to whisper to the agent without using the Local? The documentation on originateAction says, the channel has the same parameters as the DIAL command. How can I implement this without using Local Thanks Murthy |
From: Yves A. <yv...@gm...> - 2014-04-16 20:24:23
|
hi, the behaviour is very depending on your asterisk version and dialplan. you could try to catch any bridge-event and keep track of the sip extensions this way... but as always... if you would describe your objective or why you are trying to do what you do, I could go more in detail with help or suggestions as there are sooooo many ways to get the device or extension state. regards, yves Am 16.04.2014 19:21, schrieb Jorge: > Thank you for your help, but I still didn't it work. When I get the > caller Id it is empty. > > My structure is the next one : > I have n sip extensions inside a queue. When an incomming call gets > inside it goes directly to the queue waitng for an available sip > extension. What I am doing is attaching a listener to each new channel > created. When I get evt.getPropertyName().equals("dialingExtension") I > obtain the source and the dialing extension. > As it comes from the pstn it creates an channel called > dadhi/incomingTlfNumber@context this channel goes inside the queue and > converts into something like Local/2501@queue.... . The main problem > is that this channel Local/2501@queue... is automatically created with > caller id empty when I detect the changing property (tested with > asterisk-java) > > In conclusion I am able to get the channel FROM THE QUEUE that is > calling the Sip extension but it has the caller id EMPTY. > > I am wirting my hearth so I could have wirtten some wrong labels. > > > 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 > > > > 2014-04-14 17:45 GMT+02:00 Wayne Merricks > <way...@th... <mailto:way...@th...>>: > > fyi messed up my else ifs they should be else if to the > evt.getPropertyName() block not the ChannelState bit. > > Wayne Merricks > The Voice Asia > > On 14/04/14 16:17, Wayne Merricks wrote: >> Hi, >> >> Normally you would loop through the channels until you find the >> extension you're looking at with channel.getCallerId().getNumber() >> >> Then you can see if it is linked with another channel by >> channel.getLinkedChannel() and get the caller id from that in the >> same way. >> >> If you're doing this in "real time", the way I do it is to >> register an AsteriskServerListener and then for every new channel >> add a PropertyChangeListener >> >> You then need to figure out what type of events you want to >> listen to and which ones to ignore (hint you get a lot of events). >> >> To help you narrow it down most likely all you need are the >> following: >> >> public void propertyChange(PropertyChangeEvent evt){ >> >> if(evt.getPropertyName().equals("state") && evt.getSource() instanceof AsteriskChannel){ >> >> if(evt.getNewValue() instanceof ChannelState){ >> ChannelState state = (ChannelState)evt.getNewValue(); >> //Then look at state.getStatus() for things like RING or RINGING or HUNGUP or BUSY >> //You can get the channel in question by doing evt.getSource() >> >> }else if(evt.getPropertyName().equals("currentExtension") && evt.getOldValue() == null){ >> //The evt.getNewValue() here will have an Extension object which you can use to see what this channel is ringing >> //Note you get a lot of dialplan messages here that you can skip, they're usually with a context of macro-auto-blkvm >> //but this varies depending on what Asterisk system you use >> }else if(evt.getPropertyName().equals("linkedChannel") && evt.getSource() instanceof AsteriskChannel){ >> //You get these when two channels connect to each other e.g. when someone picks up a call >> //You will get at least two of these for both sides of the call >> } >> } >> } >> >> Hope this gets you started, >> >> Wayne Merricks >> The Voice Asia >> On 14/04/14 14:15, Jorge wrote: >>> How can I get from this event the phone that is callling this >>> extension? >>> >>> I am looking in to asteriskServer.getChannels(); but the channel >>> is not created when the status changed. >>> >>> 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 >>> >>> >>> >>> 2014-04-13 11:03 GMT+02:00 Miguel Santiago >>> <m.s...@gm... <mailto:m.s...@gm...>>: >>> >>> I think you can Use ExtensionStatusEvent in order to know >>> what you need >>> >>> El 10/04/2014 20:57, "Jorge" <gus...@gm... >>> <mailto:gus...@gm...>> escribió: >>> >>> Hi: >>> >>> I would like to know if it is possible to implement a >>> listener or check if a sip extension is busy with a >>> call. And in case it is answering a call how to know >>> which number is calling. >>> >>> Kind Regards >>> >>> Jorge >>> >>> >>> ------------------------------------------------------------------------------ >>> 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... >>> <mailto:Ast...@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 >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Learn Graph Databases - Download FREE O'Reilly Book >>> "Graph Databases" is the definitive new guide to graph databases and their >>> applications. Written by three acclaimed leaders in the field, >>> this first edition is now available. Download your free book today! >>> http://p.sf.net/sfu/NeoTech >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/NeoTech >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases > and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Jorge <gus...@gm...> - 2014-04-16 17:22:03
|
Thank you for your help, but I still didn't it work. When I get the caller Id it is empty. My structure is the next one : I have n sip extensions inside a queue. When an incomming call gets inside it goes directly to the queue waitng for an available sip extension. What I am doing is attaching a listener to each new channel created. When I get evt.getPropertyName().equals("dialingExtension") I obtain the source and the dialing extension. As it comes from the pstn it creates an channel called dadhi/incomingTlfNumber@context this channel goes inside the queue and converts into something like Local/2501@queue.... . The main problem is that this channel Local/2501@queue... is automatically created with caller id empty when I detect the changing property (tested with asterisk-java) In conclusion I am able to get the channel FROM THE QUEUE that is calling the Sip extension but it has the caller id EMPTY. I am wirting my hearth so I could have wirtten some wrong labels. 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 2014-04-14 17:45 GMT+02:00 Wayne Merricks <way...@th...>: > fyi messed up my else ifs they should be else if to the > evt.getPropertyName() block not the ChannelState bit. > > Wayne Merricks > The Voice Asia > > On 14/04/14 16:17, Wayne Merricks wrote: > > Hi, > > Normally you would loop through the channels until you find the extension > you're looking at with channel.getCallerId().getNumber() > > Then you can see if it is linked with another channel by > channel.getLinkedChannel() and get the caller id from that in the same way. > > If you're doing this in "real time", the way I do it is to register an > AsteriskServerListener and then for every new channel add a > PropertyChangeListener > > You then need to figure out what type of events you want to listen to and > which ones to ignore (hint you get a lot of events). > > To help you narrow it down most likely all you need are the following: > > public void propertyChange(PropertyChangeEvent evt){ > > if(evt.getPropertyName().equals("state") && evt.getSource() instanceof AsteriskChannel){ > > if(evt.getNewValue() instanceof ChannelState){ > > ChannelState state = (ChannelState)evt.getNewValue(); > //Then look at state.getStatus() for things like RING or RINGING or HUNGUP or BUSY > //You can get the channel in question by doing evt.getSource() > > }else if(evt.getPropertyName().equals("currentExtension") && evt.getOldValue() == null){ > > //The evt.getNewValue() here will have an Extension object which you can use to see what this channel is ringing > //Note you get a lot of dialplan messages here that you can skip, they're usually with a context of macro-auto-blkvm > //but this varies depending on what Asterisk system you use > > }else if(evt.getPropertyName().equals("linkedChannel") && evt.getSource() instanceof AsteriskChannel){ > > //You get these when two channels connect to each other e.g. when someone picks up a call > //You will get at least two of these for both sides of the call > > } > > } > > } > > > Hope this gets you started, > > Wayne Merricks > The Voice Asia > > On 14/04/14 14:15, Jorge wrote: > > How can I get from this event the phone that is callling this extension? > > I am looking in to asteriskServer.getChannels(); but the channel is not > created when the status changed. > > 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 > > > > 2014-04-13 11:03 GMT+02:00 Miguel Santiago <m.s...@gm...>: > >> I think you can Use ExtensionStatusEvent in order to know what you need >> El 10/04/2014 20:57, "Jorge" <gus...@gm...> escribió: >> >>> Hi: >>> >>> I would like to know if it is possible to implement a listener or check >>> if a sip extension is busy with a call. And in case it is answering a call >>> how to know which number is calling. >>> >>> Kind Regards >>> >>> Jorge >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> >>> >> >> ------------------------------------------------------------------------------ >> 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 >> >> > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today!http://p.sf.net/sfu/NeoTech > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today!http://p.sf.net/sfu/NeoTech > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Wayne M. <way...@th...> - 2014-04-14 15:45:24
|
fyi messed up my else ifs they should be else if to the evt.getPropertyName() block not the ChannelState bit. Wayne Merricks The Voice Asia On 14/04/14 16:17, Wayne Merricks wrote: > Hi, > > Normally you would loop through the channels until you find the > extension you're looking at with channel.getCallerId().getNumber() > > Then you can see if it is linked with another channel by > channel.getLinkedChannel() and get the caller id from that in the same > way. > > If you're doing this in "real time", the way I do it is to register an > AsteriskServerListener and then for every new channel add a > PropertyChangeListener > > You then need to figure out what type of events you want to listen to > and which ones to ignore (hint you get a lot of events). > > To help you narrow it down most likely all you need are the following: > > public void propertyChange(PropertyChangeEvent evt){ > > if(evt.getPropertyName().equals("state") && evt.getSource() instanceof AsteriskChannel){ > > if(evt.getNewValue() instanceof ChannelState){ > ChannelState state = (ChannelState)evt.getNewValue(); > //Then look at state.getStatus() for things like RING or RINGING or HUNGUP or BUSY > //You can get the channel in question by doing evt.getSource() > > }else if(evt.getPropertyName().equals("currentExtension") && evt.getOldValue() == null){ > //The evt.getNewValue() here will have an Extension object which you can use to see what this channel is ringing > //Note you get a lot of dialplan messages here that you can skip, they're usually with a context of macro-auto-blkvm > //but this varies depending on what Asterisk system you use > }else if(evt.getPropertyName().equals("linkedChannel") && evt.getSource() instanceof AsteriskChannel){ > //You get these when two channels connect to each other e.g. when someone picks up a call > //You will get at least two of these for both sides of the call > } > } > } > > Hope this gets you started, > > Wayne Merricks > The Voice Asia > On 14/04/14 14:15, Jorge wrote: >> How can I get from this event the phone that is callling this extension? >> >> I am looking in to asteriskServer.getChannels(); but the channel is >> not created when the status changed. >> >> 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 >> >> >> >> 2014-04-13 11:03 GMT+02:00 Miguel Santiago <m.s...@gm... >> <mailto:m.s...@gm...>>: >> >> I think you can Use ExtensionStatusEvent in order to know what >> you need >> >> El 10/04/2014 20:57, "Jorge" <gus...@gm... >> <mailto:gus...@gm...>> escribió: >> >> Hi: >> >> I would like to know if it is possible to implement a >> listener or check if a sip extension is busy with a call. And >> in case it is answering a call how to know which number is >> calling. >> >> Kind Regards >> >> Jorge >> >> >> ------------------------------------------------------------------------------ >> 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... >> <mailto:Ast...@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 >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/NeoTech >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Wayne M. <way...@th...> - 2014-04-14 15:37:28
|
Hi, Normally you would loop through the channels until you find the extension you're looking at with channel.getCallerId().getNumber() Then you can see if it is linked with another channel by channel.getLinkedChannel() and get the caller id from that in the same way. If you're doing this in "real time", the way I do it is to register an AsteriskServerListener and then for every new channel add a PropertyChangeListener You then need to figure out what type of events you want to listen to and which ones to ignore (hint you get a lot of events). To help you narrow it down most likely all you need are the following: public void propertyChange(PropertyChangeEvent evt){ if(evt.getPropertyName().equals("state") && evt.getSource() instanceof AsteriskChannel){ if(evt.getNewValue() instanceof ChannelState){ ChannelState state = (ChannelState)evt.getNewValue(); //Then look at state.getStatus() for things like RING or RINGING or HUNGUP or BUSY //You can get the channel in question by doing evt.getSource() }else if(evt.getPropertyName().equals("currentExtension") && evt.getOldValue() == null){ //The evt.getNewValue() here will have an Extension object which you can use to see what this channel is ringing //Note you get a lot of dialplan messages here that you can skip, they're usually with a context of macro-auto-blkvm //but this varies depending on what Asterisk system you use }else if(evt.getPropertyName().equals("linkedChannel") && evt.getSource() instanceof AsteriskChannel){ //You get these when two channels connect to each other e.g. when someone picks up a call //You will get at least two of these for both sides of the call } } } Hope this gets you started, Wayne Merricks The Voice Asia On 14/04/14 14:15, Jorge wrote: > How can I get from this event the phone that is callling this extension? > > I am looking in to asteriskServer.getChannels(); but the channel is > not created when the status changed. > > 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 > > > > 2014-04-13 11:03 GMT+02:00 Miguel Santiago <m.s...@gm... > <mailto:m.s...@gm...>>: > > I think you can Use ExtensionStatusEvent in order to know what you > need > > El 10/04/2014 20:57, "Jorge" <gus...@gm... > <mailto:gus...@gm...>> escribió: > > Hi: > > I would like to know if it is possible to implement a listener > or check if a sip extension is busy with a call. And in case > it is answering a call how to know which number is calling. > > Kind Regards > > Jorge > > > ------------------------------------------------------------------------------ > 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... > <mailto:Ast...@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 > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Jorge <gus...@gm...> - 2014-04-14 13:16:03
|
How can I get from this event the phone that is callling this extension? I am looking in to asteriskServer.getChannels(); but the channel is not created when the status changed. 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 2014-04-13 11:03 GMT+02:00 Miguel Santiago <m.s...@gm...>: > I think you can Use ExtensionStatusEvent in order to know what you need > El 10/04/2014 20:57, "Jorge" <gus...@gm...> escribió: > >> Hi: >> >> I would like to know if it is possible to implement a listener or check >> if a sip extension is busy with a call. And in case it is answering a call >> how to know which number is calling. >> >> Kind Regards >> >> Jorge >> >> >> >> ------------------------------------------------------------------------------ >> 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 >> >> > > ------------------------------------------------------------------------------ > 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: Miguel S. <m.s...@gm...> - 2014-04-13 09:03:13
|
I think you can Use ExtensionStatusEvent in order to know what you need El 10/04/2014 20:57, "Jorge" <gus...@gm...> escribió: > Hi: > > I would like to know if it is possible to implement a listener or check if > a sip extension is busy with a call. And in case it is answering a call how > to know which number is calling. > > Kind Regards > > Jorge > > > > ------------------------------------------------------------------------------ > 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: Jorge <gus...@gm...> - 2014-04-11 05:05:23
|
Thank you very much I am goin to test rigth now. There is a bad copy/paste for else if parts. Also your extension could be > the calledChannel so you need to modify the code to match this case too. > > Regards, > Zoumana > Le 10 avr. 2014 23:21, "Zoumana TRAORE" <zou...@gm...> a écrit : > > Hi Jorge, >> >> Not tested but maybe you can do something like >> >> String targetExtension = "SIP/100"; >> Collection<AsteriskChannel> activeChannels = >> asteriskServer.getChannels(); >> boolean targetIsActive = false; >> String otherPartChannel = ""; >> for (AsteriskChannel activeChannel : activeChannels) { >> String callerChannel = activeChannel.getName(); >> if(callerChannel.contains(targetExtension+"-")){ //i suggest >> to add this because Asterisk always set channelName like "SIP/100-000001" >> //if you don't maybe you will match the Channel SIP/1000 >> for example if it exists >> targetIsActive = true; >> } >> String calledChannel = ""; >> >> //regarding the API getDialedChannel, getDialingChannel, >> getLinkedChannel seem to be interesting, but i can't figure out exactly THE >> ONE IS RIGHT FOR YOUR NEED >> if(activeChannel.getDialedChannel() != null){ >> calledChannel = >> activeChannel.getDialedChannel().getName(); >> if(calledChannel.contains(targetExtension+"-")){ >> otherPartChannel = calledChannel; >> } >> }else if(activeChannel.getDialingChannel() != null){ >> calledChannel = >> activeChannel.getDialedChannel().getName(); >> if(calledChannel.contains(targetExtension+"-")){ >> otherPartChannel = calledChannel; >> } >> }else if(activeChannel.getLinkedChannel() != null){ >> calledChannel = >> activeChannel.getDialedChannel().getName(); >> if(calledChannel.contains(targetExtension+"-")){ >> otherPartChannel = calledChannel; >> } >> } >> } >> >> Hope this will help. >> >> Regards, >> Zoumana >> >> >> >> *---* >> >> *Zoumana TRAORE* >> >> mob. (+33)0699783622 >> >> >> 2014-04-10 20:55 GMT+02:00 Jorge <gus...@gm...>: >> >>> Hi: >>> >>> I would like to know if it is possible to implement a listener or check >>> if a sip extension is busy with a call. And in case it is answering a call >>> how to know which number is calling. >>> >>> Kind Regards >>> >>> Jorge >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> >>> >> > > ------------------------------------------------------------------------------ > 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: Zoumana T. <zou...@gm...> - 2014-04-10 21:37:23
|
There is a bad copy/paste for else if parts. Also your extension could be the calledChannel so you need to modify the code to match this case too. Regards, Zoumana Le 10 avr. 2014 23:21, "Zoumana TRAORE" <zou...@gm...> a écrit : > Hi Jorge, > > Not tested but maybe you can do something like > > String targetExtension = "SIP/100"; > Collection<AsteriskChannel> activeChannels = > asteriskServer.getChannels(); > boolean targetIsActive = false; > String otherPartChannel = ""; > for (AsteriskChannel activeChannel : activeChannels) { > String callerChannel = activeChannel.getName(); > if(callerChannel.contains(targetExtension+"-")){ //i suggest > to add this because Asterisk always set channelName like "SIP/100-000001" > //if you don't maybe you will match the Channel SIP/1000 > for example if it exists > targetIsActive = true; > } > String calledChannel = ""; > > //regarding the API getDialedChannel, getDialingChannel, > getLinkedChannel seem to be interesting, but i can't figure out exactly THE > ONE IS RIGHT FOR YOUR NEED > if(activeChannel.getDialedChannel() != null){ > calledChannel = activeChannel.getDialedChannel().getName(); > if(calledChannel.contains(targetExtension+"-")){ > otherPartChannel = calledChannel; > } > }else if(activeChannel.getDialingChannel() != null){ > calledChannel = activeChannel.getDialedChannel().getName(); > if(calledChannel.contains(targetExtension+"-")){ > otherPartChannel = calledChannel; > } > }else if(activeChannel.getLinkedChannel() != null){ > calledChannel = activeChannel.getDialedChannel().getName(); > if(calledChannel.contains(targetExtension+"-")){ > otherPartChannel = calledChannel; > } > } > } > > Hope this will help. > > Regards, > Zoumana > > > > *---* > > *Zoumana TRAORE* > > mob. (+33)0699783622 > > > 2014-04-10 20:55 GMT+02:00 Jorge <gus...@gm...>: > >> Hi: >> >> I would like to know if it is possible to implement a listener or check >> if a sip extension is busy with a call. And in case it is answering a call >> how to know which number is calling. >> >> Kind Regards >> >> Jorge >> >> >> >> ------------------------------------------------------------------------------ >> 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: Zoumana T. <zou...@gm...> - 2014-04-10 21:22:00
|
Hi Jorge, Not tested but maybe you can do something like String targetExtension = "SIP/100"; Collection<AsteriskChannel> activeChannels = asteriskServer.getChannels(); boolean targetIsActive = false; String otherPartChannel = ""; for (AsteriskChannel activeChannel : activeChannels) { String callerChannel = activeChannel.getName(); if(callerChannel.contains(targetExtension+"-")){ //i suggest to add this because Asterisk always set channelName like "SIP/100-000001" //if you don't maybe you will match the Channel SIP/1000 for example if it exists targetIsActive = true; } String calledChannel = ""; //regarding the API getDialedChannel, getDialingChannel, getLinkedChannel seem to be interesting, but i can't figure out exactly THE ONE IS RIGHT FOR YOUR NEED if(activeChannel.getDialedChannel() != null){ calledChannel = activeChannel.getDialedChannel().getName(); if(calledChannel.contains(targetExtension+"-")){ otherPartChannel = calledChannel; } }else if(activeChannel.getDialingChannel() != null){ calledChannel = activeChannel.getDialedChannel().getName(); if(calledChannel.contains(targetExtension+"-")){ otherPartChannel = calledChannel; } }else if(activeChannel.getLinkedChannel() != null){ calledChannel = activeChannel.getDialedChannel().getName(); if(calledChannel.contains(targetExtension+"-")){ otherPartChannel = calledChannel; } } } Hope this will help. Regards, Zoumana *---* *Zoumana TRAORE* mob. (+33)0699783622 2014-04-10 20:55 GMT+02:00 Jorge <gus...@gm...>: > Hi: > > I would like to know if it is possible to implement a listener or check if > a sip extension is busy with a call. And in case it is answering a call how > to know which number is calling. > > Kind Regards > > Jorge > > > > ------------------------------------------------------------------------------ > 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: Jorge <gus...@gm...> - 2014-04-10 18:56:15
|
Hi: I would like to know if it is possible to implement a listener or check if a sip extension is busy with a call. And in case it is answering a call how to know which number is calling. Kind Regards Jorge |
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 > > |