]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
9 years agochan_sip: Fix crash involving the bogus peer during sip reload. 65/1765/2
Richard Mudgett [Fri, 4 Dec 2015 21:36:45 +0000 (15:36 -0600)] 
chan_sip: Fix crash involving the bogus peer during sip reload.

A crash happens sometimes when performing a CLI "sip reload".  The bogus
peer gets refreshed while it is in use by a new call which can cause the
crash.

* Protected the global bogus peer object with an ao2 global object
container.

ASTERISK-25610 #close

Change-Id: I5b528c742195681abcf713c6e1011ea65354eeed

9 years agoMerge "res_pjsip/contacts/statsd: Make contact lifecycle events more consistent...
Joshua Colp [Mon, 7 Dec 2015 13:51:28 +0000 (07:51 -0600)] 
Merge "res_pjsip/contacts/statsd:  Make contact lifecycle events more consistent" into 13

9 years agoRevert "bridges/bridge_t38: Add a bridging module for managing T.38 state" 70/1770/1
Matt Jordan [Sun, 6 Dec 2015 22:32:32 +0000 (16:32 -0600)] 
Revert "bridges/bridge_t38: Add a bridging module for managing T.38 state"

This reverts commit 6614babea27fbafbe11820ea03737dd5c4f9ecec.

Unfortunately, using a bridge to manage T.38 state will cause severe deadlocks
in core_unreal/chan_local. Local channels attempt to reach across both their
peer and the peer's bridge to inspect T.38 state. Given the propensity of
Local channel chains, managing the locking situation in such a scenario is
practically infeasible.

Change-Id: Ic687397ffea08dfb899345a443bd990ec3d0416a

9 years agores_pjsip/contacts/statsd: Make contact lifecycle events more consistent 67/1767/3
George Joseph [Fri, 4 Dec 2015 22:23:21 +0000 (15:23 -0700)] 
res_pjsip/contacts/statsd:  Make contact lifecycle events more consistent

It will never be perfect or even pretty, mostly because of the differences
between static and dynamic contacts.

Created:

Can't use the contact or contact_status alloc functions
because the objects come and go regardless of the actual state.

Can't use the contact_apply_handler, ast_sip_location_add_contact or
a sorcery created handler because they only get called for dynamic
contacts.  Similarly, permanent_uri_handler only gets called for
static contacts.

So, Matt had it right. :)  ast_res_pjsip_find_or_create_contact_status is
the only place it can go and not have duplicated code.  Both
permanent_uri_handler and contact_apply_handler call find_or_create.

Removed:

Can't use the destructors for the same reason as above.  The only
place to put this is in persistent_endpoint_contact_deleted_observer
which I believe is the "correct" place but even that will handle only
dynamic contacts.  This doesn't called on shutdown however.  There is
no hook to use for static contacts that may be removed because of a
config change while asterisk is in operation.

I moved the cleanup of contact_status from ast_sip_location_delete_contact
to the handler as well.

Status Change and RTT:

Although they worked fine where they were (in update_contact_status) I
moved them to persistent_endpoint_contact_status_observer to make it
more consistent with removed.  There was logic there already to detect
a state change.

Finally, fixed a nit in permanent_uri_handler rmudgett reported
eralier.

ASTERISK-25608 #close

Change-Id: I4b56e7dfc3be3baaaf6f1eac5b2068a0b79e357d
Reported-by: George Joseph
Tested-by: George Joseph
9 years agoMerge "res_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8...
Matt Jordan [Fri, 4 Dec 2015 17:34:12 +0000 (11:34 -0600)] 
Merge "res_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8." into 13

9 years agoMerge "res_format_attr_opus: Update to latest RFC 7587." into 13
Matt Jordan [Fri, 4 Dec 2015 17:34:07 +0000 (11:34 -0600)] 
Merge "res_format_attr_opus: Update to latest RFC 7587." into 13

9 years agoMerge "bridges/bridge_t38: Add a bridging module for managing T.38 state" into 13
Matt Jordan [Fri, 4 Dec 2015 14:58:00 +0000 (08:58 -0600)] 
Merge "bridges/bridge_t38: Add a bridging module for managing T.38 state" into 13

9 years agores_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8. 76/1676/4
Alexander Traud [Sat, 21 Nov 2015 12:02:15 +0000 (13:02 +0100)] 
res_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8.

ASTERISK-25584 #close

Change-Id: Iae00071b4ff1ae76f24995aeac4d00284fd14f91

9 years agores_format_attr_opus: Update to latest RFC 7587. 74/1674/5
Alexander Traud [Sat, 21 Nov 2015 11:21:05 +0000 (12:21 +0100)] 
res_format_attr_opus: Update to latest RFC 7587.

Beside that, the format-attribute module sends only non-default values in the
line fmtp, now. This avoids unnecessary overhead in SDP messages. Furthermore,
previously the parameter stereo was not parsed when being the first parameter.

ASTERISK-25583 #close

Change-Id: Iae85ba3e5960bfd5d51cf65bcffad00dd4875a73

9 years agoFix crash in audiohook translate to slin 59/1759/1
Jonathan Rose [Wed, 2 Dec 2015 20:11:08 +0000 (14:11 -0600)] 
Fix crash in audiohook translate to slin

This patch fixes a crash which would occur when an audiohook was
applied to a channel using an audio codec that could not be translated
to signed linear (such as when using pass-through codecs like OPUS or
when the codec translator module for the format in use is not loaded).

ASTERISK-25498 #close
Reported by: Ben Langfeld

Change-Id: Ib6ea7373fcc22e537cad373996136636201f4384

9 years agoMerge "res_pjsip: Use a MD5 hash for static Contact IDs" into 13
Joshua Colp [Thu, 3 Dec 2015 21:51:45 +0000 (15:51 -0600)] 
Merge "res_pjsip: Use a MD5 hash for static Contact IDs" into 13

9 years agoMerge "res_pjsip: Update logging to show contact->uri in messages" into 13
Joshua Colp [Thu, 3 Dec 2015 18:39:08 +0000 (12:39 -0600)] 
Merge "res_pjsip:  Update logging to show contact->uri in messages" into 13

9 years agoMerge "codec_resample: Increase buffer for Opus Codec." into 13
Joshua Colp [Thu, 3 Dec 2015 18:38:07 +0000 (12:38 -0600)] 
Merge "codec_resample: Increase buffer for Opus Codec." into 13

9 years agores_pjsip: Use a MD5 hash for static Contact IDs 56/1756/1
George Joseph [Thu, 3 Dec 2015 18:07:49 +0000 (11:07 -0700)] 
res_pjsip: Use a MD5 hash for static Contact IDs

When 90d9a70789 was merged, it mostly tested dynamic contacts created as
a result of registering a PJSIP endpoint. Contacts generated in this
fashion typically have a long alphanumeric string as their object identifier,
which maps reasonably well for StatsD. Unfortunately, this doesn't work in the
general case. StatsD treats both '.' and ':' characters as special characters.
In particular, having a ':' appear in the middle of a StatsD metric will
result in the metric being rejected.

This causes some obvious issues with SIP URIs.

The StatsD API should not be responsible for escaping the metric name passed
to it. The metric is treated as a single long string, and it would be
challenging to know what to escape in the string passed to the function.
Likewise, we don't want to escape the metric in PJSIP, as that involves
overhead that is wasted when either res_statsd isn't loaded or enabled.

This patch takes an alternative approach. The Contact ID has been changed
to be "aor@@uri_hash" instead of "aor@@uri". This (a) won't contain any of the
aforementioned special characters, (b) can be done on Contact creation,
which has minimal impact on run-time performance, and (c) also conforms to an
earlier commit that changed the ID for dynamic contacts.

The downside of this is that StatsD users will have to map SHA1 hashes back to
the Contacts that are emitting the statistics. To that end, the CLI commands
have been updated to include the first 10 characters of the MD5 hash, which
should be enough to match what is shown in Graphite (or some other StatsD
backend).

ASTERISK-25595 #close

Change-Id: Ic674a3307280365b4a45864a3571c295b48a01e2
Reported-by: Matt Jordan
Tested-by: George Joseph
9 years agoMerge "res_sorcery_memory_cache.c: Fix off nominal ref leak." into 13
Joshua Colp [Thu, 3 Dec 2015 11:51:16 +0000 (05:51 -0600)] 
Merge "res_sorcery_memory_cache.c: Fix off nominal ref leak." into 13

9 years agoMerge "sched.c: Make not return a sched id of 0." into 13
Joshua Colp [Thu, 3 Dec 2015 11:50:42 +0000 (05:50 -0600)] 
Merge "sched.c: Make not return a sched id of 0." into 13

9 years agoMerge topic 'ASTERISK-25476' into 13
Joshua Colp [Thu, 3 Dec 2015 11:50:04 +0000 (05:50 -0600)] 
Merge topic 'ASTERISK-25476' into 13

* changes:
  Audit improper usage of scheduler exposed by 5c713fdf18f. (v13 additions)
  Audit improper usage of scheduler exposed by 5c713fdf18f.

9 years agores_pjsip: Update logging to show contact->uri in messages 31/1731/12
George Joseph [Tue, 1 Dec 2015 04:19:18 +0000 (21:19 -0700)] 
res_pjsip:  Update logging to show contact->uri in messages

An earlier commit changed the id of dynamic contacts to contain
a hash instead of the uri.  This patch updates status change
logging to show the aor/uri instead of the id.  This required
adding the aor id to contact and contact_status and adding
uri to contact_status.  The aor id gets added to contact and
contact_status in their allocators and the uri gets added to
contact_status in pjsip_options when the contact_status is
created or updated.

ASTERISK-25598 #close

Reported-by: George Joseph
Tested-by: George Joseph
Change-Id: I56cbec1d2ddbe8461367dd8b6da8a6f47f6fe511

9 years agoUnset BRIDGEPEER when leaving a bridge 52/1752/1
Jonathan Rose [Tue, 1 Dec 2015 22:11:07 +0000 (16:11 -0600)] 
Unset BRIDGEPEER when leaving a bridge

Currently if a channel is transferred out of a bridge, the BRIDGEPEER
variable (also BRIDGEPVTCALLID) remain set even once the channel is
out of the bridge. This patch removes these variables when leaving
the bridge.

ASTERISK-25600 #close
Reported by: Mark Michelson

Change-Id: I753ead2fffbfc65427ed4e9244c7066610e546da

9 years agores_sorcery_memory_cache.c: Fix off nominal ref leak. 44/1744/2
Richard Mudgett [Mon, 30 Nov 2015 20:22:55 +0000 (14:22 -0600)] 
res_sorcery_memory_cache.c: Fix off nominal ref leak.

Change-Id: If83d63cf11cbc6df9b15251848b01feb570ade49

9 years agosched.c: Make not return a sched id of 0. 43/1743/2
Richard Mudgett [Mon, 30 Nov 2015 22:42:47 +0000 (16:42 -0600)] 
sched.c: Make not return a sched id of 0.

According to the API doxygen a sched ID of 0 is valid.  Unfortunately, 0
was never returned historically and several users incorrectly coded usage
of the returned sched ID assuming that 0 was invalid.

ASTERISK-25476

Change-Id: Ib19c7ebb44ec9fd393ef6646dea806d4f34e3a20

9 years agoAudit improper usage of scheduler exposed by 5c713fdf18f. (v13 additions) 42/1742/2
Richard Mudgett [Wed, 25 Nov 2015 18:23:47 +0000 (12:23 -0600)] 
Audit improper usage of scheduler exposed by 5c713fdf18f. (v13 additions)

chan_sip.c:
* Initialize mwi subscription scheduler ids earlier because of ASTOBJ to
ao2 conversion.

* Initialize register scheduler ids earlier because of ASTOBJ to ao2
conversion.

chan_skinny.c:
* Fix more scheduler usage for the valid 0 id value.

ASTERISK-25476

Change-Id: If9f0e5d99638b2f9d102d1ebc9c5a14b2d706e95

9 years agoAudit improper usage of scheduler exposed by 5c713fdf18f. 41/1741/2
Richard Mudgett [Tue, 24 Nov 2015 18:44:53 +0000 (12:44 -0600)] 
Audit improper usage of scheduler exposed by 5c713fdf18f.

channels/chan_iax2.c:
* Initialize struct chan_iax2_pvt scheduler ids earlier because of
iax2_destroy_helper().

channels/chan_sip.c:
channels/sip/config_parser.c:
* Fix initialization of scheduler id struct members.  Some off nominal
paths had 0 as a scheduler id to be destroyed when it was never started.

chan_skinny.c:
* Fix some scheduler id comparisons that excluded the valid 0 id.

channel.c:
* Fix channel initialization of the video stream scheduler id.

pbx_dundi.c:
* Fix channel initialization of the packet retransmission scheduler id.

ASTERISK-25476

Change-Id: I07a3449f728f671d326a22fcbd071f150ba2e8c8

9 years agocodec_resample: Increase buffer for Opus Codec. 29/1729/1
Alexander Traud [Tue, 1 Dec 2015 13:55:13 +0000 (14:55 +0100)] 
codec_resample: Increase buffer for Opus Codec.

ASTERISK-25599 #close

Change-Id: I1f88a88c59fb4e1e62bbdbb100c7152d48e73f10

9 years agobridges/bridge_t38: Add a bridging module for managing T.38 state 25/1725/4
Matt Jordan [Sat, 28 Nov 2015 14:46:02 +0000 (08:46 -0600)] 
bridges/bridge_t38: Add a bridging module for managing T.38 state

When 4875e5ac32 was merged, it fixed several issues with a direct media bridge
transitioning to handling a T.38 fax. However, it uncovered a race condition
caused by the bridging core. When a channel involved in a T.38 fax leaves a
bridge, the frame queued by the channel driver that should inform the far side
that it is no longer in a T.38 fax may not make it across the bridge. The
bridging framework is *extremely* aggressive in tearing down the bridge, and
control frames that are currently in flight *may* get dropped.

This patch adds a new module to the bridging framework, bridge_t38. This module
maintains some notion of the T.38 state for the two channels in a bridge. When
the bridge detects that it is being torn down or when one of the two channels
leaves, it informs the respective channel(s) that they should stop faxing. This
ensures that channels switch back to audio if they survive and are ejected out
of a bridge while faxing.

ASTERISK-25582

Change-Id: If5b0bb478eb01c4607c9f4a7fc17c7957d260ea0

9 years agoCHANGES: Fix a typo 23/1723/2
Niklas Larsson [Fri, 27 Nov 2015 13:39:22 +0000 (14:39 +0100)] 
CHANGES: Fix a typo

Change-Id: Iceb3d9bb78140c376174a7bee197dfcf8ef9cda7

9 years agoMerge "fastagi: record file closed after sending result" into 13
Matt Jordan [Thu, 26 Nov 2015 04:19:16 +0000 (22:19 -0600)] 
Merge "fastagi: record file closed after sending result" into 13

9 years agoMerge "main: Slight refactor of main. Improve color situation." into 13
Matt Jordan [Thu, 26 Nov 2015 04:17:43 +0000 (22:17 -0600)] 
Merge "main: Slight refactor of main. Improve color situation." into 13

9 years agofastagi: record file closed after sending result 20/1720/1
Kevin Harwell [Wed, 25 Nov 2015 21:26:35 +0000 (15:26 -0600)] 
fastagi: record file closed after sending result

The fastagi record-file testsuite test sometimes fails reporting an empty
recorded file. This was happening because Asterisk was sending the agi result
notification prior to actually closing the file and the data, being buffered,
had not been written to the file yet when the test attempts to check the file
size.

This patch makes it so the record file stream is closed prior to sending the
agi result notification.

ASTERISK-25593 #close

Change-Id: I6b2b3be3ae37f7c7b18e672c419a89b3b8513cde

9 years agomain: Slight refactor of main. Improve color situation. 13/1713/4
Walter Doekes [Wed, 25 Nov 2015 19:29:42 +0000 (20:29 +0100)] 
main: Slight refactor of main. Improve color situation.

Several issues are addressed here:
- main() is large, and half of it is only used if we're not rasterisk;
  fixed by spliting up the daemon part into a separate function.
- Call ast_term_init from rasterisk as well.
- Remove duplicate code reading/writing asterisk history file.
- Attempt to tackle background color issues and color changes that
  occur. Tested by starting asterisk -c until the colors stopped
  changing at odd locations.

ASTERISK-25585 #close

Change-Id: Ib641a0964c59ef9fe6f59efa8ccb481a9580c52f

9 years agoMerge "Fixed some typos" into 13
Matt Jordan [Wed, 25 Nov 2015 02:23:06 +0000 (20:23 -0600)] 
Merge "Fixed some typos" into 13

9 years agoFixed some typos 07/1707/1
David M. Lee [Tue, 24 Nov 2015 19:54:54 +0000 (13:54 -0600)] 
Fixed some typos

Fixes some minor typos in the CHANGES file, plus an embarrasing typo in
the StatsD API.

Change-Id: I9ca4858c64a4a07d2643b81baa64baebb27a4eb7

9 years agores_pjsip_notify: Fix CLI usage info 05/1705/1
Corey Farrell [Tue, 24 Nov 2015 19:07:12 +0000 (14:07 -0500)] 
res_pjsip_notify: Fix CLI usage info

The usage info for 'pjsip send notify' previously referenced the
chan_sip configuration sip_notify.conf.  Fix this to reference
the correct configuration pjsip_notify.conf.

ASTERISK-25590 #close

Change-Id: I3898271a8e8a8b1db201741e790ebe2c6bf5cdea

9 years agoMerge "translate: Provide translation modules the result of SDP negotiation." into 13
Joshua Colp [Tue, 24 Nov 2015 14:20:52 +0000 (08:20 -0600)] 
Merge "translate: Provide translation modules the result of SDP negotiation." into 13

9 years agoMerge "res_sorcery_realtime.c: Fix crash from NULL sorcery object type." into 13
Mark Michelson [Tue, 24 Nov 2015 00:04:53 +0000 (18:04 -0600)] 
Merge "res_sorcery_realtime.c: Fix crash from NULL sorcery object type." into 13

9 years agores_sorcery_realtime.c: Fix crash from NULL sorcery object type. 99/1699/1
Richard Mudgett [Mon, 23 Nov 2015 20:27:27 +0000 (14:27 -0600)] 
res_sorcery_realtime.c: Fix crash from NULL sorcery object type.

If the sorcery object type is not found a NULL is returned.
Unfortunately, sorcery_realtime_filter_objectset() will crash after
complaining about not finding the object type and saying to expect errors.

* Use ao2_cleanup() instead of ao2_ref() to prevent the crash.

ASTERISK-25165
Reported by Corey Farrell

Change-Id: Ic3b64453ea3058cb68d5c26d97d4fe7b8eea2e97

9 years agoMerge "chan_pjsip: Handle T.38 faxes with direct media bridges" into 13
Matt Jordan [Mon, 23 Nov 2015 19:33:06 +0000 (13:33 -0600)] 
Merge "chan_pjsip: Handle T.38 faxes with direct media bridges" into 13

9 years agoMerge "res/res_endpoint_stats: Add module to emit endpoint StatsD statistics" into 13
Matt Jordan [Mon, 23 Nov 2015 15:26:49 +0000 (09:26 -0600)] 
Merge "res/res_endpoint_stats: Add module to emit endpoint StatsD statistics" into 13

9 years agoMerge "res_pjsip/pjsip_options: Add StatsD statistics for PJSIP contacts" into 13
Matt Jordan [Mon, 23 Nov 2015 15:26:34 +0000 (09:26 -0600)] 
Merge "res_pjsip/pjsip_options: Add StatsD statistics for PJSIP contacts" into 13

9 years agoMerge "res/res_pjsip_outbound_registration: Add registration statistics for StatsD...
Matt Jordan [Mon, 23 Nov 2015 15:26:14 +0000 (09:26 -0600)] 
Merge "res/res_pjsip_outbound_registration: Add registration statistics for StatsD" into 13

9 years agoMerge "res_statsd: Add functions that support variable arguments" into 13
Matt Jordan [Mon, 23 Nov 2015 14:43:29 +0000 (08:43 -0600)] 
Merge "res_statsd: Add functions that support variable arguments" into 13

9 years agoMerge "StatsD: Add res_statsd compatibility" into 13
Matt Jordan [Mon, 23 Nov 2015 04:38:20 +0000 (22:38 -0600)] 
Merge "StatsD: Add res_statsd compatibility" into 13

9 years agochan_pjsip: Handle T.38 faxes with direct media bridges 68/1668/3
Matt Jordan [Sat, 21 Nov 2015 03:08:49 +0000 (21:08 -0600)] 
chan_pjsip: Handle T.38 faxes with direct media bridges

When a channel is in a direct media bridge, a re-INVITE may arrive that forces
Asterisk to re-negotiate the media to a T.38 fax. When this occurs, the bridge
must change its technology to a simple bridge, and re-INVITE the media back
to Asterisk.

Generally, this logic mostly already exists in Asterisk. However, prior to this
patch, there were a few bugs:
(1) The T.38 framehook currently prevents a channel capable of T.38 faxes from
    ever entering into a direct media bridge. This applies even when the only
    media being passed over the channel is audio. This patch fixes this bug
    by having the framehook specify that it defers caring about any frame type.
    This allows the channels to enter into a direct media bridge, which will
    be broken when a re-INVITE is received.
(2) When a re-INVITE is received, nothing instructed the bridging layer to
    re-inspect the allowed bridging technology. This now occurs when either
    a re-INVITE is received from a peer, or when a response is received from
    the far end (that is, when the T.38 state changes to either
    T38_PEER_REINVITE or T38_LOCAL_REINVITE).
(3) chan_pjsip needs to do a small amount of work to prevent a direct media
    bridge from being chosen when a T.38 session is in progress. When a T.38
    session supplement has a t38 datastore - which is added when we detect
    we should start thinking about T.38 on a channel - we now refuse a native
    RTP bridge.
(4) When a BYE request is received, we don't terminate the T.38 session. If
    the other side of a T.38 fax survives the hangup (due to the 'g' flag
    in Dial, for example), we don't currently re-INVITE the media on the
    other channel back to audio. This patch now has res_pjsip_t38 intercept
    BYE requests and inform the far side that the T.38 session is terminated.
    This naturally causes the correct re-INVITEs to be sent.

ASTERISK-25582

Change-Id: Iabd6aa578e633d16e6b9f342091264e4324a79eb

9 years agoMerge "main/cli: Use proper string methods to check existence of context/exten/app...
Joshua Colp [Sat, 21 Nov 2015 17:36:47 +0000 (11:36 -0600)] 
Merge "main/cli: Use proper string methods to check existence of context/exten/app" into 13

9 years agoMerge "res/res_pjsip_t38: Add debug statements" into 13
Joshua Colp [Sat, 21 Nov 2015 17:14:14 +0000 (11:14 -0600)] 
Merge "res/res_pjsip_t38: Add debug statements" into 13

9 years agoMerge "res_pjsip_outbound_registration.c: Be tolerant of short registration timeouts...
Matt Jordan [Sat, 21 Nov 2015 16:57:12 +0000 (10:57 -0600)] 
Merge "res_pjsip_outbound_registration.c: Be tolerant of short registration timeouts." into 13

9 years agores/res_pjsip_t38: Add debug statements 67/1667/2
Matt Jordan [Sat, 21 Nov 2015 03:07:27 +0000 (21:07 -0600)] 
res/res_pjsip_t38: Add debug statements

This patch adds some debug statements to res_pjsip_t38. These statements help
to determine which SDP negotiation callbacks are being executed, and, when
a particular callback exits, why a callback may not have applied its logic
to the local or remote SDP.

Change-Id: I61b3fb9183b7ebbb5da8e9f48b59a5d9d7042d77

9 years agomain/cli: Use proper string methods to check existence of context/exten/app 73/1673/1
Matt Jordan [Thu, 22 Oct 2015 14:44:43 +0000 (09:44 -0500)] 
main/cli: Use proper string methods to check existence of context/exten/app

Because the context, extension, and application are stored in stringfields,
checking for them being NULL doesn't work so well. This patch uses the
appropriate string library call, ast_strlen_zero, to see if there is a value
in the context/exten/app values.

Change-Id: Ie09623bfdf35f5a8d3b23dd596647fe3c97b9a23

9 years agoMerge "res_pjsip_outbound_registration.c: Fix 423 response handling." into 13
Mark Michelson [Fri, 20 Nov 2015 19:03:18 +0000 (13:03 -0600)] 
Merge "res_pjsip_outbound_registration.c: Fix 423 response handling." into 13

9 years agoMerge "res_format_attr_h264: Do not reset string buffer." into 13
Joshua Colp [Fri, 20 Nov 2015 15:20:51 +0000 (09:20 -0600)] 
Merge "res_format_attr_h264: Do not reset string buffer." into 13

9 years agores/res_endpoint_stats: Add module to emit endpoint StatsD statistics 55/1655/2
Matt Jordan [Wed, 18 Nov 2015 15:43:08 +0000 (09:43 -0600)] 
res/res_endpoint_stats: Add module to emit endpoint StatsD statistics

This patch adds a module that emits StatsD statistics about Asterisk
endpoints. This includes:
 * A GUAGE statistic for endpoint states, tracking how many endpoints are in
   a particular state.
 * A GUAGE statistic for each endpoint, counting the number of channels
   currently associated with an endpoint.

ASTERISK-25572

Change-Id: If7e1333c5aeda8d136850b30c2101c0ee1c97305

9 years agores_pjsip/pjsip_options: Add StatsD statistics for PJSIP contacts 54/1654/2
Matt Jordan [Wed, 18 Nov 2015 16:07:09 +0000 (10:07 -0600)] 
res_pjsip/pjsip_options: Add StatsD statistics for PJSIP contacts

This patch adds the ability to send StatsD statistics related to the
state of PJSIP contacts. This includes:
 * A GUAGE statistic measuring the count of contacts in a particular state.
   This measures how many contacts are reachable, unreachable, etc.
 * The RTT time for each contact, if those contacts are qualified. This
   provides StatsD engines useful time-based data about each contact.

ASTERISK-25571

Change-Id: Ib8378d73afedfc622be0643b87c542557e0b332c

9 years agores/res_pjsip_outbound_registration: Add registration statistics for StatsD 53/1653/2
Matt Jordan [Fri, 13 Nov 2015 16:34:03 +0000 (10:34 -0600)] 
res/res_pjsip_outbound_registration: Add registration statistics for StatsD

This patch adds outbound registration statistics for StatsD. This includes
the following:
 * A GUAGE metric for the overall count of outbound registrations.
 * A GUAGE metric for each state an outbound registration can be in. As the
   outbound registrations change state, the overall count of how many
   outbound registrations are in the particular state is changed.

These statistics are particularly useful for systems with a large number of
SIP trunks, and where measuring the change in state of the trunks is useful
for monitoring.

ASTERISK-25571

Change-Id: Iba6ff248f5d1c1e01acbb63e9f0da1901692eb37

9 years agores/res_pjsip_outbound_registration: Apply configuration on object type load 63/1663/1
Matt Jordan [Thu, 19 Nov 2015 15:40:24 +0000 (09:40 -0600)] 
res/res_pjsip_outbound_registration: Apply configuration on object type load

When Asterisk is configured to use a dynamic sorcery backend (such as
res_sorcery_astdb) with 'registration' objects, it will fail to create the
internal state objects associated with the registration objects on module
load. This is due to nothing actually querying for the specific objects
and calling their sorcery apply handler during module load.

This patch fixes that by calling get_registrations in the sorcery observer's
object_type_loaded handler. Doing this causes the sorcery backends to be
asked for the current state of all registration objects, which causes the
apply handler to be called and the internal run-time state to be created.

ASTERISK-25575 #close

Change-Id: Ie9306e797098c6d4da7bcf4a5434a15891508b23

9 years agotranslate: Provide translation modules the result of SDP negotiation. 99/1599/6
Alexander Traud [Wed, 11 Nov 2015 17:51:17 +0000 (18:51 +0100)] 
translate: Provide translation modules the result of SDP negotiation.

Previously, a trancoding module did not have access to the joint but cached
format. Therefore, the module did not have access to the attributes negotiated
via SDP (line fmtp). Now, a translation module receives the joint format.

ASTERISK-25545 #close

Change-Id: Id6878a989b50573298dab115d3371ea369e1a718

9 years agores_format_attr_h264: Do not reset string buffer. 62/1662/1
Alexander Traud [Thu, 19 Nov 2015 07:14:33 +0000 (08:14 +0100)] 
res_format_attr_h264: Do not reset string buffer.

When no parameter is present, Asterisk does not generate the line fmtp, as
expected. However, because a buffer was reset, even rtpmap and fmtp of previous
media codecs got removed. Now, Asterisk does not reset other codecs in case of
no parameter for H.264.

ASTERISK-25573 #close

Change-Id: I93811331f4a28c45418a9e14ee46c0debd47a286

9 years agores_statsd: Add functions that support variable arguments 52/1652/1
Matt Jordan [Wed, 18 Nov 2015 16:05:07 +0000 (10:05 -0600)] 
res_statsd: Add functions that support variable arguments

Often, the metric names of statistics we are generating for StatsD have some
dynamic component to them. This can be the name of a particular resource, or
some internal status label in Asterisk. With the current set of functions,
callers of the statsd API must first build the metric name themselves, then
pass this to the API functions. This results in a large amount of boilerplate
code and usage of either fixed length static buffers or dynamic memory
allocation, neither of which is desireable.

This patch adds two new functions to the StatsD API that support a printf
style format specifier for constructing the metric name. A dynamic string,
allocated in threadstorage, is used to build the metric name. This eases
the burden on users of the StatsD API.

Change-Id: If533c72d1afa26d807508ea48b4d8c7b32f414ea

9 years agores_pjsip_outbound_registration.c: Be tolerant of short registration timeouts. 45/1645/2
Richard Mudgett [Tue, 17 Nov 2015 20:53:19 +0000 (14:53 -0600)] 
res_pjsip_outbound_registration.c: Be tolerant of short registration timeouts.

Change-Id: Ie16f5053ebde0dc6507845393709b4d6a3ea526d

9 years agores_pjsip_outbound_registration.c: Fix 423 response handling. 44/1644/2
Richard Mudgett [Tue, 17 Nov 2015 20:53:57 +0000 (14:53 -0600)] 
res_pjsip_outbound_registration.c: Fix 423 response handling.

Receiving a 423 Interval Too Brief response after authentication for an
outbound registration attempt results in assuming that the registrar has
rejected the registration permanently.  If there are no configured retries
for fatal responses then the outbound registration is stopped for that
endpoint.

For registrations, PJSIP/PJPROJECT intercepts the handling of 423
responses and does not include any authentication in the updated
registration request.  When the updated request is challenged then the
Asterisk code assumes that we were challenged again because the peer
rejected the authentication we sent earlier.

* Made registration challenges keep track of the CSeq number to determine
if the received challenge response was for the request we thought we sent.
If the response's CSeq number differs from the CSeq number we last sent
with authentication then authenticate again because it is a challenge to a
different request.

Change-Id: I81b4bd36d1be095bab606e34b8b44e6302971b09

9 years agoStatsD: Add res_statsd compatibility 51/1651/1
tcambron [Tue, 3 Nov 2015 20:36:43 +0000 (14:36 -0600)] 
StatsD: Add res_statsd compatibility

Added a new api to res_statsd.c to allow it to receive a
character pointer for the value argument. This allows for a
'+' and a '-' to easily be sent with the value.

ASTERISK-25419
Reported By: Ashley Sanders

Change-Id: Id6bb53600943d27347d2bcae26c0bd5643567611

9 years agoMerge "res_pjsip_rfc3326.c: Fix crash when channel goes away." into 13
Matt Jordan [Wed, 18 Nov 2015 13:33:53 +0000 (07:33 -0600)] 
Merge "res_pjsip_rfc3326.c: Fix crash when channel goes away." into 13

9 years agoMerge "format: Register format-attribute module with cached formats." into 13
Matt Jordan [Tue, 17 Nov 2015 20:35:06 +0000 (14:35 -0600)] 
Merge "format: Register format-attribute module with cached formats." into 13

9 years agoMerge "res/res_pjsip: Fix off nominal crash with requests that fail and have a timer...
Matt Jordan [Tue, 17 Nov 2015 18:59:32 +0000 (12:59 -0600)] 
Merge "res/res_pjsip: Fix off nominal crash with requests that fail and have a timer" into 13

9 years agoMerge "Confbridge: Add a user timeout option" into 13
Joshua Colp [Tue, 17 Nov 2015 14:12:15 +0000 (08:12 -0600)] 
Merge "Confbridge: Add a user timeout option" into 13

9 years agores/res_pjsip: Fix off nominal crash with requests that fail and have a timer 39/1639/1
Matt Jordan [Mon, 16 Nov 2015 19:56:49 +0000 (13:56 -0600)] 
res/res_pjsip: Fix off nominal crash with requests that fail and have a timer

When a request is sent using pjsip_endpt_send_request and fails, a condition
exists where the request wrapper, which is an AO2 object, may be de-ref'd
more times than it should. This occurs when the request's callback is called,
and, in the callback, the timer on the PJSIP heap is cancelled. When that
occurs, the request wrapper's lifetime is decremented. When
pjsip_endpt_send_request fails, we unilaterally decrement the lifetime of
the request wrapper again, even though we've already cancelled the reference
associated with the timer.

This patch checks the return result of pj_timer_heap_cancel_if_active before
removing the reference associated with the timer. We now only decrement it
in this case if a timer is cancelled as a result of the function call.

Change-Id: I21332343a1a019c1117076f9bf2df27be2850102

9 years agoConfbridge: Add a user timeout option 29/1629/3
Mark Michelson [Fri, 13 Nov 2015 20:03:35 +0000 (14:03 -0600)] 
Confbridge: Add a user timeout option

This option adds the ability to specify a timeout, in seconds, for a
participant in a ConfBridge. When the user's timeout has been reached,
the user is ejected from the conference with the CONFBRIDGE_RESULT
channel variable set to "TIMEOUT".

The rationale for this change is that there have been times where we
have seen channels get "stuck" in ConfBridge because a network issue
results in a SIP BYE not being received by Asterisk. While these
channels can be hung up manually via CLI/AMI/ARI, adding some sort of
automatic cleanup of the channels is a nice feature to have.

ASTERISK-25549 #close
Reported by Mark Michelson

Change-Id: I2996b6c5e16a3dda27595f8352abad0bda9c2d98

9 years agoapp_queue: (try_calling): mutex 'qe->chan' freed more times than we've locked! 38/1638/1
Alec Davis [Mon, 16 Nov 2015 10:29:25 +0000 (23:29 +1300)] 
app_queue: (try_calling): mutex 'qe->chan' freed more times than we've locked!

commit aae45acbd (Mark Michelson 2015-04-15 10:38:02 -0500 6525)
refer ASTERISK-24958

above commit removed ast_channel_lock(qe->chan);
but failed to remove corresponding ast_channel_unlock(qe->chan);

ASTERISK-25561 #close
Reported Alec Davis

Change-Id: Ie05f4e2d08912606178bf1fded57cc022c7a2e1a

9 years agohashtab: Add NULL check when destroying iterator. 33/1633/1
Joshua Colp [Sat, 14 Nov 2015 13:02:10 +0000 (09:02 -0400)] 
hashtab: Add NULL check when destroying iterator.

The hashtab API is pretty NULL tolerant which has resulted
in remaining callers not doing much checks themselves.
Unfortunately the function to destroy an iterator does not
do a NULL check and will result in a crash if passed NULL.
This change fixes that.

ASTERISK-25552 #close

Change-Id: Ic1bf8eec3639e5a440f1c941d3ae3893ac6ed619

9 years agores_pjsip_rfc3326.c: Fix crash when channel goes away. 25/1625/1
Richard Mudgett [Fri, 13 Nov 2015 20:32:10 +0000 (14:32 -0600)] 
res_pjsip_rfc3326.c: Fix crash when channel goes away.

If an authenticated incoming caller does not respond to our 200 OK INVITE
response with an ACK then PJSIP will hangup the call.  Unfortunately,
there is a chance that the session's channel will go away between one use
of the channel pointer and another when building the BYE request because
the BYE is being built by the monitor thread and not the call's serializer
thread.

* Added a check to ensure that the thread trying to add the Reason header
is the call's serializer thread.  This ensures that the channel will not
go away on us.

Change-Id: I866388d2b97ea2032eaae3f3ab3f1ca6cbd2df89

9 years agoTaskprocessors: Increase high-water mark 23/1623/1
Mark Michelson [Fri, 13 Nov 2015 20:19:35 +0000 (14:19 -0600)] 
Taskprocessors: Increase high-water mark

In practical tests, we have seen certain taskprocessors, specifically
Stasis subscription taskprocessors, cross the recently-added high-water
mark and emit a warning. This high-water mark warning is only intended
to be emitted when things have tanked on the system and things are
heading south quickly. In the practical tests, the Stasis taskprocessors
sometimes had a max depth of 180 tasks in them, and Asterisk wasn't in
any danger at all.

As such, this ups the high-water mark to 500 tasks instead. It also
redefines the SIP threadpool request denial number to be a multiple of
the taskprocessor high-water mark.

Change-Id: Ic8d3e9497452fecd768ac427bb6f58aa616eebce

9 years agoformat: Register format-attribute module with cached formats. 01/1601/3
Alexander Traud [Wed, 11 Nov 2015 17:46:28 +0000 (18:46 +0100)] 
format: Register format-attribute module with cached formats.

In Asterisk 13, cached formats are created before their corresponding format-
attribute module is registered. Cached formats are involved when a local
extension is called. Therefore, ast_format_generate_sdp_fmtp did not work
on local extensions. This change affects the Opus Codec, H.263 (Plus), H.264,
and format-attribute modules provided externally.

ASTERISK-25160 #close

Change-Id: I1ea1f0483e5261e2a050112e4ebdfc22057d1354

9 years agores_pjsip distributor: Don't send 503 response to responses. 17/1617/1
Mark Michelson [Thu, 12 Nov 2015 17:17:51 +0000 (11:17 -0600)] 
res_pjsip distributor: Don't send 503 response to responses.

When the SIP threadpool is backed up with tasks, we send 503 responses
to ensure that we don't try to overload ourselves. The problem is that
we were not insuring that we were not trying to send a 503 to an
incoming SIP response.

This change makes it so that we only send the 503 on incoming requests.

Change-Id: Ie2b418d89c0e453cc6c2b5c7d543651c981e1404

9 years agoMerge "res_pjsip: Deny requests when threadpool queue is backed up." into 13
Joshua Colp [Thu, 12 Nov 2015 16:56:04 +0000 (10:56 -0600)] 
Merge "res_pjsip: Deny requests when threadpool queue is backed up." into 13

9 years agoMerge "format_cap: Don't append the 'none' format when appending all." into 13
Matt Jordan [Thu, 12 Nov 2015 16:54:04 +0000 (10:54 -0600)] 
Merge "format_cap: Don't append the 'none' format when appending all." into 13

9 years agores_pjsip: Deny requests when threadpool queue is backed up. 07/1607/2
Mark Michelson [Wed, 11 Nov 2015 23:11:53 +0000 (17:11 -0600)] 
res_pjsip: Deny requests when threadpool queue is backed up.

We have observed situations where the SIP threadpool may become
deadlocked. However, because incoming traffic is still arriving, the SIP
threadpool's queue can continue to grow, eventually running the system
out of memory.

This change makes it so that incoming traffic gets rejected with a 503
response if the queue is backed up too much.

Change-Id: I4e736d48a2ba79fd1f8056c0dcd330e38e6a3816

9 years agoMerge "Further fixes to improper usage of scheduler" into 13
Joshua Colp [Thu, 12 Nov 2015 13:56:30 +0000 (07:56 -0600)] 
Merge "Further fixes to improper usage of scheduler" into 13

9 years agoformat_cap: Don't append the 'none' format when appending all. 11/1611/3
Joshua Colp [Thu, 12 Nov 2015 12:24:06 +0000 (08:24 -0400)] 
format_cap: Don't append the 'none' format when appending all.

When appending all formats of a type all the codecs are iterated
and added. This operation was incorrectly adding the ast_format_none
format which is special in that it is supposed to be used when no
format is present. It shouldn't be appended.

ASTERISK-25535

Change-Id: I7b00f3bdf4a5f3022e483d6ece602b1e8b12827c

9 years agoFurther fixes to improper usage of scheduler 09/1609/1
Steve Davies [Wed, 11 Nov 2015 10:16:22 +0000 (10:16 +0000)] 
Further fixes to improper usage of scheduler

When ASTERISK-25449 was closed, a number of scheduler issues mentioned in
the comments were missed. These have since beed raised in ASTERISK-25476
and elsewhere.

This patch attempts to collect all of the scheduler issues discovered so
far and address them sensibly.

ASTERISK-25476 #close

Change-Id: I87a77d581e2e0d91d33b4b2fbff80f64a566d05b

9 years agothreadpool: Handle worker thread transitioning to dead when going active. 02/1602/4
Joshua Colp [Wed, 11 Nov 2015 17:04:08 +0000 (13:04 -0400)] 
threadpool: Handle worker thread transitioning to dead when going active.

This change adds handling of dead worker threads when moving them
to be active. When this happens the worker thread is removed from
both the active and idle threads container. If no threads are able
to be moved to active then the pool grows as configured.

A unit test has also been added which thrashes the idle timeout
and thread activation to exploit any race conditions between the
two.

ASTERISK-25546 #close

Change-Id: I6c455f9a40de60d9e86458d447b548fb52ba1143

9 years agoMerge "rtp_engine: Init a format-attribute module to its RFC defaults." into 13
Matt Jordan [Wed, 11 Nov 2015 14:09:51 +0000 (08:09 -0600)] 
Merge "rtp_engine: Init a format-attribute module to its RFC defaults." into 13

9 years agoMerge "res_pjsip_sdp_rtp: Enable Opus to be negotiated via SIP/SDP." into 13
Matt Jordan [Wed, 11 Nov 2015 14:08:51 +0000 (08:08 -0600)] 
Merge "res_pjsip_sdp_rtp: Enable Opus to be negotiated via SIP/SDP." into 13

9 years agoMerge "ast_format_cap: Avoid format creation on module load, use cache instead."...
Matt Jordan [Wed, 11 Nov 2015 14:07:58 +0000 (08:07 -0600)] 
Merge "ast_format_cap: Avoid format creation on module load, use cache instead." into 13

9 years agoMerge "xmldoc: Improve xmldoc wrapping of 'core show ...' output." into 13
Matt Jordan [Wed, 11 Nov 2015 14:06:51 +0000 (08:06 -0600)] 
Merge "xmldoc: Improve xmldoc wrapping of 'core show ...' output." into 13

9 years agortp_engine: Init a format-attribute module to its RFC defaults. 93/1593/2
Alexander Traud [Tue, 10 Nov 2015 15:27:57 +0000 (16:27 +0100)] 
rtp_engine: Init a format-attribute module to its RFC defaults.

Previously, format-attribute modules relied on an existing fmtp line in SDP
negotiation. However, fmtp is optional for several formats like the Opus Codec.
Now, the format-attribute module is called with an empty fmtp, which allows the
module to initialise itself to RFC defaults. Furthermore now, Asterisk is able
to differentiate between internally and externally created formats.

ASTERISK-25537 #close

Change-Id: I28f680cef7fdf51c0969ff8da71548edad72ec52

9 years agoMerge "taskprocessor: Add high water mark warnings" into 13
Joshua Colp [Wed, 11 Nov 2015 13:10:22 +0000 (07:10 -0600)] 
Merge "taskprocessor: Add high water mark warnings" into 13

9 years agoMerge "ast_format_cap_get_names: To display all formats, the buffer was increased...
Joshua Colp [Tue, 10 Nov 2015 20:58:24 +0000 (14:58 -0600)] 
Merge "ast_format_cap_get_names: To display all formats, the buffer was increased." into 13

9 years agoMerge "func_callerid: Document that CALLERID(pres) is available." into 13
Joshua Colp [Tue, 10 Nov 2015 16:04:38 +0000 (10:04 -0600)] 
Merge "func_callerid: Document that CALLERID(pres) is available." into 13

9 years agoast_format_cap_get_names: To display all formats, the buffer was increased. 91/1591/1
Alexander Traud [Mon, 9 Nov 2015 09:04:24 +0000 (10:04 +0100)] 
ast_format_cap_get_names: To display all formats, the buffer was increased.

ASTERISK-25533 #close

Change-Id: Ie1a9d1a6511b3f1a56b93d04475fbf8a4e40010a

9 years agoast_format_cap: Avoid format creation on module load, use cache instead. 90/1590/1
Alexander Traud [Mon, 9 Nov 2015 13:04:43 +0000 (14:04 +0100)] 
ast_format_cap: Avoid format creation on module load, use cache instead.

Since Asterisk 13, formats are immutable and cached. However while loading a
module like chan_sip, some formats were created instead using cached ones.

ASTERISK-25535 #close

Change-Id: I479cdc220d5617c840a98f3389b3bd91e91fbd9b

9 years agofunc_callerid: Document that CALLERID(pres) is available. 83/1583/3
Walter Doekes [Fri, 6 Nov 2015 13:54:59 +0000 (14:54 +0100)] 
func_callerid: Document that CALLERID(pres) is available.

CALLERPRES() says that it's deprecated in favor of CALLERID(num-pres)
and CALLERID(name-pres).  But for channel driver that don't make a
distinction between the two (e.g. SIP), it makes more sense to get/set
both at once.  This change reveals the availability of CALLERID(pres),
CONNECTEDLINE(pres), REDIRECTING(orig-pres), REDIRECTING(to-pres) and
REDIRECTING(from-pres).

ASTERISK-25373 #close

Change-Id: I5614ae4ab7d3bbe9c791c1adf147e10de8698d7a

9 years agodocs: Fix a few typo's in app docs (more then, resourse). 80/1580/2
Walter Doekes [Fri, 6 Nov 2015 13:52:00 +0000 (14:52 +0100)] 
docs: Fix a few typo's in app docs (more then, resourse).

Change-Id: Iba57efadf6c0b822e762c7a001bc89611d98afd7

9 years agoxmldoc: Improve xmldoc wrapping of 'core show ...' output. 77/1577/1
Walter Doekes [Fri, 6 Nov 2015 13:36:40 +0000 (14:36 +0100)] 
xmldoc: Improve xmldoc wrapping of 'core show ...' output.

Previously, the wrapping did both lookahead and lookback, which,
together with color escape sequences, caused some lines to be wrapped
way earlier than other lines.  This led to inconsistent output.

This simplifies the wrapping code and makes it more sane: if maxcolumns
is hit, we simply jump back to the last space and wrap there.

ASTERISK-25527 #close

Change-Id: I56d01c6f9a812642b1b05535c98d4db48d17c957

9 years agores_pjsip_sdp_rtp: Enable Opus to be negotiated via SIP/SDP. 75/1575/1
Alexander Traud [Fri, 6 Nov 2015 12:57:15 +0000 (13:57 +0100)] 
res_pjsip_sdp_rtp: Enable Opus to be negotiated via SIP/SDP.

In SIP/SDP, Opus has two channels always (see RFC 7587 section 7). The actual
amount of channels is negotiated in-band. Therefore now, the Opus codec and its
attribute rtpmap are registered with two channels.

ASTERISK-24779 #close
Reported by: PowerPBX
Tested by: Alexander Traud
patches:
  asterisk-24779.patch submitted by Sean Bright (license #5060)

Change-Id: Ic7ac13cafa1d3450b4fa4987350924b42cbb657b

9 years agotaskprocessor: Add high water mark warnings 72/1572/1
Jonathan Rose [Tue, 3 Nov 2015 22:19:43 +0000 (16:19 -0600)] 
taskprocessor: Add high water mark warnings

If a taskprocessor's queue grows large, this can indicate that there
may be a problem with tasks not leaving the processor or else that
the number of available task processors for a given type of task is
too low. This patch makes it so that if a taskprocessor's task queue
grows above 100 queued tasks that it will emit a warning message.
Warning messages are emitted only once per task processor.

ASTERISK-25518 #close
Reported by: Jonathan Rose

Change-Id: Ib1607c35d18c1d6a0575b3f0e3ff5d932fd6600c

9 years agomain/dial: Protect access to the format_cap structure of the requesting channel 66/1566/1
Matt Jordan [Wed, 4 Nov 2015 20:31:28 +0000 (14:31 -0600)] 
main/dial: Protect access to the format_cap structure of the requesting channel

When a dial attempt is made that involves a requesting channel, we previously
were not:
a) Protecting access to the native format capabilities structure on the
   requesting channel. That is inherently unsafe.
b) Reference bumping the lifetime of the format capabilities structure.

In both cases, something else could sneak in, blow away the format
capabilities, and we'd be holding onto an invalid format_cap structure. When
the newly created channel attempts to construct its format capabilities, things
go poorly.

This patch:
a) Ensures that we get a reference to the native format capabilities while
   the requesting channel is locked
b) Holds a reference to the native format capabilities during the creation
   of the new channel.

ASTERISK-25522 #close

Change-Id: I0bfb7ba8b9711f4158cbeaae96edf9626e88a54f

9 years agoFix cli display of build options. 64/1564/1
Corey Farrell [Sat, 31 Oct 2015 03:57:58 +0000 (23:57 -0400)] 
Fix cli display of build options.

A previous commit reduced the AST_BUILDOPTS compiler define to
only include options that affected ABI.  This included some options
that were previously displayed by cli "core show settings".  This
change corrects the CLI display while still restricting buildopts.h
to ABI effecting options only.

ASTERISK-25434 #close
Reported by: Rusty Newton

Change-Id: Id07af6bedd1d7d325878023e403fbd9d3607e325

9 years agores_pjsip/location: Destroy contact_status objects on contact deletion 57/1557/2
Matt Jordan [Tue, 3 Nov 2015 17:15:09 +0000 (11:15 -0600)] 
res_pjsip/location: Destroy contact_status objects on contact deletion

The contact_status Sorcery objects are currently not destroyed when a contact
is deleted. This causes the contact's last known RTT/status to be 'sticky'
when the contact itself may no longer exist. This patch causes the
contact_status objects associated with both dynamic and static contacts to
be destroyed if the AoR holding those contacts is also destroyed (or via
other paths where a contact may be deleted.)

Change-Id: I7feec8b9278cac3c5263a4c0483f4a0f3b62426e

9 years agoMerge "pjsip_configuration: On delete, remove the persistent version of an endpoint...
Matt Jordan [Wed, 4 Nov 2015 13:44:12 +0000 (07:44 -0600)] 
Merge "pjsip_configuration: On delete, remove the persistent version of an endpoint" into 13

9 years agoMerge "main/stasis_endpoints: Fix ContactStatusChange JSON for roundtrip_usec field...
Matt Jordan [Tue, 3 Nov 2015 21:38:10 +0000 (15:38 -0600)] 
Merge "main/stasis_endpoints: Fix ContactStatusChange JSON for roundtrip_usec field" into 13

9 years agopjsip_configuration: On delete, remove the persistent version of an endpoint 56/1556/2
Matt Jordan [Tue, 3 Nov 2015 16:58:47 +0000 (10:58 -0600)] 
pjsip_configuration: On delete, remove the persistent version of an endpoint

When an endpoint is deleted (such as through an API), the persistent endpoint
currently continues to lurk around. While this isn't harmful from a memory
consumption perspective - as all persistent endpoints are reclaimed on
shutdown - it does cause Stasis endpoint related operations to continue
to believe that the endpoint may or may not exist.

This patch causes the persistent endpoint related to a PJSIP endpoint to be
destroyed if the PJSIP endpoint is deleted.

Change-Id: I85ac707b4d5e6aad882ac275b0c2e2154affa5bb