]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_session: Apply intention behind requested formats.
authorJoshua C. Colp <jcolp@sangoma.com>
Mon, 23 Mar 2020 10:49:41 +0000 (07:49 -0300)
committerJoshua Colp <jcolp@sangoma.com>
Thu, 26 Mar 2020 16:54:05 +0000 (11:54 -0500)
commite181cbde6314dab4561bed7d54a7f35369e38ef8
tree8a42c81d055ff06d51685d30ab608ab4fbb358c4
parent4b2729e89dece563d24168d401f5ab022fecdfc3
res_pjsip_session: Apply intention behind requested formats.

When an outgoing channel is created a list of formats may
optionally be provided which is used as a request that the
formats be used if possible. If an endpoint is not configured
for any of the formats we ignore this request and use what is
configured. This has the side effect of also including other
stream types (such as video) that were not present in the
requested formats.

This change makes it so that the intention of the request is
preserved - that is if only an audio format is requested then
even if there is no joint audio format between the request and
the configuration we will still only place an audio stream in
the outgoing call.

ASTERISK-28787

Change-Id: Ia54c0c63e94aca176169b9bae4bb8a8380ea245f
doc/CHANGES-staging/res_pjsip_session_codecs.md [new file with mode: 0644]
res/res_pjsip_session.c