- Jan 11, 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
-
- Nov 30, 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 18, 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
-
- Sep 21, 2021
-
-
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
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>
-
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
AST_TRAVERSE accessess current as current = current->(field).next ... and since we free current (and ast_free poisons the memory) we either end up on a ast_mutex_lock to a non-existing lock that can never be obtained, or a segfault. Incidentally add logging in the "we have to wait for a lock to release" case, and remove an ineffective statement that sets memory that was just cleared by ast_calloc to zero. Change-Id: Id19ba3d9867b23d0e6783b97e6ecd8e62698b8c3 Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
Jaco Kroon authored
In two places we bail out with failure after we've already incremented the requesters counter, if this occured then it would effectively result in unload to wait indefinitely, thus preventing clean shutdown. Change-Id: I362a6c0dc424f736d4a9c733d818e72d19675283 Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
- May 26, 2021
-
-
Naveen Albert authored
Introduces three new dialplan functions, MIN and MAX, which can be used to calculate the minimum or maximum of up to two numbers, and ABS, an absolute value function. ASTERISK-29431 Change-Id: I2bda9269d18f9d54833c85e48e41fce0e0ce4d8d
-
Naveen Albert authored
Up until now, the VOLUME function has been write only, so that TX/RX values can be set but not read afterwards. Now, previously set TX/RX values can be read later. ASTERISK-29439 Change-Id: Ia23e92fa2e755c36e9c8e69f2940d2703ccccb5f
-
- Mar 16, 2021
-
-
Joshua C. Colp authored
This change embeds the MODULEINFO block of modules into the core XML documentation. This provides a shared mechanism for use by both menuselect and Asterisk for information and a definitive source of truth. ASTERISK-29335 Change-Id: Ifbfd5c700049cf320a3e45351ac65dd89bc99d90
-
- Mar 10, 2021
-
-
Jaco Kroon authored
Change-Id: I75152cece8a00b7523d542e5ac22796f9595692b Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
- Feb 23, 2021
-
-
Jaco Kroon authored
minargs enables enforcing of minimum count of arguments to pass to func_odbc, so if you're unconditionally using ARG1 through ARG4 then this should be set to 4. func_odbc will generate an error in this case, so for example [FOO] minargs = 4 and ODBC_FOO(a,b,c) in dialplan will now error out instead of using a potentially leaked ARG4 from Gosub(). ARGC is needed if you're using optional argument, to verify whether or not an argument has been passed, else it's possible to use a leaked ARGn from Gosub (app_stack). So now you can safely do ${IF($[${ARGC}>3]?${ARGV}:default value)} kind of thing. Change-Id: I6ca0b137d90b03f6aa9c496991f6cbf1518f6c24 Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
- Jan 06, 2021
-
-
Jaco Kroon authored
Under contention it becomes possible that multiple channels will be told they successfully obtained the lock, which is a bug. Please refer ASTERISK-29217 This introduces a couple of changes. 1. Replaces requesters ao2 container with simple counter (we don't really care who is waiting for the lock, only how many). This is updated undex ->mutex to prevent memory access races. 2. Correct semantics for ast_cond_timedwait() as described in pthread_cond_broadcast(3P) is used (multiple threads can be released on a single _signal()). 3. Module unload races are taken care of and memory properly cleaned up. Change-Id: I6f68b5ec82ff25b2909daf6e4d19ca864a463e29 Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
- Nov 20, 2020
-
-
Alexander Traud authored
In MODULEINFO, each depend has to be listed in .requires of AST_MODULE_INFO. ASTERISK-29148 Change-Id: I254dd33194ae38d2877b8021c57c2a5deb6bbcd2
-
- Nov 06, 2020
-
-
Dovid Bender authored
Currently any response from res_curl where we get an answer from the web server, regardless of what the response is (404, 403 etc.) Asterisk currently treats it as a success. This patch allows you to set which codes should be considered as a failure by Asterisk. If say we set failurecodes=404,403 then when using curl in realtime if a server gives a 404 error Asterisk will try to failover to the next option set in extconfig.conf ASTERISK-28825 Reported by: Dovid Bender Code by: Gobinda Paul Change-Id: I94443e508343e0a3e535e51ea6e0562767639987
-
- Nov 03, 2020
-
-
Alexander Traud authored
ASTERISK-29144 Change-Id: I2a72c072083b4492a223c6f9d73d21f4f424db62
-
- Sep 23, 2020
-
-
Sean Bright authored
Because we use shared thread-local cURL instances, we need to ensure that the state of the cURL instance is correct before each invocation. In the case of custom headers, we were not resetting cURL's internal HTTP header pointer which could result in a crash if subsequent requests do not configure custom headers. ASTERISK-29085 #close Change-Id: I8b4ab34038156dfba613030a45f10e932d2e992d
-
- Apr 20, 2020
-
-
Alexander Traud authored
ASTERISK-28838 Change-Id: I34724e799e1ffaf723eb2c358abe8934dbadcd52
-
- Apr 14, 2020
-
-
Jean Aunis authored
Allow voice volume to be multiplied or divided by a floating point number. ASTERISK-28813 Change-Id: I5b42b890ec4e1f6b0b3400cb44ff16522b021c8c
-
- Apr 08, 2020
-
-
Sebastien Duthil authored
The following fields return an error when read from dialplan: - exten - context - userfield - channame ASTERISK-28796 #close Change-Id: Ieacaac629490f8710fdacc9de80ed5916c5f6ee2
-
- Mar 31, 2020
-
-
traud authored
In case of no OpenSSL headers, the module func_aes was built but did not load. ASTERISK-28788 Change-Id: I0b99b8468cbeb3b0eab23069cbd64062ef885ffc
-
- Feb 10, 2020
-
-
Sean Bright authored
For reasons that are not clear to me - this only appears for me when _not_ building in dev-mode. Change-Id: Ib45c54daaea8e0d571cb470cab1daaae2edba968
-
- Jan 13, 2020
-
-
Sean Bright authored
We allow for 'maxredirs' to be set, but this value is ignored when followlocation is not enabled which, by default, it is not. ASTERISK-17491 #close Reported by: candrews Change-Id: I96a4ab0142f2fb7d2e96ff976f6cf7b2982c761a
-
- Dec 11, 2019
-
-
Pascal Cadotte Michaud authored
add missing argument "rtt" and "status" to the documentation The change to the dtd file allow an enumlist to contain one or many configOptionToEnum or enum. This is different from the previous patch I submitted when you could have a configOptionToEnum or (a configOptionToEnum followed by one or manu enums) or (one or many enums) ASTERISK-28626 Change-Id: Ia71743ee7ec813f40297b0ddefeee7909db63b6d
-
Joshua Colp authored
This reverts commit 7e3015d7. Reason for revert: Regression in XML validation. validity error : Content model of enumlist is not determinist: (configOptionToEnum | (configOptionToEnum , enum+) | enum+) As we are preparing to do releases and this is not critical I am reverting this for now until resolved. Change-Id: I30c2295f9d7f0a0475674ee77071a7ebabf5b83f
-
- Nov 21, 2019
-
-
Pascal Cadotte Michaud authored
add missing argument "rtt" and "status" to the documentation ASTERISK-28626 Change-Id: I8419e4c8203e411b87d93dc395acdbcf7526dedf
-
- Nov 18, 2019
-
-
Sean Bright authored
If the last line of a file does not have a terminating EOL sequence, we potentially add garbage to the value returned from the FILE() function. There is no overflow potential here as we are reading from a buffer of a known size, we are just reading too much of it. ASTERISK-26481 #close Change-Id: I50dd4fcf416fb3c83150040a1a79a59d9eb1ae01
-
- Nov 15, 2019
-
-
Martin Tomec authored
When user wants to send json data, the default Content-Type header is incorect (application/x-www-form-urlencoded). This patch allows to set any custom headers so the Content-Type header can be overriden. User can set multiple headers by multiple calls of curlopt(). This approach is not consistent with other parameters, but is more readable in dialplan than one call with multiple headers. ASTERISK-28613 Change-Id: I4dd68c3f4e25362ef941d73a3861f58348dcfbf9
-