asterisk/asterisk.git
3 years agoMerge "pjproject_bundled: Allow IPv4/IPv6 (Dual Stack) configurations."
Joshua Colp [Mon, 22 Aug 2016 14:22:04 +0000 (09:22 -0500)]
Merge "pjproject_bundled: Allow IPv4/IPv6 (Dual Stack) configurations."

3 years agoMerge "res_ari: Add http prefix to generated docs"
zuul [Mon, 22 Aug 2016 12:32:46 +0000 (07:32 -0500)]
Merge "res_ari: Add http prefix to generated docs"

3 years agopjproject_bundled: Allow IPv4/IPv6 (Dual Stack) configurations.
Alexander Traud [Sat, 20 Aug 2016 16:18:51 +0000 (18:18 +0200)]
pjproject_bundled: Allow IPv4/IPv6 (Dual Stack) configurations.

PJProject supports a lot of platforms even Windows, some with different defaults
when it comes to IPv6. In many Linux platforms like Ubuntu 16.04 LTS,
"/proc/sys/net/ipv6/bindv6only" is set to 0 (false). Different than in Windows.

Because of this, if configured with just an IPv6 address/transport, PJProject
listens to both IPv4 and IPv6. However, this is not supported by the PJProject
team. As consequence, you end-up with IPv4-mapped IPv6 addresses in SDP,
incompatible with IPv4-only clients. Technically, you end-up with an IPv6-only
server which accepts incoming connections on IPv4.

If you try to configure two transports, one with IPv4 and one with IPv6 on the
same interface, as expected by the PJProject team, the IPv4 transport is not
able to bind because the IPv6 transport listens to both already.

One solution would be to change "/proc/sys/net/ipv6/bindv6only" system-wide.
Then, you are able to configure two transports, one for each IP version on the
same interface. That way, you get a server which works with IPv4 clients and
IPv6 clients at the same time over the same interface.

Here, this change sets this parameter directly within PJProject to match the
expectations of the PJProject team in any case. This allows IPv4/IPv6 Dual Stack
servers out of the box like in chan_sip. This change was accepted by the
PJProject team as <http://trac.pjsip.org/repos/changeset/5403> and is expected
to arrive in the next version, PJProject 2.6.0. Until then, this change is
incorporated in the bundled PJProject of Asterisk.

ASTERISK-26309

Change-Id: I3335d8718f79f4b2feae91b5b005a3ce684a63ae

3 years agoMerge "sip_to_pjsip: Map externhost/ip to Transports."
zuul [Fri, 19 Aug 2016 22:54:48 +0000 (17:54 -0500)]
Merge "sip_to_pjsip: Map externhost/ip to Transports."

3 years agores_ari: Add http prefix to generated docs
Torrey Searle [Wed, 17 Aug 2016 13:10:54 +0000 (15:10 +0200)]
res_ari: Add http prefix to generated docs

updated the uri handler to include the url prefix of the http server
this enables res_ari to add it to the uris when generating docs

Change-Id: I279335a2625261a8492206c37219698f42591c2e
(cherry picked from commit 6f448f32fe9b7379e2630fab7b06205f901f2ded)

3 years agoMerge "res_odbc: Correct the dependency relationship with res_odbc_transaction"
zuul [Fri, 19 Aug 2016 20:52:36 +0000 (15:52 -0500)]
Merge "res_odbc:  Correct the dependency relationship with res_odbc_transaction"

3 years agoMerge "sip.conf: tlsclientmethod is using sslv23 as default."
zuul [Fri, 19 Aug 2016 19:38:24 +0000 (14:38 -0500)]
Merge "sip.conf: tlsclientmethod is using sslv23 as default."

3 years agoMerge "rest-api: Swagger scripts were not replacing format variable in file brief"
zuul [Fri, 19 Aug 2016 18:20:17 +0000 (13:20 -0500)]
Merge "rest-api: Swagger scripts were not replacing format variable in file brief"

3 years agoMerge "sip_to_pjsip: Add cert_file."
zuul [Fri, 19 Aug 2016 17:39:07 +0000 (12:39 -0500)]
Merge "sip_to_pjsip: Add cert_file."

3 years agoMerge "res_format_attr_g729: Add annexb=no format parameter to SDPs"
zuul [Fri, 19 Aug 2016 16:03:39 +0000 (11:03 -0500)]
Merge "res_format_attr_g729: Add annexb=no format parameter to SDPs"

3 years agoMerge "res_pjsip: Add contact_user to endpoint"
zuul [Fri, 19 Aug 2016 15:08:11 +0000 (10:08 -0500)]
Merge "res_pjsip:  Add contact_user to endpoint"

3 years agoMerge "ari: Add documentation that path parameters are case-sensitive"
zuul [Fri, 19 Aug 2016 12:20:41 +0000 (07:20 -0500)]
Merge "ari:  Add documentation that path parameters are case-sensitive"

3 years agosip_to_pjsip: Add cert_file.
Alexander Traud [Fri, 19 Aug 2016 08:59:40 +0000 (10:59 +0200)]
sip_to_pjsip: Add cert_file.

When using the migration script sip_to_pjsip.py, cert_file was not migrated to
pjsip.conf. A previous change regarding this contained a copy/paste error.

ASTERISK-22374

Change-Id: I0fa72e9412117d53b4284fc6b83fa5b2b95ba03b

3 years agosip.conf: tlsclientmethod is using sslv23 as default.
Alexander Traud [Thu, 18 Aug 2016 14:21:25 +0000 (16:21 +0200)]
sip.conf: tlsclientmethod is using sslv23 as default.

When 'tlsclientmethod' is not specified in sip.conf, chan_sip uses the OpenSSL
SSLv23_method. This was documented incorrectly in the file sip.conf.sample.

SSLv23_method got its name in the 90s. Today, with OpenSSL 1.0.2, this method
enables (just) the secure TLSv1.0 and TLSv1.2. Or stated differently, that
function should have been called 'secure_method' or 'automatic_method' back in
the 90s.

Consequently please, specify 'tlsclientmethod=tlsv1' in your sip.conf only if
you face a server which has problems like not falling back to TLSv1.0
automatically.

ASTERISK-24425

Change-Id: I502ce6146b4504cadfd3973af8d6ec3994f54fa3

3 years agoMerge "sip_to_pjsip: Write cos and tos."
Joshua Colp [Thu, 18 Aug 2016 23:55:35 +0000 (18:55 -0500)]
Merge "sip_to_pjsip: Write cos and tos."

3 years agores_format_attr_g729: Add annexb=no format parameter to SDPs
Kevin Harwell [Tue, 16 Aug 2016 20:57:24 +0000 (15:57 -0500)]
res_format_attr_g729: Add annexb=no format parameter to SDPs

Historically, Asterisk has always specified annexb=no for the g729 format.
However, when using res_pjsip no format attribute was specified. This patch
makes it so the SDP now contains a format attribute line with annexb=no.

Note, that this means only g729a is negotiated. Even for pass through support.
According to rfc7261 the type of annex used (a or b) is dependent upon the
answerer. However, Asterisk being a back to back user agent makes this tricky
to support at this time, thus we only allow annex 'a' for now.

ASTERISK-26228 #close
patches:
  res_format_attr_g729.c submitted by Jason Parker (license 4993)

Change-Id: I76bc20cc0a01af01536e9915afef319c269c22d0

3 years agorest-api: Swagger scripts were not replacing format variable in file brief
Kevin Harwell [Thu, 18 Aug 2016 22:02:24 +0000 (17:02 -0500)]
rest-api: Swagger scripts were not replacing format variable in file brief

Given resource paths did not have 'json' substituted in for the '{format}'. For
some auto generated documentation/comment strings it resulted in something like
the following:

"... REST handler for /api-docs/sounds.{format}"

This patch makes sure the resource api's path is properly substituted.

ASTERISK-25472 #close

Change-Id: Ie3e950a35db4043e284019d6c9061f3b03922e23

3 years agores_odbc: Correct the dependency relationship with res_odbc_transaction
George Joseph [Thu, 18 Aug 2016 20:15:46 +0000 (14:15 -0600)]
res_odbc:  Correct the dependency relationship with res_odbc_transaction

The MODULEINFO dependencies between these 2 modules was reversed.
res_odbc should depend on res_odbc_transaction, not the other way
around.

ASTERISK-25984 #close

Change-Id: Ifcfbb49c0b51cf6640a5446d47cd6c48caf1331f

3 years agosip_to_pjsip: Set correct tls transport method
Kevin Harwell [Thu, 18 Aug 2016 17:04:56 +0000 (12:04 -0500)]
sip_to_pjsip: Set correct tls transport method

A recent update had a copy/paste error where the unused variable 'val' was
being passed to the set_value function instead of the 'method' value itself.

This patch passes in the right variable.

ASTERISK-22374

Change-Id: I895b7b3779ce4442bc58b8ec40d59dd29bb43f06

3 years agoMerge "res_pjsip_session.c: Fix unbound srv failover tests."
zuul [Thu, 18 Aug 2016 16:55:20 +0000 (11:55 -0500)]
Merge "res_pjsip_session.c: Fix unbound srv failover tests."

3 years agoMerge "sip_to_pjsip: Parse register even with transport."
Joshua Colp [Thu, 18 Aug 2016 16:50:16 +0000 (11:50 -0500)]
Merge "sip_to_pjsip: Parse register even with transport."

3 years agoMerge "sip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit."
Joshua Colp [Thu, 18 Aug 2016 16:49:53 +0000 (11:49 -0500)]
Merge "sip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit."

3 years agoMerge "sip_to_pjsip: Map (session-)timers correctly."
Joshua Colp [Thu, 18 Aug 2016 16:49:15 +0000 (11:49 -0500)]
Merge "sip_to_pjsip: Map (session-)timers correctly."

3 years agoMerge "sip_to_pjsip: Add cert_file and ca_list_path."
Joshua Colp [Thu, 18 Aug 2016 16:48:32 +0000 (11:48 -0500)]
Merge "sip_to_pjsip: Add cert_file and ca_list_path."

3 years agoMerge "sip_to_pjsip: Write username even without authname."
Joshua Colp [Thu, 18 Aug 2016 16:48:23 +0000 (11:48 -0500)]
Merge "sip_to_pjsip: Write username even without authname."

3 years agoMerge "sip_to_pjsip: Map the TLS method correctly."
Joshua Colp [Thu, 18 Aug 2016 16:47:29 +0000 (11:47 -0500)]
Merge "sip_to_pjsip: Map the TLS method correctly."

3 years agoMerge "sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent."
Joshua Colp [Thu, 18 Aug 2016 16:46:39 +0000 (11:46 -0500)]
Merge "sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent."

3 years agoMerge "sip_to_pjsip: Write media_encryption."
Joshua Colp [Thu, 18 Aug 2016 16:45:56 +0000 (11:45 -0500)]
Merge "sip_to_pjsip: Write media_encryption."

3 years agoMerge "sip_to_pjsip: Add defaultexpiry, maxexpiry, and minexpiry."
Joshua Colp [Thu, 18 Aug 2016 16:45:33 +0000 (11:45 -0500)]
Merge "sip_to_pjsip: Add defaultexpiry, maxexpiry, and minexpiry."

3 years agosip_to_pjsip: Map the TLS method correctly.
Alexander Traud [Thu, 18 Aug 2016 13:19:15 +0000 (15:19 +0200)]
sip_to_pjsip: Map the TLS method correctly.

When using the migration script sip_to_pjsip.py and tlsclientmethod is not set
in sip.conf, the default value of chan_sip (sslv23) is copied to pjsip.conf, to
overwrite the default of the PJProject (tlsv1). This makes sure, res_pjsip is
offering/using not just TLSv1.0 but TLSv1.2 as well.

ASTERISK-22374

Change-Id: Ie530a3dae9926ae14f3920a21be1e2edb15bda4f

3 years agosip_to_pjsip: Add compactheaders, timerb, timert1, and useragent.
Alexander Traud [Thu, 18 Aug 2016 13:17:47 +0000 (15:17 +0200)]
sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent.

When using the migration script sip_to_pjsip.py, no section of type=system or
type=general were created. Therefore the keys compactheaders, timerb, timert1,
and useragent were not migrated to pjsip.conf.

ASTERISK-22374

Change-Id: I318a453843227ea36bf130d392d4abd7bd26b5a1

3 years agosip_to_pjsip: Map (session-)timers correctly.
Alexander Traud [Thu, 18 Aug 2016 13:16:45 +0000 (15:16 +0200)]
sip_to_pjsip: Map (session-)timers correctly.

When using the migration script sip_to_pjsip.py, session-timers=accept and
session-timers=refuse were mapped to wrong values.

ASTERISK-22374

Change-Id: Ie4e90d5f6a29aff07837b7fe5bc8aea5fb6fc092

3 years agosip_to_pjsip: Write username even without authname.
Alexander Traud [Thu, 18 Aug 2016 13:15:38 +0000 (15:15 +0200)]
sip_to_pjsip: Write username even without authname.

When using the migration script sip_to_pjsip.py, now the (mandatory) username is
written to pjsip.conf, even if there was no (optional) authname in the register
string in sip.conf.

ASTERISK-22374

Change-Id: Ie53e1997104cd2674821688b8a8247249f5e156f

3 years agosip_to_pjsip: Parse register even with transport.
Alexander Traud [Thu, 18 Aug 2016 13:14:36 +0000 (15:14 +0200)]
sip_to_pjsip: Parse register even with transport.

When using the migration script sip_to_pjsip.py and the register string
started with a transport in sip.conf - like tls://... - register was not parsed
correctly and therefore not migrated correctly to pjsip.conf.

ASTERISK-22374

Change-Id: I44c12104eea2bd8558ada6d25d77edfecd92edd2

3 years agosip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit.
Alexander Traud [Thu, 18 Aug 2016 13:13:03 +0000 (15:13 +0200)]
sip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit.

When using the migration script sip_to_pjsip.py, those keys got missing. These
keys might appear several times and the function "merge_value" tried to collect
those. However, because these keys have different names in sip.conf and
pjsip.conf, "merge_value" was not able to find the new key name in sip.conf.
This change lets "merge_value" search with the old key name in sip.conf and
write with the new key name in pjsip.conf.

ASTERISK-22374

Change-Id: Ie53c5278ae6f1cb8fa7e96c5289877d46981d9d2

3 years agosip_to_pjsip: Map externhost/ip to Transports.
Alexander Traud [Thu, 18 Aug 2016 13:11:02 +0000 (15:11 +0200)]
sip_to_pjsip: Map externhost/ip to Transports.

When using the migration script sip_to_pjsip.py, the externhost or externip of
sip.conf were erroneously written to Endpoints instead to Transports.

ASTERISK-22374

Change-Id: I2c5873386cfc388899fa9cf2368639dd12f1b8e4

3 years agosip_to_pjsip: Add defaultexpiry, maxexpiry, and minexpiry.
Alexander Traud [Thu, 18 Aug 2016 13:04:53 +0000 (15:04 +0200)]
sip_to_pjsip: Add defaultexpiry, maxexpiry, and minexpiry.

When using the migration script sip_to_pjsip.py, defaultexpiry, maxexpiry, and
minexpiry were not migrated to pjsip.conf.

ASTERISK-22374

Change-Id: I007fbf543dcadc96fc3ed71c54da502bcb209b7b

3 years agosip_to_pjsip: Write media_encryption.
Alexander Traud [Thu, 18 Aug 2016 13:03:24 +0000 (15:03 +0200)]
sip_to_pjsip: Write media_encryption.

When using the migration script sip_to_pjsip.py, encryption=yes got missing and
media_encryption=sdes was not written to pjsip.conf, because of a typo.

ASTERISK-22374

Change-Id: I0fc3e55dc512a57603ae0fef41baacccf2a35c05

3 years agosip_to_pjsip: Write cos and tos.
Alexander Traud [Thu, 18 Aug 2016 13:02:07 +0000 (15:02 +0200)]
sip_to_pjsip: Write cos and tos.

When using the migration script sip_to_pjsip.py, both tos_sip and cos_sip got
missed, because of a typo. Therefore, cos and tos were not written to
pjsip.conf. Furthermore, that revealed a misuse of an internal function, caused
by a copy-and-paste error.

ASTERISK-22374

Change-Id: Id245ebadf70ab9776eb280c026288540af3af5c2

3 years agosip_to_pjsip: Add cert_file and ca_list_path.
Alexander Traud [Thu, 18 Aug 2016 12:55:58 +0000 (14:55 +0200)]
sip_to_pjsip: Add cert_file and ca_list_path.

When using the migration script sip_to_pjsip.py, cert_file and ca_list_path were
not migrated to pjsip.conf.

ASTERISK-22374

Change-Id: I4612877d190b7f86a48698cefbf5c4db6c265825

3 years agores_pjsip: Add contact_user to endpoint
George Joseph [Tue, 16 Aug 2016 20:36:10 +0000 (14:36 -0600)]
res_pjsip:  Add contact_user to endpoint

contact_user, when specified on an endpoint, will override the user
portion of the Contact header on outgoing requests.

Change-Id: Icd4ebfda2f2e44d3ac749d0b4066630e988407d4

3 years agores_pjsip_session.c: Fix unbound srv failover tests.
Richard Mudgett [Wed, 17 Aug 2016 19:13:56 +0000 (14:13 -0500)]
res_pjsip_session.c: Fix unbound srv failover tests.

Commit 1b666549f33d69dc080b212bf92126f3bc3a18b2 broke the srv failover
functionality if a TCP connection gets disconnected.  Under these
conditions, session_inv_on_state_changed() gets a
PJSIP_EVENT_TRANSPORT_ERROR and restarts the INVITE transaction on a new
transport.  Unfortunately, session_inv_on_tsx_state_changed() also gets
the same PJSIP_EVENT_TRANSPORT_ERROR event and unconditionally terminates
the session.

* Made session_inv_on_tsx_state_changed() complete terminating the session
on PJSIP_EVENT_TRANSPORT_ERROR only if the session state is still
PJSIP_INV_STATE_DISCONNECTED.

ASTERISK-26305 #close
Reported by: Richard Mudgett

Change-Id: If736e766b5c55b970fa38ca6c8a885caf27b897d

3 years agoBuildSystem: Detect ca_list_path capabilities in external PJProject.
Alexander Traud [Wed, 17 Aug 2016 11:12:19 +0000 (13:12 +0200)]
BuildSystem: Detect ca_list_path capabilities in external PJProject.

Since Asterisk 13.8, pj_ssl_cert_load_from_files2 got detected only in the
bundled PJProject but not in an external PJProject. Therefore, ca_list_path
could not be used in pjsip.conf. With this change, pj_ssl_cert_load_from_files2
is detected again to enable ca_list_path again.

ASTERISK-26303 #close

Change-Id: I4a4a0cdc5cdff33730911fb4cfc0498c069043d0

3 years agoMerge "translate: Enables native Packet-Loss Concealment (PLC) for supporting codecs."
zuul [Tue, 16 Aug 2016 22:29:58 +0000 (17:29 -0500)]
Merge "translate: Enables native Packet-Loss Concealment (PLC) for supporting codecs."

3 years agoari: Add documentation that path parameters are case-sensitive
George Joseph [Tue, 16 Aug 2016 17:24:29 +0000 (11:24 -0600)]
ari:  Add documentation that path parameters are case-sensitive

Added to api.wiki.mustache so that the generated object pages
have the notation in the table header as well as under each method
that has path parameters.

ASTERISK-25492 #close

Change-Id: I36c46c6dc0c9ac350470394a999a1b19ef3fcdaf

3 years agoRefactor usage pattern of xmldoc info tag.
Corey Farrell [Mon, 15 Aug 2016 20:29:53 +0000 (16:29 -0400)]
Refactor usage pattern of xmldoc info tag.

This updates func_channel.c and main/message.c to use a generic xpointer
include instead of including info from each channel driver.  Now the
name attribute of info is CHANNEL or CHANNEL_EXAMPLES to be included in
documentation for func_channel.  Setting the name attribute of info to
MessageToInfo or MessageFromInfo causes it to be included in the
MessageSend application and AMI action.

Change-Id: I89fd8276a3250824241a618009714267d3a8d1ea

3 years agoMerge "chan_sip: Fix lastrtprx always updated"
Joshua Colp [Tue, 16 Aug 2016 15:26:27 +0000 (10:26 -0500)]
Merge "chan_sip: Fix lastrtprx always updated"

3 years agoMerge "core: Entity ID is not set or invalid"
zuul [Tue, 16 Aug 2016 15:03:20 +0000 (10:03 -0500)]
Merge "core: Entity ID is not set or invalid"

3 years agoMerge "res_sorcery_config.c: Cleanup ao2 container usage idioms."
Joshua Colp [Tue, 16 Aug 2016 13:24:38 +0000 (08:24 -0500)]
Merge "res_sorcery_config.c: Cleanup ao2 container usage idioms."

3 years agoMerge "sorcery.c: Minor optimizations."
Joshua Colp [Tue, 16 Aug 2016 13:24:31 +0000 (08:24 -0500)]
Merge "sorcery.c: Minor optimizations."

3 years agoMerge "sorcery.c: Tweak some container declaration formatting."
Joshua Colp [Tue, 16 Aug 2016 13:24:19 +0000 (08:24 -0500)]
Merge "sorcery.c: Tweak some container declaration formatting."

3 years agoMerge "manager: Add <see-also> tags to relate AoC events and actions"
Joshua Colp [Tue, 16 Aug 2016 10:34:33 +0000 (05:34 -0500)]
Merge "manager: Add <see-also> tags to relate AoC events and actions"

3 years agoMerge "res_agi: Improve documentation"
Joshua Colp [Tue, 16 Aug 2016 10:34:10 +0000 (05:34 -0500)]
Merge "res_agi: Improve documentation"

3 years agoMerge "func_channel: Reorganize documentation"
Joshua Colp [Tue, 16 Aug 2016 10:33:34 +0000 (05:33 -0500)]
Merge "func_channel: Reorganize documentation"

3 years agoMerge "pbx.c: Additional fixes to ast_context_remove_extension_callerid2."
Joshua Colp [Tue, 16 Aug 2016 10:32:30 +0000 (05:32 -0500)]
Merge "pbx.c: Additional fixes to ast_context_remove_extension_callerid2."

3 years agoMerge "manager: Add <see-also> links between related events"
zuul [Tue, 16 Aug 2016 05:26:26 +0000 (00:26 -0500)]
Merge "manager: Add <see-also> links between related events"

3 years agoMerge "manager: Add <see-also> tags to relate UserEvent actions/apps/events"
zuul [Tue, 16 Aug 2016 03:47:32 +0000 (22:47 -0500)]
Merge "manager: Add <see-also> tags to relate UserEvent actions/apps/events"

3 years agoMerge "manager: Add <see-also> tags to relate Bridge related events,actions, and...
Joshua Colp [Tue, 16 Aug 2016 00:17:46 +0000 (19:17 -0500)]
Merge "manager: Add <see-also> tags to relate Bridge related events,actions, and apps"

3 years agoMerge "manager: Add <see-also> tags to relate interrelated events/actions together"
zuul [Mon, 15 Aug 2016 23:36:44 +0000 (18:36 -0500)]
Merge "manager: Add <see-also> tags to relate interrelated events/actions together"

3 years agoMerge "app_dial: Improve documentation"
Joshua Colp [Mon, 15 Aug 2016 22:21:23 +0000 (17:21 -0500)]
Merge "app_dial: Improve documentation"

3 years agochan_sip: Fix lastrtprx always updated
cjack [Wed, 15 Jun 2016 22:10:11 +0000 (01:10 +0300)]
chan_sip: Fix lastrtprx always updated

Packets are read regulary, when there is no data in buffer fr->frametype
is AST_FRAME_NULL. There was no check of frametype and lastrtprx always
updated and, therefore, rtptimeout did not work at all.

ASTERISK-25270 #close

Change-Id: If3b5ca0dbb822582a86eb7d01dcae4e83448c41d

3 years agocore: Entity ID is not set or invalid
Alexei Gradinari [Wed, 10 Aug 2016 19:41:38 +0000 (15:41 -0400)]
core: Entity ID is not set or invalid

The Exchanging Device and Mailbox States could not working
if the Entity ID (EID) is not set manually and can't be obtained
from ethernet interface.

This patch replaces debug message to warning
and addes missing description about option 'entityid' to
asterisk.conf.sample.

With this patch the asterisk also:
(1) decline loading the modules which won't work without EID:
    res_corosync and res_pjsip_publish_asterisk.
(2) warn if EID is empty on loading next modules:
    pbx_dundi, res_xmpp

Starting with v197 systemd/udev will automatically assign "predictable"
names for all local Ethernet interfaces.
This patch also addes some new ethernet prefixes "eno" and "ens".

ASTERISK-26164 #close

Change-Id: I72d712f1ad5b6f64571bb179c5cb12461e7c58c6

3 years agores_sorcery_config.c: Cleanup ao2 container usage idioms.
Richard Mudgett [Fri, 5 Aug 2016 01:00:59 +0000 (20:00 -0500)]
res_sorcery_config.c: Cleanup ao2 container usage idioms.

Change-Id: Iad24b335fb121a2bc7f1d048ab7420569edcba5a

3 years agosorcery.c: Minor optimizations.
Richard Mudgett [Thu, 4 Aug 2016 20:57:12 +0000 (15:57 -0500)]
sorcery.c: Minor optimizations.

* Remove some unused parameters from internal functions:
sorcery_wizard_create()
sorcery_wizard_update()
sorcery_wizard_delete()

* Created the struct sorcery_observer_invocation ao2 object without a lock
since it is not needed in sorcery_observer_invocation_alloc().

* Cleanup generic ao2 container sorcery object id hash, sort, and cmp
functions.

Change-Id: Iff71d75f52bc1b8cee955456838c149faaa4f92e

3 years agosorcery.c: Tweak some container declaration formatting.
Richard Mudgett [Mon, 1 Aug 2016 16:04:33 +0000 (11:04 -0500)]
sorcery.c: Tweak some container declaration formatting.

* Tweak sorcery_object_type_alloc() formatting.
* Tweak ast_sorcery_init() formatting.

Change-Id: Ib02430023f15268cd7a2ea53f2c331213e4d3944

3 years agopbx.c: Additional fixes to ast_context_remove_extension_callerid2.
Corey Farrell [Fri, 12 Aug 2016 04:30:27 +0000 (00:30 -0400)]
pbx.c: Additional fixes to ast_context_remove_extension_callerid2.

Do not check registrar of the first extension head.  We should only check
the registrar when we match the priority.

Additionally fix a couple calls to strcmp which used the input callerid
instead of the clean version ex.cidmatch.

ASTERISK-26233

Change-Id: I17ea6881a18f40840ae9c1f5394aab1fbb3769f1

3 years agoapp_dial: Improve documentation
Matt Jordan [Sun, 14 Aug 2016 03:02:24 +0000 (22:02 -0500)]
app_dial: Improve documentation

* Add some helpful <literal> and other embedded paragraph tags

* Document some of the lesser known channel variables set by Dial

* Add examples for some common Dial uses, along with some more
  challenging but useful options

Change-Id: Ib2fb9301e8e044d14fbb2815ec64161f19bbfbc1

3 years agomanager: Add <see-also> tags to relate interrelated events/actions together
Matt Jordan [Sun, 14 Aug 2016 01:16:58 +0000 (20:16 -0500)]
manager: Add <see-also> tags to relate interrelated events/actions together

Change-Id: Idbac539205aa732bf786c4f765577d8e9ff28ba4

3 years agomanager: Add <see-also> tags to relate Bridge related events,actions, and apps
Matt Jordan [Sun, 14 Aug 2016 01:15:58 +0000 (20:15 -0500)]
manager: Add <see-also> tags to relate Bridge related events,actions, and apps

Change-Id: I67e6b79fa3102e494b5fe6cc7510472249080e85

3 years agomanager: Add <see-also> tags to relate AoC events and actions
Matt Jordan [Sun, 14 Aug 2016 01:14:50 +0000 (20:14 -0500)]
manager: Add <see-also> tags to relate AoC events and actions

Change-Id: Iea89a36222712148c1775c05ed0ad1049d67a70e

3 years agomanager: Add <see-also> tags to relate UserEvent actions/apps/events
Matt Jordan [Sun, 14 Aug 2016 01:13:53 +0000 (20:13 -0500)]
manager: Add <see-also> tags to relate UserEvent actions/apps/events

Change-Id: I80f8a981f62f50e74609c69c49edcaca6c95efa4

3 years agores_agi: Improve documentation
Matt Jordan [Fri, 12 Aug 2016 20:53:52 +0000 (15:53 -0500)]
res_agi: Improve documentation

* Groups of AGI commands that have similar functionality now reference
  each other, and all reference the AGI application for ease of wiki
  reference.

* The documentation for the AGI application has been improved, in
  particular noting the various AGI types and how they are invoked.

* A warning message has been added to DeadAGI, noting that it is
  deprecated.

Change-Id: I479ccdee8a7393f01b18692c3d4ab7e6bdd1875d

3 years agomanager: Add <see-also> links between related events
Matt Jordan [Fri, 12 Aug 2016 18:53:41 +0000 (13:53 -0500)]
manager: Add <see-also> links between related events

This patch adds some see-also references between related AMI events. It
focuses primarily on those events that are guaranteed to come in pairs,
such as DTMFBegin/DTMFEnd, as well as those that occur during the life
cycle of an Asterisk channel, such as Newchannel/Hangup.

Change-Id: Iaab600477052018d0f8c03d0c624c0856e9ff1f3

3 years agofunc_channel: Reorganize documentation
Matt Jordan [Fri, 12 Aug 2016 16:15:38 +0000 (11:15 -0500)]
func_channel: Reorganize documentation

* Following the example of the PJSIP channel driver, the channel
  technology specific documentation has been moved to the respective
  channel drivers that provide that functionality. This has the benefit
  of locating the documentation of items with those modules that provide
  it.

* Examples of using the CHANNEL function for both standard items as well
  as for PJSIP have been added.

* The 'max_forwards' standard item has been documented.

Change-Id: Ifaa79a232c8ac99cf8da6ef6cc7815d398b1b79b

3 years agomanager: Clarify that dialplan manipulation actions are under system class.
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

3 years agoMerge "res_pjsip: Fail global load if debug or default_from_user are empty"
Joshua Colp [Fri, 12 Aug 2016 22:38:14 +0000 (17:38 -0500)]
Merge "res_pjsip:  Fail global load if debug or default_from_user are empty"

3 years agoMerge "res_pjsip_caller_id: Copy header name to short header name"
zuul [Fri, 12 Aug 2016 21:08:45 +0000 (16:08 -0500)]
Merge "res_pjsip_caller_id:  Copy header name to short header name"

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

3 years agoMerge "location.c: Misc fixes and cleanups."
Joshua Colp [Fri, 12 Aug 2016 17:08:57 +0000 (12:08 -0500)]
Merge "location.c: Misc fixes and cleanups."

3 years agoMerge "app_queue: Prevent crash when a call is forwarded to an invalid location"
Joshua Colp [Fri, 12 Aug 2016 15:50:34 +0000 (10:50 -0500)]
Merge "app_queue: Prevent crash when a call is forwarded to an invalid location"

3 years agoMerge "taskprocessor.c: Tweak high water checks."
Joshua Colp [Fri, 12 Aug 2016 09:47:51 +0000 (04:47 -0500)]
Merge "taskprocessor.c: Tweak high water checks."

3 years agoMerge "res_pjsip res_pjsip_mwi: Misc fixes and cleanups."
Joshua Colp [Fri, 12 Aug 2016 09:46:10 +0000 (04:46 -0500)]
Merge "res_pjsip res_pjsip_mwi: Misc fixes and cleanups."

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

3 years agoMerge "alembic: add auth_username to endpoint's identify_by enum"
zuul [Fri, 12 Aug 2016 04:58:48 +0000 (23:58 -0500)]
Merge "alembic: add auth_username to endpoint's identify_by enum"

3 years agoMerge "res_pjsip: Make aor named lock a mutex."
zuul [Fri, 12 Aug 2016 04:27:15 +0000 (23:27 -0500)]
Merge "res_pjsip: Make aor named lock a mutex."

3 years agoRun mandatory cleanup when startup fails.
Corey Farrell [Fri, 12 Aug 2016 03:12:32 +0000 (23:12 -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

3 years agoMerge "res_odbc: Show only when there a fail attempt of connection in CLI"
zuul [Fri, 12 Aug 2016 02:04:35 +0000 (21:04 -0500)]
Merge "res_odbc: Show only when there a fail attempt of connection in CLI"

3 years agoMerge "cdr_adaptive_odbc: Fix DNSs mixed config quote quoted_identifiers"
Joshua Colp [Thu, 11 Aug 2016 23:24:10 +0000 (18:24 -0500)]
Merge "cdr_adaptive_odbc: Fix DNSs mixed config quote quoted_identifiers"

3 years agoMerge "autohints: Update CHANGES and extensions.conf.sample"
Joshua Colp [Thu, 11 Aug 2016 21:10:54 +0000 (16:10 -0500)]
Merge "autohints:  Update CHANGES and extensions.conf.sample"

3 years agoMerge "Fixed compile flags for non-module libs"
Joshua Colp [Thu, 11 Aug 2016 21:09:59 +0000 (16:09 -0500)]
Merge "Fixed compile flags for non-module libs"

3 years agores_pjsip_caller_id: Copy header name to short header name
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

3 years agoapp_queue: Prevent crash when a call is forwarded to an invalid location
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

3 years agoMerge "res_resolver_unbound: Allow compilation with libunbound version < 1.5"
zuul [Thu, 11 Aug 2016 18:49:45 +0000 (13:49 -0500)]
Merge "res_resolver_unbound:  Allow compilation with libunbound version < 1.5"

3 years agores_pjsip: Fail global load if debug or default_from_user are empty
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

3 years agores_pjsip res_pjsip_mwi: Misc fixes and cleanups.
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

3 years agolocation.c: Misc fixes and cleanups.
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

3 years agoautohints: Update CHANGES and extensions.conf.sample
George Joseph [Thu, 11 Aug 2016 17:01:33 +0000 (11:01 -0600)]
autohints:  Update CHANGES and extensions.conf.sample

Make it clear that we're talking about device state hints and add
an entry to the sample config.

Change-Id: Iaef58ffb960191a21b713e8e0b51ce1fcd47e433

3 years agotaskprocessor.c: Tweak high water checks.
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

3 years agores_pjsip: Make aor named lock a mutex.
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

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

Change-Id: I932ab2cea845e534d9ff318035b6de39972d3b28