- Mar 31, 2020
-
-
Kevin Harwell authored
If a frame handling routine returns a list of frames (vs. a single frame) those frames are never passed to a tech's write_stream handler even if one is available. For instance, if a codec translation occurred and that codec returned multiple frames then those particular frames were always only sent to the tech's "write" handler. If that tech (pjsip for example) was stream capable then those frames were essentially ignored. Thus resulting in bad audio. This patch makes it so the "write_stream" handler is appropriately called for all cases, and for all frames if available. ASTERISK-28795 #close Change-Id: I868faea0b73a07ed5a32c2b05bb9cf4b586f739d
-
sungtae kim authored
The dial application had 80 characters of destination length limitation. But this limitation causes unexpected dial string cut if the dial string is long. Removed unnecessary limited buffer to support longer dial destination. ASTERISK-27946 Change-Id: I72c8f0319a4b47e8180817a66a7e9bde063cb330
-
Jaco Kroon authored
named_acl.c (which is really a named_ha) now uses ast_ha_output. I've also updated main/manager.c to output the actual ACL on "manager show user <username>" if one is set. If this works then we can add similar to other modules as required. Change-Id: I0ec9876a90dddd379c80ec078d48e3ee6991eb0f
-
- Mar 17, 2020
-
-
Jaco Kroon authored
binutils 2.34 merged this commit: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;\ h=fd3619828e94a24a92cddec42cbc0ab33352eeb4 Which effectively does things like: -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) +#define bfd_section_size(sec) ((sec)->size) So in order to remain backwards compatible we need to detect this API change, and adjust accordingly. The simplest is to notice that the bfd_get_section_size and bfd_get_section_vma MACROs are no longer defined, and define then onto the new API. The alternative is to litter the code with a number of #ifdef #else #endif splatters right through the code. Change-Id: I3efe0f8e8f3e338d16fcbc2b26a505367b6e172f
-
- Mar 13, 2020
-
-
Sean Bright authored
Change-Id: Ie0eca23b8e6f4c7d9846b6013d79099314d90ef5
-
Joshua C. Colp authored
Given a scenario where MixMonitor was initiated over AMI it was possible for the channel and MixMonitor thread to remain alive past hang up of the channel. This scenario required the AMI initiated MixMonitor to retrieve the channel, a hangup to occur on the channel in another thread, and then for MixMonitor to actually start. If this occurred the MixMonitor thread would remain alive indefinitely and the channel reference would remain. This change ensures that audiohooks are never able to be attached to channels that have been hung up. An additional fix has also been done in app_mixmonitor to properly release the channel reference if this occurs. ASTERISK-28780 Change-Id: I8044c06daa06f0f16607788c596f55623be26f58
-
- Mar 06, 2020
-
-
Sean Bright authored
A regular expression in a NAPTR response record can have a trailing 'i' flag to indicate that the expression should be evaluated in a case-insensitive way. We were not checking for that flag which caused the record parsing to fail on otherwise valid input. Although this change will initially go into Asterisk 13, 16, and 17, it is my intention to replace the majority of this code in 16 and up - including this fix - by changing enum.c to consume the new DNS API which duplicates most of this logic already. Asterisk 13 doesn't have the DNS API, so this fix will be as good as it gets. ASTERISK-26711 #close Reported by: Vitold Change-Id: I33943a5b3e7539c6dca3a5079982ee15a08186f0
-
- Mar 04, 2020
-
-
Sean Bright authored
The ast_get_txt() API function (and by extension, the TXTCIDNAME dialplan function) were broken in 65b83815 such that we would never actually make a DNS TXT query as described. This patch restores the documented behavior. ASTERISK-19460 #close Reported by: George Joseph Change-Id: I1b19aea711488cb1ecd63843cddce05010e39376
-
- Mar 02, 2020
-
-
Kevin Harwell authored
When a text message was received any associated variable was not written to the ARI TextMessageReceived event. This occurred because Asterisk only wrote out "send" variables. However, even those "send" variables would fail ARI validation due to a TextMessageVariable formatting bug. Since it seems the TextMessageReceived event has never been able to include actual variables it was decided to remove the TextMessageVariable object type from ARI, and simply return a JSON object of key/value pairs for variables. This aligns more with how the ARI sendMessage handles variables, and other places in ARI. ASTERISK-28755 #close Change-Id: Ia6051c01a53b30cf7edef84c27df4ed4479b8b6f
-
- Feb 24, 2020
-
-
Kevin Harwell authored
There were a couple places where the format cap function parameter was not 'const' when it should have been. This patch makes them 'const'. Change-Id: Ife753fb16a962d842a6b44f45363a61a66bfdb2e
-
Walter Doekes authored
There are exceptions for plural objects, but they are detected using the supplied NUMBER, not using an extra option. Change-Id: I95d1d1b2796b1aba92048a2dbae8a3856ed8a113
-
- Feb 20, 2020
-
-
Joshua C. Colp authored
This change extends the Sorcery API to allow a wizard to be told to explicitly reload objects or a specific object type even if the wizard believes that nothing has changed. This has been leveraged by res_pjsip and res_pjsip_acl to reload endpoints and PJSIP ACLs when a named ACL changes. ASTERISK-28697 Change-Id: Ib8fee9bd9dd490db635132c479127a4114c1ca0b
-
- Feb 19, 2020
-
-
Sean Bright authored
Dump OpenSSL's error stack to the error log when things fail. ASTERISK-28750 #close Reported by: Martin Zeh Change-Id: Ib63cd0df20275586e68ac4c2ddad222ed7bd9c0a
-
- Feb 18, 2020
-
-
Joshua C. Colp authored
This change adds support to bridge_softmix to allow the addition and removal of additional video source streams. When such a change occurs each participant is renegotiated as needed to reflect the update. If another video source is added then each participant gets another source. If a video source is removed then it is removed from each participant. This functionality allows you to have both your webcam and screenshare providing video if you desire, or even more streams. Mapping has been changed to use the topology index on the source channel as a unique identifier for outgoing participant streams, this will never change and provides an easy way to establish the mapping. The bridge_simple and bridge_native_rtp modules have also been updated to renegotiate when the stream topology of a party changes allowing the same behavior to occur as added to bridge_softmix. If a screen share is added then the opposite party is renegotiated. If that screen share is removed then the opposite party is renegotiated again. Some additional fixes are also included in here. Stream state is now conveyed in SDP so sendonly/recvonly/inactive streams can be requested. Removed streams now also remove previous state from themselves so consumers don't get confused. ASTERISK-28733 Change-Id: I93f41fb41b85646bef71408111c17ccea30cb0c5
-
- Feb 17, 2020
-
-
Sean Bright authored
When opening a file for writing, Asterisk silently converts filenames ending with 'wav49' to 'WAV.' We aren't taking that in to account when setting the MIXMONITOR_FILENAME variable in MixMonitor. * If the user wants to write to a wav49 file, make sure that it is reflected properly in MIXMONITOR_FILENAME. * Add a note to the documentation describing this behavior. * Add a note in main/file.c indicating that app_mixmonitor needs to be changed if the logic in build_filename was changed. ASTERISK-24798 #close Reported by: xrobau Change-Id: I384691ce624eb55c80a125b9ca206d2d691c574c
-
- Feb 15, 2020
-
-
Joshua C. Colp authored
Change-Id: Ic9b4afcc5398e7f46314419fc3c90433d818e35c
-
- Feb 03, 2020
-
-
George Joseph authored
In order to reduce the amount of AMI and ARI events generated, the global "Message/ast_msg_queue" channel can be set to suppress it's normal channel housekeeping events such as "Newexten", "VarSet", etc. This can greatly reduce load on the manager and ARI applications when the Digium Phone Module for Asterisk is in use. To enable, set "hide_messaging_ami_events" in asterisk.conf to "yes" In Asterisk versions <18, the default is "no" preserving existing behavior. Beginning with Asterisk 18, the option will default to "yes". NOTE: This change does not affect UserEvents or the ARI TextMessageReceived events. * Added the "hide_messaging_ami_events" option to asterisk.conf. * Changed message.c to set the AST_CHAN_TP_INTERNAL property on the "Message/ast_msg_queue" channel if the option is set in asterisk.conf. This suppresses the reporting of the events. Change-Id: Ia2e3516d43f4e0df994fc6598565d6bba2d7018b
-
- Jan 22, 2020
-
-
George Joseph authored
When Alice calls Bob and Bob does a blind transfer to Charlie, Bob's bridge leave event generates a finalize on both the party_a and party_b CDRs but while the party_a CDR has the correct end time set from the event time, party_b's leg did not. This caused that CDR's end time to be equal to the answered time and resulted in a billsec of 0. * We now pass the bridge leave message event time to cdr_object_party_b_left_bridge_cb() and set it on that CDR before calling cdr_object_finalize() on it. NOTE: This issue affected transfers using chan_sip most of the time but also occasionally affected chan_pjsip probably due to message timing. ASTERISK-28677 Reported by: Maciej Michno Change-Id: I790720f1e7326f9b8ce8293028743b0ef0fb2cca
-
Sean Bright authored
Add a new configuration option 'enable_status' which allows the /httpstatus URI handler to be administratively disabled. We also no longer unconditionally register the /static and /httpstatus URI handlers, but instead do it based upon configuration. Behavior change: If enable_static was turned off, the URI handler was still installed but returned a 403 when it was accessed. Because we now register/unregister the URI handlers as appropriate, if the /static URI is disabled we will return a 404 instead. Additionally: * Change 'enablestatic' to 'enable_static' but keep the former for backwards compatibility. * Improve some internal variable names ASTERISK-28710 #close Change-Id: I647510f796473793b1d3ce1beb32659813be69e1
-
- Jan 20, 2020
-
-
Sean Bright authored
SILK @ 24kHz is not shown in the 'core show translation' output because of an off-by-one-error. Discovered while looking into ASTERISK~19871. ASTERISK-28706 Reported by: Sean Bright Change-Id: Ie1a551a8a484e07b45c8699cc0c90f1061029510
-
- Jan 16, 2020
-
-
Sean Bright authored
In af90afd9, Japanese language support was added to app_voicemail and main/say.c, but the leading whitespace is not consistent with Asterisk coding guidelines. This patch fixes that. Whitespace only, no functional change. ASTERISK~23324 Reported by: Kevin McCoy Change-Id: I72c725f5930084673749bd7c9cc426a987f08e87
-
Sean Bright authored
ASTERISK-28695 #close Reported by: Kevin Flyn Change-Id: Ief098bb6eb77378daeace8f97ba30701c8de55b8
-
- Jan 08, 2020
-
-
Sean Bright authored
Adds source port matching support when IP matching is used: [example] type = identify match = 1.2.3.4:5060/32, 1.2.3.4:6000/32, asterisk.org:4444 If the IP matches but the source port does not, we reject and search for alternatives. SRV lookups are still performed if enabled (srv_lookups = yes), unless the configured FQDN includes a port number in which case just a host lookup is performed. ASTERISK-28639 #close Reported by: Mitch Claborn Change-Id: I256d5bd5d478b95f526e2f80ace31b690eebba92
-
- Jan 06, 2020
-
-
George Joseph authored
When a topic is created for an object, its name is only <object>:<uniqueid> For example: bridge:cb68b3a8-fce7-4738-8a17-d7847562f020 When a topic is added to a pool, its name has the pool's topic name prepended. For example: bridge:all/bridge:cb68b3a8-fce7-4738-8a17-d7847562f020 The topic_pool_entry's name however, is only what was passed in to stasis_topic_pool_get_topic which is bridge:cb68b3a8-fce7-4738-8a17-d7847562f020 That's actually correct because the entry is qualified by the pool that's in. When you're ready to delete the entry from the pool, you retrieve the tropic name from the object but since it now has the pool's topic name prepended, it won't be found in the pool container. Fix: * Modified stasis_topic_pool_delete_topic() to skip past the pool topic's name, if it was prepended to the topic name, before searching the container for a pool entry. ASTERISK-28633 Reported by: Joeran Vinzens Change-Id: I4396aa69dd83e4ab84c5b91b39293cfdbcf483e6
-
Richard Mudgett authored
The Bridge application was inconsistent if the channel to bridge with is not specified. If no parameters are given then a warning is issued and the current channel is hung up. If options are given but no channel is specified then a warning is issued and the current channel is not hung up. * Made the Bridge application give a verbose message instead of a warning if the channel to bridge with is not specified and made not hang up the current channel. As a result dialplan no longer needs to check if a channel name is passed before calling Bridge and simply needs to check the BRIDGERESULT channel variable instead. This is something you likely want your dialplan to do anyway. * Fixed up L() option warning message. It is up to the caller to determine if the channel is hung up because of the warning. Dial() hangs up the current channel while Bridge() does not. Change-Id: I44349a8dc3912397f28852777de04f19e7bb9c73
-
- Jan 02, 2020
-
-
Sean Bright authored
When TLS is in use, checking the readiness of the underlying FD is insufficient for determining if there is data available to be read. So before polling the FD, check if there is any buffered data in the TLS layer and use that first. ASTERISK-28562 #close Reported by: Robert Sutton Change-Id: I95fcb3e2004700d5cf8e5ee04943f0115b15e10d
-
- Dec 27, 2019
-
-
Sean Bright authored
The db_init() function ultimately calls db_sync() which signals the condition before it is initialized. Change-Id: Id4a4e025b637bc4ac7d90557fcb71d56598892ab
-
- Dec 19, 2019
-
-
Sean Bright authored
ASTERISK-28667 #close Change-Id: I4767ed365c98f3e1587b7653321048a31d8a53b2
-
Kevin Reeves authored
When testing for the existance of a file, the media cache is searched even if the file has no chance of being in it. This can cause performance issues as the media cache size increases. As a result, calls to applications like Read and Playback using local files must scan through the media cache before playing. Under load and with a large cache, this can delay the playback of those files. This patch updates the function that checks for the existance of a file to only consult the media cache database if the requested file is a remote path. It introduces a new is_remote_path() function in main/file.c. ASTERISK-28625 #close Reported-by:
<kevin@phoneburner.com> Change-Id: If91137493732d9034dafa381c081c69274a7dcc9
-
- Dec 16, 2019
-
-
Joshua C. Colp authored
ConfBridge has the ability to move between different sample rates for mixing the conference bridge. Up until now there has only been the ability to set the conference bridge to mix at a specific sample rate, or to let it move between sample rates as necessary. This change adds the ability to configure a conference bridge with a maximum sample rate so it can move between sample rates but only up to the configured maximum. ASTERISK-28658 Change-Id: Idff80896ccfb8a58a816e4ce9ac4ebde785963ee
-
- Dec 12, 2019
-
-
Jaco Kroon authored
Due to use in res_rtp_asterisk there is a need to be able to apply an ACL without logging any invalid/denies. It's probably sensible to at least validate the ACL once directly after load and report invalid ACLs. Change-Id: I256169229d945ca7c1bbf228fc492d91df345843 Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
- Dec 02, 2019
-
-
George Joseph authored
The problem is essentially the same as in ASTERISK~28245. Besides the direct media scenario we have an additional scenario where a special client is involved. This device mutes audio by default in transmit direction (no rtp frames) and activates audio only by a foot switch. In this situation dtmf input (pin for conferences, transfer features codes , etc) using SIP INFO mode is not understood properly especially when SIP INFO messages are sent quickly. This patch ensures that SIP INFO frames are properly queued and processed in the above scenario. The patch also corrects situations where successive dtmf events are received quicker than the signalled event duration (plus minimum gap/pause) allows, i.e. DTMF events have to be buffered in the ast channel read queue and emulation has to be processed asynchronously at slower speed. Reported by: Thomas Arimont patches: trigger_dtmf_emulation.patch submitted by Thomas Arimont (license 5525) Change-Id: I309bf61dd065c9978c8e48f5b9a936ab47de64c2
-
- Nov 22, 2019
-
-
Sean Bright authored
* Use ast_cli_completion_add() to improve performance when large number of cached items are present. * Only complete one URI for commands that only accept a single URI. * Change command documentation to wrap at 80 characters to improve readability. Change-Id: Iedb0a2c3541e49561bc231dca2dcc0ebd8612902
-
- Nov 21, 2019
-
-
George Joseph authored
If an AMI user without the "system" authorization calls the Originate AMI command with the Originate application, the second Originate could run the "System" command. Action: Originate Channel: Local/1111 Application: Originate Data: Local/2222,app,System,touch /tmp/owned If the "system" authorization isn't set, we now block the Originate app as well as the System, Exec, etc. apps. ASTERISK-28580 Reported by: Eliel Sardañons Change-Id: Ic4c9dedc34c426f03c8c14fce334a71386d8a5fa
-
- Nov 18, 2019
-
-
Alexei Gradinari authored
The current code sets alert levels starting from index 1. Need to set on whole pool starting from index 0. Change-Id: I5decbb43160954fb9a512f04302637fc666b6f5d
-
Kevin Harwell authored
This patch fixes several issues reported by the lgtm code analysis tool: https://lgtm.com/projects/g/asterisk/asterisk Not all reported issues were addressed in this patch. This patch mostly fixes confirmed reported errors, potential problematic code points, and a few other "low hanging" warnings or recommendations found in core supported modules. These include, but are not limited to the following: * innapropriate stack allocation in loops * buffer overflows * variable declaration "hiding" another variable declaration * comparisons results that are always the same * ambiguously signed bit-field members * missing header guards Change-Id: Id4a881686605d26c94ab5409bc70fcc21efacc25
-
- Nov 08, 2019
-
-
Corey Farrell authored
* Pass caller information to frame allocation functions. * Disable caching as it interfers with MALLOC_DEBUG reporting. * Stop using ast_calloc_cache. Change-Id: Id343cd80a3db941d2daefde2a060750fea8cd260
-
- Oct 09, 2019
-
-
Kevin Harwell authored
Here's the basic scenario that occurred when executing an AMI fast originate while at the same time something else locks the channels container, and also wants a lock on the dialed channel: 1. pbx_outgoing_attempt obtains a lock on a dialed channel 2. concurrently another thread obtains a lock on the channels container, and subsequently requests a lock on the dialed channel. It waits on #1. For instance, "core show channel <dialed channel" 3. the outgoing call does not fail, but ends before the pbx_outgoing_attempt function exits 4. pbx_outgoing_attempt function exits, the outgoing structure destructs, and attempts to hang up the dialed channel 5. hang up tries to obtain the channels container lock, but can't due to #2. 6. Asterisk is deadlocked. The solution was to allow the pbx_outgoing_exec function to "steal" ownership of the dialed channel, and handle hanging it up. The channel now is either hung up prior to it being potentially locked by the initiating thread, or if locked the hang up takes place in a different thread, thus alleviating the deadlock. ASTERISK-28561 patches: iliketrains.diff submitted by Joshua Colp (license 5000) Change-Id: I51b42b92dde8f2215b69bb509e28667ee3a3853a
-
- Oct 07, 2019
-
-
Kevin Harwell authored
Serializer pools have previously existed in Asterisk. However, for the most part the code has been duplicated across modules. This patch abstracts the code into an 'ast_serializer_pool' object. As well the code is now centralized in serializer.c/h. In addition serializer pools can now optionally be monitored by a shutdown group. This will prevent the pool from being destroyed until all serializers have completed. Change-Id: Ib1e906144b90ffd4d5ed9826f0b719ca9c6d2971
-
- Oct 01, 2019
-
-
Joshua Colp authored
This avoids use of the global variable and ensures topic_all remains active until all topics are freed. ASTERISK-28553 patches: ASTERISK-28553.patch by coreyfarrell (license 5909) Change-Id: I9a8cd8977f3c3a6aa00783f8336d2cfb9c2820f1
-