asterisk/asterisk.git
6 years agoAdd channel locking for channel snapshot creation.
Mark Michelson [Tue, 3 Dec 2013 17:07:29 +0000 (17:07 +0000)]
Add channel locking for channel snapshot creation.

This adds channel locks around calls to create channel snapshots as well
as other functions which operate on a channel and then end up
creating a channel snapshot. Functions that expect the channel to be
locked prior to being called have had their documentation updated to
indicate such.
........

Merged revisions 403311 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403314 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agomedia_index: Make media indexing tolerable of bad symlinks.
Joshua Colp [Tue, 3 Dec 2013 16:39:13 +0000 (16:39 +0000)]
media_index: Make media indexing tolerable of bad symlinks.

Media indexing will now skip over files and directories that stat
will not return information about. This can occur under normal
conditions when a symbolic link points to a location that no longer
exists.
........

Merged revisions 403312 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403313 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoCheck and reject non-digits e164 values on peers and general sections in ooh323.conf
Alexandr Anikin [Mon, 2 Dec 2013 18:12:57 +0000 (18:12 +0000)]
Check and reject non-digits e164 values on peers and general sections in ooh323.conf
Regenerate e164 endpoint list on reload ooh323
(issue ASTERISK-22901)
Reported by: Cyril CONSTANTIN
Patches:
ASTERISK-22901.patch
........

Merged revisions 403288 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 403290 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403292 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip_session: Apply fromuser and fromdomain to all requests as documented.
Joshua Colp [Sun, 1 Dec 2013 21:13:20 +0000 (21:13 +0000)]
res_pjsip_session: Apply fromuser and fromdomain to all requests as documented.
........

Merged revisions 403271 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403272 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip_t38: Add the framehook to the channel only on first INVITE.
Joshua Colp [Sun, 1 Dec 2013 20:04:55 +0000 (20:04 +0000)]
res_pjsip_t38: Add the framehook to the channel only on first INVITE.

The check for determining whether the T.38 framehook should be added to
the channel or not has now been changed to guarantee adding only occurs
on the first incoming or outgoing INVITE.
........

Merged revisions 403258 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403259 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip_transport_websocket: Fix security events and simplify implementation.
Joshua Colp [Sun, 1 Dec 2013 19:58:08 +0000 (19:58 +0000)]
res_pjsip_transport_websocket: Fix security events and simplify implementation.

Transport type determination for security events has been simplified to use
the type present on the message itself instead of searching through configured
transports to find the transport used.

The actual WebSocket transport has also been simplified. It now leverages the
existing PJSIP transport manager for finding the active WebSocket transport
for outgoing messages. This removes the need for res_pjsip_transport_websocket
to store a mapping itself.

(closes issue ASTERISK-22897)
Reported by: Max E. Reyes Vera J.

Review: https://reviewboard.asterisk.org/r/3036/
........

Merged revisions 403256 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403257 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_ari: Add Recording events to the validator.
Joshua Colp [Sat, 30 Nov 2013 14:12:50 +0000 (14:12 +0000)]
res_ari: Add Recording events to the validator.
........

Merged revisions 403240 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403241 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip_sdp_rtp: Don't produce an invalid media stream with no formats.
Joshua Colp [Thu, 28 Nov 2013 02:12:45 +0000 (02:12 +0000)]
res_pjsip_sdp_rtp: Don't produce an invalid media stream with no formats.

Depending on configuration it was possible for a media stream to be
created without any media formats. The produced SDP would fail internal
validation and cause a crash.

The code will now no longer add media streams with no formats to the SDP,
allowing it to pass validation and work.

(closes issue ASTERISK-22858)
Reported by: Anthony Messina
........

Merged revisions 403223 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403224 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip_header_funcs: Don't add headers to re-INVITEs.
Joshua Colp [Thu, 28 Nov 2013 01:56:52 +0000 (01:56 +0000)]
res_pjsip_header_funcs: Don't add headers to re-INVITEs.

When sending a re-INVITE to an endpoint it was possible for received
headers to be added as well (since they are stored for retrieval using
the PJSIP_HEADER dialplan function). This caused a broken (and
potentially large) SIP INVITE to be produced and sent.

This changes the module so it will no longer add headers to
re-INVITEs.

(closes issue ASTERISK-22882)
Reported by: David M. Lee
........

Merged revisions 403221 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403222 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_stasis_playback: Add 'number', 'digits', and 'characters' URI scheme implementations.
Joshua Colp [Thu, 28 Nov 2013 00:54:37 +0000 (00:54 +0000)]
res_stasis_playback: Add 'number', 'digits', and 'characters' URI scheme implementations.

This change adds new URI scheme implementations for playing numbers, digits,
and characters. This is done as part of the normal playback mechanism and can
be used with queueing to create a combined sentence.

Review: https://reviewboard.asterisk.org/r/3028/
........

Merged revisions 403209 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403210 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip_session: Add configurable behavior for redirects.
Joshua Colp [Thu, 28 Nov 2013 00:38:36 +0000 (00:38 +0000)]
res_pjsip_session: Add configurable behavior for redirects.

The action taken when a redirect occurs is now configurable on a
per-endpoint basis. The redirect can either be treated as a redirect
to a local extension, to a URI that is dialed through the Asterisk
core, or to a URI that is dialed within PJSIP itself.

(closes issue ASTERISK-21710)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/2963/
........

Merged revisions 403207 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403208 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoastdb: Tweak some doxygen comments.
Richard Mudgett [Wed, 27 Nov 2013 17:32:29 +0000 (17:32 +0000)]
astdb: Tweak some doxygen comments.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403192 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip: Fix crash when reloading certain configurations.
Joshua Colp [Wed, 27 Nov 2013 16:12:56 +0000 (16:12 +0000)]
res_pjsip: Fix crash when reloading certain configurations.

Certain options available that specify a SIP URI perform validation
on the provided URI using the PJSIP URI parser. This operation
requires that the thread executing it be registered with the PJLIB
library. During reloads this was done on a thread which was NOT
registered with it.

This fixes the problem by creating a task which reloads the
configuration on a PJSIP thread.

(closes issue ASTERISK-22923)
Reported by: Anthony Messina
........

Merged revisions 403179 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403180 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari:Add application/json parameter support
David M. Lee [Wed, 27 Nov 2013 15:48:39 +0000 (15:48 +0000)]
ari:Add application/json parameter support

The patch allows ARI to parse request parameters from an incoming JSON
request body, instead of requiring the request to come in as query
parameters (which is just weird for POST and DELETE) or form
parameters (which is okay, but a bit asymmetric given that all of our
responses are JSON).

For any operation that does _not_ have a parameter defined of type
body (i.e. "paramType": "body" in the API declaration), if a request
provides a request body with a Content type of "application/json", the
provided JSON document is parsed and searched for parameters.

The expected fields in the provided JSON document should match the
query parameters defined for the operation. If the parameter has
'allowMultiple' set, then the field in the JSON document may
optionally be an array of values.

(closes issue ASTERISK-22685)
Review: https://reviewboard.asterisk.org/r/2994/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403177 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip: Update handling of some options to work with new option names.
Joshua Colp [Wed, 27 Nov 2013 15:31:43 +0000 (15:31 +0000)]
res_pjsip: Update handling of some options to work with new option names.

Some options (such as call_group and pickup_group) share the same configuration
handler and decide what logic to use based on the name of the option. These
handlers were not updated to check for the new option names and were treating
the options as invalid.

This change simply updates the handlers with the proper names of the options.

(closes issue ASTERISK-22922)
Reported by: Anthony Messina
........

Merged revisions 403173 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403174 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoFix a configure issue with PJSIP transaction group lock detection.
Joshua Colp [Tue, 26 Nov 2013 22:34:08 +0000 (22:34 +0000)]
Fix a configure issue with PJSIP transaction group lock detection.

The configure check did not use the provided paths for pjproject
if provided when looking for transaction group lock support.
........

Merged revisions 403160 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403161 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoARI: Implement device state API
Kevin Harwell [Sat, 23 Nov 2013 17:48:28 +0000 (17:48 +0000)]
ARI: Implement device state API

Created a data model and implemented functionality for an ARI device state
resource.  The following operations have been added that allow a user to
manipulate an ARI controlled device:

Create/Change the state of an ARI controlled device
PUT    /deviceStates/{deviceName}&{deviceState}

Retrieve all ARI controlled devices
GET    /deviceStates

Retrieve the current state of a device
GET    /deviceStates/{deviceName}

Destroy a device-state controlled by ARI
DELETE /deviceStates/{deviceName}

The ARI controlled device must begin with 'Stasis:'.  An example controlled
device name would be Stasis:Example.  A 'DeviceStateChanged' event has also
been added so that an application can subscribe and receive device change
events.  Any device state, ARI controlled or not, can be subscribed to.

While adding the event, the underlying subscription control mechanism was
refactored so that all current and future resource subscriptions would be
the same.  Each event resource must now register itself in order to be able
to properly handle [un]subscribes.

(issue ASTERISK-22838)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3025/
........

Merged revisions 403134 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403135 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip: AMI commands and events.
Kevin Harwell [Sat, 23 Nov 2013 17:26:57 +0000 (17:26 +0000)]
res_pjsip: AMI commands and events.

Created the following AMI commands and corresponding events for res_pjsip:

PJSIPShowEndpoints - Provides a listing of all pjsip endpoints and a few
                     select attributes on each.
  Events:
    EndpointList - for each endpoint a few attributes.
    EndpointlistComplete - after all endpoints have been listed.

PJSIPShowEndpoint - Provides a detail list of attributes for a specified
                    endpoint.
  Events:
    EndpointDetail - attributes on an endpoint.
    AorDetail - raised for each AOR on an endpoint.
    AuthDetail - raised for each associated inbound and outbound auth
    TransportDetail - transport attributes.
    IdentifyDetail - attributes for the identify object associated with
                     the endpoint.
    EndpointDetailComplete - last event raised after all detail events.

PJSIPShowRegistrationsInbound - Provides a detail listing of all inbound
                                registrations.
  Events:
    InboundRegistrationDetail - inbound registration attributes for each
                                registration.
    InboundRegistrationDetailComplete - raised after all detail records have
                                been listed.

PJSIPShowRegistrationsOutbound  - Provides a detail listing of all outbound
                                  registrations.
  Events:
    OutboundRegistrationDetail - outbound registration attributes for each
                                 registration.
    OutboundRegistrationDetailComplete - raised after all detail records
                                 have been listed.

PJSIPShowSubscriptionsInbound - A detail listing of all inbound subscriptions
                                and their attributes.
  Events:
    SubscriptionDetail - on each subscription detailed attributes
    SubscriptionDetailComplete - raised after all detail records have
                                 been listed.

PJSIPShowSubscriptionsOutbound - A detail listing of all outboundbound
                                subscriptions and their attributes.
  Events:
    SubscriptionDetail - on each subscription detailed attributes
    SubscriptionDetailComplete - raised after all detail records have
                                 been listed.

(issue ASTERISK-22609)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2959/
........

Merged revisions 403131 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403133 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari: Add events for playback and recording.
Joshua Colp [Sat, 23 Nov 2013 12:52:54 +0000 (12:52 +0000)]
ari: Add events for playback and recording.

While there were events defined for playback and recording
these were not actually sent. This change implements the
to_json handlers which produces them.

(closes issue ASTERISK-22710)
Reported by: Jonathan Rose

Review: https://reviewboard.asterisk.org/r/3026/
........

Merged revisions 403119 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403120 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari: Add Snoop operation for spying/whispering on channels.
Joshua Colp [Sat, 23 Nov 2013 12:40:46 +0000 (12:40 +0000)]
ari: Add Snoop operation for spying/whispering on channels.

The Snoop operation can be invoked on a channel to spy or
whisper on it. It returns a channel that any channel operations
can then be invoked on (such as record to do monitoring).

(closes issue ASTERISK-22780)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3003/
........

Merged revisions 403117 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403118 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoapp_voicemail: when forwarding a message, play vm-msgforwarded instead of vm-msgsaved
Rusty Newton [Sat, 23 Nov 2013 00:22:02 +0000 (00:22 +0000)]
app_voicemail: when forwarding a message, play vm-msgforwarded instead of vm-msgsaved

In the last release of sounds, 1.4.25 we added a vm-msgforwarded prompt for various core languages. Now we use that prompt.

(issue ASTERISK-21413)
(closes issue ASTERISK-21413)
Reported by: netwrkr
Tested by: newtonr

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403106 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoMake sure unit tests compile
Kinsey Moore [Fri, 22 Nov 2013 23:57:45 +0000 (23:57 +0000)]
Make sure unit tests compile

This fixes the unit tests that were broken by r403069 and several
functions requiring a new parameter for sanitization of JSON messages
generated from object snapshots.
........

Merged revisions 403094 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403095 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip: convert configuration settings names to snake case some more
Kevin Harwell [Fri, 22 Nov 2013 22:37:30 +0000 (22:37 +0000)]
res_pjsip: convert configuration settings names to snake case some more

Updated the alembic script for pjsip.  Also, the dtls config parsing stuff was
expecting strings with no underscores, so removed the underscores from the
option name before passing it to the parser.
........

Merged revisions 403082 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403083 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoARI: Don't leak implementation details
Kinsey Moore [Fri, 22 Nov 2013 20:10:46 +0000 (20:10 +0000)]
ARI: Don't leak implementation details

This change prevents channels used as implementation details from
leaking out to ARI. It does this by preventing creation of JSON blobs
of channel snapshots created from those channels and sanitizing JSON
blobs of bridge snapshots as they are created. This introduces a
framework for excluding information from output targeted at Stasis
applications on a consumer-by-consumer basis using channel sanitization
callbacks which could be extended to bridges or endpoints if necessary.

This prevents unhelpful error messages from being generated by
ast_json_pack.

This also corrects a bug where BridgeCreated events would not be
created.

(closes issue ASTERISK-22744)
Review: https://reviewboard.asterisk.org/r/2987/
Reported by: David M. Lee
........

Merged revisions 403069 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403070 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip: convert configuration settings names to snake case
Kevin Harwell [Fri, 22 Nov 2013 17:27:55 +0000 (17:27 +0000)]
res_pjsip: convert configuration settings names to snake case

Renamed, where appropriate, the configuration options for chan/res_pjsip to use
snake case (compound words separated by an underscore).  For example, faxdetect
will become fax_detect, recordofffeature will become record_off_feature, etc...

Review: https://reviewboard.asterisk.org/r/3002/
........

Merged revisions 403022 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403051 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agotranslate: Move freeing of frame to after it is used.
Joshua Colp [Fri, 22 Nov 2013 17:12:29 +0000 (17:12 +0000)]
translate: Move freeing of frame to after it is used.

When translating from one format to another it is possible
to inform the translation function that the source frame should
be freed. This was previously done immediately but shortly
afterwards the frame that was freed was accessed and used again.

This change moves code around a bit so that the frame is now
freed after it has been completely used.

(closes issue ASTERISK-22788)
Reported by: Corey Farrell
Patches:
translate-access-after-free-11up.patch uploaded by coreyfarrell (license 5909)
translate-access-after-free-1.8.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 403014 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 403015 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 403016 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403017 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoPickupChan: Add ability to specify channel uniqueids as well as channel names.
Richard Mudgett [Fri, 22 Nov 2013 16:43:21 +0000 (16:43 +0000)]
PickupChan: Add ability to specify channel uniqueids as well as channel names.

* Made PickupChan() search by channel uniqueids if the search could not
find a channel by name.

* Ensured PickupChan() never considers the picking channel for pickup.

* Made PickupChan() option p use a common search by name routine.  The
original search was erroneously case sensitive.

(issue AFS-42)

Review: https://reviewboard.asterisk.org/r/3017/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403013 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoapp_directory: Set variable indicating reason directory exited
Jonathan Rose [Thu, 21 Nov 2013 22:38:31 +0000 (22:38 +0000)]
app_directory: Set variable indicating reason directory exited

By the time the directory application exits, a channel variable
DIRECTORY_RESULT will be set for the channel that invoked it which
can be used to determine the reason for exit. The changes log and
the app_directory documentation contain specific details about
each of the possible values for DIRECTORY_RESULT.

Review: https://reviewboard.asterisk.org/r/3016/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402995 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari: Fix #include to match generated headers for snakeCase resource files
David M. Lee [Thu, 21 Nov 2013 22:36:29 +0000 (22:36 +0000)]
ari: Fix #include to match generated headers for snakeCase resource files
........

Merged revisions 402993 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402994 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari: Fix generators for resources with camelCase names.
David M. Lee [Thu, 21 Nov 2013 21:22:26 +0000 (21:22 +0000)]
ari: Fix generators for resources with camelCase names.

For the new deviceState resource, we need to properly generate
device_state.[ch] files.
........

Merged revisions 402981 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402982 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip_session: Fix memory leak of direct media format capabilities
Matthew Jordan [Thu, 21 Nov 2013 19:22:18 +0000 (19:22 +0000)]
res_pjsip_session: Fix memory leak of direct media format capabilities

The direct media format capabilities are always allocated in
ast_sip_session_alloc and were not freed in the session destructor. Whoops.

(This being the third whoops caught by Scott and Nitesh's valgrind work for
the Asterisk Test Suite. Nifty!)
........

Merged revisions 402968 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402969 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agovoicemail: Fixup some doxygen comments.
Richard Mudgett [Thu, 21 Nov 2013 19:09:45 +0000 (19:09 +0000)]
voicemail: Fixup some doxygen comments.
........

Merged revisions 402956 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402957 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agobucket: Fix scheme ref leak in __ast_bucket_scheme_register().
Richard Mudgett [Thu, 21 Nov 2013 18:11:04 +0000 (18:11 +0000)]
bucket: Fix scheme ref leak in __ast_bucket_scheme_register().
........

Merged revisions 402944 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402945 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip_sdp_rtp: Fix use of uninitialized value in PJSIP
Matthew Jordan [Thu, 21 Nov 2013 17:53:39 +0000 (17:53 +0000)]
res_pjsip_sdp_rtp: Fix use of uninitialized value in PJSIP

In PJMEDIA, pjmedia_sdp_rtpmap_to_attr will attempt to use the string
rtpmap.param regardless of its length value. Simply setting the length to 0
does not prevent the garbage on the stack in rtpmap.param.ptr from being
formatted in a sprintf call. This patch initializes the string to NULL so that
at the very least, something is provided to the function that is predictable.
........

Merged revisions 402941 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402943 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip_mwi: Fix memory leak of MWI subscriptions container
Matthew Jordan [Thu, 21 Nov 2013 17:53:22 +0000 (17:53 +0000)]
res_pjsip_mwi: Fix memory leak of MWI subscriptions container

This patch fixes a reference counting memory leak on the ao2_container
created as part of create_mwi_subscriptions. When we create the container
in this routine, the intent is to hand lifetime ownership over to the global
container unsolicited_mwi. When ao2_global_obj_replace_unref is called, the
reference count on mwi_subscriptions (the container) will be bumped by 1;
however, the function does not decrement the reference count on
mwi_subscriptions when this occurs. This will prevent the container from being
fully disposed of when Asterisk exits (or on any subsequent call to this
operation, such as during a reload).
........

Merged revisions 402940 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402942 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agostasis: Fixed scoping problem with bridge tracking.
David M. Lee [Thu, 21 Nov 2013 15:57:40 +0000 (15:57 +0000)]
stasis: Fixed scoping problem with bridge tracking.
........

Merged revisions 402817 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402929 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari: Add silence generator controls
David M. Lee [Thu, 21 Nov 2013 15:56:34 +0000 (15:56 +0000)]
ari: Add silence generator controls

This patch adds the ability to start a silence generator on a channel
via ARI. This generator will play silence on the channel (avoiding audio
timeouts on the peer) until it is stopped, or some other media operation
is started (like playing media, starting music on hold, etc.).

(closes issue ASTERISK-22514)
Review: https://reviewboard.asterisk.org/r/3019/
........

Merged revisions 402926 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402928 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip_caller_id: Don't overwrite user portion of the From header when fromuser...
Joshua Colp [Tue, 19 Nov 2013 23:17:57 +0000 (23:17 +0000)]
res_pjsip_caller_id: Don't overwrite user portion of the From header when fromuser is set.

The fromuser option is used to explicitly set the user within the From header. The
res_pjsip_caller_id module did not take this setting into account when determining
if the From header could be modified or not.

(closes issue ASTERISK-22866)
Reported by: Anthony Messina
........

Merged revisions 402891 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402892 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip: Add support for building against pjproject with SIP transaction group...
Joshua Colp [Sat, 16 Nov 2013 13:51:04 +0000 (13:51 +0000)]
res_pjsip: Add support for building against pjproject with SIP transaction group lock support.

SIP transaction group lock support has been backported into our pjproject. Since the code
now internally uses a group lock the code is now changed to unlock it if present. Note
that the act of finding the transaction is what actually returns it locked.

For further information about group locks check out the wiki page at:
http://trac.pjsip.org/repos/wiki/Group_Lock

(issue ASTERISK-22818)
Reported by: Matt Jordan
........

Merged revisions 402864 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402865 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoConfbridge: Add option to review the recording similar to announce_join_leave
Jonathan Rose [Fri, 15 Nov 2013 22:38:52 +0000 (22:38 +0000)]
Confbridge: Add option to review the recording similar to announce_join_leave

Review: https://reviewboard.asterisk.org/r/3008/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402854 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoCEL: Fix crash when using CELGenUserEvent
Kinsey Moore [Fri, 15 Nov 2013 14:37:20 +0000 (14:37 +0000)]
CEL: Fix crash when using CELGenUserEvent

This fixes a crash when CELGenUserEvent is called from the dialplan
while CEL is disabled. Currently, CEL does not create its topics and
forwards if it is not enabled and external entities may depend on
these topics blindly since they should always be available. This patch
breaks up route creation and topic/forward creation such that the CEL
topics and forwards will always exist while the router and its
associated routes will be torn down and recreated as necessary.

(closes issue ASTERISK-22799)
Review: https://reviewboard.asterisk.org/r/3010/
Reported by: Matt Jordan
........

Merged revisions 402838 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402839 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoPickup: Pickup() and PickupChan() parameter parsing improvements.
Richard Mudgett [Thu, 14 Nov 2013 21:36:25 +0000 (21:36 +0000)]
Pickup: Pickup() and PickupChan() parameter parsing improvements.

* Made Pickup() and PickupChan() tollerate empty pickup values.  i.e., You
can now have Pickup(&&exten@context).

* Made PickupChan() use the standard option flag parsing code.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402829 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoPickup: Ensure using PICKUPMARK never considers the picking channel.
Richard Mudgett [Thu, 14 Nov 2013 20:53:52 +0000 (20:53 +0000)]
Pickup: Ensure using PICKUPMARK never considers the picking channel.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402820 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoSay: If SAY_DTMF_INTERRUPT is set to an ast_true value, jump on DTMF
Jonathan Rose [Thu, 14 Nov 2013 20:32:45 +0000 (20:32 +0000)]
Say: If SAY_DTMF_INTERRUPT is set to an ast_true value, jump on DTMF

Similar to how background works, if a say application is called with
this variable set to 'true', 'yes', 'on', etc. then using DTMF while
the say action is in progress will result in the channel jumping to
that extension in the dialplan.

Review: https://reviewboard.asterisk.org/r/3011/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402819 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_ari_channels: Add the ability to stop locally generated ringing on a channel.
Joshua Colp [Wed, 13 Nov 2013 23:11:32 +0000 (23:11 +0000)]
res_ari_channels: Add the ability to stop locally generated ringing on a channel.

Using the 'ring' operation it is possible to start locally generated ringback if
the channel is answered. This change adds the ability to stop it by using DELETE.
........

Merged revisions 402804 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402805 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404
Kevin Harwell [Tue, 12 Nov 2013 23:17:45 +0000 (23:17 +0000)]
ari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404

Was returning a 404 on a valid technology with an empty list of endpoints.
Now checking against the channel tech to make sure the tech itself is valid
and not just an empty list of endpoints.

(issue ASTERISK-22803)
Reported by: David M. Lee
........

Merged revisions 402793 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402795 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404
Kevin Harwell [Tue, 12 Nov 2013 22:17:28 +0000 (22:17 +0000)]
ari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404

Implementation listing endpoints by technology returned an empty array if no
matching endpoints were found.  Fixed so a "404 Not Found" will be returned
instead.

(closes issue ASTERISK-22803)
Reported by: David M. Lee
........

Merged revisions 402787 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402788 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoSwitch to a scoped lock to avoid missing unlocks in failure returns.
Mark Michelson [Tue, 12 Nov 2013 19:38:03 +0000 (19:38 +0000)]
Switch to a scoped lock to avoid missing unlocks in failure returns.
........

Merged revisions 402769 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402778 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoMove a NULL check to a place that makes more sense.
Mark Michelson [Tue, 12 Nov 2013 19:08:14 +0000 (19:08 +0000)]
Move a NULL check to a place that makes more sense.

Two variables were being checked for NULLity immediately
after being declared NULL. I moved the NULL check until
after the variables are allocated.

This allows for the "channelvars" option in manager.conf
to work as intended again.
........

Merged revisions 402767 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402768 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agopjsip_messaging, pjsip_header_funcs: Crashes due to NULL pointer dereferences
Kevin Harwell [Tue, 12 Nov 2013 16:49:17 +0000 (16:49 +0000)]
pjsip_messaging, pjsip_header_funcs: Crashes due to NULL pointer dereferences

Both res_pjsip_messaging and res_pjsip_header_funcs were causing asterisk to
crash because they were trying to dereference a NULL pointer.

In the case of res_pjsip_messaging it was attempting to "print" a contact
header that did not exist.  In fact contact headers should not be part of
a SIP MESSAGE, so the offending code was simply removed.

In the case of res_pjsip_header_funcs a null private channel tech was being
passed to the function and then later dereferenced.  Added null checks (and
error logging) to the read/write function handlers to guard against crashing.

(closes issue ASTERISK-22821)
Reported by: Anthony Messina
........

Merged revisions 402757 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402758 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoCELGenUserEvent: Fix error message from ast_json_pack
Kinsey Moore [Tue, 12 Nov 2013 16:34:31 +0000 (16:34 +0000)]
CELGenUserEvent: Fix error message from ast_json_pack

This prevents NULL from being passed into an ast_json_pack call when no
extra information is passed to the application which prevents an error
message about NULL arguments from being generated.
........

Merged revisions 402755 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402756 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoFixed a typ.
David M. Lee [Tue, 12 Nov 2013 15:27:00 +0000 (15:27 +0000)]
Fixed a typ.
........

Merged revisions 402738 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402741 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agochan_dahdi: Fix crash during caller ID read
Kinsey Moore [Tue, 12 Nov 2013 15:03:18 +0000 (15:03 +0000)]
chan_dahdi: Fix crash during caller ID read

Asterisk will sometimes core dump during caller id read on analog
channels due to a negative return value from the read() in
my_get_callerid that slips through as a negative length argument to
callerid_feed() if the errno returned by DAHDI is ELAST. This change
ensures that the negative return is treated properly even when it is
ELAST.

(closes issue ASTERISK-22746)
Reported by: Michael Walton
Patches:
    chan_dahdi_cid_crash_fix.r401410.patch uploaded by Michael Walton (License 6502)
........

Merged revisions 402708 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 402709 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402710 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402711 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoConfbridge: add test events for dynamic menus test
Jonathan Rose [Mon, 11 Nov 2013 20:28:38 +0000 (20:28 +0000)]
Confbridge: add test events for dynamic menus test

Adds a couple of test events for conference menu actions so that it's
easy to discern when those menu actions have been triggered.

(issue ASTERISK-22760)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2999/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402698 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoGet rid of some inaccurate comments.
Mark Michelson [Mon, 11 Nov 2013 19:31:40 +0000 (19:31 +0000)]
Get rid of some inaccurate comments.

I'm doing some unrelated work in app_confbridge and finding
these "invalid pin" comments to be annoying. Get out!
........

Merged revisions 402686 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402687 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402688 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoapp_queue: Honor penalty limits of 0
Kinsey Moore [Mon, 11 Nov 2013 15:37:03 +0000 (15:37 +0000)]
app_queue: Honor penalty limits of 0

In the current app_queue code from 1.8 up to trunk the upper and lower
penalties can be set to 0 but the value is interpreted to be disabled
instead of actually setting limits. This is especially evident if min
and max limits are set to 0 and members with penalties of 0 and 1 are
in the queue since the member with penalty 1 will still receive calls.
This patch adjusts the special disabled value to be INT_MAX instead of
0.

(closes issue ASTERISK-20862)
Review: https://reviewboard.asterisk.org/r/2995/
Reported by: Schmooze Com
........

Merged revisions 402645 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 402646 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402647 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402648 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agochan_sip: keep same local (from) tag for outgoing register requests
Scott Griepentrog [Fri, 8 Nov 2013 23:07:50 +0000 (23:07 +0000)]
chan_sip: keep same local (from) tag for outgoing register requests

For outbound register requests the tag on the From line was
updated every 20 seconds prior to a successful registration
and also once for each registration renewal.  That behavior
can possibly cause the registration to be denied because of
the different tag, and is not aligned with the intention of
RFC 3261 8.1.3.5 "... request constitutes a new transaction
and SHOULD have the same value of the Call-ID, To, and From
of the previous request...".  This updates chan_sip to have
a field to keep the local tag in the registration structure
and use that tag for registration requests where the callid
is also unchanged.

(closes issue ASTERISK-12117)
Reported by: Pawel Pierscionek
Review: https://reviewboard.asterisk.org/r/2988/
........

Merged revisions 402604 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 402605 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402606 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402607 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_stasis.c: Fix locking issues with the app_bridge_moh container.
Richard Mudgett [Fri, 8 Nov 2013 20:37:08 +0000 (20:37 +0000)]
res_stasis.c: Fix locking issues with the app_bridge_moh container.

* Fix unlinking from the app_bridges_moh container in remove_bridge_moh()
without a lock under normal circumstances.

* Made check ast_bridge_set_after_callback() return value in
bridge_moh_create() to handle failure.

* Fixed SCOPED_AO2LOCK() locking over too much scope in
stasis_app_bridge_moh_channel() and stasis_app_bridge_moh_stop().

* Fixed unusual usage of ao2_unlink_flag() in control_unlink().

* Fixed orphaned bridge from off nominal path in
stasis_app_bridge_create().

* Fixed strange construct in stasis_app_unsubscribe().  From a bad merge?

* Made load_module() cleanup on failure.

Review: https://reviewboard.asterisk.org/r/2962/
........

Merged revisions 402593 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402595 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agosecurity_events: Push out security events over AMI events
Jonathan Rose [Fri, 8 Nov 2013 19:33:48 +0000 (19:33 +0000)]
security_events: Push out security events over AMI events

Security Events will now be written to any listener of the new 'security' class

Review: https://reviewboard.asterisk.org/r/2998/
........

Merged revisions 402584 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402585 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoClarify an ambiguous error message.
Mark Michelson [Fri, 8 Nov 2013 19:22:53 +0000 (19:22 +0000)]
Clarify an ambiguous error message.
........

Merged revisions 402582 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402583 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_pjsip: Print a helpful error message if sorcery registration fails
David M. Lee [Fri, 8 Nov 2013 18:53:14 +0000 (18:53 +0000)]
res_pjsip: Print a helpful error message if sorcery registration fails
........

Merged revisions 402570 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402572 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoChanges from make ari-stubs after r402560
David M. Lee [Fri, 8 Nov 2013 18:52:19 +0000 (18:52 +0000)]
Changes from make ari-stubs after r402560
........

Merged revisions 402561 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402571 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoARI playback: Rename ARI Playback to Playbacks
Kevin Harwell [Fri, 8 Nov 2013 17:59:16 +0000 (17:59 +0000)]
ARI playback: Rename ARI Playback to Playbacks

Before playback was the only non plural resource.  It has been renamed to
playbacks for consistency.

(closes issue ASTERISK-22737)
Reported by: Paul Belanger
........

Merged revisions 402560 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402562 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari: Add application/x-www-form-urlencoded parameter support
David M. Lee [Fri, 8 Nov 2013 17:29:53 +0000 (17:29 +0000)]
ari: Add application/x-www-form-urlencoded parameter support

ARI POST calls only accept parameters via the URL's query string.
While this works, it's atypical for HTTP API's in general, and
specifically frowned upon with RESTful API's.

This patch adds parsing for application/x-www-form-urlencoded request
bodies if they are sent in with the request. Any variables parsed this
way are prepended to the variable list supplied by the query string.

(closes issue ASTERISK-22743)
Review: https://reviewboard.asterisk.org/r/2986/
........

Merged revisions 402555 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402557 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoapp_dahdiras: Use waitpid instead of wait4.
Kevin Harwell [Fri, 8 Nov 2013 14:58:13 +0000 (14:58 +0000)]
app_dahdiras: Use waitpid instead of wait4.

Several places in the code were using wait4 while other places were using
waitpid.  This change makes all places use waitpid in order to make things
more consistent and since the 'rusage' object passed in/out of wait4 was
never used.

(closes issue ASTERISK-22557)
Reported by: YvesGael
Patches:
     asterisk-11.5.1-wait4.patch uploaded by hurdman (license 6537)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402546 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoPJSIP: Improve error handling in digest authenticator
Jonathan Rose [Thu, 7 Nov 2013 23:42:31 +0000 (23:42 +0000)]
PJSIP: Improve error handling in digest authenticator

Previously, regardless of whether failure to authenticate was due to
lacking any authentication or actually failing authentication, the
Digest Authenticator would simply return that a challenge was still
needed. It will continue to do that when no authentication information
is in the received SIP digest, but when authentication information
is present and does not pass authentication, that will be treated as
an authentication error. This is to ensure that PJSIP will issue
security events indicated failed auths.
........

Merged revisions 402537 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402538 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari: User better nicknames for ARI operations
David M. Lee [Thu, 7 Nov 2013 21:10:31 +0000 (21:10 +0000)]
ari: User better nicknames for ARI operations

While working on building client libraries from the Swagger API, I
noticed a problem with the nicknames.

    channel.deleteChannel()
    channel.answerChannel()
    channel.muteChannel()

Etc. We put the object name in the nickname (since we were generating C
code), but it makes OO generators redundant.

This patch makes the nicknames more OO friendly. This resulted in a lot
of name changing within the res_ari_*.so modules, but not much else.

There were a couple of other fixed I made in the process.

 * When reversible operations (POST /hold, POST /unhold) were made more
   RESTful (POST /hold, DELETE /unhold), the path for the second operation
   was left in the API declaration. This worked, but really the two
   operations should have been on the same API.
 * The POST /unmute operation had still not been REST-ified.

Review: https://reviewboard.asterisk.org/r/2940/
........

Merged revisions 402528 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402529 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoapp_queue: crash if first agent is "busy"
Kevin Harwell [Wed, 6 Nov 2013 21:58:17 +0000 (21:58 +0000)]
app_queue: crash if first agent is "busy"

If the first agent/member (via CLI "queue show") in a queue is "busy" (dnd,
circuit busy, etc...) and no agents answered then app_queue would crash.
This occurred because while the calling of agent(s) remained valid the channel
on "busy" agent would be set to NULL and then later dereferenced upon a second
"rna" function call.  The original intention of the code is to have only valid
"call attempt" objects (channels != NULL) checked while attempting to call
agent(s).  It does this by building a "call_next" list of valid "call attempt"
objects.  In the case of the "busy" agent subsequent builds of the valid "call
attempt" list would sometimes include (the case mentioned above) an invalid
"call attempt" object.

The fix was to make sure the "call attempt" list was appropriately built on
every iteration.  A NULL sanity check was also added at the original offending
spot of the crash just in case another one slipped by somehow.

(closes issue ASTERISK-22644)
Reported by: Marco Signorini
Review: https://reviewboard.asterisk.org/r/2983/
........

Merged revisions 402517 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402518 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agochan_sip: Use AST_AF* defined constant when calling ast_get_ip
Matthew Jordan [Tue, 5 Nov 2013 21:17:30 +0000 (21:17 +0000)]
chan_sip: Use AST_AF* defined constant when calling ast_get_ip

While the structure passed to ast_get_ip should be set memset to 0, thus
initializing the ss_family member to 0, explicitly setting it to AST_AF_UNSPEC
is more portable.
........

Merged revisions 402507 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402508 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agochan_iax2: Fix incorrect usage of ast_get_ip involving uninitialized struct
Matthew Jordan [Tue, 5 Nov 2013 21:14:42 +0000 (21:14 +0000)]
chan_iax2: Fix incorrect usage of ast_get_ip involving uninitialized struct

This started off as a fix for the failing IAX2 acl_call test in the Asterisk
Test Suite. When inspecting why that test was failing, it became clear that all
attempts to bind to any local loopback address was failing:

[Nov  2 15:56:28] VERBOSE[15787] chan_iax2.c:   == Binding IAX2 to address
                                 127.0.0.1:4569
[Nov  2 15:56:28] DEBUG[15787] netsock2.c: Splitting '127.0.0.1' into...
[Nov  2 15:56:28] DEBUG[15787] netsock2.c: ...host '127.0.0.1' and port ''.
[Nov  2 15:56:28] ERROR[15787] netsock2.c: getaddrinfo("127.0.0.1", "(null)",
                               ...): ai_family not supported
[Nov  2 15:56:28] WARNING[15787] acl.c: Unable to lookup '127.0.0.1'

While there's conceivably other ways for getaddrino to return EAI_FAMILY, the
most common way is if AF_INET, AF_INET6, or AF_UNSPEC is not provided as the
desired family. The culprit was the call to ast_get_ip, defined in acl.h. This
function uses the family from the passed in addr object (which it will also
populate when it returns!) when it eventually calls getaddrinfo.

This patch fixes the use of ast_get_ip that were not specifying the family in
chan_iax2. This prevents uninitialized use of the structure, so that the
addresses resolve correctly.

Review: https://reviewboard.asterisk.org/r/2991
........

Merged revisions 402505 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402506 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agonetsock2: Define AST_AF_* enum constants to their AF_* equivalents
Matthew Jordan [Tue, 5 Nov 2013 21:06:25 +0000 (21:06 +0000)]
netsock2: Define AST_AF_* enum constants to their AF_* equivalents

This patch explicitly defines AST_AF_* enum constants to their sys/socket.h
defined equivalents. It is certainly unclear why these constants actually have
to exist, given that netsock2.h includes sys/socket.h; however, since the code
base is already liberally sprinkled with the usage of AST_AF_* (as well as with
direct calls to AF_*), this will at least keep the semantics consistent between
their usage across systems.
........

Merged revisions 402503 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402504 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agostasis_channels: Don't give preference to ANI info in channel snapshots
Matthew Jordan [Tue, 5 Nov 2013 20:59:39 +0000 (20:59 +0000)]
stasis_channels: Don't give preference to ANI info in channel snapshots

When publishing channel snapshots, we currently compute the caller ID name and
number by giving preference first to ani.{name|number}, then to
id.{name|number}. However, when a channel driver (such as chan_sip) updates the
caller ID, it typically only updates the caller ID stored in id.{name|number}.
This means that we are currently giving preference to stale information.

When looking at the rest of the code base, the only other place where we appear
to use this same logic is in app_amd. Everywhere else, we treat the party
information in ani as being separate to the party information in id.

This patch publishes only the caller ID name and number in the snapshot field
for caller_name and caller_num. Note that the information in ANI is still
available in caller_ani.

Review: https://reviewboard.asterisk.org/r/2992/
........

Merged revisions 402501 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402502 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agochan_sip: notify dialog info ignores presentation indicator in callerid
Kevin Harwell [Mon, 4 Nov 2013 21:02:18 +0000 (21:02 +0000)]
chan_sip: notify dialog info ignores presentation indicator in callerid

The presentation indicator in a callerid (e.g. set by dialplan function
Set(CALLERID(name-pres)= ...)) is not checked when SIP Dialog Info Notifies
are generated during extension monitoring.  Added a check to make sure the
name and/or number presentations on the callee (remote identity) are set to
allow.  If they are restricted then "anonymous" is used instead.

(closes issue AST-1175)
Reported by: Thomas Arimont
Review: https://reviewboard.asterisk.org/r/2976/
........

Merged revisions 402450 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402452 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402453 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agovector: Uppercase API to follow C convention.
Richard Mudgett [Sat, 2 Nov 2013 04:30:49 +0000 (04:30 +0000)]
vector: Uppercase API to follow C convention.

C does not support templates like C++.
........

Merged revisions 402438 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402439 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agovector: Update API to be more flexible.
Richard Mudgett [Sat, 2 Nov 2013 04:12:36 +0000 (04:12 +0000)]
vector: Update API to be more flexible.

Made the vector macro API be more like linked lists.
1) Added a name parameter to ast_vector() to name the vector struct.
2) Made the API take a pointer to the vector struct instead of the struct
itself.
3) Added an element cleanup macro/function parameter when removing an
element from the vector for ast_vector_remove_cmp_unordered() and
ast_vector_remove_elem_unordered().
4) Added ast_vector_get_addr() in case the vector element is not a simple
pointer.

* Converted an inline vector usage in stasis_message_router to use the
vector API.  It needed the API improvements so it could be converted.

* Fixed topic reference leak in router_dtor() when the
stasis_message_router is destroyed.

* Fixed deadlock potential in stasis_forward_all() and
stasis_forward_cancel().  Locking two topics at the same time requires
deadlock avoidance.

* Made internal_stasis_subscribe() tolerant of a NULL topic.

* Made stasis_message_router_add(),
stasis_message_router_add_cache_update(), stasis_message_router_remove(),
and stasis_message_router_remove_cache_update() tolerant of a NULL
message_type.

* Promoted a LOG_DEBUG message to LOG_ERROR as intended in
dispatch_message().

Review: https://reviewboard.asterisk.org/r/2903/
........

Merged revisions 402429 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402430 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoconfbridge: Separate user muting from system muting overrides.
Richard Mudgett [Sat, 2 Nov 2013 03:24:47 +0000 (03:24 +0000)]
confbridge: Separate user muting from system muting overrides.

The system overrides the user muting requests when MOH is playing or a
waitmarked user is waiting for a marked user to join.  System muting
overrides interfere with what the user may wish the muting to be when the
system override ends.

* User muting requests are now independent of the system muting overrides.
The effective muting is now the logical or of the user request and system
override.

* Added a Muted flag to the CLI "confbridge list <conference>" command.

* Added a Muted header to the AMI ConfbridgeList action ConfbridgeList
event.

(closes issue AST-1102)
Reported by: John Bigelow

Review: https://reviewboard.asterisk.org/r/2960/
........

Merged revisions 402425 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402427 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402428 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoconfig: Allow ConfBridge DTMF menus to have '#' as the first digit.
Richard Mudgett [Sat, 2 Nov 2013 01:15:11 +0000 (01:15 +0000)]
config: Allow ConfBridge DTMF menus to have '#' as the first digit.

ConfBridge allows custom DTMF menus to be created in the confbridge.conf
file by assigning a DTMF key sequence to a sequence of actions as follows:

DTMF-sequence = action,action...

Unfortunately, the normal config file processing code interprets an
initial '#' character as starting a directive such as #include.

* Add the ability to escape the first non-blank character in a config line
so the '#' character can be used without triggering the directive
processing code.

(closes issue AFS-2)
(closes issue ASTERISK-22478)
Reported by: Nicolas Tanski
Patches:
      jira_asterisk_22478_v11.patch (license #5621) patch uploaded by rmudgett (modified)

Review: https://reviewboard.asterisk.org/r/2969/
........

Merged revisions 402407 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402416 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402417 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agovoicemail: Simplify callback pointer declarations and add doxygen.
Richard Mudgett [Fri, 1 Nov 2013 23:20:54 +0000 (23:20 +0000)]
voicemail: Simplify callback pointer declarations and add doxygen.

* Typedefed and added doxegen for the voicemail callback functions.

* Simplified the prototypes for ast_install_vm_functions() and
ast_install_vm_test_functions() to use the new function typedefs.

* Simplified the voicemail callback function pointer variable declarations
to use the new function typedefs.
........

Merged revisions 402398 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402406 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoapp_confbridge: Make the CONFBRIDGE function be able to create dynamic menus
Jonathan Rose [Fri, 1 Nov 2013 22:48:14 +0000 (22:48 +0000)]
app_confbridge: Make the CONFBRIDGE function be able to create dynamic menus

Also adds the ability to clear all profile items and makes behavior more
consistent with documentation as when choosing whether to use CONFBRIDGE
datastore profiles or the application arguments to the confbridge application.

(closes issue ASTERISK-22760)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2971/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402397 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoManager: Add equivalent AMI actions for the bridge CLI commands.
Scott Griepentrog [Fri, 1 Nov 2013 21:51:20 +0000 (21:51 +0000)]
Manager: Add equivalent AMI actions for the bridge CLI commands.

Adds the following AMI events, closely following their CLI counterparts:

BridgeDestroy
BridgeKick
BridgeTechnologyList
BridgeTechnologySuspend
BridgeTechnologyUnsuspend

BridgeDestroy kicks an entire bridge, where BridgeKick kicks just one
channel off the bridge. When kicking a channel, specifying the bridge
also (optional) insures it is not removed from the wrong bridge.  The
BridgeTechnology events allow viewing and changing suspension status,
which affects only subsequent not active bridging.

(closes ASTERISK-22356)
Reported by: Richard Mudgett
Review: https://reviewboard.asterisk.org/r/2973/
........

Merged revisions 402387 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402388 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoari wiki docs: add notes about allowMultiple parameters.
David M. Lee [Fri, 1 Nov 2013 16:31:57 +0000 (16:31 +0000)]
ari wiki docs: add notes about allowMultiple parameters.

This patch adds a note to any parameter that has 'allowMultiple' set in
the Swagger documentation.

(closes issue ASTERISK-22704)
........

Merged revisions 402367 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402368 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_ari_channels: Add ring operation, dtmf operation, hangup reasons, and tweak early...
Joshua Colp [Fri, 1 Nov 2013 14:38:21 +0000 (14:38 +0000)]
res_ari_channels: Add ring operation, dtmf operation, hangup reasons, and tweak early media.

The ring operation sends ringing to the specified channel it is invoked on.
The dtmf operation can be used to send DTMF digits to the specified channel
of a specific length with a wait time in between. Finally hangup reasons
allow you to specify why a channel is being hung up (busy, congestion).

Early media behavior has also been tweaked slightly. When playing media to a channel
it will no longer automatically answer. If it has not been answered a progress indication
is sent instead.

(closes issue ASTERISK-22701)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/2916/
........

Merged revisions 402358 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402359 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agochan_sip: Fix RTCP port for SRFLX ICE candidates
Kinsey Moore [Fri, 1 Nov 2013 12:40:40 +0000 (12:40 +0000)]
chan_sip: Fix RTCP port for SRFLX ICE candidates

This corrects one-way audio between Asterisk and Chrome/jssip as a
result of Asterisk inserting the incorrect RTCP port into RTCP SRFLX
ICE candidates. This also exposes an ICE component enumeration to
extract further details from candidates.

(closes issue ASTERISK-21383)
Reported by: Shaun Clark
Review: https://reviewboard.asterisk.org/r/2967/
........

Merged revisions 402345 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402348 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402349 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_ari_channels: Fix a deadlock when originating multiple channels close to eachother.
Joshua Colp [Fri, 1 Nov 2013 12:33:09 +0000 (12:33 +0000)]
res_ari_channels: Fix a deadlock when originating multiple channels close to eachother.

If a Stasis application is specified an implicit subscription is done on the originated
channel. This was previously done with the channel lock held which is dangerous as the
underlying code locks the container and iterates items. This change releases the lock
on the originated channel before subscribing occurs.

(closes issue ASTERISK-22768)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/2979/
........

Merged revisions 402346 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402347 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_stasis: Ensure the channel is always departed from the bridge when it leaves.
Joshua Colp [Fri, 1 Nov 2013 12:13:09 +0000 (12:13 +0000)]
res_stasis: Ensure the channel is always departed from the bridge when it leaves.

This change adds a command to the command queue to explicitly depart the channel
from the bridge when it is told it has left. If the channel has already been departed
or has entered a different bridge this command will become a no-op.

(closes issue ASTERISK-22703)
Reported by: John Bigelow

(closes issue ASTERISK-22634)
Reported by: Kevin Harwell

Review: https://reviewboard.asterisk.org/r/2965/
........

Merged revisions 402336 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402337 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoUpdate the conversion script from sip.conf to pjsip.conf
Mark Michelson [Thu, 31 Oct 2013 22:09:47 +0000 (22:09 +0000)]
Update the conversion script from sip.conf to pjsip.conf

(closes issue ASTERISK-22374)
Reported by Matt Jordan

Review: https://reviewboard.asterisk.org/r/2846
........

Merged revisions 402327 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402328 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agocore/loader: Don't call dlclose in a while loop
Matthew Jordan [Thu, 31 Oct 2013 16:06:14 +0000 (16:06 +0000)]
core/loader: Don't call dlclose in a while loop

For awhile now, we've noticed continuous integration builds hanging on CentOS 6
64-bit build agents. After resolving a number of problems with symbols, strange
locks, and other shenanigans, the problem has persisted. In all cases, gdb
shows the Asterisk process stuck in loader.c on one of the infinite while loops
that calls dlclose repeatedly until success.

The documentation of dlclose states that it returns 0 on success; any other
value on error. It does not state that repeatedly calling it will eventually
clear those errors. Most likely, the repeated calls to dlclose was to force a
close by exhausting the references on the library; however, that will never
succeed if:
(a) There is some fundamental error at work in the loaded library that
    precludes unloading it
(b) Some other loaded module is referencing a symbol in the currently loaded
    module

This results in Asterisk sitting forever.

Since we have matching pairs of dlopen/dlclose, this patch opts to only call
dlclose once, and log out as an ERROR if dlclose fails to return success. If
nothing else, this might help to determine why on the CentOS 6 64-bit build agent
things are not closing successfully.

Review: https://reviewboard.asterisk.org/r/2970
........

Merged revisions 402287 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 402288 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402289 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402290 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agomedix_index: Display errors when library calls fail
Matthew Jordan [Thu, 31 Oct 2013 15:52:32 +0000 (15:52 +0000)]
medix_index: Display errors when library calls fail

Based on feedback from ipengineer in #asterisk, when the media indexer
cannot access a sound file on the system (or otherwise fails) Asterisk
displays a "Cannot frob file" error but fails to tell you why. This is
especially problematic as the media_indexer failing will rpevent Asterisk
from starting, as it is in the core.

We now display the errno error messages so folks can figure out what they've
done wrong.
........

Merged revisions 402285 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402286 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agostasis: add functions embarrassingly missing from r400522
David M. Lee [Thu, 31 Oct 2013 14:45:03 +0000 (14:45 +0000)]
stasis: add functions embarrassingly missing from r400522

I neglected to implement two of the endpoint subscription functions when
I did the work. Normally, you'll only hit that when you unsubscribe from
a specific endpoint.
........

Merged revisions 402276 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402277 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agopjsip_messaging: Added debug for in dialog messaging
Kevin Harwell [Wed, 30 Oct 2013 17:54:26 +0000 (17:54 +0000)]
pjsip_messaging: Added debug for in dialog messaging

(issue ASTERISK-22777)
Reported by: Matt Jordan
........

Merged revisions 402265 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402266 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoUpdates for 1.4.25 core sounds and 1.4.14 extra sounds, plus new en_GB language set
Rusty Newton [Tue, 29 Oct 2013 23:43:58 +0000 (23:43 +0000)]
Updates for 1.4.25 core sounds and 1.4.14 extra sounds, plus new en_GB language set

The new sound packages relate to issues: ASTERISK-22544, ASTERISK-22411, ASTERISK-21413, ASTERISK-20782
Modified sounds/Makefile for the new sound versions and to account for the new en_GB language set.

(issue ASTERISK-22659)
(closes issue ASTERISK-22659)
(closes issue ASTERISK-22411)
(closes issue ASTERISK-22544)
........

Merged revisions 402224 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 402225 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402226 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402227 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoRemove some spammy debug messages; improve clarity of others
Matthew Jordan [Tue, 29 Oct 2013 12:57:35 +0000 (12:57 +0000)]
Remove some spammy debug messages; improve clarity of others

Debug messages aren't free. Even when the debug level is sufficiently low such
that the messages are never evaluated, there is a cost to having to parse
Asterisk logs that contain debug messages that (a) fail to convey sufficient
information or (b) occur so frequently as to be next to meaningless. Based on
having to stare at lots of DEBUG messages, this patch makes the following
changes:

* channel.c: When copying variables from a parent channel to a child channel,
  specify the channels involved. Do not log anything for a variable that is not
  inherited; the fact that it doesn't have an _ or __ already signifies that it
  won't be inherited.
* pbx.c: Specify what function evaluation has occurred that created the result.
* translate.c: Bump up the translator path messages to 10. I've never once had
  to use these debug messages, and for each format that is registered (on
  startup) and unregistered (on shutdown) the entire f^2 matrix is logged out.
  For short tests in the Asterisk Test Suite, this should make finding the
  actual test much easier.
* xmldoc.c: The debug message that 'blah' is not found in the tree is expected.
  Often, description elements - which are not required - are not provided.
  This debug message adds no additional value, as it is not indicative of an
  error or helpful in debugging which element did not contain a 'blah' element
  as a child. If an element is supposed to contain a child element, then that
  XML tree should have failed validation in the first place.

Review: https://reviewboard.asterisk.org/r/2966/
........

Merged revisions 402150 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 402151 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402154 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402155 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoARI: Remove channels/{channelId}/dial
Kinsey Moore [Tue, 29 Oct 2013 12:51:57 +0000 (12:51 +0000)]
ARI: Remove channels/{channelId}/dial

This removes the /ari/channels/{channelId}/dial URI since it is
redundant, overly complex, is likely to become more externally complex
over time, and is too high-level compared with other ARI operations.
See the following for further information:
http://lists.digium.com/pipermail/asterisk-app-dev/2013-October/000002.html

(closes issue ASTERISK-22784)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2968/
........

Merged revisions 402152 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402153 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agobridge_native_rtp: Ensure bridge is torn down
Kinsey Moore [Tue, 29 Oct 2013 12:30:21 +0000 (12:30 +0000)]
bridge_native_rtp: Ensure bridge is torn down

When a bridge transitions away from one tech to another, the tech going
away is provided a dummy bridge with no channels in it to tear down.
Currently this means that the teardown code exits prematurely and does
not tear anything down. This change tears down RTP bridging for the
channel provided in the leave bridge tech callback.

This also reverts the majority of r400403 since it is now redundant.

(closes issue ASTERISK-22628)
(closes issue ASTERISK-22676)
Reported by: John Bigelow
Reported by: Kevin Harwell
Tested by: John Bigelow
Review: https://reviewboard.asterisk.org/r/2905/
Patches:
    native_rtp_fix.diff uploaded by Kinsey Moore (License 6273)
........

Merged revisions 402148 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402149 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agores_ari_playback: Add missing 404 error response for GET and DELETE.
Joshua Colp [Tue, 29 Oct 2013 11:15:59 +0000 (11:15 +0000)]
res_ari_playback: Add missing 404 error response for GET and DELETE.

(closes issue ASTERISK-22722)
Reported by: Richard Mudgett
........

Merged revisions 402139 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402140 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoIgnore full docs
David M. Lee [Mon, 28 Oct 2013 22:10:16 +0000 (22:10 +0000)]
Ignore full docs
........

Merged revisions 402127 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402130 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoPut back several merge revisions that were lost in r402054
David M. Lee [Mon, 28 Oct 2013 22:09:49 +0000 (22:09 +0000)]
Put back several merge revisions that were lost in r402054

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402129 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoPut back several merge revisions that were lost in r401962
David M. Lee [Mon, 28 Oct 2013 22:05:37 +0000 (22:05 +0000)]
Put back several merge revisions that were lost in r401962

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402128 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agoFix UPGRADE.txt Due To Merging From Branch 11
Michael L. Young [Mon, 28 Oct 2013 15:08:00 +0000 (15:08 +0000)]
Fix UPGRADE.txt Due To Merging From Branch 11

When merging in the patch for ASTERISK-22728, the UPGRADE.txt file was changed
incorrectly.  That change should have gone into ASTERISK-11.txt.

This commit is to fix that.

Also, another comment in the UPGRADE-11.txt was missing and this commit adds
that as well.
........

Merged revisions 402115 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402117 65c4cc65-6c06-0410-ace0-fbb531ad65f3

6 years agochan_sip: Clarify 'Forcerport' Setting Displayed When Running "sip show peers"
Michael L. Young [Mon, 28 Oct 2013 14:59:16 +0000 (14:59 +0000)]
chan_sip: Clarify 'Forcerport' Setting Displayed When Running "sip show peers"

While looking at ASTERISK-22236, Walter Doekes pointed out that when running
"sip show peers", the setting being displayed can be confusing.  The display of
"N" used to mean NAT (i.e. yes).  The NAT setting has gone through many
different changes resulting in the display of different characters to try and
convey what the current setting is for 'Forcerport' (A for Auto and Forcerport
is currently on, a for Auto but Forcerport is off, Y for yes, and N for no).
During the initial code review to try and clarify these settings (especially
since "N" no longer meant what it used to mean in prior versions of Asterisk),
Mark Michelson suggested using the full space available to display the settings
which helped to make the settings very clear.  That was a great suggestion.

Therefore, this patch does the following:

* The column for 'Forcerport' now will show: Auto (Yes), Auto (No), Yes, or No.

* A column for the 'Comedia' setting has been added.  It too will display the
  setting in a non-cryptic way: Auto (Yes), Auto (No), Yes, or No.

* UPGRADE.txt has been updated to document this change.

(closes issue ASTERISK-22728)
Reported by: Walter Doekes
Tested by: Michael L. Young
Patches:
    asterisk-forcerport-display-clarification_v3.diff
                                     uploaded by Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2941
........

Merged revisions 402111 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402112 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402113 65c4cc65-6c06-0410-ace0-fbb531ad65f3