Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
114c25e7
Commit
114c25e7
authored
7 years ago
by
Jenkins2
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "res_pjsip_session: properly handle SDP from a forked call with early media"
parents
e5a6c72c
3fb26df4
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
res/res_pjsip_session.c
+23
-8
23 additions, 8 deletions
res/res_pjsip_session.c
with
23 additions
and
8 deletions
res/res_pjsip_session.c
+
23
−
8
View file @
114c25e7
...
...
@@ -876,15 +876,30 @@ static int handle_negotiated_sdp(struct ast_sip_session *session, const pjmedia_
struct
ast_stream_topology
*
topology
;
unsigned
int
changed
=
0
;
/* This situation can legitimately happen when an SDP is received in a
* 183 Session Progress message. In that case, everything's been done
* by the time this function is called and there are no more pending
* streams.
*/
if
(
!
session
->
pending_media_state
->
topology
)
{
ast_debug
(
1
,
"Pending topology was NULL for channel '%s'
\n
"
,
session
->
channel
?
ast_channel_name
(
session
->
channel
)
:
"unknown"
);
return
0
;
if
(
session
->
active_media_state
->
topology
)
{
/*
* This happens when we have negotiated media after receiving a 183,
* and we're now receiving a 200 with a new SDP. In this case, there
* is active_media_state, but the pending_media_state has been reset.
*/
struct
ast_sip_session_media_state
*
active_media_state_clone
;
active_media_state_clone
=
ast_sip_session_media_state_clone
(
session
->
active_media_state
);
if
(
!
active_media_state_clone
)
{
ast_log
(
LOG_WARNING
,
"Unable to clone active media state for channel '%s'
\n
"
,
session
->
channel
?
ast_channel_name
(
session
->
channel
)
:
"unknown"
);
return
-
1
;
}
ast_sip_session_media_state_free
(
session
->
pending_media_state
);
session
->
pending_media_state
=
active_media_state_clone
;
}
else
{
ast_log
(
LOG_WARNING
,
"No pending or active media state for channel '%s'
\n
"
,
session
->
channel
?
ast_channel_name
(
session
->
channel
)
:
"unknown"
);
return
-
1
;
}
}
/* If we're handling negotiated streams, then we should already have set
...
...
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