diff --git a/resources/sounds/dial.wav b/resources/sounds/dial.wav new file mode 100644 index 000000000..4b6065487 Binary files /dev/null and b/resources/sounds/dial.wav differ diff --git a/resources/sounds/sounds.properties b/resources/sounds/sounds.properties index 2d0ed7525..672663bb5 100644 --- a/resources/sounds/sounds.properties +++ b/resources/sounds/sounds.properties @@ -15,8 +15,8 @@ DIAL_EIGHT=resources/sounds/eight_8.wav DIAL_NINE=resources/sounds/nine_9.wav DIAL_DIEZ=resources/sounds/one_1.wav DIAL_STAR=resources/sounds/one_1.wav - BUSY=resources/sounds/busy.wav +DIAL=resources/sounds/dial.wav CALL_SECURITY_ON=resources/sounds/zrtpSecure.wav CALL_SECURITY_ERROR=resources/sounds/zrtpAlert.wav \ No newline at end of file diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java index 634469aa8..a60e52189 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java @@ -767,6 +767,7 @@ public void run() */ private static void stopAllSounds() { + NotificationManager.stopSound(NotificationManager.DIALING); NotificationManager.stopSound(NotificationManager.BUSY_CALL); NotificationManager.stopSound(NotificationManager.INCOMING_CALL); NotificationManager.stopSound(NotificationManager.OUTGOING_CALL); diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java index ee8c3f33c..1a18f730c 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java @@ -69,6 +69,19 @@ public void peerStateChanged(CallPeerChangeEvent evt) String newStateString = sourcePeer.getState().getStateString(); + // Play the dialing audio when in connecting and initiating call state. + // Stop the dialing audio when we enter any other state. + if (newState == CallPeerState.INITIATING_CALL + || newState == CallPeerState.CONNECTING) + { + NotificationManager + .fireNotification(NotificationManager.DIALING); + } + else + { + NotificationManager.stopSound(NotificationManager.DIALING); + } + if (newState == CallPeerState.ALERTING_REMOTE_SIDE) { NotificationManager diff --git a/src/net/java/sip/communicator/impl/gui/utils/NotificationManager.java b/src/net/java/sip/communicator/impl/gui/utils/NotificationManager.java index c5ef3ade6..6c2932086 100644 --- a/src/net/java/sip/communicator/impl/gui/utils/NotificationManager.java +++ b/src/net/java/sip/communicator/impl/gui/utils/NotificationManager.java @@ -21,6 +21,8 @@ public class NotificationManager public static final String BUSY_CALL = "BusyCall"; + public static final String DIALING = "Dialing"; + public static final String PROACTIVE_NOTIFICATION = "ProactiveNotification"; public static final String SECURITY_MESSAGE = "SecurityMessage"; @@ -90,6 +92,16 @@ public static void registerGuiNotifications() NotificationService.ACTION_SOUND, busyCallSoundHandler); + // Register dial notifications. + SoundNotificationHandler dialSoundHandler + = notificationService + .createSoundNotificationHandler(SoundProperties.DIALING, 0); + + notificationService.registerDefaultNotificationForEvent( + DIALING, + NotificationService.ACTION_SOUND, + dialSoundHandler); + // Register proactive notifications. notificationService.registerDefaultNotificationForEvent( PROACTIVE_NOTIFICATION, diff --git a/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java b/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java index a969b5b8a..edd5a5913 100644 --- a/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java +++ b/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java @@ -50,6 +50,8 @@ public final class SoundProperties public static final String BUSY; + public static final String DIALING; + public static final String CALL_SECURITY_ON; public static final String CALL_SECURITY_ERROR; @@ -84,6 +86,7 @@ public final class SoundProperties DIAL_DIEZ = resources.getSoundPath("DIAL_DIEZ"); DIAL_STAR = resources.getSoundPath("DIAL_STAR"); BUSY = resources.getSoundPath("BUSY"); + DIALING = resources.getSoundPath("DIAL"); CALL_SECURITY_ON = resources.getSoundPath("CALL_SECURITY_ON"); CALL_SECURITY_ERROR = resources.getSoundPath("CALL_SECURITY_ERROR"); }