Commit Graph

29927 Commits

Author SHA1 Message Date
Corey Farrell b058f8673a astobj2: Add ao2_weakproxy_find function.
This function finds a weak proxy in an ao2_container and returns the
real object associated with it.

Change-Id: I9da822049747275f5961b5c0a7f14e87157d65d8
2017-10-10 20:15:25 -04:00
Corey Farrell fd3101e8ad astobj2: Run weakproxy callbacks outside of lock.
Copy the list of weakproxy callbacks to temporary memory so they can be
run without holding the weakproxy lock.

Change-Id: Ib167622a8a0f873fd73938f7611b2a5914308047
2017-10-10 18:23:00 -04:00
Jenkins2 65366a435e Merge "contrib/thirdparty/sip_to_pjsip: add additional flag mappings" 2017-10-10 12:51:42 -05:00
Jenkins2 6fc222a1d2 Merge "res_pjsip: Add REF_DEBUG info to module references." 2017-10-10 12:28:13 -05:00
Torrey Searle b1d9fc87bc contrib/thirdparty/sip_to_pjsip: add additional flag mappings
add mappings for udptl redundancy, rtptimeout, and debug flags

Change-Id: Ie73cf5c83c05dee01eb9624ede76c1a30225d73a
2017-10-10 10:50:24 -05:00
Jenkins2 f006310bd1 Merge "res_pjproject: Fix cleanup of buildopts vector." 2017-10-10 08:12:25 -05:00
Joshua Colp 49e6356620 Merge "tcptls: Do not re-bind to wildcard on client creation." 2017-10-10 07:53:04 -05:00
Corey Farrell fae09c6676 res_pjproject: Fix cleanup of buildopts vector.
ASTERISK-27306

Change-Id: I3bed0edf3f55b1d4adcbabb25ec14f11dc766c72
2017-10-09 23:51:03 -04:00
Jenkins2 7d9fa0bea4 Merge "cdr.c: Replace redundant check with an ast_assert()" 2017-10-09 20:04:33 -05:00
Jenkins2 7002705940 Merge "cdr.h: Fix doxygen comments." 2017-10-09 19:01:19 -05:00
Joshua Colp 37297d2c0e Merge "cdr.c: Use current ao2 flag names" 2017-10-09 18:08:26 -05:00
Jenkins2 89859f33b2 Merge "res_pjsip: Fix issues that prevented shutdown of modules." 2017-10-09 17:29:26 -05:00
Jenkins2 a152824798 Merge "cdr.c: Replace inlined code with ao2_t_replace()" 2017-10-09 16:52:29 -05:00
Jenkins2 b877181cd9 Merge "res_pjsip_session: Fix format_cap leak." 2017-10-09 16:23:01 -05:00
Jenkins2 71c3565708 Merge "res_config_sqlite: Don't enable SQLite CDRs when running 'make samples'" 2017-10-09 16:20:55 -05:00
Jenkins2 4914311150 Merge "res_pjsip: Fix leak of persistent endpoint references." 2017-10-09 15:24:49 -05:00
Richard Mudgett fdf9aacca3 cdr.c: Replace redundant check with an ast_assert()
The only caller of cdr_object_fn_table.process_party_b() explicitly does
the check before calling.

Change-Id: Ib0c53cdf5048227842846e0df9d2c19117c45618
2017-10-09 13:34:32 -05:00
Richard Mudgett 2e4b5fadbd cdr.c: Replace inlined code with ao2_t_replace()
Change-Id: I9f424f5282ca7d833592f958d95f1b2bafb549b0
2017-10-09 13:30:16 -05:00
Richard Mudgett 62980eedc3 cdr.c: Use current ao2 flag names
Change-Id: Ib59d7d2f2a4a822754628f2c48a308d6791a6e6e
2017-10-09 13:28:04 -05:00
Richard Mudgett e769846f11 cdr.h: Fix doxygen comments.
* Also some misc formatting in cdr.c.

Change-Id: Ied89a28802a662c37c43326a1aafdce596e0df4a
2017-10-09 13:25:45 -05:00
Jenkins2 13c1c72401 Merge "res_sdp_translator_pjmedia: Fix test unregistration." 2017-10-09 12:10:34 -05:00
Sean Bright ad38a55a2d res_config_sqlite: Don't enable SQLite CDRs when running 'make samples'
Change-Id: I65a5190b2732b2246d67472db70dd37db64ddad4
2017-10-09 08:16:44 -05:00
hajekd a0a1f95abf res/res_ari.c Fix: Memory leaks in ARI when using Content-Type: application/json
ASTERISK-27305
Reported by: David Hajek
Tested by: David Hajek

Change-Id: Ife3e289062e6cf7d0e7d342dbf79ed96feff441e
2017-10-09 08:05:31 -05:00
Alexander Traud feeb0974eb tcptls: Do not re-bind to wildcard on client creation.
Since ASTERISK-26922, this issue affected only those chan_sip which were
* enabled for dual-stack (bindaddr=::), and
* enabled for TCP (tcpenable=yes) and/or TLS (tlsenable=yes), and
* tried to register and/or invite a IPv4-only service,
* via TCP and/or TLS.
Now, ast_tcptls_client_create does not re-bind to [::] anymore.

ASTERISK-27324 #close

Change-Id: I4b242837bdeb1ec7130dc82505c6180a946fd9b5
2017-10-08 16:11:10 +02:00
Corey Farrell eb224fea5e res_pjsip_session: Fix format_cap leak.
ASTERISK-27306

Change-Id: I2c8d3fc148f9f53715c958314e1146f9611741f3
2017-10-07 17:29:30 -04:00
Joshua Colp 79deaa6a96 Merge "vector: multiple evaluation of elem in AST_VECTOR_ADD_SORTED." 2017-10-07 14:46:49 -05:00
Corey Farrell a68a91f722 res_pjsip: Fix leak of persistent endpoint references.
Do not manually call sip_endpoint_apply_handler from load_all_endpoints.
This is not necessary and causes memory leaks.

Additionally reinitialize persistent->aors when we reuse a persistent
object with a new endpoint.

ASTERISK-27306

Change-Id: I59bbfc8da8a14d5f4af8c5bb1e71f8592ae823eb
2017-10-06 16:43:31 -04:00
Jenkins2 98076de152 Merge "main/strings: Fix uninitialized value." 2017-10-06 14:49:11 -05:00
Jenkins2 d4be387d41 Merge "res_pjsip: Fix leak of fake_auth references." 2017-10-06 14:16:56 -05:00
Corey Farrell 3bd00c4a7e vector: multiple evaluation of elem in AST_VECTOR_ADD_SORTED.
Use temporary variable to prevent multiple evaluations of elem argument.
This resolves a memory leak in res_pjproject startup.

ASTERISK-27317 #close

Change-Id: Ib960d7f5576f9e1a3c478ecb48995582a574e06d
2017-10-06 14:38:58 -04:00
Corey Farrell b35ac9e566 res_pjsip: Fix leak of fake_auth references.
pjsip_distributor leaks references to fake_auth when the default realm
has not changed.

ASTERISK-27306

Change-Id: I3fcf103b3680ad2d1d4610dcd6738eeaebf4d202
2017-10-06 10:23:38 -04:00
Corey Farrell 0f3e725503 main/strings: Fix uninitialized value.
ast_strings_match uses sscanf and checks for non-zero return to verify a
token was parsed. This is incorrect as sscanf returns EOF (-1) for errors.

ASTERISK-27318 #close

Change-Id: Ifcece92605f58116eff24c5a0a3b0ee08b3c87b1
2017-10-05 21:23:31 -04:00
Corey Farrell 0b6be1b2d4 res_sdp_translator_pjmedia: Fix test unregistration.
ASTERISK-27306

Change-Id: Ib3ed47167cb697ab7bd0a56cab589893f491651b
2017-10-05 20:55:31 -04:00
Daniel Tryba 59b6e8467a res_pjsip_caller_id chan_sip: Comply to RFC 3323 values for privacy
Currently privacy requests are only granted if the Privacy header
value is exactly "id" (defined in RFC 3325). It ignores any other
possible value (or a combination there of). This patch reverses the
logic from testing for "id" to grant privacy, to testing for "none" and
granting privacy for any other value. "none" must not be used in
combination with any other value (RFC 3323 section 4.2).

ASTERISK-27284 #close

Change-Id: If438a21f31a962da32d7a33ff33bdeb1e776fe56
2017-10-05 07:53:03 -05:00
Joshua Colp 3ef6834c3b Merge "app_queue.c: Fix announcements when announce-to-first-user not enabled." 2017-10-04 15:06:49 -05:00
Corey Farrell 65399a5eda res_pjsip: Add REF_DEBUG info to module references.
This provides better information to REF_DEBUG log for troubleshooting
when the system is unable to unload res_pjsip.so during shutdown due to
module references.

ASTERISK-27306

Change-Id: I63197ad33d1aebe60d12e0a6561718bdc54e4612
2017-10-04 12:00:47 -04:00
Corey Farrell 7d04544986 res_pjsip: Fix issues that prevented shutdown of modules.
res_pjsip and res_pjsip_session had circular references, preventing both
modules from shutting down.
* Move session supplement registration to res_pjsip.
* Use create internal functions for use by pjsip_message_filter.c.

ASTERISK-27306

Change-Id: Ifbd5c19ec848010111afeab2436f9699da06ba6b
2017-10-04 12:00:31 -04:00
krells 2301447a20 res_calendar_icalendar: Filter out occurrences superceded by another VEVENT
When we are loading the calendars, we call libical's
icalcomponent_foreach_recurrence method for each VEVENT component that
we have in our calendar.

That method has no knowledge concerning the existence of the other
VEVENT components and will feed our callback with all ocurrences
matching the requested time span.

The occurrences generated by icalcomponent_foreach_recurrence while
expanding a recurring VEVENT's RRULE and RDATE properties can be
superceded by an other VEVENT sharing the same UID.

I use an external iterator (in libical terminology) to avoid messing
with the internal ones from the calling function, and search for
VEVENTS which could supersede the current occurrence.

The event which can invalidate this occurence needs to have:

- the same UID as our recurrent component (comp)
- a RECURRENCE-ID property, which represents the start time of this
  occurrence

If one component is found, just clean and return.

ASTERISK-27296 #close
Reported by: Benoît Dereck-Tricot

Change-Id: I8587ae3eaa765af7cb21eda3b6bf84e8a1c87af8
2017-10-04 10:02:53 -05:00
Jenkins2 7156477ba0 Merge "heap.c: No need to calloc heap pointer array." 2017-10-03 20:41:08 -05:00
Joshua Colp 323762abf3 Merge "logger: Bring back ability to turn debug on by source file" 2017-10-03 19:33:32 -05:00
Richard Mudgett b2dbfe23ef app_queue.c: Fix announcements when announce-to-first-user not enabled.
The previous patch for ASTERISK-27216 made it so you wouldn't get any
position or periodic announcements unless you had announce-to-first-user
enabled.  The announce-to-first-user feature was added by ASTERISK_21782
as a result of the patch which introduced the redundant announcements that
ASTERISK-27216 removes.

* By noting that the makeannouncement variable is used to suppresses the
first user announcement, we set its initial value to the
announce-to-first-user enable setting.

ASTERISK-27216

Change-Id: Ieaeb7dbea8ae7073086b775fbafe0625b000b10a
2017-09-28 18:48:21 -05:00
Richard Mudgett 80097676e7 heap.c: No need to calloc heap pointer array.
Change-Id: I5ae2f316229f336eb90d99c7af7ed07a33097e68
2017-09-28 15:49:50 -05:00
Jenkins2 5307659e96 Merge "pjsip_message_filter: Fix regression causing bad contact address" 2017-09-28 13:36:29 -05:00
Joshua Colp 47d68401d7 Merge "res_stasis: Add 'video_sfu' as a requested bridge type." 2017-09-28 13:13:31 -05:00
Joshua Colp dd4c573e6d Merge "res_pjsip_session: outgoing call did not offer all configured codecs" 2017-09-28 12:24:11 -05:00
George Joseph d1de7948fe logger: Bring back ability to turn debug on by source file
Somewhere along the way we lost the ability to debug individual
source files.  For modules, this wasn't a big deal but all the
source files in ./main are in the one "core" module so debugging
individual core capabilities was almost impossible.

* Added a test to DEBUG_ATLEAST that also checks __FILE__ instead
of just module name.  Any source file will work even if it's in
a module subdirectory.

Change-Id: Icc0af41837f3b1679dec7af21fa32cd1f7469f6e
2017-09-28 12:18:58 -05:00
Jenkins2 7c5e55f15d Merge "pjproject: Patch to correct STUN FINGERPRINT usage" 2017-09-28 08:30:54 -05:00
Joshua Colp a78ffe96a8 Merge "res_rtp_asterisk.c: Fix bridge_p2p_rtp_write() reentrancy potential." 2017-09-28 07:08:33 -05:00
Joshua Colp 4ea4364eef Merge "res_rtp_asterisk: Trim trailing byte off of SDES packet" 2017-09-28 06:45:28 -05:00
Joshua Colp f21408c866 res_stasis: Add 'video_sfu' as a requested bridge type.
This change adds 'video_sfu' as a requested bridge type when
creating a bridge. By specifying this a mixing type bridge is
created that exchanges video in an SFU fashion.

Change-Id: I2ada47cf5f3fc176518b647c0b4aa39d55339606
2017-09-28 05:34:15 -05:00