Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
825d09a5
Commit
825d09a5
authored
Nov 05, 2009
by
Alexandre Savard
Browse files
[#2392] Fix ringtone during call in IAX
parent
47d78bbc
Changes
5
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/audio/audiortp/AudioRtpSession.h
View file @
825d09a5
...
...
@@ -398,8 +398,8 @@ namespace sfl {
if
(
_manager
->
incomingCallWaiting
()
>
0
)
{
int
countTime_modulo
=
countTime
%
4000
;
_debug
(
"countTime: %i
\n
"
,
countTime
);
_debug
(
"countTime_modulo: %i
\n
"
,
countTime_modulo
);
//
_debug("countTime: %i\n", countTime);
//
_debug("countTime_modulo: %i\n", countTime_modulo);
if
((
countTime_modulo
-
countTime
)
<
0
)
{
_manager
->
notificationIncomingCall
();
}
...
...
sflphone-common/src/iax/iaxvoiplink.cpp
View file @
825d09a5
...
...
@@ -47,6 +47,7 @@
_evThread
=
new
EventThread
(
this
);
_regSession
=
NULL
;
_nextRefreshStamp
=
0
;
countTime
=
0
;
// to get random number for RANDOM_PORT
srand
(
time
(
NULL
));
...
...
@@ -256,6 +257,20 @@ IAXVoIPLink::getEvent()
sendRegister
(
""
);
}
// Notify (with a beep) an incoming call when there is already a call
countTime
+=
3
;
if
((
Manager
::
instance
().
incomingCallWaiting
()
>
0
)
&&
Manager
::
instance
().
hasCurrentCall
())
{
int
countTime_modulo
=
countTime
%
4000
;
// _debug("countTime: %i\n", countTime);
// _debug("countTime_modulo: %i\n", countTime_modulo);
if
((
countTime_modulo
-
countTime
)
<
0
)
{
Manager
::
instance
().
notificationIncomingCall
();
}
countTime
=
countTime_modulo
;
}
// thread wait 3 millisecond
_evThread
->
sleep
(
3
);
...
...
sflphone-common/src/iax/iaxvoiplink.h
View file @
825d09a5
...
...
@@ -298,6 +298,9 @@ class IAXVoIPLink : public VoIPLink
/* URL hook */
UrlHook
*
urlhook
;
/** Counter for IncomingCallNotification */
int
countTime
;
};
#endif
sflphone-common/src/managerimpl.cpp
View file @
825d09a5
...
...
@@ -189,7 +189,7 @@ ManagerImpl::isCurrentCall (const CallID& callId)
bool
ManagerImpl
::
hasCurrentCall
()
{
_debug
(
"ManagerImpl::hasCurrentCall current call ID = %s
\n
"
,
_currentCallId2
.
c_str
());
//
_debug ("ManagerImpl::hasCurrentCall current call ID = %s\n", _currentCallId2.c_str());
if
(
_currentCallId2
!=
""
)
{
return
true
;
...
...
sflphone-common/src/managerimpl.h
View file @
825d09a5
...
...
@@ -1097,12 +1097,6 @@ class ManagerImpl {
*/
void
initVolume
();
/**
* Tell if there is a current call processed
* @return bool True if there is a current call
*/
bool
hasCurrentCall
();
/**
* Switch of current call id
* @param id The new callid
...
...
@@ -1264,6 +1258,12 @@ class ManagerImpl {
public:
/**
* Tell if there is a current call processed
* @return bool True if there is a current call
*/
bool
hasCurrentCall
();
/**
* Return the current DBusManagerImpl
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment