- Jan 30, 2023
-
-
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
-
- Jan 05, 2023
-
-
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
-
- Dec 20, 2022
-
-
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
-
- Dec 08, 2022
-
-
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
-
- Nov 21, 2022
-
-
Naveen Albert authored
A memory leak was present in func_json due to using ast_json_free, which just calls ast_free, as opposed to recursively freeing the JSON object as needed. This is now fixed to use the right free functions. ASTERISK-30293 #close Change-Id: I982324dde841dc9147c8d8ad35c8719daf418b49
-
- Oct 26, 2022
-
-
Naveen Albert authored
Some logic in say.c for determining if we need to also add an ampersand for file seperation was faulty, as non-successful files would increment the count, causing a leading ampersand to be added improperly. This is fixed, and a unit test that captures this regression is also added. ASTERISK-30248 #close Change-Id: I02c1d3a11d82fe4ea8b462070cbd1effb5834d2b
-
- Sep 26, 2022
-
-
Naveen Albert authored
The IF function currently emits warnings if both IF branches are empty. However, there is no actual necessity that either branch be non-empty as, unlike other conditional applications/ functions, nothing is inherently done with IF, and both sides could legitimately be empty. The warning is thus turned into a debug message. ASTERISK-30243 #close Change-Id: I5250625dd720f95e1859b5dfb933905d7e7a730e
-
Naveen Albert authored
Adds the EXPORT function, which allows write access to variables and functions on other channels. ASTERISK-29432 #close Change-Id: I7492645ae4307553d0f586d78e13a4f586231fdf
-
- Sep 22, 2022
-
-
Naveen Albert authored
Fix segfault due to null pointer dereference inside the audiohook callback. ASTERISK-30220 #close Change-Id: Ideb80f606974366e89d619d908744230b5a5a259
-
Naveen Albert authored
Adds TRIM, LTRIM, and RTRIM, which can be used for trimming leading and trailing whitespace from strings. ASTERISK-30222 #close Change-Id: I50fb0c40726d044a7a41939fa9026f3da4872554
-
- Sep 11, 2022
-
-
Naveen Albert authored
The FRAME_TRACE function currently asserts if it sees a MASQUERADE_NOTIFY. However, this is a legitimate thing that can happen so asserting is inappropriate, as there are no clear negative ramifications of such a thing. This is adjusted to be like the other frames to print out the subclass. ASTERISK-30210 #close Change-Id: I8ecbdcf17e35f64bdeab42868471f581ad1d1a56
-
- Jul 27, 2022
-
-
Naveen Albert authored
Adds missing documentation for the field parameter for the SRVRESULT function. ASTERISK-30151 Reported by: Chris Young Change-Id: I4385a2e0892a07e30dea1a8a0588e2c1bea2b1f1
-
- Jul 12, 2022
-
-
Naveen Albert authored
ASTERISK-30089 #close Change-Id: I1f5db911fd05a3a211c522c13e990fa1d0e62275
-
- Jun 09, 2022
-
-
Naveen Albert authored
Use example tags instead of regular para tags where possible. ASTERISK-30090 Change-Id: Iada8bbfda08f30b118cedf2d040bbb21e4966ec5
-
- May 09, 2022
-
-
George Joseph authored
Most issues were in stringfields and had to do with comparing a pointer to an constant/interned string with NULL. Since the string was a constant, a pointer to it could never be NULL so the comparison was always "true". gcc now complains about that. There were also a few issues where determining if there was enough space for a memcpy or s(n)printf which were fixed by defining some of the involved variables as "volatile". There were also a few other miscellaneous fixes. ASTERISK-30044 Change-Id: Ia081ca1bcfb329df6487c4660aaf1944309eb570
-
- Apr 27, 2022
-
-
Naveen Albert authored
Adds the DB_KEYCOUNT function, which can be used to retrieve the number of keys at a given prefix in AstDB. ASTERISK-29968 #close Change-Id: Ib2393b77b7e962dbaae6192f8576bc3f6ba92d09
-
Naveen Albert authored
This adds the EVAL_EXTEN function, which may be used to retrieve the variable-substituted data at any extension. ASTERISK-29486 Change-Id: Iad81019689674c9f4ac77d235f5d7234adbb1432
-
- Apr 26, 2022
-
-
Naveen Albert authored
Adds version information for applications, functions, and manager events/actions. This is not completely exhaustive by any means but covers most new things added that have release versioning information in the issue tracker. ASTERISK-29940 #close Change-Id: I506401e93c799715dbbe97c0a8ba18af2bf5e131
-
- Apr 14, 2022
-
-
Joshua C. Colp authored
Some databases depending on their configuration using backslashes for escaping. When combined with the use of ' this can result in a broken func_odbc query. This change adds a SQL_ESC_BACKSLASHES dialplan function which can be used to escape the backslashes. This is done as a dialplan function instead of being always done as some databases do not require this, and always doing it would result in incorrect data being put into the database. ASTERISK-29838 Change-Id: I152bf34899b96ddb09cca3e767254d8d78f0c83d
-
- Feb 25, 2022
-
-
Naveen Albert authored
Adds the lastcontext and lastexten channel fields to allow users to access previous dialplan execution locations. ASTERISK-29840 #close Change-Id: Ib455fe300cc8e9a127686896ee2d0bd11e900307
-
Naveen Albert authored
Currently, each module that uses libcurl duplicates the standard Asterisk curl user agent. This adds a global macro for the Asterisk user agent used for curl requests to eliminate this duplication. ASTERISK-29861 #close Change-Id: I9fc37935980384b4daf96ae54fa3c9adb962ed2d
-
- Feb 23, 2022
-
-
Naveen Albert authored
Adds a simple sanity check for key names when users are writing data to AstDB. This captures four cases indicating malformed keynames that generally result in bad data going into the DB that the user didn't intend: an empty key name, a key name beginning or ending with a slash, and a key name containing two slashes in a row. Generally, this is the result of a variable being used in the key name being empty. If a malformed key name is detected, a warning is emitted to indicate the bug in the dialplan. ASTERISK-29925 #close Change-Id: Ifc08a9fe532a519b1b80caca1aafed7611d573bf
-
- Jan 31, 2022
-
-
Naveen Albert authored
In order to get around the issue of certain frames having names that could overlap, func_frame_drop surrounds names with commas for the purposes of comparison. The buffer is allocated and printed to properly, but the original buffer is used for comparison. In most cases, this wouldn't have had any effect, but that was not the intention behind the buffer. This updates the code to reference the modified buffer instead. ASTERISK-29854 #close Change-Id: I430b52e14e712d0e62a23aa3b5644fe958b684a7
-
- Jan 12, 2022
-
-
Naveen Albert authored
Documentation for built-in special system and channel vars is currently outdated, and updating is a manual process since there is no XML documentation for these anywhere. This adds documentation for system vars to func_env and for channel vars to func_channel so that they appear along with the corresponding fields that would be accessed using a function. ASTERISK-29848 #close Change-Id: I6997f925c4a45fffe71321861f5898a8b7182fa9
-
- Dec 13, 2021
-
-
Naveen Albert authored
Adds the JSON_DECODE function for parsing JSON in the dialplan. JSON parsing already exists in the Asterisk core and is used for many different things. This function exposes the basic parsing capability to the user in the dialplan, for instance, in conjunction with CURL for using API responses. ASTERISK-29706 #close Change-Id: Iea60c49a7358dfdc2db60803cdc9a742f808ba2c
-
- Dec 02, 2021
-
-
Alexander Traud authored
ASTERISK-29779 Change-Id: If338163488498f65fa7248b60e80299c0a928e4b
-
- Dec 01, 2021
-
-
Naveen Albert authored
Most examples in the XML documentation use the example tag to demonstrate examples, which gets parsed specially in the Wiki to make it easier to follow for users. This fixes a few modules to use the example tag instead of vanilla para tags to bring them in line with the standard syntax. ASTERISK-29777 #close Change-Id: I9acb6cc5faf1d220e73c6dd28592371d768d279b
-
- Nov 19, 2021
-
-
Alexander Traud authored
ASTERISK-29754 Change-Id: Ia09eb68d283d201d9a6fbeccfc0efe83fe0502a5
-
- Nov 16, 2021
-
-
Josh Soref authored
Correct typos of the following word families: effectively emitted expect anthony ASTERISK-29714 Change-Id: Ic16f9ec855bb6d14ec8e170b90af9a36b06d488a
-
- Oct 19, 2021
-
-
Sean Bright authored
There are 3 separate changes here: 1. The documentation erroneously stated that the dsp_talking_threshold argument was a number of milliseconds when it is actually an energy level used by the DSP code to classify talking vs. silence. 2. Fixes a copy paste error in the argument handling code. 3. Don't erroneously switch to the talking state if we aren't actively handling a frame we've classified as talking. Patch inspired by one provided by Moritz Fain (License #6961). ASTERISK-27816 #close Change-Id: I5953fd570b98b49c41cee55bfe3b941753fb2511
-
- Sep 22, 2021
-
-
Naveen Albert authored
Allows multiple mailboxes to be specified for VMCOUNT instead of just one. ASTERISK-29661 #close Change-Id: I9108528300795fd5b607efa9d4dd7b74be031813
-
Naveen Albert authored
Adds a function to check for the existence of a channel by name or by UNIQUEID. ASTERISK-29656 #close Change-Id: Ib464e9eb6e13dc683a846286798fecff4fd943cb
-
- Sep 10, 2021
-
-
Naveen Albert authored
Adds the STRBETWEEN function, which can be used to insert a substring between each character in a string. For instance, this can be used to insert pauses between DTMF tones in a string of digits. ASTERISK-29627 Change-Id: Ice23009d4a8e9bb9718d2b2301d405567087d258
-
Naveen Albert authored
Adds the DIRNAME and BASENAME functions, which are wrappers around the corresponding C library functions. These can be used to safely and conveniently work with file paths and names in the dialplan. ASTERISK-29628 #close Change-Id: Id3aeb907f65c0ff96b6e57751ff0cb49d61db7f3
-
Naveen Albert authored
Up until now, all of the logic used to translate arguments to the Say applications has been directly coupled to playback, preventing other modules from using this logic. This refactors code in say.c and adds a SAYFILES function that can be used to retrieve the file names that would be played. These can then be used in other applications or for other purposes. Additionally, a SayMoney application and a SayOrdinal application are added. Both SayOrdinal and SayNumber are also expanded to support integers greater than one billion. ASTERISK-29531 Change-Id: If9718c89353b8e153d84add3cc4637b79585db19
-
- Aug 19, 2021
-
-
Naveen Albert authored
The MIN, MAX, and ABS functions all support float arguments, but currently return floats even if the arguments are all integers and the response is a whole number, in which case the user is likely expecting an integer. This casts the float to an integer before printing into the response buffer if possible. ASTERISK-29495 Change-Id: I902d29eacf3ecd0f8a6a5e433c97f0421d205488
-
Naveen Albert authored
Adds a function to scramble audio on a channel using whole spectrum frequency inversion. This can be used as a privacy enhancement with applications like ChanSpy or other potentially sensitive audio. ASTERISK-29542 Change-Id: I01020769d91060a1f56a708eb405f87648d1a67e
-
- Aug 09, 2021
-
-
Naveen Albert authored
Adds function to selectively drop specified frames in the TX or RX direction on a channel, including control frames. ASTERISK-29478 Change-Id: I8147c9d55d74e2e48861edba6b22f930920541ec
-
- Jun 11, 2021
-
-
Jaco Kroon authored
For example: arthur*CLI> dialplan locks show func_lock locks: Name Requesters Owner uls-autoref 0 (unlocked) 1 total locks listed. Obviously other potentially useful stats could be added (eg, how many times there was contention, how many times it failed etc ... but that would require keeping the stats and I'm not convinced that's worth the effort. This was useful to troubleshoot some other issues so submitting it. Change-Id: Ib875e56feb49d523300aec5f36c635ed74843a9f Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
Jaco Kroon authored
The scenario where a channel still has an associated datastore we cannot unload since there is a function pointer to the destroy and fixup functions in play. Thus increase the module ref count whenever we allocate a datastore, and decrease it during destroy. In order to tighten the race that still exists in spite of this (below) add some extra failure cases to prevent allocations in these cases. Race: If module ref is zero, an LOCK or TRYLOCK is invoked (near) simultaneously on a channel that has NOT PREVIOUSLY taken a lock, and if in such a case the datastore is created *prior* to unloading being set to true (first step in module unload) then it's possible that the module will unload with the destructor being called (and segfault) post the module being unloaded. The module will however wait for such locks to release prior to unloading. If post that we can recheck the module ref before returning the we can (in theory, I think) eliminate the last of the race. This race is mostly theoretical in nature. Change-Id: I21a514a0b56755c578a687f4867eacb8b59e23cf Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-