Commit Graph

3277 Commits

Author SHA1 Message Date
Richard Mudgett 4bd0ef0744 Fixed reference to incorrect variable if unknown host configured crash.
* Fixed a LOG_ERROR message referencing the config variable list v that
had previously been processed and became NULL.

* Added error return value set that was missing in an ast_append_ha()
error return path.

(closes issue ASTERISK-18743)
Reported by: Michele
Patches:
      issueA18743-fix_dynamic_exclude_static_bad_host_log.patch (license #5674) patch uploaded by Walter Doekes
Tested by: Michele
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@343852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08 18:01:11 +00:00
Walter Doekes fb2dbd51dc Correct the default udptl port range.
The udptl port range was defined as 4000-4999 in the udptl.conf.sample,
as 4500-4599 if you didn't have a config and 4500-4999 if your config
was broken. Default is now 4000-4999.

(closes issue ASTERISK-16250)
Reviewed by: Tilghman Lesher

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@343580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 19:55:54 +00:00
Matthew Nicholson b65fd0ee03 list all of the codecs associated with a particular format id for CLI command "core show codec"
AST-699


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@343533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 18:39:55 +00:00
Walter Doekes e04eea4fab Ensure that string field lengths are properly aligned
Integers should always be aligned. For some platforms (ARM, SPARC) this
is more important than for others. This changeset ensures that the
string field string lengths are aligned on *all* platforms, not just on
the SPARC for which there was a workaround. It also fixes that the
length integer can be resized to 32 bits without problems if needed.

(closes issue ASTERISK-17310)
Reported by: radael, S Adrian
Reviewed by: Tzafrir Cohen, Terry Wilson
Tested by: S Adrian

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@343158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02 21:37:11 +00:00
Walter Doekes 14200ca67f Several fixes to the chan_sip dynamic realtime peer/user lookup
There were several problems with the dynamic realtime peer/user lookup
code. The lookup logic had become rather hard to read due to lots of
incremental changes to the realtime_peer function. And, during the
addition of the sipregs functionality, several possibilities for memory
leaks had been introduced. The insecure=port matching has always been
broken for anyone using the sipregs family. And, related, the broken
implementation forced those using sipregs to *still* have an ipaddr
column on their sippeers table.

Thanks Terry Wilson for comprehensive testing and finding and fixing
unexpected behaviour from the multientry realtime call which caused
the realtime_peer to have a completely unused code path.

This changeset fixes the leaks, the lookup inconsistenties and that
you won't need an ipaddr column on your sippeers table anymore (when
you're using sipregs). Beware that when you're using sipregs, peers
with insecure=port will now start matching!

(closes issue ASTERISK-17792)
(closes issue ASTERISK-18356)
Reported by: marcelloceschia, Walter Doekes
Reviewed by: Terry Wilson

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01 20:58:18 +00:00
Walter Doekes ef82f32ca3 Cleanup references to sipusers and sipfriends dynamic realtime families
Somewhere between 1.4 and 1.8 the sipusers family has become completely
unused. Before that, the sipfriends family had been obsoleted in favor
of separate sipusers and sippeers families. Apparently, they have been
merged back again into a single family which is now called "sippeers".

Reviewed by: irroot, oej, pabelanger

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01 19:48:26 +00:00
Richard Mudgett 96d21568fa Misc format capability fixes.
* Fixed typo in format_cap.c:joint_copy_helper() using the wrong variable.

* Fix potential race between checking if an interface exists and adding it
to the container in format.c:ast_format_attr_reg_interface().

* Fixed double rwlock destroy in format.c:ast_format_attr_init() error
exit path.

* Simplified format.c:find_interface() and format.c:has_interface().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-31 17:46:52 +00:00
Matthew Jordan 7ea3892aef Fixed invalid memory access when adding extension to pattern match tree
When an extension is removed from a context, its entry in the pattern match
tree is not deleted.  Instead, the extension is marked as deleted.  When an
extension is removed and re-added, if that extension is also a prefix of
another extension, several log messages would report an error and did not
check whether or not the extension was deleted before accessing the memory.
Additionally, if the extension was already in the tree but previously
deleted, and the pattern was at the end of a match, the findonly flag was
not honored and the extension would be erroneously undeleted.  

Additionaly, it was discovered that an IAX2 peer could be unregistered
via the CLI, while at the same time it could be scheduled for unregistration
by Asterisk.  The unregistration method now checks to see if the peer
was already unregistered before continuing with an unregistration.

(closes issue ASTERISK-18135)
Reported by: Jaco Kroon, Henry Fernandes, Kristijan Vrban
Tested by: Matt Jordan

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-31 16:04:35 +00:00
Matthew Nicholson 16a68810bf tweak the v21 detector to detect an additional pattern of hits and misses
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-27 20:10:12 +00:00
Richard Mudgett 1a6c26b20e Check fopen return value for ao2 reference debug output.
Reported by: wdoekes
Patched by: wdoekes

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 22:05:46 +00:00
Terry Wilson 2bdeae0faf Return NULL when no results returned for realtime_multientry
It was not documented what the return value should be when no entries
were returned with the multientry realtime callback. This change forces
consistent behavior even if the backends return an empty ast_config.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 01:25:52 +00:00
Richard Mudgett ce19768cec Fix AGI exec Park to honor the Park application parameters.
The fix for ASTERISK-12715 and ASTERISK-12685 added a check for the Park
application because the channel needed to be masqueraded to prevent a
crash.  Since the Park application now always masquerades the channel into
the parking lot, the special check is no longer needed.  The fix also
resulted in AGI exec Park attempting to double park the call and not honor
the Park application parameters.

* Removed no longer necessary call to ast_masq_park_call() by AGI exec for
the Park application.  (Reverts -r146923)

* Fix Park application to only return 0 or -1.  The AGI exec Park was
causing broken pipe error messages because the Park application returned 1
on successful park.

(closes issue ASTERISK-18737)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@341718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-20 21:58:39 +00:00
Richard Mudgett fa58ec2c74 More parking issues.
* Fix potential deadlocks in SIP and IAX blind transfer to parking.

* Fix SIP, IAX, DAHDI analog, and MGCP channel drivers to respect the
parkext_exclusive option with transfers (Park(,,,,,exclusive_lot)
parameter).  Created ast_park_call_exten() and ast_masq_park_call_exten()
to maintian API compatibility.

* Made masq_park_call() handle a failed ast_channel_masquerade() setup.

* Reduced excessive struct parkeduser.peername[] size.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@341255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-18 21:11:42 +00:00
Terry Wilson cb6e65cdf3 Avoid unnecessary WARNING message
Add AST_CONTROL_UPDATE_RTP_PEER frame to be ignored here to avoid
displaying a WARNING message.

(closes issue ASTERISK-18610)
 Patch by: Kristijan_Vrban
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@340879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-14 16:39:36 +00:00
Richard Mudgett 3d8a367788 Fix DTMF blind transfer continuing to execute dialplan after transfer.
Party A calls Party B.
Party A DTMF blind transfers Party B to Party C.
Party A channel continues to execute dialplan.

* Fixed the return value of builtin_blindtransfer() to return the correct
value after a transfer so the dialplan will not keep executing.

* Removed unnecessary connected line update that did not really do
anything.

* Made access to GOTO_ON_BLINDXFR thread safe in check_goto_on_transfer().

* Fixed leak of xferchan for failure cases in check_goto_on_transfer().

* Updated debug messages in builtin_blindtransfer() and
check_goto_on_transfer().

(closes issue ASTERISK-18275)
Reported by: rmudgett
Tested by: rmudgett
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@340810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-13 22:54:28 +00:00
Richard Mudgett 4348fc2cc9 Convert registered AMI actions to ao2 objects.
* Fixed race between calling an AMI action callback and unregistering that
action.  Refixes ASTERISK-13784 broken by ASTERISK-17785 change.

* Fixed potential memory leak if an AMI action failed to get registered
because is already was registered.  Part of the ao2 conversion.

* Fixed AMI ListCommands action not walking the actions list with a lock
held.

* Fix usage of ast_strdupa() and alloca() in loops.  Excess stack usage.

* Fix AMI Originate action Variable header requiring a space after the
header colon.  Reported by Yaroslav Panych on the asterisk-dev list.

* Increased the number of listed variables allowed per AMI Originate
action Variable header to 64.

* Fixed AMI GetConfigJSON action output format.

* Fixed usage of res contents outside of scope in append_channel_vars().

* Fixed inconsistency of config file channelvars option.  The values no
longer accumulate with every channelvars option in the config file.  Only
the last value is kept to be consistent with the CLI "manager show
settings" command.

(closes issue ASTERISK-18479)
Reported by: Jaco Kroon
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@340281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-11 18:53:34 +00:00
Tzafrir Cohen 3275275a07 Update SHA1 code to RFC 6234
RFC 6234 is an update to RFC 3174 from which the code was originally taken.
It has a slightly better code, and a better phrased license (simple 3-clause
BSD).

* main/sha1.c is sha1.c from RFC 6234 with formatting changes only.
* include/asterisk/sha1.h merges sha.h and sha-private.h from RFC 6234.
* Removed unused include of asterisk/sha1.h from main/channels.c

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

Merge-From: http://svn.asterisk.org/svn/asterisk/branches/1.8@340263


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@340280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-11 18:41:05 +00:00
Terry Wilson 1e1100cdb4 On astdb conversion, also warn about permissions requirements
The user running Asterisk must have permission to the directory
the Asterisk database resides in since SQLite 3 needs to be able
to create a journal file.

(closes issue ASTERISK-18174)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@340222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10 22:55:39 +00:00
Matthew Nicholson 63d4530e93 Merged revisions 340108 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r340108 | mnicholson | 2011-10-10 09:14:48 -0500 (Mon, 10 Oct 2011) | 11 lines
  
  Load the proper XML documentation when multiple modules document the same application.
  
  This patch adds an optional "module" attribute to the XML documentation spec
  that allows the documentation processor to match apps with identical names from
  different modules to their documentation. This patch also fixes a number of
  bugs with the documentation processor and should make it a little more
  efficient. Support for multiple languages has also been properly implemented.
  
  ASTERISK-18130
  Review: https://reviewboard.asterisk.org/r/1485/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@340109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10 14:15:41 +00:00
Richard Mudgett 1c6e0d278d Merged revisions 339625 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r339625 | rmudgett | 2011-10-06 12:49:38 -0500 (Thu, 06 Oct 2011) | 18 lines
  
  Fix debugging messages generated by 'udptl debug'.
  
  * Makes chan_sip set the tag to the channel name.
  
  * Fixes received debug message sequence number.
  
  * Removed tx/rx debug message type since it was hard coded to 0.
  
  * Made udptl.c logged message header consistent if possible: "UDPTL (%s): ".
  
  * Removed unused rx_expected_seq_no from struct ast_udptl.
  
  (closes issue ASTERISK-18401)
  Reported by: Kevin P. Fleming
  Patches:
        jira_asterisk_18401_v1.8.patch (license #5621) patch uploaded by rmudgett
  Tested by: Matthew Nicholson
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@339626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-06 17:53:00 +00:00
Richard Mudgett b18d634377 Merged revisions 339504,339506 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r339504 | rmudgett | 2011-10-05 11:26:45 -0500 (Wed, 05 Oct 2011) | 7 lines
  
  Add missing documentation of required AMI action Challenge AuthType header.
  
  (closes issue ASTERISK-18554)
  Reported by: Vlad Povorozniuc
  Patches:
        __20110919-manager-challenge-docs.patch.txt (license #4999) patch uploaded by Leif Madsen
........
  r339506 | rmudgett | 2011-10-05 11:32:03 -0500 (Wed, 05 Oct 2011) | 1 line
  
  Fix XML error in AMI action Challenge.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@339508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-05 16:35:02 +00:00
Jonathan Rose 692ef8fdbf Merged revisions 339352 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r339352 | jrose | 2011-10-04 14:33:12 -0500 (Tue, 04 Oct 2011) | 12 lines
  
  Removes improper use of sound 'and' in German language mode from application saynumber
  
  Asterisk would say 'Five hundert und sechs und zwanzig' instead of 'Five hundert sechs
  und zwanzig'... which is both weird sounding and wrong.  This patch makes sure Asterisk
  will only say the 'and' word between the single digit and double digit places.
  
  (closes issue ASTERISK-18212)
  Reported By: Lionel Elie Mamane
  Patches:
  	upstream_germand_no_and.diff (License #5402) uploaded by Lionel Elie Mamane
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@339353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-04 19:44:02 +00:00
Terry Wilson 050f405fbc Merged revisions 339086 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r339086 | twilson | 2011-10-03 11:40:52 -0700 (Mon, 03 Oct 2011) | 10 lines
  
  Properly ignore AST_CONTROL_UPDATE_RTP_PEER in more places
  
  After the change in r336294, the new AST_CONTROL_UPDATE_RTP_PEER frame
  is sent when a re-invite happens. If we receive a re-invite from a device
  the waitstream_core was not aware of the new control frame and would drop
  the call.
  
  (closes issue ASTERISK-18610)
  	Reported by: Kristijan_Vrban
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@339088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-03 18:44:27 +00:00
Richard Mudgett 0764556d4f Merged revisions 337973 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r337973 | rmudgett | 2011-09-26 14:30:39 -0500 (Mon, 26 Sep 2011) | 30 lines
  
  Fix deadlock when using dummy channels.
  
  Dummy channels created by ast_dummy_channel_alloc() should be destoyed by
  ast_channel_unref().  Using ast_channel_release() needlessly grabs the
  channel container lock and can cause a deadlock as a result.
  
  * Analyzed use of ast_dummy_channel_alloc() and made use
  ast_channel_unref() when done with the dummy channel.  (Primary reason for
  the reported deadlock.)
  
  * Made app_dial.c:dial_exec_full() not call ast_call() holding any channel
  locks.  Chan_local could not perform deadlock avoidance correctly.
  (Potential deadlock exposed by this issue.  Secondary reason for the
  reported deadlock since the held lock was part of the deadlock chain.)
  
  * Fixed some uses of ast_dummy_channel_alloc() not checking the returned
  channel pointer for failure.
  
  * Fixed some potential chan=NULL pointer usage in func_odbc.c.  Protected
  by testing the bogus_chan value.
  
  * Fixed needlessly clearing a 1024 char auto array when setting the first
  char to zero is enough in manager.c:action_getvar().
  
  (closes issue ASTERISK-18613)
  Reported by: Thomas Arimont
  Patches:
        jira_asterisk_18613_v1.8.patch (license #5621) patch uploaded by rmudgett
  Tested by: Thomas Arimont
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@337974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-26 19:35:23 +00:00
Jonathan Rose 857e4fdb14 Generate Security events in chan_sip using new Security Events Framework
Security Events Framework was added in 1.8 and support was added for AMI to generate
events at that time. This patch adds support for chan_sip to generate security events.

(closes issue ASTERISK-18264)
Reported by: Michael L. Young
Patches:
     security_events_chan_sip_v4.patch (license #5026) by Michael L. Young
Review: https://reviewboard.asterisk.org/r/1362/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@337595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-22 15:35:50 +00:00
Gregory Nietsky 4272dcbb1a Merged revisions 337430 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r337430 | irroot | 2011-09-22 08:18:33 +0200 (Thu, 22 Sep 2011) | 19 lines
  
  Its possible to loose audio on ast_write when the channel is not transcoded correctly.
  in the case of DAHDI the channel is hungup.
  
  This patch tries to "fix" the problem and make the channel compatiable and warn the user of
  this problem.
  
  Please note there is a underlying problem with codec negotion this does not fix the problem
  it does try to rectify it and prevent loss of service.
  
  Review: https://reviewboard.asterisk.org/r/1442/
  
  (closes issue ASTERISK-17541)
  (closes issue ASTERISK-18063)
  (issue ASTERISK-14384)
  (issue ASTERISK-17502)
  (issue ASTERISK-18325)
  (issue ASTERISK-18422)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@337431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-22 06:29:09 +00:00
Olle Johansson 725dbbab22 Make ast_pbx_run() not default to s@default if extension is not found
Review: https://reviewboard.asterisk.org/r/1446/

This is a bug - or architecture mistake - that has been in Asterisk for a 
very long time. It was exposed by the AMI originate action and possibly
some other applications. Most channel drivers checks if an extension
exists BEFORE starting a pbx on an inbound call, so most calls will
not depend on this issue.

Thanks everyone involved in the review and on IRC and the mailing list
for a quick review and all the feedback.

(closes issue ASTERISK-18578)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@337219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-21 09:32:50 +00:00
Matthew Jordan 944cdaa94d Merged revisions 337118 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r337118 | mjordan | 2011-09-20 17:38:54 -0500 (Tue, 20 Sep 2011) | 21 lines
  
  Fix for incorrect voicemail duration in external notifications
  
  This patch fixes an issue where the voicemail duration was being reported
  with a duration significantly less than the actual sound file duration.
  Voicemails that contained mostly silence were reporting the duration of
  only the sound in the file, as opposed to the duration of the file with
  the silence.  This patch fixes this by having two durations reported in
  the __ast_play_and_record family of functions - the sound_duration and the
  actual duration of the file.  The sound_duration, which is optional, now
  reports the duration of the sound in the file, while the actual full duration
  of the file is reported in the duration parameter.  This allows the voicemail
  applications to use the sound_duration for minimum duration checking, while
  reporting the full duration to external parties if the voicemail is kept.
  
  (issue ASTERISK-2234)
  (closes issue ASTERISK-16981)
  Reported by: Mary Ciuciu, Byron Clark, Brad House, Karsten Wemheuer, KevinH
  Tested by: Matt Jordan
  
  Review: https://reviewboard.asterisk.org/r/1443
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@337120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20 22:49:36 +00:00
Kinsey Moore 09af5fa552 Merged revisions 337061 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r337061 | kmoore | 2011-09-20 16:04:11 -0500 (Tue, 20 Sep 2011) | 11 lines
  
  Make CANMATCH with the new pattern match engine behave more like the old one
  
  When checking an extension for E_CANMATCH using the new extension matching
  algorithm, an exact match was not returned as a possible match resulting in the
  queue failing to allow a caller to exit on DTMF.  This removes the requirement
  that an extension be longer than acquired digits for an E_CANMATCH operation
  to succeed.
  
  (closes issue ASTERISK-18044)
  Review: https://reviewboard.asterisk.org/r/1367/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@337062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20 21:05:01 +00:00
Tilghman Lesher e1c3a38653 Merged revisions 336733 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r336733 | tilghman | 2011-09-19 15:27:03 -0500 (Mon, 19 Sep 2011) | 11 lines
  
  Various changes to allow 1.8 to compile on Mac OS X Lion (10.7)
  
  * Makefile workaround for 10.6 extended to work on 10.7 and later.
  * Now uses the 'weak' symbol for Lion systems, which no longer support
    'weak_import'
  
  Closes ASTERISK-17612.
  Closes ASTERISK-18213.
  
  Tested by: tilghman, oej.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@336734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19 20:29:40 +00:00
Olle Johansson 07b63b7705 Merged revisions 336440 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r336440 | oej | 2011-09-19 14:06:48 +0200 (Mån, 19 Sep 2011) | 2 lines
  
  Make sure manager_debug option is reset at reload
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@336441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19 12:15:06 +00:00
Jonathan Rose 1701266596 Merged revisions 336294 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r336294 | jrose | 2011-09-16 14:53:40 -0500 (Fri, 16 Sep 2011) | 13 lines
  
  Fix bad RTP media bridges in directmedia calls on peers separated by multiple Asterisk nodes.
  
  In a situation involving devices on separate Asterisk trunks, the remote RTP bridge would
  break when starting a call with directmedia. This patch queues a new type of control frame
  so that our RTP bridge loop can properly detect when these situations occur and check to see
  if peers need to be updated in order to send their media to the proper location.
  
  (Closes issue ASTERISK-18340)
  Reported by: Thomas Arimont
  (Closes issue ASTERISK-17725)
  Reported by: kwk
  Tested by: twilson, jrose
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@336307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-16 21:09:20 +00:00
David Vossel 2d4def5c7f Removes some no-op code found in format_cap.c.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@336091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-15 15:19:10 +00:00
Matthew Nicholson 7d245dbc30 Merged revisions 335790 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r335790 | mnicholson | 2011-09-14 08:28:16 -0500 (Wed, 14 Sep 2011) | 4 lines
  
  The tech and data members of fast_originate_helper are not string fields.
  
  ASTERISK-17709
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@335791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-14 13:28:50 +00:00
Tzafrir Cohen 1e54d13c73 do parse defaultlanguage from asterisk.conf
Do parse the option "defaultlanguage" from the [options] section of
asterisk.conf, as in the sample config file. Otherwise the build-time
default language (normally "en") is always the default one.

Review: https://reviewboard.asterisk.org/r/1342/
Signed-off-by: Tzafrir Cohen (License #5035) <tzafrir.cohen@xorcom.com>
Original-Commit: http://svn.digium.com/svn/asterisk/branches/1.8@335716

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@335717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-13 21:37:58 +00:00
Matthew Nicholson 4acfe8e5c9 Merged revisions 335618 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r335618 | mnicholson | 2011-09-13 13:20:52 -0500 (Tue, 13 Sep 2011) | 5 lines
  
  Don't limit the size of appdata for manager originate actions.
  
  ASTERISK-17709
  Patch by: tilghman (with modifications)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@335653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-13 18:47:57 +00:00
Russell Bryant d287e6116a Merged revisions 335497 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r335497 | russell | 2011-09-13 02:11:36 -0500 (Tue, 13 Sep 2011) | 15 lines
  
  Fix a crash in res_ais.
  
  This patch resolves a crash observed in a load testing environment that
  involved the use of the res_ais module.  I observed some crashes where
  the event delivery callback would get called, but the length parameter
  incidcating how much data there was to read was 0.  The code assumed
  (with good reason I would think) that if this callback got called, there
  was an event available to read.  However, if the rare case that there's
  nothing there, catch it and return instead of blowing up.
  
  More specifically, the change always ensure that the size of the received
  event in the cluster is always big enough to be a real ast_event.
  
  Review: https://reviewboard.asterisk.org/r/1423/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@335510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-13 07:24:34 +00:00
Matthew Nicholson e0a8394e8e Merged revisions 335433 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r335433 | mnicholson | 2011-09-12 10:54:41 -0500 (Mon, 12 Sep 2011) | 6 lines
  
  Properly set caller_warning and callee_warning before we try to use them.
  
  ASTERISK-18199
  Patch by: elguero
  Testing by: rtang
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@335434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-12 15:55:48 +00:00
Matthew Jordan 4e57652651 Merged revisions 335064 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r335064 | mjordan | 2011-09-09 11:09:09 -0500 (Fri, 09 Sep 2011) | 23 lines
  
  Updated SIP 484 handling; added Incomplete control frame
  
  When a SIP phone uses the dial application and receives a 484 Address 
  Incomplete response, if overlapped dialing is enabled for SIP, then
  the 484 Address Incomplete is forwarded back to the SIP phone and the
  HANGUPCAUSE channel variable is set to 28.  Previously, the Incomplete
  application dialplan logic was automatically triggered; now, explicit
  dialplan usage of the application is required.
  
  Additionally, this patch adds a new AST_CONTOL_FRAME type called
  AST_CONTROL_INCOMPLETE.  If a channel driver receives this control frame,
  it is an indication that the dialplan expects more digits back from the
  device.  If the device supports overlap dialing it should attempt to 
  notify the device that the dialplan is waiting for more digits; otherwise,
  it can handle the frame in a manner appropriate to the channel driver.
  
  (closes issue ASTERISK-17288)
  Reported by: Mikael Carlsson
  Tested by: Matthew Jordan
  
  Review: https://reviewboard.asterisk.org/r/1416/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@335078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-09 16:27:01 +00:00
Richard Mudgett ce8cb2769e Merged revisions 334953 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r334953 | rmudgett | 2011-09-08 17:27:40 -0500 (Thu, 08 Sep 2011) | 10 lines
  
  Fix crash with res_fax when MALLOC_DEBUG and "core stop gracefully" are used.
  
  Asterisk crashes if MALLOC_DEBUG is enabled when res_fax tries to
  unregister its logger level.
  
  * Make ast_logger_unregister_level() use ast_free() instead of free().
  When MALLOC_DEBUG is enabled, ast_free() does not degenerate into a call
  to free().  Therefore, if you allocated memory with a form of ast_malloc
  you must free it with ast_free.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@334954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-08 22:28:56 +00:00
Richard Mudgett 7617bf7bfe Merged revisions 334840 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r334840 | rmudgett | 2011-09-07 14:31:44 -0500 (Wed, 07 Sep 2011) | 10 lines
  
  Fix AMI action Park crash.
  
  * Made AMI action Park not say anything to the parker channel (AMI header
  Channel2) since the AMI action is a third party parking the call.  (This
  is a change in behavior that cannot be preserved without a lot of effort.)
  
  * Made not play pbx-parkingfailed if the Park 's' option is used.
  
  JIRA AST-660
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@334841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 19:33:38 +00:00
Stefan Schmidt 3badf91d58 Merged revisions 334682 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r334682 | schmidts | 2011-09-07 13:26:50 +0000 (Wed, 07 Sep 2011) | 3 lines
  
  Adding the Feature to sent a Reason Header in a SIP Cancel message by set the flag AST_FLAG_ANSWERED_ELSEWHERE before doing a masquerade in the pickup function.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@334747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 15:10:37 +00:00
Stefan Schmidt 8211ef0f13 another clean up
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@334746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 15:07:51 +00:00
Stefan Schmidt 1e13555525 Adding the Feature to sent a Reason Header in a SIP Cancel message by set the flag AST_FLAG_ANSWERED_ELSEWHERE before doing a masquerade in the pickup function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@334682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 13:26:50 +00:00
Alec L Davis b8a0261ffb Merged revisions 334616 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r334616 | alecdavis | 2011-09-07 19:33:39 +1200 (Wed, 07 Sep 2011) | 10 lines
  
  Prevent segfault if call arrives before Asterisk is fully booted.
  
  Prevent ast_pbx_start and ast_run_start from starting a new thread unless asterisk
  is fully booted.
   
  alecdavis (license 585)
  Tested by: alecdavis
   
  Review: https://reviewboard.asterisk.org/r/1407/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@334617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 07:45:00 +00:00
Richard Mudgett 57acdddb2d Merged revisions 334296 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r334296 | rmudgett | 2011-09-02 12:10:58 -0500 (Fri, 02 Sep 2011) | 39 lines
  
  Fix potential memory allocation failure crashes in config.c.
  
  * Added required checks to the returned memory allocation pointers to
  prevent crashes.
  
  * Made ast_include_rename() create a replacement ast_variable list node if
  the new filename is longer than the available space.  Fixes potential
  crash and memory leak.
  
  * Factored out ast_variable_move() from ast_variable_update() so
  ast_include_rename() can also use it when creating a replacement
  ast_variable list node.
  
  * Made the filename stuffed at the end of the struct a minimum allocated
  size in ast_variable_new() in case ast_include_rename() changes the stored
  filename.
  
  * Constify struct char pointers pointing to strings stuffed at the end of
  the struct for: ast_variable, cache_file_mtime, and ast_config_map.
  
  * Factored out cfmtime_new() to remove inlined code and allow some struct
  pointers to become const.
  
  * Removed the list lock from struct cache_file_mtime that was never used.
  
  * Added doxygen comments to several structure elements and better
  documented what strings are stuffed at the struct end char array.
  
  * Reworked ast_config_text_file_save() and set_fn() to handle allocation
  failure of the include file scratch pad object tracking blank lines.
  
  * Made ast_config_text_file_save() fn[] declared with PATH_MAX to ensure
  it is long enough for any filename with path.  Also reduced the number of
  container fileset buckets from a rediculus 180,000 to 1023.
  
  JIRA AST-618
  
  Review: https://reviewboard.asterisk.org/r/1378/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@334297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-02 17:15:08 +00:00
Tilghman Lesher e8135ee3d0 Merged revisions 334234 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r334234 | tilghman | 2011-09-01 12:38:33 -0500 (Thu, 01 Sep 2011) | 2 lines
  
  Remove 1.6 compatibility documentation from 1.8, as it no longer applies.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@334235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-01 17:39:32 +00:00
Richard Mudgett e6de0ecf48 Merged revisions 334009 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r334009 | rmudgett | 2011-08-31 10:20:31 -0500 (Wed, 31 Aug 2011) | 43 lines
  
  Call pickup race leaves orphaned channels or crashes.
  
  Multiple users attempting to pickup a call that has been forked to
  multiple extensions either crashes or fails a masquerade with a "bad
  things may happen" message.
  
  This is the scenario that is causing all the grief:
  1) Pickup target is selected
  2) target is marked as being picked up in ast_do_pickup()
  3) target is unlocked by ast_do_pickup()
  4) app dial or queue gets a chance to hang up losing calls and calls
  ast_hangup() on target
  5) SINCE A MASQUERADE HAS NOT BEEN SETUP YET BY ast_do_pickup() with
  ast_channel_masquerade(), ast_hangup() completes successfully and the
  channel is no longer in the channels container.
  6) ast_do_pickup() then calls ast_channel_masquerade() to schedule the
  masquerade on the dead channel.
  7) ast_do_pickup() then calls ast_do_masquerade() on the dead channel
  8) bad things happen while doing the masquerade and in the process
  ast_do_masquerade() puts the dead channel back into the channels container
  9) The "orphaned" channel is visible in the channels list if a crash does
  not happen.
  
  This patch does the following:
  
  * Made ast_hangup() set AST_FLAG_ZOMBIE on a successfully hung-up channel
  and not release the channel lock until that has happened.
  
  * Made __ast_channel_masquerade() not setup a masquerade if either channel
  has AST_FLAG_ZOMBIE set.
  
  * Fix chan_agent misuse of AST_FLAG_ZOMBIE since it would no longer work.
  
  (closes issue ASTERISK-18222)
  Reported by: Alec Davis
  Tested by: rmudgett, Alec Davis, irroot, Karsten Wemheuer
  
  (closes issue ASTERISK-18273)
  Reported by: Karsten Wemheuer
  Tested by: rmudgett, Alec Davis, irroot, Karsten Wemheuer
  
  Review: https://reviewboard.asterisk.org/r/1400/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@334010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-31 15:23:11 +00:00
Terry Wilson 90c4666e77 Use realtime text when it is negotiated
This patch make use of wirte_text() realtime text instead of
send_text() if T.140 is in native formats. ASTERISK-17937

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@333681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-29 17:28:59 +00:00
Richard Mudgett c69f237d3d Merged revisions 332939 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r332939 | rmudgett | 2011-08-22 16:22:24 -0500 (Mon, 22 Aug 2011) | 7 lines
  
  Minor code optimizations.
  
  * Simplify ast_category_browse() logic for easier understanding.
  
  * Remove dead code in ast_variable_delete() and simplify some of its
  logic.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@332940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 21:23:40 +00:00