asterisk/include/asterisk
Scott Griepentrog 2b14601bdc 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
2014-01-17 21:33:26 +00:00
..
doxygen Fix some doxygen bridging file references. 2013-08-16 18:34:31 +00:00
_private.h ARI: Add subscription support 2013-10-04 16:01:48 +00:00
abstract_jb.h Merge in the bridge_construction branch to make the system use the Bridging API. 2013-05-21 18:00:22 +00:00
acl.h res_pjsip: AMI commands and events. 2013-11-23 17:26:57 +00:00
adsi.h Multiple revisions 369323-369324 2012-06-25 15:55:25 +00:00
ael_structs.h Merged revisions 136726 via svnmerge from 2008-08-08 00:48:35 +00:00
agi.h Remove the old stub files, preferring the optional_api method. 2010-07-14 20:48:59 +00:00
alaw.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
aoc.h channel locking: Add locking for channel snapshot creation 2013-12-18 20:33:37 +00:00
app.h Voicemail: Remove mailbox identifier format (box@context) assumptions in the system. 2013-12-19 16:52:43 +00:00
ari.h res_ari: Fix various memory leaks. 2014-01-12 22:24:27 +00:00
ast_expr.h Merge str_substitution branch. 2009-04-29 18:53:01 +00:00
ast_version.h Rename version.h to ast_version.h. Next, I will be re-adding version.h as an 2008-02-26 20:02:14 +00:00
astdb.h astdb: Tweak some doxygen comments. 2013-11-27 17:32:29 +00:00
astmm.h Fix memory corruption when trying to get "core show locks". 2013-08-23 18:07:40 +00:00
astobj.h Merged revisions 129970 via svnmerge from 2008-07-11 14:22:44 +00:00
astobj2.h astobj2: Correct ao2_iterator opacity violations 2014-01-09 20:34:19 +00:00
astosp.h 1. Re-format the code. 2006-11-15 20:55:17 +00:00
audiohook.h Minor optimizations. 2013-07-19 23:30:10 +00:00
autochan.h Fix a deadlock that occurred due to a conflict of masquerades. 2013-12-19 17:45:21 +00:00
autoconfig.h.in res_pjsip_session: Add support for PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE flag. 2013-12-03 18:01:36 +00:00
backtrace.h Fix memory corruption when trying to get "core show locks". 2013-08-23 18:07:40 +00:00
bridge.h bridging: Give bridges a name and a known creator 2013-12-17 23:25:49 +00:00
bridge_after.h A great big renaming patch 2013-07-25 04:06:32 +00:00
bridge_basic.h Massively clean up app_queue. 2013-08-22 18:52:41 +00:00
bridge_channel.h Restore Dial, Queue, and FollowMe 'I' option support. 2013-09-13 22:19:23 +00:00
bridge_channel_internal.h Bridging: Fix orphaned bridge if neither of the joining channels can join. 2013-10-22 17:06:21 +00:00
bridge_features.h Fix several interrelated issues dealing with the holding bridge technology. 2013-08-21 15:51:19 +00:00
bridge_internal.h bridging: Give bridges a name and a known creator 2013-12-17 23:25:49 +00:00
bridge_roles.h ARI: bridges/{bridgeID}/addChannel: add roles parameter 2013-08-05 16:59:13 +00:00
bridge_technology.h Fix assumption in bridge_native_rtp.c regarding number of participants in a bridge. 2013-10-03 20:22:17 +00:00
bucket.h sorcery, bucket: Change observer remove calls to take const callbacks struct. 2013-12-03 17:35:54 +00:00
buildinfo.h try to get this committed before the buildbot complains about a broken tree 2008-10-30 16:53:11 +00:00
calendar.h Track module use count for res_calendar 2012-02-22 21:22:43 +00:00
callerid.h Allow for redirecting reasons to be set to arbitrary strings. 2012-09-25 19:29:14 +00:00
causes.h Merged revisions 378735,378748 via svnmerge from 2013-01-09 20:21:33 +00:00
ccss.h Merge in the bridge_construction branch to make the system use the Bridging API. 2013-05-21 18:00:22 +00:00
cdr.h CDRs: Synchronize dialplan applications that manipulate CDRs with the engine 2014-01-12 22:13:12 +00:00
cel.h Restore usefulness of the CEL Peer field 2013-09-27 14:08:23 +00:00
celt.h I think reviewboard broke this. The whole file was doubled. 2011-07-07 22:39:54 +00:00
channel.h Fix a deadlock that occurred due to a conflict of masquerades. 2013-12-19 17:45:21 +00:00
channel_internal.h Split caching out from the stasis_caching_topic. 2013-08-01 13:49:34 +00:00
channelstate.h channel locking: Add locking for channel snapshot creation 2013-12-18 20:33:37 +00:00
chanvars.h Add additional memory debugging to several core APIs, and fix several memory 2008-10-14 22:38:06 +00:00
cli.h DTMF events are now published on a channel's stasis_topic. AMI was 2013-04-15 16:22:03 +00:00
compat.h Add builtin roundf() for systems lacking it. 2013-01-19 20:54:07 +00:00
compiler.h optional_api: Fix linking problems between modules that export global symbols 2013-08-30 13:40:27 +00:00
config.h res_pjsip: Add PJSIP CLI commands 2013-12-20 21:32:13 +00:00
config_options.h Fix the config_options_test 2013-08-25 18:00:46 +00:00
core_local.h Create Local channel messages on the Stasis message bus and produce AMI events 2013-07-08 14:26:40 +00:00
core_unreal.h Massively clean up app_queue. 2013-08-22 18:52:41 +00:00
crypto.h Clean up doxygen warnings 2012-08-30 14:23:28 +00:00
data.h Asterisk media architecture conversion - no more format bitfields 2011-02-03 16:22:10 +00:00
datastore.h Clean up doxygen warnings 2012-08-30 14:23:28 +00:00
devicestate.h ARI: Implement device state API 2013-11-23 17:48:28 +00:00
dial.h app_page: Add predial handlers for app_page. 2013-12-09 22:17:14 +00:00
dlinkedlists.h Doubly linked lists unit test and update to implementation. 2011-12-06 19:09:56 +00:00
dns.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
dnsmgr.h Re-link peers by IP when dnsmgr changes the IP 2012-01-30 23:58:51 +00:00
doxyref.h app_voicemail: Voicemail callback registration/unregistration function improvements. 2013-12-11 19:19:24 +00:00
dsp.h Improve T.38 gateway V.21 preamble detection. 2011-12-28 18:59:16 +00:00
dundi.h incorporates r159808 from branches/1.4: 2008-11-29 17:57:39 +00:00
endian.h only include this for OpenBSD. At least FreeBSD is borked when including it 2008-10-09 17:48:53 +00:00
endpoints.h ARI: Add subscription support 2013-10-04 16:01:48 +00:00
enum.h Add Doxygen documentation for API changes from 1.6.0 to 1.6.1 2009-03-09 20:58:17 +00:00
event.h Refactor CEL to avoid using the event system core 2013-08-17 14:46:44 +00:00
event_defs.h Refactor CEL to avoid using the event system core 2013-08-17 14:46:44 +00:00
extconf.h Merged revisions 328329 via svnmerge from 2011-07-15 00:23:14 +00:00
features.h Restore Dial, Queue, and FollowMe 'I' option support. 2013-09-13 22:19:23 +00:00
features_config.h Fix doxygen to use correct units of features.conf options. 2013-09-17 17:55:21 +00:00
file.h ARI - channel recording support 2013-07-03 17:58:45 +00:00
format.h Add pass through support for Opus and VP8; Opus format attribute negotiation 2013-08-23 15:42:27 +00:00
format_cap.h Cache string values of formats on ast_format_cap() to save processing. 2013-10-03 14:58:16 +00:00
format_pref.h pjsip: fix support for allow=all 2014-01-17 21:33:26 +00:00
frame.h Set 14400 as the default max bit rate if T38MaxBitRate is not specified 2013-08-21 16:31:58 +00:00
frame_defs.h Asterisk media architecture conversion - no more format bitfields 2011-02-03 16:22:10 +00:00
framehook.h bridge_native_rtp: Fix native bridge tech being incompatible when it should be. 2013-06-11 22:21:36 +00:00
fskmodem.h (Step 2 of 2) 2008-07-21 21:00:47 +00:00
fskmodem_float.h Optionally build integer-based routines for FSK tone decoding (but default 2008-07-21 20:59:03 +00:00
fskmodem_int.h Optionally build integer-based routines for FSK tone decoding (but default 2008-07-21 20:59:03 +00:00
global_datastores.h Add SRTP support for Asterisk 2010-06-08 05:29:08 +00:00
hashtab.h Merged revisions 376341,376344-376345 via svnmerge from 2012-11-16 00:19:48 +00:00
heap.h Clean up doxygen warnings 2012-08-30 14:23:28 +00:00
http.h ari:Add application/json parameter support 2013-11-27 15:48:39 +00:00
http_websocket.h optional_api: Fix linking problems between modules that export global symbols 2013-08-30 13:40:27 +00:00
image.h Asterisk media architecture conversion - no more format bitfields 2011-02-03 16:22:10 +00:00
indications.h Audit of ao2_iterator_init() usage for v1.8. 2012-01-27 18:47:16 +00:00
inline_api.h Add development flag to disable the inline API. 2013-05-08 21:01:33 +00:00
io.h Merged revisions 182810 via svnmerge from 2009-03-18 02:28:55 +00:00
jabber.h Doxygen Updates - janitor work 2012-09-21 17:14:59 +00:00
jingle.h Merged revisions 327682 via svnmerge from 2011-07-11 19:49:35 +00:00
json.h Address JSON thread safety issues. 2013-08-02 14:27:35 +00:00
linkedlists.h Merged revisions 376630 via svnmerge from 2012-11-27 18:20:18 +00:00
localtime.h Stasis application WebSocket support 2013-04-08 13:27:45 +00:00
lock.h vector: Update API to be more flexible. 2013-11-02 04:12:36 +00:00
logger.h verbosity: Fix performance of console verbose messages. 2014-01-14 18:14:02 +00:00
manager.h manager: bump version to 2.0.0 2013-12-20 19:25:20 +00:00
md5.h Ensure alignment of in[] field in MD5Context struct. 2012-08-29 22:48:08 +00:00
media_index.h Index installed sounds and implement ARI sounds queries 2013-06-24 13:49:20 +00:00
message.h Clean up doxygen warnings 2012-08-30 14:23:28 +00:00
mixmonitor.h bridge_features: Support One touch Monitor/MixMonitor 2013-07-01 16:01:24 +00:00
mod_format.h Asterisk media architecture conversion - no more format bitfields 2011-02-03 16:22:10 +00:00
module.h Break res_stasis into smaller files. 2013-05-14 21:45:08 +00:00
monitor.h Redesigned 'optional API' support. 2009-06-15 16:07:23 +00:00
musiconhold.h Update MOH start/stop routine doxygen. 2013-08-22 21:29:16 +00:00
netsock.h Convert netsock.h over to use ast_sockaddrs rather than sockaddr_in and update 2012-02-27 16:31:24 +00:00
netsock2.h netsock2: Define AST_AF_* enum constants to their AF_* equivalents 2013-11-05 21:06:25 +00:00
network.h Get default entity ID determination working on Linux again 2008-06-12 17:38:27 +00:00
optional_api.h Fix graceful shutdown crash. 2013-08-30 20:58:59 +00:00
options.h Fix res_ari_asterisk load issue 2013-08-05 14:35:00 +00:00
opus.h Add pass through support for Opus and VP8; Opus format attribute negotiation 2013-08-23 15:42:27 +00:00
parking.h Allow res_parking to be unloadable 2013-08-17 15:01:54 +00:00
paths.h ARI - channel recording support 2013-07-03 17:58:45 +00:00
pbx.h security: Inhibit execution of privilege escalating functions 2013-12-16 19:11:51 +00:00
pickup.h Make sure that pickup.h does not use an include guard name used elsewhere. 2013-08-02 13:54:31 +00:00
pktccops.h Add PacketCable NCS 1.0 support for Docsis/Eurodocsis networks 2009-11-02 22:29:19 +00:00
plc.h Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
poll-compat.h Merged revisions 284597 via svnmerge from 2010-09-02 05:02:54 +00:00
presencestate.h Split caching out from the stasis_caching_topic. 2013-08-01 13:49:34 +00:00
privacy.h remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
pval.h Merged revisions 271399 via svnmerge from 2010-06-18 21:32:09 +00:00
res_fax.h Improve T.38 gateway V.21 preamble detection. 2011-12-28 18:59:16 +00:00
res_mwi_external.h External MWI core support. 2014-01-06 17:45:25 +00:00
res_odbc.h Doxygen Updates - janitor work 2012-09-21 17:14:59 +00:00
res_pjsip.h PJSIP: Add Path header support 2014-01-15 13:16:10 +00:00
res_pjsip_cli.h res_pjsip: Add PJSIP CLI commands 2013-12-20 21:32:13 +00:00
res_pjsip_exten_state.h Fix remnants of the pjsip renaming 2013-07-31 13:31:55 +00:00
res_pjsip_pubsub.h res_pjsip: AMI commands and events. 2013-11-23 17:26:57 +00:00
res_pjsip_session.h PJSIP: Add Path header support 2014-01-15 13:16:10 +00:00
res_srtp.h Allow SRTP policies to be reloaded 2012-02-24 15:10:35 +00:00
rtp_engine.h chan_sip: Fix RTCP port for SRFLX ICE candidates 2013-11-01 12:40:40 +00:00
say.h Add SayAlphaCase and similar functionality for AGI 2013-08-22 22:33:48 +00:00
sched.h ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
sdp_srtp.h Merge in current pimp_my_sip work, including: 2013-06-22 14:03:22 +00:00
security_events.h Avoid unnecessary cleanups during immediate shutdown 2013-05-30 17:05:53 +00:00
security_events_defs.h Strip down the old event system 2013-08-17 14:39:27 +00:00
select.h Merged revisions 315503 via svnmerge from 2011-04-26 19:38:41 +00:00
sem.h Multiple revisions 399887,400138,400178,400180-400181 2013-09-30 18:55:27 +00:00
sha1.h Update SHA1 code to RFC 6234 2011-10-11 19:06:29 +00:00
silk.h Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff 2011-02-22 23:04:49 +00:00
sip_api.h Don't make chan_sip export global symbols. 2012-10-11 15:49:02 +00:00
slin.h Asterisk media architecture conversion - no more format bitfields 2011-02-03 16:22:10 +00:00
slinfactory.h Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff 2011-02-22 23:04:49 +00:00
smdi.h Doxygen Updates - Title update 2012-10-18 14:17:40 +00:00
sorcery.h res_pjsip: Add PJSIP CLI commands 2013-12-20 21:32:13 +00:00
sounds_index.h Index installed sounds and implement ARI sounds queries 2013-06-24 13:49:20 +00:00
speech.h Add support for retrieving engine specific settings using the speech API and from dialplan. 2012-10-01 12:29:04 +00:00
srv.h Doxygen - Markup Guidelines 2013-04-22 16:22:00 +00:00
stasis.h stasis: Add methods to allow for synchronous publishing to subscriber 2014-01-12 22:07:01 +00:00
stasis_app.h bridging: Give bridges a name and a known creator 2013-12-17 23:25:49 +00:00
stasis_app_device_state.h ARI: Implement device state API 2013-11-23 17:48:28 +00:00
stasis_app_impl.h ARI: Adding a channel to a bridge while a live recording is active blocks 2013-12-13 16:38:57 +00:00
stasis_app_mailbox.h ARI: Add mailboxes resource for controlling and polling external MWI 2014-01-14 23:44:57 +00:00
stasis_app_playback.h ARI: Bridge Playback, Bridge Record 2013-07-19 19:35:21 +00:00
stasis_app_recording.h ARI: Implement /recordings/stored API's 2013-08-30 13:28:50 +00:00
stasis_app_snoop.h ari: Add Snoop operation for spying/whispering on channels. 2013-11-23 12:40:46 +00:00
stasis_bridges.h channel locking: Add locking for channel snapshot creation 2013-12-18 20:33:37 +00:00
stasis_cache_pattern.h Split caching out from the stasis_caching_topic. 2013-08-01 13:49:34 +00:00
stasis_channels.h channel locking: Add locking for channel snapshot creation 2013-12-18 20:33:37 +00:00
stasis_endpoints.h ARI: Don't leak implementation details 2013-11-22 20:10:46 +00:00
stasis_internal.h Multiple revisions 399887,400138,400178,400180-400181 2013-09-30 18:55:27 +00:00
stasis_message_router.h stasis: Add methods to allow for synchronous publishing to subscriber 2014-01-12 22:07:01 +00:00
stasis_system.h Convert CCSS manager events to stasis. 2013-07-19 18:00:35 +00:00
stasis_test.h Initial support for endpoints. 2013-05-08 13:39:08 +00:00
statsd.h Example of how to use the Stasis message bus 2013-04-26 20:05:15 +00:00
stringfields.h Add aggregate operations for stuctures with string fields 2013-02-07 15:16:44 +00:00
strings.h res_pjsip: AMI commands and events. 2013-11-23 17:26:57 +00:00
stun.h Re-resolve the STUN address if a STUN poll fails for res_stun_monitor. 2011-12-01 21:19:41 +00:00
syslog.h Change all refererences to 1.6.3 to be 1.8, since that will be the next feature release 2009-12-21 18:51:17 +00:00
taskprocessor.h Multiple revisions 399887,400138,400178,400180-400181 2013-09-30 18:55:27 +00:00
tcptls.h Do not use a FILE handle when doing SIP TCP reads. 2012-10-12 16:31:01 +00:00
tdd.h Additional TDD changes (preparing for SIP changes - adding TDD support to SIP) 2007-11-06 19:10:26 +00:00
term.h Revamp of terminal color codes 2013-02-14 18:47:56 +00:00
test.h Several components: fixing Typos in comments and code, "avaliable" instead of "available" 2013-12-17 23:38:02 +00:00
threadpool.h Merge the pimp_my_sip branch into trunk. 2013-04-25 18:25:31 +00:00
threadstorage.h Match use of ast_free() with ast_calloc() and add some curly braces. 2013-08-28 16:07:30 +00:00
time.h Update Asterisk's CDRs for the new bridging framework 2013-06-17 03:00:38 +00:00
timing.h Refactor ast_timer_ack to return an error and handle the error in timer users 2012-11-05 23:10:14 +00:00
transcap.h Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
translate.h Clean up doxygen warnings 2012-08-30 14:23:28 +00:00
udptl.h udptl: Dead code elimination. ast_udptl_bridge was not used. 2013-12-19 17:13:53 +00:00
ulaw.h Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
unaligned.h Merged revisions 282543 via svnmerge from 2010-08-17 19:34:52 +00:00
utils.h res_pjsip: AMI commands and events. 2013-11-23 17:26:57 +00:00
uuid.h Add uuid wrapper API call ast_uuid_generate_str(). 2013-03-28 23:59:20 +00:00
vector.h vector: Uppercase API to follow C convention. 2013-11-02 04:30:49 +00:00
version.h Remove "asterisk/version.h" in favor of "asterisk/ast_version.h". 2012-01-25 21:31:28 +00:00
xml.h Add CLI configuration documentation 2013-02-15 13:38:12 +00:00
xmldoc.h Add CLI configuration documentation 2013-02-15 13:38:12 +00:00
xmpp.h Move device state distribution to Stasis-core 2013-04-16 15:33:59 +00:00