Commit Graph

31057 Commits

Author SHA1 Message Date
Richard Mudgett 661fec4b59 core: Remove unused/incomplete SDP modules.
Change-Id: Icc28fbdc46f58e54a21554e6fe8b078f841b1f86
2018-04-25 15:58:24 -03:00
Joshua Colp 1dedc73951 Merge "streams: Add string metadata capability" 2018-04-25 13:45:26 -05:00
Jenkins2 ff858577ba Merge "menuselect: Add DragonFly BSD." 2018-04-25 13:31:44 -05:00
Richard Mudgett 0464e773d8 Merge "chan_ooh323: fix ooManualProgress/ooManualRingback on ooh323 debuggin on" 2018-04-25 10:46:05 -05:00
Jenkins2 56a9338fc1 Merge "Build System: Add missing ASTMM_LIBC to flex output." 2018-04-25 10:02:13 -05:00
Jenkins2 bf692f2dc3 Merge "format_pcm: Correct behavior of fseek and ftell for G.722" 2018-04-25 09:44:43 -05:00
Joshua Colp aa33b706e4 Merge "bridge_softmix: Fix some REMB bugs." 2018-04-25 04:29:42 -05:00
Joshua Colp a9e45eb5c9 Merge "chan_ooh323: Fix cppcheck warnings" 2018-04-24 18:54:36 -05:00
Alexander Anikin c481afe873 chan_ooh323: fix ooManualProgress/ooManualRingback on ooh323 debuggin on
Call ooManualProgress/Ringback outside of ast_debug function
when ooh323 debugging is on

ASTERISK-27812 #close
ASTERISK-26893 #close
Reported by: Dimos, Marco Giordani

Change-Id: I5873762e4f05824e7b6e94a19dd4eb56adbbbb79
2018-04-20 22:17:31 +03:00
Joshua Colp 5712a0ae52 bridge_softmix: Fix some REMB bugs.
This change fixes a bug where a REMB collector may be
freed twice, and also tweaks REMB combining such that if
there is no bitrate from anyone (or there are no sources)
we report 0 instead of using an old bitrate.

ASTERISK-27804

Change-Id: Ia9dc9c150043890ee7ff85e9cdec007f1a77fcfd
2018-04-20 06:26:17 -06:00
Alexander Traud d54637373a menuselect: Add DragonFly BSD.
In DragonFly BSD, added libraries from ports are placed into /usr/local.
Therefore, this directory must be added for the preprocessor, compiler, and
linker.

Beside that, the script ./configure was updated:
* OSARCH list was outdated and not used, removed.
* AC_CANONICAL_BUILD was not used.
* _REENTRANT, this feature test macro is obsolete.

ASTERISK-27820

Change-Id: I186d88d99cfa4de6569888e12ac97bd2f441c422
2018-04-20 12:44:12 +02:00
Jenkins2 a9c74fdc04 Merge ""confbridge show profile bridge" does not output "sfu" when video_mode is sfu" 2018-04-19 16:14:37 -05:00
Jenkins2 4e9643b2a0 Merge "chan_vpb: Avoid GNU old-style field designator extension." 2018-04-19 14:40:53 -05:00
Jenkins2 8df2921e6e Merge "Build System: Enable python3 compatibility." 2018-04-19 03:40:02 -05:00
Jenkins2 6ccf08c543 Merge "stringfields: Collect extended stringfields into the stringfield section." 2018-04-18 17:43:02 -05:00
Joshua Colp 7b59cfc777 Merge "res_pjsip: Fix deadlock on reliable transport shutdown." 2018-04-18 17:32:33 -05:00
Chris-Savinovich b437656c2e "confbridge show profile bridge" does not output "sfu" when video_mode is sfu
Fixes a bug on the "confbridge show profile bridge" cli command
that showed "video_mode=no video" when video_mode was set
to "sfu"

ASTERISK-27418  #close

Change-Id: I481e3172c7f872664c7ac7809879d541c9f031e9
2018-04-18 16:10:54 -06:00
Corey Farrell 179ae87cf4 Build System: Add missing ASTMM_LIBC to flex output.
Redirect libc allocation functions to use Asterisk functions for
main/ast_expr2f.c and res/ael/ael_lex.c.  This will resolve errors
produced by astmm.h when these files are regenerated, though other
issues still remain.

ASTERISK~27813

Change-Id: I7263e9e4217a17bde4ffaa2087a8f8aeb2a8588c
2018-04-18 14:50:53 -06:00
George Joseph af39255052 Merge "bridge_softmix / app_confbridge: Add support for REMB combining." 2018-04-18 15:37:45 -05:00
Jenkins2 0bea1da3ef Merge "utils/pval: Add -lBlocksRuntime for compiler clang conditionally." 2018-04-18 15:24:24 -05:00
Jenkins2 e63d40aa78 Merge "utils: Add ast_assert_return" 2018-04-18 14:43:56 -05:00
Sean Bright 80e6952013 format_pcm: Correct behavior of fseek and ftell for G.722
There are twice as many samples in the same number of bytes, so redefine
some of the G.722 format functions in terms of their PCM counterparts.

Change-Id: I6a8c7352624b930a5f2d9e4857f75283fa5dd9f9
2018-04-18 12:43:01 -06:00
Alexander Anikin 446320f1d4 chan_ooh323: Fix cppcheck warnings
Fix cppcheck warnings about redundant conditions and possible
null pointer usage

ASTERISK-27793 #close
Reported by: Ilya Shipitsin
Tested by: Ilya Shipitsin

Change-Id: I0b31933b062a23331dbac9a82b8bcfe345f406f6
2018-04-18 13:38:09 +03:00
Joshua Colp 8de3fa2b56 bridge_softmix / app_confbridge: Add support for REMB combining.
This change adds the ability for multiple REMB reports in
bridge_softmix to be combined according to a configured
behavior into a single report. This single report is sent
back to the sender of video, which adjusts the encoding bitrate
to be at or below the bitrate of the report. The available
behaviors are: lowest, highest, and average. Lowest uses the
lowest received bitrate. Highest uses the highest received
bitrate. Average goes through the received bitrates adding
them to the previous average and creates a new average.

Other behaviors can be added in the future and the existing
average one may be adjusted, but this provides the foundation
to do so.

Support for configuring which behavior to use has been
added to app_confbridge.

ASTERISK-27804

Change-Id: I9eafe4e7c1f72d67074a8d6acb26bfcf19322b66
2018-04-17 11:25:17 -06:00
Jenkins2 3255a286b3 Merge "res_musiconhold: Don't restart MOH from beginning after announcement." 2018-04-17 12:21:37 -05:00
George Joseph f79a372941 streams: Add string metadata capability
Replaces the never used opaque data array.

Updated stream tests to include get/set metadata and
stream clone with metadata.

Added stream metadata dump to "core show channel"

Change-Id: Id7473aa4b374d7ab53046c20e321037ba9a56863
2018-04-17 11:03:55 -06:00
George Joseph f7e7ce6ba2 utils: Add ast_assert_return
Similar to pjproject's PJ_ASSERT_RETURN macro, this one will do the
following...

If the assert passes... NoOp

If the assert fails and AST_DEVMODE is defined, execute ast_assert()
then, if DO_CRASH isn't set, return from the calling function with
the supplied value.

If the assert fails and AST_DEVMODE is not defined, return from the
calling function with the supplied value.

The macro will execute a return without a value if one isn't suppled.

Change-Id: I0003844affeab550d5ff5bca7aa7cf8a559b873e
2018-04-17 11:03:47 -06:00
Alexander Traud 8a1ffb050b utils/pval: Add -lBlocksRuntime for compiler clang conditionally.
ASTERISK-27809

Change-Id: I930b364a33d54cc08dedfcd5bb45f7e83242f134
2018-04-17 14:06:55 +02:00
Alexander Traud 3d9345e3ae chan_vpb: Avoid GNU old-style field designator extension.
clang 6.0 warned about this. Beside that, this change removes the used variable
'desc'.

ASTERISK-27808

Change-Id: Ia26bdcc0a562c058151814511cfcf70ecafa595b
2018-04-17 12:41:40 +02:00
Ben Ford f5d5083ea7 res_rtp_asterisk: Add support for receiving and handling NACK requests.
Adds the ability to receive and handle incoming NACK requests if
retransmissions are enabled. If retransmissions are enabled, a data
buffer is allocated that stores packets being sent. If a NACK request
is received, the packet requested for retransmission is sent if it is
still in the buffer. In the same request, if any of the following 16
packets are marked as not received, those will be sent as well if
available, as outlined in RFC4585.

Also changes RTCP RR and SR to use media source SSRC instead of packet
source SSRC when determining which instance to use for RTCP reports.

For more information, refer to the wiki page:
https://wiki.asterisk.org/wiki/display/AST/WebRTC+User+Experience+Improvements

ASTERISK-27806 #close

Change-Id: I7f7f124af3b9d5d2fd9cffc6ba8cb48a6fff06ec
2018-04-16 17:21:18 -06:00
Richard Mudgett d50d637764 stringfields: Collect extended stringfields into the stringfield section.
Use of extended stringfields is a temporary mechanism to avoid ABI
breakage in released branches without resorting to more inconvienient
methods.

* Collect existing extended stringfields into the parent stringfield
section of the struct.

Change-Id: I8d46d037801b4518837c3ea4b6df95ceadc9436b
2018-04-16 16:43:20 -05:00
George Joseph 38dae51b78 Merge "res_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations." 2018-04-16 11:12:30 -05:00
Jenkins2 267e007c28 Merge "pjsip_scheduler.c: Add ability to trace scheduled tasks." 2018-04-16 07:11:26 -05:00
Jenkins2 1f6fc78a2e Merge "pjsip_scheduler.c: Fix some corner cases." 2018-04-16 06:49:14 -05:00
Ben Ford 4aeec6100f res_musiconhold: Don't restart MOH from beginning after announcement.
This reverts a problem introduced by the fix for ASTERISK_24329.
Now, when an announcement is played while waiting in a queue, music on
hold will not restart from the beginning of the sound file and will
instead pick up where it left off. However, the incorrect behavior in
ASTERISK_24329 is now present again; if an announcement X seconds
long is played when music on hold starts, music on hold will start X
seconds into the file.

ASTERISK-27774 #close
Reported by: lvl

Change-Id: I86b2885ee7063268f9b9747eddb788336ade989b
2018-04-13 15:30:02 -06:00
Richard Mudgett 3bb6cf43b5 pjsip_scheduler.c: Add ability to trace scheduled tasks.
When a scheduled task is created you can pass in the
AST_SIP_SCHED_TASK_TRACK flag.  This new flag causes scheduling events to
be logged.

Change-Id: I91967eb3d5a220915ce86881a28af772f9a7f56b
2018-04-12 17:35:19 -05:00
Richard Mudgett 237d341bbd res_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations.
ast_sip_push_task_synchronous() did not necessarily execute the passed in
task under the specified serializer.  If the current thread is any
registered pjsip thread then it would execute the task immediately instead
of under the specified serializer.  Reentrancy issues could result if the
task does not execute with the right serializer.

The original reason ast_sip_push_task_synchronous() checked to see if the
current thread was a registered pjsip thread was because of a deadlock
with masquerades and the channel technology's fixup callback
(ASTERISK_22936).  A subsequent masquerade deadlock fix (ASTERISK_24356)
involving call pickups avoided the original deadlock situation entirely.
The PJSIP channel technology's fixup callback no longer needed to call
ast_sip_push_task_synchronous().

However, there are a few places where this unexpected behavior is still
required to avoid deadlocks.  The pjsip monitor thread executes callbacks
that do calls to ast_sip_push_task_synchronous() that would deadlock if
the task were actually pushed to the specified serializer.  I ran into one
dealing with the pubsub subscriptions where an ao2 destructor called
ast_sip_push_task_synchronous().

* Split ast_sip_push_task_synchronous() into
ast_sip_push_task_wait_servant() and ast_sip_push_task_wait_serializer().
ast_sip_push_task_wait_servant() has the old behavior of
ast_sip_push_task_synchronous().  ast_sip_push_task_wait_serializer() has
the new behavior where the task is always executed by the specified
serializer or a picked serializer if one is not passed in.  Both functions
behave the same if the current thread is not a SIP servant.

* Redirected ast_sip_push_task_synchronous() to
ast_sip_push_task_wait_servant() to preserve API for released branches.

ASTERISK_26806

Change-Id: Id040fa42c0e5972f4c8deef380921461d213b9f3
2018-04-12 17:34:16 -05:00
Richard Mudgett c2f85e881d pjsip_scheduler.c: Fix some corner cases.
* Fix the periodic interval wander because it may take significant time
between the sched thread queueing the task in the serializer and the
serializer actually executing the task.  The time it takes to actually
execute the task was already taken into account.

* Pass a schtd ref to the serializer when we queue a scheduled task on
the serializer.  We don't want it going away on us while it is in the
serializer queue.

* Skip the scheduled task if the task was canceled between queueing the
task to the serializer and the serializer actually executing the task.

* Reorder struct ast_sip_sched_task to avoid unnecessary padding.  Removed
task_id and added next_periodic.

* Hold a ref to the passed in serializer so the serializer cannot go away
on the scheduled task.

ASTERISK_26806

Change-Id: I6c8046b75f6953792c8c30e55b836a4291143f24
2018-04-12 17:34:16 -05:00
Richard Mudgett 96c4a57edf pjsip_scheduler.c: Sort "pjsip show scheduled_tasks" output.
* A side benefit is that the scheduled tasks are not completely blocked
while the CLI command executes.

* Adjusted the "Task Name" column width to have more room for longer
names.

Change-Id: Iec64aa463ee8b10eef90120e00c38b1fb444087e
2018-04-12 16:46:50 -05:00
Jenkins2 3c5d76863b Merge "res_pjsip_notify.c: enable in-dialog NOTIFY" 2018-04-12 15:03:54 -05:00
Jenkins2 7777326244 Merge "pjsip_scheduler.c: Fix ao2 usage errors." 2018-04-12 10:25:18 -05:00
Jenkins2 2652ae1471 Merge "Build System: Strip '-std=c99' from CFLAGS provided by libraries." 2018-04-12 09:52:02 -05:00
Evandro Cesar Arruda 429c758e48 cdr_mysql: Compile error because MYSQL_PORT definition is missing
If it is not defined, it will add MYSQL_PORT definition. After some
research on MySQL/MariaDB development tree, I couldn't find any reference
to MYSQL_PORT definition in include files.

ASTERISK-27782 #close

Change-Id: Ieee56c836fc2e8bd021c456145bba04c6068bb77
2018-04-11 14:26:18 -06:00
Chris-Savinovich 0747ac893b res_pjsip_session: Rewrite o= with external_media_address.
It now appends the external IP address on the
o= line of the SDP packet.  The decision was made to write
the numeric IP address as opposed to the RFC that states
the FQDN should be used if and when available.  We believe
the usage of literal IP address will help avoid
potential problems.

ASTERISK-27614 #close

Change-Id: I84f3360f3606b8c4e8d161edb228799ec0b8a302
2018-04-11 11:17:33 -06:00
Nathan Bruning 1cd704de36 res_pjsip_notify.c: enable in-dialog NOTIFY
This patch adds support to send in-dialog SIP NOTIFY commands on
chan_pjsip channels, similar to the functionality recently added
for chan_sip (ASTERISK_27461).

This extends res_pjsip_notify to allow for in-dialog messages.

ASTERISK-27697

Change-Id: If7f3151a6d633e414d5dc319d5efc1443c43dd29
2018-04-11 10:31:44 -06:00
Jenkins2 fabfe701bb Merge "res_pjsip_refer/chan_sip: Fix INVITE with replaces transfer to ConfBridge" 2018-04-11 07:11:16 -05:00
George Joseph 8af759c088 Merge "chan_sip.c: Fix INVITE with replaces channel ref leak." 2018-04-10 10:10:52 -05:00
Richard Mudgett 7157dcf83b pjsip_scheduler.c: Fix ao2 usage errors.
* Removed several invalid uses of OBJ_NOLOCK.  These uses resulted in the
'tasks' container being accessed without a lock in a multi-threaded
environment.  A recipe for crashes.

* Removed needlessly obtaining schtd object references.  If the caller
providing you a pointer to an object doesn't have a valid reference then
you cannot safely get one from it.

* Getting a ref to 'tasks' when you aren't copying the pointer into
another location is useless.  The 'tasks' container pointer is global.

* Removed many unnecessary uses of RAII_VAR.

* Make ast_sip_schedule_task() name parameter const.

ASTERISK_26806

Change-Id: I5c62488e651314e2a1dbc01f5b078a15512d73db
2018-04-09 17:12:53 -05:00
Jenkins2 2a6072a9c4 Merge "pjsip / res_rtp_asterisk: Add support for sending REMB" 2018-04-09 11:14:16 -05:00
Joshua Colp 2e60196265 Merge "res_rtp_asterisk: Fix minimum block word length for REMB." 2018-04-09 10:58:00 -05:00