summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-13AST-2017-012: Place single RTCP report block at beginning of report.14Joshua Colp
When the RTCP code was transitioned over to Stasis a code change was made to keep track of how many reports are present. This count controlled where report blocks were placed in the RTCP report. If a compound RTCP packet was received this logic would incorrectly place a report block in the wrong location resulting in a write to an invalid location. This change removes this counting logic and always places the report block at the first position. If in the future multiple reports are supported the logic can be extended but for now keeping a count serves no purpose. ASTERISK-27382 ASTERISK-27429 Change-Id: Iad6c8a9985c4b608ef493e19c421211615485116
2017-12-01AST-2017-013: chan_skinny: Call pthread_detach when sess threads endGeorge Joseph
chan_skinny creates a new thread for each new session. In trying to be a good cleanup citizen, the threads are joinable and the unload_module function does a pthread_cancel() and a pthread_join() on any sessions that are active at that time. This has an unintended side effect though. Since you can call pthread_join on a thread that's already terminated, pthreads keeps the thread's storage around until you explicitly call pthread_join (or pthread_detach()). Since only the module_unload function was calling pthread_join, and even then only on the ones active at the tme, the storage for every thread/session ever created sticks around until asterisk exits. * A thread can detach itself so the session_destroy() function now calls pthread_detach() just before it frees the session memory allocation. The module_unload function still takes care of the ones that are still active should the module be unloaded. ASTERISK-27452 Reported by: Juan Sacco Change-Id: I9af7268eba14bf76960566f891320f97b974e6dd
2017-11-09Merge "res_pjsip_registrar.c: Fix AOR and pjproject group deadlock." into 14Kevin Harwell
2017-11-08Merge "AST-2017-009: pjproject: Add validation of numeric header values" into 14George Joseph
2017-11-08Merge "AST-2017-011 - res_pjsip_session: session leak when a call is ↵George Joseph
rejected" into 14
2017-11-08AST-2017-009: pjproject: Add validation of numeric header valuesGeorge Joseph
Parsing the numeric header fields like cseq, ttl, port, etc. all had the potential to overflow, either causing unintended values to be captured or, if the values were subsequently converted back to strings, a buffer overrun. To address this, new "strto" functions have been created that do range checking and those functions are used wherever possible in the parser. * Created pjlib/include/limits.h and pjlib/include/compat/limits.h to either include the system limits.h or define common numeric limits if there is no system limits.h. * Created strto*_validate functions in sip_parser that take bounds and on failure call the on_str_parse_error function which prints an error message and calls PJ_THROW. * Updated sip_parser to validate the numeric fields. * Fixed an issue in sip_transport that prevented error messages from being properly displayed. * Added "volatile" to some variables referenced in PJ_CATCH blocks as the optimizer was sometimes optimizing them away. * Fixed length calculation in sip_transaction/create_tsx_key_2543 to account for signed ints being 11 characters, not 9. ASTERISK-27319 Reported by: Youngsung Kim at LINE Corporation Change-Id: I48de2e4ccf196990906304e8d7061f4ffdd772ff
2017-11-08AST-2017-011 - res_pjsip_session: session leak when a call is rejectedKevin Harwell
A previous commit made it so when an invite session transitioned into a disconnected state destruction of the Asterisk pjsip session object was postponed until either a transport error occurred or the event timer expired. However, if a call was rejected (for instance a 488) before the session was fully established the event timer may not have been initiated, or it was canceled without triggering either of the session finalizing states mentioned above. Really the only time destruction of the session should be delayed is when a BYE is being transacted. This is because it's possible in some cases for the session to be disconnected, but the BYE is still transacting. This patch makes it so the session object always gets released (no more memory leak) when the pjsip session is in a disconnected state. Except when the method is a BYE. Then it waits until a transport error occurs or an event timeout. ASTERISK-27345 #close Reported by: Corey Farrell Change-Id: I1e724737b758c20ac76d19d3611e3d2876ae10ed
2017-11-08AST-2017-010: Fix cdr_object_update_party_b_userfield_cb() buf overrunRichard Mudgett
cdr_object_update_party_b_userfield_cb() could overrun the fixed buffer if the supplied string is too long. The long string could be supplied by external means using the CDR(userfield) function. This may seem reminiscent to AST-2017-001 (ASTERISK_26897) and it is. The earlier patch fixed the buffer overrun for Party A's userfield while this patch fixes the same thing for Party B's userfield. ASTERISK-27337 Change-Id: I0fa767f65ecec7e676ca465306ff9e0edbf3b652
2017-11-07res_pjsip_registrar.c: Fix AOR and pjproject group deadlock.Richard Mudgett
One of the patches for ASTERISK_27147 introduced a deadlock regression. When the connection oriented transport shut down, the code attempted to remove the associated contact. However, that same transport had just requested a registration that we hadn't responded to yet. Depending upon timing we could deadlock. * Made send the REGISTER response after we completed processing the request contacts and released the AOR lock to avoid the deadlock. ASTERISK-27391 Change-Id: I89a90f87cb7a02facbafb44c75d8845f93417364
2017-11-02res_pjsip: Add to list of valid characters for from_user.Ben Ford
Fixes a regression where some characters were unable to be used in the from_user field of an endpoint. Additionally, the backtick was removed from the list of valid characters, since it is not valid, and it was replaced with a single quote, which is a valid character. ASTERISK-27387 Change-Id: Id80c10a644508365c87b3182e99ea49da11b0281
2017-10-25Merge "http.c: Fix http header send content." into 14Joshua Colp
2017-10-25res_xmpp: Ensure the connection filter is available.Joshua Colp
Users of the API that res_xmpp provides expect that a filter be available on the client at all times. When OAuth authentication support was added this requirement was not maintained. This change merely moves the OAuth authentication to after the filter is created, ensuring users of res_xmpp can add things to the filter as needed. ASTERISK-27346 Change-Id: I4ac474afe220e833288ff574e32e2b9a23394886 (cherry picked from commit 07e17fd04ffcf204400898660a4c118666596d5d)
2017-10-25http.c: Fix http header send content.Ben Ford
Currently ast_http_send barricades a portion of the content that needs to be sent in order to establish a connection for things like the ARI client. The conditional and contents have been changed to ensure that everything that needs to be sent, will be sent. ASTERISK-27372 Change-Id: I8816d2d8f80f4fefc6dcae4b5fdfc97f1e46496d
2017-10-13AMI: Increase version numberKevin Harwell
Bump the AMI patch number since the following new addition was made: * Added a new CancelAtxfer action that cancels an attended transfer. Change-Id: I9bac528791bd62ef0e99243903b6bc7a6c7ab182
2017-10-13Merge "features, manager : Add CancelAtxfer AMI action" into 14Joshua Colp
2017-10-12Merge "res_pjsip_session: Prevent user=phone being added to anonimized ↵Joshua Colp
URIs." into 14
2017-10-12features, manager : Add CancelAtxfer AMI actionThomas Sevestre
Add action to cancel feature attended transfer with AMI interface ASTERISK-27215 #close Change-Id: Iab8a81362b5a1757e2608f70b014ef863200cb42
2017-10-12Merge "sorcery: Use ao2_weakproxy to hold list of instances." into 14Jenkins2
2017-10-12res_pjsip_session: Prevent user=phone being added to anonimized URIs.Daniel Tryba
Move ast_sip_add_usereqphone to be called after anonymization of URIs, to prevent the user_eq_phone adding "user=phone" to URIs containing a username that is not a phonenumber (RFC3261 19.1.1). An extra call to ast_sip_add_usereqphone on the saved version before anonymization is added to add user=phone" to the PAI. ASTERISK-27047 #close Change-Id: Ie5644bc66341b86dc08b1f7442210de2e6acdec6
2017-10-12Merge "named_locks: Use ao2_weakproxy_find." into 14Jenkins2
2017-10-12Merge "astobj2: Add ao2_weakproxy_find function." into 14Joshua Colp
2017-10-12Merge "astobj2: Run weakproxy callbacks outside of lock." into 14Jenkins2
2017-10-12Merge "cdr.c: Defer misc checks." into 14Jenkins2
2017-10-11cdr_mysql: avoid releasing a config stringTzafrir Cohen
Fixes a memory corruption issue after a reload of cdr_mysql. Issue was accidentally included in 747beb1ed159f89a3b58742e4257740b3d6d6bba . ASTERISK-27270 #close Change-Id: I90b6a9d18710c0f9009466370bd5f4bac5d5d12e
2017-10-11Merge "chan_vpb: Fix a gcc 7 out-of-bounds complaint" into 14Jenkins2
2017-10-11Merge "app_originate: Set ORIGINATE_STATUS correctly on failure" into 14Jenkins2
2017-10-11cdr.c: Defer misc checks.Richard Mudgett
Try to defer some checks until needed in case there is an early exit. Change-Id: Ibc6b34c38a4f60ad4f9b67984b7d070a07257064
2017-10-11Merge "cdr.c: Eliminated simple RAII_VAR usages." into 14Jenkins2
2017-10-11chan_vpb: Fix a gcc 7 out-of-bounds complaintGeorge Joseph
chan_vpb was trying to use sizeof(*p->play_dtmf), where p->play_dtmf is defined as char[16], to get the length of the array but since p->play_dtmf is an actual array, sizeof(*p->play_dtmf) returns the size of the first array element, which is 1. gcc7 validly complains because the context in which it's used could cause an out-of-bounds condition. Change-Id: If9c4bfdb6b02fa72d39e0c09bf88900663c000ba
2017-10-11sorcery: Use ao2_weakproxy to hold list of instances.Corey Farrell
Store weak proxy objects in instances container. Change-Id: I5a150a4e13cee319d46b5a4654f95a4623a978f8
2017-10-11Merge "res_pjsip_registrar.c: Update remove_existing AOR contact handling." ↵Jenkins2
into 14
2017-10-10named_locks: Use ao2_weakproxy_find.Corey Farrell
Change-Id: I0ce8a1b7101b6caac6a19f83a89f00eaba1e9d9c
2017-10-10astobj2: Add ao2_weakproxy_find function.Corey Farrell
This function finds a weak proxy in an ao2_container and returns the real object associated with it. Change-Id: I9da822049747275f5961b5c0a7f14e87157d65d8
2017-10-10astobj2: Run weakproxy callbacks outside of lock.Corey Farrell
Copy the list of weakproxy callbacks to temporary memory so they can be run without holding the weakproxy lock. Change-Id: Ib167622a8a0f873fd73938f7611b2a5914308047
2017-10-10app_originate: Set ORIGINATE_STATUS correctly on failureSean Bright
We were ignoring the return value from ast_pbx_outgoing_exten() and ast_pbx_outgoing_app() which could fail before setting the reason code. This resulted in failures being reported as success. ASTERISK-25266 #close Reported by: Allen Ford Change-Id: Idf16237b7e41b527d2c69c865829128686beeb3b
2017-10-10contrib/thirdparty/sip_to_pjsip: add additional flag mappingsTorrey Searle
add mappings for udptl redundancy, rtptimeout, and debug flags Change-Id: Ie73cf5c83c05dee01eb9624ede76c1a30225d73a
2017-10-10cdr.c: Eliminated simple RAII_VAR usages.Richard Mudgett
Change-Id: I150505db307249a962987e7b941bdd369bb91f35
2017-10-10Merge "res_pjproject: Fix cleanup of buildopts vector." into 14Joshua Colp
2017-10-10Merge "tcptls: Do not re-bind to wildcard on client creation." into 14Jenkins2
2017-10-09res_pjproject: Fix cleanup of buildopts vector.Corey Farrell
ASTERISK-27306 Change-Id: I3bed0edf3f55b1d4adcbabb25ec14f11dc766c72
2017-10-09Merge "cdr.h: Fix doxygen comments." into 14Joshua Colp
2017-10-09Merge "cdr.c: Replace redundant check with an ast_assert()" into 14Jenkins2
2017-10-09Merge "cdr.c: Use current ao2 flag names" into 14Joshua Colp
2017-10-09Merge "res_pjsip: Fix issues that prevented shutdown of modules." into 14Jenkins2
2017-10-09Merge "cdr.c: Replace inlined code with ao2_t_replace()" into 14Jenkins2
2017-10-09Merge "res_config_sqlite: Don't enable SQLite CDRs when running 'make ↵Joshua Colp
samples'" into 14
2017-10-09Merge "res_pjsip: Fix leak of persistent endpoint references." into 14Jenkins2
2017-10-09cdr.c: Replace redundant check with an ast_assert()Richard Mudgett
The only caller of cdr_object_fn_table.process_party_b() explicitly does the check before calling. Change-Id: Ib0c53cdf5048227842846e0df9d2c19117c45618
2017-10-09cdr.c: Replace inlined code with ao2_t_replace()Richard Mudgett
Change-Id: I9f424f5282ca7d833592f958d95f1b2bafb549b0
2017-10-09cdr.c: Use current ao2 flag namesRichard Mudgett
Change-Id: Ib59d7d2f2a4a822754628f2c48a308d6791a6e6e