- 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
-
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
-
George Joseph authored
It was possible for a module that registered for transport monitor events to pass in a pjsip_transport that had already been freed. This caused pjsip_transport_events to crash when looking up the monitor for the transport. The fix is a two pronged approach. 1. We now increment the reference count on pjsip_transports when we create monitors for them, then decrement the count when the transport is going to be destroyed. 2. There are now APIs to register and unregister monitor callbacks by "transport key" which is a string concatenation of the remote ip address and port. This way the module needing to monitor the transport doesn't have to hold on to the transport object itself to unregister. It just has to save the transport_key. * Added the pjsip_transport reference increment and decrement. * Changed the internal transport monitor container key from the transport->obj_name (which may not be unique anyway) to the transport_key. * Added a helper macro AST_SIP_MAKE_REMOTE_IPADDR_PORT_STR() that fills a buffer with the transport_key using a passed-in pjsip_transport. * Added the following functions: ast_sip_transport_monitor_register_key ast_sip_transport_monitor_register_replace_key ast_sip_transport_monitor_unregister_key and marked their non-key counterparts as deprecated. * Updated res_pjsip_pubsub and res_pjsip_outbound_register to use the new "key" monitor functions. NOTE: res_pjsip_registrar also uses the transport monitor functionality but doesn't have a persistent object other than contact to store a transport key. At this time, it continues to use the non-key monitor functions. ASTERISK-30244 Change-Id: I1a20baf2a8643c272dcf819871d6c395f148f00b
-
Mike Bradeen authored
Add live_dangerously flag to manager and use this flag to determine if a configuation file outside of AST_CONFIG_DIR should be read. ASTERISK-30176 Change-Id: I46b26af4047433b49ae5c8a85cb8cda806a07404
-
- Dec 01, 2022
-
-
Mike Bradeen authored
When decoding q.931 encoded calling/called number now checking for length being less than minimum required. ASTERISK-30103 Change-Id: I3dcfce0f35eca258dc450f87c92d4d7af402c2e7
-
- Nov 29, 2022
-
-
Naveen Albert authored
The Answer application currently waits for up to 500ms for media, even if users specify a different timeout. This adds an option to not wait for media on the channel by doing a raw answer instead. The default 500ms threshold is also documented. ASTERISK-30308 #close Change-Id: Id59cd340c44b8b8b2384c479e17e5123e917cba4
-
Naveen Albert authored
Currently, chan_dahdi will wait for at least one ring before an incoming call can enter the dialplan. This is generally necessary in order to receive the Caller ID spill and/or distinctive ringing detection. However, if neither of these is required, then there is nothing gained by waiting for one ring and this unnecessarily delays call setup. Users can now use immediate=yes to make FXO channels (FXS signaled) begin processing dialplan as soon as Asterisk receives the call. ASTERISK-30305 #close Change-Id: I20818b370b2e4892c7f40c8a8753fa06a81750b5
-
Maximilian Fridrich authored
This PR contains two relatively separate changes in channel.c and res_pjsip_session.c which ensure that topology changes are not ignored in cases where they should be handled. For channel.c: The function ast_channel_request_stream_topology_change only triggers a stream topology request change indication, if the channel's topology does not equal the requested topology. However, a channel could be in a state where it is currently "negotiating" a new topology but hasn't updated it yet, so the topology request change would be lost. Channels need to be able to handle such situations internally and stream topology requests should therefore always be passed on. In the case of chan_pjsip for example, it queues a session refresh (re-INVITE) if it is currently in the middle of a transaction or has pending requests (among other reasons). Now, ast_channel_request_stream_topology_change always indicates a stream topology request change even if the requested topology equals the channel's topology. For res_pjsip_session.c: The function resolve_refresh_media_states does not process stream state changes if the delayed active state differs from the current active state. I.e. if the currently active stream state has changed between the time the sip session refresh request was queued and the time it is being processed, the session refresh is ignored. However, res_pjsip_session contains logic that ensures that session refreshes are queued and re-queued correctly if a session refresh is currently not possible. So this check is not necessary and led to some session refreshes being lost. Now, a session refresh is done even if the delayed active state differs from the current active state and it is checked whether the delayed pending state differs from the current active - because that means a refresh is necessary. Further, the unit test of resolve_refresh_media_states was adapted to reflect the new behavior. I.e. the changes to delayed pending are prioritized over the changes to current active because we want to preserve the original intention of the pending state. ASTERISK-30184 Change-Id: Icd0703295271089057717006730b555b9a1d4e5a
-
- Nov 28, 2022
-
-
Naveen Albert authored
SLAStation currently autoservices the station channel before creating a thread to actually dial the trunk. This leads to duplicate servicing of the channel which causes assertions, deadlocks, crashes, and moreover not the correct behavior. Removing the autoservice prevents the crash, but if the station hangs up before the trunk answers, the call hangs since the hangup was never serviced on the channel. This is fixed by not autoservicing the channel, but instead servicing it in the thread dialing the trunk, since it is doing so synchronously to begin with. Instead of sleeping for 100ms in a loop, we simply use the channel for timing, and abort if it disappears. The same issue also occurs with SLATrunk when a call is answered, because ast_answer invokes ast_waitfor_nandfds. Thus, we use ast_raw_answer instead which does not cause any conflict and allows the call to be answered normally without thread blocking issues. ASTERISK-29998 #close Change-Id: Icc237d50354b5910000d2305901e86d2c87bb9d8
-
- Nov 21, 2022
-
-
Jaco Kroon authored
Found in res_geolocation, but I believe others may have similar issues, thus not linking to a specific issue. Essentially gcc doesn't mark the stack for being non-executable unless it's compiling the source, this informs ld via gcc to mark the object as not requiring an executable stack (which a binary blob obviously doesn't). ASTERISK-30321 Change-Id: I71bcc2fd1fe0c82a28b3257405d6f2b566fd9bfc Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
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
-
Naveen Albert authored
Removes the function mkstemp_file and uses ast_file_mkftemp from file.h instead. ASTERISK-30295 #close Change-Id: I7412ec06f88c39ee353bcdb8c976c2fcac546609
-
- Nov 16, 2022
-
-
Joshua C. Colp authored
The "RECORD FILE" command in res_agi has its own implementation for actually doing the recording. This has resulted in it not actually obeying the option "transmit_silence" when recording. This change causes it to now send silence if the option is enabled. ASTERISK-30314 Change-Id: Ib3a85601ff35d1b904f836691bad8a4b7e957174
-
- Nov 08, 2022
-
-
Naveen Albert authored
Adds an option that allows MixMonitor to delete its copy of any recording files before exiting. This can be handy in conjunction with options like m, which copy the file elsewhere, and the original files may no longer be needed. ASTERISK-30284 #close Change-Id: Ida093679c67e300efc154a97b6d8ec0f104e581e
-
Naveen Albert authored
The ModuleCheck XML documentation falsely claims that the module's version number is returned. This has not been the case since 14, since the version number is not available anymore, but the documentation was not changed at the time. It is now updated to reflect this. ASTERISK-30285 #close Change-Id: Idde2d1205a11f2623fa1ddab192faa3dc4081e91
-
- Nov 06, 2022
-
-
Naveen Albert authored
Adds an ignore case for wink since it should pass through with no warning. ASTERISK-30290 #close Change-Id: Ieb7e34daa717357ac5c93efb0059f6c2321f16ad
-
- Nov 02, 2022
-
-
George Joseph authored
Fixed the specification of "outputdir" when calling ast_coredumper so the txt files are saved in the correct place. ASTERISK-30282 Change-Id: Ic631cb90c1e4c29d970c982dff45fda5e0eb15b6
-