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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
3267e5f8
Commit
3267e5f8
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#2165] Debugging sip call failed
parent
298b37de
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-common/src/sip/sdp.cpp
+8
-0
8 additions, 0 deletions
sflphone-common/src/sip/sdp.cpp
sflphone-common/src/sip/sipvoiplink.cpp
+13
-3
13 additions, 3 deletions
sflphone-common/src/sip/sipvoiplink.cpp
with
21 additions
and
3 deletions
sflphone-common/src/sip/sdp.cpp
+
8
−
0
View file @
3267e5f8
...
@@ -175,16 +175,24 @@ int Sdp::create_initial_offer()
...
@@ -175,16 +175,24 @@ int Sdp::create_initial_offer()
status
=
create_local_offer
();
status
=
create_local_offer
();
if
(
status
!=
PJ_SUCCESS
)
{
if
(
status
!=
PJ_SUCCESS
)
{
_debug
(
" Error: Failled to create initial offer
\n
"
);
return
status
;
return
status
;
}
}
// Create the SDP negociator instance with local offer
// Create the SDP negociator instance with local offer
status
=
pjmedia_sdp_neg_create_w_local_offer
(
_pool
,
get_local_sdp_session
(),
&
_negociator
);
status
=
pjmedia_sdp_neg_create_w_local_offer
(
_pool
,
get_local_sdp_session
(),
&
_negociator
);
if
(
status
!=
PJ_SUCCESS
)
{
_debug
(
" Error: Failled to create an initial SDP negociator
\n
"
);
return
status
;
}
state
=
pjmedia_sdp_neg_get_state
(
_negociator
);
state
=
pjmedia_sdp_neg_get_state
(
_negociator
);
PJ_ASSERT_RETURN
(
status
==
PJ_SUCCESS
,
1
);
PJ_ASSERT_RETURN
(
status
==
PJ_SUCCESS
,
1
);
_debug
(
" Initial offer created succesfully
\n
"
);
return
PJ_SUCCESS
;
return
PJ_SUCCESS
;
}
}
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/sip/sipvoiplink.cpp
+
13
−
3
View file @
3267e5f8
...
@@ -357,7 +357,7 @@ std::string SIPVoIPLink::get_useragent_name (void)
...
@@ -357,7 +357,7 @@ std::string SIPVoIPLink::get_useragent_name (void)
void
void
SIPVoIPLink
::
getEvent
()
SIPVoIPLink
::
getEvent
()
{
{
// We have to register the external thread so it could access the pjsip framework
// We have to register the external thread so it could access the pjsip framework
s
if
(
!
pj_thread_is_registered
())
if
(
!
pj_thread_is_registered
())
pj_thread_register
(
NULL
,
desc
,
&
thread
);
pj_thread_register
(
NULL
,
desc
,
&
thread
);
...
@@ -1239,6 +1239,7 @@ SIPVoIPLink::SIPStartCall (SIPCall* call, const std::string& subject UNUSED)
...
@@ -1239,6 +1239,7 @@ SIPVoIPLink::SIPStartCall (SIPCall* call, const std::string& subject UNUSED)
status
=
pjsip_inv_send_msg
(
inv
,
tdata
);
status
=
pjsip_inv_send_msg
(
inv
,
tdata
);
if
(
status
!=
PJ_SUCCESS
)
{
if
(
status
!=
PJ_SUCCESS
)
{
_debug
(
" SIPStartCall: failed to send invite
\n
"
);
return
false
;
return
false
;
}
}
...
@@ -1632,6 +1633,8 @@ bool SIPVoIPLink::pjsip_init()
...
@@ -1632,6 +1633,8 @@ bool SIPVoIPLink::pjsip_init()
_localExternAddress
=
Manager
::
instance
().
getFirewallAddress
();
_localExternAddress
=
Manager
::
instance
().
getFirewallAddress
();
_localExternPort
=
Manager
::
instance
().
getFirewallPort
();
_localExternPort
=
Manager
::
instance
().
getFirewallPort
();
}
else
{
}
else
{
// Create a UDP listener meant for all accounts
// for which TLS was not enabled
_localExternAddress
=
_localIPAddress
;
_localExternAddress
=
_localIPAddress
;
_localExternPort
=
_localPort
;
_localExternPort
=
_localPort
;
errPjsip
=
createUDPServer
();
errPjsip
=
createUDPServer
();
...
@@ -1639,7 +1642,7 @@ bool SIPVoIPLink::pjsip_init()
...
@@ -1639,7 +1642,7 @@ bool SIPVoIPLink::pjsip_init()
// Create a UDP listener meant for all accounts
// Create a UDP listener meant for all accounts
// for which TLS was not enabled
// for which TLS was not enabled
errPjsip
=
createUDPServer
();
//
errPjsip = createUDPServer();
// If stun was not enabled an the above UDP server
// If stun was not enabled an the above UDP server
// could not be created, then give it another try
// could not be created, then give it another try
...
@@ -1809,6 +1812,8 @@ int SIPVoIPLink::createUDPServer (void)
...
@@ -1809,6 +1812,8 @@ int SIPVoIPLink::createUDPServer (void)
pjsip_host_port
a_name
;
pjsip_host_port
a_name
;
char
tmpIP
[
32
];
char
tmpIP
[
32
];
_debug
(
"Debug: createUDPServer called!
\n
"
);
// Init bound address to ANY
// Init bound address to ANY
pj_memset
(
&
bound_addr
,
0
,
sizeof
(
bound_addr
));
pj_memset
(
&
bound_addr
,
0
,
sizeof
(
bound_addr
));
...
@@ -2207,11 +2212,15 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
...
@@ -2207,11 +2212,15 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
SIPCall
*
call
=
NULL
;
SIPCall
*
call
=
NULL
;
call
=
reinterpret_cast
<
SIPCall
*>
(
inv
->
mod_data
[
_mod_ua
.
id
]);
call
=
reinterpret_cast
<
SIPCall
*>
(
inv
->
mod_data
[
_mod_ua
.
id
]);
_debug
(
" call_on_state_changed: call id %s
\n
"
,
call
->
getCallId
().
c_str
());
if
(
call
==
NULL
)
{
if
(
call
==
NULL
)
{
_debug
(
"Call is NULL in call_on_state_changed"
);
_debug
(
"Call is NULL in call_on_state_changed"
);
return
;
return
;
}
}
else
{
_debug
(
" call_on_state_changed: call id %s
\n
"
,
call
->
getCallId
().
c_str
());
_debug
(
" call_on_state_changed: call state %s
\n
"
,
invitationStateMap
[
call
->
getInvSession
()
->
state
]);
}
//Retrieve the body message
//Retrieve the body message
rdata
=
e
->
body
.
tsx_state
.
src
.
rdata
;
rdata
=
e
->
body
.
tsx_state
.
src
.
rdata
;
...
@@ -2239,6 +2248,7 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
...
@@ -2239,6 +2248,7 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
pjsip_evsub_state
ev_state
=
PJSIP_EVSUB_STATE_ACTIVE
;
pjsip_evsub_state
ev_state
=
PJSIP_EVSUB_STATE_ACTIVE
;
switch
(
call
->
getInvSession
()
->
state
)
{
switch
(
call
->
getInvSession
()
->
state
)
{
// switch (inv->state) {
case
PJSIP_INV_STATE_NULL
:
case
PJSIP_INV_STATE_NULL
:
...
...
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