- Mar 20, 2023
-
-
Sean Bright authored
This reverts commit 56051d1a. Reason for revert: Behavior change that breaks existing dialplan. ASTERISK-30472 #close Change-Id: I83bed3b800d36228a04ded0a6164b795f7f16bd6
-
- Mar 09, 2023
-
- Mar 02, 2023
-
-
Asterisk Development Team authored
- Mar 01, 2023
-
-
George Joseph authored
* Added a new function ast_utf8_replace_invalid_chars() to utf8.c that copies a string replacing any invalid UTF-8 sequences with the Unicode specified U+FFFD replacement character. For example: "abc\xffdef" becomes "abc\uFFFDdef". Any UTF-8 compliant implementation will show that character as a � character. * Updated res_pjsip:set_id_from_hdr() to use ast_utf8_replace_invalid_chars and print a warning if any invalid sequences were found during the copy. * Updated stasis_channels:ast_channel_publish_varset to use ast_utf8_replace_invalid_chars and print a warning if any invalid sequences were found during the copy. ASTERISK-27830 Change-Id: I4ffbdb19c80bf0efc675d40078a3ca4f85c567d8
-
- Feb 28, 2023
-
-
Sean Bright authored
This avoids buffer overflow errors when running tests that capture output from child processes. This also corrects a copypasta in an off-nominal error message. Change-Id: Ib482847a3515364f14c7e7a0c0a4213851ddb10d
-
Naveen Albert authored
ASTERISK_29392 (a security fix) introduced a regression by not processing frames when we don't have an audio format. Currently, chan_iax2 only calls jb_get to read frames from the jitterbuffer when the voiceformat has been set on the pvt. However, this only happens when we receive a voice frame, which means that prior to receiving voice frames, other types of frames get stalled completely in the jitterbuffer. To fix this, we now fallback to using the format negotiated during call setup until we've actually received a voice frame with a format. This ensures we're always able to read from the jitterbuffer. ASTERISK-30354 #close ASTERISK-30162 #close Change-Id: Ie4fd1e8e088a145ad89e0427c2100a530e964fe9
-
- Feb 27, 2023
-
-
Sean Bright authored
`getcwd(…)` is decorated with the `warn_unused_result` attribute and therefore needs its return value checked. Change-Id: Idcccb20a0abf293202c28633d0e9ee0f6a9dbe93
-
Nick French authored
Asterisk makefiles auto-detect SSL library availability, then they assume that pjproject makefiles will also autodetect an SSL library at the same time, so they do not pass on the autodetection result to pjproject. This normally works, except the pjproject makefiles disables autodetection when cross-compiling. Fix by explicitly configuring pjproject to use SSL if we have been told to use it or it was autodetected ASTERISK-30424 #close Change-Id: I8fe2999ea46710e21d1d55a1bed92769c6ebded9
-
Mike Bradeen authored
Adds 'e' option to allow Read() to return the terminator as the dialed digits in the case where only the terminator is entered. ie; if "#" is entered, return "#" if the 'e' option is set and "" if it is not. ASTERISK-30411 Change-Id: I49f3221824330a193a20c660f99da0f1fc2cbbc5
-
cmaj authored
Phones moving between subnets on multi-homed server have their initially connected interface IP cached in the SERVER variable, even when it is not specified in the configuration files. This prevents phones from obtaining the correct SERVER variable value when they move to another subnet. ASTERISK-30388 #close Reported-by: cmaj Change-Id: I1d18987a9d58e85556b4c4a6814ce7006524cc92
-
Mike Bradeen authored
Adds 's' option to skip calling the extension and instead set the extension as DIRECTORY_EXTEN channel variable. ASTERISK-30405 Change-Id: Ib9d9db1ba5b7524594c640461b4aa8f752db8299
-
Mike Bradeen authored
Adds a new option to SendDTMF() which will answer the specified channel if it is not already up. If no channel is specified, the current channel will be answered instead. ASTERISK-30422 Change-Id: Iddcbd501fcdf9fef0f453b7a8115a90b11f1d085
-
- Feb 23, 2023
-
-
Mike Bradeen authored
contributed pjproject - patch to check sub->pending_notify in evsub.c:on_tsx_state before calling pjsip_evsub_send_request() res_pjsip_pubsub - change post pjsip 2.13 behavior to use pubsub_on_refresh_timeout to avoid the ao2_cleanup call on the sub_tree. This is is because the final NOTIFY send is no longer the last place the sub_tree is referenced. ASTERISK-30419 Change-Id: Ib5cc662ce578e9adcda312e16c58a10b6453e438
-
- Feb 20, 2023
-
-
Sean Bright authored
ASTERISK-30417 #close Change-Id: I7534e7a925bf92a7b5a5347f5f54225768c162fe
-
- Feb 13, 2023
-
-
Sean Bright authored
Several queue fields were not being set to their default value during a reload. Additionally added some sample configuration options that were missing from queues.conf.sample. Change-Id: I3a88c7877af91752b1b46a0c087384f7eb9c47e4
-
- Feb 07, 2023
-
-
Mike Bradeen authored
Removed multiple patches. Code chages in res_pjsip_pubsub due to changes in evsub. Pjsip now calls on_evsub_state() before on_rx_refresh(), so the sub tree deletion that used to take place in on_evsub_state() now must take place in on_rx_refresh(). Additionally, pjsip now requires that you send the NOTIFY from within on_rx_refresh(), otherwise it will assert when going to send the 200 OK. The idea is that it will look for this NOTIFY and cache it until after sending the response in order to deal with the self-imposed message mis-order. Asterisk previously dealt with this by pushing the NOTIFY in on_rx_refresh(), but pjsip now forces us to use it's method. Changes were required to configure in order to detect which way pjsip handles this as the two are not compatible for the reasons mentioned above. A corresponding change in testsuite is required in order to deal with the small interal timing changes caused by moving the NOTIFY send. ASTERISK-30325 Change-Id: I50b00cac89d950d3511d7b250a1c641965d9fe7f
-
- Jan 31, 2023
-
-
Sean Bright authored
Change-Id: Ic50e95b4fc10f74ab15416d908e8a87ee8ec2f85
-
Naveen Albert authored
Adds the Signal and WaitForSignal applications, which can be used for inter-channel signaling in the dialplan. Signal supports sending a signal to other channels listening for a signal of the same name, with an optional data payload. The signal is received by all channels waiting for that named signal. ASTERISK-29810 #close Change-Id: Ic34439de3d60f8609357666a465c354d81f5fef3
-
- Jan 30, 2023
-
-
Mike Bradeen authored
Adds option to app_directory to specify a filename from which to read configuration instead of voicemail.conf ie; same => n,Directory(,,c(directory.conf)) This configuration should contain a list of extensions using the voicemail.conf format, ie; 2020=2020,Dog Dog,,,,attach=no|saycid=no|envelope=no|delete=no ASTERISK-30404 Change-Id: Id58ccb1344ad1e563fa10db12f172fbd104a9d13
-
Naveen Albert authored
Adds support for arrays to JSON_DECODE by allowing the user to print out entire arrays or index a particular key or print the number of keys in a JSON array. Additionally, adds support for recursively iterating a JSON tree in a single function call, making it easier to parse JSON results with multiple levels. A maximum depth is imposed to prevent potentially blowing the stack. Also fixes a bug with the unit tests causing an empty string to be printed instead of the actual test result. ASTERISK-29913 #close Change-Id: I603940b216a3911b498fc6583b18934011ef5d5b
-
sungtae kim authored
Added NULL pointer check and channel lock to prevent resource release while the chanspy is processing. ASTERISK-29604 Change-Id: Ibdc675f98052da32333b19685b1708a3751b6d24
-
Sean Bright authored
Variable references within global variable assignments are now expanded rather than being included literally. ASTERISK-30406 #close Change-Id: I136e8d6395e90a4c92d9777a46a7bc3edb08d05d
-
- Jan 26, 2023
-
-
Naveen Albert authored
Adds the overlap_context option, which can be used to explicitly specify a context to use for overlap dialing extension matches, rather than forcibly using the context configured for the endpoint. ASTERISK-30262 #close Change-Id: Ibbcd4a8b11402428a187fb56b8d4e7408774a0db
-
- Jan 13, 2023
-
-
Sean Bright authored
In Asterisk 11, if a channel was redirected away during Playback(), the PLAYBACKSTATUS variable would be set to SUCCESS. In Asterisk 12 (specifically commit 7d9871b3) that behavior was inadvertently changed and the same operation would result in the PLAYBACKSTATUS variable being set to FAILED. The Asterisk 11 behavior has been restored. Partial fix for ASTERISK~25661. Change-Id: I53f54e56b59b61c99403a481b6cb8d88b5a559ff
-
- Jan 12, 2023
-
-
George Joseph authored
Rounding issues with double math were causing rtp timestamp slips in outgoing packets. We're now back to integer math and are getting no more slips. ASTERISK-30391 Change-Id: I6ba992b49ffdf9ebea074581dfa784a188c661a4
-
- Jan 10, 2023
-
-
Alexei Gradinari authored
Each playback of WAV files results in logging "Skipping unknown block 'LIST'". To prevent unnecessary flooding of this DEBUG log this patch replaces ast_log(LOG_DEBUG, ...) by ast_debug(1, ...). Change-Id: Iaa09cf19c5348a05385518fdb8cb181b45fe05f0
-
Igor Goncharovsky authored
Add ability to set HANGUPCAUSE when SIP causecode received in BYE (in addition to currently supported Q.850). ASTERISK-30319 #close Change-Id: I3f55622dc680ce713a2ffb5a458ef5dd39fcf645
-
- Jan 09, 2023
-
-
George Joseph authored
----------------- This commit reinstates MES with some casting fixes to the functions in time.h that convert between doubles and timeval structures. The casting issues were causing incorrect timestamps to be calculated which caused transcoding from/to G722 to produce bad or no audio. ASTERISK-30391 ----------------- This module has been updated to provide additional quality statistics in the form of an Asterisk Media Experience Score. The score is avilable using the same mechanisms you'd use to retrieve jitter, loss, and rtt statistics. For more information about the score and how to retrieve it, see https://wiki.asterisk.org/wiki/display/AST/Media+Experience+Score * Updated chan_pjsip to set quality channel variables when a call ends. * Updated channels/pjsip/dialplan_functions.c to add the ability to retrieve the MES along with the existing rtcp stats when using the CHANNEL dialplan function. * Added the ast_debug_rtp_is_allowed and ast_debug_rtcp_is_allowed checks for debugging purposes. * Added several function to time.h for manipulating time-in-samples and times represented as double seconds. * Updated rtp_engine.c to pass through the MES when stats are requested. Also debug output that dumps the stats when an rtp instance is destroyed. * Updated res_rtp_asterisk.c to implement the calculation of the MES. In the process, also had to update the calculation of jitter. Many debugging statements were also changed to be more informative. * Added a unit test for internal testing. The test should not be run during normal operation and is disabled by default. Change-Id: I4fce265965e68c3fdfeca55e614371ee69c65038
-
George Joseph authored
This reverts commit d454801c. Reason for revert: Issue when transcoding to/from g722 Change-Id: I09f49e171b1661548657a9ba7a978c29d0b5be86
-
- Jan 05, 2023
-
-
Naveen Albert authored
Currently, if a module declines to load, dlopen is called to register the module but dlclose never gets called. Furthermore, loader.c currently doesn't allow dlclose to ever get called on the module, since it declined to load and the unload function bails early in this case. This can be problematic if a module is updated, since the new module cannot be loaded into memory since we haven't closed all references to it. To fix this, we now allow modules to be unloaded, even if they never "loaded" in Asterisk itself, so that dlclose is called and the module can be properly cleaned up, allowing the updated module to be loaded from scratch next time. ASTERISK-30345 #close Change-Id: Ifc743aadfa85ebe3284e02a63e124dafa64988d5
-
Naveen Albert authored
Adds a new application, Broadcast, which can be used for one-to-many transmission and many-to-one reception of channel audio in Asterisk. This is similar to ChanSpy, except it is designed for multiple channel targets instead of a single one. This can make certain kinds of audio manipulation more efficient and streamlined. New kinds of audio injection impossible with ChanSpy are also made possible. ASTERISK-30180 #close Change-Id: I7ba72f765dbab9b58deeae028baca3f4f8377726
-
Naveen Albert authored
Since text frames contain a text body, make FRAME_TRACE more useful for text frames by actually printing the text. ASTERISK-30353 #close Change-Id: Ia6ce3d15cecd7a673a528d34faac86854a2bab50
-
- Jan 04, 2023
-
-
Naveen Albert authored
json.h contains macros to get a string and an integer from a JSON object. However, the macro to do this for JSON reals is missing. This adds that. ASTERISK-30361 #close Change-Id: I8d0e28d763febf27b05801cdc83b73282aa6ee7a
-
Naveen Albert authored
The if statement here is always false after the for loop finishes, so variables are never appended. This removes that to properly append to the end of the variable list. ASTERISK-30351 #close Reported by: Sebastian Gutierrez Change-Id: I1b7f8b85a8918f6a814cb933a479d4278cf16199
-
- Jan 03, 2023
-
-
George Joseph authored
When Asterisk receives a new websocket conenction, it creates a new pjsip transport for it and copies connection data into it. The transport manager then uses the remote IP address and port on the transport to create a monitor for each connection. However, the remote port wasn't being copied, only the IP address which meant that the transport manager was creating only 1 monitoring entry for all websocket connections from the same IP address. Therefore, if one of those connections failed, it deleted the transport taking all the the connections from that same IP address with it. * We now copy the remote port into the created transport and the transport manager behaves correctly. ASTERISK-30369 Change-Id: Ib506d40897ea6286455ac0be4dfbb0ed43b727e1
-
Boris P. Korzun authored
If native HTTP is disabled but HTTPS is enabled and status page enabled too, Core/HTTP crashes while loading. 'global_http_server' references to NULL, but the status page tries to dereference it. The patch adds a check for HTTP is enabled. ASTERISK-30379 #close Change-Id: I11b02fc920b72aaed9c809fc43210523ccfdc249
-
Holger Hans Peter Freyther authored
Do not crash when a URL has no path component as in this case the ast_uri_path function will return NULL. Make the code cope with not having a path. The below would crash > media cache create http://google.com /tmp/foo.wav Thread 1 "asterisk" received signal SIGSEGV, Segmentation fault. 0x0000ffff836616cc in strrchr () from /lib/aarch64-linux-gnu/libc.so.6 (gdb) bt #0 0x0000ffff836616cc in strrchr () from /lib/aarch64-linux-gnu/libc.so.6 #1 0x0000ffff43d43a78 in file_extension_from_string (str=<optimized out>, buffer=buffer@entry=0xffffca9973c0 "", capacity=capacity@entry=64) at res_http_media_cache.c:288 #2 0x0000ffff43d43bac in file_extension_from_url_path (bucket_file=bucket_file@entry=0x3bf96568, buffer=buffer@entry=0xffffca9973c0 "", capacity=capacity@entry=64) at res_http_media_cache.c:378 #3 0x0000ffff43d43c74 in bucket_file_set_extension (bucket_file=bucket_file@entry=0x3bf96568) at res_http_media_cache.c:392 #4 0x0000ffff43d43d10 in bucket_file_run_curl (bucket_file=0x3bf96568) at res_http_media_cache.c:555 #5 0x0000ffff43d43f74 in bucket_http_wizard_create (sorcery=<optimized out>, data=<optimized out>, object=<optimized out>) at res_http_media_cache.c:613 #6 0x0000000000487638 in bucket_file_wizard_create (sorcery=<optimized out>, data=<optimized out>, object=<optimized out>) at bucket.c:191 #7 0x0000000000554408 in sorcery_wizard_create (object_wizard=object_wizard@entry=0x3b9f0718, details=details@entry=0xffffca9974a8) at sorcery.c:2027 #8 0x0000000000559698 in ast_sorcery_create (sorcery=<optimized out>, object=object@entry=0x3bf96568) at sorcery.c:2077 #9 0x00000000004893a4 in ast_bucket_file_create (file=file@entry=0x3bf96568) at bucket.c:727 #10 0x00000000004f877c in ast_media_cache_create_or_update (uri=0x3bfa1103 "https://google.com", file_path=0x3bfa1116 "/tmp/foo.wav", metadata=metadata@entry=0x0) at media_cache.c:335 #11 0x00000000004f88ec in media_cache_handle_create_item (e=<optimized out>, cmd=<optimized out>, a=0xffffca9976b8) at media_cache.c:640 ASTERISK-30375 #close Change-Id: I6a9433688cb5d3d4be8758b7642d923bdde6c273
-
George Joseph authored
This module has been updated to provide additional quality statistics in the form of an Asterisk Media Experience Score. The score is avilable using the same mechanisms you'd use to retrieve jitter, loss, and rtt statistics. For more information about the score and how to retrieve it, see https://wiki.asterisk.org/wiki/display/AST/Media+Experience+Score * Updated chan_pjsip to set quality channel variables when a call ends. * Updated channels/pjsip/dialplan_functions.c to add the ability to retrieve the MES along with the existing rtcp stats when using the CHANNEL dialplan function. * Added the ast_debug_rtp_is_allowed and ast_debug_rtcp_is_allowed checks for debugging purposes. * Added several function to time.h for manipulating time-in-samples and times represented as double seconds. * Updated rtp_engine.c to pass through the MES when stats are requested. Also debug output that dumps the stats when an rtp instance is destroyed. * Updated res_rtp_asterisk.c to implement the calculation of the MES. In the process, also had to update the calculation of jitter. Many debugging statements were also changed to be more informative. * Added a unit test for internal testing. The test should not be run during normal operation and is disabled by default. ASTERISK-30280 Change-Id: I458cb9a311e8e5dc1db769b8babbcf2e093f107a
-
- Dec 22, 2022
-
-
Naveen Albert authored
pbx_exec makes a channel snapshot before executing applications. This doesn't cause an issue during normal dialplan execution where pbx_exec is called over and over again in succession. However, if pbx_exec is called "one off", e.g. using ast_pbx_exec_application, then a channel snapshot never ends up getting made after the executed application returns, and inaccurate snapshot information will linger for a while, causing "core show channels", etc. to show erroneous info. This is fixed by manually making a channel snapshot at the end of ast_pbx_exec_application, since we anticipate that pbx_exec might not get called again immediately. ASTERISK-30367 #close Change-Id: I2a5131053aa9d11badbc0ef2ef40b1f83d0af086
-