Commit Graph

25268 Commits

Author SHA1 Message Date
Richard Mudgett de3dc17cc5 app_confbridge: Make explicitly stop MOH if a user is kicked or hangs up while MOH is playing.
When MOH is playing to a user in a conference and the user is kicked or
hangs up from the conference then the AMI MusicOnHoldStop events didn't
happen.  (Asterisk v11 AMI event: MusicOnHold, state:Stop)

(closes issue ASTERISK-23311)
Reported by: Benjamin Keith Ford

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-12 18:47:10 +00:00
Joshua Colp d00c1ac23e res_pjsip_multihomed: Fix a bug where outgoing messages for TCP would go out using UDP.
This change fixes a bug where the code which changes the transport did not check whether
the message is going out over UDP or not before changing it. For TCP and TLS transports
we don't need to change the transport as the correct one is already chosen.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-12 12:51:34 +00:00
Joshua Colp 2fa1ff6e75 res_pjsip_multihomed: Add module which places the correct address within messages.
Due to how messages are handled within PJSIP it is not until a message is actually
sent that the destination is reliably known. This means that the addresses placed
within the message may not be of the interface the message is being sent out on.

This module determines what interface a message is being sent on and updates the
message to contain the correct address if applicable.

This module was tested by myself in a virtualized environment with multiple interfaces
and also by Kinsey Moore in the following configuration:

Networks:
* 10.24.16.0/21
** hard phone
** default gateway
* 10.24.64.0/21
** softphone with pjsip-based stack

Transport details:
bind address: 0.0.0.0
protocol: UDP

All endpoints were tested with explicitly configured transports and unconfigured transports.

This was tested with inbound and outbound calls, both of which were experiencing detrimental
effects from incorrect IP addresses in SIP messages. These effects were only experienced by the
soft phone on the 10.24.64.0 network since the messages to the hard phone on the 10.24.16.0
network had the correct IP address.

(closes issue ASTERISK-23020)
Reported by: xrobau

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-11 16:07:42 +00:00
Richard Mudgett 7c854d65af AST-2014-001: Stack overflow in HTTP processing of Cookie headers.
Sending a HTTP request that is handled by Asterisk with a large number of
Cookie headers could overflow the stack.

Another vulnerability along similar lines is any HTTP request with a
ridiculous number of headers in the request could exhaust system memory.

(closes issue ASTERISK-23340)
Reported by: Lucas Molas, researcher at Programa STIC, Fundacion; and Dr. Manuel Sadosky, Buenos Aires, Argentina
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 17:21:01 +00:00
Scott Griepentrog ef69b5176d unqiueid: correct max uniqueid length test
This patch adds null string test prior to checking for
a max uniqueid value that was added in r410157.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 16:33:10 +00:00
Kinsey Moore c300f7e5a8 AST-2014-002: chan_sip: Exit early on bad session timers request
This change allows chan_sip to avoid creation of the channel and
consumption of associated file descriptors altogether if the inbound
request is going to be rejected anyway.

(closes issue ASTERISK-23373)
Reported by: Corey Farrell
Patches:
     chan_sip-earlier-st-1.8.patch uploaded by Corey Farrell (license 5909)
     chan_sip-earlier-st-11.patch uploaded by Corey Farrell (license 5909)
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 13:30:51 +00:00
Joshua Colp aa57dcf634 AST-2014-003: res_pjsip: When handling 401/407 responses don't assume a request will have an endpoint.
This change removes the assumption that an outgoing request will always
have an endpoint and makes the authenticate_qualify option work once again.

(closes issue ASTERISK-23210)
Reported by: Joshua Colp
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 12:53:00 +00:00
George Joseph 3ff60b75b1 pjsip_cli: Create pjsip show channel and contact, and general cli code cleanup.
Created the 'pjsip show channel' and 'pjsip show contact' commands.
Refactored out the hated ast_hashtab.  Replaced with ao2_container.
Cleaned up function naming.  Internal only, no public name changes.
Cleaned up whitespace and brace formatting in cli code.
Changed some NULL checking from "if"s to ast_asserts.
Fixed some register/unregister ordering to reduce deadlock potential.
Fixed ast_sip_location_add_contact where the 'name' buffer was too short.
Fixed some self-assignment issues in res_pjsip_outbound_registration.

(closes issue ASTERISK-23276)
Review: http://reviewboard.asterisk.org/r/3283/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-08 16:50:36 +00:00
Matthew Jordan 5ca081e053 resource_channels: Check if a passed in ID is NULL before checking its length
Calling strlen on a NULL string is explosive. This patch checks whether or not
the passed in string is NULL or zero length before checking to see if the
string is too long.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-08 15:45:59 +00:00
Corey Farrell 0291965f79 chan_sip: Fix deadlock of monlock between unload_module and do_monitor
Release monlock before calling pthread_join.  This ensures do_monitor
cannot freeze by locking monlock during module unload.

(closes issue ASTERISK-21406)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3284/
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 22:56:15 +00:00
Scott Griepentrog 2507179fec sorcery: correct field register argument list
This fixes mistakes I previously made in merging
gtjoseph's changes with mine.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 22:08:26 +00:00
Matthew Jordan b2c4eaf06a config_options: Display the see-also information for CLI config option help
The config option help information has always parsed the <see-also> tags in the
XML documentation. Unfortunately, it just never bothered displaying them on
the CLI. With this patch, when you execute 'config show help [module] [obj]
[option]', it will display what other options are useful to you.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:54:01 +00:00
Matthew Jordan dd603ca96f res_pjsip: Fix documentation for one touch recording see-also links
The one touch recording options have several see-also links between the
various configuration options. These were 'broken' by the snake casing
of those options. This patch corrects the see-also links such that they
reference the correct option names.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:28:12 +00:00
Mark Michelson c162101d69 Make res_sorcery_realtime filter unknown retrieved results.
When retrieving data from a database or other realtime backend, it's quite
possible to retrieve variables that Asterisk does not care about but that
are legitimate to exist. Asterisk does not need to throw a hissy fit when
these variables are encountered but rather just filter them out.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:23:39 +00:00
Scott Griepentrog feae552139 pjsip: allow and disallow show same codecs
In order to prevent confusion over the allow and disallow
list of codecs being the same an option for registering a
field as an alias is added.  The alias field will be read
from the configuration file, but afterwards is not listed
as a known field.  With disallow set as an alias, the CLI
command pjsip show endpoint # will list the allow= field,
but not the disallow field.

(closes issue ASTERISK-23092)
Review: https://reviewboard.asterisk.org/r/3193/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:11:49 +00:00
Richard Mudgett 4ad1245cb5 stasis cache: Enhance to keep track of an item from different entities.
A stasis cache entry now contains more than a single message/snapshot.  It
contains messages/snapshots for the local entity as well as any remote
entities that post to the cached item.  In addition callbacks can be
supplied when the cache is created to compute and post the aggregate
message/snapshot representing all entities stored in the cache entry.

* All stasis messages now have an eid to indicate what entity posted it.

* The stasis cache enhancements allow device state to cache and aggregate
the device states from local and remote entities in a single operation.
The cached aggregate device state is available immediately after it is
posted to the stasis bus.  This improves performance by eliminating a
cache dump and associated ao2 container traversals to calculate the
aggregate state.

(closes issue ASTERISK-23204)
Reported by: Mark Michelson

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 20:41:13 +00:00
Richard Mudgett ecbd052741 uniqueid: Fix chan_dahdi, sig_pri, sig_ss7, test_cdr, and test_cel compiler errors.
(issue ASTERISK-23120)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 19:19:04 +00:00
Scott Griepentrog 80ef9a21b9 uniqueid: channel linkedid, ami, ari object creation with id's
Much needed was a way to assign id to objects on creation, and
much change was necessary to accomplish it.  Channel uniqueids
and linkedids are split into separate string and creation time
components without breaking linkedid propgation.  This allowed
the uniqueid to be specified by the user interface - and those
values are now carried through to channel creation, adding the
assignedids value to every function in the chain including the
channel drivers. For local channels, the second channel can be
specified or left to default to a ;2 suffix of first.  In ARI,
bridge, playback, and snoop objects can also be created with a
specified uniqueid.

Along the way, the args order to allocating channels was fixed
in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
masquerade occurs.

(closes issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3191/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 15:47:55 +00:00
Matthew Jordan d3ac8b8a0e chan_sip: Allow static realtime members to be qualified during module load.
When a static realtime peer with qualify=yes is loaded, Asterisk will fail to
send an OPTIONS request due to the lastms being equal to 0. This results in
the peer being unable to receive calls from Asterisk because the status is
permanently UNKNOWN.

This patch allows an OPTIONS request to be sent during module load by
ignoring the lastms value on startup only.

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

(closes issue ASTERISK-17523)
Reported by: Maciej Krajewski
Tested by: wushumasters
patches:
  realtime_fix_11.7.0.txt uploaded by Trevor Peirce (license 6112)
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 05:04:32 +00:00
Richard Mudgett 4fd50a9d81 sorcery.c: Fix off-nominal path ref and memory leak in ast_sorcery_objectset_json_create().
* Made exit a loop early on error in ast_sorcery_objectset_json_create().

* Removed some dead code in ast_sorcery_objectset_create2().
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 23:47:16 +00:00
Russell Bryant fbf8700c10 moh: fix a refcount error with realtime MOH
I observed a crash in res_musiconhold on an Asterisk 11 system using realtime
MOH.  Investigation of the backtrace showed a corrupt mohclass, implying that
it got destroyed before the code expected it to.  I went looking for reference
counting errors that could have caused this crash and this patch this result.
It contains 2 changes.

1) Remove a usless block of code that was impossible to reach.  There was even
a comment indicating that it was impossible to reach.  The conditional includes
"!ast_test_flag(global_flags, MOH_CACHERTCLASSES)" and it's inside of an if
block with the opposite check "ast_test_flag(global_flags,
MOH_CACHERTCLASSES)".  There's no good reason to keep it around.

2) A similar block to #1 contained a reference counting error.  It stores
state->class in the local variable mohclass without increasing its reference
count.  The reference count on mohclass is decremented at the end of the
function.  This block of code probably very rarely runs, which would help
explain why this system was working fine for many months before experiencing a
crash.

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 23:43:34 +00:00
George Joseph a4906e9f86 sorcery: Create AST_SORCERY dialplan function.
This patch creates the AST_SORCERY dialplan function which allows someone to
retrieve any value from a sorcery-based config file.  It's similar to 
AST_CONFIG.

The creation of the function itself was fairly straightforward but it required
changes to the underlying sorcery infrastructure that rippled into individual
sorcery objects.  The changes stemmed from inconsistencies in how sorcery
created ast_variable objectsets from sorcery objects and the inconsistency
in how individual objects used that feature especially when it came to
parameters that can be specified multiple times like contact in aor and match
in identify.  You can read more here...
http://lists.digium.com/pipermail/asterisk-dev/2014-February/065202.html

So, what this patch does, besides actually creating the AST_SORCERY function,
is the following...

* Creates ast_variable_list_append which is a helper to append one ast_variable
  list to another.
* Modifies the ast_sorcery_object_field_register functions to accept the
  already-defined sorcery_fields_handler callback.
* Modifies ast_sorcery_objectset_create to accept a parameter indicating return
  type preference...a single ast_variable with all values concatenated or an
  ast_variable list with multiple entries.  Also fixed a few bugs.
* Modifies individual sorcery object implementations to use the new function
  definition of the ast_sorcery_object_field_register functions.
* Modifies location.c and res_pjsip_endpoint_identifier_ip.c to implement
  sorcery_fields_handler handlers so they return multiple occurrences as an
  ast_variable_list.
* Added a whole bunch of tests to test_sorcery.

(closes issue ASTERISK-22537)
Review: http://reviewboard.asterisk.org/r/3254/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 22:39:54 +00:00
Jonathan Rose f0b8590c14 pjsip configuration: Make transport TOS values consistent with endpoints
Transport TOS values were interpreted as DSCP values without being documented
as such. Endpoint TOS values (tos_audio/tos_video) behaved normally as TOS
values have historically. This patch makes the transport TOS values behave as
TOS values and makes all TOS values readable as string values (e.g. AF11).
In addition, alembic scripts have been updated to use the proper field types
for all TOS/COS values.

(issue ASTERISK-23235)
Reported by: George Joseph
Review: https://reviewboard.asterisk.org/r/3304/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 19:04:58 +00:00
Joshua Colp 3f730662f7 res_stasis_recording: Add a "target_uri" field to recording events.
This change adds a target_uri field to the live recording object. It
contains the URI of what is being recorded.

(closes issue ASTERISK-23258)
Reported by: Ben Merrills

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 18:20:37 +00:00
Mark Michelson 59ff66ef02 Don't attempt to link in an aggregate MWI subscription if an endpoint does not aggregate MWI.
Attempting to link a NULL object into an ao2 container had been benign previously, but since
enabling DO_CRASH in the testsuite, this is now causing a crash. It's better to be right
here anyway.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 15:58:13 +00:00
George Joseph 0a4dd1481a Blocked revisions 410006
........
sorcery: Create AST_SORCERY dialplan function.

This patch creates the AST_SORCERY dialplan function which allows someone to
retrieve any value from a sorcery-based config file.  It's similar to 
AST_CONFIG.

The creation of the function itself was fairly straightforward but it required
changes to the underlying sorcery infrastructure that rippled into individual
sorcery objects.  The changes stemmed from inconsistencies in how sorcery
created ast_variable objectsets from sorcery objects and the inconsistency
in how individual objects used that feature especially when it came to
parameters that can be specified multiple times like contact in aor and match
in identify.  You can read more here...
http://lists.digium.com/pipermail/asterisk-dev/2014-February/065202.html

So, what this patch does, besides actually creating the AST_SORCERY function,
is the following...

* Creates ast_variable_list_append which is a helper to append one ast_variable
  list to another.
* Modifies the ast_sorcery_object_field_register functions to accept the
  already-defined sorcery_fields_handler callback.
* Modifies ast_sorcery_objectset_create to accept a parameter indicating return
  type preference...a single ast_variable with all values concatenated or an
  ast_variable list with multiple entries.  Also fixed a few bugs.
* Modifies individual sorcery object implementations to use the new function
  definition of the ast_sorcery_object_field_register functions.
* Modifies location.c and res_pjsip_endpoint_identifier_ip.c to implement
  sorcery_fields_handler handlers so they return multiple occurrences as an
  ast_variable_list.
* Added a whole bunch of tests to test_sorcery.

(closes issue ASTERISK-22537)
Review: http://reviewboard.asterisk.org/r/3254/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 15:20:51 +00:00
Matthew Jordan 38da8d2fda res_fax_spandsp: Fix crash when passing ulaw/alaw data to spandsp
When acting as a T.38 fax gateway, res_fax_spandsp would at times cause a crash
in libspandsp. This would occur when, during fax tone detection, a ulaw/alaw
frame would be passed to modem_connect_tones_rx. That particular routine
expects the data to be in slin format. This patch looks at the frame type and,
if the data is ulaw/alaw, converts the format to slin before passing it to
modem_connect_tones_rx.

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

(closes issue ASTERISK-20149)
Reported by: Alexandr Gordeev
Tested by: Michal Rybarik
patches:
  spandsp_g711decode.diff uploaded by Michal Rybarik (license 6578)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 02:22:59 +00:00
Richard Mudgett 77ad5ec2e3 app_confbridge: Remove some noop code.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 00:33:13 +00:00
Richard Mudgett 4515cb3145 res_musiconhold.c: Remove some unnecessary RAII_VAR() usage.
* Made the moh_register() define use useful parameter names.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 00:19:06 +00:00
Kinsey Moore b98c2b0e82 config: Fix inverted test
The test of the result of the stat() call was inverted such that its
output was only used if the call failed. This inverts the test so that
the output of stat() is used correctly. This was causing full reloads
on unchanged files.

(closes issue ASTERISK-23383)
Reported by: David Woolley
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 20:41:37 +00:00
Kinsey Moore b5f8f56bd0 bridge_native_rtp: Fix crash involving masquerade
It is possible for a channel to be masqueraded out of a bridge which
means it may no longer have RTP glue to check upon leaving said bridge.
If this situation occurred (it's possible at least during dial and call
pickup) then Asterisk would crash. This change makes sure the glue is
checked before use.

(closes issue AST-1290)
Reported by: John Bigelow
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 19:28:31 +00:00
Richard Mudgett 15140883d0 alembic: Add missing queue and CDR table creation scripts.
* Added the queues and queue_members tables to the config alembic scripts.

* Added the CDR table alembic creation script.  The CDR table is more of
an example for new setups since the actual table can be fully customized
in cdr_adaptive_odbc.conf.

(closes issue ASTERISK-23233)
Reported by: jmls

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 18:51:37 +00:00
Mark Michelson ad39358e19 Fix documentation for PRESENCE_STATE to properly illustrate how to create a presence hint.
There was a missing comma.
This was discovered by Dan Kaplan.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 18:47:30 +00:00
David M. Lee 38a619af97 Corrected cross-platform stat nanosecond code
When nanosecond time resolution was added for identifying config file
changes, it didn't cover all of the myriad of ways that one might obtain
nanosecond time resolution off of struct stat.

Rather than complicate the #if even further figuring out one system from
the next, this patch directly tests for the three struct members I know
about today, and #ifdef's accordingly.

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 16:58:21 +00:00
Moises Silva bcb0f94604 Fix res/res_http_websocket.c build failure in 32bit due to incorrect print format for uint64_t
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 16:26:38 +00:00
Moises Silva e4e5cfa9b8 Fix WebRTC over WSS not working
Several fixes for the WebSockets implementation in res/res_http_websocket.c

* Flush the websocket session FILE* as fwrite() may not actually guarantee sending
  the data to the network. If we do not flush, it seems that buffering on the SSL
  socket for outbound messages causes issues

* Refactored ast_websocket_read to take into account that SSL file descriptors
  may be ready to read via fread() but poll() will not actually say so because
  the data was already read from the network buffers and is now in the libc buffers

(closes issue ASTERISK-23099)
(closes issue ASTERISK-21930)
Review: https://reviewboard.asterisk.org/r/3248/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 16:22:44 +00:00
Sean Bright 0dad46d297 Fix references to 'keys' CLI commands in astgenkey
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 12:06:48 +00:00
Igor Goncharovskiy 015e744c3c Blocked revisions 409762
........
Correct RTP handling in chan_unistim and fix transfer process broken in previous fix:
- Fixed too early RTP setup with phone, that cause no ringback tone on caller side
- Handle call transfer cancel only in STATE_CALL case (related to ASTERISK-23073)

(Reported by: Németh Tamás, niurkin sil)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 06:33:39 +00:00
Igor Goncharovskiy fe73de1302 Add update_peer function to unistim_rtp_glue, improve other unistim_rtp_glue functions conforming to other channel drivers. Do not forget auto-detected and user-selected phone settings on 'unistim reload'
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 06:17:03 +00:00
Richard Mudgett 33eaf4a4b8 stasis: Made internal_stasis_subscribe() prototype and definition match exactly.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 01:05:02 +00:00
Michael L. Young 959c3a7c15 func_audiohookinheritance: Check If A Channel Was Specified
This patch prevents a crash when using the function audiohookinheritance without
setting the channel.

(closes issue ASTERISK-23104)
Reported by: Joel Vandal
Tested by: Joel Vandal
Patches:
    asterisk-23104_audiohook_inherit_no_channel-11.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 19:34:52 +00:00
Jonathan Rose a0fff439ab res_rtp_asterisk: Fix one way audio problems with hold/unhold when using ICE
ICE sessions will now be restarted if sessions are changed to use new sets of
remote candidates.

(closes issue ASTERISK-22911)
Reported by: Vytis Valentinavičius
Review: https://reviewboard.asterisk.org/r/3275/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 17:22:32 +00:00
Kinsey Moore 6204ea6c1a AO2: Add an assert for bad objects
This adds an assert that will only be active if Asterisk is compiled
with DO_CRASH and allows the testsuite to fail tests that would
otherwise require log file parsing.
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 16:55:43 +00:00
Sean Bright f5b2f1333f Minor whitespace change to 'sip show peers' output.
(closes issue ASTERISK-23406)
Reported by: ibercom
Tested by: ibercom
Patches:
    asterisk-11.patch uploaded by ibercom
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 14:55:24 +00:00
Joshua Colp c5bd5be298 res_stasis_recording: Fix memory leak of the absolute name.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-03 19:44:58 +00:00
Matthew Jordan 43858c24ab doxygen: Tweak the link back to ye olde Digium website
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-03 02:08:58 +00:00
Tzafrir Cohen 514a8244e3 Makefile: replace -O6 with -O3
-O6 is not a legal option of gcc. Unofficially gcc considers it to be
equivalent of -O3. clang chalks on it, though. This commit sets the 
default optimization flag to be -O3, like gcc actually considered it.

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-02 17:03:56 +00:00
Joshua Colp 597690f363 res_pjsip_session: Set options (100rel, timers) on incoming sessions.
This change passes options to the UAS creation function. This in turn
sets up 100rel and session timer properties on the incoming session.

Reported by Julian Russell on asterisk-users mailing list.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-01 20:28:04 +00:00
Richard Mudgett c95146269c devicestate.c: Simplified some logic in _ast_device_state().
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-01 00:05:38 +00:00
Richard Mudgett 77625956dd stasis_cache.c: Remove some unnecessary RAII_VAR() usage.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-01 00:02:02 +00:00