Commit Graph

29607 Commits

Author SHA1 Message Date
Jenkins2
e31e3b581b Merge "res_smdi: Fix shutdown ref." into 13 2017-12-15 12:31:47 -06:00
Jenkins2
ccb563d357 Merge "res_rtp_asterisk.c: Disable packet flood detection for video streams." into 13 2017-12-15 11:59:53 -06:00
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
Corey Farrell
8165115faa res_smdi: Fix shutdown ref.
When adding shutdown refs for OPTIONAL_API components I accidentally
added it to the unload_module function in res_smdi.  Move it to
load_module.

Change-Id: I2b9da38fbc11ef78ea23dbb2df92b684be7f647c
2017-12-15 09:03:27 -05: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
Richard Mudgett
61e81338d9 res_rtp_asterisk.c: Disable packet flood detection for video streams.
We should not do flood detection on video RTP streams.  Video RTP streams
are very bursty by nature.  They send out a burst of packets to update the
video frame then wait for the next video frame update.  Really only audio
streams can be checked for flooding.  The others are either bursty or
don't have a set rate.

* Added code to selectively disable packet flood detection for video RTP
streams.

ASTERISK-27440

Change-Id: I78031491a6e75c2d4b1e9c2462dc498fe9880a70
2017-12-14 14:40:17 -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