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
d0ed94a9
Commit
d0ed94a9
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#1735] Add conditions to sdp update call if call declined
parent
ecbb8f6d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sflphone-common/src/sipvoiplink.cpp
+8
-1
8 additions, 1 deletion
sflphone-common/src/sipvoiplink.cpp
with
8 additions
and
1 deletion
sflphone-common/src/sipvoiplink.cpp
+
8
−
1
View file @
d0ed94a9
...
...
@@ -381,6 +381,7 @@ int SIPVoIPLink::sendRegister ( AccountID id )
tmp
=
"<sip:"
+
username
+
"@"
+
hostname
+
">"
;
pj_strdup2
(
_pool
,
&
aor
,
tmp
.
data
()
);
_debug
(
"<sip:%s@%s:%d>
\n
"
,
username
.
data
(),
_localExternAddress
.
data
(),
_localExternPort
);
sprintf
(
contactTmp
,
"<sip:%s@%s:%d>"
,
username
.
data
(),
_localExternAddress
.
data
(),
_localExternPort
);
pj_strdup2
(
_pool
,
&
contact
,
contactTmp
);
account
->
setContact
(
contactTmp
);
...
...
@@ -1068,6 +1069,7 @@ SIPVoIPLink::SIPStartCall ( SIPCall* call, const std::string& subject UNUSED )
// Generate the from URI
strFrom
=
"sip:"
+
account
->
getUsername
()
+
"@"
+
account
->
getHostname
();
_debug
(
" From: %s
\n
"
,
strFrom
.
c_str
());
// pjsip need the from and to information in pj_str_t format
pj_strdup2
(
_pool
,
&
from
,
strFrom
.
data
()
);
...
...
@@ -2057,6 +2059,9 @@ void call_on_media_update ( pjsip_inv_session *inv, pj_status_t status )
pjmedia_sdp_neg_get_active_local
(
inv
->
neg
,
&
r_sdp
);
call
=
reinterpret_cast
<
SIPCall
*>
(
inv
->
mod_data
[
getModId
()
]
);
if
(
!
call
){
_debug
(
"Call declined by peer, SDP negociation stopped
\n
"
);
return
;}
// Clean the resulting sdp offer to create a new one (in case of a reinvite)
call
->
getLocalSDP
()
->
clean_session_media
();
// Set the fresh negociated one
...
...
@@ -2068,6 +2073,8 @@ void call_on_media_update ( pjsip_inv_session *inv, pj_status_t status )
accId
=
Manager
::
instance
().
getAccountFromCall
(
call
->
getCallId
()
);
link
=
dynamic_cast
<
SIPVoIPLink
*>
(
Manager
::
instance
().
getAccountLink
(
accId
)
);
if
(
!
link
){
_debug
(
"No Voip Account Link, impossible to init RTP session with SDP info"
);
return
;}
if
(
call
->
getState
()
!=
Call
::
Hold
)
{
_debug
(
"Set media parameters in RTP session
\n
"
);
...
...
@@ -2092,7 +2099,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_
state
_changed --------------------- %i
\n
"
,
tsx
->
state
);
_debug
(
"--------------------- call_on_
tsx
_changed --------------------- %i
\n
"
,
tsx
->
state
);
if
(
tsx
->
role
==
PJSIP_ROLE_UAS
&&
tsx
->
state
==
PJSIP_TSX_STATE_TRYING
&&
pjsip_method_cmp
(
&
tsx
->
method
,
&
pjsip_refer_method
)
==
0
)
...
...
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