Commit Graph

21816 Commits

Author SHA1 Message Date
Jason Parker
f9834fd128 Add support for Digium Phones.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8-digiumphones@357459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 21:52:48 +00:00
Jason Parker
f11923e651 svnmerge init
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8-digiumphones@357457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 21:48:06 +00:00
Jason Parker
ca1156dd77 Add branch that supports Digium Phones for Asterisk 1.8 users.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8-digiumphones@357456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 21:47:07 +00:00
Richard Mudgett
100721d217 Fix callerid of Originated calls.
Thanks to Matt Riddell for tracking this down.

(closes issue ASTERISK-19385)
Reported by: ornix


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 23:34:03 +00:00
Terry Wilson
c026fb96b0 Copy CDR variables when set during a bridge
This patch makes sure amaflags, accountcode, and userfield get copied
to the bridge CDR when set during a bridge (like via a custom feature).

(closes issue ASTERISK-16990)
Review: https://reviewboard.asterisk.org/r/1721/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 16:03:04 +00:00
Jonathan Rose
c7d587dd49 Remove possible segfaults from res_odbc by adding locks around usage of odbc handle
(closes issue ASTERISK-19011)
Reported by: Walter Doekes
Patches:
	issueA19011_combine_read_and_write_locks_WORK_IN_PROGRESS.patch uploaded by Walter Doekes (license 5674)
review: https://reviewboard.asterisk.org/r/1719/
review: https://reviewboard.asterisk.org/r/1622/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 15:14:45 +00:00
Matthew Jordan
d3ed07d38a Fix crash in app_voicemail during close_mailbox
In r354890, a memory leak in app_voicemail was fixed by properly disposing of
the allocated heard/deleted pointers.  However, there are situations,
particularly when no messages are found in a folder, where these pointers are
not allocated and not NULL.  In that case, an invalid free would be attempted,
which could crash app_voicemail.  As there are a number of code paths where
this could occur, this patch uses the number of messages detected in the folder
before it attempts to free the pointers.  This resolves the crash detected in
the Asterisk Test Suite's check_voicemail_nominal test.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-25 17:21:29 +00:00
Richard Mudgett
534213a074 Fix worker thread resource leak in SIP TCP/TLS.
The SIP TCP/TLS worker threads were created joinable but noone could join
them if they died on their own.

* Fix the SIP TCP/TLS worker threads to not be created joinable.

* _sip_tcp_helper_thread() only needs one parameter since the pvt
parameter is only passed in as NULL and never used.

(closes issue ASTERISK-19203)
Reported by: Steve Davies

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 18:23:28 +00:00
Matthew Jordan
ed81d0e585 Remove srtp_shutdown from res_srtp
The patch for ASTERISK-19253 included properly shutting down the libsrtp
library in the case of module unload.  Unfortunately, not all distributions
have the srtp_shutdown call.  As such, this patch removes calling
srtp_shutdown.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 17:41:18 +00:00
Matthew Jordan
032962f1a2 Allow SRTP policies to be reloaded
Currently, when using res_srtp, once the SRTP policy has been added to the
current session the policy is locked into place.  Any attempt to replace an
existing policy, which would be needed if the remote endpoint negotiated a new
cryptographic key, is instead rejected in res_srtp.  This happens in particular
in transfer scenarios, where the endpoint that Asterisk is communicating with
changes but uses the same RTP session.

This patch modifies res_srtp to allow remote and local policies to be reloaded
in the underlying SRTP library.  From the perspective of users of the SRTP API,
the only change is that the adding of remote and local policies are now added
in a single method call, whereas they previously were added separately.  This
was changed to account for the differences in handling remote and local
policies in libsrtp.

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

(closes issue ASTERISK-19253)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
Patches:
  srtp_renew_keys_2012_02_22.diff uploaded by Matt Jordan (license 6283)
  (with some small modifications for this check-in)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 15:07:09 +00:00
Richard Mudgett
f49ff3ff9c Fix blind transfer parking issues if the dialed extension is not recognized as a parking extension.
Custom parking extensions may not be coded such that the first and only
extension priority is the Park application.  These custom parking
extensions will not be recognized as parking extensions.  When a call is
blind transferred to an extension that is not recognized as a parking
extension, the normal blind transfer code causes the transferred channel
to start executing dialplan.  Calls that get parked in this manner do not
know the original channel name that parked the call so the original parker
could never be called back if the parked call is not retrieved before the
timeout time.  The parking space is also announced to the call being
parked as a side effect of not knowing the original parking channel.

* Fix handling of BLINDTRANSFER channel variable for call parking.

* Fixed SIP blind transfer using the wrong dialplan context variable to
check for the parking extension.

(closes issue ASTERISK-19322)
Reported by: aragon
Tested by: rmudgett, jparker

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

JIRA AST-766


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23 19:49:03 +00:00
Mark Michelson
775b218b35 Fix ACK routing for non-2xx responses.
When we send an ACK for a 2xx response to an INVITE, we are supposed
to use the learned route set. However, when we receive a non-2xx final
response to an INVITE, we are supposed to send the ACK to the same place
we initially sent the INVITE.

We had been doing this up until the changes went in that would build a route
set from provisional responses. That introduced a regression where we would
use the learned route set under all circumstances.

With this change, we now will set the destination of our ACK based on the
invitestate. If it is INV_COMPLETED then that means that we have received
a non-2xx final response (INV_TERMINATED indicates a 2xx response was received).
If it is INV_CANCELLED, then that means the call is being canceled, which
means that we should be ACKing a 487 response.

The other change introduced here is setting the invitestate to INV_CONFIRMED
when we send an ACK *after* the reqprep instead of before. This way, we can
tell in reqprep more easily what the invitestate is prior to sending the ACK.

(closes issue ASTERISK-19389)
reported by Karsten Wemheuer
patches:
    ASTERISK-19389v2.patch uploaded by Mark Michelson (license #5049)
	(with some slight modifications prior to commit)




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23 15:37:59 +00:00
Paul Belanger
d2cb0914e4 Fix -Werror=unused-but-set-variable compiler error (gcc 4.6.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23 03:36:46 +00:00
Paul Belanger
bd7d5707dd Missed one strsep() function
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22 21:36:37 +00:00
Paul Belanger
7d3cdcffd2 Add back strsep() function for previous commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22 21:29:25 +00:00
Terry Wilson
9a3c569772 Track module use count for res_calendar
If the res_calendar module was followed immediately by one of the
calendar tech modules and "core stop gracefully" was run, Asterisk
would crash.

This patch adds use count tracking for res_calendar so that it is
unloaded after the tech modules when shutting down gracefully. It
is now not possible to unload all the of the calendar modules via
"module unload res_calednar.so", but it is still possible to unload
them all via "module unload -h res_calendar.so".

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22 21:08:50 +00:00
Paul Belanger
8dc1509465 Fix -Werror=unused-but-set-variable compiler error (gcc 4.6.2)
Review: https://reviewboard.asterisk.org/r/1763/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22 20:20:29 +00:00
Matthew Jordan
6453352768 Fix potential buffer overrun and memory leak when executing "sip show peers"
The "sip show peers" command uses a fix sized array to sort the current peers
in the peers ao2_container.  The size of the array is based on the current
number of peers in the container.  However, once the size of the array is
determined, the number of peers in the container can change, as the peers
container is not locked.  This could cause a buffer overrun when populating
the array, if peers were added to the container after the array was created.
Additionally, a memory leak of the allocated array would occur if a user
caused the _show_peers method to return CLI_SHOWUSAGE.

We now create a snapshot of the current peers using an ao2_callback with the
OBJ_MULTIPLE flag.  This size of the array is set to the number of peers
that the iterator will iterate over; hence, if peers are added or removed
from the peers container it will not affect the execution of the "sip show
peers" command.

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

(closes issue ASTERISK-19231)
(closes issue ASTERISK-19361)
Reported by: Thomas Arimont, Jamuel Starkey
Tested by: Thomas Arimont, Jamuel Starkey
Patches: sip_show_peers_2012_02_16.diff uploaded by mjordan (license 6283)




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22 14:50:20 +00:00
Sean Bright
e880b4a205 Make 'iax2 show callnumber usage' output make sense when an IP is passed in.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-21 11:16:23 +00:00
Sean Bright
cb8d4a1d50 Remove spurious warning when 'qualifyfreqnotok' is set successfully.
(closes issue ASTERISK-17176)
Reported by: John Covert
Tested by: Sean Bright
Patches:
   chan_iax2.c.qualifyfreqnotok.patch uploaded by John Covert (license 5512)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 18:38:28 +00:00
Sean Bright
a8989c5ded This was a LOG_NOTICE, so roll it back.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 14:40:10 +00:00
Sean Bright
11991e8394 Change some debug messages from LOG_DEBUG to ast_debug.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 14:30:38 +00:00
Sean Bright
4b59946c41 Add some boilerplate documentation for IAXVAR and IAXPEER.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-19 18:04:52 +00:00
Sean Bright
3925b8fdc9 Set the length of the ast_sockaddr, so that we can set it's port later.
Without this, the call to ast_sockaddr_set_port a few lines later is a noop.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-19 17:49:45 +00:00
Alec L Davis
1b6601bc0a push 'outgoing' flag from sig_XXX up to chan_dahdi
'p->outgoing' in chan_dahdi and sig_analog wern't kept in sync, particulary FXS ast_hangup didn't clear the 'outgoing' flag.
sig_pri and sig_ss7 were keeping 'outgoing' flag insync.

Now provides a callback for all the low level sig_XXX modules.

(issue ASTERISK-19316)

alecdavis (license 585)
Reported by: Jeremy Pepper
Tested by: alecdavis
 
Review: https://reviewboard.asterisk.org/r/1747/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-18 07:55:11 +00:00
Paul Belanger
0b894ef73a Fix -Werror=unused-but-set-variable compiler error (gcc 4.6.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-18 03:59:26 +00:00
Sean Bright
0106636e42 Don't allow trunkfreq to be greater than 1000ms.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-17 22:01:49 +00:00
Sean Bright
338fd29f44 Pass the correct value to ast_timer_set_rate() for IAX2 trunking.
IAX2 uses the trunkfreq variable to determine how often to send trunk packets, but
this value is in milliseconds while ast_timer_set_rate() expects the rate argument
to be ticks per second.  So we divide 1000 by trunkfreq and pass that in instead.

With a default of 20ms, this change makes IAX2 send trunk packets every 20ms
instead of every 50ms.

Tracked down by myself and Bob Wienholt.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-17 19:32:52 +00:00
Mark Michelson
202d83c42c Fix regressions with regards to route-set creation on early dialogs.
This fixes two main issues:

1. Asterisk would send a CANCEL to the route created by the provisional response
   instead of using the same destination it did in the initial INVITE.
2. If a new route set arrives in a 200 OK than was in the 1XX response (perfectly
   possible if our outbound INVITE gets forked), then the route set in the 200 OK
   needs to overwrite the route set in the 1XX response.

(closes issue ASTERISK-19358)
Reported by: Karsten Wemheuer
Tested by: Karsten Wemheuer
patches:
   ASTERISK-19358.patch uploaded by Mark Michelson (license 5049)
   ASTERISK-19358.patch uploaded by Stefan Schmidt (license 6034)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-17 18:57:28 +00:00
Mark Michelson
1ba154c100 Revert change to translate.c as it has caused an infinite loop to occur in circumstances.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-17 16:04:24 +00:00
Paul Belanger
e31d0dfe40 Revert 355700 and 355701
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-17 00:25:13 +00:00
Paul Belanger
1fd85ee397 Missed a variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-16 23:54:54 +00:00
Paul Belanger
0e93bc868e Fix -Werror=unused-but-set-variable compiler error (gcc 4.6.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-16 23:53:08 +00:00
Sean Bright
706d34fade Revert a change to audio_audiohook_write_list that had no affect.
When I made this change initially, I was under the false impression that the
audiohooks structure remained on the channel after all of the hooks had been
detached.  This is not the case, ast ast_read takes care of removing the
audiohooks structure if the lists are empty.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-16 20:01:15 +00:00
Richard Mudgett
15f49a1497 Fix compile problem when old version of libvorbisfile v1.1.2 is used.
The principle difference between libvorbisfile v1.1.2 and newer (at least
v1.2.0) is the addition of the predefined callbacks OV_CALLBACKS_xxx in
vorbis/vorbisfile.h used for ov_open_callbacks().

* Updated the configure script to detect if libvorbisfile.h declares
OV_CALLBACKS_NOCLOSE.

* Copied the declaration of OV_CALLBACKS_NOCLOSE from v1.2.0 to allow
v1.1.2 to compile.

(closes issue ASTERISK-19370)
Reported by: Jonn Taylor


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-16 19:26:16 +00:00
Richard Mudgett
695e1ecbec Fix AMI Monitor action without File header converting channel name into filename.
* Fix potential Solaris crash if Monitor application has a urlbase and no
fname_base option.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-16 18:26:37 +00:00
Sean Bright
dfe4ff5337 When IAX2 debugging is enabled, make sure to log 'apathetic' messages too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-15 19:26:38 +00:00
Sean Bright
314dcc01bc Only use maxtrunkcall and maxnontrunkcall in chan_iax2 if IAX_OLD_FIND is specified.
These variables are only accessed from the IAX_OLD_FIND path, so there is no reason
to keep them updated otherwise.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-15 18:19:46 +00:00
Sean Bright
62b7e35b71 Use TRUNK_CALL_START as originally intended.
Back in r646, TRUNK_CALL_START was added and defined as 0x4000.  That same value
was also hard-coded in one part of the IAX2 code instead of using the #define.

TRUNK_CALL_START has changed over the years (for dealing with LOW_MEMORY), but
the hard-coded usage was never updated to match.  This patch fixes that.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-15 17:24:22 +00:00
Richard Mudgett
e296e8c96f Fix voicemail problems when using ogg/vorbis.
Ogg/vorbis was fairly useless as a voicemail file format because it did
not implement the seek and tell format callbacks among other problems.

Since we were already using the libvorbis and libvorbisenc libraries we
can use libvorbisfile as it is also part of the vorbis library package.

* Made use the libvorbisfile to handle the ogg/vorbis file stream.  The
format_ogg_vorbis.c is now mostly a wrapper around libvorbisfile.

(closes issue ASTERISK-16926)
Reported by: sque
Patches:
      ogg_vorbis_use_libvorbisfile.patch (license #6108) patch uploaded by sque


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 19:10:35 +00:00
Richard Mudgett
f0e24c2e24 Fix lock typo that should be unlock in cel_sqlite_custom reload.
(closes issue ASTERISK-19356)
Reported by: Alex Villacis Lasso
Patches:
      asterisk-1.8.9.2-cel_sqlite3_custom-fix-reload-locking-typo.patch (license #5617) patch uploaded by Alex Villacis Lasso

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 18:12:16 +00:00
Mark Michelson
a5d76e1c11 Properly invert the return of a strncmp call.
This was causing identification that should have been
made private to be public.

(closes issue AST-814)
reported by Patrick Anderson

Patches:
	chan_sip.c.diff uploaded by Patrick Anderson (license 5430)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 16:26:49 +00:00
Jason Parker
8357dd7a2d Don't enable sqlite3 CDRs by default in sample configs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 15:50:40 +00:00
Sean Bright
94ade43b56 Clear the high order bit from the destination call number before sending.
send_apathetic_reply takes the incoming frame's source call number as the
destination call number for the outgoing frame.  If the incoming frame was a
full frame, then the high order bit of the source call number is set and will be
interpreted as a retransmit when sent back out as the destination call number.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 13:33:09 +00:00
Alexandr Anikin
7d0ee59215 call manager_event only if there is not null channel structure
(Closes issue ASTERISK-19298)
Reported by: robinfood
Patches:
        issue19298.patch uploaded by may213 (License #5415)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 09:41:38 +00:00
Richard Mudgett
49ebbe0765 Fix occasional incorrectly delayed call-file execution.
Since the dir timestamp is available at one second resolution, we cannot
know if it was updated within the same second after we scanned it.
Therefore, we will force another scan if the dir was just modified.

* Changed to force another scan if the directory was just modified.

(closes issue ASTERISK-19081)
Reported by: Knut Bakke

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 22:02:10 +00:00
Joshua Colp
c81c500276 Only allow one 'dialplan reload' to execute at a time as otherwise they would share the same common local context list.
(closes issue AST-758)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 19:49:19 +00:00
Richard Mudgett
7d84a0ed69 Fix reconnecting to pgsql database after connection loss.
There can only be one database connection in res_config_pgsql just like
res_config_sqlite.  If the connection is lost, the connection may not get
reestablished to the same database if the res_pgsql.conf and
extconfig.conf files are inconsistent.

* Made only use the configured database from res_pgsql.conf.

* Fixed potential buffer overwrite of last[] in config_pgsql().

(closes issue ASTERISK-16982)
Reported by: german aracil boned

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@354953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 17:22:17 +00:00
Jason Parker
a37f262426 Fix a voicemail memory leak with heard/deleted messages.
open_mailbox() was changed quite a long time ago to allocate this memory.
close_mailbox() should have been changed to be responsible for freeing it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@354889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-10 21:45:22 +00:00
Richard Mudgett
9ce7947aa6 Fix AMI Redirect ExtraChannel not redirecting to the same exten and context.
The astman_get_header() never returns NULL so the check by the code for
NULL would never fail.

(closes issue ASTERISK-16974)
Reported by: Nuno Borges
Patches:
      0018325.patch (license #6116) patch uploaded by Nuno Borges (modified)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@354835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-10 18:03:30 +00:00