Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-daemon
Commits
73e1a44b
Commit
73e1a44b
authored
Jan 24, 2005
by
llea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display name for From header
parent
5633ac9e
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
62 additions
and
29 deletions
+62
-29
src/audiodriversoss.cpp
src/audiodriversoss.cpp
+1
-0
src/audiortp.cpp
src/audiortp.cpp
+8
-5
src/configurationpanelui.cpp
src/configurationpanelui.cpp
+1
-1
src/configurationpanelui.h
src/configurationpanelui.h
+1
-1
src/global.h
src/global.h
+1
-1
src/manager.cpp
src/manager.cpp
+6
-0
src/manager.h
src/manager.h
+1
-0
src/mydisplay.cpp
src/mydisplay.cpp
+5
-0
src/mydisplay.h
src/mydisplay.h
+1
-0
src/phonebookui.cpp
src/phonebookui.cpp
+1
-1
src/phonebookui.h
src/phonebookui.h
+1
-1
src/qtGUImainwindow.cpp
src/qtGUImainwindow.cpp
+5
-5
src/sip.cpp
src/sip.cpp
+22
-7
src/tonegenerator.cpp
src/tonegenerator.cpp
+6
-5
src/url_inputui.cpp
src/url_inputui.cpp
+1
-1
src/url_inputui.h
src/url_inputui.h
+1
-1
No files found.
src/audiodriversoss.cpp
View file @
73e1a44b
...
...
@@ -296,6 +296,7 @@ AudioDriversOSS::writeBuffer (void) {
size_t
count
=
audio_buf
.
getSize
();
short
*
buf
=
(
short
*
)
audio_buf
.
getData
();
audio_buf_info
info
;
if
(
ioctl
(
audio_fd
,
SNDCTL_DSP_GETOSPACE
,
&
info
)
==
0
)
{
...
...
src/audiortp.cpp
View file @
73e1a44b
...
...
@@ -70,7 +70,9 @@ AudioRtp::createNewSession (SipCall *ca) {
RTXThread
=
new
AudioRtpRTX
(
ca
,
manager
->
audiodriver
,
manager
,
symetric
);
qDebug
(
"-- START SOUND --"
);
RTXThread
->
start
();
if
(
RTXThread
->
start
()
!=
0
)
{
return
-
1
;
}
return
0
;
}
...
...
@@ -83,7 +85,7 @@ AudioRtp::closeRtpSession (SipCall *ca) {
if
(
RTXThread
!=
NULL
)
{
// Wait for them...and delete.
//
RTXThread->join();
//RTXThread->join();
delete
RTXThread
;
RTXThread
=
NULL
;
}
...
...
@@ -182,7 +184,7 @@ AudioRtpRTX::run (void) {
} else {
qDebug("RTP(Recv): Added destination %s:%d",
remote_ip.getHostname(),
(unsigned short) ca->remote_sdp_audio_port)
(unsigned short) ca->remote_sdp_audio_port)
;
}
#endif
...
...
@@ -243,6 +245,7 @@ AudioRtpRTX::run (void) {
if
(
!
manager
->
mute
)
{
// i = audioDevice->readBuffer (320);
// data_from_mic = (short*)manager->audiodriver->audio_buf.getData();
// qDebug("audiortp data_from_mic 0x%d", data_from_mic);
i
=
audioDevice
->
readBuffer
(
data_from_mic
,
320
);
}
else
{
// When IP-phone user click on mute button, we read buffer of a
...
...
@@ -288,8 +291,8 @@ AudioRtpRTX::run (void) {
// Write decoded data to sound device
manager
->
audiodriver
->
audio_buf
.
resize
(
expandedSize
);
manager
->
audiodriver
->
audio_buf
.
setData
(
data_for_speakers
);
i
=
audioDevice
->
writeBuffer
(
data_for_speakers
,
expandedSize
);
//
i = audioDevice->writeBuffer ();
//
i = audioDevice->writeBuffer (data_for_speakers, expandedSize);
i
=
audioDevice
->
writeBuffer
();
delete
adu
;
...
...
src/configurationpanelui.cpp
View file @
73e1a44b
/****************************************************************************
** Form implementation generated from reading ui file 'configurationpanel.ui'
**
** Created:
Fri
Jan 2
1
17:
23:55
2005
** Created:
Mon
Jan 2
4
17:
46:09
2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
...
...
src/configurationpanelui.h
View file @
73e1a44b
/****************************************************************************
** Form interface generated from reading ui file 'configurationpanel.ui'
**
** Created:
Fri
Jan 2
1
17:
23:55
2005
** Created:
Mon
Jan 2
4
17:
46:09
2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
...
...
src/global.h
View file @
73e1a44b
...
...
@@ -24,7 +24,7 @@
#define PREFIX "/usr/local"
#endif
#define VERSION "0.
1
"
#define VERSION "0.
2
"
#define PROGNAME "SFLPhone"
#define SKINDIR "skins"
#define PIXDIR "pixmaps"
...
...
src/manager.cpp
View file @
73e1a44b
...
...
@@ -519,3 +519,9 @@ void
Manager
::
errorDisplay
(
char
*
error
)
{
gui
()
->
lcd
->
appendText
(
error
);
}
void
Manager
::
nameDisplay
(
char
*
name
)
{
gui
()
->
lcd
->
clearBuffer
();
gui
()
->
lcd
->
appendText
(
name
);
}
src/manager.h
View file @
73e1a44b
...
...
@@ -90,6 +90,7 @@ public:
void
startDialTone
(
void
);
void
congestion
(
bool
);
void
errorDisplay
(
char
*
);
void
nameDisplay
(
char
*
);
private:
bool
b_ringing
;
...
...
src/mydisplay.cpp
View file @
73e1a44b
...
...
@@ -370,6 +370,11 @@ MyDisplay::clear (void) {
setStatus
(
QString
(
FREE_STATUS
));
}
void
MyDisplay
::
clearBuffer
(
void
)
{
this
->
textBuffer
->
remove
(
0
,
this
->
textBuffer
->
length
());
}
void
MyDisplay
::
clear
(
const
QString
&
newstatus
)
{
// Remove everything in the buffer and set the new status.
...
...
src/mydisplay.h
View file @
73e1a44b
...
...
@@ -69,6 +69,7 @@ public slots:
void
appendText
(
const
char
*
);
void
appendText
(
const
QChar
&
);
void
clear
(
void
);
void
clearBuffer
(
void
);
void
clear
(
const
QString
&
);
void
backspace
(
void
);
...
...
src/phonebookui.cpp
View file @
73e1a44b
/****************************************************************************
** Form implementation generated from reading ui file 'phonebook.ui'
**
** Created:
Fri
Jan 2
1
17:
23:55
2005
** Created:
Mon
Jan 2
4
17:
46:08
2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
...
...
src/phonebookui.h
View file @
73e1a44b
/****************************************************************************
** Form interface generated from reading ui file 'phonebook.ui'
**
** Created:
Fri
Jan 2
1
17:
23:55
2005
** Created:
Mon
Jan 2
4
17:
46:08
2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
...
...
src/qtGUImainwindow.cpp
View file @
73e1a44b
...
...
@@ -1046,12 +1046,12 @@ QtGUIMainWindow::pressedKeySlot (int id) {
// Handle dtmf
key
->
startTone
(
code
);
key
->
generateDTMF
(
buf
,
SAMPLING_RATE
);
//
callmanager->audiodriver->audio_buf.resize(SAMPLING_RATE);
//
callmanager->audiodriver->audio_buf.setData (buf);
callmanager
->
audiodriver
->
audio_buf
.
resize
(
SAMPLING_RATE
);
callmanager
->
audiodriver
->
audio_buf
.
setData
(
buf
);
pulselen
=
Config
::
get
(
"Signalisations"
,
"DTMF.pulseLength"
,
250
);
//
callmanager->audiodriver->audio_buf.resize(pulselen * (OCTETS/1000));
a
=
callmanager
->
audiodriver
->
writeBuffer
(
buf
,
pulselen
*
(
OCTETS
/
1000
));
//
a = callmanager->audiodriver->writeBuffer();
callmanager
->
audiodriver
->
audio_buf
.
resize
(
pulselen
*
(
OCTETS
/
1000
));
//
a = callmanager->audiodriver->writeBuffer(buf, pulselen * (OCTETS/1000));
a
=
callmanager
->
audiodriver
->
writeBuffer
();
if
(
a
==
1
)
{
pressedKeySlot
(
id
);
}
else
{
...
...
src/sip.cpp
View file @
73e1a44b
...
...
@@ -290,8 +290,6 @@ int
SIP
::
checkURI
(
const
char
*
buffer
)
{
osip_uri_t
*
uri
;
int
i
;
char
*
dest
=
NULL
;
QString
qdest
;
// To parse a buffer containing a sip URI
i
=
osip_uri_init
(
&
uri
);
...
...
@@ -306,7 +304,6 @@ SIP::checkURI (const char *buffer) {
// Free memory
osip_uri_free
(
uri
);
osip_free
(
dest
);
return
0
;
}
...
...
@@ -326,6 +323,9 @@ SIP::checkUrl(char *url) {
qWarning
(
"Cannot parse url"
);
return
-
1
;
}
// Free memory
osip_from_free
(
to
);
return
0
;
}
...
...
@@ -421,7 +421,8 @@ SIP::setAuthentication (void) {
string
SIP
::
fromHeader
(
string
user
,
string
host
)
{
return
(
"sip:"
+
user
+
"@"
+
host
);
string
displayname
=
Config
::
gets
(
"Signalisations"
,
"SIP.fullName"
);
return
(
"
\"
"
+
displayname
+
"
\"
"
+
" <sip:"
+
user
+
"@"
+
host
+
">"
);
}
...
...
@@ -623,13 +624,16 @@ SIP::manageActions (int usedLine, int action) {
case
ONHOLD_CALL
:
call
[
usedLine
]
->
usehold
=
true
;
qDebug
(
"ON HOLD CALL 0x%d, usedLine = %d"
,
call
[
usedLine
],
usedLine
);
eXosip_lock
();
i
=
eXosip_on_hold_call
(
call
[
usedLine
]
->
did
);
eXosip_unlock
();
// Disable audio
call
[
usedLine
]
->
enable_audio
=
-
1
;
callmanager
->
closeSound
(
call
[
usedLine
]);
//call[usedLine]->enable_audio = -1;
//callmanager->closeSound(call[usedLine]);
call
[
usedLine
]
->
closedCall
();
break
;
// IP-Phone user is parking peer OFF HOLD
...
...
@@ -692,6 +696,7 @@ SIP::getEvent (void) {
eXosip_event_t
*
event
;
int
theline
=
-
1
;
int
curLine
;
char
*
name
;
static
int
countReg
=
0
;
event
=
eXosip_event_wait
(
0
,
50
);
...
...
@@ -719,6 +724,15 @@ SIP::getEvent (void) {
}
assert
(
theline
>=
0
);
assert
(
theline
<
NUMBER_OF_LINES
);
// Display the name which the call comes from
osip_from_t
*
from
;
osip_from_init
(
&
from
);
osip_from_parse
(
from
,
event
->
remote_uri
);
name
=
osip_from_get_displayname
(
from
);
callmanager
->
nameDisplay
(
name
);
callmanager
->
phLines
[
theline
]
->
text
=
QString
(
name
);
osip_from_free
(
from
);
if
(
call
[
theline
]
==
NULL
)
{
//callmanager->setCallInProgress(true);
callmanager
->
phLines
[
theline
]
->
setbInProgress
(
true
);
...
...
@@ -928,7 +942,8 @@ SIP::getEvent (void) {
qDebug
(
"<- (%i %i) INVITE (On Hold) from: %s"
,
event
->
cid
,
event
->
did
,
event
->
remote_uri
);
theline
=
findLineNumber
(
event
);
callmanager
->
closeSound
(
call
[
theline
]);
//callmanager->closeSound(call[theline]);
call
[
theline
]
->
closedCall
();
call
[
theline
]
->
onholdCall
(
event
);
break
;
...
...
src/tonegenerator.cpp
View file @
73e1a44b
...
...
@@ -38,13 +38,14 @@ ToneThread::ToneThread (Manager *mngr, short *buf, int total) {
}
ToneThread
::~
ToneThread
(
void
)
{
this
->
terminate
();
}
void
ToneThread
::
run
(
void
)
{
while
(
mngr
->
tonezone
)
{
//
mngr->audiodriver->writeBuffer();
mngr
->
audiodriver
->
writeBuffer
(
buf
,
totalbytes
);
mngr
->
audiodriver
->
writeBuffer
();
//
mngr->audiodriver->writeBuffer(buf, totalbytes);
}
}
...
...
@@ -229,13 +230,13 @@ ToneGenerator::toneHandle (int idr) {
// New thread for the tone
if
(
tonethread
==
NULL
)
{
tonethread
=
new
ToneThread
(
manager
,
buf
,
totalbytes
);
//
manager->audiodriver->audio_buf.resize(totalbytes);
//
manager->audiodriver->audio_buf.setData (buf);
manager
->
audiodriver
->
audio_buf
.
resize
(
totalbytes
);
manager
->
audiodriver
->
audio_buf
.
setData
(
buf
);
tonethread
->
start
();
}
if
(
!
manager
->
tonezone
)
{
tonethread
->
join
();
//
tonethread->join();
if
(
tonethread
!=
NULL
)
{
delete
tonethread
;
tonethread
=
NULL
;
...
...
src/url_inputui.cpp
View file @
73e1a44b
/****************************************************************************
** Form implementation generated from reading ui file 'url_input.ui'
**
** Created:
Fri
Jan 2
1
17:
23:55
2005
** Created:
Mon
Jan 2
4
17:
46:09
2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
...
...
src/url_inputui.h
View file @
73e1a44b
/****************************************************************************
** Form interface generated from reading ui file 'url_input.ui'
**
** Created:
Fri
Jan 2
1
17:
23:55
2005
** Created:
Mon
Jan 2
4
17:
46:09
2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
...
...
Write
Preview
Markdown
is supported
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