]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
13 years agoFix Dial F option notes formatting.
Richard Mudgett [Wed, 5 Oct 2011 17:01:01 +0000 (17:01 +0000)] 
Fix Dial F option notes formatting.

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

13 years agoFix XML error in AMI action Challenge.
Richard Mudgett [Wed, 5 Oct 2011 16:32:03 +0000 (16:32 +0000)] 
Fix XML error in AMI action Challenge.

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

13 years agoThe app name in the documentation must match what we register the application
Matthew Nicholson [Wed, 5 Oct 2011 16:31:21 +0000 (16:31 +0000)] 
The app name in the documentation must match what we register the application
as.

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

13 years agoAdd missing documentation of required AMI action Challenge AuthType header.
Richard Mudgett [Wed, 5 Oct 2011 16:26:45 +0000 (16:26 +0000)] 
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

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

13 years agoMake always create the MOH directory (/var/lib/asterisk/moh).
Richard Mudgett [Tue, 4 Oct 2011 22:54:15 +0000 (22:54 +0000)] 
Make always create the MOH directory (/var/lib/asterisk/moh).

(closes issue ASTERISK-18409)
Reported by: abelbeck
Patches:
      asterisk-1.8-makefile-moh.patch (license #5903) patch uploaded by abelbeck
Tested by: abelbeck, Michael Keuter

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

13 years agoRemoves improper use of sound 'and' in German language mode from application saynumber
Jonathan Rose [Tue, 4 Oct 2011 19:33:12 +0000 (19:33 +0000)] 
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/1.8@339352 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoReverting revision 333265 due to component connection problems it introduces.
Jonathan Rose [Tue, 4 Oct 2011 14:01:05 +0000 (14:01 +0000)] 
Reverting revision 333265 due to component connection problems it introduces.

I'm going to attempt some generic res_jabber cleanup and come up with a new fix for this
problem, but first it seems prudent to remove this rather broad attempt to fix it and
instead approach this problem either from the same angle but looking only at canceling
(or possibly rescheduling) the send when we absolutely know it will cause a segfault
or, if that can't be easily accomplished, strictly from the devstate side of things.
Also, I'm pretty sure a lot of the code in res_jabber isn't thread safe.

(issue ASTERISK-18626)
(issue ASTERISK-18078)

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

13 years agofix forget declaration in previous change
Alexandr Anikin [Tue, 4 Oct 2011 11:44:55 +0000 (11:44 +0000)] 
fix forget declaration in previous change

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

13 years agoRemove duplicated Maxforwards line in AMI output.
Leif Madsen [Mon, 3 Oct 2011 20:12:43 +0000 (20:12 +0000)] 
Remove duplicated Maxforwards line in AMI output.

(Closes issue ASTERISK-18637)
Reported by: Jacek Konieczny
Patches:
     asterisk-sipshowpeer.patch (License #6298) uploaded by Jacek Konieczny

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

13 years agoMake documentation for Dial() options 'F' and 'F()' more clear.
Leif Madsen [Mon, 3 Oct 2011 19:54:52 +0000 (19:54 +0000)] 
Make documentation for Dial() options 'F' and 'F()' more clear.

(Closes issue ASTERISK-18646)
Reported by: Physis Heckman
Tested by: Richard Mudgett

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

13 years agodestroy memheap mutex properly before memheap deleted
Alexandr Anikin [Mon, 3 Oct 2011 18:42:49 +0000 (18:42 +0000)] 
destroy memheap mutex properly before memheap deleted
(fix memory leak occured after r304950 changes with DEBUG_THREAD compile option)

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

13 years agoProperly ignore AST_CONTROL_UPDATE_RTP_PEER in more places
Terry Wilson [Mon, 3 Oct 2011 18:40:52 +0000 (18:40 +0000)] 
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/1.8@339086 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoFix segfault in analog_ss_thread() not checking ast_read() for NULL.
Richard Mudgett [Fri, 30 Sep 2011 22:05:10 +0000 (22:05 +0000)] 
Fix segfault in analog_ss_thread() not checking ast_read() for NULL.

NOTE: The problem was reported against v1.6.2.  It is unlikely to ever
happen on v1.8 and above since chan_dahdi.c:analog_ss_thread() is unlikely
to be used.  The version in sig_analog.c has largely replaced it.

(closes issue ASTERISK-18648)
Reported by: Stephan Bosch
Patches:
      jira_asterisk_18648_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Stephan Bosch

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

13 years agoAdds documentation for QueueMemberStatus event generation
Jonathan Rose [Fri, 30 Sep 2011 18:54:30 +0000 (18:54 +0000)] 
Adds documentation for QueueMemberStatus event generation

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

13 years agoFix formatting of AMI header for SIP show peer.
Richard Mudgett [Fri, 30 Sep 2011 16:27:21 +0000 (16:27 +0000)] 
Fix formatting of AMI header for SIP show peer.

ASTERISK-17486 exposed the problem for AMI parsers.

(closes issue ASTERISK-18649)
Reported by: Jacek Konieczny
Patches:
      asterisk-sipshowpeer_response_end.patch (license #6298) patch uploaded by Jacek Konieczny

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

13 years agoRemove r338137 and r338138.
TransNexus OSP Development [Fri, 30 Sep 2011 09:31:48 +0000 (09:31 +0000)] 
Remove r338137 and r338138.

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

13 years agoTest modules should depend on the TEST_FRAMEWORK flag
Paul Belanger [Thu, 29 Sep 2011 21:12:21 +0000 (21:12 +0000)] 
Test modules should depend on the TEST_FRAMEWORK flag

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

13 years agoTest modules have a support level of core.
Jason Parker [Thu, 29 Sep 2011 20:54:13 +0000 (20:54 +0000)] 
Test modules have a support level of core.

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

13 years agoUpdate documentation for SIP_HEADER.
Leif Madsen [Thu, 29 Sep 2011 18:31:33 +0000 (18:31 +0000)] 
Update documentation for SIP_HEADER.

The SIP_HEADER function only works on the the initial SIP INVITE. The documentation was updated
in trunk, but not in 1.8 or 10, so I'm making them match.

(Closes issue ASTERISK-18640)

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

13 years agoThe rtptimeout setting is ignored on a per peer basis.
Gregory Nietsky [Thu, 29 Sep 2011 12:13:05 +0000 (12:13 +0000)] 
The rtptimeout setting is ignored on a per peer basis.

Not only is the rtptimeout ignored in some cases but
rtpkeepalive and rtpholdtimeout is affected.

this commit also removes rtptimeout/rtpholdtimeout on
text rtp.

(closes issue ASTERISK-18559)

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

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

13 years agoMake duplicate call ptr warning message more helpful.
Richard Mudgett [Wed, 28 Sep 2011 22:35:52 +0000 (22:35 +0000)] 
Make duplicate call ptr warning message more helpful.

* Adds the value of the call ptr to the duplicate call ptr message to help
trace why there is a duplicate call ptr.

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

13 years agoFix inconsistency in LOG_VERBOSE/AST_LOG_VERBOSE declaration.
Richard Mudgett [Wed, 28 Sep 2011 21:17:45 +0000 (21:17 +0000)] 
Fix inconsistency in LOG_VERBOSE/AST_LOG_VERBOSE declaration.

(closes issue ASTERISK-17973)
Reported by: Luke H
Patches:
      logger_h.patch (license #6278) patch uploaded by Luke H

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

13 years agoAdd support levels to non-module sections of menuselect (cflags, utils, etc).
Jason Parker [Wed, 28 Sep 2011 20:52:47 +0000 (20:52 +0000)] 
Add support levels to non-module sections of menuselect (cflags, utils, etc).

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

13 years agoFix chan_dahd compiling with gcc 4.6 when PRI and SS7 not present.
Richard Mudgett [Wed, 28 Sep 2011 20:24:41 +0000 (20:24 +0000)] 
Fix chan_dahd compiling with gcc 4.6 when PRI and SS7 not present.

(closes issue ASTERISK-18357)
Reported by: Matthew Nicholson

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

13 years agoUpdated for checking OSP Toolkit version 4.0.0.
TransNexus OSP Development [Wed, 28 Sep 2011 07:28:43 +0000 (07:28 +0000)] 
Updated for checking OSP Toolkit version 4.0.0.

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

13 years agoUpdated for OSP Toolkit 4.0.0.
TransNexus OSP Development [Wed, 28 Sep 2011 07:27:07 +0000 (07:27 +0000)] 
Updated for OSP Toolkit 4.0.0.

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

13 years agoUpgrade app_macro to core
Paul Belanger [Tue, 27 Sep 2011 20:10:13 +0000 (20:10 +0000)] 
Upgrade app_macro to core

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

13 years agoFix deadlock when using dummy channels.
Richard Mudgett [Mon, 26 Sep 2011 19:30:39 +0000 (19:30 +0000)] 
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/1.8@337973 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoSpelling fix
Gregory Nietsky [Fri, 23 Sep 2011 19:14:30 +0000 (19:14 +0000)] 
Spelling fix

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

13 years agoMake sure a CDR is on the stack for call in the Queue.
Gregory Nietsky [Fri, 23 Sep 2011 08:34:03 +0000 (08:34 +0000)] 
Make sure a CDR is on the stack for call in the Queue.
Only let update_cdr act on the last CDR in the stack.

In some circumstances [Attended transfer to queue] a
CDR record is not inserted for this call where it should.

(closes issue ASTERISK-18567)

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

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

13 years agoComment out entries in sample res_pktccops.conf.
Russell Bryant [Fri, 23 Sep 2011 00:44:19 +0000 (00:44 +0000)] 
Comment out entries in sample res_pktccops.conf.

With these options enabled, they can cause Asterisk to freak out by
SYN flooding a network and eating the CPU.  Obviously it would be good to
fix the code so that this can't happen, but we can at least change the default
configuration so it doesn't happen.

This was reported downstream to the Fedora issue tracker:

    https://bugzilla.redhat.com/show_bug.cgi?id=658431

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

13 years agoMade ISDN not add numbering plan prefix strings to empty numbers.
Richard Mudgett [Thu, 22 Sep 2011 21:29:46 +0000 (21:29 +0000)] 
Made ISDN not add numbering plan prefix strings to empty numbers.

When the Caller-ID is restricted, the expected behavior is for the
Caller-ID to be blank.  In chan_dahdi, the national prefix is placed onto
the Caller-ID number even if it is restricted (empty) causing the
Caller-ID to be the national prefix rather than blank.

This behavior was lost when sig_pri was extracted from chan_dahdi.

* Made not add prefix strings to empty connected line, calling, and ANI
number strings.

(closes issue ASTERISK-18577)
Reported by: Kris Shaw
Patches:
      jira_asterisk_18577_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Kris Shaw

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

13 years agoAdd warned to ast_srtp to prevent errors on each frame from libsrtp
Gregory Nietsky [Thu, 22 Sep 2011 11:39:49 +0000 (11:39 +0000)] 
Add warned to ast_srtp to prevent errors on each frame from libsrtp

The first 9 frames are not reported as some devices dont use srtp
from first frame these are suppresed.

the warning is then output only once every 100 frames.

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

13 years agoIf IP address is used in chan_h323 host parameter of peer configuration.
Gregory Nietsky [Thu, 22 Sep 2011 09:22:26 +0000 (09:22 +0000)] 
If IP address is used in chan_h323 host parameter of peer configuration.
module tries to resolve IP address to IP address and fails.

Simple fix to set family of socket this is a hangover from ipv6 changes.

(closes issue ASTERISK-18237)
(issue ASTERISK-17278)
(issue ASTERISK-17500)

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

13 years agoIts possible to loose audio on ast_write when the channel is not transcoded correctly.
Gregory Nietsky [Thu, 22 Sep 2011 06:18:33 +0000 (06:18 +0000)] 
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/1.8@337430 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMore silly spacing changes
Tilghman Lesher [Wed, 21 Sep 2011 21:18:46 +0000 (21:18 +0000)] 
More silly spacing changes

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

13 years agoDumb little spacing fix.
Tilghman Lesher [Wed, 21 Sep 2011 21:08:06 +0000 (21:08 +0000)] 
Dumb little spacing fix.

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

13 years agoEscape commas in keys and values, when keys and values are enumerated by commas.
Tilghman Lesher [Wed, 21 Sep 2011 16:05:14 +0000 (16:05 +0000)] 
Escape commas in keys and values, when keys and values are enumerated by commas.

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

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

13 years agoFix for incorrect voicemail duration in external notifications
Matthew Jordan [Tue, 20 Sep 2011 22:38:54 +0000 (22:38 +0000)] 
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/1.8@337118 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoUpdate RedHat Init script to work with Heartbeat.
Leif Madsen [Tue, 20 Sep 2011 22:18:25 +0000 (22:18 +0000)] 
Update RedHat Init script to work with Heartbeat.

The current RedHat init script was not LSB compatible. This change will make it LSB compatible so that
it can work correctly with Heartbeat.

(Closes issue ASTERISK-18253)
Reported by: c0rnoTa

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

13 years agoMake CANMATCH with the new pattern match engine behave more like the old one
Kinsey Moore [Tue, 20 Sep 2011 21:04:11 +0000 (21:04 +0000)] 
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/1.8@337061 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoCheck if a channel was created before using the pointer in sig_ss7_new_ast_channel().
Richard Mudgett [Tue, 20 Sep 2011 19:10:30 +0000 (19:10 +0000)] 
Check if a channel was created before using the pointer in sig_ss7_new_ast_channel().

Fixes the crash in ASTERISK-17955 gdb-11918.txt backtrace.

* Added some missing libss7 access lock protection.

* Prevent cancelling the ss7_linkset() thread at inoportune times just
like the pri_dchannel() thread.

(issue ASTERISK-17955)
Reported by: Ian M Sherman
Patches:
      jira_asterisk_17955_v1.8.patch (license #5621) patch uploaded by rmudgett
      (attached to related ASTERISK-17966)

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

13 years agoFix deadlock from not releasing SS7 linkset lock.
Richard Mudgett [Tue, 20 Sep 2011 18:12:17 +0000 (18:12 +0000)] 
Fix deadlock from not releasing SS7 linkset lock.

sig_ss7_hangup() failed to release the SS7 linkset lock if the call had
the alreadyhungup flag set.

* Made unlock the SS7 linkset lock in sig_ss7_hangup() if the
alreadyhungup flag is set.

* Made ss7_start_call() not hold any locks while creating the channel for
an incoming call to prevent deadlock.

* Made ss7_grab() a void function, since it could never fail, to simplify
calling code.

* Made obtain the channel lock to do softhangup in some places.

Patches:
      jira_ast_668_v1.8.patch (license #5621) patch uploaded by rmudgett

JIRA AST-668

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

13 years agoFix crashes in ast_rtcp_write().
Russell Bryant [Tue, 20 Sep 2011 00:56:20 +0000 (00:56 +0000)] 
Fix crashes in ast_rtcp_write().

This patch addresses crashes related to RTCP handling.  The backtraces just
show a crash in ast_rtcp_write() where it appears that the RTP instance is no
longer valid.  There is a race condition with scheduled RTCP transmissions and
the destruction of the RTP instance.  This patch utilizes the fact that
ast_rtp_instance is a reference counted object and ensures that it will not get
destroyed while a reference is still around due to scheduled RTCP
transmissions.

RTCP transmissions are scheduled and executed from the chan_sip scheduler
context.  This scheduler context is processed in the SIP monitor thread.  The
destruction of an RTP instance occurs when the associated sip_pvt gets
destroyed (which happens when the sip_pvt reference count reaches 0).  However,
the SIP monitor thread is not the only thread that can cause a sip_pvt to get
destroyed.  The sip_hangup function, executed from a channel thread, also
decrements the reference count on a sip_pvt and could cause it to get
destroyed.

While this is being changed anyway, the patch also removes calling
ast_sched_del() from within the RTCP scheduler callback.  It's not helpful.
Simply returning 0 prevents the callback from being rescheduled.

(closes issue ASTERISK-18570)

Related issues that look like they are the same problem:

(issue ASTERISK-17560)
(issue ASTERISK-15406)
(issue ASTERISK-15257)
(issue ASTERISK-13334)
(issue ASTERISK-9977)
(issue ASTERISK-9716)

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

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

13 years agoDon't interfere with T.38 reinvites
Terry Wilson [Mon, 19 Sep 2011 22:07:58 +0000 (22:07 +0000)] 
Don't interfere with T.38 reinvites

This is an update to the fix for ASTERISK-18340 and ASTERISK-17725

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

13 years agoVarious changes to allow 1.8 to compile on Mac OS X Lion (10.7)
Tilghman Lesher [Mon, 19 Sep 2011 20:27:03 +0000 (20:27 +0000)] 
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/1.8@336733 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoDocument applications that play audio and do not answer unanswered calls.
Jonathan Rose [Mon, 19 Sep 2011 20:07:36 +0000 (20:07 +0000)] 
Document applications that play audio and do not answer unanswered calls.

This patch is part of an effort to document early media and its usage. If you are
interested in contributing to this documentation effort, there are probably other
applications worth documenting as well as an Asterisk wiki article at
https://wiki.asterisk.org/wiki/display/AST/Early+Media+and+the+Progress+Application

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

13 years agoMade Dial d and H options no longer immediately auto-answer the calling leg.
Richard Mudgett [Mon, 19 Sep 2011 18:46:40 +0000 (18:46 +0000)] 
Made Dial d and H options no longer immediately auto-answer the calling leg.

The Dial d and H options break DTMF attended transfer atxferdropcall
option.

1) Party A calls party B.
2) Party B does a DTMF attended transfer to Party C.

If the dialplan uses the Dial d or H options to call Party C then the Dial
application answers the call immediately before initiating the call leg to
Party C.  The premature answer causes the transfer code to not invoke the
atxferdropcall=no behavior for a blonde transfer since Party C has
"answered".  The transfer code thinks that Party B has "consulted" with
Party C when Party B hangs up and completes the transfer to Party A.
Party A now hears ringback until Party C actually answers.

ASTERISK-13294 Dial d option.
ASTERISK-11067 Dial H option to disconnect before answer.

The referenced issues made Dial answer with the d and H options because
many SIP and ISDN phones cannot send DTMF before the call is connected.

* Made require the dialplan to control when or if the call needs to be
answered to use the Dial application d and H options.  (The call is no
longer surprise answered when using the Dial d or H options.)

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

JIRA AST-623
JIRA AST-666

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

13 years agoRemove weird mergeinfo props that make merges annoying sometimes.
Jason Parker [Mon, 19 Sep 2011 16:21:03 +0000 (16:21 +0000)] 
Remove weird mergeinfo props that make merges annoying sometimes.

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

13 years agoUpdate get_ilbc_source.sh script to work again.
Leif Madsen [Mon, 19 Sep 2011 15:41:16 +0000 (15:41 +0000)] 
Update get_ilbc_source.sh script to work again.

Recently iLBC support in Asterisk has changed after the acquisition of GIPS
by Google. More information about how this may affect you is available in a
blog post at:

  http://blogs.asterisk.org/2011/09/19/ilbc-support-in-asterisk-after-googles-acquisition-of-gips/

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

13 years agoRework sig_pri_hangup() to be simpler and clearer.
Richard Mudgett [Mon, 19 Sep 2011 15:25:34 +0000 (15:25 +0000)] 
Rework sig_pri_hangup() to be simpler and clearer.

JIRA AST-675

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

13 years agoAdd diversion header to a 302 redirect response if we have diversion data
Olle Johansson [Mon, 19 Sep 2011 13:33:50 +0000 (13:33 +0000)] 
Add diversion header to a 302 redirect response if we have diversion data

(closes issue ASTERISK-18143)
patch by oej

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

13 years agoA long time ago in a galaxy far far away a IPv6 update was made,
Gregory Nietsky [Mon, 19 Sep 2011 13:27:52 +0000 (13:27 +0000)] 
A long time ago in a galaxy far far away a IPv6 update was made,
chan_h323 was not updated causeing all to flee to chan_ooh323.

the brave Jedi [asterisk developers] pondered this miscarrige of justice
and restored order to the force for the sake of closing out 2 old issues.

(closes issue ASTERISK-17278)
(closes issue ASTERISK-17500)
Reported by: dread, sybasesql
Tested by: irroot
Reviewed by: IRC (russellb, kpfleming)

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

13 years agoMake sure manager_debug option is reset at reload
Olle Johansson [Mon, 19 Sep 2011 12:06:48 +0000 (12:06 +0000)] 
Make sure manager_debug option is reset at reload

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

13 years agoRevert accidental change that fixes OS/X Lion support
Olle Johansson [Mon, 19 Sep 2011 10:02:07 +0000 (10:02 +0000)] 
Revert accidental change that fixes OS/X Lion support

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

13 years agoAdd missing unlock at MWI message sending time
Olle Johansson [Mon, 19 Sep 2011 09:40:44 +0000 (09:40 +0000)] 
Add missing unlock at MWI message sending time

(closes issue ASTERISK-18573)

Patches:
   sip_mwi_lock.patch (license #5041) by Gregory Hinton Nietsky

Thanks to irrot for the reminder, to Gregory for the patch!

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

13 years agoWhitespace fix
Terry Wilson [Fri, 16 Sep 2011 22:10:56 +0000 (22:10 +0000)] 
Whitespace fix

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

13 years agoAdd missing frame types to func_frame_trace
Terry Wilson [Fri, 16 Sep 2011 22:04:25 +0000 (22:04 +0000)] 
Add missing frame types to func_frame_trace

Also casts control frames to the proper enum so that the compile will catch
new additions.

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

13 years agoFix bad RTP media bridges in directmedia calls on peers separated by multiple Asteris...
Jonathan Rose [Fri, 16 Sep 2011 19:53:40 +0000 (19:53 +0000)] 
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/1.8@336294 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMake a note that inotify won't work with an NFS mounted spooler directory.
Sean Bright [Fri, 16 Sep 2011 19:06:27 +0000 (19:06 +0000)] 
Make a note that inotify won't work with an NFS mounted spooler directory.

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

13 years agoThe round robin routing routine in chan_misdn.c is broken.
Gregory Nietsky [Fri, 16 Sep 2011 10:09:17 +0000 (10:09 +0000)] 
The round robin routing routine in chan_misdn.c is broken.

it rotates between ports but never checks the channels in the ports.

i have extensivly tested it and verified it works on 1 upto 4 ports.
before the patch only 1 out of each port was used now all are used as
expected.

(closes issue ASTERISK-18413)
Reported by: irroot
Tested by: irroot
Reviewed by: irroot

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

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

13 years agoLocking order in app_queue.c causes deadlocks.
Gregory Nietsky [Thu, 15 Sep 2011 15:46:21 +0000 (15:46 +0000)] 
Locking order in app_queue.c causes deadlocks.

a channel lock must never be held with the queues container lock held.

the deadlock occured on masquerade.

the queues container lock is a relic of the past the old queue module lock.
with ao2 there is no need to hold this lock when dealing with members this
patch removes unneeded locks.

(closes issue ASTERISK-18101)
(closes issue ASTERISK-18487)
Reported by: Paul Rolfe, Jason Legault
Tested by: irroot, Jason Legault, Paul Rolfe
Reviewed by: Matthew Nicholson

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

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

13 years agolock the channel before calling ast_bridged_channel() to prevent a seg fault.
Gregory Nietsky [Thu, 15 Sep 2011 08:15:22 +0000 (08:15 +0000)] 
lock the channel before calling ast_bridged_channel() to prevent a seg fault.

AMI agents list called on shutdown causes a segfault, introducing proper locking
will prevent this.

(closes issue ASTERISK-18092)

Reported by: agustina
Patches: chan_agent.patch (License #5041) patch uploaded by irroot

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

13 years agoRemove unnecessary libpri dependency checks in the configure script.
Richard Mudgett [Wed, 14 Sep 2011 18:21:35 +0000 (18:21 +0000)] 
Remove unnecessary libpri dependency checks in the configure script.

Using the --with-pri option with the configure script generated an error
about not having PRI_L2_PERSISTENCE if you did not have the absolute
latest libpri SVN checkout installed.

The AST_EXT_LIB_SETUP_DEPENDENT macro in the configure.ac script seems to
be for libraries that are dependent upon other libraries and not
necessarily for optional/added features within a library.

(closes issue ASTERISK-18535)
Reported by: Michael Keuter

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

13 years agoFixed cut-n-paste regression using the wrong variable.
Richard Mudgett [Wed, 14 Sep 2011 15:53:25 +0000 (15:53 +0000)] 
Fixed cut-n-paste regression using the wrong variable.

Fixes the missing DAHDI channels when using the newer chan_dahdi.conf
sections for channel configuration.

(closes issue ASTERISK-18496)
Reported by: Sean Darcy
Patches:
      jira_asterisk_18496_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Sean Darcy, rmudgett

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

13 years agoThe tech and data members of fast_originate_helper are not string fields.
Matthew Nicholson [Wed, 14 Sep 2011 13:28:16 +0000 (13:28 +0000)] 
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/1.8@335790 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoRemove obsolete todo comment about PICKUPRESULT.
Richard Mudgett [Tue, 13 Sep 2011 22:10:15 +0000 (22:10 +0000)] 
Remove obsolete todo comment about PICKUPRESULT.

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

13 years agodo parse defaultlanguage from asterisk.conf
Tzafrir Cohen [Tue, 13 Sep 2011 21:33:20 +0000 (21:33 +0000)] 
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>
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@335716 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMeetme should have 'core' support level
Paul Belanger [Tue, 13 Sep 2011 21:30:18 +0000 (21:30 +0000)] 
Meetme should have 'core' support level

(closes issue ASTERISK-18542)

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

13 years agoMove mandatory checks closer to the beginning of the file.
Tilghman Lesher [Tue, 13 Sep 2011 18:52:38 +0000 (18:52 +0000)] 
Move mandatory checks closer to the beginning of the file.

If these are going to fail, they should fail as quickly as possible.

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

13 years agoDon't limit the size of appdata for manager originate actions.
Matthew Nicholson [Tue, 13 Sep 2011 18:20:52 +0000 (18:20 +0000)] 
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/1.8@335618 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoFix a crash in res_ais.
Russell Bryant [Tue, 13 Sep 2011 07:11:36 +0000 (07:11 +0000)] 
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/1.8@335497 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoProperly set caller_warning and callee_warning before we try to use them.
Matthew Nicholson [Mon, 12 Sep 2011 15:54:41 +0000 (15:54 +0000)] 
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/1.8@335433 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoPrevent a race condition when the bridge technology changes. This change was
Matthew Nicholson [Mon, 12 Sep 2011 15:49:24 +0000 (15:49 +0000)] 
Prevent a race condition when the bridge technology changes. This change was
ported from asterisk 10.

ASTERISK-18155

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

13 years agoEnsure frames are not written to dialed channel if ringback is requested
Kinsey Moore [Mon, 12 Sep 2011 14:21:17 +0000 (14:21 +0000)] 
Ensure frames are not written to dialed channel if ringback is requested

When a single channel was dialed and there was media to be forwarded to the
calling channel, the media was written without regard for ringback causing
silence to be heard in some circumstances.  This regression was introduced
when the meaning of "single" changed to mean only the number of channels
dialed.

(closes issue ASTERISK-18083)

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

13 years agoPrevent IAX2 from getting IPv6 addresses via DNS
Kinsey Moore [Mon, 12 Sep 2011 13:25:42 +0000 (13:25 +0000)] 
Prevent IAX2 from getting IPv6 addresses via DNS

IAX2 does not support IPv6 and getting such addresses from DNS can cause error
messages on the remote end involving bad IPv4 address casts in the presence of
IPv6/IPv4 tunnels.  This patch ensures that IAX2 will not encounter IPv6
addresses via DNS queries.

(closes issue ASTERISK-18090)

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

13 years agoLock the peer->mvipvt to avoid crashes with SIP history enabled
Olle Johansson [Mon, 12 Sep 2011 13:25:30 +0000 (13:25 +0000)] 
Lock the peer->mvipvt to avoid crashes with SIP history enabled

After the launch of 1.6 event-based MWI we have two threads handling the peer->mwipvt,
which cause issues with SIP history additions in combination with the max limit for
number of history entries.

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

(closes issue ASTERISK-18288)

Thanks to irrot for peer review. Work with this bug funded by IPvision AS

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

13 years agobuild_peer doesnt unlink a peer object from peers_by_ip container which leads to...
Stefan Schmidt [Mon, 12 Sep 2011 11:09:19 +0000 (11:09 +0000)] 
build_peer doesnt unlink a peer object from peers_by_ip container which leads to a wrong refcounter value.
adding an ao2_unlink from the peers_by_ip container fix it.

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

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

13 years agoUpdated SIP 484 handling; added Incomplete control frame
Matthew Jordan [Fri, 9 Sep 2011 16:09:09 +0000 (16:09 +0000)] 
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/1.8@335064 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoFix crash with res_fax when MALLOC_DEBUG and "core stop gracefully" are used.
Richard Mudgett [Thu, 8 Sep 2011 22:27:40 +0000 (22:27 +0000)] 
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/1.8@334953 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoCleanup chan_iax2.c log messages
Paul Belanger [Wed, 7 Sep 2011 19:35:52 +0000 (19:35 +0000)] 
Cleanup chan_iax2.c log messages

Review: https://code.asterisk.org/code/cru/CR-AST-11

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

13 years agoFix AMI action Park crash.
Richard Mudgett [Wed, 7 Sep 2011 19:31:44 +0000 (19:31 +0000)] 
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/1.8@334840 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdding the Feature to sent a Reason Header in a SIP Cancel message by set the flag...
Stefan Schmidt [Wed, 7 Sep 2011 13:26:50 +0000 (13:26 +0000)] 
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/1.8@334682 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoperoid typo
Alec L Davis [Wed, 7 Sep 2011 08:12:49 +0000 (08:12 +0000)] 
peroid typo

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

13 years agoPrevent segfault if call arrives before Asterisk is fully booted.
Alec L Davis [Wed, 7 Sep 2011 07:33:39 +0000 (07:33 +0000)] 
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/1.8@334616 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMake SQL query in app_voicemail.c portable LIMIT is not portable.
Gregory Nietsky [Tue, 6 Sep 2011 13:48:03 +0000 (13:48 +0000)] 
Make SQL query in app_voicemail.c portable LIMIT is not portable.

Regression from r312212

(closes issue ASTERISK-18255)
Reported by: Leif Madsen
Tested by: Leif Madsen

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

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

13 years agoMusicOnHold has extra unref which may lead to memory corruption and crash.
Richard Mudgett [Fri, 2 Sep 2011 20:59:49 +0000 (20:59 +0000)] 
MusicOnHold has extra unref which may lead to memory corruption and crash.

The problem happens when a call is disconnected and you had started a MOH
class that does not use the files mode.  If you define REF_DEBUG and
recreate the problem, it will announce itself with the following warning:
Attempt to unref mohclass 0xb70722e0 (default) when only 1 ref remained,
and class is still in a container!

* Fixed moh_alloc() and moh_release() functions not handling the
state->class reference consistently.

(closes issue ASTERISK-18346)
Reported by: Mark Murawski
Patches:
      jira_asterisk_18346_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett, Mark Murawski

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

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

13 years agoFix potential memory allocation failure crashes in config.c.
Richard Mudgett [Fri, 2 Sep 2011 17:10:58 +0000 (17:10 +0000)] 
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/1.8@334296 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoRemove 1.6 compatibility documentation from 1.8, as it no longer applies.
Tilghman Lesher [Thu, 1 Sep 2011 17:38:33 +0000 (17:38 +0000)] 
Remove 1.6 compatibility documentation from 1.8, as it no longer applies.

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

13 years agoCreate a local alias for ast_odbc_clear_cache.
Tilghman Lesher [Thu, 1 Sep 2011 17:28:09 +0000 (17:28 +0000)] 
Create a local alias for ast_odbc_clear_cache.

As a function pointer, the reference has to be resolved at load time
irrespective of the RTLD_LAZY flag.  Creating a local alias solves
this problem, because the structure is initialized with that local
function pointer, while the actual function can remain lazily linked
until runtime.

The reason why this is important is because we lazily load function
references during the module loading process, in order to obtain
priority values for each module, ensuring that modules are loaded in
the correct order.  Previous to this change, when this module was
initially loaded, the module loader would emit a symbol resolution
error, because of the above requirement.

Closes ASTERISK-18399 (reported by Mikael Carlsson, fix suggested by
Walter Doekes, patch by me)

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

13 years agoDisable T.38 when we get a invite with image media port set to 0
Matthew Nicholson [Wed, 31 Aug 2011 18:50:33 +0000 (18:50 +0000)] 
Disable T.38 when we get a invite with image media port set to 0

ASTERISK-17678

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

13 years agoNo DAHDI channel available for conference, user introduction disabled.
Richard Mudgett [Wed, 31 Aug 2011 15:57:12 +0000 (15:57 +0000)] 
No DAHDI channel available for conference, user introduction disabled.

The following error will consistently occur when trying to dial into a
MeetMe conference when the server does not have DAHDI hardware installed:

app_meetme.c: No DAHDI channel available for conference, user introduction
disabled (is chan_dahdi loaded?)

While chan_dahdi is loaded correctly during compilation and install of
Asterisk/Dahdi, including associated modules, etc., a chan_dahdi.conf
configuration file in /etc/asterisk is not created by FreePBX if hardware
does not exist, causing MeetMe to be unable to open a DAHDI pseudo
channel.

* Allow chan_dahdi to create a pseudo channel when there is no
chan_dahdi.conf file to load.

(closes issue ASTERISK-17398)
Reported by: Preston Edwards
Patches:
      jira_asterisk_17398_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett

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

13 years agoCall pickup race leaves orphaned channels or crashes.
Richard Mudgett [Wed, 31 Aug 2011 15:20:31 +0000 (15:20 +0000)] 
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/1.8@334009 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoCorrect an AMI protocol violation with SIPshowpeer
Kinsey Moore [Wed, 31 Aug 2011 15:18:37 +0000 (15:18 +0000)] 
Correct an AMI protocol violation with SIPshowpeer

The response of SIPshowpeer ends with "\r\n\r\n". Since other commands are
ended by using \r\n this confuses any interfacing script.

(closes issue ASTERISK-17486)

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

13 years agocleanups in ACF/ARJ GK replies processing
Alexandr Anikin [Tue, 30 Aug 2011 21:16:30 +0000 (21:16 +0000)] 
cleanups in ACF/ARJ GK replies processing
fixed long (24 sec) pause if acf/arj proccessed
before ast_cond_wait called to wait this

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

13 years agoRefresh peer address if DNS unavailable at peer creation
Terry Wilson [Mon, 29 Aug 2011 21:38:31 +0000 (21:38 +0000)] 
Refresh peer address if DNS unavailable at peer creation

If Asterisk starts and no DNS is available, outbound registrations will fail
indefinitely. This patch copies the address from the sip_registry struct, which
will be updated, to the peer->addr when necessary.

If dnsmgr is enabled, the registration fails without the patch because even
though the address on the registry is updated via dnsmgr, the address is just
copied on the first try. Since we use ast_sockaddr_copy, dnsmgr can't update
the address that is copied to the sip_pvt or peers.

Closes issue ASTERISK-18000

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

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

13 years agoAdd some do not hold locks notes to channel.h
Richard Mudgett [Mon, 29 Aug 2011 21:06:16 +0000 (21:06 +0000)] 
Add some do not hold locks notes to channel.h

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

13 years agoFix deadlock potential of chan_mobile.c:mbl_ast_hangup().
Richard Mudgett [Mon, 29 Aug 2011 21:05:43 +0000 (21:05 +0000)] 
Fix deadlock potential of chan_mobile.c:mbl_ast_hangup().

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

13 years agoFixed improperly formatted TestEvent AMI message in app_voicemail
Matthew Jordan [Mon, 29 Aug 2011 17:11:15 +0000 (17:11 +0000)] 
Fixed improperly formatted TestEvent AMI message in app_voicemail

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

13 years agoAccidental use of variable client->status instead of client->state in from ASTERISK...
Jonathan Rose [Mon, 29 Aug 2011 15:55:34 +0000 (15:55 +0000)] 
Accidental use of variable client->status instead of client->state in from ASTERISK-18078

(issue ASTERISK-18078)

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