Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
a9678648
Commit
a9678648
authored
19 years ago
by
yanmorin
Browse files
Options
Downloads
Patches
Plain Diff
Two variables in sflphonedrc configuration file to disable tone or dtmf sound
parent
c2575e84
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/managerimpl.cpp
+13
-2
13 additions, 2 deletions
src/managerimpl.cpp
src/user_cfg.h
+4
-3
4 additions, 3 deletions
src/user_cfg.h
with
17 additions
and
5 deletions
src/managerimpl.cpp
+
13
−
2
View file @
a9678648
/*
* Copyright (C) 2004-200
5
Savoir-Faire Linux inc.
* Copyright (C) 2004-200
6
Savoir-Faire Linux inc.
* Author: Yan Morin <yan.morin@savoirfairelinux.com>
* Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com>
*
...
...
@@ -588,6 +588,8 @@ bool
ManagerImpl
::
playDtmf
(
char
code
)
{
stopTone
();
int
hasToPlayTone
=
getConfigInt
(
SIGNALISATION
,
PLAY_DTMF
);
if
(
!
hasToPlayTone
)
return
false
;
// length in milliseconds
int
pulselen
=
getConfigInt
(
SIGNALISATION
,
PULSE_LENGTH
);
...
...
@@ -612,7 +614,6 @@ ManagerImpl::playDtmf(char code)
// copy the sound...
if
(
_dtmfKey
->
generateDTMF
(
_buf
,
size
*
outChannel
)
)
{
int
k
;
// Put buffer to urgentRingBuffer
// put the size in bytes...
...
...
@@ -980,6 +981,9 @@ ManagerImpl::registrationFailed()
*/
bool
ManagerImpl
::
playATone
(
Tone
::
TONEID
toneId
)
{
int
hasToPlayTone
=
getConfigInt
(
SIGNALISATION
,
PLAY_TONES
);
if
(
!
hasToPlayTone
)
return
false
;
if
(
_telephoneTone
!=
0
)
{
_toneMutex
.
enterMutex
();
_telephoneTone
->
setCurrentTone
(
toneId
);
...
...
@@ -999,6 +1003,9 @@ ManagerImpl::playATone(Tone::TONEID toneId) {
*/
void
ManagerImpl
::
stopTone
()
{
int
hasToPlayTone
=
getConfigInt
(
SIGNALISATION
,
PLAY_TONES
);
if
(
!
hasToPlayTone
)
return
;
try
{
getAudioDriver
()
->
stopStream
();
}
catch
(...)
{
...
...
@@ -1048,6 +1055,9 @@ ManagerImpl::ringback () {
void
ManagerImpl
::
ringtone
()
{
int
hasToPlayTone
=
getConfigInt
(
SIGNALISATION
,
PLAY_TONES
);
if
(
!
hasToPlayTone
)
return
;
std
::
string
ringchoice
=
getConfigString
(
AUDIO
,
RING_CHOICE
);
//if there is no / inside the path
if
(
ringchoice
.
find
(
DIR_SEPARATOR_CH
)
==
std
::
string
::
npos
)
{
...
...
@@ -1224,6 +1234,7 @@ ManagerImpl::initConfigFile (void)
fill_config_str
(
HOST_PART
,
EMPTY_FIELD
);
fill_config_str
(
PROXY
,
EMPTY_FIELD
);
fill_config_int
(
AUTO_REGISTER
,
YES_STR
);
fill_config_int
(
PLAY_DTMF
,
YES_STR
);
fill_config_int
(
PLAY_TONES
,
YES_STR
);
fill_config_int
(
PULSE_LENGTH
,
DFT_PULSE_LENGTH_STR
);
fill_config_int
(
SEND_DTMF_AS
,
SIP_INFO_STR
);
...
...
This diff is collapsed.
Click to expand it.
src/user_cfg.h
+
4
−
3
View file @
a9678648
/*
*
* Copyright (C) 2004-200
5
Savoir-Faire Linux inc.
/*
* Copyright (C) 2004-200
6
Savoir-Faire Linux inc.
* Author: Yan Morin <yan.morin@savoirfairelinux.com>
* Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com>
*
...
...
@@ -48,7 +48,8 @@
#define HOST_PART "SIP.hostPart"
#define PROXY "SIP.proxy"
#define AUTO_REGISTER "SIP.autoregister"
#define PLAY_TONES "DTMF.playTones"
#define PLAY_DTMF "DTMF.playDtmf"
#define PLAY_TONES "DTMF.playTones"
#define PULSE_LENGTH "DTMF.pulseLength"
#define SEND_DTMF_AS "DTMF.sendDTMFas"
#define STUN_SERVER "STUN.STUNserver"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment