summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorScott Griepentrog <sgriepentrog@digium.com>2014-01-17 21:33:26 +0000
committerScott Griepentrog <sgriepentrog@digium.com>2014-01-17 21:33:26 +0000
commit2b14601bdc3a5a98095e25b3b70ec7908c908308 (patch)
treea5233f6a22c2781747dad2b907ffc40f91b0dea6 /include/asterisk
parent2704b49c1b038ffd4a6a413b9973814bee7a42b3 (diff)
pjsip: fix support for allow=all
This change adds improvements to support for allow=all in pjsip.conf so that it functions as intended. Previously, the allow/disallow socery configuration would set & clear codecs from the media.codecs and media.prefs list, but if all was specified the prefs list was not updated. Then a call would fail when create_outgoing_sdp_stream() created an SDP with no audio codecs. A new function ast_codec_pref_append_all() is provided to add all codecs to the prefs list - only those not already on the list. This enables the configuration to specify a codec preference, but still add all codecs, and even then remove some codecs, as shown in this example: allow = ulaw, alaw, all, !g729, !g723 Also, the display order of allow in cli output is updated to match the configuration by using prefs instead of caps when generating a human readable string. Finally, a change to create_outgoing_sdp_stream() skips a codec when it does not have a payload code instead of the call failing. (closes issue ASTERISK-23018) Reported by: xrobau Review: https://reviewboard.asterisk.org/r/3131/ ........ Merged revisions 405875 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/format_pref.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asterisk/format_pref.h b/include/asterisk/format_pref.h
index 9a7e06741..f5c3c22a7 100644
--- a/include/asterisk/format_pref.h
+++ b/include/asterisk/format_pref.h
@@ -69,6 +69,9 @@ struct ast_format *ast_codec_pref_index(struct ast_codec_pref *pref, int index,
/*! \brief Remove audio a codec from a preference list */
void ast_codec_pref_remove(struct ast_codec_pref *pref, struct ast_format *format);
+/*! \brief Append all codecs to a preference list, without disturbing existing order */
+void ast_codec_pref_append_all(struct ast_codec_pref *pref);
+
/*! \brief Append a audio codec to a preference list, removing it first if it was already there
*/
int ast_codec_pref_append(struct ast_codec_pref *pref, struct ast_format *format);