asterisk-java-cvs Mailing List for Asterisk-Java Library (Page 78)
Brought to you by:
srt
You can subscribe to this list here.
2005 |
Jan
(4) |
Feb
(75) |
Mar
(211) |
Apr
(70) |
May
(12) |
Jun
(7) |
Jul
(96) |
Aug
(90) |
Sep
(11) |
Oct
(42) |
Nov
(45) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(20) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(32) |
Aug
|
Sep
(4) |
Oct
(2) |
Nov
(10) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(3) |
Aug
(73) |
Sep
(13) |
Oct
(4) |
Nov
(1) |
Dec
(7) |
2009 |
Jan
(1) |
Feb
(2) |
Mar
(48) |
Apr
(21) |
May
(14) |
Jun
(11) |
Jul
(9) |
Aug
(2) |
Sep
(11) |
Oct
(14) |
Nov
(6) |
Dec
(4) |
2010 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
|
May
(3) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(12) |
2011 |
Jan
(1) |
Feb
(5) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(10) |
Sep
|
Oct
(5) |
Nov
|
Dec
|
2012 |
Jan
(3) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
(2) |
Dec
(2) |
2013 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(5) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(25) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
(1) |
2016 |
Jan
|
Feb
(42) |
Mar
(6) |
Apr
(15) |
May
(3) |
Jun
(1) |
Jul
(11) |
Aug
|
Sep
|
Oct
(17) |
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
(3) |
May
(2) |
Jun
(3) |
Jul
(7) |
Aug
(11) |
Sep
(5) |
Oct
(7) |
Nov
(4) |
Dec
(4) |
2018 |
Jan
(11) |
Feb
(11) |
Mar
(3) |
Apr
|
May
(9) |
Jun
(6) |
Jul
(17) |
Aug
(9) |
Sep
(2) |
Oct
(4) |
Nov
(3) |
Dec
(3) |
2019 |
Jan
(13) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(5) |
Jun
|
Jul
(1) |
Aug
(6) |
Sep
|
Oct
|
Nov
(3) |
Dec
|
2020 |
Jan
(2) |
Feb
(72) |
Mar
(8) |
Apr
(11) |
May
(12) |
Jun
(3) |
Jul
(12) |
Aug
(3) |
Sep
(5) |
Oct
(4) |
Nov
|
Dec
(9) |
2021 |
Jan
|
Feb
(31) |
Mar
(6) |
Apr
(3) |
May
|
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
(9) |
Nov
|
Dec
(32) |
2022 |
Jan
(5) |
Feb
(7) |
Mar
(2) |
Apr
(3) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(2) |
Oct
(111) |
Nov
(105) |
Dec
(26) |
2023 |
Jan
(25) |
Feb
(6) |
Mar
(10) |
Apr
(54) |
May
(41) |
Jun
(24) |
Jul
(6) |
Aug
(11) |
Sep
(9) |
Oct
(8) |
Nov
(55) |
Dec
(34) |
2024 |
Jan
(6) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(89) |
Sep
(48) |
Oct
(31) |
Nov
(9) |
Dec
(19) |
2025 |
Jan
(12) |
Feb
(18) |
Mar
(9) |
Apr
(7) |
May
|
Jun
(7) |
Jul
(7) |
Aug
(3) |
Sep
(22) |
Oct
(2) |
Nov
|
Dec
|
From: Stefan R. <sr...@us...> - 2005-08-27 03:48:33
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4403/src/java/net/sf/asterisk/manager/event Modified Files: RegistryEvent.java Log Message: Added cause attribute Index: RegistryEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/RegistryEvent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- RegistryEvent.java 8 Aug 2005 04:23:43 -0000 1.5 +++ RegistryEvent.java 27 Aug 2005 03:48:26 -0000 1.6 @@ -35,6 +35,7 @@ public class RegistryEvent extends Manag private String domain; private String username; private String status; + private String cause; /** * @param source @@ -139,4 +140,27 @@ public class RegistryEvent extends Manag { this.status = status; } + + /** + * Returns the cause of a rejected registration. + * + * @return the cause of a rejected registration. + * @since 0.2 + */ + public String getCause() + { + return cause; + } + + /** + * Sets the cause of a rejected registration. + * + * @param cause the cause of a rejected registration. + * @since 0.2 + */ + public void setCause(String cause) + { + this.cause = cause; + } + } |
From: Stefan R. <sr...@us...> - 2005-08-27 03:33:42
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2693/src/java/net/sf/asterisk/manager/event Modified Files: MessageWaitingEvent.java Log Message: Added new and old attributes Index: MessageWaitingEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/MessageWaitingEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- MessageWaitingEvent.java 23 Feb 2005 22:50:58 -0000 1.2 +++ MessageWaitingEvent.java 27 Aug 2005 03:33:34 -0000 1.3 @@ -31,6 +31,8 @@ public class MessageWaitingEvent extends private static final long serialVersionUID = 7014587245968686266L; private String mailbox; private Integer waiting; + private Integer newMessages; + private Integer oldMessages; /** * @param source @@ -42,7 +44,8 @@ public class MessageWaitingEvent extends /** * Returns the name of the mailbox that has waiting messages.<br> - * The name of the mailbox is of the form numberOfMailbox@context, e.g. 1234@default. + * The name of the mailbox is of the form numberOfMailbox@context, e.g. + * 1234@default. * * @return the name of the mailbox that has waiting messages */ @@ -80,4 +83,44 @@ public class MessageWaitingEvent extends { this.waiting = waiting; } + + /** + * Returns the number of new messages in this mailbox. + * @return the number of new messages in this mailbox. + * @since 0.2 + */ + public Integer getNew() + { + return newMessages; + } + + /** + * Sets the number of new messages in this mailbox. + * @param newMessages the number of new messages in this mailbox. + * @since 0.2 + */ + public void setNew(Integer newMessages) + { + this.newMessages = newMessages; + } + + /** + * Returns the number of old messages in this mailbox. + * @return the number of old messages in this mailbox. + * @since 0.2 + */ + public Integer getOld() + { + return oldMessages; + } + + /** + * Sets the number of old messages in this mailbox. + * @param oldMessages the number of old messages in this mailbox. + * @since 0.2 + */ + public void setOld(Integer oldMessages) + { + this.oldMessages = oldMessages; + } } |
From: Stefan R. <sr...@us...> - 2005-08-27 03:22:44
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1396/src/java/net/sf/asterisk/manager/event Modified Files: AgentCalledEvent.java Log Message: Added callerIdName attribute Index: AgentCalledEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AgentCalledEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- AgentCalledEvent.java 23 Feb 2005 22:50:58 -0000 1.2 +++ AgentCalledEvent.java 27 Aug 2005 03:22:32 -0000 1.3 @@ -18,8 +18,8 @@ package net.sf.asterisk.manager.event; /** * An AgentCalledEvent is triggered when an agent is rung.<br> - * To enable AgentCalledEvents you have to set <code>eventwhencalled = yes</code> in - * <code>queues.conf</code>.<br> + * To enable AgentCalledEvents you have to set + * <code>eventwhencalled = yes</code> in <code>queues.conf</code>.<br> * This event is implemented in <code>apps/app_queue.c</code> * * @author srt @@ -34,6 +34,7 @@ public class AgentCalledEvent extends Ma private String agentCalled; private String channelCalling; private String callerId; + private String callerIdName; private String context; private String extension; private String priority; @@ -76,6 +77,29 @@ public class AgentCalledEvent extends Ma this.callerId = callerId; } + /** + * Returns the Caller*ID name of the calling channel. + * + * @return the Caller*ID name of the calling channel or "unknown" if no + * Caller*Id has been set. + * @since 0.2 + */ + public String getCallerIdName() + { + return callerIdName; + } + + /** + * Sets the Caller*ID name of the calling channel. + * + * @param callerIdName the Caller*ID name of the calling channel. + * @since 0.2 + */ + public void setCallerIdName(String callerIdName) + { + this.callerIdName = callerIdName; + } + public String getContext() { return context; |
From: Stefan R. <sr...@us...> - 2005-08-27 03:20:22
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1080/src/java/net/sf/asterisk/manager/event Modified Files: JoinEvent.java Log Message: Added callerIdName attribute Index: JoinEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/JoinEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- JoinEvent.java 23 Feb 2005 22:50:58 -0000 1.2 +++ JoinEvent.java 27 Aug 2005 03:20:13 -0000 1.3 @@ -31,6 +31,7 @@ public class JoinEvent extends QueueEven static final long serialVersionUID = 4961288508235470985L; protected String callerId; + protected String callerIdName; protected Integer position; /** @@ -42,8 +43,8 @@ public class JoinEvent extends QueueEven } /** - * Returns the caller id of the channel that joined the queue if set. If the channel has no - * caller id set "unknown" is returned. + * Returns the Caller*ID number of the channel that joined the queue if set. + * If the channel has no caller id set "unknown" is returned. */ public String getCallerId() { @@ -51,7 +52,7 @@ public class JoinEvent extends QueueEven } /** - * Sets the caller id of the channel that joined the queue. + * Sets the Caller*ID number of the channel that joined the queue. */ public void setCallerId(String callerId) { @@ -59,6 +60,25 @@ public class JoinEvent extends QueueEven } /** + * Returns the Caller*ID name of the channel that joined the queue if set. + * If the channel has no caller id set "unknown" is returned. + * @since 0.2 + */ + public String getCallerIdName() + { + return callerIdName; + } + + /** + * Sets the Caller*ID name of the channel that joined the queue. + * @since 0.2 + */ + public void setCallerIdName(String callerIdName) + { + this.callerIdName = callerIdName; + } + + /** * Returns the position of the joined channel in the queue. */ public Integer getPosition() |
From: Stefan R. <sr...@us...> - 2005-08-27 03:15:40
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv544/src/java/net/sf/asterisk/manager/event Added Files: MeetMeStopTalkingEvent.java MeetMeTalkingEvent.java Log Message: Added MeetMeTalkingEvent and MeetMeStopTalkingEvent (AJ-6) --- NEW FILE: MeetMeStopTalkingEvent.java --- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sf.asterisk.manager.event; /** * A MeetMeStopTalkingEvent is triggered when a user ends talking in a meet me * conference.<br> * It is implemented in <code>apps/app_meetme.c</code><br> * Available since Asterisk 1.2 * * @author srt * @version $Id: MeetMeStopTalkingEvent.java,v 1.1 2005/08/27 03:15:32 srt Exp $ * @since 0.2 */ public class MeetMeStopTalkingEvent extends MeetMeEvent { /** * Serializable version identifier */ private static final long serialVersionUID = -8554403451985143184L; /** * @param source */ public MeetMeStopTalkingEvent(Object source) { super(source); } } --- NEW FILE: MeetMeTalkingEvent.java --- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sf.asterisk.manager.event; /** * A MeetMeTalkingEvent is triggered when a user starts talking in a meet me * conference.<br> * It is implemented in <code>apps/app_meetme.c</code><br> * Available since Asterisk 1.2 * * @author srt * @version $Id: MeetMeTalkingEvent.java,v 1.1 2005/08/27 03:15:32 srt Exp $ * @since 0.2 */ public class MeetMeTalkingEvent extends MeetMeEvent { /** * Serializable version identifier */ private static final long serialVersionUID = -8554403451985143184L; /** * @param source */ public MeetMeTalkingEvent(Object source) { super(source); } } |
From: Stefan R. <sr...@us...> - 2005-08-27 03:02:06
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30403/src/java/net/sf/asterisk/manager/event Modified Files: LinkageEvent.java Log Message: Added callerId1 and callerId2 attributes Index: LinkageEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/LinkageEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- LinkageEvent.java 23 Feb 2005 22:50:58 -0000 1.2 +++ LinkageEvent.java 27 Aug 2005 03:01:58 -0000 1.3 @@ -17,7 +17,8 @@ package net.sf.asterisk.manager.event; /** - * Abstract base class providing common properties for LinkEvent and UnlinkEvent. + * Abstract base class providing common properties for LinkEvent and + * UnlinkEvent. * * @author srt * @version $Id$ @@ -33,6 +34,8 @@ public abstract class LinkageEvent exten private String uniqueId2; private String channel1; private String channel2; + private String callerId1; + private String callerId2; /** * @param source @@ -105,4 +108,48 @@ public abstract class LinkageEvent exten { this.channel2 = channel2; } + + /** + * Returns the Caller*Id number of the first channel. + * + * @return the Caller*Id number of the first channel. + * @since 0.2 + */ + public String getCallerId1() + { + return callerId1; + } + + /** + * Sets the Caller*Id number of the first channel. + * + * @param callerId1 the Caller*Id number of the first channel. + * @since 0.2 + */ + public void setCallerId1(String callerId1) + { + this.callerId1 = callerId1; + } + + /** + * Returns the Caller*Id number of the second channel. + * + * @return the Caller*Id number of the second channel. + * @since 0.2 + */ + public String getCallerId2() + { + return callerId2; + } + + /** + * Sets the Caller*Id number of the second channel. + * + * @param callerId1 the Caller*Id number of the second channel. + * @since 0.2 + */ + public void setCallerId2(String callerId2) + { + this.callerId2 = callerId2; + } } |
From: Stefan R. <sr...@us...> - 2005-08-27 02:59:32
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29554/src/java/net/sf/asterisk/manager/event Modified Files: NewCallerIdEvent.java Log Message: Added @since 0.2 tags Index: NewCallerIdEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/NewCallerIdEvent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- NewCallerIdEvent.java 27 Aug 2005 02:57:54 -0000 1.5 +++ NewCallerIdEvent.java 27 Aug 2005 02:59:24 -0000 1.6 @@ -151,6 +151,7 @@ public class NewCallerIdEvent extends Ma * Returns the CallerId presentation/screening. * * @return the CallerId presentation/screening. + * @since 0.2 */ public Integer getCidCallingPres() { @@ -163,6 +164,7 @@ public class NewCallerIdEvent extends Ma * * @return the textual respresentation of the CallerId * presentation/screening. + * @since 0.2 */ public String getCidCallingPresTxt() { @@ -173,6 +175,7 @@ public class NewCallerIdEvent extends Ma * Sets the CallerId presentation/screening in the form "%d (%s)". * * @param s the CallerId presentation/screening in the form "%d (%s)". + * @since 0.2 */ public void setCidCallingPres(String s) { |
From: Stefan R. <sr...@us...> - 2005-08-27 02:58:02
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29379/src/test/net/sf/asterisk/manager/impl Modified Files: EventBuilderImplTest.java Log Message: Added CidCallingPres and CidCallingPresTxt attributes to NewCallerIdEvent Index: EventBuilderImplTest.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager/impl/EventBuilderImplTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- EventBuilderImplTest.java 27 Aug 2005 02:26:59 -0000 1.5 +++ EventBuilderImplTest.java 27 Aug 2005 02:57:54 -0000 1.6 @@ -25,6 +25,7 @@ import net.sf.asterisk.manager.event.Cdr import net.sf.asterisk.manager.event.ChannelEvent; import net.sf.asterisk.manager.event.HangupEvent; import net.sf.asterisk.manager.event.ManagerEvent; +import net.sf.asterisk.manager.event.NewCallerIdEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewExtenEvent; import net.sf.asterisk.manager.event.ResponseEvent; @@ -282,4 +283,69 @@ public class EventBuilderImplTest extend assertEquals("CauseTxt property not set correctly", "some text", ((HangupEvent) event).getCauseTxt()); } + + public void testBuildEventWithCidCallingPres() + { + Map properties = new HashMap(); + ManagerEvent event; + + properties.put("event", "Newcallerid"); + properties.put("cid-callingpres", "123 (nice description)"); + event = eventBuilder.buildEvent(this, properties); + + assertNotNull(event); + assertEquals("CidCallingPres property not set correctly", new Integer(123), + ((NewCallerIdEvent) event).getCidCallingPres()); + assertEquals("CidCallingPresTxt property not set correctly", "nice description", + ((NewCallerIdEvent) event).getCidCallingPresTxt()); + } + + public void testBuildEventWithCidCallingPresAndEmptyTxt() + { + Map properties = new HashMap(); + ManagerEvent event; + + properties.put("event", "Newcallerid"); + properties.put("cid-callingpres", "123 ()"); + event = eventBuilder.buildEvent(this, properties); + + assertNotNull(event); + assertEquals("CidCallingPres property not set correctly", new Integer(123), + ((NewCallerIdEvent) event).getCidCallingPres()); + assertNull("CidCallingPresTxt property not set correctly (must be null)", + ((NewCallerIdEvent) event).getCidCallingPresTxt()); + } + + public void testBuildEventWithCidCallingPresAndMissingTxt() + { + Map properties = new HashMap(); + ManagerEvent event; + + properties.put("event", "Newcallerid"); + properties.put("cid-callingpres", "123"); + event = eventBuilder.buildEvent(this, properties); + + assertNotNull(event); + assertEquals("CidCallingPres property not set correctly", new Integer(123), + ((NewCallerIdEvent) event).getCidCallingPres()); + assertNull("CidCallingPresTxt property not set correctly (must be null)", + ((NewCallerIdEvent) event).getCidCallingPresTxt()); + } + + + public void testBuildEventWithInvalidCidCallingPres() + { + Map properties = new HashMap(); + ManagerEvent event; + + properties.put("event", "Newcallerid"); + properties.put("cid-callingpres", "abc"); + event = eventBuilder.buildEvent(this, properties); + + assertNotNull(event); + assertNull("CidCallingPres property not set correctly (must be null)", + ((NewCallerIdEvent) event).getCidCallingPres()); + assertNull("CidCallingPresTxt property not set correctly (must be null)", + ((NewCallerIdEvent) event).getCidCallingPresTxt()); + } } |
From: Stefan R. <sr...@us...> - 2005-08-27 02:58:02
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29379/src/java/net/sf/asterisk/manager/event Modified Files: NewCallerIdEvent.java Log Message: Added CidCallingPres and CidCallingPresTxt attributes to NewCallerIdEvent Index: NewCallerIdEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/NewCallerIdEvent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- NewCallerIdEvent.java 26 Feb 2005 20:50:31 -0000 1.4 +++ NewCallerIdEvent.java 27 Aug 2005 02:57:54 -0000 1.5 @@ -16,6 +16,7 @@ */ package net.sf.asterisk.manager.event; + /** * A NewCallerIdEvent is triggered when the caller id of a channel changes.<br> * It is implemented in <code>channel.c</code> @@ -51,6 +52,12 @@ public class NewCallerIdEvent extends Ma private String uniqueId; /** + * Callerid presentation/screening. + */ + private Integer cidCallingPres; + private String cidCallingPresTxt; + + /** * @param source */ public NewCallerIdEvent(Object source) @@ -119,7 +126,8 @@ public class NewCallerIdEvent extends Ma } /** - * Returns the new Caller*ID Name if set or "≶Unknown>" if none has been set. + * Returns the new Caller*ID Name if set or "≶Unknown>" if none has + * been set. * * @return the new Caller*ID Name. */ @@ -129,7 +137,8 @@ public class NewCallerIdEvent extends Ma } /** - * Sets the new Caller*ID Name if set or "≶Unknown>" if none has been set. + * Sets the new Caller*ID Name if set or "≶Unknown>" if none has been + * set. * * @param callerIdName the Caller*ID Name to set. */ @@ -137,4 +146,61 @@ public class NewCallerIdEvent extends Ma { this.callerIdName = callerIdName; } + + /** + * Returns the CallerId presentation/screening. + * + * @return the CallerId presentation/screening. + */ + public Integer getCidCallingPres() + { + return cidCallingPres; + } + + /** + * Returns the textual respresentation of the CallerId + * presentation/screening. + * + * @return the textual respresentation of the CallerId + * presentation/screening. + */ + public String getCidCallingPresTxt() + { + return cidCallingPresTxt; + } + + /** + * Sets the CallerId presentation/screening in the form "%d (%s)". + * + * @param s the CallerId presentation/screening in the form "%d (%s)". + */ + public void setCidCallingPres(String s) + { + int spaceIdx; + + if (s == null) + { + return; + } + + spaceIdx = s.indexOf(' '); + if (spaceIdx <= 0) + { + spaceIdx = s.length(); + } + + try + { + this.cidCallingPres = new Integer(s.substring(0, spaceIdx)); + } + catch (NumberFormatException e) + { + return; + } + + if (s.length() > spaceIdx + 3) + { + this.cidCallingPresTxt = s.substring(spaceIdx + 2, s.length() - 1); + } + } } |
From: Stefan R. <sr...@us...> - 2005-08-27 02:27:08
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24984/src/java/net/sf/asterisk/manager/impl Modified Files: EventBuilderImpl.java Log Message: Added new attribute "Cause-txt" to HangupEvent Added handling of special charaters in event attribute names Index: EventBuilderImpl.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/impl/EventBuilderImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -p -r1.9 -r1.10 --- EventBuilderImpl.java 26 Jul 2005 12:16:02 -0000 1.9 +++ EventBuilderImpl.java 27 Aug 2005 02:26:59 -0000 1.10 @@ -153,26 +153,31 @@ public class EventBuilderImpl implements String eventType; className = clazz.getName(); - eventType = className.substring(className.lastIndexOf('.') + 1).toLowerCase(); + eventType = className.substring(className.lastIndexOf('.') + 1) + .toLowerCase(); if (eventType.endsWith("event")) { - eventType = eventType.substring(0, eventType.length() - "event".length()); + eventType = eventType.substring(0, eventType.length() + - "event".length()); } - if (UserEvent.class.isAssignableFrom(clazz) && ! eventType.startsWith("userevent")) + if (UserEvent.class.isAssignableFrom(clazz) + && !eventType.startsWith("userevent")) { eventType = "userevent" + eventType; } - + registerEventClass(eventType, clazz); } /** * Registers a new event class for the event given by eventType. * - * @param eventType the name of the event to register the class for. For example "Join". - * @param clazz the event class to register, must extend net.sf.asterisk.manager.event.Event. + * @param eventType the name of the event to register the class for. For + * example "Join". + * @param clazz the event class to register, must extend + * net.sf.asterisk.manager.event.Event. */ public void registerEventClass(String eventType, Class clazz) { @@ -190,21 +195,25 @@ public class EventBuilderImpl implements try { - defaultConstructor = clazz.getConstructor(new Class[]{Object.class}); + defaultConstructor = clazz + .getConstructor(new Class[]{Object.class}); } catch (NoSuchMethodException ex) { - throw new IllegalArgumentException(clazz + " has no usable constructor"); + throw new IllegalArgumentException(clazz + + " has no usable constructor"); } if ((defaultConstructor.getModifiers() & Modifier.PUBLIC) == 0) { - throw new IllegalArgumentException(clazz + " has no public default constructor"); + throw new IllegalArgumentException(clazz + + " has no public default constructor"); } registeredEventClasses.put(eventType.toLowerCase(), clazz); - logger.debug("Registered event type '" + eventType + "' (" + clazz + ")"); + logger.debug("Registered event type '" + eventType + "' (" + clazz + + ")"); } public ManagerEvent buildEvent(Object source, Map attributes) @@ -224,7 +233,8 @@ public class EventBuilderImpl implements eventClass = (Class) registeredEventClasses.get(eventType); if (eventClass == null) { - logger.warn("No event class registered for event type '" + eventType + "', attributes: " + attributes); + logger.warn("No event class registered for event type '" + + eventType + "', attributes: " + attributes); return null; } @@ -240,7 +250,8 @@ public class EventBuilderImpl implements try { - event = (ManagerEvent) constructor.newInstance(new Object[]{source}); + event = (ManagerEvent) constructor + .newInstance(new Object[]{source}); } catch (Exception ex) { @@ -263,7 +274,8 @@ public class EventBuilderImpl implements if (actionId != null) { responseEvent.setActionId(Util.stripInternalActionId(actionId)); - responseEvent.setInternalActionId(Util.getInternalActionId(actionId)); + responseEvent.setInternalActionId(Util + .getInternalActionId(actionId)); } } @@ -292,8 +304,9 @@ public class EventBuilderImpl implements } /* - * The source property needs special handling as it is already defined in - * java.util.EventObject (the base class of ManagerEvent), so we have to translate it. + * The source property needs special handling as it is already + * defined in java.util.EventObject (the base class of + * ManagerEvent), so we have to translate it. */ if ("source".equals(name)) { @@ -301,20 +314,22 @@ public class EventBuilderImpl implements } else { - setter = (Method) setters.get(name); + setter = (Method) setters.get(stripIllegalCharacters(name)); } if (setter == null) { - logger.error("Unable to set property '" + name + "' on " + event.getClass() + ": no setter"); + logger.error("Unable to set property '" + name + "' on " + + event.getClass() + ": no setter"); continue; } dataType = setter.getParameterTypes()[0]; - + if (dataType == Boolean.class) { - value = new Boolean(AstUtil.isTrue((String) attributes.get(name))); + value = new Boolean(AstUtil.isTrue((String) attributes + .get(name))); } else if (dataType.isAssignableFrom(String.class)) { @@ -324,13 +339,17 @@ public class EventBuilderImpl implements { try { - Constructor constructor = dataType.getConstructor(new Class[]{String.class}); - value = constructor.newInstance(new Object[]{attributes.get(name)}); + Constructor constructor = dataType + .getConstructor(new Class[]{String.class}); + value = constructor.newInstance(new Object[]{attributes + .get(name)}); } catch (Exception e) { - logger.error("Unable to convert value '" + attributes.get(name) + "' of property '" + name - + "' on " + event.getClass() + " to required type " + dataType, e); + logger.error("Unable to convert value '" + + attributes.get(name) + "' of property '" + name + + "' on " + event.getClass() + " to required type " + + dataType, e); continue; } } @@ -341,10 +360,68 @@ public class EventBuilderImpl implements } catch (Exception e) { - logger.error("Unable to set property '" + name + "' on " + event.getClass(), e); + logger.error("Unable to set property '" + name + "' on " + + event.getClass(), e); + continue; + } + } + } + + /** + * Strips all illegal charaters from the given lower case string. + * + * @param s the original string + * @return the string with all illegal characters stripped + */ + private String stripIllegalCharacters(String s) + { + char c; + boolean needsStrip = false; + StringBuffer sb; + + if (s == null) + { + return null; + } + + for (int i = 0; i < s.length(); i++) + { + c = s.charAt(i); + if (c >= '0' && c <= '9') + { + continue; + } + else if (c >= 'a' && c <= 'z') + { continue; } + else + { + needsStrip = true; + break; + } + } + + if (!needsStrip) + { + return s; } + + sb = new StringBuffer(s.length()); + for (int i = 0; i < s.length(); i++) + { + c = s.charAt(i); + if (c >= '0' && c <= '9') + { + sb.append(c); + } + else if (c >= 'a' && c <= 'z') + { + sb.append(c); + } + } + + return sb.toString(); } private Map getSetters(Class clazz) |
From: Stefan R. <sr...@us...> - 2005-08-27 02:27:08
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24984/src/test/net/sf/asterisk/manager/impl Modified Files: EventBuilderImplTest.java Log Message: Added new attribute "Cause-txt" to HangupEvent Added handling of special charaters in event attribute names Index: EventBuilderImplTest.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager/impl/EventBuilderImplTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- EventBuilderImplTest.java 18 Jul 2005 14:53:25 -0000 1.4 +++ EventBuilderImplTest.java 27 Aug 2005 02:26:59 -0000 1.5 @@ -23,6 +23,7 @@ import junit.framework.TestCase; import net.sf.asterisk.manager.EventBuilder; import net.sf.asterisk.manager.event.CdrEvent; import net.sf.asterisk.manager.event.ChannelEvent; +import net.sf.asterisk.manager.event.HangupEvent; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewExtenEvent; @@ -267,4 +268,18 @@ public class EventBuilderImplTest extend assertEquals("Src property not set correctly", "source value", ((CdrEvent) event).getSrc()); } + + public void testBuildEventWithSpecialCharacterProperty() + { + Map properties = new HashMap(); + ManagerEvent event; + + properties.put("event", "Hangup"); + properties.put("cause-txt", "some text"); + event = eventBuilder.buildEvent(this, properties); + + assertNotNull(event); + assertEquals("CauseTxt property not set correctly", "some text", + ((HangupEvent) event).getCauseTxt()); + } } |
From: Stefan R. <sr...@us...> - 2005-08-27 02:27:08
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24984/src/java/net/sf/asterisk/manager/event Modified Files: HangupEvent.java Log Message: Added new attribute "Cause-txt" to HangupEvent Added handling of special charaters in event attribute names Index: HangupEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/HangupEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- HangupEvent.java 23 Feb 2005 22:50:58 -0000 1.2 +++ HangupEvent.java 27 Aug 2005 02:26:59 -0000 1.3 @@ -31,6 +31,7 @@ public class HangupEvent extends Channel static final long serialVersionUID = 650153034857116588L; private Integer cause; + private String causeTxt; /** * @param source @@ -55,4 +56,26 @@ public class HangupEvent extends Channel { this.cause = cause; } + + /** + * Returns the textual representation of the hangup cause. + * + * @return the textual representation of the hangup cause. + * @since 0.2 + */ + public String getCauseTxt() + { + return causeTxt; + } + + /** + * Sets the textual representation of the hangup cause. + * + * @param causeTxt the textual representation of the hangup cause. + * @since 0.2 + */ + public void setCauseTxt(String causeTxt) + { + this.causeTxt = causeTxt; + } } |
From: Stefan R. <sr...@us...> - 2005-08-27 02:07:43
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21893/src/java/net/sf/asterisk/fastagi Modified Files: BaseAGIScript.java AbstractAGIScript.java Log Message: Removed obsolete todo tags regarding getOption() Index: BaseAGIScript.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/BaseAGIScript.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- BaseAGIScript.java 7 Aug 2005 19:06:46 -0000 1.2 +++ BaseAGIScript.java 27 Aug 2005 02:07:35 -0000 1.3 @@ -200,8 +200,6 @@ public abstract class BaseAGIScript impl return reply.getResult(); } - // TODO add getOption() methods - /** * Plays the given file, and waits for the user to press one of the given * digits. If none of the esacpe digits is pressed while streaming the file Index: AbstractAGIScript.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/AbstractAGIScript.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -p -r1.16 -r1.17 --- AbstractAGIScript.java 6 Aug 2005 18:43:25 -0000 1.16 +++ AbstractAGIScript.java 27 Aug 2005 02:07:35 -0000 1.17 @@ -208,8 +208,6 @@ public abstract class AbstractAGIScript return reply.getResult(); } - // TODO add getOption() methods - /** * Plays the given file, and waits for the user to press one of the given * digits. If none of the esacpe digits is pressed while streaming the file |
From: Stefan R. <sr...@us...> - 2005-08-26 21:58:55
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29814/src/java/net/sf/asterisk/manager/action Modified Files: AgentLogoffAction.java Log Message: removed @since javadoc tags from constructors Index: AgentLogoffAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/AgentLogoffAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- AgentLogoffAction.java 26 Aug 2005 21:56:14 -0000 1.3 +++ AgentLogoffAction.java 26 Aug 2005 21:58:48 -0000 1.4 @@ -45,7 +45,6 @@ public class AgentLogoffAction extends A * Creates a new AgentLogoffAction that logs off the given agent * * @param agent the name of the agent to log off. - * @since 0.2 */ public AgentLogoffAction(String agent) { @@ -58,7 +57,6 @@ public class AgentLogoffAction extends A * @param agent the name of the agent to log off. * @param soft Boolean.TRUE if exisiting calls should not be hung up on * logout. - * @since 0.2 */ public AgentLogoffAction(String agent, Boolean soft) { |
From: Stefan R. <sr...@us...> - 2005-08-26 21:56:42
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29318/src/java/net/sf/asterisk/manager/action Modified Files: AgentCallbackLoginAction.java Log Message: Added constructor with context Index: AgentCallbackLoginAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/AgentCallbackLoginAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- AgentCallbackLoginAction.java 7 Aug 2005 00:09:42 -0000 1.3 +++ AgentCallbackLoginAction.java 26 Aug 2005 21:56:34 -0000 1.4 @@ -17,7 +17,7 @@ package net.sf.asterisk.manager.action; /** - * The AgentCallbackLoginAction aets an agent as logged in with callback.<br> + * The AgentCallbackLoginAction sets an agent as logged in with callback.<br> * You can pass an extentsion (and optionally a context) to specify the * destination of the callback.<br> * In contrast to the AgentCallbackLogin application that you can use within @@ -64,6 +64,21 @@ public class AgentCallbackLoginAction ex } /** + * Creates a new AgentCallbackLoginAction, that logs in the given agent at + * the given callback extension in the given context. + * + * @param agent the name of the agent to log in + * @param exten the extension that is called to connect a queue member with + * this agent + * @param context the context of the extension to use for callback + */ + public AgentCallbackLoginAction(String agent, String exten, String context) + { + this(agent, exten); + this.context = context; + } + + /** * Returns the name of this action, i.e. "AgentCallbackLogin". * * @return the name of this action @@ -138,8 +153,9 @@ public class AgentCallbackLoginAction ex /** * Returns if an acknowledgement is needed when agent is called back. * - * @return Boolean.TRUE to 'true' to require an acknowledgement by '#' when - * agent is called back, Boolean.FALSE otherwise. + * @return Boolean.TRUE if acknowledgement by '#' is required when agent is + * called back, Boolean.FALSE otherwise. <code>null</code> if + * default should be used. */ public Boolean getAckCall() { @@ -153,6 +169,7 @@ public class AgentCallbackLoginAction ex * * @param ackCall Boolean.TRUE to 'true' to require an acknowledgement by * '#' when agent is called back, Boolean.FALSE otherwise. + * <code>null</code> if default should be used. */ public void setAckCall(Boolean ackCall) { |
From: Stefan R. <sr...@us...> - 2005-08-26 21:56:22
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29213/src/java/net/sf/asterisk/manager/action Modified Files: AgentLogoffAction.java Log Message: Added soft attribute Index: AgentLogoffAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/AgentLogoffAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- AgentLogoffAction.java 7 Aug 2005 00:09:42 -0000 1.2 +++ AgentLogoffAction.java 26 Aug 2005 21:56:14 -0000 1.3 @@ -31,6 +31,7 @@ public class AgentLogoffAction extends A */ private static final long serialVersionUID = 5239805071977668779L; private String agent; + private Boolean soft; /** * Creates a new empty AgentLogoffAction. @@ -52,6 +53,20 @@ public class AgentLogoffAction extends A } /** + * Creates a new AgentLogoffAction that logs off the given agent + * + * @param agent the name of the agent to log off. + * @param soft Boolean.TRUE if exisiting calls should not be hung up on + * logout. + * @since 0.2 + */ + public AgentLogoffAction(String agent, Boolean soft) + { + this(agent); + this.soft = soft; + } + + /** * Returns the name of this action, i.e. "AgentLogoff". * * @return the name of this action @@ -81,4 +96,30 @@ public class AgentLogoffAction extends A { this.agent = agent; } + + /** + * Returns whether to hangup existing calls or not.<br> + * Default is to hangup existing calls on logoff. + * + * @return Boolean.TRUE if existing calls should not be hung up, + * Boolean.FALSE otherwise. <code>null</code> if default should be + * used. + */ + public Boolean getSoft() + { + return soft; + } + + /** + * Sets whether existing calls should be hung up or not.<br> + * Default is to hangup existing calls on logoff. + * + * @param soft Boolean.TRUE if existing calls should not be hung up, + * Boolean.FALSE otherwise. <code>null</code> if default should + * be used. + */ + public void setSoft(Boolean soft) + { + this.soft = soft; + } } |
From: Stefan R. <sr...@us...> - 2005-08-23 00:51:55
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/command In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12264/src/java/net/sf/asterisk/fastagi/command Modified Files: GetVariableCommand.java Log Message: Added note about custom asterisk functions to javadocs. See http://bugs.digium.com/view.php?id=4855 for details Index: GetVariableCommand.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi/command/GetVariableCommand.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- GetVariableCommand.java 11 Mar 2005 13:41:13 -0000 1.4 +++ GetVariableCommand.java 23 Aug 2005 00:51:43 -0000 1.5 @@ -18,6 +18,8 @@ package net.sf.asterisk.fastagi.command; /** * Returns the value of the given channel varible.<br> + * Since Asterisk 1.2 you can also use this command to use custom Asterisk + * functions. Syntax is "func(args)".<br> * Returns 0 if the variable is not set. Returns 1 if the variable is set and * returns the variable in parenthesis.<br> * Example return code: 200 result=1 (testvariable) |
From: Stefan R. <sr...@us...> - 2005-08-21 22:39:31
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16160/src/java/net/sf/asterisk/manager Modified Files: DefaultAsteriskManager.java Queue.java Log Message: Fixed updating of queue entries (AJ-1) Added toString() to Queue Index: DefaultAsteriskManager.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/DefaultAsteriskManager.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -p -r1.20 -r1.21 --- DefaultAsteriskManager.java 16 Aug 2005 00:25:43 -0000 1.20 +++ DefaultAsteriskManager.java 21 Aug 2005 22:39:21 -0000 1.21 @@ -33,6 +33,8 @@ import net.sf.asterisk.manager.action.St import net.sf.asterisk.manager.event.ConnectEvent; import net.sf.asterisk.manager.event.DisconnectEvent; import net.sf.asterisk.manager.event.HangupEvent; +import net.sf.asterisk.manager.event.JoinEvent; +import net.sf.asterisk.manager.event.LeaveEvent; import net.sf.asterisk.manager.event.LinkEvent; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.event.NewCallerIdEvent; @@ -415,6 +417,14 @@ public class DefaultAsteriskManager { handleHangupEvent((HangupEvent) event); } + else if (event instanceof JoinEvent) + { + handleJoinEvent((JoinEvent) event); + } + else if (event instanceof LeaveEvent) + { + handleLeaveEvent((LeaveEvent) event); + } } /* Private helper methods */ @@ -603,6 +613,54 @@ public class DefaultAsteriskManager } } + protected void handleJoinEvent(JoinEvent event) + { + Queue queue = (Queue) queues.get(event.getQueue()); + Channel channel = getChannelByName(event.getChannel()); + + if (queue == null) + { + logger.error("ignored JoinEvent for unknown queue " + + event.getQueue()); + return; + } + if (channel == null) + { + logger.error("ignored JoinEvent for unknown channel " + + event.getChannel()); + return; + } + + if (!queue.getEntries().contains(channel)) + { + queue.addEntry(channel); + } + } + + protected void handleLeaveEvent(LeaveEvent event) + { + Queue queue = (Queue) queues.get(event.getQueue()); + Channel channel = getChannelByName(event.getChannel()); + + if (queue == null) + { + logger.error("ignored LeaveEvent for unknown queue " + + event.getQueue()); + return; + } + if (channel == null) + { + logger.error("ignored LeaveEvent for unknown channel " + + event.getChannel()); + return; + } + + if (queue.getEntries().contains(channel)) + { + queue.removeEntry(channel); + } + } + /** * Returns a channel by its name. * Index: Queue.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/Queue.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- Queue.java 23 Feb 2005 22:50:57 -0000 1.2 +++ Queue.java 21 Aug 2005 22:39:22 -0000 1.3 @@ -70,4 +70,18 @@ public class Queue implements Serializab { entries.remove(entry); } + + public String toString() + { + StringBuffer sb; + + sb = new StringBuffer(getClass().getName() + ": "); + + sb.append("name='" + getName() + "'; "); + sb.append("max='" + getMax() + "'; "); + sb.append("entries='" + getEntries() + "'; "); + sb.append("systemHashcode=" + System.identityHashCode(this)); + + return sb.toString(); + } } |
From: Stefan R. <sr...@us...> - 2005-08-21 00:10:25
|
Update of /cvsroot/asterisk-java/asterisk-java/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32357/xdocs Modified Files: patch.xml Log Message: Updated patch howto to suggest submitting the patch to the bug tracker instead of the -devel mailing list Index: patch.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/xdocs/patch.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- patch.xml 8 May 2005 11:59:53 -0000 1.4 +++ patch.xml 21 Aug 2005 00:10:15 -0000 1.5 @@ -63,7 +63,7 @@ <subsection name="Sending a Patch"> <p>The preferred way to submit a patch is via the - <a href="mail-lists.html">Asterisk-Java Developer List</a>. + <a href="http://jira.reucon.com/browse/AJ">Bug Tracker</a>. The patch can be reviewed there in public and other suggestions can be discussed.</p> </subsection> |
From: Stefan R. <sr...@us...> - 2005-08-21 00:08:07
|
Update of /cvsroot/asterisk-java/asterisk-java/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31697/xdocs Modified Files: navigation.xml Log Message: Added link to bug tracker Index: navigation.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/xdocs/navigation.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -p -r1.6 -r1.7 --- navigation.xml 11 Jul 2005 17:59:29 -0000 1.6 +++ navigation.xml 21 Aug 2005 00:07:56 -0000 1.7 @@ -28,6 +28,7 @@ <item name="Building with Maven" href="building.html"/> <item name="Mailing Lists" href="mail-lists.html"/> <item name="Patch Howto" href="patch.html"/> + <item name="Bug Tracker" href="http://jira.reucon.com/browse/AJ"/> </menu> <menu name="Documentation"> <item name="Design" href="design.html"/> |
From: Stefan R. <sr...@us...> - 2005-08-19 18:33:41
|
Update of /cvsroot/asterisk-java/asterisk-java/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31698/xdocs Modified Files: index.xml Log Message: fixed spelling, too ;) Index: index.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/xdocs/index.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -p -r1.26 -r1.27 --- index.xml 4 Aug 2005 06:07:38 -0000 1.26 +++ index.xml 19 Aug 2005 18:33:32 -0000 1.27 @@ -53,7 +53,7 @@ License, Version 2.0</a>.</p> </subsection> <subsection name="Status"> - <p>Asterisk-Java 0.1 has been realeased in late april and is + <p>Asterisk-Java 0.1 has been released in late april and is available from the <a href="http://sourceforge.net/projects/asterisk-java/">sourceforge project page</a>.</p> |
From: Stefan R. <sr...@us...> - 2005-08-16 16:23:55
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28673/src/java/net/sf/asterisk/manager Modified Files: Channel.java Log Message: Added since tag to javadoc of getWasLinked() Index: Channel.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/Channel.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -p -r1.11 -r1.12 --- Channel.java 16 Aug 2005 00:43:58 -0000 1.11 +++ Channel.java 16 Aug 2005 16:23:47 -0000 1.12 @@ -370,6 +370,7 @@ public class Channel implements Serializ * * @return <code>true</code> if this channel was linked to another channel * at least once, <code>false</code> otherwise. + * @since 0.2 */ public final boolean getWasLinked() { |
From: Stefan R. <sr...@us...> - 2005-08-16 00:44:05
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30600/src/java/net/sf/asterisk/manager Modified Files: Channel.java Log Message: added wasLinked attribute Index: Channel.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/Channel.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -p -r1.10 -r1.11 --- Channel.java 15 Aug 2005 12:34:13 -0000 1.10 +++ Channel.java 16 Aug 2005 00:43:58 -0000 1.11 @@ -77,6 +77,11 @@ public class Channel implements Serializ private Channel linkedChannel; /** + * Indicates if this channel was linked to another channel at least once. + */ + private boolean wasLinked; + + /** * Creates a new Channel. * * @param name name of this channel, for example "SIP/1310-20da". @@ -354,6 +359,21 @@ public class Channel implements Serializ public final void setLinkedChannel(final Channel linkedChannel) { this.linkedChannel = linkedChannel; + if (linkedChannel != null) + { + this.wasLinked = true; + } + } + + /** + * Indicates if this channel was linked to another channel at least once. + * + * @return <code>true</code> if this channel was linked to another channel + * at least once, <code>false</code> otherwise. + */ + public final boolean getWasLinked() + { + return wasLinked; } public String toString() |
From: Stefan R. <sr...@us...> - 2005-08-16 00:25:53
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25215/src/java/net/sf/asterisk/manager Modified Files: DefaultAsteriskManager.java Log Message: Setting dateOfCreation on new channel event Index: DefaultAsteriskManager.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/DefaultAsteriskManager.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -p -r1.19 -r1.20 --- DefaultAsteriskManager.java 15 Aug 2005 13:32:32 -0000 1.19 +++ DefaultAsteriskManager.java 16 Aug 2005 00:25:43 -0000 1.20 @@ -649,6 +649,7 @@ public class DefaultAsteriskManager { Channel channel = new Channel(event.getChannel(), event.getUniqueId()); + channel.setDateOfCreation(event.getDateReceived()); channel.setCallerId(event.getCallerId()); channel.setCallerIdName(event.getCallerIdName()); channel.setState(ChannelStateEnum.getEnum(event.getState())); |
From: Stefan R. <sr...@us...> - 2005-08-15 13:32:44
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26096/src/java/net/sf/asterisk/manager Modified Files: DefaultAsteriskManager.java Log Message: Added handling of NewCallerIdEvent Index: DefaultAsteriskManager.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/DefaultAsteriskManager.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -p -r1.18 -r1.19 --- DefaultAsteriskManager.java 15 Aug 2005 12:34:13 -0000 1.18 +++ DefaultAsteriskManager.java 15 Aug 2005 13:32:32 -0000 1.19 @@ -35,6 +35,7 @@ import net.sf.asterisk.manager.event.Dis import net.sf.asterisk.manager.event.HangupEvent; import net.sf.asterisk.manager.event.LinkEvent; import net.sf.asterisk.manager.event.ManagerEvent; +import net.sf.asterisk.manager.event.NewCallerIdEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewExtenEvent; import net.sf.asterisk.manager.event.NewStateEvent; @@ -394,6 +395,10 @@ public class DefaultAsteriskManager { handleNewStateEvent((NewStateEvent) event); } + else if (event instanceof NewCallerIdEvent) + { + handleNewCallerIdEvent((NewCallerIdEvent) event); + } else if (event instanceof LinkEvent) { handleLinkEvent((LinkEvent) event); @@ -686,7 +691,28 @@ public class DefaultAsteriskManager return; } - channel.setState(ChannelStateEnum.getEnum(event.getState())); + synchronized (channel) + { + channel.setState(ChannelStateEnum.getEnum(event.getState())); + } + } + + protected void handleNewCallerIdEvent(NewCallerIdEvent event) + { + Channel channel = getChannelById(event.getUniqueId()); + + if (channel == null) + { + logger.error("Ignored NewCallerIdEvent for unknown channel " + + event.getChannel()); + return; + } + + synchronized (channel) + { + channel.setCallerId(event.getCallerId()); + channel.setCallerIdName(event.getCallerIdName()); + } } protected void handleHangupEvent(HangupEvent event) |