Skip to content
Snippets Groups Projects
Commit 4aff42b2 authored by Alexander Traud's avatar Alexander Traud Committed by Friendly Automation
Browse files

chan_sip: SDP: Reject audio streams correctly.

This completes the fix for ASTERISK_24543. Only when the call is an
outgoing call, consult and append the configured format capabilities
(p->caps). When all audio formats got rejected the negotiated format
capabilities (p->jointcaps) contain no audio formats for incoming
calls. This is required when there are other accepted media streams.

ASTERISK-29258

Change-Id: I8bab31c7f3f3700dce204b429ad238a524efebb9
parent 05472da9
No related branches found
No related tags found
3 merge requests!138Merge branch asterisk-20.3.0 into devel properly,!123Merge asterisk '20.3.0' into devel,!118Draft: manager: AOC-S support for AOCMessage
...@@ -13608,10 +13608,11 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int ...@@ -13608,10 +13608,11 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int
ast_format_cap_append_from_cap(tmpcap, p->jointcaps, AST_MEDIA_TYPE_UNKNOWN); ast_format_cap_append_from_cap(tmpcap, p->jointcaps, AST_MEDIA_TYPE_UNKNOWN);
} }
   
/* Check if we need audio */ /* Check if we need audio in this call */
if (ast_format_cap_has_type(tmpcap, AST_MEDIA_TYPE_AUDIO) needaudio = ast_format_cap_has_type(tmpcap, AST_MEDIA_TYPE_AUDIO);
|| ast_format_cap_has_type(p->caps, AST_MEDIA_TYPE_AUDIO)) { if (!needaudio && p->outgoing_call) {
needaudio = TRUE; /* p->caps are added conditionally, see below "Finally our remain..." */
needaudio = ast_format_cap_has_type(p->caps, AST_MEDIA_TYPE_AUDIO);
} }
   
/* Check if we need video in this call */ /* Check if we need video in this call */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment