- 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
-
- Dec 20, 2022
-
-
Naveen Albert authored
Currently, there is no Caller ID available to us when checking for an extension match when handling INVITEs. As a result, extension patterns that depend on the Caller ID are not matched and calls may be incorrectly rejected. The Caller ID is not available because the supplement that adds Caller ID to the session does not execute until after this check. Supplement callbacks cannot yet be executed at this point since the session is not yet in the appropriate state. To fix this without impacting existing behavior, the Caller ID number is now retrieved before attempting to pattern match. This ensures pattern matching works correctly and there is no behavior change to the way supplements are called. ASTERISK-28767 #close Change-Id: Iec7f5a3b90e51b65ccf74342f96bf80314b7cfc7
-
Ben Ford authored
When a call is put on hold and it has moh_passthrough and rtp_timeout set on the endpoint, the wrong timeout will be used. rtp_timeout_hold is expected to be used, but rtp_timeout is used instead. This change adds a couple of checks for locally_held to determine if rtp_timeout_hold needs to be used instead of rtp_timeout. ASTERISK-30350 Change-Id: I7b106fc244332014216d12bba851cefe884cc25f
-
Naveen Albert authored
Fixes a negative offset warning by initializing the buffer to empty. Additionally, although it doesn't currently complain about it, the size of a buffer is increased to accomodate the maximum size contents it could have. ASTERISK-30240 #close Change-Id: I8eecedf14d3f2a75864797f802277cac89a32877
-
Naveen Albert authored
Currently, if a user attempts to set a Caller ID related function to an invalid value, a warning is emitted, except for when setting the redirecting reason. We now emit a warning if we were unable to successfully parse the user-provided reason. ASTERISK-30332 #close Change-Id: Ic341f5d5f7303b6f1115549be64db58a85944f5a
-
Igor Goncharovsky authored
Fix aor lookup on sip path addition. Issue happens in case of dialing with @ and overriding user part of RURI. ASTERISK-30100 #close Reported-by: Yury Kirsanov Change-Id: I3f2c42a583578c94397b113e32ca3ebf2d600e13
-
Peter Fern authored
When ast_stream_and_wait returns an error (for example, when attempting to stream to a channel after hangup) the stream is not closed, and callers typically do not check the return code. This results in leaking file descriptors, leading to resource exhaustion. This change ensures that the stream is closed in case of error. ASTERISK-30198 #close Reported-by: Julien Alie Change-Id: Ie46b67314590ad75154595a3d34d461060b2e803
-
Naveen Albert authored
Removes see-also references to applications that don't exist anymore (removed in Asterisk 19), so these dead links don't show up on the wiki. ASTERISK-30347 #close Change-Id: I9539bc30f57cd65aa4e2d5ce8185eafa09567909
-
- Dec 15, 2022
-
-
Asterisk Development Team authored
-
- Dec 13, 2022
-
-
Alexandre Fournier authored
The `ast_geoloc_datastore_add_eprofile` function does not return 0 on success, it returns the size of the underlying datastore. This means that the datastore will be freed and its pointer set to NULL when no error occured at all. ASTERISK-30346 Change-Id: Iea9b209bd1244cc57b903b9496cb680c356e4bb9
-
Joshua C. Colp authored
When adding AOC to an outgoing response the code assumed that a body would exist for comparing the Content-Type. This isn't always true. The code now checks to make sure the response has a body before checking the Content-Type. ASTERISK-21502 Change-Id: Iaead371434fc3bc693dad487228106a7d7a5ac76
-
Naveen Albert authored
Fixes format truncation warnings in gcc 12.2.1. ASTERISK-30349 #close Change-Id: I42be4edf0284358b906e765d1966b6b9d66e1d3c
-
- Dec 09, 2022
-
-
Michael Kuron authored
ASTERISK-21502 Change-Id: I051b778f8c862d3b4794d28f2f3d782316707b08
-
Michael Kuron authored
chan_sip supported sending AOC-D and AOC-E information in SIP INFO messages in an "AOC" header in a format that was originally defined by Snom. In the meantime, ETSI TS 124 647 introduced an XML-based AOC format that is supported by devices from multiple vendors, including Snom phones with firmware >= 8.4.2 (released in 2010). This commit adds a new res_pjsip_aoc module that inserts AOC information into outgoing messages or sends SIP INFO messages as described below. It also fixes a small issue in res_pjsip_session which didn't always call session supplements on outgoing_response. * AOC-S in the 180/183/200 responses to an INVITE request * AOC-S in SIP INFO (if a 200 response has already been sent or if the INVITE was sent by Asterisk) * AOC-D in SIP INFO * AOC-D in the 200 response to a BYE request (if the client hangs up) * AOC-D in a BYE request (if Asterisk hangs up) * AOC-E in the 200 response to a BYE request (if the client hangs up) * AOC-E in a BYE request (if Asterisk hangs up) The specification defines one more, AOC-S in an INVITE request, which is not implemented here because it is not currently possible in Asterisk to have AOC data ready at this point in call setup. Once specifying AOC-S via the dialplan or passing it through from another SIP channel's INVITE is possible, that might be added. The SIP INFO requests are sent out immediately when the AOC indication is received. The others are inserted into an appropriate outgoing message whenever that is ready to be sent. In the latter case, the XML is stored in a channel variable at the time the AOC indication is received. Depending on where the AOC indications are coming from (e.g. PRI or AMI), it may not always be possible to guarantee that the AOC-E is available in time for the BYE. Successfully tested AOC-D and both variants of AOC-E with a Snom D735 running firmware 10.1.127.10. It does not appear to properly support AOC-S however, so that could only be tested by inspecting SIP traces. ASTERISK-21502 #close Reported-by:
Matt Jordan <mjordan@digium.com> Change-Id: Iebb7ad0d5f88526bc6629d3a1f9f11665434d333
-
Joshua C. Colp authored
When passing a JSON body to the 'create' channel route it would be converted into Asterisk variables, but never freed resulting in a memory leak. This change makes it so that the variables are freed in all cases. ASTERISK-30344 Change-Id: I924dbd866a01c6073e2d6fb846ccaa27ef72d49d
-
Naveen Albert authored
msg_create_from_file currently does not dispatch emails, which means that applications using this function, such as MixMonitor, will not trigger notifications to users (only AMI events are sent our currently). This is inconsistent with other ways users can receive voicemail. This is fixed by adding an option that attempts to send an email and falling back to just the notifications as done now if that fails. The existing behavior remains the default. ASTERISK-30283 #close Change-Id: I597cbb9cf971a18d8776172b26ab187dc096a5c7
-
Marcel Wagner authored
This fixes a small typo in the from_domain documentation on the endpoint documentation ASTERISK-30328 #close Change-Id: Ia6f0897c3f5cab899ef2cde6b3ac07265b8beb21
-
Naveen Albert authored
Adds support for the capture agent name field of the Homer protocol to Asterisk by allowing users to specify a name that will be sent to the HEP server. ASTERISK-30322 #close Change-Id: I6136583017f9dd08daeb8be02f60fb8df4639a2b
-
- Dec 08, 2022
-
-
Naveen Albert authored
Adds the If, ElseIf, Else, ExitIf, and EndIf applications for conditional execution of a block of dialplan, similar to the While, EndWhile, and ExitWhile applications. The appropriate branch is executed at most once if available and may be broken out of while inside. ASTERISK-29497 Change-Id: I3aa3bd35a5add82465c6ee9bd86b64601f0e1f49
-
Naveen Albert authored
Some SIP devices use an empty extension for PLAR functionality. Rather than rejecting these empty extensions, we now use the s extension for such calls to mirror the existing PLAR functionality in Asterisk (e.g. chan_dahdi). ASTERISK-30265 #close Change-Id: I0861a405cd49bbbf532b52f7b47f0e2810832590
-
Marcel Wagner authored
Updates the documentation for the 'contact_user' field to point out the default outbound contact if no contact_user is specified 's' ASTERISK-30316 #close Change-Id: I61f24fb9164e4d07e05908a2511805281874c876
-
Naveen Albert authored
The commit that rearchitected media formats, a2c912e9 (ASTERISK_23114) introduced a regression by improperly translating code in res_adsi.c. In particular, the pointer to the frame buffer was initialized at the top of adsi_careful_send, rather than dynamically updating it for each frame, as is required. This resulted in the first frame being repeatedly sent, rather than advancing through the frames. This corrupted the transmission of the CAS to the CPE, which meant that CPE would never respond with the DTMF acknowledgment, effectively completely breaking ADSI functionality. This issue is now fixed, and ADSI now works properly again. ASTERISK-29793 #close Change-Id: Icdeddf733eda2981c98712d1ac9cddc0db507dbe
-
Naveen Albert authored
Adds support for custom URI and header parameters in the From header in PJSIP. Parameters can be both set and read using this function. ASTERISK-30150 #close Change-Id: Ifb1bc3c512ad5f6faeaebd7817f004a2ecbd6428
-
Naveen Albert authored
When parsing information from AstDB while loading, it is possible that certain pointers are never set, which leads to invalid memory access and then, fatally, invalid free attempts on this memory. We now initialize to NULL to prevent this. ASTERISK-30311 #close Change-Id: I6120681d04fd2c12a9473f35ce95a1f8e74e3929
-
Naveen Albert authored
ASTERISK_28702 previously attempted to fix an issue with flash hook hold timing out after just under 17 minutes, when it should have never been timing out. It fixed this by changing 999999 to INT_MAX, but it did so in chan_dahdi, which is the wrong place since ss_thread is now in sig_analog and the one in chan_dahdi is mostly dead code. This fixes this by porting the fix to sig_analog. ASTERISK-30336 #close Change-Id: I05eb69cc0b5319d357842a70bd26ef64d145cb15
-
Naveen Albert authored
The XML docs are currently only loaded on startup with no way to update them during runtime. This makes it impossible to load modules that use ACO/Sorcery (which require documentation) if they are added to the source tree and built while Asterisk is running (e.g. external modules). This adds a CLI command to reload the XML docs during runtime so that documentation can be updated without a full restart of Asterisk. ASTERISK-30289 #close Change-Id: I4f265b0e5517e757c5453a0f241201a5788d3a07
-
Naveen Albert authored
This file includes some doxygen comments referencing ast_format_set. This is an obsolete API that was removed years back, but documentation was not fully updated to reflect that. These examples are updated to the current way of doing things (using the format cache). ASTERISK-30327 #close Change-Id: I570f3b8007fa17ba470cc7117f44bfe7c555d2f7
-
Naveen Albert authored
MixMonitor currently uses the Connected Line as the Caller ID for voicemails. This is due to the implementation being written this way for use with Digium phones. However, in general this is not correct for generic usage in the dialplan, and people may need the real Caller ID instead. This adds an option to do that. ASTERISK-30286 #close Change-Id: I3d0ce76dfe75e2a614e0f709ab27acbd2478267c
-
- Dec 03, 2022
-
-
Ben Ford authored
Backports two security fixes (c4d3498 and 450baca) from pjproject 2.13. ASTERISK-30338 Change-Id: I86fdc003d5d22cb66e7cc6dc3313a8194f27eb69
-