]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
8 years agomanager: Clarify that dialplan manipulation actions are under system class. 36/3536/1
Joshua Colp [Mon, 15 Aug 2016 12:17:51 +0000 (12:17 +0000)] 
manager: Clarify that dialplan manipulation actions are under system class.

ASTERISK-26246 #close

Change-Id: Id673b9786389f9d2a87f638ce1a25161f5f31657

8 years agoMerge "res_pjsip: Fail global load if debug or default_from_user are empty" into 13
zuul [Fri, 12 Aug 2016 23:49:54 +0000 (18:49 -0500)] 
Merge "res_pjsip:  Fail global load if debug or default_from_user are empty" into 13

8 years agoMerge "res_pjsip_caller_id: Copy header name to short header name" into 13
zuul [Fri, 12 Aug 2016 20:55:20 +0000 (15:55 -0500)] 
Merge "res_pjsip_caller_id:  Copy header name to short header name" into 13

8 years agoMerge "Run mandatory cleanup when startup fails." into 13
zuul [Fri, 12 Aug 2016 18:59:46 +0000 (13:59 -0500)] 
Merge "Run mandatory cleanup when startup fails." into 13

8 years agoMerge "location.c: Misc fixes and cleanups." into 13
zuul [Fri, 12 Aug 2016 18:10:47 +0000 (13:10 -0500)] 
Merge "location.c: Misc fixes and cleanups." into 13

8 years agoMerge "app_queue: Prevent crash when a call is forwarded to an invalid location"...
zuul [Fri, 12 Aug 2016 13:52:10 +0000 (08:52 -0500)] 
Merge "app_queue: Prevent crash when a call is forwarded to an invalid location" into 13

8 years agoMerge "res_pjsip res_pjsip_mwi: Misc fixes and cleanups." into 13
zuul [Fri, 12 Aug 2016 10:35:57 +0000 (05:35 -0500)] 
Merge "res_pjsip res_pjsip_mwi: Misc fixes and cleanups." into 13

8 years agoMerge "pjsip_distributor.c: Add missing allocation failure check." into 13
zuul [Fri, 12 Aug 2016 08:03:51 +0000 (03:03 -0500)] 
Merge "pjsip_distributor.c: Add missing allocation failure check." into 13

8 years agoMerge "alembic: add auth_username to endpoint's identify_by enum" into 13
zuul [Fri, 12 Aug 2016 06:27:31 +0000 (01:27 -0500)] 
Merge "alembic: add auth_username to endpoint's identify_by enum" into 13

8 years agoMerge "res_pjsip: Make aor named lock a mutex." into 13
zuul [Fri, 12 Aug 2016 04:14:38 +0000 (23:14 -0500)] 
Merge "res_pjsip: Make aor named lock a mutex." into 13

8 years agoRun mandatory cleanup when startup fails. 16/3516/1
Corey Farrell [Fri, 12 Aug 2016 03:11:33 +0000 (23:11 -0400)] 
Run mandatory cleanup when startup fails.

Errors during startup result in an exit.  These error branches should be
calling ast_run_atexit(0) to ensure mandatory cleanup is run.

ASTERISK-26267 #close

Change-Id: If226f2326ae2df7add20040696132214cf2bb680

8 years agores_pjsip_caller_id: Copy header name to short header name 67/3467/2
George Joseph [Thu, 11 Aug 2016 16:24:34 +0000 (10:24 -0600)] 
res_pjsip_caller_id:  Copy header name to short header name

When compact_headers was set, we were sending a zero-length header name
for PAI and RPID because we always forced the short header name length
to 0.  We did this because we cloned the header from "From" and wanted
to clear "f" from the sname.  By cloning however, we bypass pjproject's
automatic logic that sets sname to name if there's no compact form of
the header, which there isn't for PAI and RPID.  So now we force sname
to be the same as name right after we set name.

res_pjsip_diversion needed the same treatment for the Diversion header.

ASTERISK-26241 #close

Change-Id: I633ec139630cd83809aae00336cee4a10077e467

8 years agores_pjsip: Fail global load if debug or default_from_user are empty 00/3500/3
George Joseph [Thu, 11 Aug 2016 17:18:15 +0000 (11:18 -0600)] 
res_pjsip:  Fail global load if debug or default_from_user are empty

If debug was specified in the global configuration but left blank,
the logger would treat it as a wildcard and log all hosts.  If
default_from_user was empty, a crash would result.

The global apply handler now checks for empty strings.

ASTERISK-26239 #close
ASTERISK-26238 #close

Change-Id: Ie75727f5cd5808845d92cc81f5713842fb203336

8 years agores_pjsip res_pjsip_mwi: Misc fixes and cleanups. 88/3488/1
Richard Mudgett [Mon, 1 Aug 2016 20:07:30 +0000 (15:07 -0500)] 
res_pjsip res_pjsip_mwi: Misc fixes and cleanups.

* Eliminated RAII_VAR() usage in
ast_sip_persistent_endpoint_update_state().

* Added a missing allocation failure check to
persistent_endpoint_find_or_create().

* Made persistent_endpoint_find_or_create() create the new object without
a lock as it isn't needed.

* Cleaned up some ao2 container allocation idioms.

* Reordered res_pjsip_mwi.c load_module() and unload_module()

Change-Id: If8ce88fbd82a0c72a37a2388f74f77237a6a36a8

8 years agolocation.c: Misc fixes and cleanups. 85/3485/1
Richard Mudgett [Thu, 4 Aug 2016 23:03:56 +0000 (18:03 -0500)] 
location.c: Misc fixes and cleanups.

* Eliminated most RAII_VAR() usage.

* Added several missing allocation failure checks.

* Made ast_sip_for_each_contact() allocate the wrapper ao2 object without
a lock as it is not needed.

Change-Id: Ie20913365156c95dd79e5d471cfd25e99ae880bc

8 years agotaskprocessor.c: Tweak high water checks. 76/3476/1
Richard Mudgett [Tue, 2 Aug 2016 18:53:35 +0000 (13:53 -0500)] 
taskprocessor.c: Tweak high water checks.

* The high water check in ast_taskprocessor_alert_set_levels() would
trigger immediately if the new high water level is zero and the queue was
empty.

* The high water check in taskprocessor_push() was off by one.

Change-Id: I687729fb4efa6a0ba38ec9c1c133c4d407bc3d5d

8 years agores_pjsip: Make aor named lock a mutex. 73/3473/1
Richard Mudgett [Wed, 3 Aug 2016 21:24:39 +0000 (16:24 -0500)] 
res_pjsip: Make aor named lock a mutex.

The named aor lock was always being locked for writes so a rwlock adds no
benefit and may be slower because rwlocks are biased toward read locking.

Change-Id: I8c5c2c780eb30ce5441832257beeb3506fd12b28

8 years agopjsip_distributor.c: Add missing allocation failure check. 70/3470/1
Richard Mudgett [Fri, 29 Jul 2016 22:41:15 +0000 (17:41 -0500)] 
pjsip_distributor.c: Add missing allocation failure check.

Change-Id: I932ab2cea845e534d9ff318035b6de39972d3b28

8 years agoapp_queue: Prevent crash when a call is forwarded to an invalid location 66/3466/2
Matt Jordan [Thu, 11 Aug 2016 16:13:07 +0000 (11:13 -0500)] 
app_queue: Prevent crash when a call is forwarded to an invalid location

When a call forward attempt is made from a Queue member, the current
code will hang up the forwarding channel in an off-nominal condition
prior to raising the Stasis events informing the rest of Asterisk that
the call was forwarded. This will result in a slew of dreaded FRACKs,
most likely leading to a crash.

This patch modifies the code such that we don't hang up the forwarding
channel even in an off-nominal condition until we've safely raised the
Stasis messages.

ASTERISK-25797 #close

Change-Id: Ife5abed351691fd79105321636eaa8ea8dcdba38

8 years agoMerge "channels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESH" into 13
zuul [Thu, 11 Aug 2016 16:15:00 +0000 (11:15 -0500)] 
Merge "channels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESH" into 13

8 years agoalembic: add auth_username to endpoint's identify_by enum 62/3462/1
Kevin Harwell [Thu, 11 Aug 2016 15:50:09 +0000 (10:50 -0500)] 
alembic: add auth_username to endpoint's identify_by enum

A new identify_by option was added recently, auth_username. However, this
setting was not added as an allowable choice in the database enumeration
value.

This patch updates the current enumeration, adding in the new setting.

ASTERISK-26268 #close

Change-Id: Ib4788e8485e4cd40172ec0abbf5810a147ab8bf8

8 years agoMerge "alembic/sqlalchemy: auto increment only allowed on a single column" into 13
zuul [Thu, 11 Aug 2016 02:15:15 +0000 (21:15 -0500)] 
Merge "alembic/sqlalchemy: auto increment only allowed on a single column" into 13

8 years agoMerge "pjsip: Fix deadlock with suspend taskprocessor on masquerade" into 13
zuul [Thu, 11 Aug 2016 00:19:08 +0000 (19:19 -0500)] 
Merge "pjsip: Fix deadlock with suspend taskprocessor on masquerade" into 13

8 years agopjsip: Fix deadlock with suspend taskprocessor on masquerade 24/3424/3
Alexei Gradinari [Sat, 6 Aug 2016 15:57:08 +0000 (11:57 -0400)] 
pjsip: Fix deadlock with suspend taskprocessor on masquerade

If both channels which should be masqueraded
are in the same serializer:
1st channel will be locked waiting condition 'complete'
2nd channel will be locked waiting condition 'suspended'

On heavy load system a chance that both channels will be in
the same serializer 'pjsip/distibutor' is very high.

To reproduce compile res_pjsip/pjsip_distributor.c with
DISTRIBUTOR_POOL_SIZE=1

Steps to reproduce:
1. Party A calls Party B (bridged call 'AB')
2. Party B places Party A on hold
3. Party B calls Voicemail app (non-bridged call 'BV')
4. Party B attended transfers Party A to voicemail using REFER.
5. When asterisk masquerades calls 'AB' and 'BV',
   a deadlock is happened.

This patch adds a suspension indicator to the taskprocessor.
When a session suspends/unsuspends the serializer
it sets the indicator to the appropriate state.
The session checks the suspension indicator before
suspend the serializer.

ASTERISK-26145 #close

Change-Id: Iaaebee60013a58c942ba47b1b4930a63e686663b

8 years agoMerge "res_rtp_asterisk: Cache local RTCP address." into 13
Joshua Colp [Wed, 10 Aug 2016 19:00:38 +0000 (14:00 -0500)] 
Merge "res_rtp_asterisk: Cache local RTCP address." into 13

8 years agoalembic/sqlalchemy: auto increment only allowed on a single column 37/3437/3
Kevin Harwell [Tue, 9 Aug 2016 17:07:20 +0000 (12:07 -0500)] 
alembic/sqlalchemy: auto increment only allowed on a single column

The extensions table defined two columns (id and priority) as primary key
autoincrement columns. However only one is allowed when defining the primary
key.

This patch removes the autoincrement attribute from the priority column since
it does not need to be as such and really should not have been on there in the
first place.

This patch also removes 'context', 'exten', and 'priority' from the primary key
index and creates a new combined unique contraint index on them.

ASTERISK-26183 #close

Change-Id: Ib9c712c612a4d7ec1edb0dcb77f1bae0905a470b

8 years agochannels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESH 26/3426/2
Matt Jordan [Sun, 7 Aug 2016 14:58:59 +0000 (09:58 -0500)] 
channels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESH

This patch adds a new PJSIP specific dialplan function,
PJSIP_SEND_SESSION_REFRESH. When invoked on a PJSIP channel, the media
session will be refreshed via either an UPDATE or re-INVITE request.
When used in conjunction with the PJSIP_MEDIA_OFFER dialplan function,
the formats in use on a PJSIP channel can be re-negotiated and changed
dynamically after call setup.

ASTERISK-26277 #close

Change-Id: Ib98fe09ba889aafe26d58d32f0fd1323f8fd9b1b

8 years agores_rtp_asterisk: Cache local RTCP address. 45/3445/1
Mark Michelson [Tue, 9 Aug 2016 21:19:34 +0000 (16:19 -0500)] 
res_rtp_asterisk: Cache local RTCP address.

When an RTCP packet is sent or received, res_rtp_asterisk generates a
Stasis event that contains the RTCP report as well as the local and
remote addresses that the report pertains to.

The addresses are determined using ast_find_ourip(). For the local
address, this will typically result in a lookup of the hostname of the
server, and then a DNS lookup of that hostname. If you do not have the
host in /etc/hosts, then this results in a full DNS lookup, which can
potentially block for some time.

This is especially problematic when performing RTCP reads, since those
are done on the same thread responsible for reading and writing media.

This patch addresses the issue by performing a lookup of the local
address when RTCP is allocated. We then use this cached local address
for the Stasis events when necessary.

ASTERISK-26280 #close
Reported by Mark Michelson

Change-Id: I3dd61882c2e57036f09f0c390cf38f7c87e9b556

8 years agoMerge "res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack" into 13
zuul [Tue, 9 Aug 2016 21:19:13 +0000 (16:19 -0500)] 
Merge "res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack" into 13

8 years agoMerge "res_pjsip_outbound_publish: Use a serializer shutdown group for unload." into 13
Joshua Colp [Tue, 9 Aug 2016 19:44:24 +0000 (14:44 -0500)] 
Merge "res_pjsip_outbound_publish: Use a serializer shutdown group for unload." into 13

8 years agores_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack 20/3320/12
Alexei Gradinari [Mon, 8 Aug 2016 17:53:32 +0000 (13:53 -0400)] 
res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack

The PJSIP taskprocessors could be overflowed on startup
if there are many (thousands) realtime endpoints
configured with unsolicited mwi.
The PJSIP stack could be totally unresponsive for a few minutes
after boot completed.

This patch creates a separate PJSIP serializers pool for mwi
and makes unsolicited mwi use serializers from this pool.
This patch also adds 2 new global options to tune taskprocessor
alert levels: 'mwi_tps_queue_high' and 'mwi_tps_queue_low'.

This patch also adds new global option 'mwi_disable_initial_unsolicited'
to disable sending unsolicited mwi to all endpoints on startup.
If disabled then unsolicited mwi will start processing
on next endpoint's contact update.

ASTERISK-26230 #close

Change-Id: I4c8ecb82c249eb887930980a800c9f87f28f861a

8 years agoMerge "app_voicemail: Add taskprocessor alert level options." into 13
Joshua Colp [Mon, 8 Aug 2016 17:32:52 +0000 (12:32 -0500)] 
Merge "app_voicemail: Add taskprocessor alert level options." into 13

9 years agores_pjsip_outbound_publish: Use a serializer shutdown group for unload. 18/3418/1
Joshua Colp [Thu, 4 Aug 2016 15:16:33 +0000 (15:16 +0000)] 
res_pjsip_outbound_publish: Use a serializer shutdown group for unload.

This change replaces the custom unload process for the outbound
publish module with the common serializer shutdown group.

ASTERISK-25217 #close

Change-Id: I280a0384d860c486202d87d2d674394cca77ffb6

9 years agoAdd missing checks during startup. 11/3411/1
Corey Farrell [Wed, 3 Aug 2016 20:39:46 +0000 (16:39 -0400)] 
Add missing checks during startup.

This ensures startup is canceled due to allocation failures from the
following initializations.
* channel.c: ast_channels_init
* config_options.c: aco_init

ASTERISK-26265 #close

Change-Id: I911ed08fa2a3be35de55903e0225957bcdbe9611

9 years agoapp_voicemail: Add taskprocessor alert level options. 18/3318/8
Alexei Gradinari [Fri, 22 Jul 2016 21:37:06 +0000 (17:37 -0400)] 
app_voicemail: Add taskprocessor alert level options.

On heavy loaded system with IMAP or DB storage,
'app_voicemail' taskprocessor queue could reach 500 scheduled tasks.
It could happen when the IMAP or DB server dies or is unreachable.
It could happen on startup when there are many (thousands)
realtime endpoints configured with unsolicited mwi.
If the taskprocessor queue reaches the high water level
then the alert is triggered and pjsip stops processing new requests
until the queue reaches the low water level to clear the alert.

This patch adds 2 new 'general' configuration options
to tune taskprocessor alert levels:
'tps_queue_high' - Taskprocessor high water alert trigger level.
'tps_queue_low' - Taskprocessor low water clear alert level

ASTERISK-26229 #close

Change-Id: I766294fbffedf64053c0d9ac0bedd3109f043ee8

9 years agoastconfigparser: Really handle case where line is simply a comment. 06/3406/1
Joshua Colp [Wed, 3 Aug 2016 14:47:04 +0000 (14:47 +0000)] 
astconfigparser: Really handle case where line is simply a comment.

The regular expression would match causing the code that handled
the line if it was merely a comment to never get executed.

Change-Id: I3e4022481037ebcba9905587fe8c764b4ce21819

9 years agoMerge "asterisk.c: Add auto generation and persistence of UUID" into 13
zuul [Wed, 3 Aug 2016 00:05:42 +0000 (19:05 -0500)] 
Merge "asterisk.c:  Add auto generation and persistence of UUID" into 13

9 years agoMerge "Remove SILK payload mappings from Asterisk core." into 13
zuul [Tue, 2 Aug 2016 23:32:11 +0000 (18:32 -0500)] 
Merge "Remove SILK payload mappings from Asterisk core." into 13

9 years agoMerge "res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 transports...
Joshua Colp [Tue, 2 Aug 2016 20:59:51 +0000 (15:59 -0500)] 
Merge "res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 transports." into 13

9 years agoasterisk.c: Add auto generation and persistence of UUID 04/3404/1
George Joseph [Sat, 23 Jul 2016 13:51:48 +0000 (07:51 -0600)] 
asterisk.c:  Add auto generation and persistence of UUID

Upcoming features will require the generation and persistence
of a UUID.

Change-Id: I3ec0062427e133217db6ef496a4216f427c3b92d

9 years agoMerge "menuselect: Add an opaque "member_data" string to the acceptable xml" into 13
Joshua Colp [Tue, 2 Aug 2016 19:17:22 +0000 (14:17 -0500)] 
Merge "menuselect:  Add an opaque "member_data" string to the acceptable xml" into 13

9 years agoMerge "rest-api: Code out of sync with the model" into 13
Joshua Colp [Tue, 2 Aug 2016 18:36:18 +0000 (13:36 -0500)] 
Merge "rest-api: Code out of sync with the model" into 13

9 years agorest-api: Code out of sync with the model 99/3399/1
Kevin Harwell [Tue, 2 Aug 2016 17:55:36 +0000 (12:55 -0500)] 
rest-api: Code out of sync with the model

Change-Id: Idccaa26fd4a423d47d013ee592b8fa6a0349c006

9 years agoMerge "sorcery: Use more compatible regex for local expressions." into 13
Joshua Colp [Tue, 2 Aug 2016 17:21:12 +0000 (12:21 -0500)] 
Merge "sorcery: Use more compatible regex for local expressions." into 13

9 years agoRemove SILK payload mappings from Asterisk core. 97/3397/1
Mark Michelson [Fri, 29 Jul 2016 18:13:55 +0000 (13:13 -0500)] 
Remove SILK payload mappings from Asterisk core.

SILK is a bit of a hog when it comes to using up our limited number of
dynamic payload types in the RTP engine. By freeing up four slots, it
allows for other codecs to potentially take the place.

Now, codec_silk.so will dynamically use the payload slots in the RTP
engine when it loads.

A better fix would be make RTP dynamic payload types actually
dynamic. However, at this stage of Asterisk 14 development, this is a
risky move that would be imprudent.

Change-Id: I5774e09408f9a203db189529eabdc0d3f4c1e612
(cherry picked from commit d50895c7b04036aeaad58990089399e46db4c817)

9 years agoMerge "pjproject: fixed a few bugs" into 13
Joshua Colp [Tue, 2 Aug 2016 14:34:39 +0000 (09:34 -0500)] 
Merge "pjproject: fixed a few bugs" into 13

9 years agosorcery: Use more compatible regex for local expressions. 92/3392/1
Joshua Colp [Mon, 1 Aug 2016 16:08:15 +0000 (16:08 +0000)] 
sorcery: Use more compatible regex for local expressions.

This changes the use of an empty regex for both res_sorcery_config
and res_sorcery_memory to "." instead. This is a more compatible
regular expression which also works on FreeBSD.

ASTERISK-26206 #close

Change-Id: Ia9166dd176f1597555ba22b6931180d0626c1388

9 years agores_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 transports. 90/3390/1
Alexander Traud [Tue, 2 Aug 2016 08:08:34 +0000 (10:08 +0200)] 
res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 transports.

ASTERISK-26256 #close

Change-Id: I3fd68df561f81fdb8c6c497d465b50c12422f058

9 years agomenuselect: Add an opaque "member_data" string to the acceptable xml 85/3385/1
George Joseph [Mon, 1 Aug 2016 21:13:17 +0000 (15:13 -0600)] 
menuselect:  Add an opaque "member_data" string to the acceptable xml

Change-Id: Id5ac43b95c8d7395f3be37f983632169db3d1afe

9 years agoMerge "Replace strdupa with more portable ast_strdupa" into 13
zuul [Mon, 1 Aug 2016 20:36:50 +0000 (15:36 -0500)] 
Merge "Replace strdupa with more portable ast_strdupa" into 13

9 years agoMerge "menuselect: Various menuselect enhancements" into 13
zuul [Mon, 1 Aug 2016 20:26:10 +0000 (15:26 -0500)] 
Merge "menuselect:  Various menuselect enhancements" into 13

9 years agoMerge "astconfigparser: Handle case where line is simply a comment." into 13
zuul [Mon, 1 Aug 2016 20:05:04 +0000 (15:05 -0500)] 
Merge "astconfigparser: Handle case where line is simply a comment." into 13

9 years agoReplace strdupa with more portable ast_strdupa 83/3383/1
David M. Lee [Wed, 27 Jul 2016 14:56:29 +0000 (09:56 -0500)] 
Replace strdupa with more portable ast_strdupa

The strdupa function is a GNU extension, and not widely portable. We
have an ast_strdupa function used within Asterisk which is preferred.
I pulled the definition up from menuselect.c into the menuselect.h
header file so it can be shared across menuselect.

Change-Id: I9593c97f78386b47dc1e83201e80cb2f62b36c2e

9 years agomenuselect: Various menuselect enhancements 81/3381/1
George Joseph [Sun, 24 Jul 2016 23:27:26 +0000 (17:27 -0600)] 
menuselect:  Various menuselect enhancements

* Add 'external' as a support level.
* Add ability for module directories to add entries to the menu
  by adding members to the <module_prefix>/<module_prefix>.xml file.
* Expand the description field to 3 lines in the ncurses implementation.
* Allow the description field to wrap in the newt implementation.
* Add description field to the gtk implementation.

Change-Id: I7f9600a1984a42ce0696db574c1051bc9ad7c808
(cherry picked from commit 90f445729d5d86050d9d379485ff0a99f4a006c1)

9 years agoMerge "pbx.c: Fix handling of '-' in extension name and callerid" into 13
zuul [Mon, 1 Aug 2016 15:25:19 +0000 (10:25 -0500)] 
Merge "pbx.c: Fix handling of '-' in extension name and callerid" into 13

9 years agoMerge "pjproject_bundled: Update for pjproject 2.5.5" into 13
zuul [Fri, 29 Jul 2016 16:30:42 +0000 (11:30 -0500)] 
Merge "pjproject_bundled:  Update for pjproject 2.5.5" into 13

9 years agoMerge "pbx.c: Allow dangerous functions when adding a hint to dialplan." into 13
zuul [Fri, 29 Jul 2016 11:27:20 +0000 (06:27 -0500)] 
Merge "pbx.c: Allow dangerous functions when adding a hint to dialplan." into 13

9 years agoastconfigparser: Handle case where line is simply a comment. 73/3373/1
Joshua Colp [Fri, 29 Jul 2016 09:48:32 +0000 (06:48 -0300)] 
astconfigparser: Handle case where line is simply a comment.

Change-Id: I2dea5815363f4d787d709228a04f33baee383ef5

9 years agoMerge "dsp.c: Add fax and DTMF detection unit tests." into 13
Joshua Colp [Fri, 29 Jul 2016 00:40:42 +0000 (19:40 -0500)] 
Merge "dsp.c: Add fax and DTMF detection unit tests." into 13

9 years agoMerge "dsp.c: Added descriptive comments to Goertzel calculations." into 13
Joshua Colp [Fri, 29 Jul 2016 00:40:37 +0000 (19:40 -0500)] 
Merge "dsp.c: Added descriptive comments to Goertzel calculations." into 13

9 years agoMerge "dsp.c: Fix incorrect format reference typo." into 13
Joshua Colp [Fri, 29 Jul 2016 00:40:33 +0000 (19:40 -0500)] 
Merge "dsp.c: Fix incorrect format reference typo." into 13

9 years agoMerge "dsp.c: Correct DTMF twist dsp.conf documentation." into 13
zuul [Fri, 29 Jul 2016 00:34:53 +0000 (19:34 -0500)] 
Merge "dsp.c: Correct DTMF twist dsp.conf documentation." into 13

9 years agoMerge "astconfigparser.py: Update with realtime fixes." into 13
Joshua Colp [Fri, 29 Jul 2016 00:18:00 +0000 (19:18 -0500)] 
Merge "astconfigparser.py: Update with realtime fixes." into 13

9 years agopbx.c: Fix handling of '-' in extension name and callerid 65/3365/2
Corey Farrell [Thu, 28 Jul 2016 19:10:04 +0000 (15:10 -0400)] 
pbx.c: Fix handling of '-' in extension name and callerid

This adds a two strings to ast_exten.  name to go with exten and
cidmatch_display to go with cidmatch.  The new fields contain input used
to add the extension in the first place.  The existing fields now
contain stripped input that excludes insignificant spaces and dashes.
These stripped fields should always be used for comparisons.  The
unstripped fields should normally be used for display, but displaying
stripped values will not cause runtime errors.

Note the actual string is only stored twice if it contains dashes.  If
no dashes are found then both 'char *' fields point to the same memory.
So this change has a minimum effect on memory usage.

The existing functions ast_get_extension_name and
ast_get_extension_cidmatch return unstripped values as they did before
this change.  Other similar bugs likely still exist where unstripped
extensions are saved outside pbx.c then passed back in.

ASTERISK-26233 #close

Change-Id: I6cd61ce57acc1570ca6cc14960c4c3b0a9eb837f

9 years agopbx.c: Allow dangerous functions when adding a hint to dialplan. 69/3369/1
Richard Mudgett [Wed, 27 Jul 2016 22:17:53 +0000 (17:17 -0500)] 
pbx.c: Allow dangerous functions when adding a hint to dialplan.

We can allow dangerous functions when adding a hint since altering
dialplan is itself a privileged activity.  Otherwise, we could never
execute dangerous functions.

ASTERISK-25996 #close
Reported by: Andrew Nagy

Change-Id: I4929ff100ad1200a0198262d069a34f2296e77ba

9 years agoMerge "rtp_engine: Failed assertion and wrong name given for codec" into 13
zuul [Thu, 28 Jul 2016 18:14:16 +0000 (13:14 -0500)] 
Merge "rtp_engine: Failed assertion and wrong name given for codec" into 13

9 years agopjproject: fixed a few bugs 78/3278/2
Alexei Gradinari [Thu, 21 Jul 2016 15:36:44 +0000 (11:36 -0400)] 
pjproject: fixed a few bugs

This patch fixes the issue in pjsip_tx_data_dec_ref()
when tx_data_destroy can be called more than once,
and checks if invalid value (e.g. NULL) is passed to.

This patch updates array limit checks and docs
in pjsip_evsub_register_pkg() and pjsip_endpt_add_capability().

Change-Id: I4c7a132b9664afaecbd6bf5ea4c951e43e273e40

9 years agopjproject_bundled: Update for pjproject 2.5.5 26/3326/2
George Joseph [Sun, 17 Jul 2016 23:28:36 +0000 (17:28 -0600)] 
pjproject_bundled:  Update for pjproject 2.5.5

Add more --disable-* switches to Makefile.rules including
--disable-opus which was causing bundled pjproject to fail with
"undefined reference" errors in libasteriskpj.

Changed PJ_ENABLE_EXTRA_CHECK to 1.

Removed 2 obsolete patches and added a new one.
The new one was merged by Teluu on 6/27/2016.

ASTERISK-26148 #close

Change-Id: Ib8af6c6a9d31f7238ce65b336134c2efdc855063

9 years agoPortably sscanf tv_usec 56/3356/2
David M. Lee [Wed, 27 Jul 2016 15:33:23 +0000 (10:33 -0500)] 
Portably sscanf tv_usec

In a timeval, tv_usec is defined as a suseconds_t, which could be
different underlying types on different platforms. Instead of trying to
scanf directly into the timeval, scanf into a long int, then copy that
into the timeval.

Change-Id: I29f22d049d3f7746b6c0cc23fbf4293bdaa5eb95

9 years agortp_engine: Failed assertion and wrong name given for codec 60/3360/1
Kevin Harwell [Wed, 27 Jul 2016 17:36:22 +0000 (12:36 -0500)] 
rtp_engine: Failed assertion and wrong name given for codec

Fixed an assert check that would trigger when the passed in value was negative.
The negative value was being cast to an unsigned value. This resulted in the
check failing.

Also fixed another problem when loading formats in the engine. When setting the
mime type the format's name was being passed in instead of the codec's name.

Change-Id: I1a201cd419ba4d8e9a40d337e36b6fbe1737192c

9 years agodsp.c: Add fax and DTMF detection unit tests. 40/3340/2
Richard Mudgett [Fri, 22 Jul 2016 03:44:55 +0000 (22:44 -0500)] 
dsp.c: Add fax and DTMF detection unit tests.

* Add fax amplitude and frequency sweep tests.
* Add DTMF amplitude and twist unit tests.

Change-Id: I8d77c9a1eec89e440d715f998c928687e870c3f7

9 years agodsp.c: Added descriptive comments to Goertzel calculations. 39/3339/2
Richard Mudgett [Thu, 21 Jul 2016 16:56:53 +0000 (11:56 -0500)] 
dsp.c: Added descriptive comments to Goertzel calculations.

* Added doxygen to describe some struct members and what is going on in
the code.

Change-Id: I2ec706a33b52aee42b16dcc356c2bd916a45190d

9 years agodsp.c: Fix incorrect format reference typo. 38/3338/2
Richard Mudgett [Wed, 13 Jul 2016 18:48:25 +0000 (13:48 -0500)] 
dsp.c: Fix incorrect format reference typo.

Change-Id: Ia131da3ec29acf385cb43a586a29ecc975eb3896

9 years agodsp.c: Correct DTMF twist dsp.conf documentation. 37/3337/2
Richard Mudgett [Tue, 26 Jul 2016 02:18:21 +0000 (21:18 -0500)] 
dsp.c: Correct DTMF twist dsp.conf documentation.

Change-Id: Idf97e3a72f1edc5fca58f2fa7b20785922be0cae

9 years agoastconfigparser.py: Update with realtime fixes. 05/3305/2
Joshua Colp [Fri, 22 Jul 2016 09:43:20 +0000 (06:43 -0300)] 
astconfigparser.py: Update with realtime fixes.

When configuring SIP URIs in the pjsip.conf file it is
necessary to escape the semicolon so the parser does not
treat it as a comment. This change allows this to work in
the astconfigparser implementation.

A secondary bug where some data was lost if a configuration
option included a "=" in its value was also fixed.

A bug where sections would be considered equal despite
being different has also been fixed.

Change-Id: If229f656ef22050b50e7b34e90c4bffe796431f8

9 years agodsp.c: Fix erroneous fax tone detection. 36/3336/1
Richard Mudgett [Fri, 22 Jul 2016 03:28:25 +0000 (22:28 -0500)] 
dsp.c: Fix erroneous fax tone detection.

The Goertzel calculations get less accurate the lower the signal level
being worked with becomes because there is less resolution remaining.
If it is too low we can erroneously detect a tone where none really
exists.  The searched for fax frequencies not only need to be so much
stronger than the background noise they must also be a minimum strength.

* Add needed minimum threshold test to tone_detect().

* Set TONE_THRESHOLD to allow low volume frequency spread detection.

ASTERISK-26237 #close
Reported by: Richard Mudgett

Change-Id: I84dbba7f7628fa13720add6a88eae3b129e066fc

9 years agoMerge "Fix sqlalchemy error regarding identifier length." into 13
zuul [Sat, 23 Jul 2016 21:54:27 +0000 (16:54 -0500)] 
Merge "Fix sqlalchemy error regarding identifier length." into 13

9 years agoMerge "chan_sip: Enable Session-Timers for SIP over TCP (and TLS)." into 13
zuul [Fri, 22 Jul 2016 21:55:13 +0000 (16:55 -0500)] 
Merge "chan_sip: Enable Session-Timers for SIP over TCP (and TLS)." into 13

9 years agoFix sqlalchemy error regarding identifier length. 15/3315/1
Mark Michelson [Fri, 22 Jul 2016 19:44:50 +0000 (14:44 -0500)] 
Fix sqlalchemy error regarding identifier length.

sqlalchemy was complaining:

sqlalchemy.exc.IdentifierError: Identifier
'ps_contacts_qualifyfreq_exptime' exceeds maximum length of 30
characters

This fixes the problem by changing the index name to be
"ps_contacts_qualifyfreq_exp" instead.

ASTERISK-26227 #close
Reported by Mark Michelson

Change-Id: I0ed784f87504be2a59ee8d3242ef6f625d5ed1a9

9 years agoMerge "res_pjsip: Whitespace and comment cleanup." into 13
zuul [Fri, 22 Jul 2016 12:13:13 +0000 (07:13 -0500)] 
Merge "res_pjsip: Whitespace and comment cleanup." into 13

9 years agochan_sip: Enable Session-Timers for SIP over TCP (and TLS). 31/3231/2
Alexander Traud [Fri, 22 Jul 2016 10:46:02 +0000 (12:46 +0200)] 
chan_sip: Enable Session-Timers for SIP over TCP (and TLS).

Asterisk defaults to timers=accept/refresher=uas. In that scenario, only in that
scenario, Sessions-Timers (RFC 4028) had no effect via TCP. This change enables
Session-Timers for SIP over TCP (and for SIP over TLS).

However with longer international calls via TCP, the SIP channel might break,
because all hops on the Internet route must stay online (have not a single power
outage, for example). Therefore with Session-Timers enabled (which are enabled
at default), you might see dropped calls. Consequently even with this change,
you might be better-off going for session-timers=refuse in your sip.conf.

ASTERISK-19968 #close

Change-Id: I1cd33453c77c56c8e1394cd60a6f17bb61c1d957

9 years agoMerge "chan_sip: Prevent deadlock when issuing "sip show channels"" into 13
Joshua Colp [Fri, 22 Jul 2016 09:47:13 +0000 (04:47 -0500)] 
Merge "chan_sip: Prevent deadlock when issuing "sip show channels"" into 13

9 years agoMerge "res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice....
zuul [Fri, 22 Jul 2016 07:22:03 +0000 (02:22 -0500)] 
Merge "res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice." into 13

9 years agores_pjsip: Whitespace and comment cleanup. 01/3301/2
Richard Mudgett [Fri, 15 Jul 2016 21:16:18 +0000 (16:16 -0500)] 
res_pjsip: Whitespace and comment cleanup.

Change-Id: I11139a4a95df34e223ba622aa6227e33ab8f6c38

9 years agoMerge "chan_dahdi.c: Fix deadlock potential in fax redirection." into 13
zuul [Fri, 22 Jul 2016 00:27:12 +0000 (19:27 -0500)] 
Merge "chan_dahdi.c: Fix deadlock potential in fax redirection." into 13

9 years agoMerge "chan_sip.c: Fix deadlock potential in fax redirection." into 13
zuul [Fri, 22 Jul 2016 00:18:20 +0000 (19:18 -0500)] 
Merge "chan_sip.c: Fix deadlock potential in fax redirection." into 13

9 years agoMerge "chan_pjsip.c: Fix deadlock potential in fax redirection." into 13
zuul [Fri, 22 Jul 2016 00:07:05 +0000 (19:07 -0500)] 
Merge "chan_pjsip.c: Fix deadlock potential in fax redirection." into 13

9 years agoMerge "res_fax.c: Fix deadlock potential in FAXOPT(faxdetect) framehook." into 13
zuul [Thu, 21 Jul 2016 23:35:12 +0000 (18:35 -0500)] 
Merge "res_fax.c: Fix deadlock potential in FAXOPT(faxdetect) framehook." into 13

9 years agoMerge changes from topic 'ASTERISK-26214' into 13
Joshua Colp [Thu, 21 Jul 2016 23:26:39 +0000 (18:26 -0500)] 
Merge changes from topic 'ASTERISK-26214' into 13

* changes:
  res_fax: Fix FAXOPT(faxdetect) timeout option.
  chan_dahdi: Add faxdetect_timeout option.

9 years agochan_sip: Prevent deadlock when issuing "sip show channels" 74/3274/5
George Joseph [Thu, 21 Jul 2016 14:05:03 +0000 (08:05 -0600)] 
chan_sip: Prevent deadlock when issuing "sip show channels"

sip_show_channels locks the dialogs container first then locks each
sip_pvt so it can spit out the details.  The rest of sip dialog
processing locks the sip_pvt first then locks the dialogs container
if it needs to.  Both lock in the order they need but deadlocks can
result.  To fix, sip_show_channels and sip_show_channelstats have
been converted to use an iterator rather than ao2_callback.  This way
the container is locked only while getting the next entry and is
unlocked when the callback is called.

ASTERISK-23013 #close

Change-Id: Id9980419909e811f89484950ed46ef117b9eb990

9 years agoMerge "res_pjsip: Add fax_detect_timeout endpoint option." into 13
Joshua Colp [Thu, 21 Jul 2016 21:54:32 +0000 (16:54 -0500)] 
Merge "res_pjsip: Add fax_detect_timeout endpoint option." into 13

9 years agoMerge "Add conditional support for noreturn functions." into 13
zuul [Thu, 21 Jul 2016 20:09:52 +0000 (15:09 -0500)] 
Merge "Add conditional support for noreturn functions." into 13

9 years agores_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice. 54/3254/5
Alexei Gradinari [Tue, 19 Jul 2016 20:22:39 +0000 (16:22 -0400)] 
res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice.

This patch removed call of pjsip_tx_data_dec_ref in send_notify
if send_request failed.
The pjsip_dlg_send_request deletes the message on error by itself.

It seems this patch fixes next issues:
ASTERISK-26199
ASTERISK-26166
ASTERISK-26174

Change-Id: I8b05917c93d993f95d604c042ace5f1a5500f59a

9 years agoMerge "Makefile: Retain XML Declaration and DTD in docs." into 13
zuul [Wed, 20 Jul 2016 17:14:41 +0000 (12:14 -0500)] 
Merge "Makefile: Retain XML Declaration and DTD in docs." into 13

9 years agoMerge "Unit tests: Use AST_TEST_DEFINE in conditional code only." into 13
zuul [Wed, 20 Jul 2016 16:31:50 +0000 (11:31 -0500)] 
Merge "Unit tests: Use AST_TEST_DEFINE in conditional code only." into 13

9 years agoMerge "res_rtp_asterisk: Count a roll-over of the sequence number even on lost packet...
zuul [Wed, 20 Jul 2016 14:58:05 +0000 (09:58 -0500)] 
Merge "res_rtp_asterisk: Count a roll-over of the sequence number even on lost packets." into 13

9 years agoMerge "res_pjsip_mwi: remove unneeded check on endpoint's contacts." into 13
zuul [Wed, 20 Jul 2016 14:58:00 +0000 (09:58 -0500)] 
Merge "res_pjsip_mwi: remove unneeded check on endpoint's contacts." into 13

9 years agoAdd conditional support for noreturn functions. 57/3257/1
Corey Farrell [Tue, 19 Jul 2016 03:46:19 +0000 (23:46 -0400)] 
Add conditional support for noreturn functions.

This adds support for tagging functions with the noreturn attribute.
If DO_CRASH is enabled then ast_do_crash never returns.  If AST_DEVMODE
and DO_CRASH are enabled then failed assertions never return.  This can
resolve a large number of false positives with static analyzers.

ASTERISK-26220 #close

Change-Id: Icfb61e5fe54574eced4c3e88b317244f467ec753

9 years agochan_dahdi.c: Fix deadlock potential in fax redirection. 48/3248/1
Richard Mudgett [Tue, 19 Jul 2016 18:18:47 +0000 (13:18 -0500)] 
chan_dahdi.c: Fix deadlock potential in fax redirection.

The dahdi_handle_dtmf() and my_handle_dtmf() have the potential to
deadlock if an incoming fax happens during the Playback or similar
application.

* Fixed the potential deadlock by not calling ast_async_goto() with the
channel lock held.

ASTERISK-26216 #close
Reported by: Richard Mudgett

Change-Id: I9144b84ade5f96690996624ec8a2d40c56af40aa

9 years agochan_sip.c: Fix deadlock potential in fax redirection. 47/3247/1
Richard Mudgett [Wed, 13 Jul 2016 23:49:08 +0000 (18:49 -0500)] 
chan_sip.c: Fix deadlock potential in fax redirection.

The sip_read() has the potential to deadlock if an incoming fax happens
during the Playback or similar application.

* Fixed the potential deadlock by not calling ast_async_goto() with the
channel lock held.

* Made always eat the fax detection frame whether there is a fax extension
or not.

ASTERISK-26216
Reported by: Richard Mudgett

Change-Id: I6d3f5cccd4b77c3aa6ffc1a54c0f6bde61c9278e