]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
12 years agoUpdate configure script to be compatible with ptlib 2.10.9
Matthew Jordan [Tue, 29 Jan 2013 02:09:51 +0000 (02:09 +0000)] 
Update configure script to be compatible with ptlib 2.10.9

With ptlib 2.10.9, the configure script fails due to grep returning multiple
matches for the pattern it searches for. This patch updates the pattern
matching to return only the actual version for the symbol searched for,
PTLIB_VERSION.

(closes issue ASTERISK-20980)
Reported by: Stefan Reuter
patches:
  ASTERISK-20980-1.patch uploaded by Stefan Reuter (license 5339)
........

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

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

12 years agoCorrect the number of available call numbers in IAX2.
Sean Bright [Mon, 28 Jan 2013 21:08:04 +0000 (21:08 +0000)] 
Correct the number of available call numbers in IAX2.

There is currently an edge case where call number 32768 might be allocated for
a call, even though the IAX2 protocol requires call numbers be only 15 bits.
This resulted in some unpredictable behavior when call number 32678 is chosen.

This patch was mostly written by Richard Mudgett via ReviewBoard.  I'm just
committing it.

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

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

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

12 years agoChange cleanup ordering in filestream destructor.
Russell Bryant [Mon, 28 Jan 2013 01:57:26 +0000 (01:57 +0000)] 
Change cleanup ordering in filestream destructor.

This patch came about due to a problem observed where wav files had an
empty header.  The header is supposed to be updated in wav_close().  It
turns out that this was broken when the cache_record_files option from
asterisk.conf was enabled.  The cleanup code was moving the file to its
final destination *before* running the close() method of the file
destructor, so the header didn't get updated.

Another problem here is that the move was being done before actually
closing the FILE *.

Finally, the last bug fixed here is that I noticed that wav_close()
checks for stream->filename to be non-NULL.  In the previous cleanup
order, it's checking a pointer to freed memory.  This doesn't actually
cause anything to break, but it's treading on dangerous waters.  Now the
free() of stream->filename is happening after the format module's
close() method gets called, so it's safer.

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

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

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

12 years agoFix Some Configured Conference Bridge Sounds Not Being Set
Michael L. Young [Sun, 27 Jan 2013 20:31:39 +0000 (20:31 +0000)] 
Fix Some Configured Conference Bridge Sounds Not Being Set

The "sound_only_one" sound was not being set even though it was configured.  In
looking into this, I found that the "join" and "leave" prompts were not being
set either.

(closes issue ASTERISK-20898)
Reported by: Stephan
Tested by: Stephan
Patches:
    asterisk-20898-custom-sounds-ignored.diff uploaded by
                                                 Michael L. Young (license 5026)

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

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

12 years agoCorrected crypto tag in SDP ANSWER for SRTP.
David M. Lee [Thu, 24 Jan 2013 16:39:33 +0000 (16:39 +0000)] 
Corrected crypto tag in SDP ANSWER for SRTP.

When Asterisk responds with an SDP ANSWER for SRTP, it had the code to
correctly fill in the crypto data, which was overwritten by a call to
sdp_crypto_offer. Corrected the situation by changing sdp_crypto_offer
to not replacing crypto data if it already exists.

(closes issue ASTERISK-20849)
Reported by: José Luis Millán
Tested by: Iñaki Baz Castillo
Patches:
fix_sdp_crypto_tags.diff uploaded by Pedro Kiefer (license 6407)

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

12 years agoCorrect documentation for ConfbridgeList AMI action
Matthew Jordan [Thu, 24 Jan 2013 04:01:27 +0000 (04:01 +0000)] 
Correct documentation for ConfbridgeList AMI action

The documentation for ConfbridgeList states that the Conference field is
optional. That's not really the case: if you fail to provide a Conference
number, the command will kick back an error.

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

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

12 years agoAttempt to be more helpful when using a bad ao2 object pointer.
Richard Mudgett [Wed, 23 Jan 2013 00:23:26 +0000 (00:23 +0000)] 
Attempt to be more helpful when using a bad ao2 object pointer.

Put the external obj pointer in the message instead of the internal version.
........

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

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

12 years agores_fax_spandsp: fix t38 transmission bug caused by not returning success
Jonathan Rose [Tue, 22 Jan 2013 22:05:14 +0000 (22:05 +0000)] 
res_fax_spandsp: fix t38 transmission bug caused by not returning success

This patch fixes the problem, but the issue includes a test which is still
being considered for the automated test suite.

(issue ASTERISK-20919)
Reported by: NITESH BANSAL
Patches:
patch_ast_fax_spandsp.patch uploaded by NITESH BANSAL (license 6418)

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

12 years agoapp_meetme: Use new prompts for administrator menu
Jonathan Rose [Tue, 22 Jan 2013 19:07:42 +0000 (19:07 +0000)] 
app_meetme: Use new prompts for administrator menu

The old prompts for the administrator menu were inadequate. They didn't mention
that the menu had additional options through the 8 key and pressing the 8 key
wouldn't reveal what those options were. This patch fixes all of that while
also organizing code pertaining to each individual menu type which was
previously all stored in one gigantic function along with many of the basic
conference functions.

(closes issue AST-996)
Reported by: John Bigelow
Review: http://reviewboard.digium.internal/r/360/
........

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

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

12 years agoFix station ringback; trunk hangup issues in SLA
Matthew Jordan [Tue, 22 Jan 2013 14:51:54 +0000 (14:51 +0000)] 
Fix station ringback; trunk hangup issues in SLA

This patch fixes two bugs:
 * If an outbound call is made from a SLA phone using SLAStation, then there is
   no ringtone audible to the phone that originates the call. The indication of
   the ringing was not being passed to the SLA station; this patch fixes that
   by passing through the progress indications.
 * If an SLA station hangs up before the called party answers, then the channel
   to the called party continues to ring until a timeout occurs. If the called
   party manages to answer, Asterisk attempts to connect the called party to
   a non-existant MeetMe room. This patch corrects the behavior by abandoning
   the call attempt if it detects that the SLA station is no longer in use
   while attempting to call the called party.

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

(closes issue ASTERISK-20462)
Reported by: dkerr
patches:
  asterisk-11-bugid20440+20462.patch uploaded by dkerr (license 5558)
  asterisk-11-bugid20462.patch uploaded by dkerr (license 5558)

(closes issue ASTERISK-20440)
Reported by: dkerr
patches:
  asterisk-11-bugid20440.patch uploaded by dkerr (license 5558)
  asterisk-11-bugid20440+20462.patch uploaded by dkerr (license 5558)
........

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

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

12 years agoconfbridge: Minor fixes playing user counts to the conference.
Richard Mudgett [Tue, 22 Jan 2013 00:35:34 +0000 (00:35 +0000)] 
confbridge: Minor fixes playing user counts to the conference.

* Generate a warning message if sound files do not exist when trying to
play the user count to the conference.  Use the new helper routine
sound_file_exists() for consistency.

* Put the new user into autoservice when playing user counts to the
conference.

* Check the return value of ast_bridge_impart().

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

12 years agoUpdate init.d scripts to handle stderr; readd splash screen for remote consoles
Matthew Jordan [Mon, 21 Jan 2013 20:40:13 +0000 (20:40 +0000)] 
Update init.d scripts to handle stderr; readd splash screen for remote consoles

When r376428 was commited to re-order start up sequences to be more tolerant of
forking with thread primitives, a few items were changed that caused changes
in behavior on some distros. This includes:
 * Not displaying the splash screen on a remote console.
 * Displaying an error message on stderr when a remote console cannot connect
   to a running instance of Asterisk.

In the first case, the splash screen was re-added (thanks to Michael L. Young).
In the second case, the various init.d scripts were modified to pipe stderr
to /dev/null, as the error message is useful - if you execute a remote
console or a remote console command execution and it fail, it should tell
you. Note that the error message was always present, it just failed to be
printed prior to r376428.

Much thanks to the folks who quickly reported this problem, provided solutions,
and promptly tested the various init.d scripts on a variety of distros.

(closes issue ASTERISK-20945)
Reported by: Warren Selby
Tested by: Michael L. Young, Jamuel Starkey, kaldemar, Danny Nicholas, mjordan
patches:
  asterisk-20945-remote-intro-msg.diff uploaded by elguero (license 5026)
  ASTERISK-20945-1.8-mjordan.diff uploaded by mjordan (license 6283)
........

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

Merged revisions 379777 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoPrevent segfault for interpolated iLBC frames
Kinsey Moore [Mon, 21 Jan 2013 18:33:12 +0000 (18:33 +0000)] 
Prevent segfault for interpolated iLBC frames

When iLBC is being used with a jitter buffer and the jb has to
interpolate frames, it generates frames with a null pointer and a
non-zero datalen. This is now handled properly.

(closes issue ASTERISK-20914)
Reported By: John McEleney
Patches:
  ASTERISK-20914-1.8.diff uploaded by Matt Jordan (license 6283)
........

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

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

12 years agoFix device call logging issues in skinny
Damien Wedhorn [Mon, 21 Jan 2013 06:27:24 +0000 (06:27 +0000)] 
Fix device call logging issues in skinny

Skinny device call logging (ie missed, place and received calls) has issues
because the incorrect sequence of callstates is/can be sent to the device.
This patch removes some extra callstate updates driven by forces external
to skinny and ensures the needed intermediary callstate messages are sent.

(closes issue ASTERISK-20964)
Reported by: wedhorn
Tested by: snuffy, myself
Patches:
    ast11-skinny-calllog01.diff uploaded by wedhorn (license 5019)

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

12 years agoAdd LDAP libraries to install script
Andrew Latham [Mon, 21 Jan 2013 04:39:23 +0000 (04:39 +0000)] 
Add LDAP libraries to install script

Add LDAP dev package to Debian/Ubuntu install list.  Existed in Redhat already.

(issue ASTERISK-20886)

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

12 years agoFix crash in app_minivm when mime encoding string
Matthew Jordan [Mon, 21 Jan 2013 04:07:05 +0000 (04:07 +0000)] 
Fix crash in app_minivm when mime encoding string

An incorrect string initializations was left in ast_str_encode_mime from the
patch that converted string manipulations to use ast_str strings (r191140).
The string initialization causes a crash when ast_str_set is called on
the string later on in the function.

(closes issue ASTERISK-18697)
Reported by: Chris Boot
patches:
  minivm-null-pointer-dereference-fix.patch uploaded by bootc (license 6309)

(issue ASTERISK-20854)
Reported by: Chris Warr
Tested by: Chris Warr
........

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

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

12 years agoFix issues with skinny sessions
Damien Wedhorn [Sun, 20 Jan 2013 02:53:29 +0000 (02:53 +0000)] 
Fix issues with skinny sessions

Fixes a couple of issues with the way skinny handles sessions by ensuring
sessions aren't used after being freed. Some other minor changes.

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

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

12 years agoAdd builtin roundf() for systems lacking it.
Walter Doekes [Sat, 19 Jan 2013 20:49:43 +0000 (20:49 +0000)] 
Add builtin roundf() for systems lacking it.

(closes issue ASTERISK-16854)
Review: https://reviewboard.asterisk.org/r/2276
Reported-by: Ovidiu Sas
........

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

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

12 years agoFix astcanary startup problem due to wrong pid value from before daemon call
Matthew Jordan [Sat, 19 Jan 2013 00:17:53 +0000 (00:17 +0000)] 
Fix astcanary startup problem due to wrong pid value from before daemon call

When Asterisk forks itself into the background via a call to daemon, it must
re-set the pid value of the new process. Otherwise, astcanary gets the pid
value of the process before the fork, which prevents it from running. Asterisk
eventually starts lowering its priority, as it can no longer communicate
with the proverbial canary in the coal mine.

This patch ensures that the correct process identifier is used by astcanary.

Note that this is getting committed to 10 as a regression fix.

(closes issue ASTERISK-20947)
Reported by: Jakob Hirsch
Tested by: mjordan
patches:
  asterisk-10.12.0.astcanary_ppid.diff uploaded by Jakob Hirsch (license 6113)
........

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

Merged revisions 379510 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix regression in Confbridge user count
Kinsey Moore [Fri, 18 Jan 2013 21:46:58 +0000 (21:46 +0000)] 
Fix regression in Confbridge user count

When the restructuring work got committed to Confbridge in r375470 to
fix many open issues, it caused a regression in the reported count of
users when conference information was requested via CLI or manager.
This corrects the user count and user information displayed when
listing conference information from the CLI and manager.

(closes issue ASTERISK-20938)
Reported By: Timo Teras
Patches:
  confbridge-list.patch uploaded by Timo Teras (license 5409)

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

12 years agoSpecify the -rpath linker flag when prefix != /usr.
David M. Lee [Fri, 18 Jan 2013 21:10:23 +0000 (21:10 +0000)] 
Specify the -rpath linker flag when prefix != /usr.

This allows Asterisk to start without having to specify the
LD_LIBRARY_PATH. This can be disabled by passing --disable-rpath to
configure.

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

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

12 years agoapp_voicemail: Improve msg_id handling
Jonathan Rose [Fri, 18 Jan 2013 18:13:58 +0000 (18:13 +0000)] 
app_voicemail: Improve msg_id handling

app_voicemail will no longer issue error messages when it retrieves an msg_id
with a NULL value from realtime and will instead simply populate the msg_id
field with a newly generated msg_id. In addition, this patch changes the way
msg_ids are generated to eliminate certain causes of duplicate IDs appearing
within a single system. In addition, when messages are copied, they will now
receive a new msg_id.

(closes issue ASTERISK-20717)
Reported by: Alec Davis
Review: https://reviewboard.asterisk.org/r/2220/

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

12 years agoFix Record-Route parsing for large headers.
David M. Lee [Fri, 18 Jan 2013 05:26:56 +0000 (05:26 +0000)] 
Fix Record-Route parsing for large headers.

Record-Route parsing copied the header into a char[256] array, which can
be a problem if the header is longer than that. This patch parses the
header in place, without the copy, avoiding the issue.

In addition to the original patch, I added a unit test for the new
get_in_brackets_const function.

(closes issue ASTERISK-20837)
Reported by: Corey Farrell
Patches:
chan_sip-build_route-optimized-rev1.patch uploaded by Corey Farrell (license 5909)
(with minor changes by dlee)
........

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

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

12 years agoFix issue where chan_mobile fails to bind to first available port
Matthew Jordan [Thu, 17 Jan 2013 02:30:29 +0000 (02:30 +0000)] 
Fix issue where chan_mobile fails to bind to first available port

Per the bluez API, in order to bind to the first available port, the rc_channel
field of the socket addressing structure used to bind the socket should be set
to 0. Previously, Asterisk had set the rc_channel field set to 1, causing it
to connect to whatever happens to be on port 1.

We could probably not explicitly set rc_channel to 0 since we memset the struct
earlier, but explicitly setting it will hopefully prevent someone from coming
in and setting it to some explicit port in the future.

(closes issue ASTERISK-16357)
Reported by: challado
Tested by: Alexander Heinz, Nikolay Ilduganov, benjamin, eliafino, David van Geyn
patches:
  ASTERISK-16357.diff uploaded by Nikolay Ilduganov (license 6253)
........

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

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

12 years agoFurther fix misinformation in the description of manager MailboxStatus command.
Mark Michelson [Wed, 16 Jan 2013 22:49:59 +0000 (22:49 +0000)] 
Further fix misinformation in the description of manager MailboxStatus command.

The description still claimed that it returned the number of messages rather than
whether there were messages waiting.
........

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

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

12 years agoReduce number of packages install_prereq installs on Debian systems.
Jason Parker [Wed, 16 Jan 2013 21:13:15 +0000 (21:13 +0000)] 
Reduce number of packages install_prereq installs on Debian systems.

'search' will look for any package containing the name provided, so we need to
force a more exact search.
........

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

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

12 years agoReduce call-id logging resource usage.
Richard Mudgett [Wed, 16 Jan 2013 18:08:27 +0000 (18:08 +0000)] 
Reduce call-id logging resource usage.

Since there is no need for the call-id logging ao2 object to have a lock,
don't create it with one.

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

12 years agochan_misdn: Fix compile error.
Richard Mudgett [Wed, 16 Jan 2013 17:48:29 +0000 (17:48 +0000)] 
chan_misdn: Fix compile error.

(issue ASTERISK-15456)
........

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

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

12 years agoLet documentation reference links specify which module they're linking to
Matthew Jordan [Wed, 16 Jan 2013 17:45:37 +0000 (17:45 +0000)] 
Let documentation reference links specify which module they're linking to

Again, since res_jabber/res_xmpp have duplicate APIs, their documentation ref
links have to specify which reference they're referring to. The various
documentation parsers can interpret the module attribute however they want
in order to construct the appropriate links.

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

12 years agoUpdate the dtd to actually *support* the module attribute in all elements
Matthew Jordan [Wed, 16 Jan 2013 15:30:20 +0000 (15:30 +0000)] 
Update the dtd to actually *support* the module attribute in all elements

Mea culpa.

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

12 years agoAdd module tags to documentation for res_jabber/res_xmpp
Matthew Jordan [Wed, 16 Jan 2013 15:27:44 +0000 (15:27 +0000)] 
Add module tags to documentation for res_jabber/res_xmpp

Since res_jabber/res_xmpp provide the same APIs (app/func/manager/etc.),
the XML documentation for each needs to call out which module is providing
the documentation. The module attribute has been added to the various XML
fragments for this purpose.

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

12 years agoFix parsing SMSSRC for SMS messages
Matthew Jordan [Wed, 16 Jan 2013 04:13:33 +0000 (04:13 +0000)] 
Fix parsing SMSSRC for SMS messages

The parser for SMS messages would incorrectly parse out the from number.
The parsing would incorrectly start scanning for the from number at the
same index as the first double quote ("); this would inadvertently cause
it to treat the first double quote as the terminating double quote for
the from number as well.

The SMSSRC should now populate correctly.

(closes issue ASTERISK-16822)
Reported by: menschentier
Tested by: Jonas Falck
patches:
 fixSMSSRC.patch uploaded by jonax (license 6320)

(closes issue ASTERISK-19153)
Reported by: Panos Gkikakis
patches:
  sms-sender-fix.diff uploaded by roeften (license 5884)
........

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

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

12 years agoSet the INVALID_EXTEN channel variable when chan_misdn forces the 'i' extension
Matthew Jordan [Wed, 16 Jan 2013 00:14:38 +0000 (00:14 +0000)] 
Set the INVALID_EXTEN channel variable when chan_misdn forces the 'i' extension

The chan_misdn channel driver will send a channel with an invalid destination
to the 'i' extension itself if said extension can be reached. It forgot,
however, to set the INVALID_EXTEN channel variable when it bounces the channel
to this extension. Dialplan writers everywhere moaned at yet another
inconsistency.

This is yet another example of why duplicating logic in multiple places results
in bugs that stick around in Jira for just under three years.

Yes: ASTERISK-15456 was created on January 18th, 2010. Patch committed on
January 15th, 2013. Ouch.

(closes issue ASTERISK-15456)
Reported by: Thomas Omerzu
patches:
  chan_misdn_invalid.patch2 uploaded by Thomas Omerzu (license 5927)
........

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

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

12 years agoBlocked revisions 379091
Matthew Jordan [Tue, 15 Jan 2013 03:47:58 +0000 (03:47 +0000)] 
Blocked revisions 379091

........
Prevent crash in ConfBridge due to race condition when channels leave bridge

When a channel leaves a bridge, a race condition existed where the
bridge_channel's pvt structure would be accessed after it was disposed of.
This patch prevents that by setting the pointer to the pvt to NULL prior
to disposing of it.

Note that this patch is a backport from Asterisk 10. This particular race
condition was fixed as part of the larger code rework that occurred for that
release.

The solution to this problem was pointed out by Gunnar Harms in ASTERISK-16640.

(closes issue ASTERISK-16640)
Reported by: thomas987

(closes issue ASTERISK-16835)
Reported by: saghul

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

12 years agoFix XML encoding of 'identity display' in NOTIFY messages, continued.
David M. Lee [Mon, 14 Jan 2013 15:27:19 +0000 (15:27 +0000)] 
Fix XML encoding of 'identity display' in NOTIFY messages, continued.

When r378933 was merged into 1.8, it should have also escaped
remote_display, since it will have the same XML encoding problem when
the caller/callee roles are reversed.

(closes issue ABE-2902)
Reported by: Guenther Kelleter
........

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

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

12 years agoReset RTP timestamp; sequence number on SSRC change
Matthew Jordan [Sun, 13 Jan 2013 21:44:54 +0000 (21:44 +0000)] 
Reset RTP timestamp; sequence number on SSRC change

In r370252 for ASTERISK-18404, Asterisk's handling of RTP was modified to
better account for out of order RTP packets. This was accomplished by using the
RTP timestamp and sequence number to check for out of order packets. However,
when a SSRC change occurs, the timestamp and sequence number will no longer
have any relation to the previously received packets. The variables tracking
the timestamp and sequence number therefore have to be reset.

(closes issue ASTERISK-20906)
Reported by: Eelco Brolman
patches:
  dtmf_on_hold.patch uploaded by Eelco Brolman (license #6442)
........

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

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

12 years agoFix XML encoding of 'identity display' in NOTIFY messages.
David M. Lee [Sat, 12 Jan 2013 06:36:54 +0000 (06:36 +0000)] 
Fix XML encoding of 'identity display' in NOTIFY messages.

XML encoding in chan_sip is accomplished by naively building the XML
directly from strings. While this usually works, it fails to take into
account escaping the reserved characters in XML.

This patch adds an 'ast_xml_escape' function, which works similarly to
'ast_uri_encode'. This is used to properly escape the local_display
attribute in XML formatted NOTIFY messages.

Several things to note:
 * The Right Thing(TM) to do would probably be to replace the
   ast_build_string stuff with building an ast_xml_doc. That's a much
   bigger change, and out of scope for the original ticket, so I
   refrained myself.
 * It is with great sadness that I wrote my own ast_xml_escape
   function. There's one in libxml2, but it's knee-deep in
   libxml2-ness, and not easily used to one-off escape a
   string.
 * I only escaped the string we know is causing problems
   (local_display). At least some of the other strings are
   URI-encoded, which should be XML safe. Rather than figuring out
   what's safe and escaping what's not, it would be much cleaner to
   simply build an ast_xml_doc for the messages and let the XML
   library do the XML escaping. Like I said, that's out of scope.

(closes issue ABE-2902)
Reported by: Guenther Kelleter
Tested by: Guenther Kelleter
Review: http://reviewboard.digium.internal/r/365/

........

Merged revision 378919 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

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

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

12 years agoRetain XMPP filters across reconnections so external modules continue to function...
Joshua Colp [Fri, 11 Jan 2013 23:04:53 +0000 (23:04 +0000)] 
Retain XMPP filters across reconnections so external modules continue to function as expected.

Previously if an XMPP client reconnected any filters added by an external module were lost.
This issue exhibited itself with chan_motif not receiving and reacting to Jingle signaling.

(closes issue ASTERISK-20916)
Reported by: kuj

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

12 years agoFix end condition in ast_rtp_lookup_mime_multiple2.
David M. Lee [Wed, 9 Jan 2013 20:29:32 +0000 (20:29 +0000)] 
Fix end condition in ast_rtp_lookup_mime_multiple2.

The erroneous end condition would never include the AST_RTP_CISCO_DTMF flag
in the debug output.

(closes issue ASTERISK-20772)
Reported by: Xavier Hienne
........

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

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

12 years agoMove declaration of ast_regex_string_to_regex_pattern futher down strings.h.
David M. Lee [Wed, 9 Jan 2013 20:07:07 +0000 (20:07 +0000)] 
Move declaration of ast_regex_string_to_regex_pattern futher down strings.h.

The prior location is before the declaration of struct ast_str, which causes
compiler warnings.

(closes issue ASTERISK-20852)
Reported by: Pavel Troller
Patches:
strings.diff uploaded by Pavel Troller (license 6302)

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

12 years agoReplace errant tabs with spaces in causes.h.
David M. Lee [Wed, 9 Jan 2013 19:37:36 +0000 (19:37 +0000)] 
Replace errant tabs with spaces in causes.h.

(closes issue ASTERISK-20826)
Reported by: snuffy
Patches:
notabs.dif uploaded by snuffy (license 5024)
........

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

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

12 years agoapp_queue: Fix incorrect assertion.
Richard Mudgett [Wed, 9 Jan 2013 00:03:40 +0000 (00:03 +0000)] 
app_queue: Fix incorrect assertion.

(issue ASTERISK-16115)
........

Merged revisions 378689 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoapp_queue: Fix multiple calls to a queue member that is in only one queue.
Richard Mudgett [Tue, 8 Jan 2013 23:28:03 +0000 (23:28 +0000)] 
app_queue: Fix multiple calls to a queue member that is in only one queue.

When ringinuse=no queue members can receive more than one call if these
calls happen at nearly the same time.

* Fix so a queue member does not receive more than one call from a queue.

NOTE: This fix does not prevent multiple calls to a member if the member
is in more than one queue.

* Did some refactoring to eliminate some code redundancy.

(issue ASTERISK-16115)
Reported by: nik600
Patches:
      jira_asterisk_16115_single_q_v1.8.patch (license #5621) patch uploaded by rmudgett
      Modified

* Revert the -r341580 and -r341599 changes adding the queues.conf
check_state_unknown option as it was added in an attempt to fix this
problem.  The fix did not need to be optional.  The fix should not have
tried to explicitly set the device state.  Setting the device state by
something other than the device introduces a race condition.  I also could
not see how the change would be effective other than delaying the
app_queue code long enough for the device state to propagate to app_queue.
........

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

Merged revisions 378683 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoRewrite skinny dialing to remove threaded simpleswitch
Damien Wedhorn [Sun, 6 Jan 2013 20:40:10 +0000 (20:40 +0000)] 
Rewrite skinny dialing to remove threaded simpleswitch

This rewrite changes skinny dialing from the threaded simpleswitch
to a scheduled timeout approach. There were some underlying issues
with the threaded simple switch with occasional corruption and
possible segfaults.

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

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

12 years agores_srtp: Prevent a crash from occurring due to srtp_create failures in srtp_create
Jonathan Rose [Fri, 4 Jan 2013 23:04:59 +0000 (23:04 +0000)] 
res_srtp: Prevent a crash from occurring due to srtp_create failures in srtp_create

Under some circumstances, libsrtp's srtp_create function deallocates memory that
it wasn't initially responsible for allocating. Because we weren't initially
aware of this behavior, this memory was still used in spite of being unallocated
during the course of the srtp_unprotect function. A while back I made a patch
which would set this value to NULL, but that exposed a possible condition where
we would then try to check a member of the struct which would cause a segfault.
In order to address these problems, ast_srtp_unprotect will now set an error value
when it ends without a valid SRTP session which will result in the caller of
srtp_unprotect observing this error and hanging up the relevant channel instead of
trying to keep using the invalid session address.

(closes issue ASTERISK-20499)
Reported by: Tootai
Review: https://reviewboard.asterisk.org/r/2228/diff/#index_header
........

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

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

12 years agoFix pjproject compilation in certain circumstances
Kinsey Moore [Fri, 4 Jan 2013 22:18:21 +0000 (22:18 +0000)] 
Fix pjproject compilation in certain circumstances

On a fresh checkout of Asterisk 11, running make before ./configure
could cause the pjproject subdirectory to get in an odd state that
would prevent compilation. This patch by Tilghman prevents that from
occurring.

(closes issue ASTERISK-20681)
Reported by: Dinesh Ramjuttun
Tested by: danilo borges, Steve Lang
patches:
  20121208__ccar_solved.diff.txt uploaded by Tilghman Lesher (license 5003)

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

12 years agoFix SIP Notify Messages To Have The Proper IP Address In The FROM Field
Michael L. Young [Fri, 4 Jan 2013 21:18:18 +0000 (21:18 +0000)] 
Fix SIP Notify Messages To Have The Proper IP Address In The FROM Field

On a multihomed server when sending a NOTIFY message, we were not figuring out
which network should be used to contact the peer.

This patch fixes the problem by calling ast_sip_ouraddrfor() and then
build_via() so that our NOTIFY message contains the correct IP address.

Also, a debug message is being added to help follow the call-id changes that
occur.  This was helpful for confirming that the IP address was set properly
since the call-id contains the IP address.  It also will be helpful for
troubleshooting purposes when following a call in the debug logs.

(closes issue ASTERISK-20805)
Reported by: Bryan Hunt
Tested by: Bryan Hunt, Michael L. Young
Patches:
    asterisk-20805-notify-ip-v2.diff uploaded by Michael L. Young (license 5026)

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

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

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

12 years agoDon't pass STUN packets through the SRTP unprotect function.
Joshua Colp [Fri, 4 Jan 2013 21:16:32 +0000 (21:16 +0000)] 
Don't pass STUN packets through the SRTP unprotect function.

(closes issue AST-1036)
Reported by: jbigelow
........

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

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

12 years agoFix Queue Log Reporting Every Call COMPLETECALLER With "h" Extension Present
Michael L. Young [Thu, 3 Jan 2013 22:12:27 +0000 (22:12 +0000)] 
Fix Queue Log Reporting Every Call COMPLETECALLER With "h" Extension Present

When the "h" extension is present within the context of the queue, all calls
are being reported COMPLETECALLER even when the agent is hanging up the call.

This patch checks to see if the agent hung-up or not instead of only relying on
checking if the queue (caller) channel hung-up or not.  It would appear that
having the h extension in the mix, the pbx goes to the h extension,
"hanging-up" the queue channel and triggering the reporting of COMPLETECALLER.

(closes issue ASTERISK-20743)
Reported by: call
Tested by: call, Michael L. Young
Patches:
    asterisk-20743-q-cmplt-caller.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

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

12 years agochan_agent: Fix wrapup time wait response.
Richard Mudgett [Thu, 3 Jan 2013 19:41:56 +0000 (19:41 +0000)] 
chan_agent: Fix wrapup time wait response.

* Made agent_cont_sleep() and agent_ack_sleep() stop waiting if the wrapup
time expires.  agent_cont_sleep() had tried but returned the wrong value
to stop waiting.

* Made agent_ack_sleep() take a struct agent_pvt pointer instead of a void
pointer for better type safety.
........

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

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

12 years agoAdd missing test event
Kinsey Moore [Thu, 3 Jan 2013 18:48:00 +0000 (18:48 +0000)] 
Add missing test event

This test event was missing from channel.c causing the dial_LS_options
test to fail intermittently because of a race condition where most code
paths emitted the test event but this one did not. The dial_LS_options
test should stop bouncing now.
........

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

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

12 years agochan_agent: Misc code cleanup.
Richard Mudgett [Thu, 3 Jan 2013 18:44:08 +0000 (18:44 +0000)] 
chan_agent: Misc code cleanup.

* Fix off-nominal path resource cleanup in agent_request().

* Create agent_pvt_destroy() to eliminate inlined versions in many places.

* Pull invariant code out of loop in add_agent().

* Remove redundant module user references in login_exec().

* Remove unused struct agent_pvt logincallerid[] member.

* Remove some redundant code in agent_request().
........

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

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

12 years agochan_agent: Fix agent_indicate() locking.
Richard Mudgett [Thu, 3 Jan 2013 17:46:44 +0000 (17:46 +0000)] 
chan_agent: Fix agent_indicate() locking.

Avoid deadlock potential with local channels and simplify the locking.
........

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

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

12 years agoPrevent exhaustion of system resources through exploitation of event cache
Joshua Colp [Thu, 3 Jan 2013 15:38:39 +0000 (15:38 +0000)] 
Prevent exhaustion of system resources through exploitation of event cache

This patch changes res_xmpp to no longer cache events under certain circumstances.

(issue ASTERISK-20175)
Reported by: Russell Bryant, Leif Madsen, Joshua Colp
Tested by: kmoore

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

12 years agoPrevent crashes in res_xmpp when receiving large messages
Matthew Jordan [Thu, 3 Jan 2013 15:36:05 +0000 (15:36 +0000)] 
Prevent crashes in res_xmpp when receiving large messages

Similar to r378287, res_xmpp was marshaling data read from an external source
onto the stack. For a sufficiently large message, this could cause a stack
overflow. This patch modifies res_xmpp in a similar fashion to res_jabber by
removing the stack allocation, as it was unnecessary.

(issue ASTERISK-20658)
Reported by: wdoekes

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

12 years agoPrevent crashes from occurring when reading from data sources with large values
Matthew Jordan [Wed, 2 Jan 2013 22:02:15 +0000 (22:02 +0000)] 
Prevent crashes from occurring when reading from data sources with large values

When reading configuration data from an Asterisk .conf file or when pulling
data from an Asterisk RealTime backend, Asterisk was copying the data on the
stack for manipulation. Unfortunately, it is possible to read configuration
data or realtime data from some data source that provides a large blob of
characters. This could potentially cause a crash via a stack overflow.

This patch prevents large sets of data from being read from an ARA backend or
from an Asterisk conf file.

(issue ASTERISK-20658)
Reported by: wdoekes
Tested by: wdoekes, mmichelson
patches:
 * issueA20658_dont_process_overlong_config_lines.patch uploaded by wdoekes (license 5674)
 * issueA20658_func_realtime_limit.patch uploaded by wdoekes (license 5674)
........

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

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

12 years agoFix AMI redirect action with two channels failing to redirect both channels.
Richard Mudgett [Wed, 2 Jan 2013 21:17:42 +0000 (21:17 +0000)] 
Fix AMI redirect action with two channels failing to redirect both channels.

The AMI redirect action can fail to redirect two channels that are bridged
together.  There is a race between the AMI thread redirecting the two
channels and the bridge thread noticing that a channel is hungup from the
redirects.

* Made the bridge wait for both channels to be redirected before exiting.

* Made the AMI redirect check that all required headers are present before
proceeding with the redirection.

* Made the AMI redirect require that any supplied ExtraChannel exist
before proceeding.  Previously the code fell back to a single channel
redirect operation.

(closes issue ASTERISK-18975)
Reported by: Ben Klang

(closes issue ASTERISK-19948)
Reported by: Brent Dalgleish
Patches:
      jira_asterisk_19948_v11.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett, Thomas Sevestre, Deepak Lohani, Kayode

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

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

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

12 years agoRestore branch-1.8-merged on 11
Kinsey Moore [Wed, 2 Jan 2013 18:30:09 +0000 (18:30 +0000)] 
Restore branch-1.8-merged on 11

This was accidentally deleted during a merge.

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

12 years agoPrevent exhaustion of system resources through exploitation of event cache
Matthew Jordan [Wed, 2 Jan 2013 18:09:55 +0000 (18:09 +0000)] 
Prevent exhaustion of system resources through exploitation of event cache

Asterisk maintains an internal cache for devices in the event subsystem. The
device state cache holds the state of each device known to Asterisk, such that
consumers of device state information can query for the last known state for
a particular device, even if it is not part of an active call. The concept of
a device in Asterisk can include entities that do not have a physical
representation. One way that this occurred was when anonymous calls are allowed
in Asterisk. A device was automatically created and stored in the cache for
each anonymous call that occurred; this was possible in the SIP and IAX2
channel drivers and through channel drivers that utilized the
res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices
are never removed from the system, allowing anonymous calls to potentially
exhaust a system's resources.

This patch changes the event cache subsystem and device state management to
no longer cache devices that are not associated with a physical entity.

(issue ASTERISK-20175)
Reported by: Russell Bryant, Leif Madsen, Joshua Colp
Tested by: kmoore
patches:
  event-cachability-3.diff uploaded by jcolp (license 5000)
........

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

Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoResolve crashes due to large stack allocations when using TCP
Matthew Jordan [Wed, 2 Jan 2013 15:31:41 +0000 (15:31 +0000)] 
Resolve crashes due to large stack allocations when using TCP

Asterisk had several places where messages received over various network
transports may be copied in a single stack allocation. In the case of TCP,
since multiple packets in a stream may be concatenated together, this can
lead to large allocations that overflow the stack.

This patch modifies those portions of Asterisk using TCP to either
favor heap allocations or use an upper bound to ensure that the stack will not
overflow:
 * For SIP, the allocation now has an upper limit
 * For HTTP, the allocation is now a heap allocation instead of a stack
   allocation
 * For XMPP (in res_jabber), the allocation has been eliminated since it was
   unnecesary.

Note that the HTTP portion of this issue was independently found by Brandon
Edwards of Exodus Intelligence.

(issue ASTERISK-20658)
Reported by: wdoekes, Brandon Edwards
Tested by: mmichelson, wdoekes
patches:
  ASTERISK-20658_res_jabber.c.patch uploaded by mmichelson (license 5049)
  issueA20658_http_postvars_use_malloc2.patch uploaded by wdoekes (license 5674)
  issueA20658_limit_sip_packet_size3.patch uploaded by wdoekes (license 5674)
........

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

Merged revisions 378286 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoEnsure chan_sip rejects encrypted streams without crypto info
Kinsey Moore [Mon, 31 Dec 2012 14:44:41 +0000 (14:44 +0000)] 
Ensure chan_sip rejects encrypted streams without crypto info

This ensures that Asterisk rejects encrypted media streams (RTP/SAVP
audio and video) that are missing cryptographic keys and ensures that
the incoming SDP is consistent with RFC4568 as far as having a crypto
attribute present for any SAVP streams.

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

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

Merged revisions 378218 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoGive the causes[] a struct name.
Richard Mudgett [Thu, 20 Dec 2012 21:44:13 +0000 (21:44 +0000)] 
Give the causes[] a struct name.
........

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

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

12 years agoAdd branch-1.8-merged property to allow direct merging from v1.8
Richard Mudgett [Thu, 20 Dec 2012 21:26:27 +0000 (21:26 +0000)] 
Add branch-1.8-merged property to allow direct merging from v1.8

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

12 years agoAdd test events for time limit-related hangups
Kinsey Moore [Tue, 18 Dec 2012 17:41:35 +0000 (17:41 +0000)] 
Add test events for time limit-related hangups

This patch adds hangup-related test events in order to support testing
of time-limited bridges. This aids in testing the S() and L() bridge
options.

(issue SWP-4713)
........

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

Merged revisions 378120 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix potential double free when unloading a module.
Richard Mudgett [Mon, 17 Dec 2012 23:09:45 +0000 (23:09 +0000)] 
Fix potential double free when unloading a module.
........

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

Merged revisions 378093 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoMake chan_local module references tied to local_pvt lifetime.
Richard Mudgett [Mon, 17 Dec 2012 23:01:20 +0000 (23:01 +0000)] 
Make chan_local module references tied to local_pvt lifetime.

The chan_local module references were manually tied to the existence of
the ;1 and ;2 channel links.

* Made chan_local module references tied to the existence of the local_pvt
structure as well as automatically take care of the module references.

* Tweaked the wording of the local_fixup() failure warning message to make
sense.

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

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

Merged revisions 378089 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoMake libasteriskssl.so symlink use a relative path.
Jason Parker [Mon, 17 Dec 2012 20:58:52 +0000 (20:58 +0000)] 
Make libasteriskssl.so symlink use a relative path.

This was causing issues when using DESTDIR, since the path to which the link
pointed is not likely to exist (and not useful to exist) on the target system.

(issue ASTNOW-284)

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

12 years agoapp_queue: Revert bad ringinuse=no patch.
Richard Mudgett [Fri, 14 Dec 2012 21:32:28 +0000 (21:32 +0000)] 
app_queue: Revert bad ringinuse=no patch.

With the option ringinuse=no set, the patch committed for ASTERISK-16115
causes non-SIP queue members to never be called because the device state
is checked after a channel is created to determine if the member is busy.
These queue members always get the "Member %s is busy, cannot dial"
message.

Most channel drivers other than chan_sip use the default device state
handling.  The default device-state state is considered in use or unknown
if the channel exists or not respectively.

(closes issue ASTERISK-20801)
Reported by: rmudgett
Patches:
      jira_asterisk_16115_revert_r370418_v1.8.patch (license #5621) patch uploaded by rmudgett
........

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

Merged revisions 378037 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix skinny to recognise vmexten in general section of conf
Damien Wedhorn [Fri, 14 Dec 2012 01:49:30 +0000 (01:49 +0000)] 
Fix skinny to recognise vmexten in general section of conf

Fixup the vmexten so if globally set in general section will be honored by
chan_skinny. Also get rid of the 'global_' part of variable name to match
regexten.

(closes issue ASTERISK-20790)
Reported by: snuffy
Tested by: snuffy, myself
Patches:
    skinny-vm.diff uploaded by snuffy (license 5024)

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

12 years agoconfbridge: Fix MOH on simultaneous user entry to a new conference.
Richard Mudgett [Thu, 13 Dec 2012 21:04:16 +0000 (21:04 +0000)] 
confbridge: Fix MOH on simultaneous user entry to a new conference.

When two users entered a new conference simultaneously, one of the callers
hears MOH.  This happened if two unmarked users entered simultaneously and
also if a waitmarked and a marked user entered simultaneously.

* Created a confbridge internal MOH API to eliminate the inlined MOH
handling code.  Note that the conference mixing bridge needs to be locked
when actually starting/stopping MOH because there is a small window
between the conference join unsuspend MOH and actually joining the mixing
bridge.

* Created the concept of suspended MOH so it can be interrupted while
conference join announcements to the user and DTMF features can operate.

* Suspend any MOH until the user is about to actually join the mixing
bridge of the conference.  This way any pre-join file playback does not
need to worry about MOH.

* Made post-join actions only play deferred entry announcement files.
Changing the user/conference state during that time is not protected or
controlled by the state machine.

(closes issue ASTERISK-20606)
Reported by: Eugenia Belova
Tested by: rmudgett

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

Merged revisions 377992 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoMinor fixes for chan_skinny
Damien Wedhorn [Thu, 13 Dec 2012 20:03:04 +0000 (20:03 +0000)] 
Minor fixes for chan_skinny

Whitespace, change SUBSTATE_ONHOOK to correct SKINNY_ONHOOK and
correct len of 2 strcmp in skinny_setdebug(). (see opticron's review
on https://reviewboard.asterisk.org/r/2240/)

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

12 years agoFix skinny debug tab completion
Damien Wedhorn [Thu, 13 Dec 2012 18:19:35 +0000 (18:19 +0000)] 
Fix skinny debug tab completion

Review the syntax of the 'skinny debug' command to show more than
just 'show' for options to 'skinny debug' command.

(closes issue ASTERISK-20789)
Reported by: snuffy
Tested by: snuffy, myself
Patches:
    skinny-debug.diff uploaded by snuffy (license 5024)

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

12 years agoEnsure Min-SE is included in outbound INVITEs
Kinsey Moore [Thu, 13 Dec 2012 13:51:49 +0000 (13:51 +0000)] 
Ensure Min-SE is included in outbound INVITEs

Asterisk now includes Min-SE in outbound INVITEs when the value is not
90 (the default) and session timers are not disabled. This has the
effect of Asterisk following RFC4028 more closely with regard to 422
responses and preventing situations in which Asterisk would be forced
to temporarily accept a call to tear it down based on a Session-Expires
below the locally configured Min-SE.

(issue SWP-5051)
Review: https://reviewboard.asterisk.org/r/2222/
Reported-by: Kinsey Moore
Patch-by: Kinsey Moore
........

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

Merged revisions 377947 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoIncremented EXTRA_SOUNDS_VERSION in sounds/Makefile to 1.4.12 for new Extra Sounds...
Rusty Newton [Wed, 12 Dec 2012 22:42:47 +0000 (22:42 +0000)] 
Incremented EXTRA_SOUNDS_VERSION in sounds/Makefile to 1.4.12 for new Extra Sounds releases

See CHANGES-* files in English extra 1.4.12 tarballs for new sound prompts added.

(closes ASTERISK-20328)
Reported by: Matt Jordan
(closes AST-755)
Reported by: John Bigelow
........

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

Merged revisions 377923 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix a potential deadlock in chan_sip during transfers.
Mark Michelson [Tue, 11 Dec 2012 23:59:09 +0000 (23:59 +0000)] 
Fix a potential deadlock in chan_sip during transfers.

The issue comes from the fact that transfers may perform
a redirecting update on a channel. The issue is that lock
inversion between the channel and its tech_pvt occurs since
the channel lock is released during the transfer process.

The fix is to move when the redirecting update occurs to a
place where neither the tech_pvt or the channel is locked so
that the two can be locked in the proper order.

(closes issue ASTERISK-20708)
reported by Mark Michelson
patches:
ASTERISK-20708-3.patch uploaded by Mark Michelson (License #5049)

Tested by:
Tim Ringenbach at Asteria Solutions Group

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

12 years agoCleanup CLI commands on exit for several files.
Richard Mudgett [Tue, 11 Dec 2012 22:01:13 +0000 (22:01 +0000)] 
Cleanup CLI commands on exit for several files.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      unregister-cli-multiple-all.patch (license #5909) patch uploaded by Corey Farrell
........

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

Merged revisions 377882 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoCleanup udptl on exit.
Richard Mudgett [Tue, 11 Dec 2012 21:12:26 +0000 (21:12 +0000)] 
Cleanup udptl on exit.

* Cleanup CLI commands on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      udptl-shutdown-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
      udptl-shutdown-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

Merged revisions 377848 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix crash that can occur if CLI registration fails for an aliased command.
Mark Michelson [Tue, 11 Dec 2012 20:51:47 +0000 (20:51 +0000)] 
Fix crash that can occur if CLI registration fails for an aliased command.

A recent memory leak fix in main/cli.c causes an ast_cli_entry's command
field to be freed and NULLed if ast_cli_register() fails. res_clialiases
was ignoring the return value of ast_cli_register() and was then passing
the NULL command off to a a hash function. This resulted in a crash.

The fix is not to ignore the erroneous return value. If ast_cli_register()
fails, then we do not continue trying to process the current alias.
........

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

Merged revisions 377842 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoCleanup taskprocessor on exit.
Richard Mudgett [Tue, 11 Dec 2012 20:45:02 +0000 (20:45 +0000)] 
Cleanup taskprocessor on exit.

* Cleanup CLI commands on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      taskprocessor-cleanup-1_8-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      taskprocessor-cleanup-10-only.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

Merged revisions 377838 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoCleanup pbx on exit.
Richard Mudgett [Tue, 11 Dec 2012 20:03:23 +0000 (20:03 +0000)] 
Cleanup pbx on exit.

* Cleanup CLI commands on exit.

* Unreference hints and statecbs containers on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      pbx-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
      pbx-cleanup-10.patch (license #5909) patch uploaded by Corey Farrell
      pbx-cleanup-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

Merged revisions 377807 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoCleanup logger on exit.
Richard Mudgett [Tue, 11 Dec 2012 02:43:41 +0000 (02:43 +0000)] 
Cleanup logger on exit.

* Cleanup CLI commands, destroy verbosers and logchannels lists on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      logger-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

Merged revisions 377772 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoCleanup indications on exit.
Richard Mudgett [Tue, 11 Dec 2012 02:12:26 +0000 (02:12 +0000)] 
Cleanup indications on exit.

* Made ast_unregister_indication_country() unlink the found tone zone
before selecting a new default_tone_zone to make it impossible to select
the tone zone being unregistered again.

* Ringcadence is no longer parsed twice in store_config_tone_zone().

* Cleanup CLI commands and destroy default_tone_zone on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      indications-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

Merged revisions 377741 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoCleanup event on exit.
Richard Mudgett [Tue, 11 Dec 2012 01:03:28 +0000 (01:03 +0000)] 
Cleanup event on exit.

* Cleanup CLI commands on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      event_shutdown-10-only.patch (license #5909) patch uploaded by Corey Farrell
      event_shutdown-1_8-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
........

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

Merged revisions 377709 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoCleanup dnsmgr on exit.
Richard Mudgett [Tue, 11 Dec 2012 00:34:46 +0000 (00:34 +0000)] 
Cleanup dnsmgr on exit.

* Cleanup dnsmgr thread and CLI commands on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      dnsmgr-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
      dnsmgr-cleanup-10-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

Merged revisions 377705 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoEnsure ReceiveFax provides a CED tone via T.38
Kinsey Moore [Mon, 10 Dec 2012 16:55:05 +0000 (16:55 +0000)] 
Ensure ReceiveFax provides a CED tone via T.38

When using res_fax_digium, the T.38 CED tone was not being provided
properly which would cause some incoming faxes to fail. This was not an
issue with res_fax_spandsp since it does not strictly honor the
send_ced flag and sends the CED tone whenever receiving a T.38 fax.

(closes issue FAX-343)
Reported-by: Benjamin Tietz
Patch-by: Kinsey Moore
........

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

Merged revisions 377656 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoHandle Session-Expires less than local Min-SE in 200 OK
Kinsey Moore [Mon, 10 Dec 2012 14:43:15 +0000 (14:43 +0000)] 
Handle Session-Expires less than local Min-SE in 200 OK

Ensure that a call is immediately torn down if a Session-Expires value
received in a 200 OK is less than the local Min-SE. This also prevents
Asterisk from allowing calls with Session-Expires below the
RFC4028-mandated minimum (90s).

(closes issue ASTERISK-20653)
Review: https://reviewboard.asterisk.org/r/2237/
Patch-by: Kinsey Moore
........

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

Merged revisions 377624 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix codec mismatch
Igor Goncharovskiy [Mon, 10 Dec 2012 06:49:45 +0000 (06:49 +0000)] 
Fix codec mismatch

Fix code to send in both rx and tx open stream messages correct codecs. Found that on phase 0/1 phones wrong codecs cause to no audio in some situations.

(issue ASTERISK-20183)
........

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

Merged revisions 377592 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoRemove trailing whitespaces in number from incoming redial list.
Igor Goncharovskiy [Mon, 10 Dec 2012 05:23:24 +0000 (05:23 +0000)] 
Remove trailing whitespaces in number from incoming redial list.

Reported by: Igor Olhovskiy

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

12 years agoBlocked revisions 377558
Igor Goncharovskiy [Mon, 10 Dec 2012 05:07:07 +0000 (05:07 +0000)] 
Blocked revisions 377558

........
Fix crash on transfer initiated from insreeen menu on Unistim phones. Removed CDR-related code that moved to do_masquarade before.

(closes issue ASTERISK-20417)
Reported by: Rudolf Migalin
........

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

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

12 years agoImprove documentation by making all of the colors used readable,
Tilghman Lesher [Mon, 10 Dec 2012 01:41:02 +0000 (01:41 +0000)] 
Improve documentation by making all of the colors used readable,
no matter what the background color is.

Dark blue on a black background is unreadable, as is yellow on a
light background.  This patch turns on the bright attribute for
colors when on a dark background and turns *off* the bright
attribute when the -W command line option is used (indicating a
_light_ background).  This ensures that text is readable in both
cases.

Patch by: tilghman
Review: https://reviewboard.asterisk.org/r/2224
........

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

Merged revisions 377510 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoRemove some dead code and additionally handle a case that wasn't handled.
Tilghman Lesher [Mon, 10 Dec 2012 01:27:47 +0000 (01:27 +0000)] 
Remove some dead code and additionally handle a case that wasn't handled.
........

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

Merged revisions 377504 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoAdd missing support for "who hung up" to chan_motif.
Joshua Colp [Sun, 9 Dec 2012 01:22:56 +0000 (01:22 +0000)] 
Add missing support for "who hung up" to chan_motif.

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

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

12 years agoFix order of SIP allow/disallow in MySQL contrib script.
Richard Mudgett [Sat, 8 Dec 2012 00:29:56 +0000 (00:29 +0000)] 
Fix order of SIP allow/disallow in MySQL contrib script.

Using the contrib sippeers.sql script to create the sippeers MySQL table
would result in being unable to place calls if you set the disallow value
to all.

(closes issue ASTERISK-20756)
Reported by: Andre Luis
Patches:
      sippeers.patch patch uploaded by Andre Luis
........

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

Merged revisions 377432 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoMALLOC_DEBUG: Only wait if we want atexit allocation dumps.
Richard Mudgett [Fri, 7 Dec 2012 23:43:36 +0000 (23:43 +0000)] 
MALLOC_DEBUG: Only wait if we want atexit allocation dumps.
........

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

Merged revisions 377399 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agocodec_dahdi: Fix output of "transcoder show" CLI command.
Kinsey Moore [Fri, 7 Dec 2012 22:02:50 +0000 (22:02 +0000)] 
codec_dahdi: Fix output of "transcoder show" CLI command.

In r306010 "Asterisk media architecture conversion - no more format
bitfields", the logic for incrementing encoders and decoders when
opening transcoder channels was changed without making the corresponding
change when decrementing encoder / decoder channels.  The result being
that when a channel was destroyed, codec_dahdi couldn't properly tell if
it was an encoder or decoder, and the default case is to assume it was a
decoder.

This could result in negative numbers for decoders in use like in:
  VOIP6*CLI> transcoder show
  2/-2 encoders/decoders of 92 channels are in use.

(closes issue ASTERISK-19921)
Patch-by: Shaun Ruffell
........

Merged revisions 377382 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoconfbridge: Fix some resource leaks on conference teardown.
Richard Mudgett [Thu, 6 Dec 2012 23:58:21 +0000 (23:58 +0000)] 
confbridge: Fix some resource leaks on conference teardown.

* Made destroy_conference_bridge() destroy a missed ast_mutex_t and ast_cond_t.

* Made join_conference_bridge() init the ast_mutex_t's and ast_cond_t so
destroy_conference_bridge() can destroy them unconditionally.

* Made join_conference_bridge() abort if the new conference could not be
added to the conferences container.

* Made leave_conference() discard any post-join actions if
join_conference_bridge() had to abort early.

* Made the join_conference_bridge() diagnostic messages better describe
what happened.

* Renamed leave_conference_bridge() to leave_conference() and made it only
take a conference user pointer.  The conference pointer was redundant.

* Made conf_bridge_profile_copy() use struct copy instead of memcpy().

* No need to lock the conference in start_conf_record_thread() since all
of the callers already have it locked.
........

Merged revisions 377354 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoAdd CLI tab completion to 'acl show'.
Russell Bryant [Thu, 6 Dec 2012 17:28:35 +0000 (17:28 +0000)] 
Add CLI tab completion to 'acl show'.

The 'acl show' CLI command allows you to show the details about a specific
named ACL in acl.conf.  This patch adds tab completion to the command.

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

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

12 years agoFix memory leak in 'manager show event' when command entered incorrectly
Matthew Jordan [Thu, 6 Dec 2012 14:11:21 +0000 (14:11 +0000)] 
Fix memory leak in 'manager show event' when command entered incorrectly

When the CLI command 'manager show event' was run incorrectly and its usage
instructions returned, a reference to the event container was leaked. This
would prevent the container from being reclaimed when Asterisk exits. We now
properly decrement the count on the ao2 object using the nifty RAII_VAR macro.

Thanks to Russell for helping me stumble on this, and Terry for writing that
ridiculously helpful macro.

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

12 years agores_srtp: Fix a crash caused by srtp_dealloc on an already dealloced session
Jonathan Rose [Wed, 5 Dec 2012 17:08:12 +0000 (17:08 +0000)] 
res_srtp: Fix a crash caused by srtp_dealloc on an already dealloced session

When srtp_create fails, the session may be dealloced or just not alloced. At
the same time though, the session pointer might not be set to NULL in this
process and attempting to srtp_dealloc it again will cause a segfault. This
patch checks for failure of srtp_create and sets the session pointer to NULL
if it fails.

(closes issue ASTERISK-20499)
Reported by: tootai
Review: https://reviewboard.asterisk.org/r/2228/
........

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

Merged revisions 377261 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix a SIP request memory leak with TLS connections.
Joshua Colp [Wed, 5 Dec 2012 16:50:43 +0000 (16:50 +0000)] 
Fix a SIP request memory leak with TLS connections.

During the TLS re-work in chan_sip some TLS specific code was moved
into a separate function. This function operates on a copy of the
incoming SIP request. This copy was never deinitialized causing a
memory leak for each request processed.

This function is now given a SIP request structure which it can use
to copy the incoming request into. This reduces the amount of memory
allocations done since the internal allocated components are reused
between packets and also ensures the SIP request structure is
deinitialized when the TLS connection is torn down.

(closes issue ASTERISK-20763)
Reported by: deti
........

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

Merged revisions 377258 from http://svn.asterisk.org/svn/asterisk/branches/10

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