- Feb 26, 2021
-
-
Sean Bright authored
ASTERISK-16799 #close Change-Id: I40367b0d6dbf66a39721bde060c8b2d734a61cf4
-
George Joseph authored
Although refer_progress_notify() always runs in the progress serializer, the pjproject evsub module itself can cause the subscription to be destroyed which then triggers refer_progress_on_evsub_state() to clean it up. In this case, it's possible that refer_progress_notify() could get the subscription pulled out from under it while it's trying to use it. At one point we tried to have refer_progress_on_evsub_state() push the cleanup to the serializer and wait for its return before returning to pjproject but since pjproject calls its state callbacks with the dialog locked, this required us to unlock the dialog while waiting for the serialized cleanup, then lock it again before returning to pjproject. There were also still some cases where other callers of refer_progress_notify() weren't using the serializer and crashes were resulting. Although all callers of refer_progress_notify() now use the progress serializer, we decided to simplify the locking so we didn't have to unlock and relock the dialog in refer_progress_on_evsub_state(). Now, refer_progress_notify() holds the dialog lock for its duration and since pjproject also holds the dialog lock while calling refer_progress_on_evsub_state() (which does the cleanup), there should be no more chances for the subscription to be cleaned up while still being used to send NOTIFYs. To be extra safe, we also now increment the session count on the dialog when we create a progress object and decrement the count when the progress is destroyed. ASTERISK-29313 Change-Id: I97a8bb01771a3c85345649b8124507f7622a8480
-
Kevin Harwell authored
For some RTCP packet types the report count is actually the packet's subtype. This was not being reflected in the packet debug output. This patch makes it so for some RTCP packet types a "Packet Subtype" is now output in the debug replacing the "Reception reports" (i.e count). Change-Id: Id4f4b77bb37077a4c4f039abd6a069287bfefcb8
-
- Feb 25, 2021
-
-
Boris P. Korzun authored
Added a SELECT 'LIMIT' clause to realtime_pgsql() and refactored the function. ASTERISK-29293 #close Change-Id: If5a6d4b1072ea2e6e89059b21139d554a74b34f5
-
Ben Ford authored
Removes an unnecessary check for the conditional that compares the stream topologies to see if they are equal to suppress re-invites. This was a problem when a Digium phone received an INVITE that offered codecs different than what it supported, causing Asterisk to send the re-invite. ASTERISK-29303 Change-Id: I04dc91befb2387904e28a9aaeaa3bcdbcaa7fa63
-
Jaco Kroon authored
Also improve the in-process documentation to clarify that the value is initialised from the DSN and not default false, but that the DSN's value is default false if unset. ASTERISK-29311 #close Change-Id: I46e2379f7b0656034442bce77cb37ccd4e61098d Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
Joshua C. Colp authored
When PJSIP receives a re-INVITE without an SDP offer the INVITE session library will first call the on_create_offer callback and if unavailable then use the active negotiated SDP as the offer. In some cases this would result in a different SDP then was previously used without an incremented SDP version number. The two known cases are: 1. Sending an initial INVITE with a set of codecs and having the remote side answer with a subset. The active negotiated SDP would have the pruned list but would not have an incremented SDP version number. 2. Using re-INVITE for unhold. We would modify the active negotiated SDP but would not increment the SDP version. To solve these, and potential other unknown cases, the on_create_offer callback has now been implemented which produces a fresh offer with incremented SDP version number. This better fits within the model provided by the INVITE session library. ASTERISK-28452 Change-Id: I2d81048d54edcb80fe38fdbb954a86f0a58281a1
-
- Feb 23, 2021
-
-
Jaco Kroon authored
This partially reverts commit 3d1bf3c5, specifically for app.h. This works with both gcc 9.3.0 and 10.2.0 now, both for C and C++ (as tested with external modules). ASTERISK-29287 Change-Id: I5b9f02a9b290675682a1d13f1788fdda597c9fca Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
Ivan Poddubnyi authored
Queue members using dialplan hints as a state interface must handle INUSE+RINGING hint as RINGINUSE devstate, and INUSE + ONHOLD as INUSE. ASTERISK-28369 Change-Id: I127e06943d4b4f1afc518f9e396de77449992b9f
-
Alexander Traud authored
Instead of looking for pass-through formats in the list of transcodable formats (which is going to find nothing), go through the result which is going to be the jointcaps of the tech_pvt of the channel. Finally, only with that list, ast_format_cap_remove(.) is going to succeed. This restores the behaviour of Asterisk 1.8. However, it does not fix ASTERISK_29282 because that issue report is about chan_sip and PJSIP. Here, only chan_sip is fixed because PJSIP does not even call ast_rtp_instance_available_formats -> ast_translate_available_format. Change-Id: Icade2366ac2b82935b95a9981678c987da2e8c34
-
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>
-
Sebastien Duthil authored
ASTERISK-29244 Change-Id: I1862d58264c2c8b5d8983272cb29734b184d67c5
-
- Feb 19, 2021
-
-
George Joseph authored
refer_progress_notify wasn't always being called from the progress serializer. This could allow clearing notification->progress->sub in one thread while another was trying to use it. * Instances where refer_progress_notify was being called in-line, have been changed to use ast_sip_push_task(). Change-Id: Idcf1934c4e873f2c82e2d106f8d9f040caf9fa1e
-
- Feb 18, 2021
-
-
Kevin Harwell authored
When an endpoint requests to re-negotiate for fax and the incoming re-invite is received prior to Asterisk sending out the 200 OK for the initial invite the re-invite gets delayed. When Asterisk does finally send the re-inivite the SDP includes streams for both audio and T.38. This happens because when the pending topology and active topologies differ (pending stream is not in the active) in the delayed scenario the pending stream is appended to the active topology. However, in the fax case the pending stream should replace the active. This patch makes it so when a delay occurs during fax negotiation, to or from, the audio stream is replaced by the T.38 stream, or vice versa instead of being appended. Further when Asterisk sent the re-invite with both audio and T.38, and the endpoint responded with a declined T.38 stream then Asterisk would crash when attempting to change the T.38 state. This patch also puts in a check that ensures the media state has a valid fax session (associated udptl object) before changing the T.38 state internally. ASTERISK-29203 #close Change-Id: I407f4fa58651255b6a9030d34fd6578cf65ccf09
-
Alexander Traud authored
Add option "srtpreplayprotection" rtp.conf to enable srtp replay protection. ASTERISK-29260 Reported by: Alexander Traud Change-Id: I5cd346e3c6b6812039d1901aa4b7be688173b458
-
Ivan Poddubnyi authored
New responses sent within a PJSIP sessions are based on those that were sent before. Therefore, adding/modifying a header once causes it to be sent on all responses that follow. Sending 181 Call Is Being Forwarded many times first adds "histinfo" duplicated more and more, and eventually overflows past the array boundary. This commit adds a check preventing adding "histinfo" more than once, and skipping it if there is no more space in the header. Similar overflow situations can also occur in res_pjsip_path and res_pjsip_outbound_registration so those were also modified to check the bounds and suppress duplicate Supported values. ASTERISK-29227 Reported by: Ivan Poddubny Change-Id: Id43704a1f1a0293e35cc7f844026f0b04f2ac322
-
Sean Bright authored
ASTERISK-29205 #close Change-Id: Ib7aa65644e8df76e2378d7613ee7cf751b9d0bea
-
Joshua C. Colp authored
If a remote side is broken and sends an SDP that can not be negotiated the call will be torn down but there is a window where a second 183 Session Progress or 200 OK that is forked can be received that also attempts to negotiate SDP. Since the code marked the SDP negotiation as being done and complete prior to this it assumes that there is an active local and remote SDP which it can modify, while in fact there is not as the SDP did not successfully negotiate. Since there is no local or remote SDP a crash occurs. This patch changes the pjmedia_sdp_neg_modify_local_offer2 function to no longer assume that a previous SDP negotiation was successful. ASTERISK-29196 Change-Id: I22de45916d3b05fdc2a67da92b3a38271ee5949e
-
- Feb 17, 2021
-
-
Ben Ford authored
After some changes to streams and topologies, receiving fax through local channels stopped working. This change adds a stream topology with a stream of type IMAGE to the local channel pair and allows fax to be received. ASTERISK-29035 #close Change-Id: Id103cc5c9295295d8e68d5628e76220f8f17e9fb
-
- Feb 12, 2021
-
-
Boris P. Korzun authored
Provided a support of a MIME-type for wav16. Added new MIME-type for classic wav. ASTERISK-29275 #close Change-Id: I749bda287ba1ab20c1e0af5e4c0153817d47873b
-
Alexander Traud authored
Two previous commits, 620d9f47 and 6d980de2, allow to set up a call without audio, again. That was introduced originally with commit f04d5fb8 but changed and broke over time. The original commit missed one scenario: A [peer] section in sip.conf, which does not allow audio at all. In that case, chan_sip rejected the call, although even when the requester offered no audio. Now, chan_sip does not check whether there is no audio format but checks whether there is no format in general. In other words, if there is at least one format to offer, the call succeeds. However, to prevent calls with no-audio, chan_sip still rejects calls when both call parties (caller = requester of the call *and* callee = [peer] section in sip.conf) included audio. In such a case, it is expected that the call should have audio. ASTERISK-29280 Change-Id: I0fb74faf51ef22a60c10b467df6a4d1c1943b73e
-
- Feb 09, 2021
-
-
George Joseph authored
If there's no secret specified for an iax2 peer and there's no secret specified in the dial string, Asterisk will crash if the auth method requested by the peer is MD5 or plaintext. You also couldn't specify a default auth method in the [general] section of iax.conf so if you don't have static peers defined and just use the dial string, Asterisk will still crash even if you have a secret specified in the dial string. * Added logic to iax2_call() and authenticate_reply() to print a warning and hanhup the call if encryption is requested and there's no secret or auth method. This prevents the crash. * Added the ability to specify a default "auth" in the [general] section of iax.conf. ASTERISK-29624 Reported by: N A Change-Id: I5928e16137581f7d383fcc7fa04ad96c919e6254
-
- Feb 04, 2021
-
-
Sean Bright authored
Change-Id: I350939f2220f9e5d44ddf4c8d9a4c99fde4d169a
-
- Feb 03, 2021
-
-
Alexander Traud authored
The previous commit 6d980de2 fixed this issue in the core of Asterisk. With that, each channel technology can be used without audio theoretically. Practically, the channel-technology driver chan_sip turned out to have an invalid check preventing that. chan_sip tested whether there is at least one audio format. However, chan_sip has to test whether there is at least one format. More cannot be tested while requesting chan_sip because only the [general] capabilities but not the [peer] caps are known yet. And the [peer] caps might not be a subset or show any intersection with the [general] caps. This change here fixes this. The original commit f04d5fb8, thirteen years ago, contained a software bug as it passed ANY audio capability to the channel-technology driver. Instead, it should have passed NO audio format. Therefore, this addressed issue here was not noticed in Asterisk 1.6.x and Asterisk 1.8. Then, Asterisk 10 changed that from ANY to NO, but nobody reported since then. ASTERISK-29265 Change-Id: Ic16a3bf13cd1b5c4fc4041ed74961177d96b600f
-
- Jan 27, 2021
-
-
Dan Cropp authored
When a Transfer/REFER is executed, TRANSFERSTATUSPROTOCOL variable is 0 when no protocl specific error SIP example of failure, 3xx-6xx for the SIP error code received This allows applications to perform actions based on the failure reason. ASTERISK-29252 #close Reported-by: Dan Cropp Change-Id: Ia6a94784b4925628af122409cdd733c9f29abfc4
-
roadkill authored
if From number contain * or # asterisk will not add user=phone Currently only number that uses AST_DIGIT_ANYNUM can have "user=phone" but the validation should use AST_DIGIT_ANY this is a problem when you want to send call to ISUP as they will disregard the From header and either replace From with anonymous or with p-asserted-identity ASTERISK-29261 Reported by: Mark Petersen Tested by: Mark Petersen Change-Id: I3307bdbf757582740bfee4110e85f7b6c9291cc4
-
Alexander Traud authored
ASTERISK-29259 Change-Id: Ib6a6550e0e08355745d66da8e60ef49e81f9c6c5
-
Alexander Traud authored
This completes the fix for ASTERISK_24543. Only when the call is an outgoing call, consult and append the configured format capabilities (p->caps). When all audio formats got rejected the negotiated format capabilities (p->jointcaps) contain no audio formats for incoming calls. This is required when there are other accepted media streams. ASTERISK-29258 Change-Id: I8bab31c7f3f3700dce204b429ad238a524efebb9
-
Ivan Poddubnyi authored
Log proper control frame names instead of "Unknown control '14'", etc. Change-Id: I1724f2f4d1b064b25a5c93a7da0cb03be5143935
-
- Jan 25, 2021
-
-
Boris P. Korzun authored
Provided a support of variuos URL-schemes for res_musiconhold, registered by ast_bucket_scheme_register(). ASTERISK-29262 #close Change-Id: If0ea8697587353dce358a70035d82649fd4632b6
-
- Jan 18, 2021
-
-
Robert Cripps authored
function ast_sip_session_media_state_add. Check ast_media_type matches when a ast_sip_session_media is found otherwise when transitioning from say image to audio, the wrong session is returned in the first if statement. ASTERISK-29220 #close Change-Id: I6f6efa9b821ebe8881bb4c8c957f8802ddcb4b5d
-
Sean Bright authored
The last argument to ast_copy_string() is the buffer size, not the number of characters, so we add 1 to avoid stamping out the final \n in the persisted SUBSCRIBE message. Change-Id: I019b78942836f57965299af15d173911fcead5b2
-
Jaco Kroon authored
From https://www.mail-archive.com/bug-autoconf@gnu.org/msg04408.html > ... the long-obsolete AC_HEADER_STDC, previously used internally by > AC_INCLUDES_DEFAULT, used AC_EGREP_HEADER. The AC_HEADER_STDC macro > is now a no-op (and is not used at all within Autoconf anymore), so > that change is likely what made the first use of AC_EGREP_HEADER the > one inside the if condition, causing the observed results. The implication is that the test does nothing anyway, and due to it being a no-op from 2.70 onwards, results in the required not being set to yes, resulting in ./configure to fail. Change-Id: Ic1ff38d87f791fbf1f2a80512f81bb7110392460 Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
Alexander Traud authored
Otherwise, Clang 10 warned because of logical-not-parentheses. Change-Id: Ia8fb493f727b08070eb2dcf520c08df34ed11d79
-
Alexander Traud authored
ASTERISK-29248 Change-Id: I2b17bd5ffb246bc64c463402c9831413da78a556
-
Ben Ford authored
There are a couple of parameters (datalen and data) that do not get set in chan_pjsip_indicate which could cause an Invalid message to pop up for things such as fax. This patch adds them to the frame. Change-Id: Ia51be086a0708be905e73d1f433572c49c7e38f8
-
- Jan 14, 2021
-
-
Asterisk Development Team authored
-
- Jan 13, 2021
-
-
Jean Aunis authored
When both a tech subscription and an endpoint subscription exist for a given endpoint, TextMessageReceived events are dispatched to the tech subscription only. ASTERISK-29229 Change-Id: I9eac4cba5f9e27285a282509395347abc58fc2b8
-
Ivan Poddubnyi authored
session->channel doesn't exist until chan_pjsip creates it, so intead of setting a channel variable every new incoming call sets one and the same global variable. This patch moves the code to chan_pjsip so that SIPDOMAIN is set on a newly created channel, it also removes a misleading reference to channel->session used to fetch call pickup configuraion. ASTERISK-29240 Change-Id: I90c9bbbed01f5d8863585631a29322ae4e046755
-
Alexander Traud authored
Previously, chan_sip parsed all known media streams in an SDP offer like video (and text) even when videosupport=no (and textsupport=no). This wasted processor power. Furthermore, chan_sip accepted SDP offers, including no audio but just video (or text) streams although videosupport=no (or textsupport=no). Finally, chan_sip denied the whole offer instead of individual streams when they had encryption (SDES-sRTP) unexpectedly enabled. ASTERISK-29238 ASTERISK-29237 ASTERISK-29222 Change-Id: Ie49e4e2a11f0265f914b684738348ba8c0f89755
-