]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
7 years agortp_engine: Avoid a typo error in Doxygen for ast_rtp_codecs_find_payload_code.
Alexander Traud [Fri, 11 May 2018 15:37:57 +0000 (17:37 +0200)] 
rtp_engine: Avoid a typo error in Doxygen for ast_rtp_codecs_find_payload_code.

Change-Id: Ica089d4507a27ddfc4ce3a88d697ffbef378de48

7 years agoMerge "makeopts.in: Remove unused/undefined AST_MARCH_NATIVE." into 13
Joshua Colp [Thu, 10 May 2018 08:45:35 +0000 (03:45 -0500)] 
Merge "makeopts.in: Remove unused/undefined AST_MARCH_NATIVE." into 13

7 years agoMerge "sip_to_pjsip: Enable python3 compatibility." into 13
Joshua Colp [Thu, 10 May 2018 00:01:02 +0000 (19:01 -0500)] 
Merge "sip_to_pjsip: Enable python3 compatibility." into 13

7 years agores_hep: Adds hostname resolution support for capture_address
Matthew Fredrickson [Fri, 4 May 2018 21:07:10 +0000 (16:07 -0500)] 
res_hep: Adds hostname resolution support for capture_address

Previously, only an IP address would be accepted for the capture_address config
setting in hep.conf.  This change allows capture_address to be a resolvable
hostname or an IP address.

ASTERISK-27796 #close
Reported-By: Sebastian Gutierrez
Change-Id: I33e1a37a8b86e20505dadeda760b861a9ef51f6f

7 years agoMerge "app_macro: Prevent infinite loop in find_matching_priority." into 13
Jenkins2 [Wed, 9 May 2018 16:27:41 +0000 (11:27 -0500)] 
Merge "app_macro: Prevent infinite loop in find_matching_priority." into 13

7 years agosip_to_pjsip: Enable python3 compatibility.
Alexander Traud [Wed, 18 Apr 2018 07:27:51 +0000 (09:27 +0200)] 
sip_to_pjsip: Enable python3 compatibility.

The script remains compatible with Python 2.7 but now also works with
Python 3.3 and newer; to ease the migration from chan_sip to chan_pjsip.

ASTERISK-27811

Change-Id: I59cc6b52a1a89777eebcf25b3023bdf93babf835

7 years agomakeopts.in: Remove unused/undefined AST_MARCH_NATIVE.
Corey Farrell [Tue, 8 May 2018 19:28:10 +0000 (15:28 -0400)] 
makeopts.in: Remove unused/undefined AST_MARCH_NATIVE.

Change-Id: I617a96ebb83ec99f5d3176bbbee2d2a272ccb203

7 years agomanager: fix digest auth for ami/http mechanism.
Jaco Kroon [Tue, 8 May 2018 09:59:02 +0000 (11:59 +0200)] 
manager: fix digest auth for ami/http mechanism.

Due to a fixed size buffer the digest authentication could be
incorrectly calculated if a large URI was provided, causing
authentication failure. The buffer is now dynamically allocated to allow
any size URI within the normal limits of the HTTP request size.

ASTERISK-27841

Change-Id: I660609db13b8f9e5f9567f339dd804f4985d41b3

7 years agoapp_macro: Prevent infinite loop in find_matching_priority.
Corey Farrell [Fri, 4 May 2018 18:47:25 +0000 (14:47 -0400)] 
app_macro: Prevent infinite loop in find_matching_priority.

Use AST_PBX_MAX_STACK to escape if we recurse 128 times.  This will
prevent crash if dialplan contains an include loop.  Log an error when
this occurs, at most one message per call to Macro() so we avoid logger
spam.

ASTERISK-26570 #close

Change-Id: I6c71b76998c31434391b150de055ae9a531e31da

7 years agoMerge "res_ari: Remove requirement that body exists when debug is on." into 13
Jenkins2 [Fri, 4 May 2018 11:08:40 +0000 (06:08 -0500)] 
Merge "res_ari: Remove requirement that body exists when debug is on." into 13

7 years agoMerge "res_pjsip/pjsip_distributor.c: Add missing off-nominal request response."...
Jenkins2 [Thu, 3 May 2018 17:11:00 +0000 (12:11 -0500)] 
Merge "res_pjsip/pjsip_distributor.c: Add missing off-nominal request response." into 13

7 years agoMerge "pjsip: Increase maximum number of usable ciphers & other cleanups" into 13
Joshua Colp [Thu, 3 May 2018 12:25:17 +0000 (07:25 -0500)] 
Merge "pjsip: Increase maximum number of usable ciphers & other cleanups" into 13

7 years agores_ari: Remove requirement that body exists when debug is on.
Joshua Colp [Thu, 3 May 2018 11:34:32 +0000 (11:34 +0000)] 
res_ari: Remove requirement that body exists when debug is on.

The "ari set debug" code for incoming requests incorrectly assumed
that all requests would contain a body. If one did not exist the
request would be incorrectly rejected. The response that was sent
was also incomplete as an incorrect function was used to construct
the response.

The code has now been changed to no longer require a request to have
a body and the response updated to use the correct function.

ASTERISK-27801

Change-Id: I4eef036ad54550a4368118cc348765ecac25e0f8

7 years agopjsip: Increase maximum number of usable ciphers & other cleanups
Sean Bright [Wed, 2 May 2018 12:43:35 +0000 (08:43 -0400)] 
pjsip: Increase maximum number of usable ciphers & other cleanups

* Increase maximum number of ciphers from 100 to 256 (or whatever
  PJ_SSL_SOCK_MAX_CIPHERS is #define'd to)

* Simplify logic in cipher_name_to_id()

* Make signed/unsigned comparison consistent

Re: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897412

Reported by: OndÅ™ej Holas

Change-Id: Iea620f03915a1b873e79743154255c3148a514e7

7 years agores_pjsip/pjsip_distributor.c: Add missing off-nominal request response.
Richard Mudgett [Mon, 30 Apr 2018 22:24:33 +0000 (17:24 -0500)] 
res_pjsip/pjsip_distributor.c: Add missing off-nominal request response.

Change-Id: I389579b39c523d1d1e8ce020ef549a8bb5781c9b

7 years agores_pjsip/pjsip_distributor.c: Pull some assignments out of if tests.
Richard Mudgett [Mon, 30 Apr 2018 22:20:13 +0000 (17:20 -0500)] 
res_pjsip/pjsip_distributor.c: Pull some assignments out of if tests.

Change-Id: I3d30d638b53a4bbe9bf9aad853c649d583894112

7 years agoMerge "BuildSystem: Add DragonFly BSD." into 13
George Joseph [Mon, 30 Apr 2018 14:06:45 +0000 (09:06 -0500)] 
Merge "BuildSystem: Add DragonFly BSD." into 13

7 years agoMerge "translate: generic plc not filled in after translation" into 13
George Joseph [Mon, 30 Apr 2018 13:38:09 +0000 (08:38 -0500)] 
Merge "translate: generic plc not filled in after translation" into 13

7 years agoMerge "app_sendtext: Enhance SendText to support Enhanced Messaging" into 13
George Joseph [Mon, 30 Apr 2018 12:35:17 +0000 (07:35 -0500)] 
Merge "app_sendtext:  Enhance SendText to support Enhanced Messaging" into 13

7 years agoMerge "bridge_softmix: Forward TEXT frames" into 13
George Joseph [Fri, 27 Apr 2018 18:17:27 +0000 (13:17 -0500)] 
Merge "bridge_softmix:  Forward TEXT frames" into 13

7 years agoMerge "BuildSystem: Enable IMAP storage on FreeBSD and DragonFly BSD." into 13
Joshua Colp [Fri, 27 Apr 2018 00:06:31 +0000 (19:06 -0500)] 
Merge "BuildSystem: Enable IMAP storage on FreeBSD and DragonFly BSD." into 13

7 years agoMerge "install_prereq: Add DragonFly BSD." into 13
Joshua Colp [Wed, 25 Apr 2018 18:55:19 +0000 (13:55 -0500)] 
Merge "install_prereq: Add DragonFly BSD." into 13

7 years agoMerge "format_pcm: Correct behavior of fseek and ftell for G.722" into 13
Joshua Colp [Wed, 25 Apr 2018 18:30:42 +0000 (13:30 -0500)] 
Merge "format_pcm: Correct behavior of fseek and ftell for G.722" into 13

7 years agoMerge "menuselect: Add DragonFly BSD." into 13
Joshua Colp [Wed, 25 Apr 2018 18:21:45 +0000 (13:21 -0500)] 
Merge "menuselect: Add DragonFly BSD." into 13

7 years agoMerge "chan_ooh323: fix ooManualProgress/ooManualRingback on ooh323 debuggin on"...
Jenkins2 [Wed, 25 Apr 2018 15:20:42 +0000 (10:20 -0500)] 
Merge "chan_ooh323: fix ooManualProgress/ooManualRingback on ooh323 debuggin on" into 13

7 years agoMerge "res_pjsip: Fix initialization of extended stringfields." into 13
Joshua Colp [Tue, 24 Apr 2018 23:59:01 +0000 (18:59 -0500)] 
Merge "res_pjsip: Fix initialization of extended stringfields." into 13

7 years agoMerge "chan_ooh323: Fix cppcheck warnings" into 13
Joshua Colp [Tue, 24 Apr 2018 23:39:17 +0000 (18:39 -0500)] 
Merge "chan_ooh323: Fix cppcheck warnings" into 13

7 years agotranslate: generic plc not filled in after translation
Kevin Harwell [Wed, 18 Apr 2018 20:59:38 +0000 (15:59 -0500)] 
translate: generic plc not filled in after translation

If during translation a codec could not handle a given frame the translation
core would return NULL, thus not passing along the "missing" frame. Due to this
there was no frame to apply generic plc to, thus rendering it useless.

This patch makes it so the translation core produces an interpolated slin frame
in the cases where an attempt was made to translate to slin, but failed. This
interpolated frame is then passed along and can be used by the generic plc
algorithms to fill in the frame.

ASTERISK-27814 #close

Change-Id: I133d084da87adef913bf2ecc9c9240e3eaf4f40a

7 years agochan_ooh323: fix ooManualProgress/ooManualRingback on ooh323 debuggin on
Alexander Anikin [Fri, 20 Apr 2018 19:07:21 +0000 (22:07 +0300)] 
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

7 years agoBuildSystem: Enable IMAP storage on FreeBSD and DragonFly BSD.
Alexander Traud [Fri, 20 Apr 2018 12:13:12 +0000 (14:13 +0200)] 
BuildSystem: Enable IMAP storage on FreeBSD and DragonFly BSD.

ASTERISK-27639

Change-Id: I1347f3f2f3737010d0a80a5c30b5aaf71cf3ccb0

7 years agoBuildSystem: Add DragonFly BSD.
Alexander Traud [Fri, 20 Apr 2018 10:54:57 +0000 (12:54 +0200)] 
BuildSystem: Add DragonFly BSD.

ASTERISK-27820

Change-Id: I310896143e94d65da1c2be3bb448204a8b86d557

7 years agomenuselect: Add DragonFly BSD.
Alexander Traud [Fri, 20 Apr 2018 10:40:21 +0000 (12:40 +0200)] 
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

7 years agoinstall_prereq: Add DragonFly BSD.
Alexander Traud [Fri, 20 Apr 2018 10:23:26 +0000 (12:23 +0200)] 
install_prereq: Add DragonFly BSD.

ASTERISK-27820

Change-Id: I718ddb000fe5184b1bdc7759da67a370a7520144

7 years agoMerge "chan_vpb: Avoid GNU old-style field designator extension." into 13
Jenkins2 [Thu, 19 Apr 2018 19:36:34 +0000 (14:36 -0500)] 
Merge "chan_vpb: Avoid GNU old-style field designator extension." into 13

7 years agoMerge "res_pjsip: Fix deadlock on reliable transport shutdown." into 13
Jenkins2 [Wed, 18 Apr 2018 22:20:19 +0000 (17:20 -0500)] 
Merge "res_pjsip: Fix deadlock on reliable transport shutdown." into 13

7 years agoMerge "Build System: Enable python3 compatibility." into 13
Jenkins2 [Wed, 18 Apr 2018 22:06:26 +0000 (17:06 -0500)] 
Merge "Build System: Enable python3 compatibility." into 13

7 years agores_pjsip: Fix initialization of extended stringfields.
Corey Farrell [Wed, 18 Apr 2018 21:24:31 +0000 (17:24 -0400)] 
res_pjsip: Fix initialization of extended stringfields.

It is possible for initialization of extended stringfields to fail.  Add
checks for this failure.

Change-Id: I062e09852db3d37ceefaf6c2048958fa0118304f

7 years agoMerge "utils/pval: Add -lBlocksRuntime for compiler clang conditionally." into 13
Jenkins2 [Wed, 18 Apr 2018 20:18:32 +0000 (15:18 -0500)] 
Merge "utils/pval: Add -lBlocksRuntime for compiler clang conditionally." into 13

7 years agoMerge "utils: Add ast_assert_return" into 13
Jenkins2 [Wed, 18 Apr 2018 19:35:55 +0000 (14:35 -0500)] 
Merge "utils:  Add ast_assert_return" into 13

7 years agoformat_pcm: Correct behavior of fseek and ftell for G.722
Sean Bright [Wed, 18 Apr 2018 18:40:49 +0000 (14:40 -0400)] 
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

7 years agochan_ooh323: Fix cppcheck warnings
Alexander Anikin [Wed, 18 Apr 2018 10:32:34 +0000 (13:32 +0300)] 
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

7 years agoMerge "res_musiconhold: Don't restart MOH from beginning after announcement." into 13
Jenkins2 [Tue, 17 Apr 2018 17:11:48 +0000 (12:11 -0500)] 
Merge "res_musiconhold: Don't restart MOH from beginning after announcement." into 13

7 years agoapp_sendtext: Enhance SendText to support Enhanced Messaging
George Joseph [Tue, 10 Apr 2018 21:09:49 +0000 (15:09 -0600)] 
app_sendtext:  Enhance SendText to support Enhanced Messaging

SendText now accepts new channel variables that can be used
to override the To and From display names and set the Content-Type
of a message.  Since you can now set Content-Type, other text/*
content types are now valid.

Change-Id: I648b4574478119f95de09d9f08e9595831b02830

7 years agobridge_softmix: Forward TEXT frames
George Joseph [Wed, 27 Sep 2017 16:44:53 +0000 (10:44 -0600)] 
bridge_softmix:  Forward TEXT frames

Core bridging and, more specifically, bridge_softmix have been
enhanced to relay received frames of type TEXT or TEXT_DATA to all
participants in a softmix bridge.  res_pjsip_messaging and
chan_pjsip have been enhanced to take advantage of this so when
res_pjsip_messaging receives an in-dialog MESSAGE message from a
user in a conference call, it's relayed to all other participants
in the call.

res_pjsip_messaging already queues TEXT frames to the channel when
it receives an in-dialog MESSAGE from an endpoint and chan_pjsip
will send an MESSAGE when it gets a TEXT frame.  On a normal
point-to-point call, the frames are forwarded between the two
correctly.  bridge_softmix was not though so messages weren't
getting forwarded to conference bridge participants.  Even if they
were, the bridging code had no way to tell the participants who
sent the message so it would look like it came from the bridge
itself.

* The TEXT frame type doesn't allow storage of any meta data, such
as sender, on the frame so a new TEXT_DATA frame type was added that
uses the new ast_msg_data structure as its payload.  A channel
driver can queue a frame of that type when it receives a message
from outside.  A channel driver can use it for sending messages
by implementing the new send_text_data channel tech callback and
setting the new AST_CHAN_TP_SEND_TEXT_DATA flag in its tech
properties.  If set, the bridging/channel core will use it instead
of the original send_text callback and it will get the ast_msg_data
structure. Channel drivers aren't required to implement this.  Even
if a TEXT_DATA enabled driver uses it for incoming messages, an
outgoing channel driver that doesn't will still have it's send_text
callback called with only the message text just as before.

* res_pjsip_messaging now creates a TEXT_DATA frame for incoming
in-dialog messages and sets the "from" to the display name in the
"From" header, or if that's empty, the caller id name from the
channel.  This allows the chat client user to set a friendly name
for the chat.

* bridge_softmix now forwards TEXT and TEXT_DATA frames to all
participants (except the sender).

* A new function "ast_sendtext_data" was added to channel which
takes an ast_msg_data structure and calls a channel's
send_text_data callback, or if that's not defined, the original
send_text callback.

* bridge_channel now calls ast_sendtext_data for TEXT_DATA frame
types and ast_sendtext for TEXT frame types.

* chan_pjsip now uses the "from" name in the ast_msg_data structure
(if it exists) to set the "From" header display name on outgoing text
messages.

Change-Id: Idacf5900bfd5f22ab8cd235aa56dfad090d18489

7 years agoutils/pval: Add -lBlocksRuntime for compiler clang conditionally.
Alexander Traud [Tue, 17 Apr 2018 12:09:46 +0000 (14:09 +0200)] 
utils/pval: Add -lBlocksRuntime for compiler clang conditionally.

ASTERISK-27809

Change-Id: I930b364a33d54cc08dedfcd5bb45f7e83242f134

7 years agochan_vpb: Avoid GNU old-style field designator extension.
Alexander Traud [Tue, 17 Apr 2018 10:31:52 +0000 (12:31 +0200)] 
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

7 years agoutils: Add ast_assert_return
George Joseph [Fri, 13 Apr 2018 20:17:36 +0000 (14:17 -0600)] 
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

7 years agoMerge "pjsip_scheduler.c: Add ability to trace scheduled tasks." into 13
Jenkins2 [Mon, 16 Apr 2018 12:00:21 +0000 (07:00 -0500)] 
Merge "pjsip_scheduler.c: Add ability to trace scheduled tasks." into 13

7 years agoMerge "res_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations." into 13
Jenkins2 [Mon, 16 Apr 2018 11:46:30 +0000 (06:46 -0500)] 
Merge "res_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations." into 13

7 years agoMerge "pjsip_scheduler.c: Fix some corner cases." into 13
Jenkins2 [Mon, 16 Apr 2018 11:39:35 +0000 (06:39 -0500)] 
Merge "pjsip_scheduler.c: Fix some corner cases." into 13

7 years agores_musiconhold: Don't restart MOH from beginning after announcement.
Ben Ford [Fri, 13 Apr 2018 19:32:48 +0000 (14:32 -0500)] 
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

7 years agopjsip_scheduler.c: Add ability to trace scheduled tasks.
Richard Mudgett [Wed, 28 Mar 2018 20:13:13 +0000 (15:13 -0500)] 
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

7 years agores_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations.
Richard Mudgett [Tue, 27 Mar 2018 16:04:42 +0000 (11:04 -0500)] 
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

7 years agopjsip_scheduler.c: Fix some corner cases.
Richard Mudgett [Thu, 22 Mar 2018 00:43:21 +0000 (19:43 -0500)] 
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

7 years agopjsip_scheduler.c: Sort "pjsip show scheduled_tasks" output.
Richard Mudgett [Fri, 23 Mar 2018 00:09:02 +0000 (19:09 -0500)] 
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

7 years agoMerge "res_pjsip_notify.c: enable in-dialog NOTIFY" into 13
Jenkins2 [Thu, 12 Apr 2018 19:57:33 +0000 (14:57 -0500)] 
Merge "res_pjsip_notify.c: enable in-dialog NOTIFY" into 13

7 years agoMerge "pjsip_scheduler.c: Fix ao2 usage errors." into 13
Jenkins2 [Thu, 12 Apr 2018 15:10:28 +0000 (10:10 -0500)] 
Merge "pjsip_scheduler.c: Fix ao2 usage errors." into 13

7 years agoMerge "Build System: Strip '-std=c99' from CFLAGS provided by libraries." into 13
Jenkins2 [Thu, 12 Apr 2018 14:43:14 +0000 (09:43 -0500)] 
Merge "Build System: Strip '-std=c99' from CFLAGS provided by libraries." into 13

7 years agocdr_mysql: Compile error because MYSQL_PORT definition is missing
Evandro Cesar Arruda [Mon, 2 Apr 2018 20:59:29 +0000 (17:59 -0300)] 
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

7 years agores_pjsip_session: Rewrite o= with external_media_address.
Chris-Savinovich [Tue, 10 Apr 2018 01:00:37 +0000 (21:00 -0400)] 
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

7 years agores_pjsip_notify.c: enable in-dialog NOTIFY
Nathan Bruning [Thu, 22 Feb 2018 18:18:48 +0000 (19:18 +0100)] 
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

7 years agoMerge "res_pjsip_refer/chan_sip: Fix INVITE with replaces transfer to ConfBridge...
Jenkins2 [Wed, 11 Apr 2018 12:03:19 +0000 (07:03 -0500)] 
Merge "res_pjsip_refer/chan_sip: Fix INVITE with replaces transfer to ConfBridge" into 13

7 years agoMerge "chan_sip.c: Fix INVITE with replaces channel ref leak." into 13
Jenkins2 [Tue, 10 Apr 2018 14:58:22 +0000 (09:58 -0500)] 
Merge "chan_sip.c: Fix INVITE with replaces channel ref leak." into 13

7 years agopjsip_scheduler.c: Fix ao2 usage errors.
Richard Mudgett [Thu, 22 Mar 2018 18:35:04 +0000 (13:35 -0500)] 
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

7 years agoMerge "Build System: Fixes for configure script." into 13
Jenkins2 [Mon, 9 Apr 2018 15:15:22 +0000 (10:15 -0500)] 
Merge "Build System: Fixes for configure script." into 13

7 years agoBuild System: Enable python3 compatibility.
Corey Farrell [Fri, 23 Mar 2018 11:49:59 +0000 (07:49 -0400)] 
Build System: Enable python3 compatibility.

* Consistently use spaces in rest-api-templates/asterisk_processor.py.
* Exclude third-party from docs/full-en_US.xml.
* Add docs/full-en_US.xml to .gitignore.
* Use list() to convert python3 view.
* Use python3 print function.
* Replace cmp() with equivalent equation.
* Replace reference to out of scope subtype variable with name
  parameter.
* Use unescaping triple bracket notation in mustache templates where
  needed.  This causes behavior of Python2 to be maintained when using
  Python3.
* Fix references to has_websocket / is_websocket in
  res_ari_resource.c.mustache.
* Update calculation of has_websocket to use any().
* Use unicode mode for writing output file in transform.py.
* Replace 'from swagger_model import *' with explicit import of required
  symbols.
* Add missing 'import os'
* Fix invalid reference to swagger_version from exception handler.

I have not tested voicemailpwcheck.py, only the print syntax has
been fixed.

Change-Id: If5c5b556a2800d41a3e2cfef080ac2e151178c33

7 years agores_pjsip_refer/chan_sip: Fix INVITE with replaces transfer to ConfBridge
Richard Mudgett [Thu, 5 Apr 2018 23:33:40 +0000 (18:33 -0500)] 
res_pjsip_refer/chan_sip: Fix INVITE with replaces transfer to ConfBridge

There is a problem when an INVITE-with-Replaces transfer targets a channel
in a ConfBridge.  The transfer will unconditionally swap out the
ConfBridge channel.  Unfortunately, the ConfBridge state will not be aware
of this change.  Unexpected behavior will happen as a result since
ConfBridge channels currently can only be replaced by a masquerade and not
normal bridge channel moves.

* We just need to pretend that the channel isn't in a bridge (like other
transfer methods already do) so the transfer channel will masquerade into
the ConfBridge channel.

Change-Id: I209beb0e748fa4f4b92a576f36afa8f495ba4c82

7 years agoMerge "BuildSystem: Add support for building RADIUS with radcli." into 13
Jenkins2 [Fri, 6 Apr 2018 13:46:11 +0000 (08:46 -0500)] 
Merge "BuildSystem: Add support for building RADIUS with radcli." into 13

7 years agoMerge "res_pjsip: Update authenticate_qualify documentation." into 13
Jenkins2 [Fri, 6 Apr 2018 11:37:40 +0000 (06:37 -0500)] 
Merge "res_pjsip: Update authenticate_qualify documentation." into 13

7 years agochan_sip.c: Fix INVITE with replaces channel ref leak.
Richard Mudgett [Thu, 5 Apr 2018 22:40:52 +0000 (17:40 -0500)] 
chan_sip.c: Fix INVITE with replaces channel ref leak.

Given the below call scenario:
A -> Ast1 -> B
C <- Ast2 <- B

1) A calls B through Ast1
2) B calls C through Ast2
3) B transfers A to C

When party B transfers A to C, B sends a REFER to Ast1 causing Ast1 to
send an INVITE with replaces to Ast2.  Ast2 then leaks a channel ref of
the channel between Ast1 and Ast2.

Channel ref leaks are easily seen in the CLI "core show channels" output.
The leaked channels appear in the output but you can do nothing with them
and they never go away unless you restart Asterisk.

* Properly account for the channel refs when imparting a channel into a
bridge when handling an INVITE with replaces in handle_invite_replaces().
The ast_bridge_impart() function steals a channel ref but the code didn't
account for how many refs were held by the code at the time and which ref
was stolen.

* Eliminated RAII_VAR in handle_invite_replaces().

ASTERISK-27740

Change-Id: I7edbed774314b55acf0067b2762bfe984ecaa9a4

7 years agores_pjsip: Update authenticate_qualify documentation.
Richard Mudgett [Thu, 22 Mar 2018 00:40:46 +0000 (19:40 -0500)] 
res_pjsip: Update authenticate_qualify documentation.

Change-Id: I3811de0014b1ffe96d4a3b49cddd5d4ca02ee5d4

7 years agoapp_agent_pool.c: Fix off nominal ref leak.
Richard Mudgett [Mon, 2 Apr 2018 21:49:38 +0000 (16:49 -0500)] 
app_agent_pool.c: Fix off nominal ref leak.

Change-Id: Ib427ffc2c802620eaafb08b1c2a17dddd8fb8eb6

7 years agoBuild System: Strip '-std=c99' from CFLAGS provided by libraries.
Corey Farrell [Wed, 4 Apr 2018 15:02:06 +0000 (11:02 -0400)] 
Build System: Strip '-std=c99' from CFLAGS provided by libraries.

Asterisk requires GNU C extensions.  On some systems certain libraries
may incorrectly push -std=c99 into CFLAGS, thus breaking the build.
This change causes that flag to be stripped so the Asterisk build is not
broken by those libraries.  This change is made for both pkgconfig and
tool based libraries.

ASTERISK-27629 #close

Change-Id: I13389613b194abbac77becf90cd950dc168704db

7 years agoBuild System: Fixes for configure script.
Corey Farrell [Tue, 3 Apr 2018 19:39:39 +0000 (15:39 -0400)] 
Build System: Fixes for configure script.

* Replace all 'else if' statements with 'elif'.
* Use loop to detect versioned lua headers and libraries.

The loop for detecting lua fixes a bug where LUA_INCLUDE would be
appended with the directory of every lua version after the first one is
found.

Change-Id: I3276f9aee955014108345be6092f51c932b43a0f

7 years agoMerge "install_prereq: Add Slackware (somehow)." into 13
Jenkins2 [Tue, 3 Apr 2018 11:14:25 +0000 (06:14 -0500)] 
Merge "install_prereq: Add Slackware (somehow)." into 13

7 years agores_pjsip: Correct usages of pjproject's timer heap
George Joseph [Tue, 2 Jan 2018 13:54:54 +0000 (06:54 -0700)] 
res_pjsip:  Correct usages of pjproject's timer heap

Fix some timer heap initializations and cancels to try and prevent
crashes and timer heap issues.

Change-Id: I64885d190fa22097d1b55987091375541e57a7ee

7 years agopjroject_bundled: Add already-destroyed check to tsx_timer_callback
George Joseph [Sun, 25 Mar 2018 18:35:12 +0000 (12:35 -0600)] 
pjroject_bundled:  Add already-destroyed check to tsx_timer_callback

There have been cases that when the transaction timer callback is called
the tsx is already destroyed.  This causes a crash.  We now check the
tsx state and return if the tsx is already destroyed.

Change-Id: If93acd5e48d9ca5bb553f2405d5afc836842fe1c

7 years agopjproject_bundled: timer: Clean up usage of timer heap
George Joseph [Sun, 25 Mar 2018 18:25:30 +0000 (12:25 -0600)] 
pjproject_bundled: timer: Clean up usage of timer heap

Added a new pj_timer_entry_reset function that resets a timer_entry
for re-use.

Changed direct settings of timer_entry fields to use
pj_timer_entry_init and pj_timer_entry_reset.

Fixed issues where timers were being rescheduled incorrectly.

Change-Id: I5b624bfbc5c1429117484b9b24567293002148e6

7 years agoMerge "install_prereq: Add Gentoo Linux." into 13
Jenkins2 [Mon, 2 Apr 2018 14:27:25 +0000 (09:27 -0500)] 
Merge "install_prereq: Add Gentoo Linux." into 13

7 years agoMerge "BuildSystem: With external editline, do not require libs for internal editline...
Joshua Colp [Mon, 2 Apr 2018 13:42:03 +0000 (08:42 -0500)] 
Merge "BuildSystem: With external editline, do not require libs for internal editline." into 13

7 years agoBuildSystem: Add support for building RADIUS with radcli.
Alexander Traud [Thu, 22 Mar 2018 13:54:30 +0000 (14:54 +0100)] 
BuildSystem: Add support for building RADIUS with radcli.

Radcli is yet another RADIUS client library, generally compatible with
freeradius and radiusclient-ng.

This commit adds autoconf option for detecting it as well and changes
cdr_radius and cel_radius to use its header file in that case.

ASTERISK-26540
Reported by: Tzafrir Cohen

Change-Id: Icc056d476b7acf481309219e9abdca416866c6ec

7 years agoMerge "pjproject_bundled: Add patch for pj_atomic crashes" into 13
Jenkins2 [Mon, 2 Apr 2018 13:11:09 +0000 (08:11 -0500)] 
Merge "pjproject_bundled:  Add patch for pj_atomic crashes" into 13

7 years agoMerge "core: Create main/options.c." into 13
Jenkins2 [Mon, 2 Apr 2018 13:10:59 +0000 (08:10 -0500)] 
Merge "core: Create main/options.c." into 13

7 years agores_pjsip: Fix deadlock on reliable transport shutdown.
Richard Mudgett [Thu, 29 Mar 2018 22:07:56 +0000 (17:07 -0500)] 
res_pjsip: Fix deadlock on reliable transport shutdown.

A deadlock can happen when the PJSIP monitor thread is shutting down a
connection oriented transport (TCP/TLS) used by a subscription at the same
time as another thread tries to send something for that subscription.  The
deadlock is between the pjsip monitor thread attempting to get the dialog
lock and another thread sending something for that dialog when it tries to
get the transport manager lock.

* res_pjsip_pubsub.c: Avoid the deadlock by pushing the subscription
removal to the subscription serializer.

* res_pjsip_registrar.c: Pushed off incoming registration contact removals
to a default serializer as a precaution.  Removing the contacts involves
sorcery access which in this case will involve database access.  Depending
upon the setup, the database may not be on the same machine and could take
awhile.  We don't want to hold up the pjsip monitor thread with
potentially long access times.

ASTERISK-27706

Change-Id: I56b647aea565f24dba33e9e5ebeed4cd3f31f8c4

7 years agoMerge "BuildSystem: pjsip_evsub_set_uas_timeout was not used (part 2)." into 13
Kevin Harwell [Thu, 29 Mar 2018 20:20:07 +0000 (15:20 -0500)] 
Merge "BuildSystem: pjsip_evsub_set_uas_timeout was not used (part 2)." into 13

7 years agoMerge "pjsip_transport_events.c: Fix crash using stale transport pointer." into 13
Kevin Harwell [Thu, 29 Mar 2018 20:13:55 +0000 (15:13 -0500)] 
Merge "pjsip_transport_events.c: Fix crash using stale transport pointer." into 13

7 years agopjproject_bundled: Add patch for pj_atomic crashes
George Joseph [Sun, 25 Mar 2018 18:12:39 +0000 (12:12 -0600)] 
pjproject_bundled:  Add patch for pj_atomic crashes

There have been some crashes in the past where something attempts
to use a pj_atomic after it's already been destroyed.  This patch
tries to prevent it by making sure that pj_atomic_destroy sets
its mutex to NULL when it's done.  The pj_mutex functions already check
for a NULL mutex and just return PJ_EINVAL.

Teluu also added some checks to the win32 implementation as well.

Change-Id: Id25f70b79fdedf44ead6e6e1763a4417d3b3f825

7 years agocore: Create main/options.c.
Corey Farrell [Wed, 28 Mar 2018 13:18:06 +0000 (09:18 -0400)] 
core: Create main/options.c.

This creates a separate source to 'own' symbols related to options.h and
paths.h.  This significantly reduces the number of exports created by
main/asterisk.o.  This change is required to eventually be able to
link unmodified Asterisk sources to utilities and/or stand-alone tests.

ASTERISK~26245

Change-Id: I5cf184f4757f9363b80c9e678bdc35c477122380

7 years agoinstall_prereq: Add Slackware (somehow).
Alexander Traud [Fri, 23 Mar 2018 18:15:09 +0000 (19:15 +0100)] 
install_prereq: Add Slackware (somehow).

ASTERISK-27770

Change-Id: Ib87e0483c785542238cfe34c1e884d5a31edfaab

7 years agoinstall_prereq: Add Gentoo Linux.
Alexander Traud [Fri, 23 Mar 2018 14:18:56 +0000 (15:18 +0100)] 
install_prereq: Add Gentoo Linux.

ASTERISK-27769

Change-Id: Ieb13293cd67481f3a33f58f6f7c8c3ee1e338e7a

7 years agomain/indications: Use ast_cli_completion_add for all completions.
Corey Farrell [Sat, 17 Mar 2018 06:02:06 +0000 (02:02 -0400)] 
main/indications: Use ast_cli_completion_add for all completions.

Change-Id: I371be01f178fb542a9fbe8d97e7ae21aa4d82c36

7 years agoMerge "bridge_softmix: Clear "talking" when a channel is put on hold" into 13
Jenkins2 [Thu, 22 Mar 2018 13:32:22 +0000 (08:32 -0500)] 
Merge "bridge_softmix: Clear "talking" when a channel is put on hold" into 13

7 years agoMerge "Revert "BuildSystem: In NetBSD, the Python Programming Language is python...
Joshua Colp [Thu, 22 Mar 2018 12:38:15 +0000 (07:38 -0500)] 
Merge "Revert "BuildSystem: In NetBSD, the Python Programming Language is python-X.Y."" into 13

7 years agoBuildSystem: pjsip_evsub_set_uas_timeout was not used (part 2).
Alexander Traud [Thu, 22 Mar 2018 12:27:52 +0000 (13:27 +0100)] 
BuildSystem: pjsip_evsub_set_uas_timeout was not used (part 2).

The previous change was not complete.

ASTERISK-27435

Change-Id: I11082c14c0ef9c6af8c995084a6851337ea2a90f

7 years agoBuildSystem: With external editline, do not require libs for internal editline.
Alexander Traud [Thu, 22 Mar 2018 10:52:45 +0000 (11:52 +0100)] 
BuildSystem: With external editline, do not require libs for internal editline.

ASTERISK-27761

Change-Id: Ib17a7415297a210cfcdbf149e4df9b6edadbfab6

7 years agoRevert "BuildSystem: In NetBSD, the Python Programming Language is python-X.Y."
George Joseph [Thu, 22 Mar 2018 00:25:19 +0000 (18:25 -0600)] 
Revert "BuildSystem: In NetBSD, the Python Programming Language is python-X.Y."

Something is causing a python2/python3 mismatch on Fedora27.

PYTHON='/usr/bin/python2'
PYTHONDEV_CFLAGS='-I/usr/include/python3.6m '
PYTHONDEV_INCLUDE='-I/usr/include/python3.6m '
PYTHONDEV_LIB='-lpython3.6m '
PYTHONDEV_LIBS='-lpython3.6m '

This reverts commit c0c537c1d3aab05358df697d8d259aa73f55a43c.

Change-Id: I670a82aa7c872fa5facea1e3bc718e2d3124cc28

7 years agoMerge "chan_sip: Peers with distinct source ports don't match, regardless of transpor...
Jenkins2 [Wed, 21 Mar 2018 14:33:26 +0000 (09:33 -0500)] 
Merge "chan_sip: Peers with distinct source ports don't match, regardless of transport." into 13

7 years agobridge_softmix: Clear "talking" when a channel is put on hold
Kevin Harwell [Tue, 20 Mar 2018 20:28:12 +0000 (15:28 -0500)] 
bridge_softmix: Clear "talking" when a channel is put on hold

This patch clears the talking flag from the channel (if already set), and
notifies listeners when that channel is put on hold. Note however, if the
endpoint continues to send audio frames and these are received by the bridge
then that channel will be put back into a "talking" state even though they
are on hold.

ASTERISK-27755 #close

Change-Id: I930e16c4662810f9f02043d69062f88173c5e2ef

7 years agopjsip_transport_events.c: Fix crash using stale transport pointer.
Ross Beer [Wed, 7 Mar 2018 12:15:05 +0000 (12:15 +0000)] 
pjsip_transport_events.c: Fix crash using stale transport pointer.

Apparently it is possible for the transport to be destroyed without
triggering the transport callback logic.  As a result the transport gets
destroyed and we have a stale pointer in the active_transports container.

* Invoke the transport monitor callback checks when the transport is
destroyed in addition to when it is disconnected and shutdown.

ASTERISK-27688

Change-Id: Ia9b5469fea8f2b3f2d8476fae6b748a4d23e7261

7 years agofunc_channel: Delete dead CHANNEL_TRACE code
Ivan Poddubny [Tue, 20 Mar 2018 14:58:38 +0000 (15:58 +0100)] 
func_channel: Delete dead CHANNEL_TRACE code

The functions behind the flag and the flag itself were removed
from Asterisk 12 as incompatible with the new architecture.

Change-Id: I058493ef7a53ee290fd225bbcbb07bf46b623ccf