- Nov 18, 2019
-
-
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
-
- Oct 18, 2019
-
-
Salah Ahmed authored
During execution "pjsip show channelstats" cli command by an external module asterisk crashed. It seems this is a separate thread running to fetch and print rtp stats. The crash happened on the ao2_lock method, just before it going to read the rtp stats on a rtp instance. According to gdb backtrace log, it seems the session media was already cleaned up at that moment. ASTERISK-28578 Change-Id: I3e05980dd4694577be6d39be2c21a5736bae3c6f
-
- Oct 08, 2019
-
-
lvl authored
ASTERISK-28086 #close Change-Id: Ib3baadc89b9f0477a6f25a63861433812368c5ea
-
- Oct 01, 2019
-
-
Torrey Searle authored
Add a new dialplan function PJSIP_MOH_PASSTHROUGH that allows the on-hold behavior to be controlled on a per-call basis ASTERISK-28542 #close Change-Id: Iebe905b2ad6dbaa87ab330267147180b05a3c3a8
-
- Sep 17, 2019
-
-
Florian Floimair authored
This change adds H.265/HEVC as a known codec and creates a cached "h265" media format for use. Note that RFC 7798 section 7.2 also describes additional SDP parameters. Handling of these is not yet supported. ASTERISK-28512 Change-Id: I26d262cc4110b4f7e99348a3ddc53bad0d2cd1f2
-
Guido Falsi authored
On FreeBSD using the clang/llvm compiler build fails to build due to the switch statement argument being a non integer type expression. Switch to an if/else if/else construct to sidestep the issue. ASTERISK-28536 #close Change-Id: Idf4a82cc1e94580a2d017fe9e351c226f23e20c8
-
- Sep 16, 2019
-
-
Joshua Colp authored
When fax detection occurs on an outbound PJSIP channel the redirect operation will result in a masquerade occurring and the underlying channel on the session changing. The code incorrectly relocked the new channel instead of the old channel when returning. This resulted in the new channel being locked indefinitely. The code now always acts on the expected channel. ASTERISK-28538 Change-Id: I2b2e60d07e74383ae7e90d752c036c4b02d6b3a3
-
- Sep 12, 2019
-
-
Sean Bright authored
When modifying an already defined variable in some channel drivers they add a new variable with the same name to the list, but that value is never used, only the first one found. Introduce ast_variable_list_replace() and use it where appropriate. ASTERISK-23756 #close Patches: setvar-multiplie.patch submitted by Michael Goryainov Change-Id: Ie1897a96c82b8945e752733612ee963686f32839
-
- Sep 10, 2019
-
-
Frederic LE FOLL authored
When the remote ISDN party ends an ISDN call on a PRI link (DISCONNECT), CHANNEL(hangupsource) information is not available. chan_dahdi already contains an ast_set_hangupsource() in __dahdi_exception() function but it seems that ISDN message processing does not use this part of code. Two other channel modules associate ast_queue_hangup() and ast_set_hangupsource() functions calls: - chan_pjsip in chan_pjsip_session_end() function, - chan_sip in sip_queue_hangup_cause() function. chan_iax2 separates them, in iax2_queue_hangup()/iax2_destroy() and set_hangup_source_and_cause(). Thus, I propose to add ast_set_hangupsource() beside ast_queue_hangup() in sig_pri_queue_hangup(), like chan_pjsip and chan_sip already do. ASTERISK-28525 Change-Id: I0f588a4bcf15ccd0648fd69830d1b801c3f21b7c
-
George Joseph authored
The links in the deprecation notice were the shortened variety but it makes better sense to show the unshortened links as they're more descriptive. I.E. wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip rather than wiki.asterisk.org/wiki/x/tAHOAQ Change-Id: If2da5d5243e2d4a6f193b15691d23e7e5a7c57a9
-
- Sep 04, 2019
-
-
Igor Goncharovsky authored
On reading information about initial client packet unistim use dirty implementation of destination ip address retrieval. This fix uses CMSG_*(..) to get ip address and make clang compile without warning. ASTERISK-25592 #close Reported-by: Alexander Traud Change-Id: Ic1fd34c2c2bcc951da65bf62e3f7a8adff8351b1
-
- Aug 27, 2019
-
-
Igor Goncharovsky authored
Current implementation of ast_channel_tech send_digit_begin hook uses same function for tone playback as key press handler. This cause every incoming dtmf send back to asterisk. In case of two unistim phones connected to each other, it'll cause indefinite DTMF loop. Fix add separate function for dtmf tone phone play. Change-Id: I5795db468df552f0c89c7576b6b3858b26c4eab4
-
- Aug 26, 2019
-
-
Igor Goncharovsky authored
This patch fixes one-way oudio that users expirienced on big-endian architechtires. RTP port number bytes was stored in improper order and phone sent RTP to wrong RTP port. Reported-by: Andrey Ionov Change-Id: I9a9ca7f26e31a67bbbceff12923baa10dfb8a3be
-
- Aug 22, 2019
-
-
George Joseph authored
The UnicastRTP channel driver provided by chan_rtp now accepts "<hostname>:<port>" as an alternative to "<ip_address>:<port>" in the destination. The first AAAA (preferred) or A record resolved will be used as the destination. The lookup is synchronous so beware of possible dialplan delays if you specify a hostname. Change-Id: Ie6f95b983a8792bf0dacc64c7953a41032dba677
-
- Aug 01, 2019
-
-
Kevin Harwell authored
There were still a few places in the code that could overflow when "packing" a json object with a value outside the base type integer's range. For instance: unsigned int value = INT_MAX + 1 ast_json_pack("{s: i}", value); would result in a negative number being "packed". In those situations this patch alters those values to a ast_json_int_t, which widens the value up to a long or long long. ASTERISK-28480 Change-Id: Ied530780d83e6f1772adba0e28d8938ef30c49a1
-
- Jul 22, 2019
-
-
Leonid Fainshtein authored
Change-Id: I94dc38920e6e77cc73062648f62fdd613d0d1452 Signed-off-by:
Oron Peled <oron.peled@xorcom.com>
-
Tzafrir Cohen authored
Change-Id: I452d6a853bcd8c6e194455b19e5e017713e9c0fe Signed-off-by:
Oron Peled <oron.peled@xorcom.com>
-
Tzafrir Cohen authored
* This command show the MFC/R2 links Change-Id: I213822e1b7ef9c05bd89a2ba62df8e0856ce9f84 Signed-off-by:
Oron Peled <oron.peled@xorcom.com>
-
Tzafrir Cohen authored
Change-Id: Ibcb2401515a58782a1488c0b9efbed201c3f3a17 Signed-off-by:
Oron Peled <oron.peled@xorcom.com>
-
Tzafrir Cohen authored
Otherwise, OpenR2 threads go crazy and consume almost all CPU resources Change-Id: I10a41f617613fe7399c5bdced5c64a2751173f28 Signed-off-by:
Oron Peled <oron.peled@xorcom.com>
-
Tzafrir Cohen authored
Details: - The memcpy() call copied part of "dahdi_conf" and not "dahdi_conf.mfcr2" - As a result, the memcmp() in dahdi_r2_get_link() always fails - This cause dahdi_r2_get_link() to create new link for every channel (instead of a new link for every ~30 channels) - With the fix, far less links are generated -- so we use far less threads Change-Id: I7259dd6272f5e46e8a6c7f5bf3e8c2ec01b8c132 Signed-off-by:
Oron Peled <oron.peled@xorcom.com>
-
- Jul 11, 2019
-
-
Francesco Castellano authored
The chan_sip module performs a T.38 re-invite using a single media stream of udptl, and expects the SDP answer to be the same. If an SDP answer is received instead that contains an additional media stream with no joint codec a crash will occur as the code assumes that at least one joint codec will exist in this scenario. This change removes this assumption. ASTERISK-28465 Change-Id: I8b02845b53344c6babe867a3f0a5231045c7ac87
-
- Jul 08, 2019
-
-
Kevin Harwell authored
The MWI core recently got some new API calls that make tracking MWI state lifetime more reliable. This patch updates those modules that subscribe to specific MWI topics to use the new API. Specifically, these modules now subscribe to both MWI topics and MWI state. ASTERISK-28442 Change-Id: I32bef880b647246823dbccdf44a98d384fcabfbd
-
- Jul 01, 2019
-
-
Chris-Savinovich authored
Fixes a crash in chan_dahdi occurring on 32-bit systems. A previous patch introduced a variable of type unassigned long long which is 64-bits. Casting it as 'ast_json_int_t' along with JSON type 'I' makes it work with 32-bit systems. ASTERISK-28457 Change-Id: I9cef6b5f2d826fc5c93f2f6a1c997c4e3e6c93fe
-
- Jun 25, 2019
-
-
Dan Cropp authored
Previously, when a Transfer (REFER) was performed, chan_pjsip would set the TRANSFERSTATUS to SUCCESS when the REFER was queued up. This did not reflect a successful/unsuccessful transfer the way chan_sip did. Added a callback module to process the refer subscription information. Now depends on res_pjsip_pubsub so call transfer progress can be monitored and reported ASTERISK-26968 #close Reported-by: Dan Cropp Change-Id: If6c27c757c66f71e8b75e3fe49da53ebe62395dc
-
- Jun 24, 2019
-
-
George Joseph authored
A few more format truncation issues addressed. Change-Id: I047f373169caaca0eec4889d3c0e5e10f130017a
-
- Jun 17, 2019
-
-
George Joseph authored
Fixed format-truncation issues in chan_dahdi.c and sig_analog.c. Since they're related to fields provided by dahdi-tools we can't change the buffer sizes so we're just checking the return from snprintf and printing an errior if we overflow. Change-Id: Idc1f3c1565b88a7d145332a0196074b5832864e5
-
- Jun 10, 2019
-
-
agupta authored
We have seen some rare case of segmentation fault in hangup function and we could notice that channel pointer was NULL. Debug log shows that there is a 200 OK answer and SIP timeout at the same time. It looks that while the SIP session was being destroyed due to timeout call hangup due to answer event lead to race condition and channel is being destroyed from two different places. The check ensures we check it not to be NULL before freeing it. ASTERISK-25371 Change-Id: I19f6566830640625e08f7b87bfe15758ad33a778
-
- May 23, 2019
-
-
Guido Falsi authored
After some definitions have been moved to asterisk/mwi.h the files channels/chan_dahdi.h channels/sig_pri.c are missing this new include. ASTERISK-28427 #close Change-Id: Ia8cc595eeda653324643f40dcd9799d4c3f0ac91
-
- May 16, 2019
-
-
Alexei Gradinari authored
The caller endpoint hears dead silence if a callee replies 180 (without SDP) and the caller already received 183 (with SDP). It happens because Asterisk sends 180 (WITH SDP) to the caller, there are not incoming RTP packets from the callee and Asterisk does not generate inband ringing, so there are not any outgoing RTP packets to the caller. This patch replaces 180 by 183 if SDP negotiation has completed, as if the caller endpoint is configured with "inband_progress=yes". In this case Asterisk will generate inband ringing untill Asterisk receive incoming RTP packets from the callee. ASTERISK-27994 #close Change-Id: I7450b751083ec30d68d6abffe922215a15ae5a73
-
- May 10, 2019
-
-
George Joseph authored
Various fixes for issues caught by gcc 9. Mostly snprintf trying to copy to a buffer potentially too small. ASTERISK-28412 Change-Id: I9e85a60f3c81d46df16cfdd1c329ce63432cf32e
-
- Apr 23, 2019
-
-
Kevin Harwell authored
There is enough MWI functionality to warrant it having its own 'c' and header files. This patch moves all current core MWI data structures, and functions into the following files: main/mwi.h main/mwi.c Note, code was simply moved, and not modified. However, this patch is also in preparation for core MWI changes, and additions to come. Change-Id: I9dde8bfae1e7ec254fa63166e090f77e4d3097e0
-
- Apr 05, 2019
-
-
Salah Ahmed authored
When the dtmf_mode on an endpoint is configured as "auto_info" Asterisk will produce an inband DTMF tone alongside an INFO message when sending DTMF. ASTERISK-28371 Change-Id: I1380b82f006e110a1b83fbb50c9873edd13a5d9a
-
- Apr 03, 2019
-
-
Ben Ford authored
The compiler complained about a couple of variables that weren't initialized but were being used. Initializing them to NULL resolves the warnings/errors. ASTERISK-28362 #close Change-Id: I6243afc5459b416edff6bbf571b0489f6b852e4b
-
- Mar 27, 2019
-
-
Alexei Gradinari authored
The next usage of PJSIP_PARSE_URI will crash asterisk ${PJSIP_PARSE_URI(tel:+1234567890,host)} or ${PJSIP_PARSE_URI(192.168.1.1:5060,host)} The function pjsip_parse_uri successfully parses then, but returns struct pjsip_other_uri *. This patch restricts parsing only SIP/SIPS URIs. Change-Id: I16f255c2b86a80a67e9f9604b94b129a381dd25e
-
- Mar 25, 2019
-
-
Sean Bright authored
Passing negative intervals to the scheduler rips a hole in the space-time continuum. ASTERISK-25792 #close Reported by: Paul Sandys Change-Id: Ie706f21cee05f76ffb6f7d89e9c867930ee7bcd7
-
- Mar 11, 2019
-
-
cirillor authored
Add logical group at DAHDIChannel event and create "dahdi_group" at CHANNEL function. ASTERISK-28317 Change-Id: Ic1f834cd53982a9707a9748395ee746d6575086a
-
- Mar 08, 2019
-
-
Torrey Searle authored
chan_sip will always ignore 183 responses that do not contain SDP however, chan_pjsip will currently always translate it into a 183 with SDP. This new flag allows chan_pjsip to have the same behavior as chan_sip. ASTERISK-28322 #close Change-Id: If81cfaa17c11b6ac703e3d71696f259d86c6be4a
-
- Mar 07, 2019
-
-
Sean Bright authored
strtok() uses a static buffer, making it not thread safe. Also add a #define to cause a compile failure if strtok is used. Change-Id: Icce265153e1e65adafa8849334438ab6d190e541
-
- Feb 14, 2019
-
-
sungtae kim authored
Currently, the pjsip show channelstats cli does not show channel's stats after hits the invalid channel info. This makes hard to use this cli. Changed to keep iterate after hits the invalid channel info. ASTERISK-28292 Change-Id: I3efdff1c9e1b1efd3c971fb82ae77aa133a6f43c
-