Commit Graph

22787 Commits

Author SHA1 Message Date
George Joseph
b95d0c471b config: bug: Fix SEGV in ast_category_insert when matching category isn't found
If you call ast_category_insert with a match category that doesn't exist, the
list traverse runs out of 'next' categories and you get a SEGV.  This patch
adds check for the end-of-list condition and changes the signature to return
an int for success/failure indication instead of a void.

The only consumer of this function is manager and it was also changed to use
the return value.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3993/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@423276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18 14:37:08 +00:00
Walter Doekes
2305602863 chan_sip: Clarify that sipdebug=yes cannot be undone by the CLI.
Document it in sip.conf.

ASTERISK-24249 #close
Reported by: Avinash Mohod

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@423066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-14 15:48:31 +00:00
Kinsey Moore
7aa79c7881 Bridging: Fix bouncing native bridge
This fixes a situation in Asterisk 1.8 and 11 where ast_channel_bridge
could cause a bouncing native bridge. In the case of the
dial_LS_options test, this was a remote RTP bridge which caused the
audio path to continually cycle between Asterisk and the remote
endpoints generating a large number of SIP messages and delaying the
test long enough to cause it to fail (checking timing was part of the
test). The root cause was that the code to decide whether to use native
bridging was expecting a time-remaining value of 0 to be the default
instead of the actual default value of -1. A value of 0 or negative
numbers could also be generated by preceding code in some
circumstances. Both issues are addressed in this patch.

ASTERISK-24211 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3987/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@423006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-12 18:17:44 +00:00
George Joseph
74f3df57de config: bug: fix truncation of included config files on permissions error
ast_config_text_file_save() currently truncates include files as they
are processed.  If a subsequent include file or the main config file has
a permissions error that prevents writing, earlier include files are left
truncated resulting in a frantic search for backups.

This patch causes ast_config_text_file_save to check for write access
on all files before it truncates any of them.

Will be applied 1.8 > trunk.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3986/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@422900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-10 15:58:45 +00:00
Rusty Newton
a42ac11c12 Sounds/BuildSystem: Modifications to include new releases and Japanese language.
Modifying Makefile and sounds.xml to include new core 1.4.26 and extra 1.4.15
sound prompt releases, plus the new Japanese core sound prompts contributed
by QLOOG.

ASTERISK-23324
Reported by: Kevin McCoy
Tested by: Rusty Newton


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@422789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-07 00:07:39 +00:00
Jonathan Rose
98fd17b0ac Manager: Require read permission for SYSTEM in order to send FullyBooted
Review: https://reviewboard.asterisk.org/r/3969/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@422584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-04 19:51:36 +00:00
George Joseph
e5d3e47fe3 manager: Make WaitEvent action respect eventfilters
A WaitEvent issued via an http session isn't respecting eventfilters defined
for the user. I just added a match_filter to the predicate that controls
astman_append.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3958/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@422439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-30 17:19:07 +00:00
Matthew Jordan
50cf9570e3 doc: Add a manpage for the smsq utility
This patch adds a manpage for the smsq utility. Note that this is one of
the patches the Debian distro applies for the Asterisk project, as per
ASTERISK-24191.

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

ASTERISK-24171 #close
Reported by: Jeremy Laine
patches:
  smsq.8 uploaded by Jeremy Laine (License 6561)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@422376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-29 19:38:51 +00:00
Matthew Jordan
849a6efac1 doc: Add a manpage for the aelparse utility
This patch adds a manpage for the aelparse utility. Note that this is one of
the patches the Debian distro applies for the Asterisk project, as per
ASTERISK-24191.

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

ASTERISK-24171 #close
Reported by: Jeremy Laine
patches:
  aelparse.8 uploaded by Jeremy Laine (License 6561)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@422371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-29 19:31:42 +00:00
Matthew Jordan
b79b2ae886 LICENSE: Clarify language in Asterisk's LICENSE to allow for linking to UniMRCP
The UniMRCP project distributes Asterisk modules that integrate Asterisk with
UniMRCP, and other Asterisk users use the UniMRCP library as well.
Unfortunately, the UniMRCP license is Apache 2.0, which per the Free Software
Foundation, is not a compatible license with the GPLv2.

"Please note that this license is not compatible with GPL version 2, because it
has some requirements that are not in that GPL version. These include certain
patent termination and indemnification provisions. The patent termination
provision is a good thing, which is why we recommend the Apache 2.0 license for
substantial programs over other lax permissive licenses."

On the other hand, UniMRCP is a great project and we'd like to let people use
it with Asterisk.

This patch updates the LICENSE text to allow users to link Asterisk with
UniMRCP and distribute the resulting binaries.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@422293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-28 21:52:50 +00:00
Kinsey Moore
54bf60c118 CallerID: Fix parsing of malformed callerid
This allows the callerid parsing function to handle malformed input
strings and strings containing escaped and unescaped double quotes.
This also adds a unittest to cover many of the cases where the parsing
algorithm previously failed.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@422112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-27 14:25:34 +00:00
Richard Mudgett
6eff978ff7 res_musiconhold: Fix MOH restarting where it left off from the last hold.
Restore code removed by https://reviewboard.asterisk.org/r/3536/ that
introduced a regression that prevents MOH from restarting were it left off
the last time.

ASTERISK-24019 #close
Reported by: Jason Richards
Patches:
      jira_asterisk_24019_v1.8.patch (license #5621) patch uploaded by rmudgett

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-25 16:00:12 +00:00
Richard Mudgett
f565f9a708 res_musiconhold.c: Remove obsolete REF_DEBUG code.
Remove unneeded code that writes to the wrong file location in an obsolete
format.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-21 22:01:38 +00:00
Matthew Jordan
416bd82bda chan_sip: Don't use port derived from fromdomain if it isn't set
If a user does not provide a port in the fromdomain setting, chan_sip will set
the fromdomainport to STANDARD_SIP_PORT (5060). The fromdomainport value will
then get used unilaterally in certain places. This causes issues with TLS,
where the default port is expected to be 5061.

This patch modifies chan_sip such that fromdomainport is only used if it is
not the standard SIP port; otherwise, the port from the SIP pvt's recorded
self IP address is used.

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

ASTERISK-24178 #close
Reported by: Elazar Broad
patches:
  fromdomainport_fix.diff uploaded by Elazar Broad (License 5835)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-21 17:32:12 +00:00
Richard Mudgett
f92b7fe87d cli.c: Fix tab completion of "module load" when MALLOC_DEBUG is enabled.
filename_completion_function() returns memory that was not allocated by
the MALLOC_DEBUG allocation tracker so the memory must be freed by
ast_std_free().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-20 22:13:44 +00:00
Kinsey Moore
0b36c21dfd AMI Docs: Fix Status channel parameter optionality
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-19 19:38:59 +00:00
George Joseph
1c10309a66 func_config: Change 'Not Found' message from ERROR to DEBUG
When you call the CONFIG dialplan function with the name of a variable that
doesn't exist in the target context you get an ERROR.  This does nothing but
clutter up the logs with messages that may be perfectly acceptable.  Just
because a variable wasn't in the context doesn't mean it's an error.  Maybei
t's optional or just needs to be defaulted or ignored.

This patch changes the log level from ERROR to DEBUG.  If a dialplan developer
wants to debug their dialplan they still canby setting the console debug level 
as needed.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3919/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-18 20:14:32 +00:00
Matthew Jordan
b48faf9716 apps/app_dial: Fix Dial 'z' option
The 'z' option is supposed to disable the dial timeout in the case of a call
forward. Unfortunately, the wrong timeout timer was passed to the do_forward
function, resulting in the option not working.

ASTERISK-24225 #close
Reported by: dimitripietro
Tested by: dimitripietro
patches:
  jira_asterisk_24225_v1.8.patch uploaded by rmudgett (License 5621)
  jira_asterisk_24225_v11.patch uploaded by rmudgett (License 5621)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-17 23:06:29 +00:00
Matthew Jordan
9b92042c17 configure: Undefine FORTIFY_SOURCE prior to defining it for patched gcc
Some distributions of Linux patch gcc to define FORTIFY_SOURCE when gcc is
executed with optimization. This "help" unfortunately results in re-definition
warnings when FORTIFY_SOURCE is later defined in Asterisk's build system. This
patch undefines FORTIFY_SOURCE prior to defining it to prevent this warning.

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

ASTERISK-24032 #close
Reported by: Kilburn
Tested by: Kilburn, wdoekes
patches:
  1.8.diff uploaded by cloos (License 5956)
  10.diff uploaded by cloos (License 5956)
  11.diff uploaded by cloos (License 5956)
  12.diff uploaded by cloos (License 5956)
  13.diff uploaded by cloos (License 5956)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-17 22:31:23 +00:00
Matthew Jordan
5ee6da4cf2 app_voicemail/app: Remove test events that were duplicated by r421059
Moving the test event raised when a file is played back (which occurred in
r421059) broke the ever loving snot out of the voicemail tests. This caused
duplicate test events to get raised, as app_voicemail and main/app were raising
events prior to call ast_streamfile. The voicemail tests did not enjoy getting
multiple events.

Since raising the playback event in ast_streamfile is far more useful to the
vast majority of tests, this patch keeps the call there and simply removes the
extraneous calls that duplicated the event.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-15 14:43:44 +00:00
Matthew Jordan
9c477681f1 main/file: Move test event to emit PLAYBACK event more consistently
This is being done in advance of the test for ASTERISK-23953


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@421059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-14 20:46:29 +00:00
Walter Doekes
6d6c119777 general: Fix memory Corruption in __ast_string_field_ptr_build_va.
If the space left in a stringfield is between 0 and
(alignof(ast_string_field_allocation)-1) adding new data would cause
memory corruption, because we would assume enough space (unsigned
underrun).

Thanks Arnd Schmitter for reporting and finding out the cause!

ASTERISK-23508 #close
Reported by: Arnd Schmitter
Tested by: Arnd Schmitter, JoshE

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@420680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 10:24:06 +00:00
Walter Doekes
edca0bd412 tcptls: Avoid compiler warning on non-dev-mode.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@420654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 09:51:32 +00:00
Richard Mudgett
7153c2c2c5 chan_sip: Replace sip_tls_read() and resolve the large SDP poll issue.
Replace sip_tls_read() and sip_tcp_read() with a single function and
resolve the poll/wait issue with large SDP payloads.

ASTERISK-18345 #close
Reported by: Stephane Chazelas
Patches:
      tcptls_pollv4.diff (license #5835) patch uploaded by Elazar Broad

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@420434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-07 21:25:05 +00:00
George Joseph
76d1ae97d4 pbx_lua: fix regression with global sym export and context clash by pbx_config.
ASTERISK-23818 (lua contexts being overwritten by contexts of the same name in
pbx_config) surfaced because pbx_lua, having the AST_MODFLAG_GLOBAL_SYMBOLS
set, was always force loaded before pbx_config.  Since I couldn't find any
reason for pbx_lua to export it's symbols to the rest of Asterisk, I simply
changed the flag to AST_MODFLAG_DEFAULT.  Problem solved.  What I didn't
realize was that the symbols need to be exported not because Asterisk needs
them but because any external Lua modules like luasql.mysql need the base
Lua language APIs exported (ASTERISK-17279).

Back to ASTERISK-23818...  It looks like there's an issue in pbx.c where
context_merge was only merging includes, switches and ignore patterns if
the context was already existing AND has extensions, or if the context was
brand new.  If pbx_lua is loaded before pbx_config, the context will exist
BUT pbx_lua, being implemented as a switch, will never place extensions in
it, just the switch statement.  The result is that when pbx_config loads,
it never merges the switch statement created by pbx_lua into the final
context.

This patch sets pbx_lua's modflag back to AST_MODFLAG_GLOBAL_SYMBOLS and adds
an "else if" in context_merge that catches the case where an existing context
has includes, switchs or ingore patterns but no actual extensions.

ASTERISK-23818 #close
Reported by: Dennis Guse
Reported by: Timo Teräs
Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3891/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@420146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-06 16:05:39 +00:00
Rusty Newton
e3ad222bb0 Manager - Improve documentation for manager commands Getvar and Setvar.
The documentation for these commands did not make it clear that they could
accept expressions and functions. Modified to make this clear, but tried
not to be overly explicit.

ASTERISK-21178 #close
Reported by: Rusty Newton
Tested by: Rusty Newton

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@419942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-04 19:42:24 +00:00
Richard Mudgett
dae78b0892 datastores: Audit ast_channel_datastore_remove usage.
Audit of v1.8 usage of ast_channel_datastore_remove() for datastore memory
leaks.

* Fixed leaks in app_speech_utils and func_frame_trace.

* Fixed app_speech_utils not locking the channel when accessing the
channel datastore list.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@419684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-28 18:27:56 +00:00
Richard Mudgett
9e3411a762 features.c: Allow appliationmap to use Gosub.
Using DYNAMIC_FEATURES with a Gosub application as the mapped application
does not work.  It does not work because Gosub just pushes the current
dialplan context, exten, and priority onto a stack and sets the specified
Gosub location.  Gosub does not have a dialplan execution loop to run
dialplan like Macro.

* Made the DYNAMIC_FEATURES application mapping feature call
ast_app_exec_macro() and ast_app_exec_sub() for the Macro and Gosub
applications respectively.

* Backported ast_app_exec_macro() and ast_app_exec_sub() from v11 to
execute dialplan routines from the DYNAMIC_FEATURES application mapping
feature.

NOTE: This issue does not affect v12+ because it already does what this
patch implements.

AST-1391 #close
Reported by: Guenther Kelleter

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@419630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 23:04:09 +00:00
Corey Farrell
0789fefda6 chan_sip: sip_subscribe_mwi_destroy should not call sip_destroy
sip_subscribe_mwi_destroy calls sip_destroy on the reference counted
mwi->call.  This results in the fields of mwi->call being freed, but
mwi->call itself it leaked.  If other code is still using mwi->call
it can cause problems.  This change uses dialog_unref instead, to
balance the ref provided by sip_alloc().

ASTERISK-24087 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3834/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@419440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-24 17:55:48 +00:00
Jason Parker
94afd8c438 Don't cause Asterisk to exit if ooh323.conf not found.
(closes issue ASTERISK-23814)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@419374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-24 16:47:57 +00:00
Kinsey Moore
912f2287e9 Fix more dev-mode build issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@419129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-22 13:17:45 +00:00
Jonathan Rose
3ee4ecb045 func_uri: URIENCODE/URIDECODE - allow empty strings as argument
Previously these two dialplan functions would issue warnings and
return failure when an empty string is used as the argument. Now
they will not issue a warning and will successfully return an
empty string.

ASTERISK-23911 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3745/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@418641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-15 17:19:52 +00:00
Corey Farrell
01492e96d9 astobj2: work around REF_DEBUG race which causes out of order log entries
* Update refcounter.py to use delta's to track the current reference count.
* Use result from internal_ao2_ref to write old_refcount to refs_log.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@418504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-13 21:47:06 +00:00
Richard Mudgett
4542181b8a chan_dahdi/sig_pri: Fix type mismatch in the idledial feature's channel creation.
Square pegs in round holes don't work very well.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@418261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-10 01:23:37 +00:00
Richard Mudgett
863e7e528c chan_dahdi: Add inband_on_setup_ack compatibility option.
The new inband_on_setup_ack option causes Asterisk to assume inband audio
may be present when a SETUP_ACKNOWLEDGE message is received.

Q.931 Section 5.1.3 says that in scenarios with overlap dialing, when a
dialtone is sent from the network side, progress indicator 8 "Inband info
now available" MAY be sent to the CPE if no digits were received with the
SETUP.  It is thus implied that the ie is mandatory if digits came with
the SETUP and dialtone is needed.  This option should be enabled, when the
network sends dialtone and you want to hear it, but the network doesn't
send the progress indicator when needed.

NOTE: For Q.SIG setups this option should be enabled when outgoing overlap
dialing is also enabled because Q.SIG does not send the progress indicator
with the SETUP ACK.

The commit -r413714 (AST-1338) which causes this issue was dealing with a
SIP-to-ISDN interoperability issue.

This commit is a merge of the two patches indicated below.

ASTERISK-23897 #close
Reported by: Pavel Troller
Patches:
      pri-4.diff (license #6302) patch uploaded by Pavel Troller
      jira_asterisk_23897_v11.patch (license #5621) patch uploaded by rmudgett

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@417956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-03 21:38:30 +00:00
Matthew Jordan
904a6b3910 main/untils: Prevent potential infinite loop in ast_careful_fwrite
A loop in ast_careful_fwrite exists that will continually attempt to write to
a file stream, even in the presence of EAGAIN/EINTR errors. However, if a
connection that uses ast_careful_fwrite closes suddenly, ast_careful_fwrite's
call to fflush may return EAGAIN/EINTER along with EOF. A subsequent call to
fflush will return EOF but not clear errno, resulting in an infinite loop.

This patch clears errno after it is detected and handled the loop, such that
any subsequent call to fflush will not get erroneously stuck.

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

ASTERISK-23984 #close
Reported by: Steve Davies
patches:
  fflush_loop_fix uploaded by one47 (License 5012)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@417797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-03 11:19:40 +00:00
Matthew Jordan
67a11896e7 chan_sip: be more tolerant of whitespace between attributes in SDP fmtp line
This patch is essentially a backport of a small portion of r397526 from
ASTERISK-21981. In that patch, pass through support and format attribute
negotiation was added for Opus. Part of that included being more tolerant to
whitespace in the fmtp line of an SDP; that part of the patch is being
applied here.

As the author of the backport pointed out, in SDP, the fmtp line is allowed to
include whitespace between attributes. RFC 3267 chapter 8.3 (from 2001)
includes an example for this. This was not removed in the updated RFC 4867 in
2007.

Note that this patch only applies to audio in Asterisk 1.8, which is a bit more
limited in its support for format attributes. It does have limited support for
some codecs, so this patch is still useful in this version.

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

ASTERISK-23916
Reported by: Alexander Traud
patches:
  sdpFMTPspace_Asterisk11.patch uploaded by Alexander Traud (License 6520)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@417587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-30 03:20:12 +00:00
Corey Farrell
5386eeda30 Ensure REF_DEBUG records entrys for attempts to ao2_ref an invalid object
This change ensures that __ao2_ref_debug writes to ref_log when given a
non-NULL pointer to an invalid ao2 object.  This is to ensure that we
record any attempt manipulate references of already freed objects.

ASTERISK-23948 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3677/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@417500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-27 19:24:20 +00:00
Corey Farrell
d8a04cd816 refcounter.py: prevent use of excessive RAM with large refs logs
When processing a 212MB refs file, refcounter.py used over 3GB of RAM.
This change greatly reduces memory usage in two ways:

* Saving object history in whole lines instead of separated values.
* Not saving normal/skewed/leaked object lists unless they are requested.

ASTERISK-23921 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3668/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@417480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-27 19:14:42 +00:00
Matthew Jordan
db3d055e38 udptl: Correct FEC to not consider negative sequence numbers as missing
When using FEC, with span=3 and entries=4 Asterisk will attempt to repair
the packet with sequence number 5, as it will see that packet -4 is
missing. The result is Asterisk sending garbage packets that can kill a
fax.

This patch adds a check to see if the sequence number is valid before
checking if the packet is missing.

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

ASTERISK-23908 #close
Reported by: Torrey Searle
patches:
  udptl_fec.patch uploaded by Torrey Searle (License 5334)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@417318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-26 12:21:27 +00:00
Corey Farrell
c56504a148 chan_sip: Fix handling of "From" headers longer than 256 characters
From headers were processed using a 256 character buffer on the stack.
This change replaces that with a heap allocation by ast_strdup.

ASTERISK-23790 #close
Reported by: uniken1
Tested by: uniken1
Review: https://reviewboard.asterisk.org/r/3669/
Patches:
    chan_sip-large-from-header-1.8-r3.patch uploaded by wdoekes (license 5674)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@417248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-26 10:02:10 +00:00
Rusty Newton
d3d407c175 main/features - documentation - reformat examples and options in features.conf.sample to show clearly which options apply in which section
The features.conf sample can be a bit confusing about what parking options can be set only in the general context, or both in the general context (for the default parking lot) and in other parking lot contexts. A bug was filed due to confusion and a little googling will show lots of other confused users.

Despite some comments on the individual options, it still reads in a confusing way. In this patch I separate out those options with some headings in to attempt a better layout. I went ahead and modified other headings in the file, or added them to facilitate better visual scanning.

ASTERISK-23667 #close
Review: https://reviewboard.asterisk.org/r/3621/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@417076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-23 14:34:17 +00:00
George Joseph
c64fde05ab build: Turn FORTIFY_SOURCE off if DONT_OPTIMIZE is set.
AST_FORTIFY_SOURCE is automatically set in ./Makefile even if DONT_OPTIMIZE
is set in menuselect.  This causes gcc to complain that _FORTIFY_SOURCE
requires optimization and the build will fail.  You can specify
"make AST_FORTIFY_SOURCE=''" but I always forget.

This patch moves the set of AST_FORTIFY_SOURCE to Makefile.rules and only
sets it if DONT_OPTIMIZE is "no".  The move is necessary because the
top-level Makefile doesn't include menuselect.makeopts.

This doesn't solve the entire problem however because res_config_mysql
seems to force _FORTIFY_SOURCE so res_config_mysql has to be disabled
for now if DONT_OPTIMIZE is set.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3664/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@417016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-22 20:46:38 +00:00
George Joseph
356a1f8620 build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.
ast_ext_tool_check.m4 isn't handling cases where a path to a package is
provided (E.G. --with-mysqlclient=/some/sysroot) and the package has a config
tool (E.G. mysql_config) and the package has its own subdirectories in include
or lib.  For example, mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql
but ast_ext_tool_check sets MYSQLCLIENT_LIB to ${MYSQLCLIENT_DIR}/usr/lib.
libxml2 has the same problem with its includes.  They're in 
${LIBXML2_DIR}/usr/include/libxml2 not directly in ${LIBXML2_DIR}/usr/include.
Both cause configure to fail and there are others in the same boat.

The problem is caused by logic in ast_ext_tool_check that overrides the result
of the config tool's --cflags and --libs options if package_DIR is set.

This patch prepends package_DIR (if specified) to the -L and -I results from
the package's config tool instead of overriding them.

A regenerated ./configure and include/asterisk/autoconfig.h.in are included
but can be regenerated by running ./bootstrap.sh at any time.

Tested by: George Joseph
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3550/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@416929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-20 23:12:25 +00:00
George Joseph
46c8b1eefd build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.
ast_ext_tool_check.m4 isn't handling cases where a path to a package is
provided (E.G. --with-mysqlclient=/some/sysroot) and the package has a config
tool (E.G. mysql_config) and the package has its own subdirectories in include
or lib.  For example, mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql
but ast_ext_tool_check sets MYSQLCLIENT_LIB to ${MYSQLCLIENT_DIR}/usr/lib.
libxml2 has the same problem with its includes.  They're in 
${LIBXML2_DIR}/usr/include/libxml2 not directly in ${LIBXML2_DIR}/usr/include.
Both cause configure to fail and there are others in the same boat.

The problem is caused by logic in ast_ext_tool_check that overrides the result
of the config tool's --cflags and --libs options if package_DIR is set.

This patch prepends package_DIR (if specified) to the -L and -I results from
the package's config tool instead of overriding them.

Tested by: George Joseph
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3550/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@416869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-20 21:55:41 +00:00
Kinsey Moore
7752d56964 Fix build warnings with TEST_FRAMEWORK enabled
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@416732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-19 19:33:32 +00:00
George Joseph
8184532a9f Remove the problematic and unneeded AST_MODFLAG_GLOBAL_SYMBOLS from pbx_lua.c
AST_MODFLAG_GLOBAL_SYMBOLS was causing the module to be incorrectly loaded
before pbx_config.  pbx_config was therefore blowing away contexts that were
created by pbx_lua.  With AST_MODFLAG_DEFAULT the load order is now correct
and contexs are being properly merged.  AST_MODFLAG_GLOBAL_SYMBOLS was not
needed anyway since no other modules needed its global symbols that early.

ASTERISK-23818 #close
Reported by: Dennis Guse
Tested by: Dennis Guse
Tested by: George Joseph

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@416667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-19 15:59:45 +00:00
George Joseph
c2c3e17138 Update extensions.lua.sample with naming conflict guidance.
The sample extensions.lua was causing pbx_lua to fail to load when parsing
'app.goto("default", "s", 1)' because in Lua 5.2, 'goto' is now a reserved
word.  This patch adds guidance to extensions.lua.sample and changed
'app.goto("default", "s", 1)' to 'app.['goto']("default", "s", 1)'. 


https://reviewboard.asterisk.org/r/3627/
ASTERISK-23844 #comment This commit fixes 1.8, patch for 11->trunk coming.
 

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@416578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-18 16:41:50 +00:00
Mark Michelson
964fac8524 Allow the PUSH and UNSHIFT functions to set inheritable channel variables.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@416500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-17 18:22:31 +00:00
Kinsey Moore
21c4871730 MoH: Don't restart stream on repeated start calls
Currently, music on hold will stop and then start again from the
beginning if ast_moh_start() is called multiple times. This can happen
if a call is put on hold repeatedly (the channel receives multiple
HOLD control frames) and can be triggered from ARI by starting MoH on a
channel multiple times. This is fairly jarring/annoying to users.

This change prevents MoH from being restarted if the requested music
class is the same as the one currently playing.

This includes an extra check to prevent the errors previously
experienced in the testsuite and has 100+ test runs behind it.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@416439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-17 16:20:22 +00:00