Commit Graph

22099 Commits

Author SHA1 Message Date
Richard Mudgett 2144ba5df2 Fix locking issues with channel datastores in func_odbc.c.
* Fixed a potential memory leak when an existing datastore is manually
destroyed by inline code instead of calling ast_datastore_free().

(closes issue ASTERISK-17948)
Reported by: Archie Cobbs

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 17:04:20 +00:00
Joshua Colp 84aea92ba7 Blocked revisions 352288
........
Blocked revisions 352287

........
Move RTP timeout check to before bridged channel check so it is actually executed.

(issue ASTERISK-19179)
Reported by: TSAREGORODTSEV Yury

(closes issue ASTERISK-14534)
Reported by: kriborgen
Patches:
	chan_sip.patch uploaded by kriborgen (license 6138)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 16:32:18 +00:00
Mark Michelson c3c6b5a0ba Fix grammar of comment.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 20:31:11 +00:00
Mark Michelson 0920c50341 Fix blind transfers from failing if an 'h' extension is present.
This prevents the 'h' extension from being run on the transferee
channel when it is transferred via a native transfer mechanism such
as SIP REFER.

(closes ASTERISK-19173)
Reported by: Ross Beer
Tested by: Kristjan Vrban
Patches:
	ASTERISK-19173 by Mark Michelson (license 5049)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 20:29:48 +00:00
Matthew Jordan 59a42de303 Correctly apply FAXOPT settings (V17, V27, V29) before starting spandsp layer
While the FAXOPT function could be used to set the modem capabilities, the
input to that function was not being applied correctly to the spandsp layer.
This patch applies the current model capabilities before starting the spandsp
layer.

(closes issue: ASTERISK-16409)
Reported by: Kristijan Vrban
Tested by: Matt Jordan, Matthew Nicholson
Patches:
  spandsp-modems-1.8.diff uploaded by mnicholson (license 5081)
  spandsp-modems-10.diff uploaded by mnicholson (license 5081)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 19:22:11 +00:00
Jonathan Rose de09749470 Add an announcement option to music-on-hold - plays sound when put on hold/between songs
This is a feature patch which allows an 'announcement' option to be specified in
musiconhold.conf which should be set to the name of a sound. If a valid sound is
specified for this option, then it will be played on that music on hold class whenever
a channel bound to that class is put on hold as well as when Asterisk is able to detect
that a song has ended before starting the next song (excludes external players).

(closes ASTERISK-18977)
Reported by: Timo Teräs
Patches:
	asterisk-moh-announcement.diff uploaded by Timo Teräs (license 5409)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 18:34:47 +00:00
Jonathan Rose a1bef6041d Adds the ability to stop specific mixmonitors by using unique IDs set at monitor launch.
MixMonitor receives a new option i(channel_variable) which stores the unique id at said
variable. StopMixMonitor now accepts ID as an optional argument, which if included will
make StopMixMonitor specifically target the mixmonitor on that particular channel. CLI
commands and AMI actions have been ammended to work with the IDs as well. In addition,
monitors across a channel can now be listed be listed via CLI command "mixmonitor list
<channel>" which will display all of the mixmonitors active on that channel along with
the files they each have open. Created by Sergio González Martín.

(closes issue ASTERISK-19096)
Reported by: Sergio González Martín
Review: https://reviewboard.asterisk.org/r/1643/
Review: https://reviewboard.asterisk.org/r/1682/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 18:16:20 +00:00
Richard Mudgett 74508e3bca Fix sip_cfg.notifycid to be set with the defined enum values.
The invalid value used when notifycid was enabled was benign.  As far as
the code was concerned -1 and 1 are equivalent.

(closes issue ASTERISK-19232)
Reported by: Eike Kuiper
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 17:36:28 +00:00
Richard Mudgett 20c6ff71b6 Fix ast_app_dtget() time unit inconsistency.
Note: Noone calls ast_app_dtget() with the timeout parameter of zero so
the bad code normally will never get executed.

* Fix unnecessary floating point division in func_timeout.c
timeout_write() when all other values are integers.

(closes issue ASTERISK-16817)
Reported by: Dmitry Andrianov
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-21 00:23:13 +00:00
Mark Michelson 02408a2476 Remove XXX comment that is not necessary.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-21 00:11:13 +00:00
Mark Michelson ab8ba431b6 Fix RTP reference leak.
If a blind transfer were initiated using a REFER without a prior
reINVITE to place the call on hold, AND if Asterisk were sending
RTCP reports, then there was a reference for the RTP instance
of the transferer.

This fixes the issue by merging two similar but slightly conflicting
sections of code into a single area. It also adds a stop_media_flows()
call in the case that the transferer's UA never sends a BYE to us
like it is supposed to.

(issue ASTERISK-19192)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-21 00:10:35 +00:00
Richard Mudgett d0c765497d Make CLI sip show channel list the complete route set.
(closes issue ASTERISK-16877)
Reported by: klaus3000
Patches:
      show-complete-routeset-patch.txt (license #5054) patch uploaded by klaus3000 (modified)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 23:05:06 +00:00
Kinsey Moore c6fd4f5d74 SIP session timeout AMI event
Add an AMI event in the Call category that is issued when a call is terminated
due to either RTP stream inactivity or SIP session timer expiration.

Event description:

Event: SessionTimeout
Source: source
Channel: channel-name
Uniqueid: channel-unique-id

`source` can be either RTPTimeout or SIPSessionTimer

(closes issue ASTERISK-16467)
Patch-by: Kirill Katsnelson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 21:26:50 +00:00
Mark Michelson 778fa4abaf Various parking improvements.
* Adds per-parking lot options comebackcontext and comebackdialtime
* Makes comebacktoorigin settable per parking lot
* Sets a PARKER channel variable when comebacktoorigin is disabled

(closes issue ASTERISK-16643)
Reported by: Mitch Sharp (bluecrow76)
Patches:
asterisk-1.6.2.17.2-park-features-comebackcontext-consolidated-v3.diff by Mitch Sharp (bluecrow76) license 5231
with updates by me.

Review: https://reviewboard.asterisk.org/r/1674
Review: https://reviewboard.asterisk.org/r/963
Reviewed by Richard Mudgett



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 20:47:42 +00:00
Mark Michelson b98a25ef93 Prevent potential buffer overflow on AMI MixMonitor command.
Don't be alarmed. This only affected trunk, and it would have
required manager access to your system.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 20:26:55 +00:00
Kinsey Moore 43621b05a9 More corrections for the ilbc code
These changes are in a file that is not compiled by default, and so were
missed on earlier checks.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 19:36:04 +00:00
Kinsey Moore d61920b6d9 Restore LSF_check function calls from set/unused variable removal
These functions are not noops and modify the array that is passed in. Thanks
for the catch Richard.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 16:52:20 +00:00
Kinsey Moore 75243988d5 Remove more set, but unused variables in the ilbc codec
GCC 4.6.3 caught these in dev mode as well.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 16:33:26 +00:00
Jonathan Rose 1a6960099b Adds setting of mwi_from field to check_auth_result check_peer_ok
(closes ASTERISK-19057)
Reported By: Yuri
Patches: 348360chan_sip.diff uploaded by Yuri (license 5242)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 16:00:58 +00:00
Matthew Jordan 7a442b017c Remove unused variable 'tmp' from helpfun in ilbc codec
gcc version 4.6.2 caught an unused variable in the ilbc codec
library.  This would prevent compilation with --enable-dev-mode;
variable removed.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 16:00:13 +00:00
Stefan Schmidt f4f5ccf5d7 enable doxygen build for files in the channels/sip folder like reqresp_parser.c
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 13:12:56 +00:00
Richard Mudgett ae32acfa3e Misc minor fixes in reqresp_parser.c and chan_sip.c.
* Fix corner cases in get_calleridname() parsing and ensure that the
output buffer is nul terminated.

* Make get_calleridname() truncate the name it parses if the given buffer
is too small rather than abandoning the parse and not returning anything
for the name.  Adjusted get_calleridname_test() unit test to handle the
truncation change.

* Fix get_in_brackets_test() unit test to check the results of
get_in_brackets() correctly.

* Fix parse_name_andor_addr() to not return the address of a local buffer.
This function is currently not used.

* Fix potential NULL pointer dereference in sip_sendtext().

* No need to memset(calleridname) in check_user_full() or tmp_name in
get_name_and_number() because get_calleridname() ensures that it is nul
terminated.

* Reply with an accurate response if get_msg_text() fails in
receive_message().  This is academic in v1.8 because get_msg_text() can
never fail.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-19 23:31:17 +00:00
Kinsey Moore add6efc20c Correct output of RTCP jitter statistics in SR and RR reports
Change the RTCP RR and SR generation code to convert Asterisk's internal jitter
statistics to be represented in RTP timestamp units based on the rate of the
codec in use instead of in seconds.

(closes issue ASTERISK-14530)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-19 22:44:38 +00:00
Jonathan Rose 6fd0ac9dcd Eliminates doubling the :port part of SIP Notify Message-Account headers.
This patch prevents the domain string from getting mangled during the initreqprep
step by moving the initialization to before its immediate use.  It also documents
this pitfall for the ast_sockaddr_stringify functions.

(issue ASTERISK-19057)
Reported by: Yuri
Review: https://reviewboard.asterisk.org/r/1678/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-19 21:55:41 +00:00
Joshua Colp ddf421bd5c Prevent crash when an SDP offer is received with an encrypted video stream when support for video is disabled and res_srtp is loaded.
(closes issue ASTERISK-19202)
Reported by: Catalin Sanda
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-19 21:13:02 +00:00
Matthew Jordan 16adf6de8c Include iLBC source code for distribution with Asterisk
This patch includes the iLBC source code for distribution with Asterisk.
Clarification regarding the iLBC source code was provided by Google, and
the appropriate licenses have been included in the codecs/ilbc folder.

Review: https://reviewboard.asterisk.org/r/1675
Review: https://reviewboard.asterisk.org/r/1649

(closes issue: ASTERISK-18943)
Reporter: Leif Madsen
Tested by: Matt Jordan
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-18 21:06:29 +00:00
Stefan Schmidt f69fd136f4 The get_pai function in chan_sip.c didn't recognized a proper callerid name and
number from a P-Asserted-Identity cause the header parsing logic was wrong. 
Changing the parsing functions to the sip header parsing APIs in 
reqresp_parser.h solves this problem.

Review: https://reviewboard.asterisk.org/r/1673
Reviewed by: wdoekes2 and Mark Michelson
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-18 16:02:15 +00:00
Walter Doekes a9698d0241 Fix support for parallel building with make (-j).
Previously make -j <N> would cause a race between doing cleanup of
certain files (defaults.h, menuselect, ...) and creating them anew.
Add a new target that depends on cleanup only and has a submake doing
the rest as command string. This way the cleanup goes first.

(closes issue ASTERISK-18751)
Tested by: Jeremy Kister
Reviewed by: Paul Belanger
Review: https://reviewboard.asterisk.org/r/1660


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17 19:45:19 +00:00
Mark Michelson f5dd17e558 Eliminate odd initialization of probation variable.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17 17:23:25 +00:00
Jonathan Rose ee4cf38a27 Adds pjmedia probation concepts to res_rtp_asterisk's learning mode.
In order to better handle RTP sources with strictrtp enabled (which is now default in 10)
using the learning mode to figure out new sources when they change is handled by checking
for a number of consecutive (by sequence number) packets received to an rtp struct
based on a new configurable value called 'probation'. Also, during learning mode instead
of liberally accepting all packets received, we now reject packets until a clear source
has been determined.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17 17:15:05 +00:00
Mark Michelson 5af788ccd0 Use built-in parsing functions for Contact and Record-Route headers.
If a Contact or a Record-Route header had a quoted string with an
item in angle brackets, then we would mis-parse it. For instance,
"Bob <1234>" <1234@example.org>
would be misparsed as having the URI "1234"
The fix for this is to use parsing functions from reqresp_parser.h
since they are heavily tested and are awesome.

(issue ASTERISK-18990)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17 16:56:04 +00:00
Matthew Jordan f86621eb93 Fix udptl issue with initial INVITE introduced by r351027
When an inital INVITE occurs that contains image media, a channel
is not yet associated with the SIP dialog.  The file descriptor
associated with the udptl session needs to be set in
initialize_udptl or in sip_new to account for this scenario.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17 16:08:43 +00:00
Russell Bryant 141dd18848 Merged revisions 351183 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r351183 | russell | 2012-01-16 20:43:19 -0500 (Mon, 16 Jan 2012) | 29 lines
  
  Merged revisions 351182 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r351182 | russell | 2012-01-16 20:37:03 -0500 (Mon, 16 Jan 2012) | 22 lines
    
    Add some missing locking in chan_sip.
    
    This patch adds some missing locking to the function 
    send_provisional_keepalive_full().  This function is called from the scheduler,
    which is processed in the SIP monitor thread.  The associated channel (or pbx)
    thread will also be using the same sip_pvt and ast_channel so locking must be
    used.  The sip_pvt_lock_full() function is used to ensure proper locking order
    in a safe manner.
    
    In passing, document a suspected reference counting error in this function.
    The "fix" is left commented out because when the "fix" is present, crashes
    occur.  My theory is that fixing it is exposing a reference counting error
    elsewhere, but I don't know where.  (Or my analysis of this being a problem
    could have been completely wrong in the first place).  Leave the comment in
    the code for so that someone may investigate it again in the future.
    
    Also add a bit of doxygen to transmit_provisional_response().
    
    (closes issue ASTERISK-18979)
    
    Review: https://reviewboard.asterisk.org/r/1648
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17 01:48:12 +00:00
Terry Wilson aacc158072 Ensure ACK retransmit & hangup on non-200 response to INVITE
When handling a non-2xx final response on an INVITE transaction, we have to
keep the transaction around after we send an ACK in case we receive a
retransmission of the response so we can re-transmit the ACK, but also tear
down the ast_channel as soon as we transmit the ACK. Before this patch, we
could fail at both of these things. Calling sip_alreadygone/needdestroy
prevented us from keeping the transaction up and retransmitting the ACK, and
queueing CONGESTION was not sufficient to cause the channel to be torn down
when originating calls via the CLI, for example.

This patch queues a hangup with CONGESTION instead of just queueing CONGESTION
for these responses and removes the sip_alreadygone and sip_needdestroy calls
from handle_response_invite on non-2xx responses. It relies on the hangup
calling sip_scheddestroy.

For more information, see section 17.1.1.1 of RFC 3261.

(closes issue ASTERISK-17717)
Review: https://reviewboard.asterisk.org/r/1672/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16 21:50:10 +00:00
Terry Wilson fb5924ebe8 Don't prematurely stop SIP session timer
When Asterisk is the UAS (incoming call, endpoint is re-inviting) the SIP session timer expires after half the time the sip endpoint indicates in the Session-expires header in proc_session_timer(). The session timer was being stopped totally and being handled as an error case instead of running again until the second expiry. This patch treats the half-time expiry as a non-error case and continues the timer until the true expiry.

(closes issue ASTERISK-18996)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
Patches: session_timer_fix.diff by Terry Wilson (License #5357)
  based on session_timer.patch by Thomas Arimont (License #5525)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16 20:15:24 +00:00
Tilghman Lesher c60d15222c Add ABS() absolute value function to the expression parser.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16 19:49:50 +00:00
Matthew Jordan e09527b10d Create and initialize udptl only when dialog negotiates for image media
Prior to this patch, the udptl struct was allocated and initialized when a
dialog was associated with a peer that supported T.38, when a new SIP
channel was allocated, or what an INVITE request was received.  This resulted
in any dialog associated with a peer that supported T.38 having udptl support
assigned to it, including the UDP ports needed for communication.  This
occurred even in non-INVITE dialogs that would never send image media.

This patch creates and initializes the udptl structure only when the SDP
for a dialog specifies that image media is supported, or when Asterisk
indicates through the appropriate control frame that a dialog is to support
T.38.

(closes issue ASTERISK-16698)
Reported by: under
Tested by: Stefan Schmidt
Patches: udptl_20120113.diff uploaded by mjordan (License #6283)

(closes issue ASTERISK-16794)
Reported by: Elazar Broad
Tested by: Stefan Schmidt

review: https://reviewboard.asterisk.org/r/1668/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16 19:13:56 +00:00
Sean Bright 409751e2dc Sort the output of 'database showkey' as well.
You can pass wildcards (%) to the database CLI commands, so this will sort the
returned list of matches.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16 17:12:36 +00:00
Joshua Colp 35fef9a7dc Add missing code to set direct RTP setup information during dialing.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16 17:07:13 +00:00
Sean Bright 382d14a214 Sort the output of 'database show' by key.
This more closely mimics the behavior of 'database show' before the conversion
to sqlite3.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16 14:31:37 +00:00
Walter Doekes ef0de1358d Allow only one thread at a time to do asterisk cleanup/shutdown.
Add locking around the really-really-quit part of the core stop/restart
part. Previously more than one thread could be called to do cleanup,
causing atexit handlers to be run multiple times, in turn causing
segfaults.

(issue ASTERISK-18883)
Reviewed by: Terry Wilson
Review: https://reviewboard.asterisk.org/r/1662/
Review: https://reviewboard.asterisk.org/r/1658/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-15 20:16:08 +00:00
Walter Doekes b84c0aabd4 Fix -Werror=unused-but-set-variable compile error in utils/extconf.c.
Note that I'm not confirming legitimacy of having that file in tree at
all. Is anyone using aelparse/conf2ael?

(issue ASTERISK-15350)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-15 19:57:54 +00:00
Kevin P. Fleming 35a5b042d7 Ensure that all AC_LANG_PROGRAM calls in the configure script are properly quoted.
Recent versions of autoconf (2.68 on my system) won't properly process the configure
script unless every call to AC_LANG_PROGRAM is m4-quoted. Many calls in the script
were, but many were not. This patch corrects the unquoted calls.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-14 16:43:12 +00:00
Kevin P. Fleming 0f83634984 Multiple revisions 350788-350789
........
  r350788 | kpfleming | 2012-01-14 09:22:33 -0600 (Sat, 14 Jan 2012) | 8 lines
  
  Ensure that two prerequisites are properly installed on Debian-style distributions.
  
  * Don't specify a specific version of libgmime; newer versions are available
    now and acceptable.
  
  * Install libsrtp so that res_srtp can be built.
........
  r350789 | kpfleming | 2012-01-14 09:23:32 -0600 (Sat, 14 Jan 2012) | 3 lines
  
  Correct some 'set-but-not-used' variable warnings.
........

Merged revisions 350788-350789 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-14 15:51:43 +00:00
Kinsey Moore d05a7d45cd Run bootstrap.sh for the for the ASTERISK-18929 fix
configure and autoconfig.h.in were not regenerated when the fix was committed.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 22:17:13 +00:00
Richard Mudgett 835067a526 Correct eventtype names in cel_odbc and cel_pgsql sample files
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 21:52:44 +00:00
Kinsey Moore 76888b5990 Make sure asterisk builds on OpenBSD
OpenBSD defines SO_PEERCRED, but it returns a 'struct sockpeercred', not
'struct ucred', which causes compilation of main/asterisk.c to fail in
read_credentials().  This allows configure to check for sockpeercred and
asterisk to deal with it properly.

(closes issue ASTERISK-18929)
Reported-by: Barry Miller
Patch-by: Barry Miller
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 21:42:12 +00:00
Mark Michelson 9c161503dc Set port to a default sane value if a bogus one is provided when parsing hostnames.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 20:32:19 +00:00
Richard Mudgett ec2b28d913 Remove some dead code in ast_bridge_call().
None of the parameters to ast_bridge_call() can be NULL for the bridge to
work so no need to check for it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 18:52:53 +00:00
Richard Mudgett 523c95e146 Add missing CEL logging fields to various CEL backends.
Multiple revisions 350555,350571

........
  r350555 | rmudgett | 2012-01-13 11:12:51 -0600 (Fri, 13 Jan 2012) | 12 lines
  
  Add missing CEL logging fields to various CEL backends.
  
  * Add missing eventextra to cel_psql.c and cel_odbc.c.
  
  * Add missing PeerAccount and EventExtra to cel_manager.c.
  
  * Add missing userdeftype support for cel_custom.conf.sample and
  cel_sqlite3_custom.conf.sample.
  
  (closes issue ASTERISK-17190)
  Reported by: Bryant Zimmerman
........
  r350571 | rmudgett | 2012-01-13 11:23:57 -0600 (Fri, 13 Jan 2012) | 8 lines
  
  Use compatible names for event extra data for various CEL backends.
  
  * Change eventextra to extra in cel_psql.c and cel_odbc.c.
  
  * Change EventExtra to Extra in cel_manager.c.
  
  (issue ASTERISK-17190)
........

Merged revisions 350555,350571 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 17:36:44 +00:00