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
50d7e232
Commit
50d7e232
authored
Jul 22, 2009
by
pierre-luc
Browse files
Cleaned up debug messages.
parent
9dbc5062
Changes
5
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/call.cpp
View file @
50d7e232
...
...
@@ -39,16 +39,12 @@ Call::Call (const CallID& id, Call::CallType type)
SOUND_FORMAT
soundFormat
=
INT16
;
recAudio
.
setRecordingOption
(
fileType
,
soundFormat
,
44100
,
Manager
::
instance
().
getConfigString
(
AUDIO
,
RECORD_PATH
),
id
);
// _debug("CALL::Constructor for this clss is called \n");
}
Call
::~
Call
()
{
// _debug("CALL::~Call(): Destructor for this clss is called \n");
if
(
recAudio
.
isOpenFile
())
{
// _debug("CALL::~Call(): A recording file is open, close it \n");
recAudio
.
closeFile
();
}
}
...
...
sflphone-common/src/managerimpl.cpp
View file @
50d7e232
...
...
@@ -350,7 +350,7 @@ ManagerImpl::hangupCall (const CallID& id)
int
nbCalls
=
getCallList
().
size
();
_debug
(
"
nbCalls %i
\n
"
,
nbCalls
);
_debug
(
"
hangupCall: callList is of size %i call(s)
\n
"
,
nbCalls
);
// stop stream
if
(
!
(
nbCalls
>
1
))
...
...
@@ -1422,7 +1422,7 @@ ManagerImpl::setActiveCodecList (const std::vector< std::string >& list)
_codecDescriptorMap
.
saveActiveCodecs
(
list
);
// setConfig
std
::
string
s
=
serialize
(
list
);
printf
(
"%s
\n
"
,
s
.
c_str
());
_debug
(
"Setting codec with payload number %s to the active list
\n
"
,
s
.
c_str
());
setConfig
(
"Audio"
,
"ActiveCodecs"
,
s
);
}
...
...
@@ -1467,7 +1467,7 @@ ManagerImpl::serialize (std::vector<std::string> v)
std
::
vector
<
std
::
string
>
ManagerImpl
::
getActiveCodecList
(
void
)
{
_debug
(
"
G
et
Active
c
odec
s l
ist
\n
"
);
_debug
(
"
ManagerImpl::g
etActive
C
odec
L
ist
\n
"
);
std
::
vector
<
std
::
string
>
v
;
CodecOrder
active
=
_codecDescriptorMap
.
getActiveCodecs
();
unsigned
int
i
=
0
;
...
...
@@ -1477,7 +1477,7 @@ ManagerImpl::getActiveCodecList (void)
std
::
stringstream
ss
;
ss
<<
active
[
i
];
v
.
push_back
(
(
ss
.
str
()).
data
());
_debug
(
"
%s
\n
"
,
ss
.
str
().
data
());
_debug
(
"
Codec with payload number %s is active
\n
"
,
ss
.
str
().
data
());
i
++
;
}
...
...
@@ -2709,7 +2709,7 @@ ManagerImpl::loadAccountMap()
}
if
(
tmpAccount
!=
NULL
)
{
_debug
(
" %s
\n
"
,
iter
->
c_str
());
_debug
(
"
Loading account
%s
\n
"
,
iter
->
c_str
());
_accountMap
[
iter
->
c_str
()
]
=
tmpAccount
;
nbAccount
++
;
}
...
...
@@ -2775,7 +2775,6 @@ ManagerImpl::getAccountIdFromNameAndServer (const std::string& userName, const s
for
(
iter
=
_accountMap
.
begin
();
iter
!=
_accountMap
.
end
();
++
iter
)
{
_debug
(
"for : account = %s
\n
"
,
iter
->
first
.
c_str
());
account
=
dynamic_cast
<
SIPAccount
*>
(
iter
->
second
);
_debug
(
"account != NULL = %i
\n
"
,
(
account
!=
NULL
));
if
(
account
!=
NULL
)
{
if
(
account
->
fullMatch
(
userName
,
server
))
{
...
...
sflphone-common/src/sdp.cpp
View file @
50d7e232
...
...
@@ -477,7 +477,7 @@ void Sdp::set_local_media_capabilities ()
// Clean it first
_local_media_cap
.
clear
();
_debug
(
"Fetch local media capabilities
..........
%i
\n
"
,
get_local_extern_audio_port
());
_debug
(
"Fetch local media capabilities
. Local extern audio port:
%i
\n
"
,
get_local_extern_audio_port
());
/* Only one audio media used right now */
audio
=
new
sdpMedia
(
MIME_TYPE_AUDIO
);
...
...
sflphone-common/src/sipcall.cpp
View file @
50d7e232
...
...
@@ -33,7 +33,7 @@ SIPCall::SIPCall (const CallID& id, Call::CallType type, pj_pool_t *pool) : Call
,
_local_sdp
(
0
)
{
_local_sdp
=
new
Sdp
(
pool
);
_debug
(
"SIPCALL::Constructor for this clss is called
\n
"
);
_debug
(
"SIPCALL::Constructor for this cl
a
ss is called
\n
"
);
}
SIPCall
::~
SIPCall
()
...
...
@@ -41,7 +41,7 @@ SIPCall::~SIPCall()
delete
_local_sdp
;
_local_sdp
=
0
;
_debug
(
"SIPCALL::Destructor for this clss is called
\n
"
);
_debug
(
"SIPCALL::Destructor for this cl
a
ss is called
\n
"
);
}
...
...
sflphone-common/src/sipvoiplink.cpp
View file @
50d7e232
...
...
@@ -32,6 +32,28 @@
#define CAN_REINVITE 1
static
char
*
invitationStateMap
[]
=
{
"PJSIP_INV_STATE_NULL"
,
"PJSIP_INV_STATE_CALLING"
,
"PJSIP_INV_STATE_INCOMING"
,
"PJSIP_INV_STATE_EARLY"
,
"PJSIP_INV_STATE_CONNECTING"
,
"PJSIP_INV_STATE_CONFIRMED"
,
"PJSIP_INV_STATE_DISCONNECTED"
};
static
char
*
transactionStateMap
[]
=
{
"PJSIP_TSX_STATE_NULL"
,
"PJSIP_TSX_STATE_CALLING"
,
"PJSIP_TSX_STATE_TRYING"
,
"PJSIP_TSX_STATE_PROCEEDING"
,
"PJSIP_TSX_STATE_COMPLETED"
,
"PJSIP_TSX_STATE_CONFIRMED"
,
"PJSIP_TSX_STATE_TERMINATED"
,
"PJSIP_TSX_STATE_DESTROYED"
,
"PJSIP_TSX_STATE_MAX"
};
struct
result
{
pj_status_t
status
;
...
...
@@ -574,7 +596,7 @@ SIPVoIPLink::newOutgoingCall (const CallID& id, const std::string& toUrl)
setCallAudioLocal
(
call
,
getLocalIPAddress
(),
useStun
(),
getStunServer
());
try
{
_debug
(
"C
REATE NEW RTP SESSION FROM NEWOUTGOINGCALL
\n
"
);
_debug
(
"C
reating new rtp session in newOutgoingCall
\n
"
);
_audiortp
->
createNewSession
(
call
);
}
catch
(...)
{
_debug
(
"Failed to create rtp thread from newOutGoingCall
\n
"
);
...
...
@@ -1154,12 +1176,10 @@ SIPVoIPLink::SIPStartCall (SIPCall* call, const std::string& subject UNUSED)
strTo
=
getSipTo
(
call
->
getPeerNumber
(),
account
->
getHostname
());
_debug
(
" To: %s
\n
"
,
strTo
.
data
());
// Generate the from URI
strFrom
=
"sip:"
+
account
->
getUsername
()
+
"@"
+
account
->
getHostname
();
_debug
(
"
From: %s
\n
"
,
strFrom
.
c_str
());
_debug
(
"
Placing new call:
\n
To: %s
\n
From: %s
\n
"
,
strTo
.
data
()
,
strFrom
.
c_str
());
// pjsip need the from and to information in pj_str_t format
pj_strdup2
(
_pool
,
&
from
,
strFrom
.
data
());
...
...
@@ -1929,7 +1949,7 @@ void SIPVoIPLink::handle_reinvite (SIPCall *call)
// This callback is called when the invite session state has changed
void
call_on_state_changed
(
pjsip_inv_session
*
inv
,
pjsip_event
*
e
)
{
_debug
(
"
---------------------
call_on_state_changed
---------------------
%
i
\n
"
,
inv
->
state
);
_debug
(
"call_on_state_changed
to state
%
s
\n
"
,
invitationStateMap
[
inv
->
state
]
);
SIPCall
*
call
;
AccountID
accId
;
...
...
@@ -2039,7 +2059,7 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
link
->
SIPCallAnswered
(
call
,
rdata
);
}
else
if
(
inv
->
state
==
PJSIP_INV_STATE_DISCONNECTED
)
{
_debug
(
"
------------------- Call disconnected ---------------------
\n
"
);
_debug
(
"
Invitation falled in state
\"
disconnected
\"
.
\n
"
);
_debug
(
"State: %i, Disconnection cause: %i
\n
"
,
inv
->
state
,
inv
->
cause
);
switch
(
inv
->
cause
)
{
...
...
@@ -2082,7 +2102,7 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
// This callback is called after SDP offer/answer session has completed.
void
call_on_media_update
(
pjsip_inv_session
*
inv
,
pj_status_t
status
)
{
_debug
(
"
--------------------- call_on_media_update ---------------------
\n
"
);
_debug
(
"
call_on_media_update
\n
"
);
const
pjmedia_sdp_session
*
local_sdp
;
const
pjmedia_sdp_session
*
remote_sdp
;
...
...
@@ -2140,8 +2160,7 @@ void call_on_forked (pjsip_inv_session *inv, pjsip_event *e)
void
call_on_tsx_changed
(
pjsip_inv_session
*
inv
,
pjsip_transaction
*
tsx
,
pjsip_event
*
e
)
{
_debug
(
"--------------------- call_on_tsx_changed --------------------- %i
\n
"
,
tsx
->
state
);
_debug
(
"call_on_tsx_changed to state %s
\n
"
,
transactionStateMap
[
tsx
->
state
]);
if
(
tsx
->
role
==
PJSIP_ROLE_UAS
&&
tsx
->
state
==
PJSIP_TSX_STATE_TRYING
&&
pjsip_method_cmp
(
&
tsx
->
method
,
&
pjsip_refer_method
)
==
0
)
{
...
...
@@ -2244,7 +2263,7 @@ mod_on_rx_request (pjsip_rx_data *rdata)
userName
=
std
::
string
(
sip_uri
->
user
.
ptr
,
sip_uri
->
user
.
slen
);
server
=
std
::
string
(
sip_uri
->
host
.
ptr
,
sip_uri
->
host
.
slen
);
std
::
cout
<<
userName
<<
" ------------------ "
<<
server
<<
std
::
endl
;
_debug
(
"mod_on_rx_request: %s@%s
\n
"
,
userName
.
c_str
(),
server
.
c_str
())
;
// Get the account id of callee from username and server
account_id
=
Manager
::
instance
().
getAccountIdFromNameAndServer
(
userName
,
server
);
...
...
@@ -2433,7 +2452,7 @@ mod_on_rx_request (pjsip_rx_data *rdata)
pj_bool_t
mod_on_rx_response
(
pjsip_rx_data
*
rdata
UNUSED
)
{
_debug
(
"Mod on rx response"
);
return
PJ_SUCCESS
;
}
...
...
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