summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2016-08-29pbx.c: Prevent infinite recursion in manager_show_dialplan_helper.Etienne Lessard
Previously, if context A was including context B and context B was including context A, i.e. if there was a circular dependency between contexts, then calling manager_show_dialplan_helper could lead to an infinite recursion, resulting in a crash. This commit applies the same solution as the one implemented in the show_dialplan_helper function. The manager_show_dialplan_helper and show_dialplan_helper functions contain lots of code in common, but the former was missing the "infinite recursion avoidance" code. ASTERISK-26226 #close Change-Id: I1aea85133c21787226f4f8442253a93000aa0897
2016-08-26Merge "channel: No hung-up on failing security requirements." into 13zuul
2016-08-26channel: No hung-up on failing security requirements.Alexander Traud
In your Diaplan, if you specify same => n,Set(CHANNEL(secure_bridge_media)=1) same => n,Set(CHANNEL(secure_bridge_signaling)=1) only the SIP channel driver chan_sip supports this. All other channels drivers like res_pjsip fail. In case of failure, the original sRTP source code released the whole channel, even if not hung-up, yet. This change does not release the channel but instead hangs-up the channel. ASTERISK-26306 Change-Id: I0489f0cb660fab6673b0db8af027d116e70a66db
2016-08-25ast_framehook_attach() must be called with the channel locked.Richard Mudgett
The framehook container could become corrupted if the channel lock is not held before calling. Change-Id: I1a6b957a1f7b899eb29a186915f8cccab886a438
2016-08-24Fix checks for allocation debugging.Corey Farrell
MALLOC_DEBUG should not be used to check if debugging is actually enabled, __AST_DEBUG_MALLOC should be used instead. MALLOC_DEBUG only indicates that debugging is requested, __AST_DEBUG_MALLOC indicates it is active. Change-Id: I3ce9cdb6ec91b74ee1302941328462231be1ea53
2016-08-17res_ari: Add http prefix to generated docsTorrey Searle
updated the uri handler to include the url prefix of the http server this enables res_ari to add it to the uris when generating docs Change-Id: I279335a2625261a8492206c37219698f42591c2e
2016-08-16Merge "Refactor usage pattern of xmldoc info tag." into 13zuul
2016-08-16Merge "sorcery.c: Minor optimizations." into 13Joshua Colp
2016-08-16Merge "sorcery.c: Tweak some container declaration formatting." into 13zuul
2016-08-16Merge "core: Entity ID is not set or invalid" into 13zuul
2016-08-16Merge "pbx.c: Additional fixes to ast_context_remove_extension_callerid2." ↵zuul
into 13
2016-08-15Refactor usage pattern of xmldoc info tag.Corey Farrell
This updates func_channel.c and main/message.c to use a generic xpointer include instead of including info from each channel driver. Now the name attribute of info is CHANNEL or CHANNEL_EXAMPLES to be included in documentation for func_channel. Setting the name attribute of info to MessageToInfo or MessageFromInfo causes it to be included in the MessageSend application and AMI action. Change-Id: I89fd8276a3250824241a618009714267d3a8d1ea
2016-08-15Merge "manager: Add <see-also> tags to relate interrelated events/actions ↵Joshua Colp
together" into 13
2016-08-15Merge "manager: Add <see-also> tags to relate Bridge related events,actions, ↵Joshua Colp
and apps" into 13
2016-08-15Merge "manager: Add <see-also> tags to relate AoC events and actions" into 13Joshua Colp
2016-08-15Merge "manager: Add <see-also> tags to relate UserEvent actions/apps/events" ↵Joshua Colp
into 13
2016-08-15Merge "manager: Add <see-also> links between related events" into 13zuul
2016-08-15sorcery.c: Minor optimizations.Richard Mudgett
* Remove some unused parameters from internal functions: sorcery_wizard_create() sorcery_wizard_update() sorcery_wizard_delete() * Created the struct sorcery_observer_invocation ao2 object without a lock since it is not needed in sorcery_observer_invocation_alloc(). * Cleanup generic ao2 container sorcery object id hash, sort, and cmp functions. Change-Id: Iff71d75f52bc1b8cee955456838c149faaa4f92e
2016-08-15sorcery.c: Tweak some container declaration formatting.Richard Mudgett
* Tweak sorcery_object_type_alloc() formatting. * Tweak ast_sorcery_init() formatting. Change-Id: Ib02430023f15268cd7a2ea53f2c331213e4d3944
2016-08-15pbx.c: Additional fixes to ast_context_remove_extension_callerid2.Corey Farrell
Do not check registrar of the first extension head. We should only check the registrar when we match the priority. Additionally fix a couple calls to strcmp which used the input callerid instead of the clean version ex.cidmatch. ASTERISK-26233 Change-Id: I17ea6881a18f40840ae9c1f5394aab1fbb3769f1
2016-08-15core: Entity ID is not set or invalidAlexei Gradinari
The Exchanging Device and Mailbox States could not working if the Entity ID (EID) is not set manually and can't be obtained from ethernet interface. This patch replaces debug message to warning and addes missing description about option 'entityid' to asterisk.conf.sample. With this patch the asterisk also: (1) decline loading the modules which won't work without EID: res_corosync and res_pjsip_publish_asterisk. (2) warn if EID is empty on loading next modules: pbx_dundi, res_xmpp Starting with v197 systemd/udev will automatically assign "predictable" names for all local Ethernet interfaces. This patch also addes some new ethernet prefixes "eno" and "ens". ASTERISK-26164 #close Change-Id: I72d712f1ad5b6f64571bb179c5cb12461e7c58c6
2016-08-13manager: Add <see-also> tags to relate interrelated events/actions togetherMatt Jordan
Change-Id: Idbac539205aa732bf786c4f765577d8e9ff28ba4
2016-08-13manager: Add <see-also> tags to relate Bridge related events,actions, and appsMatt Jordan
Change-Id: I67e6b79fa3102e494b5fe6cc7510472249080e85
2016-08-13manager: Add <see-also> tags to relate AoC events and actionsMatt Jordan
Change-Id: Iea89a36222712148c1775c05ed0ad1049d67a70e
2016-08-13manager: Add <see-also> tags to relate UserEvent actions/apps/eventsMatt Jordan
Change-Id: I80f8a981f62f50e74609c69c49edcaca6c95efa4
2016-08-13manager: Add <see-also> links between related eventsMatt Jordan
This patch adds some see-also references between related AMI events. It focuses primarily on those events that are guaranteed to come in pairs, such as DTMFBegin/DTMFEnd, as well as those that occur during the life cycle of an Asterisk channel, such as Newchannel/Hangup. Change-Id: Iaab600477052018d0f8c03d0c624c0856e9ff1f3
2016-08-12Merge "Run mandatory cleanup when startup fails." into 13zuul
2016-08-11Merge "res_pjsip: Make aor named lock a mutex." into 13zuul
2016-08-11Run mandatory cleanup when startup fails.Corey Farrell
Errors during startup result in an exit. These error branches should be calling ast_run_atexit(0) to ensure mandatory cleanup is run. ASTERISK-26267 #close Change-Id: If226f2326ae2df7add20040696132214cf2bb680
2016-08-11taskprocessor.c: Tweak high water checks.Richard Mudgett
* The high water check in ast_taskprocessor_alert_set_levels() would trigger immediately if the new high water level is zero and the queue was empty. * The high water check in taskprocessor_push() was off by one. Change-Id: I687729fb4efa6a0ba38ec9c1c133c4d407bc3d5d
2016-08-11res_pjsip: Make aor named lock a mutex.Richard Mudgett
The named aor lock was always being locked for writes so a rwlock adds no benefit and may be slower because rwlocks are biased toward read locking. Change-Id: I8c5c2c780eb30ce5441832257beeb3506fd12b28
2016-08-10pjsip: Fix deadlock with suspend taskprocessor on masqueradeAlexei Gradinari
If both channels which should be masqueraded are in the same serializer: 1st channel will be locked waiting condition 'complete' 2nd channel will be locked waiting condition 'suspended' On heavy load system a chance that both channels will be in the same serializer 'pjsip/distibutor' is very high. To reproduce compile res_pjsip/pjsip_distributor.c with DISTRIBUTOR_POOL_SIZE=1 Steps to reproduce: 1. Party A calls Party B (bridged call 'AB') 2. Party B places Party A on hold 3. Party B calls Voicemail app (non-bridged call 'BV') 4. Party B attended transfers Party A to voicemail using REFER. 5. When asterisk masquerades calls 'AB' and 'BV', a deadlock is happened. This patch adds a suspension indicator to the taskprocessor. When a session suspends/unsuspends the serializer it sets the indicator to the appropriate state. The session checks the suspension indicator before suspend the serializer. ASTERISK-26145 #close Change-Id: Iaaebee60013a58c942ba47b1b4930a63e686663b
2016-08-03Add missing checks during startup.Corey Farrell
This ensures startup is canceled due to allocation failures from the following initializations. * channel.c: ast_channels_init * config_options.c: aco_init ASTERISK-26265 #close Change-Id: I911ed08fa2a3be35de55903e0225957bcdbe9611
2016-08-02Merge "asterisk.c: Add auto generation and persistence of UUID" into 13zuul
2016-08-02asterisk.c: Add auto generation and persistence of UUIDGeorge Joseph
Upcoming features will require the generation and persistence of a UUID. Change-Id: I3ec0062427e133217db6ef496a4216f427c3b92d
2016-08-02Remove SILK payload mappings from Asterisk core.Mark Michelson
SILK is a bit of a hog when it comes to using up our limited number of dynamic payload types in the RTP engine. By freeing up four slots, it allows for other codecs to potentially take the place. Now, codec_silk.so will dynamically use the payload slots in the RTP engine when it loads. A better fix would be make RTP dynamic payload types actually dynamic. However, at this stage of Asterisk 14 development, this is a risky move that would be imprudent. Change-Id: I5774e09408f9a203db189529eabdc0d3f4c1e612 (cherry picked from commit d50895c7b04036aeaad58990089399e46db4c817)
2016-08-01Merge "pbx.c: Fix handling of '-' in extension name and callerid" into 13zuul
2016-07-29Merge "pbx.c: Allow dangerous functions when adding a hint to dialplan." into 13zuul
2016-07-28Merge "dsp.c: Add fax and DTMF detection unit tests." into 13Joshua Colp
2016-07-28Merge "dsp.c: Added descriptive comments to Goertzel calculations." into 13Joshua Colp
2016-07-28Merge "dsp.c: Fix incorrect format reference typo." into 13Joshua Colp
2016-07-28pbx.c: Fix handling of '-' in extension name and calleridCorey Farrell
This adds a two strings to ast_exten. name to go with exten and cidmatch_display to go with cidmatch. The new fields contain input used to add the extension in the first place. The existing fields now contain stripped input that excludes insignificant spaces and dashes. These stripped fields should always be used for comparisons. The unstripped fields should normally be used for display, but displaying stripped values will not cause runtime errors. Note the actual string is only stored twice if it contains dashes. If no dashes are found then both 'char *' fields point to the same memory. So this change has a minimum effect on memory usage. The existing functions ast_get_extension_name and ast_get_extension_cidmatch return unstripped values as they did before this change. Other similar bugs likely still exist where unstripped extensions are saved outside pbx.c then passed back in. ASTERISK-26233 #close Change-Id: I6cd61ce57acc1570ca6cc14960c4c3b0a9eb837f
2016-07-28pbx.c: Allow dangerous functions when adding a hint to dialplan.Richard Mudgett
We can allow dangerous functions when adding a hint since altering dialplan is itself a privileged activity. Otherwise, we could never execute dangerous functions. ASTERISK-25996 #close Reported by: Andrew Nagy Change-Id: I4929ff100ad1200a0198262d069a34f2296e77ba
2016-07-27rtp_engine: Failed assertion and wrong name given for codecKevin Harwell
Fixed an assert check that would trigger when the passed in value was negative. The negative value was being cast to an unsigned value. This resulted in the check failing. Also fixed another problem when loading formats in the engine. When setting the mime type the format's name was being passed in instead of the codec's name. Change-Id: I1a201cd419ba4d8e9a40d337e36b6fbe1737192c
2016-07-26dsp.c: Add fax and DTMF detection unit tests.Richard Mudgett
* Add fax amplitude and frequency sweep tests. * Add DTMF amplitude and twist unit tests. Change-Id: I8d77c9a1eec89e440d715f998c928687e870c3f7
2016-07-26dsp.c: Added descriptive comments to Goertzel calculations.Richard Mudgett
* Added doxygen to describe some struct members and what is going on in the code. Change-Id: I2ec706a33b52aee42b16dcc356c2bd916a45190d
2016-07-26dsp.c: Fix incorrect format reference typo.Richard Mudgett
Change-Id: Ia131da3ec29acf385cb43a586a29ecc975eb3896
2016-07-25dsp.c: Fix erroneous fax tone detection.Richard Mudgett
The Goertzel calculations get less accurate the lower the signal level being worked with becomes because there is less resolution remaining. If it is too low we can erroneously detect a tone where none really exists. The searched for fax frequencies not only need to be so much stronger than the background noise they must also be a minimum strength. * Add needed minimum threshold test to tone_detect(). * Set TONE_THRESHOLD to allow low volume frequency spread detection. ASTERISK-26237 #close Reported by: Richard Mudgett Change-Id: I84dbba7f7628fa13720add6a88eae3b129e066fc
2016-07-21Merge "res_pjsip: Add fax_detect_timeout endpoint option." into 13Joshua Colp
2016-07-19Add conditional support for noreturn functions.Corey Farrell
This adds support for tagging functions with the noreturn attribute. If DO_CRASH is enabled then ast_do_crash never returns. If AST_DEVMODE and DO_CRASH are enabled then failed assertions never return. This can resolve a large number of false positives with static analyzers. ASTERISK-26220 #close Change-Id: Icfb61e5fe54574eced4c3e88b317244f467ec753