test_res_pjsip_session_caps: Create unit test

This unit test runs through combinations of...
	* Local codecs
	* Remote Codecs
	* Codec Preference
	* Incoming/Outgoing

A few new APIs were created to make it easier to test
the functionality but didn't result in any actual
functional change.

ASTERISK_28777

Change-Id: Ic8957c43e7ceeab0e9272af60ea53f056164f164
This commit is contained in:
George Joseph
2020-03-25 11:51:32 -06:00
parent 2ee455958e
commit 7ba6d43083
5 changed files with 215 additions and 13 deletions

View File

@@ -3254,6 +3254,19 @@ int ast_sip_str_to_dtmf(const char *dtmf_mode);
*/
const char *ast_sip_call_codec_pref_to_str(struct ast_flags pref);
/*!
* \brief Convert a call codec preference string to preference flags
* \since 18.0.0
*
* \param pref A pointer to an ast_flags structure to receive the preference flags
* \param pref_str The call codec preference setting string
* \param is_outgoing Is for outgoing calls?
*
* \retval 0 The string was parsed successfully
* \retval -1 The string option was invalid
*/
int ast_sip_call_codec_str_to_pref(struct ast_flags *pref, const char *pref_str, int is_outgoing);
/*!
* \brief Transport shutdown monitor callback.
* \since 13.18.0