summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2015-07-24pjsip: Add rtp_timeout and rtp_timeout_hold endpoint options.Joshua Colp
This change adds support for the 'rtp_timeout' and 'rtp_timeout_hold' endpoint options. These allow the channel to be hung up if RTP is not received from the remote endpoint for a specified number of seconds. ASTERISK-25259 #close Change-Id: I3f39daaa7da2596b5022737b77799d16204175b9
2015-07-20Merge "chan_pjsip: Don't change formats when frame of unsupported format is ↵Matt Jordan
received."
2015-07-17chan_pjsip: Don't change formats when frame of unsupported format is received.Joshua Colp
Receipt of an RTP packet currently causes the formats on an PJSIP channel to change to the format of the RTP packet. In some off-nominal cases it's possible for this to be a format that has not been configured or negotiated. This change makes it so only formats explicitly configured on the endpoint are allowed. ASTERISK-25258 #close Change-Id: If93d641fb6418a285928839300d7854cab8c1020
2015-07-17sig_pri.h: force_restart_unavailable_chans in wrong scopePatric Marschall
In channels/sig_pri.h, struct sig_pri_span, the field force_restart_unavailable_chans is only defined if #if defined(HAVE_PRI_MCID) is true. All other occurences of force_restart_unavailable_chans are outside of the #if defined(HAVE_PRI_MCID) endif scope. ASTERISK-25257 #close Reported by: Patric Marschall Change-Id: I071de89cc2cd0d85927a013036e235851f672549
2015-07-04Merge "chan_sip: Fix early call pickup channel leak."Joshua Colp
2015-07-04Makefile: Remove coverage files on 'make clean'Matt Jordan
This patch updates a variety of Makefiles in Asterisk's build system to remove .gcda and .gcno files when 'make clean' is executed. These files are generated when '--enable-coverage' is passed to the Asterisk configure script. Change-Id: Ib70b41eea2ee2908885bff02e80faf9f40c84602
2015-07-02Merge "chan_vpb.cc: Fix compiler warning Jenkins found."Joshua Colp
2015-07-02chan_sip: Fix early call pickup channel leak.Walter Doekes
When handle_invite_replaces() was called, and either ast_bridge_impart() failed or there was no bridge (because the channel we're picking up was still ringing), chan_sip would leak a channel. Thanks Matt and Corey for checking the bridge path. ASTERISK-25226 #close Change-Id: Ie736bb182170a73eef5bcef0ab0376f645c260c8
2015-07-02chan_mgcp: Don't call close on fd -1.Walter Doekes
ASTERISK-25220 #close Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3
2015-07-01chan_vpb.cc: Fix compiler warning Jenkins found.Richard Mudgett
Change-Id: I0ec7fd10d56d90d5a60b12b5a7d6807f265ac5e0
2015-06-22chan_sip: Reload peer without its old capabilities.Alexander Traud
On reload, previously allowed codecs were not removed. Therefore, it was not possible to remove codecs while Asterisk was running. Furthermore, newly added codecs got appended behind the previous codecs. Therefore, it was not possible to add a codec with a priority of #1. This change removes the old capabilities before the current ones are added. ASTERISK-25182 #close Reported by: Alexander Traud patches: asterisk_13_allow_codec_reload.patch uploaded by Alexander Traud (License 6520) Change-Id: I62a06bcf15e08e8c54a35612195f97179ebe5802
2015-06-20chan_sip: Destroy peers without holding peers container lock.Joshua Colp
Due to the use of stasis_unsubscribe_and_join in the peer destructor it is possible for a deadlock to occur when an event callback is occurring at the same time. This happens because the peer may be destroyed while holding the peers container lock. If this occurs the event callback will never be able to acquire the container lock and the unsubscribe will never complete. This change makes it so the peers that have been removed from the peers container are not destroyed with the container lock held. ASTERISK-25163 #close Change-Id: Ic6bf1d9da4310142a4d196c45ddefb99317d9a33
2015-06-12chan_sip.c: Update dialog fromtag after request with authDamian Ivereigh
If a client sends and INVITE which is 401 rejected, then subsequently sends a new INVITE with the auth info and uses a different fromtag from the first INVITE, Asterisk will accept the new INVITE as part of the original dialog - match_req_to_dialog() specifically ignores the fromtag. However it does not update the stored dialog with the new fromtag. This results in Asterisk being unable to match future packets that are part of this dialog (such as the ACK to the OK or the OK to the BYE), and the call is dropped. This problem was originally found when using an NEC-i SV8100-GE (NEC SIP Card). * After a successful match of a packet to the dialog, if the packet is not a SIP_RESPONSE, authentication is present and the fromtags are different, the stored fromtag is updated with the one from the recent INVITE. ASTERISK-25154 #close Reported by: Damian Ivereigh Tested by: Damian Ivereigh Change-Id: I5c16cf3b409e5ef9f2b2fe974b6bd2a45a6aa17e
2015-06-11chan_pjsip: Set the context and extension on the channel when createdMatt Jordan
Prior to this patch, chan_pjsip was failing to pass the endpoint's context and the desired extension to the ast_channel_alloc_* routine. This caused a new channel snapshot to be issued without a context and extension, which can cause some reporting issues for users of AMI, CEL, and other APIs. The channel driver would later set the context and extension on the channel such that the channel would start in the correct location in the dialplan, but the information reported in the initial event would be incorrect. This patch modifies the channel driver such that it now passes the context and extension directly into the allocation routine. This provides the information in the new channel snapshot published over Stasis. ASTERISK-25156 #close Reported by: cloos Change-Id: Ic6f8542836e596db8f662071d118e8f934fdf25e
2015-06-10Merge "chan_iax2: Prevent deadlock between hangup and sending lagrq/ping"Mark Michelson
2015-06-08Fix unsafe uses of ast_context pointers.Corey Farrell
Although ast_context_find, ast_context_find_or_create and ast_context_destroy perform locking of the contexts table, any context pointer can become invalid at any time that the contexts table is unlocked. This change adds locking around all complete operations involving these functions. Places where ast_context_find was followed by ast_context_destroy have been replaced with calls ast_context_destroy_by_name. ASTERISK-25094 #close Reported by: Corey Farrell Change-Id: I1866b6787730c9c4f3f836b6133ffe9c820734fa
2015-05-22Stasis: Fix unsafe use of stasis_unsubscribe in modules.Corey Farrell
Many uses of stasis_unsubscribe in modules can be reached through unload. These have been switched to stasis_unsubscribe_and_join. Some subscription callbacks do nothing, for these I've created a noop callback function in stasis.c. This is used by some modules that monitor MWI topics in order to enable cache, since the callback does not become invalid after dlclose it is safe to use stasis_unsubscribe on these, even during module unload. ASTERISK-25121 #close Change-Id: Ifc2549fbd8eef7d703c222978e8f452e2972189c
2015-05-20chan_iax2: Prevent deadlock between hangup and sending lagrq/pingYousf Ateya
channels/chan_iax.c: Prevent the deadlock between iax2_hangup and send_lagrq/ send_ping. This deadlock happens because the scheduled task send_lagrq(or send_ping) starts execution after the call hangup procedure starts but before it deletes the tasks in the scheduler. The solution is to delete scheduled lagrq (and ping) task asynchronously (i.e. schedule AST_SCHED_DEL for these tasks); By this, AST_SCHED_DEL will be called in a new context (doesn't have callno locked). This commit also cleans up the procedure of sending LAGRQ and PING. main/sched.c: Do not assert when deleting non existant entry from scheduler. This assert seems to be the reason for a lot of awkward code to avoid it. ASTERISK-24983 #close Reported by: Y Ateya Change-Id: I03bec1fc8faacb89630269e935fa667c6d6c080c
2015-05-17chan_pjsip: Fix crash during off-nominal when no endpoint specified.snuffy
Add missing return -1 when no endpoint name is specified. ASTERISK-25086 #close Reported by: snuffy Change-Id: I9de76c2935a1f4e3f0cffe97a670106f5605e89e
2015-05-14Merge "AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO ↵Joshua Colp
macro."
2015-05-13AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro.Rodrigo Ramírez Norambuena
Change-Id: Icf88f9f861c6b2a16e5f626ff25795218a6f2723
2015-05-12chan_dahdi/sig_pri: Fix crash on ISDN call hangup collision.Richard Mudgett
If an ISDN call is hungup by both sides at the same time a crash could happen. * Added missing NULL checks for the owner channel after calling pri_queue_pvt_cause_data() in two places. Code after those calls need to check the owner channel pointer for NULL before use because pri_queue_pvt_cause_data() needs to do deadlock avoidance to lock the owner and the owner may get hung up. ASTERISK-21893 #close Reported by: Alexandr Gordeev Change-Id: Ica3e266ebc7a894b41d762326f08653e1904bb9a
2015-05-07Merge topics 'ASTERISK-25049', 'ASTERISK-25056'Matt Jordan
* changes: CLI: Enable automatic references to modules. Modules: Make ast_module_info->self available to auxiliary sources.
2015-05-05chan_unistim: Fix build failure due to ACL changes.Joshua Colp
Change-Id: I57081045c72b9fcf12d5c84493278f9272c31b32
2015-05-05Merge "Restrict functionality when ACLs are misconfigured."Joshua Colp
2015-05-04Modules: Make ast_module_info->self available to auxiliary sources.Corey Farrell
ast_module_info->self is often needed to register items with the core. Many modules have ad-hoc code to make this pointer available to auxiliary sources. This change updates the module build process to make the needed information available to all sources in a module. ASTERISK-25056 #close Reported by: Corey Farrell Change-Id: I18c8cd58fbcb1b708425f6757becaeca9fa91815
2015-05-02Remove unneeded uses of optional_api providers.Corey Farrell
A few cases exist where headers of optional_api provders are included but not needed. This causes unneeded calls to ast_optional_api_use. * Don't include optional_api.h from sip_api.h. * Move 'struct ast_channel_monitor' to channel.h. * Don't include monitor.h from chan_sip.c, channel.c or features.c. The move of struct ast_channel_monitor is needed since channel.c depends on it. This has no effect on users of monitor.h since channel.h is included from monitor.h. ASTERISK-25051 #close Reported by: Corey Farrell Change-Id: I53ea65a9fc9693c89f8bcfd6120649bfcfbc3478
2015-04-30Restrict functionality when ACLs are misconfigured.Mark Michelson
This patch has two main purposes: 1) Improve warning messages when ACLs are configured improperly. 2) Prevent misconfigured ACLs from allowing potentially unwanted traffic. To acomplish point (2) in most cases, whatever configuration object that the ACL belonged to was not allowed to load. The one exception is res_pjsip_acl. In that case, ACLs are their own configuration object. Furthermore, the module loading code has no indication that a ACL configuration had a failure. So the tactic taken here is to create an ACL that just blocks everything. ASTERISK-24969 Reported by Corey Farrell Change-Id: I2ebcb6959cefad03cea4d81401be946203fcacae
2015-04-30chan_dahdi: Add the chan_dahdi.conf force_restart_unavailable_chans option.Richard Mudgett
Some telco switches occasionally ignore ISDN RESTART requests. The fix for ASTERISK-19608 added an escape clause for B channels in the restarting state if the telco ignores a RESTART request. If the telco fails to acknowledge the RESTART then Asterisk will assume the telco acknowledged the RESTART on the second call attempt requesting the B channel by the telco. The escape clause is good for dealing with RESTART requests in general but it does cause the next call for the restarting B channel to be rejected if the telco insists the call must go on that B channel. chan_dahdi doesn't really need to issue a RESTART request in response to receiving a cause 44 (Requested channel not available) code. Sending the RESTART in such a situation is not required (nor prohibited) by the standards. I think chan_dahdi does this for historical reasons to deal with buggy peers to get channels unstuck in a similar fashion as the chan_dahdi.conf resetinterval option. * Add the chan_dahdi.conf force_restart_unavailable_chans compatability option that when disabled will prevent chan_dahdi from trying to RESTART the channel in response to a cause 44 code. ASTERISK-25034 #close Reported by: Richard Mudgett Change-Id: Ib8b17a438799920f4a2038826ff99a1884042f65
2015-04-29Merge "chan_iax2: Ensure that IAX flags are 64 bits."Joshua Colp
2015-04-28chan_iax2: Ensure that IAX flags are 64 bits.Yousf Ateya
Flags are 64 bits. Without LLU suffix the value of 1<<31 is negative. Although it doesn't have an effect on the current implementation, it will be problem if more flags are added. Change-Id: Ic290c81cfbbbf062872392d99d3322932cc49487
2015-04-28chan_vpb: Fix compile error due to use of ASTERISK_FILE_VERSION.Richard Mudgett
Change-Id: I51179e2a83937423676da522b766f1126de4059e
2015-04-27Astobj2: Allow reference debugging to be enabled/disabled by config.Corey Farrell
* The REF_DEBUG compiler flag no longer has any effect on code that uses Astobj2. It is used to determine if reference debugging is enabled by default. Reference debugging can be enabled or disabled in asterisk.conf. * Caller information is provided in logger errors for ao2 bad magic numbers. * Optimizes AO2 by merging internal functions with the public counterpart. This was possible now that we no longer require a dual ABI. ASTERISK-24974 #close Reported by: Corey Farrell Change-Id: Icf3552721fe999365ba8a8cf00a965aa6b897cc1
2015-04-26channels/chan_skinny: Fix compilation error introduced in f8e21a1adfMatt Jordan
A typo in commit f8e21a1adf resulted in a compilation error in chan_skinny. This patch fixes the typo. ASTERISK-24917 Change-Id: Id7f4ad1fe948eb2408622e80c27936ce4516c33c
2015-04-24Clang: Fix some more tautological-compare warnings.Diederik de Groot
clang can warn about a so called tautological-compare, when it finds comparisons which are logically always true, and are therefor deemed unnecessary. Exanple: unsigned int x = 4; if (x > 0) // x is always going to be bigger than 0 Enum Case: Each enumeration is its own type. Enums are an integer type but they do not have to be *signed*. C leaves it up to the compiler as an implementation option what to consider the integer type of a particu- lar enumeration is. Gcc treats an enum without negative values as an int while clang treats this enum as an unsigned int. rmudgett & mmichelson: cast the enum to (unsigned int) in assert. The cast does have an effect. For gcc, which seems to treat all enums as int, the cast to unsigned int will eliminate the possibility of negative values being allowed. For clang, which seems to treat enums without any negative members as unsigned int, the cast will have no effect. If for some reason in the future a negative value is ever added to the enum the assert will still catch the negative value. ASTERISK-24917 Change-Id: Ief23ef68916192b9b72dabe702b543ecfeca0b62
2015-04-20chan_dahdi/sig_pri: Make post AMI HangupRequest events on PRI channels.Richard Mudgett
The chan_dahdi channel driver is a very old driver. The ability for it to support ISDN was added well after the initial analog support. Setting the softhangup flags is a carry over from the original analog code. The driver was not updated to call ast_queue_hangup() which will post the AMI HangupRequest event. * Changed sig_pri.c to call ast_queue_hangup() instead of setting the softhangup flag when the remote party initiates a hangup. ASTERISK-24895 #close Reported by: Andrew Zherdin Change-Id: I5fe2e48556507785fd8ab8e1c960683fd5d20325
2015-04-14Build System: Create Makefile macro MOD_ADD_SOURCE.Corey Farrell
This new macro allows a single line to add all additional sources to a module. This helps prevent modules from missing steps, and makes future changes easier since they can be made in a single place. ASTERISK-24960 #close Reported by: Corey Farrell Change-Id: I38f12d8b72c5e7bb37a879b2fb51761a2855eb4b
2015-04-13git migration: Refactor the ASTERISK_FILE_VERSION macroMatt Jordan
Git does not support the ability to replace a token with a version string during check-in. While it does have support for replacing a token on clone, this is somewhat sub-optimal: the token is replaced with the object hash, which is not particularly easy for human consumption. What's more, in practice, the source file version was often not terribly useful. Generally, when triaging bugs, the overall version of Asterisk is far more useful than an individual SVN version of a file. As a result, this patch removes Asterisk's support for showing source file versions. Specifically, it does the following: * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and remove passing the version in with the macro. Other facilities than 'core show file version' make use of the file names, such as setting a debug level only on a specific file. As such, the act of registering source files with the Asterisk core still has use. The macro rename now reflects the new macro purpose. * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Remove the "core show file version" CLI command. Without the file version, it is no longer useful. - Remove the ast_file_version_find function. The file version is no longer tracked. - Rename ast_register_file_version/ast_unregister_file_version to ast_register_file/ast_unregister_file, respectively. * main/manager: Remove value from the Version key of the ModuleCheck Action. The actual key itself has not been removed, as doing so would absolutely constitute a backwards incompatible change. However, since the file version is no longer tracked, there is no need to attempt to include it in the Version key. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action - Removal of the "core show file version" CLI command Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-10chan_pjsip/res_pjsip/bridge_softmix/core: Improve translation path choices.Richard Mudgett
With this patch, chan_pjsip/res_pjsip now sets the native formats to the codecs negotiated by a call. * The changes in chan_pjsip.c and res_pjsip_sdp_rtp.c set the native formats to include all the negotiated audio codecs instead of only the initial preferred audio codec and later the currently received audio codec. * The audio frame handling in channel.c:ast_read() is more streamlined and will automatically adjust to changes in received frame formats. The new policy is to remove translation and pass the new frame format to the receiver except if the translation was to a signed linear format. A more long winded version is commented in ast_read() along with some caveats. * The audio frame handling in channel.c:ast_write() is more streamlined and will automatically adjust any needed translation to changes in the frame formats sent. Frame formats sent can change for many reasons such as a recording is being played back or the bridged peer changed the format it sends. Since it is a normal expectation that sent formats can change, the codec mismatch warning message is demoted to a debug message. * Removed the short circuit check in channel.c:ast_channel_make_compatible_helper(). Two party bridges need to make channels compatible with each other. However, transfers and moving channels among bridges can result in otherwise compatible channels having sub-optimal translation paths if the make compatible check is short circuited. A result of forcing the reevaluation of channel compatibility is that the asterisk.conf:transcode_via_slin and codecs.conf:genericplc options take effect consistently now. It is unfortunate that these two options are enabled by default and negate some of the benefits to the changes in channel.c:ast_read() by forcing translation through signed linear on a two party bridge. * Improved the softmix bridge technology to better control the translation of frames to the bridge. All of the incoming translation is now normally handled by ast_read() instead of splitting any translation steps between ast_read() and the slin factory. If any frame comes in with an unexpected format then the translation path in ast_read() is updated for the next frame and the slin factory handles the current frame translation. This is the final patch in a series of patches aimed at improving translation path choices. The other patches are on the following reviews: https://reviewboard.asterisk.org/r/4600/ https://reviewboard.asterisk.org/r/4605/ ASTERISK-24841 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4609/ ........ Merged revisions 434671 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-10chan_sip: make progressinband default to noKevin Harwell
After the "progressinband" value setting of "never" was updated to never send a 183 this separated its use from the "no" value. Since "never" was the default, but most users probably expect "no" this patch updates the default for the "progressinband" setting to "no." ASTERISK-24835 #close Reported by: Andrew Nagy Review: https://reviewboard.asterisk.org/r/4606/ ........ Merged revisions 434654 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-10res_pjsip: Add an 'auto' option for DTMF ModeMatthew Jordan
This patch adds support for automatically detecting the type of DTMF that a PJSIP endpoint supports. When the 'dtmf_mode' endpoint option is set to 'auto', the channel created for an endpoint will attempt to determine if RFC 4733 DTMF is supported. If so, it will use that DTMF type. If not, the DTMF type for the channel will be set to inband. Review: https://reviewboard.asterisk.org/r/4438 ASTERISK-24706 #close Reported by: yaron nahum patches: yaron_patch_3_Feb.diff submitted by yaron nahum (License 6676) ........ Merged revisions 434637 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-10channels/chan_iax2: Improve POKE expiration time calculation for lossy networksMatthew Jordan
POKE is used to check for peer availability; however, in networks with packet loss, the current calculations may result in POKE expiration times that are too short. This patch alters the expiration/retry time logic to take into account the last known qualify round trip time, as opposed to always using a static value for each peer. Review: https://reviewboard.asterisk.org/r/4536 ASTERISK-22352 #close Reported by: Frederic Van Espen ASTERISK-24894 #close Reported by: Y Ateya patches: poke_noanswer_duration.diff submitted by Y Ateya (License 6693) ........ Merged revisions 434564 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 434565 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-10channels/chan_iax2: Add a configuration parameter for call token expirationMatthew Jordan
This patch adds a new configuration parameter, 'calltokenexpiration', that controls how long before an authentication call token is expired. The default maintains the RFC specified 10 seconds. Setting it to a higher value may be useful in lossy networks. Review: https://reviewboard.asterisk.org/r/4588 ASTERISK-24939 #close Reported by: Y Ateya patches: ctoken_configuration.diff submitted by Y Ateya (License 6693) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-09chan_iax2.c: Fix ref leak in iax2_request().Richard Mudgett
* Increased warning message format capability string buffer size in iax2_request(). Review: https://reviewboard.asterisk.org/r/4601/ ........ Merged revisions 434510 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-09clang compiler warnings: Fix autological comparisonsMatthew Jordan
This fixes autological comparison warnings in the following: * chan_skinny: letohl may return a signed or unsigned value, depending on the macro chosen * func_curl: Provide a specific cast to CURLoption to prevent mismatch * cel: Fix enum comparisons where the enum can never be negative * enum: Fix comparison of return result of dn_expand, which returns a signed int value * event: Fix enum comparisons where the enum can never be negative * indications: tone_data.freq1 and freq2 are unsigned, and hence can never be negative * presencestate: Use the actual enum value for INVALID state * security_events: Fix enum comparisons where the enum can never be negative * udptl: Don't bother to check if the return value from encode_length is less than 0, as it returns an unsigned int * translate: Since the parameters are unsigned int, don't bother checking to see if they are negative. The cast to unsigned int would already blow past the matrix bounds. * res_pjsip_exten_state: Use a temporary value to cache the return of ast_hint_presence_state * res_stasis_playback: Fix enum comparisons where the enum can never be negative * res_stasis_recording: Add an enum value for the case where the recording operation is in error; fix enum comparisons * resource_bridges: Use enum value as opposed to -1 * resource_channels: Use enum value as opposed to -1 Review: https://reviewboard.asterisk.org/r/4533 ASTERISK-24917 Reported by: dkdegroot patches: rb4533.patch submitted by dkdegroot (License 6600) ........ Merged revisions 434469 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 434470 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-08Bridging: Eliminate the unnecessary make channel compatible with bridge ↵Richard Mudgett
operation. When a channel enters the bridging system it is first made compatible with the bridge and then the bridge technology makes the channel compatible with the technology. For all but the DAHDI native and softmix bridge technologies the make channel compatible with the bridge step is an effective noop because the other technologies allow all audio formats. For the DAHDI native bridge technology it doesn't matter because it is not an initial bridge technology and chan_dahdi allows only one native format per channel. For the softmix bridge technology, it is a noop at best and harmful at worst because the wrong translation path could be setup if the channel's native formats allow more than one audio format. This is an intermediate patch for a series of patches aimed at improving translation path choices. * Removed code dealing with the unnecessary step of making the channel compatible with the bridge. ASTERISK-24841 Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4600/ ........ Merged revisions 434424 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-08chan_iax2: Fix compilation issue due to funky mergeMatthew Jordan
Don't mix declarations and code! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-08chan_iax2: Fix crash caused by unprotected access to iaxs[peer->callno]Matthew Jordan
This patch fixes an access to the peer callnumber that is unprotected by a corresponding mutex. The peer->callno value can be changed by multiple threads, and all data inside the iaxs array must be procted by a corresponding lock of iaxsl. The patch moves the unprotected access to a location where the mutex is safely obtained. Review: https://reviewboard.asterisk.org/r/4599/ ASTERISK-21211 #close Reported by: Jaco Kroon patches: asterisk-11.2.1-iax2_poke-segfault.diff submitted by Jaco Kroon (License 5671) ........ Merged revisions 434291 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 434292 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-08chan_sip: Handle IPv4 mapped IPv6 clients when NAT is enabledMatthew Jordan
When udpbindaddr is set to the IPv6 bind all address of '::', Asterisk will attempt to handle both IPv4 and IPv6 addresses, although the information will be stored in a struct with an AF_INET6 address type. However, the current NAT handling code won't handle the IPv4 mapped IPv6 addresses correctly. This patch adds an additional check for the mapped address case, allowing the NAT code to handle clients even when the address is IPv6. Review: https://reviewboard.asterisk.org/r/4563/ ASTERISK-18032 #close Reported by: Christoph Timm patches: nat_with_ipv6.diff submitted by Valentin Vidić (License 6697) ........ Merged revisions 434288 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 434289 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-08clang compiler warnings: Fix pointer-bool-converesion warningsMatthew Jordan
This patch fixes several warnings pointed out by the clang compiler. * chan_pjsip: Removed check for data->text, as it will always be non-NULL. * app_minivm: Fixed evaluation of etemplate->locale, which will always evaluate to 'true'. This patch changes the evaluation to use ast_strlen_zero. * app_queue: - Fixed evaluation of qe->parent->monfmt, which always evaluates to true. Instead, we just check to see if the dereferenced pointer evaluates to true. - Fixed evaluation of mem->state_interface, wrapping it with a call to ast_strlen_zero. * res_smdi: Wrapped search_msg->mesg_desk_term with calls to ast_strlen_zero. Review: https://reviewboard.asterisk.org/r/4541 ASTERISK-24917 Reported by: dkdegroot patches: rb4541.patch submitted by dkdegroot (License 6600) ........ Merged revisions 434285 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 434286 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434287 65c4cc65-6c06-0410-ace0-fbb531ad65f3