Commit Graph

29603 Commits

Author SHA1 Message Date
Jenkins2
7d230e690c Merge "res_hep: hepv3_is_loaded() should check if we are enabled" into 13 2017-12-15 11:36:25 -06:00
Jenkins2
2ea359f738 Merge "res_clialiases: Fix completion pass-through." into 13 2017-12-15 11:24:17 -06:00
Jenkins2
1865b3d230 Merge "coverity: Fix warnings in res_smdi" into 13 2017-12-15 10:50:16 -06:00
Jenkins2
ab8ae8fa92 Merge "res_musiconhold: Start playlist after initial announcement" into 13 2017-12-15 10:12:30 -06:00
Jenkins2
7ad305bfef Merge "app_queue: Fix extension state subscriptions removed on dialplan reload" into 13 2017-12-15 09:49:07 -06:00
Sean Bright
8338f3ec14 res_hep: hepv3_is_loaded() should check if we are enabled
res_hep_pjsip.so and res_hep_rtcp.so will still load and do a lot of
unnecessary work even if 'enabled' is set to 'no' in hep.conf.

Change-Id: I3eddfeea09c6b5bc7c641952ee0ae487fd09b64b
2017-12-14 19:55:28 -05:00
Jenkins2
7377927b18 Merge "pjsip: Ignore state changes from old transactions." into 13 2017-12-14 18:20:52 -06:00
Corey Farrell
85dec2ae4f res_clialiases: Fix completion pass-through.
Never ignore contents of line when generating completion options.

Change-Id: I74389efdfea154019d3b56a9f381610614c044c8
2017-12-14 15:31:48 -06:00
Sean Bright
62e743e6a7 res_musiconhold: Start playlist after initial announcement
Reset the samples counter to zero when we are done playing an
announcement so that we don't skip into the middle of the first file in
the playlist.

Also add the selected annoucement to the output of 'moh show classes.'

ASTERISK-24329 #close
Reported by: Thomas Frederiksen

Change-Id: I2a5f986a31279c981592f49391409ebf38d6f6d0
2017-12-14 13:17:18 -05:00
Sean Bright
74073c395b coverity: Fix warnings in res_smdi
ASTERISK-19657 #close
Reported by: Matt Jordan III, Esq.

Change-Id: I59a5e6ef3e7d9e848bec1f4b40cb73321bc7956a
2017-12-14 11:51:02 -05:00
Sean Bright
a1fcb7b5a6 configs: Comment out and change IP of iax.conf [demo]
This no longer appears to exist, so no sense in causing confusion.

ASTERISK-27175 #close
Reported by: Tzafrir Cohen

Change-Id: Idde967924c69f6a741dc9a5ab7dacb44d22cf100
2017-12-14 11:22:13 -05:00
Joshua Colp
9a016bd65e Merge "menuselect: Tweak check for recently run configure." into 13 2017-12-14 07:14:47 -06:00
Joshua Colp
a35032816a Merge "README: Remove outdated references to tex docs" into 13 2017-12-14 06:36:09 -06:00
Jenkins2
9a68fa36d1 Merge "res_pjsip: Assign support levels to a few modules" into 13 2017-12-13 15:07:10 -06:00
George Joseph
6d290f1880 README: Remove outdated references to tex docs
Added links to the wiki to replace references to outdated
tex docs.

ASTERISK-27430
Reported by: Corey Farrell

Change-Id: I5007e732b30bc7b63d124c530ae8857c89991209
2017-12-13 13:26:04 -07:00
Jenkins2
c35fa1868e Merge "pjsip_options: contacts sometimes not being updated on reload" into 13 2017-12-13 14:22:18 -06:00
Jenkins2
53f1de6259 Merge "pjsip_options: dynamic contact's fields not updated on reload" into 13 2017-12-13 13:57:44 -06:00
Jenkins2
20ca06b1db Merge "CLI: Fix 'core show sysinfo' function ordering." into 13 2017-12-13 12:19:27 -06:00
Jenkins2
992b7197b7 Merge "chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)" into 13 2017-12-13 10:18:37 -06:00
George Joseph
e40bffd53b Merge "AST-2017-012: Place single RTCP report block at beginning of report." into 13 2017-12-13 07:51:39 -06:00
Jenkins2
9b94e440ae Merge "chan_sip: Don't crash in Dial on invalid destination" into 13 2017-12-13 07:36:12 -06:00
Joshua Colp
5705e8ae0e AST-2017-012: Place single RTCP report block at beginning of report.
When the RTCP code was transitioned over to Stasis a code change
was made to keep track of how many reports are present. This count
controlled where report blocks were placed in the RTCP report.

If a compound RTCP packet was received this logic would incorrectly
place a report block in the wrong location resulting in a write
to an invalid location.

This change removes this counting logic and always places the report
block at the first position. If in the future multiple reports are
supported the logic can be extended but for now keeping a count
serves no purpose.

ASTERISK-27382
ASTERISK-27429

Change-Id: Iad6c8a9985c4b608ef493e19c421211615485116
2017-12-13 13:11:48 +00:00
Jenkins2
2b8a152c69 Merge "chan_sip: Don't send trailing \0 on keep alive packets" into 13 2017-12-13 06:56:36 -06:00
Joshua Colp
7a68faeb1d pjsip: Ignore state changes from old transactions.
When we fail over to a new target we create a new transaction
and it becomes the current INVITE transaction. This does not
prevent the previous transaction from raising state changes
and causing the session to be prematurely disconnected if a
transport error occurs immediately.

This change backports a fix from PJSIP that eliminates the
incorrect state change and reduces when they would be raised
in the first place.

ASTERISK-27408

Change-Id: Id22d087591782eee31311753d11e7eca4b95ef34
2017-12-13 05:09:50 -06:00
Ivan Poddubny
7ffc41d19f app_queue: Fix extension state subscriptions removed on dialplan reload
The approach with having a single global subscription to all extension
state changes has one issue: dynamically created hints don't have any
watchers and are therefore garbage collected on the first dialplan
reload.

This change creates a state subscription for every queue member with a
hint as state_interface, thus increasing the count of watches for
hints, so they are not destroyed prematurely anymore.

There are 2 side effects:
1. The state change callback in app_queue is not executed when
   there are no members referring to the extension.
2. The callback is called multiple times for the same hint if it's
   associated with more than one queue member.

Reported by: Steven T. Wheeler

ASTERISK-18411 #close

Change-Id: I4956af2136ea2a7f110ac9272eae5f6e676d8f89
2017-12-12 16:05:56 -06:00
Sean Bright
e1a358a6e4 chan_sip: Don't send trailing \0 on keep alive packets
This is a partial fix for ASTERISK~25817 but does not address the
comments regarding RFC 5626.

Change-Id: I227e2d10c0035bbfa1c6e46ae2318fd1122d8420
2017-12-12 15:51:41 -06:00
Sean Bright
ce2c89ce68 chan_sip: Don't crash in Dial on invalid destination
Stripping the DNID in a SIP dial string can result in attempting to call
the argument parsing macros on an empty string, causing a crash.

ASTERISK-26131 #close
Reported by: Dwayne Hubbard
Patches:
	dw-asterisk-master-dnid-crash.patch (license #6257) patch
	uploaded by Dwayne Hubbard

Change-Id: Ib84c1f740a9ec0539d582b09d847fc85ddca1c5e
2017-12-12 16:23:23 -05:00
Corey Farrell
6632f61153 menuselect: Tweak check for recently run configure.
Recently menuselect has randomly produced an error stating that
configure was just run and make had to be restarted.  I believe this is
due to an incorrect menuselect/Makefile rule.  The original rule
produced an error if makeopts or autoconfig.h were older than
makeopts.in or autoconfig.h.in.  I believe this can create an issue if
makeopts is older than autoconfig.h.in or if autoconfig.h is older than
makeopts.in.  The new rules compare files independently.

Change-Id: Ibca155035fa1392c95e33cbf25f257902abba17b
2017-12-12 15:22:18 -06:00
Richard Mudgett
73b3390dbe chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)
This patch does three things associated with the initial incoming INVITE
request URI.

1) Add access to the full initial incoming INVITE request URI.

2) We were not setting DNID on incoming PJSIP channels.  The DNID is the
user portion of the initial incoming INVITE Request-URI.  The value is
accessed by reading CALLERID(dnid).

3) Fix CHANNEL(pjsip,target_uri) documentation.

* The initial incoming INVITE request URI is now available using
CHANNEL(pjsip,request_uri).

* Set the DNID on PJSIP channel creation so CALLERID(dnid) can return the
initial incoming INVITE request URI user portion.

* CHANNEL(pjsip,target_uri) now correctly documents that the target URI is
the contact URI.

* Refactored print_escaped_uri() out of channel_read_pjsip() to handle
pjsip_uri_print() error condition when the buffer is too small.

ASTERISK-27478

Change-Id: I512e60d1f162395c946451becb37af3333337b33
2017-12-12 13:45:58 -06:00
Sean Bright
ca448bf150 res_pjsip: Add TLSv1.1 and TLSv1.2 support
Support for these protocols was added in the same commit as the 'proto'
field, so we can safely use the same ./configure check.

For reference: https://trac.pjsip.org/repos/changeset/4968

Change-Id: Icf4975d785d6bfb8f30ac7ffa695a0adf9382dac
2017-12-12 12:44:20 -05:00
Sean Bright
d9b932a455 res_pjsip: Assign support levels to a few modules
Change-Id: I51f6945c4023cb93fc7b87be5ab4c50e9e6ee27d
2017-12-12 11:07:01 -06:00
Corey Farrell
4decf4e492 CLI: Fix 'core show sysinfo' function ordering.
Handle CLI initialization before any processing occurs.

Change-Id: I598b911d2e409214bbdfd0ba0882be1d602d221c
2017-12-11 19:41:43 -06:00
Richard Mudgett
28eddc7ea6 stasis_channels.c: Don't set channel snapshot caller_dnid twice.
Change-Id: Ib8d45bbdfbda81e65045f6dff874d189b74e5471
2017-12-11 14:14:16 -06:00
Jenkins2
60acbeb431 Merge "codec_opus: Make libcurl a dependency in menuselect" into 13 2017-12-11 12:41:01 -06:00
Jenkins2
3bfddd9e73 Merge "astdb: Improve prefix searches in astdb" into 13 2017-12-11 11:42:27 -06:00
Jenkins2
84fe5f0219 Merge "loader: Refactor resource_name_match." into 13 2017-12-11 11:20:07 -06:00
Joshua Colp
8834a8eff9 Merge "res_stasis and res_speech: Fix load order." into 13 2017-12-11 10:39:36 -06:00
Jenkins2
90fe599e45 Merge "utils: Add convenience function for setting fd flags" into 13 2017-12-11 10:21:51 -06:00
Jenkins2
3b6fc78f4e Merge "pjsip: Improve CLI completion performance" into 13 2017-12-11 09:52:35 -06:00
Sean Bright
028f4320de codec_opus: Make libcurl a dependency in menuselect
ASTERISK-27475 #close

Change-Id: If7384bc6ed002ef140dec69798d14c52b7cfd800
2017-12-11 10:45:17 -05:00
Joshua Colp
ed089535d4 Merge "CDR: Fix deadlock setting some CDR values." into 13 2017-12-11 08:51:11 -06:00
Sean Bright
4838557132 pjsip: Improve CLI completion performance
Use the new ast_cli_completion_add() function to improve completion
performance for commands like 'pjsip show endpoint.'

Change-Id: I76d802294d2ac1766110dc75f7d117c8541ce348
2017-12-10 13:56:51 -05:00
Sean Bright
a4b291029f astdb: Improve prefix searches in astdb
Using the LIKE operator requires a full table scan of 'astdb', whereas a
comparison operation is able to use the primary key index.

This patch adds a new function to the AstDB API for quick prefix matches
and updates res_sorcery_astdb to utilize it. This showed substantial
performance improvement in my test environment.

Related to ASTERISK~26806, but does not completely resolve it.

Change-Id: I7d37f9ba2aea139dabf2ca72d31fbe34bd9b2fa1
2017-12-10 12:41:51 -06:00
Corey Farrell
9fc4f10e0e loader: Refactor resource_name_match.
Optimize resource_name_match.  This change eliminates use of
ast_strdupa, instead verifying that both basename's are the same length,
then using strncasecmp.

Change-Id: I477275c0e954c99d74be5abfc8bb6545b04e5a3d
2017-12-08 21:07:14 -06:00
Sean Bright
c3bc44fa1b pjsip_configuration: Add correct file header
Change-Id: I25348c386a222bb704aff07f54375108a6402906
2017-12-08 15:58:54 -05:00
Sean Bright
f726f11974 utils: Add convenience function for setting fd flags
There are many places in the code base where we ignore the return value
of fcntl() when getting/setting file descriptior flags. This patch
introduces a convenience function that allows setting or clearing file
descriptor flags and will also log an error on failure for later
analysis.

Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
2017-12-08 14:27:50 -05:00
Corey Farrell
3d79c34350 res_stasis and res_speech: Fix load order.
res_stasis was missing AST_MODFLAG_LOAD_ORDER.  Set res_stasis and
res_speech to start at (AST_MODPRI_APP_DEPEND - 1) so they are ready for
dependent modules.

Change-Id: I27f4f3810a95b6be8a5bfbf62be2ace6bfab6ff3
2017-12-07 20:41:58 -05:00
Kevin Harwell
ecdccb8071 pjsip_options: contacts sometimes not being updated on reload
For both dynamic and static contacts it was possible that potential AOR
changes were not being applied to all contacts. This was because the qualify
and schedule code was only retrieving AOR's, and contacts with frequencies
greater than zero.

For instance the following could happen: and AOR/contact has a frequency of 5,
it then gets set to 0, and then a reload occurs. All scheduled OPTIONS are
stopped, a list of AOR's is retrieved with frequency > 0, but none are
selected since in this scenario all are 0. The contact for the one previously
set to 5 though does not get updated, so it's status remains "AVAILABLE".

This patch makes it so all contacts (static and dynamic) are selected, and
appropriately updated if need be.

ASTERISK-27467 #close

Change-Id: I7a920170f89c683af9505d4723a44fc6841decdb
2017-12-07 18:39:50 -06:00
Kevin Harwell
f20ab2b65f pjsip_options: dynamic contact's fields not updated on reload
Dynamic contacts were not being properly updated on reload. As a matter of
fact any changes to the AOR that a dynamic contact was associated with were
not being applied.

On reload, this patch makes it so for each dynamic contact, the associated
AOR is now retrieved and the AOR's fields are applied to the contact.

ASTERISK-27467

Change-Id: I8e3165dc6a745218c1c9db837f77fafa0516985d
2017-12-07 18:18:00 -06:00
Jenkins2
54a86779a3 Merge "translate: Skip matrix_rebuild during shutdown." into 13 2017-12-07 14:37:53 -06:00