res_pjsip: return all codecs on a re-INVITE without SDP

Currently chan_pjsip on receiving a re-INVITE without SDP will only
return the codecs that are previously negotiated and not offering
all enabled codecs.

This causes interoperability issues with different equipment (e.g.
from Cisco) for some of our customers and probably also in other
scenarios involving 3PCC infrastructure.

According to RFC 3261, section 14.2 we SHOULD return all codecs
on a re-INVITE without SDP

The PR proposes a new parameter to configure this behaviour:
all_codecs_on_empty_reinvite. It includes the code, documentation,
alembic migrations, CHANGES file and example configuration additions.

ASTERISK-30193 #close

Change-Id: I69763708d5039d512f391e296ee8a4d43a1e2148
This commit is contained in:
Henning Westerholt
2022-08-26 08:59:16 +00:00
committed by George Joseph
parent 005b6c8d50
commit 7b2d3a6411
7 changed files with 131 additions and 12 deletions

View File

@@ -3902,4 +3902,11 @@ const pj_str_t *ast_sip_pjsip_uri_get_hostname(pjsip_uri *uri);
*/
struct pjsip_param *ast_sip_pjsip_uri_get_other_param(pjsip_uri *uri, const pj_str_t *param_str);
/*!
* \brief Retrieve the system setting 'all_codecs_on_empty_reinvite'.
*
* \retval non zero if we should return all codecs on empty re-INVITE
*/
unsigned int ast_sip_get_all_codecs_on_empty_reinvite(void);
#endif /* _RES_PJSIP_H */