Commit Graph

2516 Commits

Author SHA1 Message Date
Terry Wilson 99cae5b750 Opaquify channel stringfields
Continue channel opaque-ification by wrapping all of the stringfields.
Eventually, we will restrict what can actually set these variables, but
the purpose for now is to hide the implementation and keep people from
adding code that directly accesses the channel structure. Semantic
changes will follow afterward.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 20:12:09 +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
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
Matthew Jordan a8276fe8ef Fix crash from bridge channel hangup race condition in ConfBridge
This patch addresses two issues in ConfBridge and the channel bridge layer:
1. It fixes a race condition wherein the bridge channel could be hung up
2. It removes the deadlock avoidance from the bridging layer and makes the
   bridge_pvt an ao2 ref counted object

Patch by David Vossel (mjordan was merely the commit monkey)

(issue ASTERISK-18988)
(closes issue ASTERISK-18885)
Reported by: Dmitry Melekhov
Tested by: Matt Jordan
Patches: chan_bridge_cleanup_v.diff uploaded by David Vossel (license 5628)

(closes issue ASTERISK-19100)
Reported by: Matt Jordan
Tested by: Matt Jordan

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 16:48:06 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
There are many benefits to making the ast_channel an opaque handle, from
increasing maintainability to presenting ways to kill masquerades. This patch
kicks things off by taking things a field at a time, renaming the field to
'__do_not_use_${fieldname}' and then writing setters/getters and converting the
existing code to using them. When all fields are done, we can move ast_channel
to a C file from channel.h and lop off the '__do_not_use_'.

This patch sets up main/channel_interal_api.c to be the only file that actually
accesses the ast_channel's fields directly. The intent would be for any API
functions in channel.c to use the accessor functions. No more monkeying around
with channel internals. We should use our own APIs.

The interesting changes in this patch are the addition of
channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
use accessor functions when ast_channel is really opaque), and some re-working
of the way channel iterators/callbacks are handled so as to avoid creating fake
ast_channels on the stack to pass in matching data by directly accessing fields
(since "name" is a stringfield and the fake channel doesn't init the
stringfields, you can't use the ast_channel_name_set() function). I went with
ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
setter.

The majority of the grunt-work for this change was done by writing a semantic
patch using Coccinelle ( http://coccinelle.lip6.fr/ ).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09 22:15:50 +00:00
Russell Bryant 2b2d34b3c9 Constify tag argument in REF_DEBUG related code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-31 15:45:57 +00:00
Kevin P. Fleming fdda494776 Improve T.38 gateway V.21 preamble detection.
This commit removes the V.21 preamble detection code previously added to the
generic DSP implementation in Asterisk, and instead enhances the res_fax module
to be able to utilize V.21 preamble detection functionality made available by
FAX technology modules. This commit also adds such support to res_fax_spandsp,
which uses the Spandsp modem tone detection code to do the V.21 preamble
detection.

There should be no functional change here, other than much more reliable V.21
preamble detection (and thus T.38 gateway initiation).
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-28 18:59:16 +00:00
Matthew Jordan d9651f2be9 Fix timing source dependency issues with MOH
Prior to this patch, res_musiconhold existed at the same module priority level
as the timing sources that it depends on.  This would cause a problem when
music on hold was reloaded, as the timing source could be changed after
res_musiconhold was processed.  This patch adds a new module priority level,
AST_MODPRI_TIMING, that the various timing modules are now loaded at.  This
now occurs before loading other resource modules, such that the timing source
is guaranteed to be set prior to resolving the timing source dependencies.

(closes issue ASTERISK-17474)
Reporter: Luke H
Tested by: Luke H, Vladimir Mikhelson, zzsurf, Wes Van Tlghem, elguero, Thomas Arimont
Patches:
 asterisk-17474-dahdi_timing-infinite-wait-fix_v3_branch-1.8.diff uploaded by elguero (License #5026)
 asterisk-17474-dahdi_timing-infinite-wait-fix_v3_branch-10.diff uploaded by elguero (License #5026)
 asterisk-17474-dahdi_timing-infinite-wait-fix_v3.diff uploaded by elguero (License #5026)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-27 20:55:15 +00:00
Richard Mudgett 32e35e5fcd Fix extension state callback references in chan_sip.
Chan_sip gives a dialog reference to the extension state callback and
assumes that when ast_extension_state_del() returns, the callback cannot
happen anymore.  Chan_sip then reduces the dialog reference count
associated with the callback.  Recent changes (ASTERISK-17760) have
resulted in the potential for the callback to happen after
ast_extension_state_del() has returned.  For chan_sip, this could be very
bad because the dialog pointer could have already been destroyed.

* Added ast_extension_state_add_destroy() so chan_sip can account for the
sip_pvt reference given to the extension state callback when the extension
state callback is deleted.

* Fix pbx.c awkward statecbs handling in ast_extension_state_add_destroy()
and handle_statechange() now that the struct ast_state_cb has a destructor
to call.

* Ensure that ast_extension_state_add_destroy() will never return -1 or 0
for a successful registration.

* Fixed pbx.c statecbs_cmp() to compare the correct information.  The
passed in value to compare is a change_cb function pointer not an object
pointer.

* Make pbx.c ast_merge_contexts_and_delete() not perform callbacks with
AST_EXTENSION_REMOVED with locks held.  Chan_sip is notorious for
deadlocking when those locks are held during the callback.

* Removed unused lock declaration for the pbx.c store_hints list.

(closes issue ASTERISK-18844)
Reported by: rmudgett

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23 02:35:13 +00:00
Terry Wilson b9bf2444e0 Allow packetization vaules > 127
According to the RTP packetization documentation, and the maximum values
listed in AST_FORMAT_LIST, we should support values > that the signed
char array that ast_codec_pref makes available to store the value. All
places in the code treat the framing field as though it were an int
array instaead of a char array anyway, so this just fixes the type of
the array.

(closes issue ASTERISK-18876)
Review: https://reviewboard.asterisk.org/r/1639/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-22 20:39:48 +00:00
Richard Mudgett b05d4603c4 Fix crash during CDR update.
The ast_cdr_setcid() and ast_cdr_update() were shown in ASTERISK-18836 to
be called by different threads for the same channel.  The channel driver
thread and the PBX thread running dialplan.

* Add lock protection around CDR API calls that access an ast_channel
pointer.

(closes issue ASTERISK-18836)
Reported by: gpluser

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16 21:10:19 +00:00
Matthew Jordan 9057aa20b6 Backed out core changes from r346391
During testing, it was discovered that there were a number of side effects
introduced by r346391 and subsequent check-ins related to it (r346429,
r346617, and r346655).  This included the /main/stdtime/ test 'hanging',
as well as the remote console option failing to receive the appropriate output
after a period of time.

I only backed out the changes to main/ and utils/, as this was adequate
to reverse the behavior experienced.

(issue ASTERISK-18974)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-12 19:35:08 +00:00
Jonathan Rose 518ccb6706 Remove autojump extensions from SayUnixTime, make an option to perform automatic jumps.
When a caller sends DTMF while the SayUnixTime application is saying the time, The call
would jump to the next extension much like it does during Background(). This patch adds
option 'j' to SayUnixTime which when used employs the old behavior. Also, this patch
allows arguments to sayunixtime to not be used as empty strings in the case of something
like 'sayunixtime(,,,j)' or 'sayunixtime(,,pattern).

(closes issue ASTERISK-16675)
Reported by: jlpedrosa
Patches:
	patch_SayUnixTime_noJump.patch uploaded by jlpedrosa (license 5959)
Review: https://reviewboard.asterisk.org/r/956/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-09 20:27:03 +00:00
Terry Wilson 980ab2d018 Add ASTSBINDIR to the list of configurable paths
This patch also makes astdb2sqlite3 and astcanary use the configured
directory instead of relying on $PATH.

(closes issue ASTERISK-18959)
Review: https://reviewboard.asterisk.org/r/1613/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-07 20:15:29 +00:00
Richard Mudgett ca41b4aba0 Doubly linked lists unit test and update to implementation.
Update the doubly linked list implementation.  Now safe traversing can
insert before and after the current node when traversing in either
direction.

Updated the linked lists unit test test_linkedlist to also test doubly
linked lists.  The old test_dlinkedlist requires a manual check of results
and probably should be removed.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-06 19:09:56 +00:00
Richard Mudgett 83cd844b82 Re-resolve the STUN address if a STUN poll fails for res_stun_monitor.
The STUN socket must remain open between polls or the external address
seen by the STUN server is likely to change.  However, if the STUN request
poll fails then the STUN server address needs to be re-resolved and the
STUN socket needs to be closed and reopened.

* Re-resolve the STUN server address and create a new socket if the STUN
request poll fails.

* Fix ast_stun_request() return value consistency.

* Fix ast_stun_request() to check the received packet for expected message
type and transaction ID.

* Fix ast_stun_request() to read packets until timeout or an associated
response packet is found.  The stun_purge_socket() hack is no longer
required.

* Reduce ast_stun_request() error messages to debug output.

* No longer pass in the destination address to ast_stun_request() if the
socket is already bound or connected to the destination.

(closes issue ASTERISK-18327)
Reported by: Wolfram Joost
Tested by: rmudgett

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-01 21:19:41 +00:00
Jonathan Rose 9ef171ffe0 r346525 | jrose | 2011-11-30 15:10:38 -0600 (Wed, 30 Nov 2011) | 18 lines
Cleaning up chan_sip/tcptls file descriptor closing.

This patch attempts to eliminate various possible instances of undefined behavior caused
by invoking close/fclose in situations where fclose may have already been issued on a
tcptls_session_instance and/or closing file descriptors that don't have a valid index
for fd (-1). Thanks for more than a little help from wdoekes.

(closes issue ASTERISK-18700)
Reported by: Erik Wallin

(issue ASTERISK-18345)
Reported by: Stephane Cazelas

(issue ASTERISK-18342)
Reported by: Stephane Chazelas

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30 22:03:02 +00:00
Jonathan Rose fb4c483eb7 Reverting 346525 due to accidental patch against trunk instead of 1.8
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30 21:32:23 +00:00
Jonathan Rose 6fa827b5d0 Cleaning up chan_sip/tcptls file descriptor closing.
This patch attempts to eliminate various possible instances of undefined behavior caused
by invoking close/fclose in situations where fclose may have already been issued on a
tcptls_session_instance and/or closing file descriptors that don't have a valid index
for fd (-1). Thanks for more than a little help from wdoekes.

(closes issue ASTERISK-18700)
Reported by: Erik Wallin

(issue ASTERISK-18345)
Reported by: Stephane Cazelas

(issue ASTERISK-18342)
Reported by: Stephane Chazelas

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30 21:10:38 +00:00
Tilghman Lesher 77b670c4ab Allow each logging destination and console to have its own notion of the verbosity level.
Review: https://reviewboard.asterisk.org/r/1599


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-29 18:43:16 +00:00
David Vossel d7dec4f14f Merged revisions 346349 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r346349 | dvossel | 2011-11-28 18:00:11 -0600 (Mon, 28 Nov 2011) | 10 lines
  
  Fixes memory leak in message API.
  
  The ast_msg_get_var function did not properly decrement
  the ref count of the var it retrieves.  The way this is
  implemented is a bit tricky, as we must decrement the var and then
  return the var's value.  As long as the documentation for the
  function is followed, this will not result in a dangling pointer as
  the ast_msg structure owns its own reference to the var while it
  exists in the var container.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-29 00:03:36 +00:00
Richard Mudgett 7d9ba4875b Fix calls to ast_get_ip() not initializing the address family.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23 23:03:32 +00:00
Walter Doekes b7aee9ebc9 Fix ast_str_truncate signedness warning and documentation.
Review: https://reviewboard.asterisk.org/r/1594
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23 19:58:19 +00:00
Kinsey Moore e6ca768081 Fix res_jabber resource leaks
This should fix almost all resource leaks in res_jabber that involve
ASTOBJ_CONTAINER_FIND and resolves an ambiguous situation where
ast_aji_get_client would sometimes bump an object's refcount and sometimes not.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23 17:16:33 +00:00
Richard Mudgett 2b3e28f88c Fix dnsmgr entries to ask for the same address family each time.
The dnsmgr refresh would always get the first address found regardless of
the original address family requested.  So if you asked for only IPv4
addresses originally, you might get an IPv6 address on refresh.

* Saved the original address family requested by ast_dnsmgr_lookup() to be
used when the address is refreshed.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-22 23:06:11 +00:00
Walter Doekes d777e15792 Clarify why the AST_LOG_* macros exist next to the LOG_* macros.
(issue ASTERISK-17973)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-22 20:32:51 +00:00
Walter Doekes 735e48f92f Use __alignof__ instead of sizeof for stringfield length storage.
Kevin P Fleming suggested that r343157 should use __alignof__ instead
of sizeof. For most systems this won't be an issue, but better fix it
now while it's still fresh.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11 22:00:14 +00:00
Olle Johansson 816dc295c2 Formatting and doxygen improvements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-06 09:51:09 +00:00
Walter Doekes 7fd2a68b0e Ensure that string field lengths are properly aligned
Integers should always be aligned. For some platforms (ARM, SPARC) this
is more important than for others. This changeset ensures that the
string field string lengths are aligned on *all* platforms, not just on
the SPARC for which there was a workaround. It also fixes that the
length integer can be resized to 32 bits without problems if needed.

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

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

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

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


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

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

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

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01 21:02:56 +00:00
Richard Mudgett 85dbd68f87 Whitespace and some better macro variable names.
* Renamed AST_LIST_TRAVERSE_SAFE_BEGIN __new_prev to __list_current.

* Renamed AST_LIST_MOVE_CURRENT __list_cur to __extracted.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-29 04:41:21 +00:00
Richard Mudgett f7ce570c35 Fix AST_LIST_INSERT_BEFORE_CURRENT() updating the wrong variable.
AST_LIST_INSERT_BEFORE_CURRENT() could not be used twice in an iteration
or before AST_LIST_REMOVE_CURRENT() without corrupting the list.
AST_LIST_INSERT_BEFORE_CURRENT() could also corrupt the list if
AST_LIST_INSERT_BEFORE_CURRENT() or AST_LIST_REMOVE_CURRENT() is used on
the next iteration.

* Fixed cut and paste error using the wrong variable in
AST_LIST_INSERT_BEFORE_CURRENT().

* Added linked list unit tests for AST_LIST_INSERT_BEFORE_CURRENT(),
AST_LIST_APPEND_LIST(), and AST_LIST_INSERT_LIST_AFTER().
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-29 04:31:51 +00:00
Terry Wilson 700f0a2752 Return NULL when no results returned for realtime_multientry
It was not documented what the return value should be when no entries
were returned with the multientry realtime callback. This change forces
consistent behavior even if the backends return an empty ast_config.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 01:29:32 +00:00
Richard Mudgett 41ade83749 Fix ao2obj.h comment typos and add missing link/unlink nolock debug defines.
........

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


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

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

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-20 22:03:35 +00:00
Terry Wilson 2f1130e13f Clean up ast_check_digits
The code was originally copied from the is_int() function in the AEL
code. wdoekes pointed out that the function should take a const char*
and that their was an unneeded variable. This is now fixed.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-20 15:17:53 +00:00
Terry Wilson 5f8648892f Don't use is_int() since it doesn't link well on all platforms
Just create an normal API function in strings.h that does the same thing
just to be safe.

ASTERISK-17146
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-19 07:45:06 +00:00
Richard Mudgett 10de040b6e More parking issues.
* Fix potential deadlocks in SIP and IAX blind transfer to parking.

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

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

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

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

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


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

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

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

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

Merge-From: http://svn.asterisk.org/svn/asterisk/branches/10@340280


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-11 19:06:29 +00:00
Richard Mudgett 067250f74c Convert registered AMI actions to ao2 objects.
* Fixed race between calling an AMI action callback and unregistering that
action.  Refixes ASTERISK-13784 broken by ASTERISK-17785 change.

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

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

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

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

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

* Fixed AMI GetConfigJSON action output format.

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

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-11 18:57:47 +00:00
Matthew Nicholson bb07ca66a1 Merged revisions 340109 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10 14:16:27 +00:00
Richard Mudgett 6e5f97df77 Merged revisions 339720 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r339720 | rmudgett | 2011-10-06 17:58:40 -0500 (Thu, 06 Oct 2011) | 27 lines
  
  Merged revisions 339719 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r339719 | rmudgett | 2011-10-06 17:47:50 -0500 (Thu, 06 Oct 2011) | 20 lines
    
    Fix regression in configure script for libpri capability checks.
    
    JIRA AST-598 added the PRI_L2_PERSISTENCE option to fix BRI PTMP TE layer
    2 persistence issues with some telcos.  ASTERISK-18535 attempted to fix
    the unexpected requirement that libpri *must* have that feature to work
    with Asterisk.  The AST_EXT_LIB_SETUP_DEPENDENT lines made the PRI
    optional features required.  Unfortunately, I thought
    AST_EXT_LIB_SETUP_DEPENDENT didn't do anything useful for libpri and
    deleted those lines for libpri.  The result was the HAVE_PRI_xxx defines
    that control the ability to use optional libpri features were also
    deleted.
    
    * Created AST_EXT_LIB_SETUP_OPTIONAL configuration macro to allow optional
    features in a library that the source code could take advantage of if the
    code supports the feature.
    
    (closes issue ASTERISK-18687)
    Reported by: Norbert
    Tested by: rmudgett
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-06 23:06:43 +00:00
Gregory Nietsky b698038995 Add generic faxdetect framehook to res_fax
Added func FAXOPT(faxdetect)=yes,cng,t38[,timeout]/no
to enable dialplan faxdetect allowing more flexibility.

as soon as a fax tone is detected the framehook is removed.
there is a penalty involved in running this framehook on
non G711 channels as they will be transcoded.

CNG tone is suppresed using the SQUELCH flag to allow
WaitForNoise to be run on the channel to detect Voice.

(Closes issue ASTERISK-18569)
Reported by: Myself
Reviewed by: Matthew Nicholson, Kevin Fleming

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-05 06:50:18 +00:00
Richard Mudgett e9736c586f Merged revisions 338253 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r338253 | rmudgett | 2011-09-28 16:22:05 -0500 (Wed, 28 Sep 2011) | 14 lines
  
  Merged revisions 338235 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r338235 | rmudgett | 2011-09-28 16:17:45 -0500 (Wed, 28 Sep 2011) | 7 lines
    
    Fix inconsistency in LOG_VERBOSE/AST_LOG_VERBOSE declaration.
    
    (closes issue ASTERISK-17973)
    Reported by: Luke H
    Patches:
          logger_h.patch (license #6278) patch uploaded by Luke H
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-28 21:30:14 +00:00
Richard Mudgett 55b70ae625 Merged revisions 337974 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-26 19:40:12 +00:00
Jonathan Rose 5982bdcb7c Merged revisions 337595,337597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r337595 | jrose | 2011-09-22 10:35:50 -0500 (Thu, 22 Sep 2011) | 12 lines
  
  Generate Security events in chan_sip using new Security Events Framework
  
  Security Events Framework was added in 1.8 and support was added for AMI to generate
  events at that time. This patch adds support for chan_sip to generate security events.
  
  (closes issue ASTERISK-18264)
  Reported by: Michael L. Young
  Patches:
       security_events_chan_sip_v4.patch (license #5026) by Michael L. Young
  Review: https://reviewboard.asterisk.org/r/1362/
........
  r337597 | jrose | 2011-09-22 10:47:05 -0500 (Thu, 22 Sep 2011) | 10 lines
  
  Forgot to svn add new files to r337595
  
  Part of Generating security events for chan_sip
  
  (issue ASTERISK-18264)
  Reported by: Michael L. Young
  Patches:
      security_events_chan_sip_v4.patch (License #5026) by Michael L. Young
  Reviewboard: https://reviewboard.asterisk.org/r/1362/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-22 16:35:20 +00:00
Matthew Jordan e218748ac1 Merged revisions 337120 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20 23:02:25 +00:00
Tilghman Lesher 5e7121b44f Merged revisions 336734 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r336734 | tilghman | 2011-09-19 15:29:40 -0500 (Mon, 19 Sep 2011) | 18 lines
  
  Merged revisions 336733 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r336733 | tilghman | 2011-09-19 15:27:03 -0500 (Mon, 19 Sep 2011) | 11 lines
    
    Various changes to allow 1.8 to compile on Mac OS X Lion (10.7)
    
    * Makefile workaround for 10.6 extended to work on 10.7 and later.
    * Now uses the 'weak' symbol for Lion systems, which no longer support
      'weak_import'
    
    Closes ASTERISK-17612.
    Closes ASTERISK-18213.
    
    Tested by: tilghman, oej.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19 20:31:09 +00:00
Jonathan Rose beae2df26e Merged revisions 336307 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-16 21:20:02 +00:00
Richard Mudgett ae4c13f4f3 Merged revisions 335912 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r335912 | rmudgett | 2011-09-14 13:31:15 -0500 (Wed, 14 Sep 2011) | 20 lines
  
  Merged revisions 335911 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r335911 | rmudgett | 2011-09-14 13:21:35 -0500 (Wed, 14 Sep 2011) | 13 lines
    
    Remove unnecessary libpri dependency checks in the configure script.
    
    Using the --with-pri option with the configure script generated an error
    about not having PRI_L2_PERSISTENCE if you did not have the absolute
    latest libpri SVN checkout installed.
    
    The AST_EXT_LIB_SETUP_DEPENDENT macro in the configure.ac script seems to
    be for libraries that are dependent upon other libraries and not
    necessarily for optional/added features within a library.
    
    (closes issue ASTERISK-18535)
    Reported by: Michael Keuter
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-14 18:38:43 +00:00
Russell Bryant 2a25779d47 Merged revisions 335510 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-13 07:35:59 +00:00
Olle Johansson 404151ad65 New sip.conf option for setting default tonezone for channel or individual devices
Review: https://reviewboard.asterisk.org/r/1429/

(closes issue ASTERISK-18497)

Thanks to russellb for peer review.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-12 13:57:57 +00:00
Matthew Jordan 8b5ba33fe0 Merged revisions 335078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-09 16:28:23 +00:00
Richard Mudgett 220bf14557 Merged revisions 334297 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-02 17:19:17 +00:00
Richard Mudgett d9526bc6c8 Merged revisions 333786 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r333786 | rmudgett | 2011-08-29 16:12:29 -0500 (Mon, 29 Aug 2011) | 13 lines
  
  Merged revisions 333784-333785 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r333784 | rmudgett | 2011-08-29 16:05:43 -0500 (Mon, 29 Aug 2011) | 2 lines
    
    Fix deadlock potential of chan_mobile.c:mbl_ast_hangup().
  ........
    r333785 | rmudgett | 2011-08-29 16:06:16 -0500 (Mon, 29 Aug 2011) | 1 line
    
    Add some do not hold locks notes to channel.h
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-29 21:17:51 +00:00
Matthew Jordan 3b53a9cdb3 Merged revisions 332817 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r332817 | mjordan | 2011-08-22 13:15:51 -0500 (Mon, 22 Aug 2011) | 4 lines
  
  Review: https://reviewboard.asterisk.org/r/1364/
  
  This update adds a new AMI event, TestEvent, which is enabled when the TEST_FRAMEWORK compiler flag is defined.  It also adds initial usage of this event to app_voicemail.  The TestEvent AMI event is used extensively by the voicemail tests in the Asterisk Test Suite.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 19:19:44 +00:00
Jonathan Rose 901e275c4c Add option for logging congested calls as CONGESTION instead of NO_ANSWER in CDR
This patch adds a CDR option to cdr.conf that will allow CDR files to log calls ending
with congestion in a way that is unique from other unanswered calls.

(closes issue ASTERISK-14842)
Reported by: Alec Davis
Patches:
	cdr_congestion.diff.txt (License #5546) patch uploaded by Alec Davis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 17:05:14 +00:00
Matthew Nicholson 91d3a7d3a1 Merged revisions 332756 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r332756 | mnicholson | 2011-08-22 11:29:45 -0500 (Mon, 22 Aug 2011) | 4 lines
  
  add a way to disable and/or modify the gateway timeout
  
  ASTERISK-18219
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 16:31:59 +00:00
Tilghman Lesher 318f0f5514 Merged revisions 332369 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332369 | tilghman | 2011-08-17 14:24:59 -0500 (Wed, 17 Aug 2011) | 17 lines
  
  Merged revisions 332355 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332355 | tilghman | 2011-08-17 14:21:36 -0500 (Wed, 17 Aug 2011) | 10 lines
    
    Re-add support for spaces in pathnames, including now spaces in DESTDIR.
    
    This was initially added to 1.8 prior to release, primarily to support the
    standard paths on Mac OS X, but was partially reverted recently in Subversion,
    due to the lack of support for spaces in DESTDIR.  This commit restores support
    for the standard paths on Mac OS X, and also includes support for spaces in
    DESTDIR.

    (closes issue ASTERISK-18290)
    Reported by: pabelanger
    
    Review: https://reviewboard.asterisk.org/r/1326/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-17 19:30:50 +00:00
Richard Mudgett 265102faf8 Merged revisions 332265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332265 | rmudgett | 2011-08-17 11:01:29 -0500 (Wed, 17 Aug 2011) | 33 lines
  
  Merged revisions 332264 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332264 | rmudgett | 2011-08-17 10:51:08 -0500 (Wed, 17 Aug 2011) | 26 lines
    
    Outgoing BRI calls fail when using Asterisk 1.8 with HA8, HB8, and B410P cards.
    
    France Telecom brings layer 2 and layer 1 down on BRI lines when the line
    is idle.  When layer 1 goes down Asterisk cannot make outgoing calls and
    the HA8 and HB8 cards also get IRQ misses.
    
    The inability to make outgoing calls is because the line is in red alarm
    and Asterisk will not make calls over a line it considers unavailable.
    The IRQ misses for the HA8 and HB8 card are because the hardware is
    switching clock sources from the line which just brought layer 1 down to
    internal timing.
    
    There is a DAHDI option for the B410P card to not tell Asterisk that layer
    1 went down so Asterisk will allow outgoing calls: "modprobe wcb4xxp
    teignored=1".  There is a similar DAHDI option for the HA8 and HB8 cards:
    "modprobe wctdm24xxp bri_teignored=1".  Unfortunately that will not clear
    up the IRQ misses when the telco brings layer 1 down.
    
    * Add layer 2 persistence option to customize the layer 2 behavior on BRI
    PTMP lines.  The new option has three settings: 1) Use libpri default
    layer 2 setting.  2) Keep layer 2 up.  Bring layer 2 back up when the peer
    brings it down.  3) Leave layer 2 down when the peer brings it down.
    Layer 2 will be brought up as needed for outgoing calls.
    
    JIRA AST-598
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-17 16:18:27 +00:00
Terry Wilson 16acfefa74 Merged revisions 331097 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r331097 | twilson | 2011-08-08 17:59:01 -0500 (Mon, 08 Aug 2011) | 5 lines
  
  Bump the AMI protocol version to 1.2
  
  As a result of converting Unlink events that were missed in the AMI
  1.1 update to Bridge events, the AMI protocol version is being incremented.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-08 22:59:45 +00:00
Russell Bryant 6a15e95a32 astobj2: Avoid using temporary objects + ao2_find() with OBJ_POINTER.
There is a fairly common pattern making its way through the code base where we
put a temporary object on the stack so we can call ao2_find() with OBJ_POINTER.
The purpose is so that it can be passed into the object hash function.
However, this really seems like a hack and potentially error prone.  This patch
is a first stab at approach to avoid having to do that.

It adds a new flag, OBJ_KEY, which can be used instead of OBJ_POINTER in these
situations.  Then, the hash function can know whether it was given an object or
some custom data to hash.

The patch also changes some uses of ao2_find() for iax2_user and iax2_peer
objects to reflect how OBJ_KEY would be used.

So long, and thanks for all the fish.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-29 19:34:36 +00:00
Jonathan Rose d170e5e829 reverting 329840 due to failing tests. Going to change this feature to be purely optional.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-27 21:22:12 +00:00
Jonathan Rose 3ee80d6a90 Adds cdr logging of calls resulting in CONGESTION
Applies a patch made a long time ago by alecdavis which adds a CDR feature for logging
calls that failed due to congestion.

(closes issue #15907)
Reported by: alecdavis
Patches: 
      cdr_congestion.diff.txt uploaded by alecdavis (license #5546)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-27 20:42:18 +00:00
Jonathan Rose 462e0fe530 Merged revisions 329528 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r329528 | jrose | 2011-07-26 08:52:34 -0500 (Tue, 26 Jul 2011) | 24 lines
  
  Merged revisions 329527 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r329527 | jrose | 2011-07-26 08:25:35 -0500 (Tue, 26 Jul 2011) | 17 lines
    
    Fixes some voicemail forwarding behavior based around prepend mode.
    
    Formerly, prepend forwarding would have the user record a message with no useful prompt
    and an expectation for the user to push a button on the phone when finished recording.
    If a length of silence was detected instead, the recording would be canceled and the user
    would re-enter the voicemail forwarding menu. Subsequent time-outs in prepend recording
    would also bug out in the sense that they would write over the original message and get
    sent to the recipient regardless of whether they timed out or were accepted. This patch
    fixes this issue and adds a prompt which will be played after a timeout informing the
    user that they needed to press a button. Currently, the sound files that we have are
    somewhat inadquate for this, so after the call we simply have Allison say "Please try
    again. Then press pound." which actually relies on two separate sound files. Just one
    would be more appropriate.
    
    reporter: Vlad Povorozniuc
    Review: https://reviewboard.asterisk.org/r/1327/ 
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-26 14:17:13 +00:00
Gregory Nietsky 3b1cc6de8d dsp_process was enhanced to work with alaw and ulaw in addition to slin.
noticed that some functions could be refactored here it is.

Reported by: irroot
Tested by: irroot, mnicholson
Review: https://reviewboard.asterisk.org/r/1304/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-25 14:07:01 +00:00
Russell Bryant f243d129c9 Merged revisions 329257 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r329257 | russell | 2011-07-21 15:22:36 -0500 (Thu, 21 Jul 2011) | 2 lines
  
  s/1.10/10.0/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-21 20:26:44 +00:00
Kinsey Moore 1dc97eb69b Merged revisions 328824 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328824 | kmoore | 2011-07-19 13:05:21 -0500 (Tue, 19 Jul 2011) | 18 lines
  
  Merged revisions 328823 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328823 | kmoore | 2011-07-19 12:57:18 -0500 (Tue, 19 Jul 2011) | 11 lines
    
    RTP bridge away with inband DTMF and feature detection
    
    When deciding whether Asterisk was allowed to bridge the call away from the
    core, chan_sip did not take into account the usage of features on dialed
    channels that require monitoring of DTMF on channels utilizing inband DTMF.
    This would cause Asterisk to allow the call to be locally or remotely bridged, 
    preventing access to the data required to detect activations of such features.
    
    (closes 17237)
    Review: https://reviewboard.asterisk.org/r/1302/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-19 18:07:22 +00:00
Terry Wilson c26bb50cc3 Merged revisions 328717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328717 | twilson | 2011-07-18 20:55:32 -0500 (Mon, 18 Jul 2011) | 14 lines
  
  Merged revisions 328716 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328716 | twilson | 2011-07-18 20:35:53 -0500 (Mon, 18 Jul 2011) | 7 lines
    
    Make AST_LIST_REMOVE safer
    
    AST_LIST_REMOVE shouldn't modify the element passed in if it isn't found. This
    commit also adds linked list unit tests.
    
    Review: https://reviewboard.asterisk.org/r/1321/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-19 02:00:56 +00:00
Richard Mudgett 145c174565 Merged revisions 328329 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

........
  r328329 | rmudgett | 2011-07-14 19:19:32 -0500 (Thu, 14 Jul 2011) | 2 lines
  
  Make hint watcher callback take const strings for context and exten parameters.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-15 00:23:14 +00:00
Matthew Nicholson 3f44b08b7b do v21 detection instead of CED detection for the fax gateway
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12 15:23:24 +00:00
Terry Wilson 3b4d9075f6 Merged revisions 327682 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r327682 | twilson | 2011-07-11 12:41:59 -0700 (Mon, 11 Jul 2011) | 9 lines
  
  Update chan_gtalk to work with changed GMail-based calls
  
  The messages sent by the GMail client have changed, but include the
  old-style messages as well. This patch checks for this case and
  uses the old-style offer.
  
  (closes issue ASTERISK-18084)
  Review: https://reviewboard.asterisk.org/r/1312/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11 19:49:35 +00:00
David Vossel 881173268c Updates follow_talker video_mode in confbridge application.
follow_talker mode originally echoed the same video stream
to all participants. As the primary talker switched around, the
video stream would result in the talker seeing themselves.  Now
the primary talker sees the last person who was talking rather than
themselves.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11 18:44:06 +00:00
Jason Parker aad813c6a2 I think reviewboard broke this. The whole file was doubled.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-07 22:39:54 +00:00
David Vossel f7195285c9 Adds missing celt.h file from celt pass-through support patch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-07 22:16:10 +00:00
David Vossel 513c680b8c Adds pass-through support for codec CELT.
This patch adds pass-through support for CELT.  CELT
formats are defined in codecs.conf and can be configured
to any sample rate a CELT endpoint supports.  This patch also
addresses a crash in channel.c resulting from a frame list being
freed incorrectly.  This crash was discovered while testing a CELT
translator which had to split encoded audio into multiple frames.
The codec translator is not a part of this patch, but may be
contributed in the future.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-07 19:39:17 +00:00
David Vossel 1339a0a535 Video support for ConfBridge.
Review: https://reviewboard.asterisk.org/r/1288/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-30 20:33:15 +00:00
Matthew Nicholson 0f0956e67a Fax gateway functionality (i.e. translating between a T.30 terminal and a T.38
terminal). Can be enabled on a channel by setting FAXOPT(gateway)=yes in the
dialplan.

Big thanks to irroot for porting this code to use the framehooks api.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-30 18:22:28 +00:00
Jonathan Rose 65773316ce Merged revisions 324768 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324768 | jrose | 2011-06-24 11:48:06 -0500 (Fri, 24 Jun 2011) | 11 lines
  
  DTMF wasn't being logged on connected consoles when enabled in logger.conf
  
  Previously in order for DTMF to be logged in a connected console session, the user would
  have to do logger set channel DTMF on.  This corrects that so that it is on by default.
  This issue was caused by an off by one error incurred by a logger level count of 6 in
  logger.h where it should have been 7.
  
  (closes issue: ASTERISK-17974)
  Reported by: Luke H
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-24 16:50:49 +00:00
David Vossel d5ea9e5ae2 Merged revisions 324652 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r324652 | dvossel | 2011-06-23 13:23:21 -0500 (Thu, 23 Jun 2011) | 20 lines
  
  Merged revisions 324634 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r324634 | dvossel | 2011-06-23 13:18:46 -0500 (Thu, 23 Jun 2011) | 13 lines
    
    Merged revisions 324627 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r324627 | dvossel | 2011-06-23 13:16:52 -0500 (Thu, 23 Jun 2011) | 7 lines
      
      Addresses AST-2011-010, remote crash in IAX2 driver
      
      Thanks to twilson for identifying the issue and providing the patches.
      
      AST-2011-010
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-23 18:26:09 +00:00
Terry Wilson 385b8c6f8b Merged revisions 324484 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324484 | twilson | 2011-06-22 13:52:04 -0500 (Wed, 22 Jun 2011) | 20 lines
  
  Stop sending IPv6 link-local scope-ids in SIP messages
  
  The idea behind the patch listed below was used, but in a more targeted manner.
  There are now address stringification functions for addresses that are meant to
  be sent to a remote party. Link-local scope-ids only make sense on the machine
  from which they originate and so are stripped in the new functions.
  
  There is also a host sanitization function added to chan_sip which is used
  for when peer and dialog tohost fields or sip_registry hostnames are used to
  craft a SIP message.
  
  Also added are some basic unit tests for netsock2 address parsing.
  
  (closes issue ASTERISK-17711)
  Reported by: ch_djalel
  Patches:
        asterisk-1.8.3.2-ipv6_ll_scope.patch uploaded by ch_djalel (license 1251)
  
  Review: https://reviewboard.asterisk.org/r/1278/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-22 19:12:24 +00:00
David Vossel 09a359449e Merged revisions 324364 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324364 | dvossel | 2011-06-21 15:11:52 -0500 (Tue, 21 Jun 2011) | 10 lines
  
  Fixes locking inversion issue in ast_async_goto()
  
  During this function we can not hold the "chan" lock while
  doing the masquerade, the explicit goto on the tmp chan, or
  the channel alloc.  Instead we need to get the channel lock,
  store off information about the channel that we need, and
  then let the channel lock go for the remainder of the function.
  
  Review: https://reviewboard.asterisk.org/r/1275/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-21 20:15:41 +00:00
Terry Wilson 34e2305ae7 Merged revisions 324048 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324048 | twilson | 2011-06-16 17:35:41 -0500 (Thu, 16 Jun 2011) | 8 lines
  
  Lock the channel before calling the setoption callback
  
  The channel needs to be locked before calling these callback functions. Also,
  sip_setoption needs to lock the pvt and a check p->rtp is non-null before using
  it.
  
  Review: https://reviewboard.asterisk.org/r/1220/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-16 22:49:49 +00:00
Terry Wilson 0fccd77f47 Merged revisions 323863 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r323863 | twilson | 2011-06-15 14:58:18 -0500 (Wed, 15 Jun 2011) | 2 lines
  
  Make ARRAY_LEN() return the same type on x86 and x86_64 systems
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 20:02:30 +00:00
Terry Wilson abd7ef817e Merged revisions 323370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r323370 | twilson | 2011-06-14 09:33:55 -0700 (Tue, 14 Jun 2011) | 10 lines
  
  Add rtpkeepalives back to 1.8
  
  The RTP-engine conversion left out support for handling rtpkeepalives.
  This patch adds them back.
  
  (closes issue ASTERISK-17304)
  Reported by: lmadsen
  
  Review: https://reviewboard.asterisk.org/r/1226/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-14 17:03:37 +00:00
Terry Wilson 5eb1d79d40 Merged revisions 322865 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322865 | twilson | 2011-06-09 15:29:20 -0700 (Thu, 09 Jun 2011) | 4 lines
  
  Correct ast_db_deltree documentation
  
  ast_db_deltree returns -1 on error, otherwise the number of deletions
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-09 22:32:56 +00:00
Richard Mudgett 0a8f9d2cf0 Merged revisions 322749 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322749 | rmudgett | 2011-06-09 11:31:53 -0500 (Thu, 09 Jun 2011) | 15 lines
  
  Remove potential deadlock in call pickup race.
  
  Deadlock is possible in ast_do_pickup() when holding the target channel
  lock and trying to get the chan channel lock.  Also, holding the target
  lock when calling ast_channel_masquerade() is not a good idea because that
  routine does deadlock avoidance.
  
  * Removed the need to hold the target lock after marking the target with a
  datastore and getting the connected line data off of the target channel.
  
  * Moved can_pickup() to ast_can_pickup() in features.c.  Now all the call
  pickup methods use the same basic call pickup availability check.
  
  Review: https://reviewboard.asterisk.org/r/1234/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-09 16:47:07 +00:00
Richard Mudgett ba625fa7d5 Correct some whitespace and a reference debug message.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-07 23:14:25 +00:00
Jonathan Rose 4ab3825fe4 Merged revisions 322069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322069 | jrose | 2011-06-06 14:07:56 -0500 (Mon, 06 Jun 2011) | 8 lines
  
  Fixes level toggling for logger set levels since it was reversed
   
  (closes issue ASTERISK-17850)
  Reported by: Luke H
  Tested by: jrose, Luke H
    
  Review: https://reviewboard.asterisk.org/r/1244/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-06 19:15:10 +00:00
Richard Mudgett 397c379a7d Merged revisions 321812-321813 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321812 | rmudgett | 2011-06-03 14:55:21 -0500 (Fri, 03 Jun 2011) | 1 line
  
  Correct IAX2 and SIP event subscription description string.
........
  r321813 | rmudgett | 2011-06-03 14:56:09 -0500 (Fri, 03 Jun 2011) | 1 line
  
  Constify subscription description parameter string.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 19:57:03 +00:00
Russell Bryant 3f4d0e8743 Support routing text messages outside of a call.
Asterisk now has protocol independent support for processing text messages
outside of a call.  Messages are routed through the Asterisk dialplan.
SIP MESSAGE and XMPP are currently supported.  There are options in sip.conf
and jabber.conf that enable these features.

There is a new application, MessageSend().  There are two new functions,
MESSAGE() and MESSAGE_DATA().  Documentation will be available on
the project wiki, wiki.asterisk.org.

Thanks to Terry Wilson for the assistance with development and to David Vossel
for helping with some additional testing.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-01 21:31:40 +00:00
Richard Mudgett 17b8521836 Merged revisions 321517 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321517 | rmudgett | 2011-05-31 15:54:35 -0500 (Tue, 31 May 2011) | 1 line
  
  Update some comments.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-31 20:55:06 +00:00
Richard Mudgett 74ba3af201 Merged revisions 321044 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321044 | rmudgett | 2011-05-26 13:10:17 -0500 (Thu, 26 May 2011) | 1 line
  
  Update ast_sockaddr comment with an important note.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-26 18:10:46 +00:00
Terry Wilson fc8d4e823c Use va_copy for stringfields
The ast_string_field_build_va functions were written to take to separate
va_lists to work around FreeBSD 4 not having va_copy defined.

In the end, we don't support anything using gcc < 3 anyway because we use
va_copy all over the place anyway. This patch just simplifies things by
removing the second va_list function arguments in favor of va_copy.

Review: https://reviewboard.asterisk.org/r/1233/
--This line, and those below, will be ignored--

M    include/asterisk/stringfields.h
M    main/utils.c
M    main/channel.c


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-26 15:55:22 +00:00
Richard Mudgett a42bf8cc92 Merged revisions 320796 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320796 | rmudgett | 2011-05-25 11:23:11 -0500 (Wed, 25 May 2011) | 17 lines
  
  Give zombies a safe channel driver to use.
  
  Recent crashes from zombie channels suggests that they need a safe home to
  goto.  When a masquerade happens, the physical part of the zombie channel
  is hungup.  The hangup normally sets the channel private pointer to NULL.
  If someone then blindly does a callback to the channel driver, a crash is
  likely because the private pointer is NULL.
  
  The masquerade now sets the channel technology of zombie channels to the
  kill channel driver.
  
  Related to the following issues:
  (issue #19116)
  (issue #19310)
  
  Review: https://reviewboard.asterisk.org/r/1224/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-25 16:50:38 +00:00
Kevin P. Fleming 1e5ba585d9 Merged revisions 320560 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320560 | kpfleming | 2011-05-23 10:47:14 -0500 (Mon, 23 May 2011) | 4 lines
  
  Don't generate spurious "No: command not found" messages when running the
  configure script on a system that has neither gmime-config nor pkg-config.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-23 15:48:37 +00:00
Richard Mudgett 5257a915a8 Option needed for Q931_IE_TIME_DATE to be optional in CONNECT message.
The NEC SV8300 rejects the Q931_IE_TIME_DATE for Q.SIG.

Add option to specify if and how much of the current time is put in
Q931_IE_TIME_DATE.
* Send date/time ie never.
* Send date/time ie date only.
* Send date/time ie date and hour.
* Send date/time ie date, hour, and minute.
* Send date/time ie date, hour, minute, and second.
* Send date/time ie default: Libpri will send date and hhmm only when in
NT PTMP mode to support ISDN phones.

(closes issue #19221)
Reported by: kenner

JIRA SWP-3396


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-17 20:13:27 +00:00
Paul Belanger 938290cf0d Merged revisions 319085 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r319085 | pabelanger | 2011-05-16 10:35:21 -0400 (Mon, 16 May 2011) | 10 lines
  
  Support gmime-2.4
  
  (closes issue #18863)
  Reported by: tzafrir
  Patches:
        gmime-2.4-18.diff uploaded by tzafrir (license 46)
        Tested by: tzafrir
  
  Review: https://reviewboard.asterisk.org/r/1213/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-16 14:38:16 +00:00
Alec L Davis 892b7a2efd Merged revisions 318671 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318671 | alecdavis | 2011-05-13 10:52:08 +1200 (Fri, 13 May 2011) | 30 lines
  
  Fix directed group pickup feature code *8 with pickupsounds enabled 
  
  Since 1.6.2, the new pickupsound and pickupfailsound in features.conf cause many issues.
  
  1). chan_sip:handle_request_invite() shouldn't be playing out the fail/success audio, as it has 'netlock' locked.
  2). dialplan applications for directed_pickups shouldn't beep.
  3). feature code for directed pickup should beep on success/failure if configured.
  
  Created a sip_pickup() thread to handle the pickup and playout the audio, spawned from handle_request_invite.
  
  Moved app_directed:pickup_do() to features:ast_do_pickup().
  
  Functions below, all now use the new ast_do_pickup()
  app_directed_pickup.c:
     pickup_by_channel()
     pickup_by_exten()
     pickup_by_mark()
     pickup_by_part()
  features.c:
     ast_pickup_call()
  
  (closes issue #18654)
  Reported by: Docent
  Patches: 
        ast_do_pickup_1.8_trunk.diff.txt uploaded by alecdavis (license 585)
  Tested by: lmadsen, francesco_r, amilcar, isis242, alecdavis, irroot, rymkus, loloski, rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1185/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-12 22:56:43 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
Tilghman Lesher 47a6dacf29 Merged revisions 315503 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r315503 | tilghman | 2011-04-26 14:32:50 -0500 (Tue, 26 Apr 2011) | 28 lines
  
  Merged revisions 315502 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r315502 | tilghman | 2011-04-26 14:22:52 -0500 (Tue, 26 Apr 2011) | 21 lines
    
    Merged revisions 315501 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r315501 | tilghman | 2011-04-26 14:18:46 -0500 (Tue, 26 Apr 2011) | 14 lines
      
      Fix the bounds-checking code.
      
      The code that set the bit within the select bitfield was correct, but the
      bounds-checking code was not.  The change to that line uses the new _bitsize
      macro for clarity.  Also, FD_ZERO macro did not zero-out anything but the
      first word of the bitfield, so this could have caused problems with modules
      using that macro with the expanded bitfield.
      
      (closes issue #18773)
       Reported by: jamicque
       Patches: 
             20110423__issue18773.diff.txt uploaded by tilghman (license 14)
       Tested by: chris-mac
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-26 19:38:41 +00:00
David Vossel 7f23115ad2 New HD ConfBridge conferencing application.
Includes a new highly optimized and customizable
ConfBridge application capable of mixing audio at
sample rates ranging from 8khz-192khz.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-21 18:11:40 +00:00
David Vossel 18d591cb48 Introduction of the JITTERBUFFER dialplan function.
Review: https://reviewboard.asterisk.org/r/1157/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20 20:52:15 +00:00
Richard Mudgett 7adbec49a5 Merged revisions 314417 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r314417 | rmudgett | 2011-04-20 11:54:02 -0500 (Wed, 20 Apr 2011) | 1 line
  
  AST_CONTROL_XXX comment changes.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20 16:55:07 +00:00
Richard Mudgett 37274c73ee Problems with ISDN MWI to phones.
The "controlling user number" is always the number of the voice mail box
which is identical with the subscriber number itself.  This number which
is listed in the ISDN phone MWI menu cannot be called back to contact the
voice mail box.  The controlling user number should be made configurable.

JIRA ABE-2738
JIRA SWP-2846


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18 19:48:00 +00:00
David Vossel 4b4549106b Merged revisions 314017 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r314017 | dvossel | 2011-04-18 08:41:06 -0500 (Mon, 18 Apr 2011) | 17 lines
  
  sip codec negotiation of dynamic rtp payloads error fix
  
  This patch fixes how chan_sip handles dynamic rtp payload types
  it does not understand.  At the moment if a dynamic payload's mime
  type does not match one we understand, the payload does not get
  removed from our payload table.  As a result of this, the payload
  is set to whatever dynamic codec we use internally for that payload
  number on outgoing INVITES.  This is incorrect.
  
  This patch fixes this by properly checking the rtpmap set function's
  return code to make sure it was found.  The function can return both
  -1 and -2 depending on the source of the mismatch.  We were just
  checking -1 explicitly.
  
  Review: https://reviewboard.asterisk.org/r/1169/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18 13:42:51 +00:00
Leif Madsen 945ceb9ac7 Merged revisions 313279 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r313279 | lmadsen | 2011-04-11 14:36:40 -0500 (Mon, 11 Apr 2011) | 21 lines
  
  Merged revisions 313278 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r313278 | lmadsen | 2011-04-11 14:33:03 -0500 (Mon, 11 Apr 2011) | 14 lines
    
    Merged revisions 313277 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r313277 | lmadsen | 2011-04-11 14:30:20 -0500 (Mon, 11 Apr 2011) | 6 lines
      
      Fix detection of OpenSSL 1.0
      
      (closes issue #19093)
      Reported by: tzafrir
      Patches: 
            detect_openssl_10.diff uploaded by tzafrir (license 46)
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-11 19:39:26 +00:00
Jonathan Rose 846cfa0ef0 New Feature for chan_dahdi. 4 length pattern matching.
In chan_dahdi.conf, the user can now use length 4 patterns in addition to the usual length 2 patterns.  The s
ntax remains the same and the method used to track the pattern history will only change when using the length
 4 patterns.

(closes issue SWP-3250)
Code:
        jrose
        rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-01 17:01:01 +00:00
Tilghman Lesher 3731fd9ccc Merged revisions 312286,312288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r312286 | tilghman | 2011-04-01 05:44:33 -0500 (Fri, 01 Apr 2011) | 2 lines
  
  Reload must react correctly against a possibly changed table, so dropping the conditional reload flag.
................
  r312288 | tilghman | 2011-04-01 05:58:45 -0500 (Fri, 01 Apr 2011) | 21 lines
  
  Merged revisions 312287 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r312287 | tilghman | 2011-04-01 05:51:24 -0500 (Fri, 01 Apr 2011) | 14 lines
    
    Merged revisions 312285 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r312285 | tilghman | 2011-04-01 05:36:42 -0500 (Fri, 01 Apr 2011) | 7 lines
      
      Found some leaking file descriptors while looking at ast_FD_SETSIZE dead code.
      
      (issue #18969)
       Reported by: oej
       Patches: 
             20110315__issue18969__14.diff.txt uploaded by tilghman (license 14)
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-01 10:59:32 +00:00
Richard Mudgett 57d979fa26 Fix function reference in comment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-31 17:51:04 +00:00
Jonathan Rose 6e36042f64 Mix Monitor: Now with r and t options.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-11 18:54:45 +00:00
Tilghman Lesher 6de1332214 Merged revisions 309808 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309808 | tilghman | 2011-03-06 18:54:42 -0600 (Sun, 06 Mar 2011) | 14 lines
  
  Merged revisions 309251 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309251 | tilghman | 2011-03-01 19:06:02 -0600 (Tue, 01 Mar 2011) | 7 lines
    
    Revert previous 2 commits, and instead conditionally redefine the same macro used in flex 2.5.35 that clashed with our workaround.
    
    Not surprisingly, the workaround was exactly the same code as was provided by
    the Flex maintainers, albeit in two different places, in different macros.
    
    This should fix the FreeBSD builds, which have an older version of Flex.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-07 01:01:08 +00:00
Terry Wilson 01a453351d Add setvar option to calendaring
Adding the setvar option with variable substitution on the value allows things
like setting the outbound caller id name to the summary of a calendar event,
etc. Values could be chained together as they are appended in order to do some
scripting if necessary.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 23:22:39 +00:00
Tilghman Lesher e5dc4c2d8e Merged revisions 309035 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309035 | tilghman | 2011-02-28 05:10:28 -0600 (Mon, 28 Feb 2011) | 15 lines
  
  Merged revisions 309033-309034 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309033 | tilghman | 2011-02-28 04:43:12 -0600 (Mon, 28 Feb 2011) | 4 lines
    
    A later version of flex already includes the fwrite workaround code, which if used twice causes a compilation error.
    
    Detect whether Flex will compile without the workaround; if so, suppress our workaround code.
  ........
    r309034 | tilghman | 2011-02-28 05:07:52 -0600 (Mon, 28 Feb 2011) | 2 lines
    
    Clarify meaning, removing double negative (stupid!)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-28 11:16:06 +00:00
David Vossel d760e81f37 Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff
-Functional changes
1. Dynamic global format list build by codecs defined in codecs.conf
2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf
3. Negotiation of SILK attributes in chan_sip.
4. SPEEX 32khz with translation
5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation
   using codec_resample.c
6. Various changes to RTP code required to properly handle the dynamic format list
   and formats with attributes.
7. ConfBridge now dynamically jumps to the best possible sample rate.  This allows
   for conferences to take advantage of HD audio (Which sounds awesome)
8. Audiohooks are no longer limited to 8khz audio, and most effects have been
   updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT.
9. codec_resample now uses its own code rather than depending on libresample.

-Organizational changes
Global format list is moved from frame.c to format.c
Various format specific functions moved from frame.c to format.c

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-22 23:04:49 +00:00
Richard Mudgett b2ef13cb60 Merged revisions 307879 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r307879 | rmudgett | 2011-02-15 10:13:55 -0600 (Tue, 15 Feb 2011) | 37 lines
  
  No response sent for SIP CC subscribe/resubscribe request.
  
  Asterisk does not send a response if we try to subscribe for call
  completion after we have received a 180 Ringing.  You can only subscribe
  for call completion when the call has been cleared.
  
  When we receive the 180 Ringing, for this call, its call-completion state
  is 'CC_AVAILABLE'.  If we then send a subscribe message to Asterisk, it
  trys to change the call-completion state to 'CC_CALLER_REQUESTED'.
  Because this is an invalid state change, it just ignores the message.  The
  only state Asterisk will accept our subscribe message is in the
  'CC_CALLER_OFFERED' state.
  
  Asterisk will go into the 'CC_CALLER_OFFERED' when the SIP client clears
  the call by sending a CANCEL.
  
  Asterisk should always send a response.  Even if its a negative one.
  
  
  The fix is to allow for the CCSS core to notify a CC agent that a failure
  has occurred when CC is requested.  The "ack" callback is replaced with a
  "respond" callback.  The "respond" callback has a parameter indicating
  either a successful response or a specific type of failure that may need
  to be communicated to the requester.
  
  (closes issue #18336)
  Reported by: GeorgeKonopacki
  Tested by: mmichelson, rmudgett
  
  JIRA SWP-2633
  
  (closes issue #18337)
  Reported by: GeorgeKonopacki
  Tested by: mmichelson
  
  JIRA SWP-2634
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-15 16:18:43 +00:00
David Vossel 08460fc094 Fixes bug in chan_sip where nativeformats are not set correctly.
The nativeformats field was being overwritten when it should have been
appended too.  This caused some format capabilities to be lost briefly and
some log warnings to be output.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-10 17:12:10 +00:00
Richard Mudgett 49feb747ba Pass a MCID request to the bridged channel.
Pass a MCID request to the bridged channel so the bridged channel can send
it to the network.

The ability to send the MCID request on an ISDN span is enabled with the
new chan_dahdi.conf mcid_send option.

JIRA SWP-2845
JIRA ABE-2736


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-07 23:33:44 +00:00
Richard Mudgett a8aeb04a9f Add ISDN display ie text handling options to chan_dahdi.conf.
The display ie handling can be controlled independently in the send and
receive directions with the following options:

* Block display text data.

* Use display text in SETUP/CONNECT messages for name.

* Use display text for COLP name updates (FACILITY/NOTIFY as appropriate).

* Pass arbitrary display text during a call.  Sent in INFORMATION
messages.  Received from any message that the display text was not used as
a name.

If the display options are not set then the options default to legacy
behavior.

The arbitrary display text is exchanged between bridged channels using the
AST_FRAME_TEXT frame type.

To send display text from the dialplan use the SendText() application when
the arbitrary display text option is enabled.

JIRA SWP-2688
JIRA ABE-2693


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 20:30:48 +00:00
Paul Belanger 3556e4c2d4 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556)
Reported by: kkm

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 16:55:39 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
Tilghman Lesher 324a3c1551 Merged revisions 305040 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r305040 | tilghman | 2011-01-31 01:51:40 -0600 (Mon, 31 Jan 2011) | 2 lines
  
  Use the non-specific API aliases, to avoid a problem with building the utils directory.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 07:52:48 +00:00
Tilghman Lesher 16c3ea3d42 Merged revisions 304950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r304950 | tilghman | 2011-01-31 00:41:36 -0600 (Mon, 31 Jan 2011) | 18 lines
  
  Change mutex tracking so that it only consumes memory in the core mutex object when it's actually being used.
  
  This reduces the overall size of a mutex which was 3016 bytes before this back
  down to 216 bytes (this is on 64-bit Linux with a glibc-implemented mutex).
  The exactness of the numbers here may vary slightly based upon how mutexes are
  implemented on a platform, but the long and short of it is that prior to this
  commit, chan_iax2 held down 98MB of memory on a 64-bit system for nothing more
  than a table of 32767 locks.  After this commit, the same table occupies a mere
  7MB of memory.
  
  (closes issue #18194)
   Reported by: job
   Patches: 
         20110124__issue18194.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
   
  Review: https://reviewboard.asterisk.org/r/1066
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 06:50:49 +00:00
Matthew Nicholson 48a9694ed0 Merged revisions 304245 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r304245 | mnicholson | 2011-01-26 14:43:27 -0600 (Wed, 26 Jan 2011) | 20 lines
  
  Merged revisions 304244 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r304244 | mnicholson | 2011-01-26 14:42:16 -0600 (Wed, 26 Jan 2011) | 13 lines
    
    Merged revisions 304241 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r304241 | mnicholson | 2011-01-26 14:38:22 -0600 (Wed, 26 Jan 2011) | 6 lines
      
      This patch modifies chan_sip to route responses to the address the request came from.  It also modifies chan_sip to respect the maddr parameter in the Via header.
      
      ABE-2664
      
      Review: https://reviewboard.asterisk.org/r/1059/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26 20:44:47 +00:00
Matthew Nicholson 26b7fb0213 Merged revisions 303907 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r303907 | mnicholson | 2011-01-25 14:56:12 -0600 (Tue, 25 Jan 2011) | 2 lines
  
  Reimplemented fax session reservation to reverse the ABI breakage introduced in r297486.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26 19:58:14 +00:00
Russell Bryant 092134399c Merged revisions 303549 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r303549 | russell | 2011-01-24 14:51:37 -0600 (Mon, 24 Jan 2011) | 45 lines
  
  Merged revisions 303548 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r303548 | russell | 2011-01-24 14:49:53 -0600 (Mon, 24 Jan 2011) | 38 lines
    
    Merged revisions 303546 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r303546 | russell | 2011-01-24 14:32:21 -0600 (Mon, 24 Jan 2011) | 31 lines
      
      Fix channel redirect out of MeetMe() and other issues with channel softhangup.
      
      Mantis issue #18585 reports that a channel redirect out of MeetMe() stopped
      working properly.  This issue includes a patch that resolves the issue by
      removing a call to ast_check_hangup() from app_meetme.c.  I left that in my
      patch, as it doesn't need to be there.  However, the rest of the patch fixes
      this problem with or without the change to app_meetme.
      
      The key difference between what happens before and after this patch is the
      effect of the END_OF_Q control frame.  After END_OF_Q is hit in ast_read(),
      ast_read() will return NULL.  With the ast_check_hangup() removed, app_meetme
      sees this which causes it to exit as intended.  Checking ast_check_hangup()
      caused app_meetme to exit earlier in the process, and the target of the
      redirect saw the condition where ast_read() returned NULL.
      
      Removing ast_check_hangup() works around the issue in app_meetme, but doesn't
      solve the issue if another application did the same thing.  There are also
      other edge cases where if an application finishes at the same time that a
      redirect happens, the target of the redirect will think that the channel hung
      up.  So, I made some changes in pbx.c to resolve it at a deeper level.  There
      are already places that unset the SOFTHANGUP_ASYNCGOTO flag in an attempt to
      abort the hangup process.  My patch extends this to remove the END_OF_Q frame
      from the channel's read queue, making the "abort hangup" more complete.  This
      same technique was used in every place where a softhangup flag was cleared.
      
      (closes issue #18585)
      Reported by: oej
      Tested by: oej, wedhorn, russell
      
      Review: https://reviewboard.asterisk.org/r/1082/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24 20:57:28 +00:00
Matthew Nicholson e706b5706e According to section 19.1.2 of RFC 3261:
For each component, the set of valid BNF expansions defines exactly
  which characters may appear unescaped.  All other characters MUST be
  escaped.

This patch modifies ast_uri_encode() to encode strings in line with this recommendation.  This patch also adds an ast_escape_quoted() function which escapes '"' and '\' characters in quoted strings in accordance with section 25.1 of RFC 3261.  The ast_uri_encode() function has also been modified to take an ast_flags struct describing the set of rules it should use when escaping characters to allow for it to escape SIP URIs in addition to HTTP URIs and other types of URIs or variations of those two URI types in the future.

The ast_uri_decode() function has also been modified to accept an ast_flags struct describing the set of rules to use when decoding to enable decoding '+' as ' ' in legacy http URLs.

The unit tests for these functions have also been updated.

ABE-2705

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24 18:59:22 +00:00
Tilghman Lesher c44845d6a3 Merged revisions 302680 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302680 | tilghman | 2011-01-19 15:23:31 -0600 (Wed, 19 Jan 2011) | 16 lines
  
  Merged revisions 302675 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r302675 | tilghman | 2011-01-19 15:22:45 -0600 (Wed, 19 Jan 2011) | 9 lines
    
    Merged revisions 302663 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r302663 | tilghman | 2011-01-19 15:20:28 -0600 (Wed, 19 Jan 2011) | 2 lines
      
      Add some API documentation
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 21:24:25 +00:00
David Vossel 7bdd60d6f0 New astobj2 flag for issuing a callback without locking the container.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 18:03:09 +00:00
Russell Bryant cc0b7e7df5 Some scheduler API cleanup and improvements.
Previously, I had added the ast_sched_thread stuff that was a generic scheduler
thread implementation.  However, if you used it, it required using different
functions for modifying scheduler contents.  This patch reworks how this is
done and just allows you to optionally start a thread on the original scheduler
context structure that has always been there.  This makes it trivial to switch
to the generic scheduler thread implementation without having to touch any of
the other code that adds or removes scheduler entries.

In passing, I made some naming tweaks to add ast_ prefixes where they were not
there before.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 17:15:54 +00:00
Tilghman Lesher b98e47d119 Merged revisions 298960 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r298960 | tilghman | 2010-12-17 17:52:04 -0600 (Fri, 17 Dec 2010) | 20 lines
  
  Merged revisions 298957 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r298957 | tilghman | 2010-12-17 17:30:55 -0600 (Fri, 17 Dec 2010) | 13 lines
    
    Merged revisions 298905 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r298905 | tilghman | 2010-12-17 15:40:56 -0600 (Fri, 17 Dec 2010) | 6 lines
      
      Let Asterisk find better backtrace information with libbfd.
      
      The menuselect option BETTER_BACKTRACES, if enabled, will use libbfd to search
      for better symbol information within both the Asterisk binary, as well as
      loaded modules, to assist when using inline backtraces to track down problems.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-18 00:08:13 +00:00
Jeff Peeler 78bd0de1a9 Add support for several platforms to obtain the real thread ID.
Already had the pthread ID which is not the same.  The most obvious enhancement
is in the "core show threads" output. As stated in the utils header, if the
platform isn't supported -1 is reported (instead of the process ID previously).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-12 03:58:33 +00:00
Tilghman Lesher 1b0df8c30f Merged revisions 298051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r298051 | tilghman | 2010-12-10 10:26:46 -0600 (Fri, 10 Dec 2010) | 18 lines
  
  Merged revisions 298050 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r298050 | tilghman | 2010-12-10 10:24:13 -0600 (Fri, 10 Dec 2010) | 11 lines
    
    Portability issue on OpenSolaris.
    
    Also detect the required structure element, because OpenSolaris defines
    SIOCGIFHWADDR, but without support for IP sockets.
    
    (closes issue #18442)
     Reported by: ranjtech
     Patches: 
           20101209__issue18442.diff.txt uploaded by tilghman (license 14)
     Tested by: ranjtech
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-10 16:28:14 +00:00
Matthew Nicholson 23d106b805 Merged revisions 297157,297486,297495 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r297157 | mnicholson | 2010-12-01 13:47:33 -0600 (Wed, 01 Dec 2010) | 2 lines
  
  Changed some NOTICE and WARNING messages to DEBUG messages.
........
  r297486 | mnicholson | 2010-12-02 15:30:47 -0600 (Thu, 02 Dec 2010) | 6 lines
  
  Add support for reserving a fax session before answering the channel.
  
  Note: this change breaks ABI compatibility.
  
  FAX-217
........
  r297495 | mnicholson | 2010-12-03 09:21:52 -0600 (Fri, 03 Dec 2010) | 4 lines
  
  Print a DEBUG message instead of a WARNING message when the selected fax tech does not support reserving sessions.
  
  Answer the channel before quering it for t.38 support.  This is necessary for the query to work properly over local channels.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@297496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-03 15:32:22 +00:00
Tilghman Lesher 6a5d6cf860 Merged revisions 296992 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r296992 | tilghman | 2010-12-01 11:01:56 -0600 (Wed, 01 Dec 2010) | 19 lines
  
  Merged revisions 296991 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r296991 | tilghman | 2010-12-01 11:01:00 -0600 (Wed, 01 Dec 2010) | 12 lines
    
    Merged revisions 296990 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r296990 | tilghman | 2010-12-01 10:59:26 -0600 (Wed, 01 Dec 2010) | 5 lines
      
      Clarify documentation on how we store codec preference lists.
      
      (closes issue #18397)
       Reported by: birgita
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-01 17:03:05 +00:00
Tilghman Lesher e2ee76a319 Add a comment on why the reserved bit is reserved.
Came up when reviewing discussion on the CODEC PREFS IE in IAX2.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-30 22:32:20 +00:00
Stefan Schmidt 1482ba3057 move devices from hints into an ao2_container
by splitting up devices from hints into an own ao2_container the callback to
get these devices for statechange handling is faster.
with this changes the length of a device used in a hint isnt longer restricted
to 80 characters.

Tests showed that calling handle_statechange is 40 times faster if no hints
are used and 25 times faster if there are any hints.

(closes issue #17928)
Reported by: mdu113
Tested by: schmidts

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-30 09:49:25 +00:00
Tilghman Lesher 22cca55597 Merged revisions 296534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r296534 | tilghman | 2010-11-29 01:28:44 -0600 (Mon, 29 Nov 2010) | 20 lines
  
  Merged revisions 296533 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r296533 | tilghman | 2010-11-29 01:27:09 -0600 (Mon, 29 Nov 2010) | 13 lines
    
    I love standards.  There are so many to choose from.  Except when there isn't one.
    
    Linux and *BSD disagree on the elements within the ucred structure.  Detect
    which one is in use on the system.
    
    (closes issue #18384)
     Reported by: bjm
     Patches: 
           cred-diffs uploaded by bjm (license 473)
           20101127__issue18384__1.6.2.diff.txt uploaded by tilghman (license 14)
           20101127__issue18384__1.8.diff.txt uploaded by tilghman (license 14)
     Tested by: tilghman, bjm
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-29 07:30:09 +00:00
Tilghman Lesher 9b005d5e25 Merged revisions 296429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r296429 | tilghman | 2010-11-27 03:58:57 -0600 (Sat, 27 Nov 2010) | 5 lines
  
  Also don't build DEBUG_FD_LEAKS when STANDALONE2 is defined.
  
  (closes issue #18385)
   Reported by: cmaj
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-27 10:00:35 +00:00
Richard Mudgett 7c7486ad19 Merged revisions 295866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r295866 | rmudgett | 2010-11-22 13:36:10 -0600 (Mon, 22 Nov 2010) | 60 lines
  
  Merged revisions 295843 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r295843 | rmudgett | 2010-11-22 13:28:23 -0600 (Mon, 22 Nov 2010) | 53 lines
    
    Merged revisions 295790 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r295790 | rmudgett | 2010-11-22 12:46:26 -0600 (Mon, 22 Nov 2010) | 46 lines
      
      The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call.
      
      To recreate the problem:
      1) Party A calls Party B
      2) Invoke CLI "channel redirect" command to redirect channel call leg
      associated with A.
      3) All associated channels are hung up.
      
      Note that if the CLI command were done on the channel call leg associated
      with B it works.
      
      This regression was a result of the fix for issue #16946
      (https://reviewboard.asterisk.org/r/740/).
      
      The regression affects all features that use an async goto to execute the
      dialplan because of an external event: Channel redirect, AMI redirect, SIP
      REFER, and FAX detection.
      
      The struct ast_channel._softhangup code is a mess.  The variable is used
      for several purposes that do not necessarily result in the call being hung
      up.  I have added doxygen comments to describe how the various _softhangup
      bits are used.  I have corrected all the places where the variable was
      tested in a non-bit oriented manner.
      
      The primary fix is the new AST_CONTROL_END_OF_Q frame.  It acts as a weak
      hangup request so the soft hangup requests that do not normally result in
      a hangup do not hangup.
      
      JIRA SWP-2470
      JIRA SWP-2489
      
      (closes issue #18171)
      Reported by: SantaFox
      (closes issue #18185)
      Reported by: kwemheuer
      (closes issue #18211)
      Reported by: zahir_koradia
      (closes issue #18230)
      Reported by: vmarrone
      (closes issue #18299)
      Reported by: mbrevda
      (closes issue #18322)
      Reported by: nerbos
      
      Review:	https://reviewboard.asterisk.org/r/1013/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-22 19:42:02 +00:00
Russell Bryant 9fbbdfb223 Merged revisions 295711 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r295711 | russell | 2010-11-19 18:50:00 -0600 (Fri, 19 Nov 2010) | 36 lines
  
  Merged revisions 295710 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r295710 | russell | 2010-11-19 18:45:51 -0600 (Fri, 19 Nov 2010) | 29 lines
    
    Fix cache of device state changes for multiple servers.
    
    This patch addresses a regression where device states across multiple servers
    were not being processing completely correctly.  The code works to determine
    the overall state by looking at the last known state of a device on each
    server.  However, there was a regression due to some invasive rewrites of how
    the cache works that led to the cache only storing the last device state change
    for a device, regardless of which server it was on.
    
    The code is set up to cache device state change events by ensuring that each
    event in the cache has a unique device name + entity ID (server ID).  The code
    that was responsible for comparing raw information elements (which EID is)
    always returned a match due to a memcmp() with a length of 0.
    
    There isn't much code to fix the actual bug.  This patch also introduces a new
    CLI command that was very useful for debugging this problem.  The command
    allows you to dump the contents of the event cache.
    
    (closes issue #18284)
    Reported by: klaus3000
    Patches:
          issue18284.rev1.txt uploaded by russell (license 2)
    Tested by: russell, klaus3000
    
    (closes issue #18280)
    Reported by: klaus3000
    
    Review: https://reviewboard.asterisk.org/r/1012/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-20 00:52:47 +00:00
Paul Belanger 767af0dbc4 Merged revisions 295441 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r295441 | pabelanger | 2010-11-18 13:02:12 -0500 (Thu, 18 Nov 2010) | 11 lines
  
  Merged revisions 295440 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r295440 | pabelanger | 2010-11-18 12:51:34 -0500 (Thu, 18 Nov 2010) | 4 lines
    
    Fix compiler warnings when using openssl-dev 1.0.0+
    
    Review: https://reviewboard.asterisk.org/r/1016/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-18 18:08:43 +00:00
Tilghman Lesher 105a5c146e Merged revisions 294430 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r294430 | tilghman | 2010-11-09 14:33:05 -0600 (Tue, 09 Nov 2010) | 15 lines
  
  Merged revisions 294429 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r294429 | tilghman | 2010-11-09 14:27:23 -0600 (Tue, 09 Nov 2010) | 8 lines
    
    Detect GMime properly on systems where gmime flags and libs are configured with pkg-config.
    
    (closes issue #16155)
     Reported by: jcollie
     Patches: 
           20100917__issue16155.diff.txt uploaded by tilghman (license 14)
     Tested by: tilghman
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-09 20:35:05 +00:00
Richard Mudgett 3adb425b25 Merged revisions 294349 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r294349 | rmudgett | 2010-11-09 10:55:32 -0600 (Tue, 09 Nov 2010) | 17 lines
  
  Analog lines do not transfer CONNECTED LINE or execute the interception macros.
  
  Add connected line update for sig_analog transfers and simplify the
  corresponding sig_pri and chan_misdn transfer code.
  
  Note that if you create a three-way call in sig_analog before transferring
  the call, the distinction of the caller/callee interception macros make
  little sense.  The interception macro writer needs to be prepared for
  either caller/callee macro to be executed.  The current implementation
  swaps which caller/callee interception macro is executed after a three-way
  call is created.
  
  Review:	https://reviewboard.asterisk.org/r/996/
  
  JIRA ABE-2589
  JIRA SWP-2372
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-09 17:00:07 +00:00
Jeff Peeler 12a40275f2 Merged revisions 294278 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r294278 | jpeeler | 2010-11-08 15:59:45 -0600 (Mon, 08 Nov 2010) | 23 lines
  
  Merged revisions 294277 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r294277 | jpeeler | 2010-11-08 15:58:13 -0600 (Mon, 08 Nov 2010) | 16 lines
    
    Fix playback failure when using IAX with the timerfd module.
    
    To fix this issue the alert pipe will now be used when the timerfd module is
    in use. There appeared to be a race that was not solved by adding locking in the
    timerfd module, but needed to be there anyway. The race was between the timer
    being put in non-continuous mode in ast_read on the channel thread and the IAX 
    frame scheduler queuing a frame which would enable continuous mode before the
    non-continuous mode event was read. This race for now is simply avoided.
    
    (closes issue #18110)
    Reported by: tpanton
    Tested by: tpanton
    
    I put tested by tpanton because it was tested on his hardware. Thanks for the
    remote access to debug this issue!
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-08 22:03:54 +00:00
Terry Wilson abc94089cd Merged revisions 293803 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r293803 | twilson | 2010-11-03 11:05:14 -0700 (Wed, 03 Nov 2010) | 25 lines
  
  Avoid valgrind warnings for ast_rtp_instance_get_xxx_address
  
  The documentation for ast_rtp_instance_get_(local/remote)_address stated that
  they returned 0 for success and -1 on failure. Instead, they returned 0 if the
  address structure passed in was already equivalent to the address instance
  local/remote address or 1 otherwise. 90% of the calls to these functions
  completely ignored the return address and passed in an uninitialized struct,
  which would make valgrind complain even though the operation was technically
  safe.
  
  This patch fixes the documentation and converts the get_xxx_address functions
  to void since all they really do is copy the address and cannot fail.
  Additionally two new functions
  (ast_rtp_instance_get_and_cmp_(local/remote)_address) are created for the 3
  times where the return value was actually checked. The
  get_and_cmp_local_address function is currently unused, but exists for the sake
  of symmetry.
  
  The only functional change as a result of this change is that we will not do an
  ast_sockaddr_cmp() on (mostly uninitialized) addresses before doing the
  ast_sockaddr_copy() in the get_*_address functions. So, even though it is an
  API change, it shouldn't have a noticeable change in behavior.
  
  Review: https://reviewboard.asterisk.org/r/995/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-03 18:43:18 +00:00
Richard Mudgett b6c5dde767 Merged revisions 293046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r293046 | rmudgett | 2010-10-26 10:53:58 -0500 (Tue, 26 Oct 2010) | 4 lines
  
  Allow the DAHDI driver to compile, even with a sufficiently older version of libpri.
  
  Fixes our Bamboo builds.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-26 16:01:08 +00:00
Tilghman Lesher 7bc278bd06 Merged revisions 292906 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292906 | tilghman | 2010-10-25 14:28:35 -0500 (Mon, 25 Oct 2010) | 4 lines
  
  Allow the DAHDI driver to compile, even with a sufficiently older version of libpri.
  
  Fixes our Bamboo builds.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-25 19:30:39 +00:00
Paul Belanger b1cc567e3f Merged revisions 291758 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r291758 | pabelanger | 2010-10-14 11:15:12 -0400 (Thu, 14 Oct 2010) | 11 lines
  
  Add the ability for ast_find_ourip to return IPv4, IPv6 or both.
  
  While testing chan_gtalk I noticed jabber was using my IPv6 address
  and not IPv4. When using bindaddr=0.0.0.0 it is possible for ast_find_ourip()
  to return both IPv6 and IPv4 results.  Adding a family parameter gives you
  the ablility to choose.
  
  Since jabber/gtalk/h323 do not support IPv6, we should only return IPv4 results.
  
  Review: https://reviewboard.asterisk.org/r/973/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-14 15:21:42 +00:00
David Vossel 0736871cc6 Merged revisions 291192 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r291192 | dvossel | 2010-10-11 16:38:39 -0500 (Mon, 11 Oct 2010) | 19 lines
  
  Gtalk enhancements and general code cleanup.
  
  This patch includes several chan_gtalk enhancements.
  Two new gtalk.conf options have been added, externip
  and stunadd.  Setting externip allows us to
  manually specify what the external IP address is
  outside of a NAT environment.  Setting the stunaddr
  option to a valid stun server allows for that external
  ip to be retrieved via a STUN server automatically.  This
  external IP is then advertised during call setup as
  a possible candidate.
  
  I have also attempted to clean up chan_gtalk's code
  so it meets our coding guidelines. During this cleanup
  I noticed several things that need to be done in the
  code and made a TODO section at the top of the file.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-11 21:39:37 +00:00
Jason Parker e9344fb853 Merged revisions 290752 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r290752 | qwell | 2010-10-07 15:58:47 -0500 (Thu, 07 Oct 2010) | 23 lines
  
  Merged revisions 290751 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r290751 | qwell | 2010-10-07 15:57:14 -0500 (Thu, 07 Oct 2010) | 16 lines
    
    Merged revisions 290750 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r290750 | qwell | 2010-10-07 15:56:04 -0500 (Thu, 07 Oct 2010) | 9 lines
      
      Allow PRI to build properly when using --with-pri.
      
      Use the directories found for the parent when using lib dependencies.
      
      (closes issue #17314)
      Reported by: tzafrir
      Patches: 
            17314-withdeps.diff uploaded by qwell (license 4)
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-07 20:59:37 +00:00
David Vossel 268ae2e8d5 Merged revisions 290479 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r290479 | dvossel | 2010-10-05 17:00:43 -0500 (Tue, 05 Oct 2010) | 6 lines
  
  Fixes chan_gtalk to work with gmail client
  
  This patch was written by Philippe Sultan (phsultan). Thanks
  for keeping this up to date!
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-05 22:01:52 +00:00
Jeff Peeler c44527e185 Merged revisions 289840 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r289840 | jpeeler | 2010-10-01 21:43:45 -0500 (Fri, 01 Oct 2010) | 29 lines
  
  Merged revisions 289798 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r289798 | jpeeler | 2010-10-01 18:01:31 -0500 (Fri, 01 Oct 2010) | 22 lines
    
    Merged revisions 289797 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r289797 | jpeeler | 2010-10-01 17:58:38 -0500 (Fri, 01 Oct 2010) | 15 lines
      
      Change RFC2833 DTMF event duration on end to report actual elapsed time.
      
      The scenario here is with a non P2P early media session. The reported time
      length of DTMF presses are coming up short when sending to the remote side.
      Currently the event duration is a running total that is incremented when sending
      continuation packets. These continuation packets are only triggered upon
      incoming media from the remote side, which means that the running total probably
      is not going to end up matching the actual length of time Asterisk received
      DTMF. This patch changes the end event duration to be lengthened if it is
      detected that the end event is going to come up short.
      
      Review: https://reviewboard.asterisk.org/r/957/
      
      ABE-2476
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-02 02:46:43 +00:00
Tilghman Lesher 6d0e383321 Merged revisions 289543,289581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r289543 | tilghman | 2010-09-30 12:50:52 -0500 (Thu, 30 Sep 2010) | 2 lines
  
  More Solaris compatibility fixes
........
  r289581 | tilghman | 2010-09-30 15:23:10 -0500 (Thu, 30 Sep 2010) | 2 lines
  
  Solaris fixes.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-30 20:40:08 +00:00
Tilghman Lesher 7157b48150 Merged revisions 289104 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r289104 | tilghman | 2010-09-28 13:18:43 -0500 (Tue, 28 Sep 2010) | 4 lines
  
  Solaris compatibility fixes
  
  Review: https://reviewboard.asterisk.org/r/942/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-28 18:20:20 +00:00
Tilghman Lesher f8180257e0 Merged revisions 288638 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r288638 | tilghman | 2010-09-23 22:39:29 -0500 (Thu, 23 Sep 2010) | 16 lines
  
  Merged revisions 288637 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r288637 | tilghman | 2010-09-23 22:36:01 -0500 (Thu, 23 Sep 2010) | 9 lines
    
    Merged revisions 288636 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r288636 | tilghman | 2010-09-23 22:20:24 -0500 (Thu, 23 Sep 2010) | 2 lines
      
      Solaris compatibility fixes
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-24 03:41:02 +00:00
David Vossel 2f3dee2379 Merged revisions 287647 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r287647 | dvossel | 2010-09-20 17:09:16 -0500 (Mon, 20 Sep 2010) | 21 lines
  
  Addition of the FrameHook API (AKA AwesomeHooks)
  
  So far all our tools for viewing and manipulating media streams
  within Asterisk have been entirely focused on audio.  That made
  sense then, but is not scalable now.  The FrameHook API lets us
  tap into and manipulate _ANY_ type of media or signaling passed
  on a channel present today or in the future.  This tool is a step
  in the direction of expanding Asterisk's boundaries and will help
  generate some rather interesting applications in the future.
  
  In addition to the FrameHook API, a simple dialplan function
  exercising the api has been included as well.  This function
  is called FRAME_TRACE().  FRAME_TRACE() allows for the internal
  ast_frames read and written to a channel to be output.  Filters
  can be placed on this function to debug only certain types of frames.
  This function could be thought of as an internal way of doing
  ast_frame packet captures.
  
  Review: https://reviewboard.asterisk.org/r/925/
........



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@287648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-20 22:16:37 +00:00
Jeff Peeler 41b95ee887 Merged revisions 286931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r286931 | jpeeler | 2010-09-15 14:22:15 -0500 (Wed, 15 Sep 2010) | 16 lines
  
  Add parking extension for non-default parking lots.
  
  This is a new feature that allows for parking to custom parking lots to be
  accessed directly, rather than with channel variables or by changing the
  default parking lot. The extension is set with the parkext option just as the
  default parking lot is done. Also, the manager action has been updated to
  optionally allow a specified parking lot.
  
  (closes issue #14882)
  Reported by: vmikhnevych
  Patches: 
        patch_14882.txt uploaded by mnick (license 874)
        modified by me
  
  Review: https://reviewboard.asterisk.org/r/884/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-15 19:23:56 +00:00
Terry Wilson d04046fbe7 Merged revisions 286189 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r286189 | twilson | 2010-09-10 17:04:53 -0500 (Fri, 10 Sep 2010) | 30 lines
  
  Merged revisions 286115 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r286115 | twilson | 2010-09-10 15:35:25 -0500 (Fri, 10 Sep 2010) | 23 lines
    
    Merged revisions 286059 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r286059 | twilson | 2010-09-10 14:25:08 -0500 (Fri, 10 Sep 2010) | 16 lines
      
      Inherit CHANNEL() writes to both sides of a Local channel
      
      Having Local (/n) channels as queue members and setting the language in the
      extension with Set(CHANNEL(language)=fr) sets the language on the Local/...,2
      channel. Hold time report playbacks happen on the Local/...,1 channel and
      therefor do not play in the specified language.
      
      This patch modifies func_channel_write to call the setoption callback and pass
      the CHANNEL() write info to the callback. chan_local uses this information to
      look up the other side of the channel and apply the same changes to it.
      
      (closes issue #17673)
      Reported by: Guggemand
      
      Review: https://reviewboard.asterisk.org/r/903/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-10 22:15:47 +00:00
Tilghman Lesher 57efeb40a6 Merged revisions 285962 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r285962 | tilghman | 2010-09-10 00:32:18 -0500 (Fri, 10 Sep 2010) | 13 lines
  
  Merged revisions 285961 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r285961 | tilghman | 2010-09-10 00:31:31 -0500 (Fri, 10 Sep 2010) | 6 lines
    
    Another fix for Mac OS X.
    
    While trying to fix this the "right" way, I wandered into dependency hell.  Two
    hours later, I backed out, and just removed the offending code.  ast_inline_api
    only goes one level deep and then it breaks.  Ouch.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-10 05:33:04 +00:00
Tilghman Lesher 336d2a1abd Merged revisions 285931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r285931 | tilghman | 2010-09-09 20:25:50 -0500 (Thu, 09 Sep 2010) | 21 lines
  
  Merged revisions 285930 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r285930 | tilghman | 2010-09-09 20:16:32 -0500 (Thu, 09 Sep 2010) | 14 lines
    
    Merged revisions 285889 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r285889 | tilghman | 2010-09-09 19:13:45 -0500 (Thu, 09 Sep 2010) | 7 lines
      
      Fix Mac OS X build.
      
      This also fixes a rather grievous calculation error for the offset of
      ast_fdset, which was masked on Linux and FreeBSD, because these platforms
      check the first 256 FDs regardless of the bitmask setting (due to backwards
      compatibility).
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-10 01:27:44 +00:00
Jason Parker ef247c398f Merged revisions 285530 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r285530 | qwell | 2010-09-08 15:43:10 -0500 (Wed, 08 Sep 2010) | 9 lines
  
  Merged revisions 285529 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r285529 | qwell | 2010-09-08 15:42:44 -0500 (Wed, 08 Sep 2010) | 1 line
    
    Follow coding guidelines in moh rescan fix.  Also fix the documentation that got me in trouble.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-08 20:43:38 +00:00
Tilghman Lesher 875561fc2f Merged revisions 285336 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r285336 | tilghman | 2010-09-07 14:38:12 -0500 (Tue, 07 Sep 2010) | 2 lines
  
  Fix build on FreeBSD 8.0, take 2.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-07 19:38:55 +00:00
Russell Bryant 7f2a98a087 Merged revisions 285161-285162 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r285161 | russell | 2010-09-06 15:10:03 -0500 (Mon, 06 Sep 2010) | 4 lines
  
  Fix libsrtp -fPIC check for when non-standard prefix is used.
  
  Thanks to loompek in #asterisk for reporting the issue and testing this patch.
........
  r285162 | russell | 2010-09-06 15:10:24 -0500 (Mon, 06 Sep 2010) | 1 line
  
  regenerate configure script.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-06 20:10:58 +00:00
Russell Bryant d8a49683ea Merged revisions 285057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r285057 | russell | 2010-09-04 13:08:19 -0500 (Sat, 04 Sep 2010) | 2 lines
  
  Add a C++ compatible version of AST_CLI_DEFINE().
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-04 18:10:46 +00:00
Jan Kalab a7505c0b91 Support for calendar events priorities and categories (with ISO C90 fix)
See RFC 5545 ch. 3.8.1.2 and 9.

(closes issue #17837)
Review: https://reviewboard.asterisk.org/r/880/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-03 12:58:52 +00:00
Tilghman Lesher 8190e96fad Merged revisions 284610 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r284610 | tilghman | 2010-09-02 00:20:59 -0500 (Thu, 02 Sep 2010) | 10 lines
  
  When optional_api is non-optional, force dependent modules to be loaded.
  
  (closes issue #17707)
   Reported by: ira
   Patches: 
         20100819__issue17707__asterisk1.8.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
   
  Review: https://reviewboard.asterisk.org/r/876/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02 05:27:53 +00:00
Tilghman Lesher 5eae9f44f7 Merged revisions 284597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r284597 | tilghman | 2010-09-02 00:00:34 -0500 (Thu, 02 Sep 2010) | 29 lines
  
  Merged revisions 284593,284595 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r284593 | tilghman | 2010-09-01 17:59:50 -0500 (Wed, 01 Sep 2010) | 18 lines
    
    Merged revisions 284478 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r284478 | tilghman | 2010-09-01 13:49:11 -0500 (Wed, 01 Sep 2010) | 11 lines
      
      Ensure that all areas that previously used select(2) now use poll(2), with implementations that need poll(2) implemented with select(2) safe against 1024-bit overflows.
      
      This is a followup to the fix for the pthread timer in 1.6.2 and beyond, fixing
      a potential crash bug in all supported releases.
      
      (closes issue #17678)
       Reported by: russell
      Branch: https://origsvn.digium.com/svn/asterisk/team/tilghman/ast_select 
      
      Review: https://reviewboard.asterisk.org/r/824/
    ........
  ................
    r284595 | tilghman | 2010-09-01 22:57:43 -0500 (Wed, 01 Sep 2010) | 2 lines
    
    Failed to rerun bootstrap.sh after last commit
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02 05:02:54 +00:00
Terry Wilson 920f5ea8b7 Merged revisions 284477 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r284477 | twilson | 2010-09-01 13:44:36 -0500 (Wed, 01 Sep 2010) | 17 lines
  
  Fix SRTP for changing SSRC and multiple a=crypto SDP lines
  
  Adding code to Asterisk that changed the SSRC during bridges and masquerades
  broke SRTP functionality. Also broken was handling the situation where an
  incoming INVITE had more than one crypto offer. This patch caches the SRTP
  policies the we use so that we can change the ssrc and inform libsrtp of the
  new streams. It also uses the first acceptable a=crypto line from the incoming
  INVITE.
  
  (closes issue #17563)
  Reported by: Alexcr
  Patches: 
        srtp.diff uploaded by twilson (license 396)
  Tested by: twilson
  
  Review: https://reviewboard.asterisk.org/r/878/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-01 18:52:27 +00:00
Olle Johansson 881ac511e6 Doxygen formatting
You can't write "same as above" in hypertext documentation. Above doesn't make sense in
hyperspace.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-30 08:25:50 +00:00
Russell Bryant 019fbd57cf Merged revisions 283230 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r283230 | russell | 2010-08-23 08:23:12 -0500 (Mon, 23 Aug 2010) | 7 lines
  
  Make the AST_CEL_AMA enum match up with the AST_CDR_ ama flag values.
  
  Really, having 2 enums for this is silly and error prone, demonstrated by
  the crash that I hit because there was an assumption in the code that the
  values in each matched up.  However, this is a quick fix to get them to
  match up so it will work.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-23 13:23:37 +00:00
Russell Bryant 4723a780ca Add a todo item for CEL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-19 12:13:41 +00:00
David Vossel 5729763b89 Merged revisions 282543 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r282543 | dvossel | 2010-08-17 14:34:06 -0500 (Tue, 17 Aug 2010) | 4 lines
  
  fixes truncated uint64_t value in put_unaligned_uint64_t() function
  
  (issue #17804)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-17 19:34:52 +00:00
Tilghman Lesher 557ad25f07 Merged revisions 282366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r282366 | tilghman | 2010-08-13 23:53:58 -0500 (Fri, 13 Aug 2010) | 4 lines
  
  Fix our FRACKing issue with chan_iax2 a different way.
  
  Review: https://reviewboard.asterisk.org/r/861/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-14 04:58:34 +00:00
David Vossel 0f8eaa6299 Merged revisions 282269 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r282269 | dvossel | 2010-08-13 15:03:56 -0500 (Fri, 13 Aug 2010) | 4 lines
  
  res_stun_monitor for monitoring network changes behind a NAT device
  
  Review: https://reviewboard.asterisk.org/r/854
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-13 20:05:44 +00:00
Richard Mudgett 8bc5bf82df Merged revisions 282098 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r282098 | rmudgett | 2010-08-12 17:06:06 -0500 (Thu, 12 Aug 2010) | 7 lines
  
  Separate call completion config parameter allocation and default initialization.
  
  If you ever have a need to reset the call completion config parameters
  to defaults, now you can.
  
  And no Virginia, C++ idioms do not always work in C.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-12 22:10:49 +00:00
David Vossel bbb32fe33e Merged revisions 282047 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r282047 | dvossel | 2010-08-12 15:15:41 -0500 (Thu, 12 Aug 2010) | 35 lines
  
  improved translation paths for wideband codecs
  
  The problem I'm addressing is that Asterisk's current
  method of building the least cost translation paths
  between codecs does not take into account sample rate.
  For instance, it was possible for siren14 (a 32khz codec),
  to contain the a translation path to siren7 (a 16khz
  audio codec) that goes through slin at 8khz.  In this
  case Asterisk takes a 32khz codec, down samples it to
  8khz and then up samples it to 16khz which is terrible
  regardless if it is computationally less expensive.  This
  patch now builds translation paths that give priority to
  maintaining the best possible sample rate before taking
  into consideration computational cost.  This patch also
  adds cli commands to expose what translation paths are
  actually being used.
  
  Changes:
  1. Translation paths will never contain a step that changes
  the sample rate unless absolutely necessary.
  2. When choosing the best codec to make two channels compatible.
  Shared codecs with the highest sample rate are given priority.
  3. A new cli command to show all translation paths available
  for a specific codec 'core show translation paths [codec name]'
  has been added.
  4. 'core show translation' which displays the translation
  matrix now includes the new higher bit audio codecs in the table.
  5. 'core show channel [channel name]'  now displays the
  translation paths if translation is used.
  
  (closes issue #16841)
  Reported by: dvossel
  
  Review: https://reviewboard.asterisk.org/r/842/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-12 20:17:17 +00:00
a491cac965 Merged revisions 281687 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r281687 | simon.perreault | 2010-08-11 09:30:59 -0400 (Wed, 11 Aug 2010) | 9 lines
  
  Fix parsing of IPv6 address literals in outboundproxy
  
  (closes issue #17757)
  Reported by: oej
  Patches:
        17757.diff uploaded by sperreault (license 252)
        sip.conf.diff uploaded by sperreault (license 252)
  Tested by: oej
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@281688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-11 13:31:39 +00:00
Tilghman Lesher af43e57821 Merged revisions 280984 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r280984 | tilghman | 2010-08-05 02:46:36 -0500 (Thu, 05 Aug 2010) | 22 lines
  
  Merged revisions 280983 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r280983 | tilghman | 2010-08-05 02:40:47 -0500 (Thu, 05 Aug 2010) | 15 lines
    
    Merged revisions 280982 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r280982 | tilghman | 2010-08-05 02:28:33 -0500 (Thu, 05 Aug 2010) | 8 lines
      
      Change context lock back to a mutex, because functionality depends upon the lock being recursive.
      
      (closes issue #17643)
       Reported by: zerohalo
       Patches: 
             20100726__issue17643.diff.txt uploaded by tilghman (license 14)
       Tested by: zerohalo
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@280985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-05 07:47:30 +00:00
David Vossel 395a35900a Merged revisions 279949 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r279949 | dvossel | 2010-07-27 15:57:00 -0500 (Tue, 27 Jul 2010) | 31 lines
  
  Merged revisions 279946 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r279946 | dvossel | 2010-07-27 15:54:32 -0500 (Tue, 27 Jul 2010) | 24 lines
    
    Merged revisions 279945 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r279945 | dvossel | 2010-07-27 15:33:40 -0500 (Tue, 27 Jul 2010) | 19 lines
      
      remove empty audiohook write list on channel
      
      If a channel has an audiohook write list created on it, that
      list stays on the channel until the channel is destroyed.  There
      is no reason to keep that list on the channel if it becomes empty.
      If it is empty that just means we are doing needless translating
      for every ast_read and ast_write.  This patch removes the audiohook
      list from the channel once it is detected to be empty on either a
      read or write.  If a audiohook is added back to the channel after
      this list is destroyed, the list just gets recreated as if it never
      existed to begin with.
      
      (closes issue #17630)
      Reported by: manvirr
      
      Review: https://reviewboard.asterisk.org/r/799/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-27 20:59:16 +00:00
Jason Parker 189839c307 Merged revisions 279658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r279658 | qwell | 2010-07-26 18:03:38 -0500 (Mon, 26 Jul 2010) | 12 lines
  
  Merged revisions 279657 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r279657 | qwell | 2010-07-26 17:59:52 -0500 (Mon, 26 Jul 2010) | 5 lines
    
    Really fix sounds Makefile (and make it readableish).
    
    There was a rather large syntax error that should have caused ALL versions of GNU make to fail.
    I don't know how it worked.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-26 23:06:47 +00:00
Tilghman Lesher c3a1e55de2 Merged revisions 279562 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r279562 | tilghman | 2010-07-26 14:18:26 -0500 (Mon, 26 Jul 2010) | 9 lines
  
  Merged revisions 279561 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r279561 | tilghman | 2010-07-26 14:15:59 -0500 (Mon, 26 Jul 2010) | 2 lines
    
    Use a special Makefile for noobs who still have GNU Make 3.80.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-26 19:20:23 +00:00
Mark Michelson dd9428666d Merged revisions 279504 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r279504 | mmichelson | 2010-07-26 11:04:09 -0500 (Mon, 26 Jul 2010) | 14 lines
  
  Allow for systems without locale support to be usable.
  
  A recent change to SIP URI comparison code added a locale-specific
  string comparison to the mix, and certain systems do not support
  such functions. This fix allows for those systems to still use
  Asterisk 1.8
  
  (closes issue #17697)
  Reported by: pprindeville
  Patches: 
        asterisk-trunk-bugid17697.patch uploaded by pprindeville (license 347)
  Tested by: mmichelson
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-26 16:44:25 +00:00
Paul Belanger 222b96c2e2 Merged revisions 279280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r279280 | pabelanger | 2010-07-24 14:18:43 -0400 (Sat, 24 Jul 2010) | 8 lines
  
  Check if ast_sockaddr is NULL then return. 
  
  (closes issue #17677)
  Reported by: outcast
  Patches:
        issue0017677.patch uploaded by pabelanger (license 224)
  Tested by: elguero
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-24 18:20:18 +00:00
Tilghman Lesher 3ab0041118 Merge the realtime failover branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 16:19:21 +00:00
Mark Michelson 57a92a6a7c Allow IPv6 addresses for UDPTL streams.
Review: https://reviewboard.asterisk.org/r/795



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 15:16:33 +00:00
Tilghman Lesher 1b2893cab4 Add the full current set of CDR drivers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-22 05:29:29 +00:00
Terry Wilson d6e1c724e5 Remove built-in AES code and use optional_api instead
Review: https://reviewboard.asterisk.org/r/793/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-21 19:11:32 +00:00
Tilghman Lesher ef95349d1c Merged revisions 278167 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r278167 | tilghman | 2010-07-20 15:59:06 -0500 (Tue, 20 Jul 2010) | 4 lines
  
  Do not queue up DTMF frames while a call is on hold.
  
  (Fixes ABE-2110)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 22:26:23 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
Mark Michelson 6fa79e8f77 Make ACLs IPv6-capable.
ACLs can now be configured to match IPv6 networks. This is only
relevant for ACLs in chan_sip for now since other channel drivers
do not support IPv6 addressing. However, once those channel drivers
are outfitted to support IPv6 addressing, the ACLs will already be
ready for IPv6 support.

https://reviewboard.asterisk.org/r/791



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19 14:17:16 +00:00
Tilghman Lesher 76d4bbacd1 Merged revisions 277738 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r277738 | tilghman | 2010-07-17 11:59:11 -0500 (Sat, 17 Jul 2010) | 5 lines
  
  Remove uclibc cross-compile triplet, as uclibc has a working fork()... it's only uclinux that does not.
  
  (closes issue #17616)
   Reported by: pprindeville
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-17 17:42:32 +00:00
Tilghman Lesher a7c92fad28 Merged revisions 277568 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r277568 | tilghman | 2010-07-16 16:54:29 -0500 (Fri, 16 Jul 2010) | 8 lines
  
  Since we split values at the semicolon, we should store values with a semicolon as an encoded value.
  
  (closes issue #17369)
   Reported by: gkservice
   Patches: 
         20100625__issue17369.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-17 17:39:28 +00:00
Russell Bryant e5c4c90064 Allow xmllint to be used for XML docs validation.
xmllint seems to be more commonly available since it comes with libxml2.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-17 13:10:47 +00:00
Tilghman Lesher fe9e0e672e Finally, a method that really fixes the assertions in chan_iax2.c related to cancelling lagid.
No, replacing usleep(1) with sched_yield() did not have an effect.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 20:35:28 +00:00
Tilghman Lesher 753fa3b278 Define LLONG_MAX on systems that do not have it.
(closes issue #17644)
 Reported by: pprindeville


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-15 19:46:57 +00:00
Tilghman Lesher 832d1296c6 Remove the old stub files, preferring the optional_api method.
(closes issue #17475)
 Reported by: tilghman
 
Review: https://reviewboard.asterisk.org/r/695/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 20:48:59 +00:00
Richard Mudgett cf7bbcc4c6 Expand the caller ANI field to an ast_party_id
Expand the ani field in ast_party_caller and ast_party_connected_line to
an ast_party_id.

This is an extension to the ast_callerid restructuring patch in review:
https://reviewboard.asterisk.org/r/702/

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 16:58:03 +00:00
Richard Mudgett ec37ffbdaf ast_callerid restructuring
The purpose of this patch is to eliminate struct ast_callerid since it has
turned into a miscellaneous collection of various party information.

Eliminate struct ast_callerid and replace it with the following struct
organization:

struct ast_party_name {
	char *str;
	int char_set;
	int presentation;
	unsigned char valid;
};
struct ast_party_number {
	char *str;
	int plan;
	int presentation;
	unsigned char valid;
};
struct ast_party_subaddress {
	char *str;
	int type;
	unsigned char odd_even_indicator;
	unsigned char valid;
};
struct ast_party_id {
	struct ast_party_name name;
	struct ast_party_number number;
	struct ast_party_subaddress subaddress;
	char *tag;
};
struct ast_party_dialed {
	struct {
		char *str;
		int plan;
	} number;
	struct ast_party_subaddress subaddress;
	int transit_network_select;
};
struct ast_party_caller {
	struct ast_party_id id;
	char *ani;
	int ani2;
};

The new organization adds some new information as well.

* The party name and number now have their own presentation value that can
be manipulated independently.  ISDN supplies the presentation value for
the name and number at different times with the possibility that they
could be different.

* The party name and number now have a valid flag.  Before this change the
name or number string could be empty if the presentation were restricted.
Most channel drivers assume that the name or number is then simply not
available instead of indicating that the name or number was restricted.

* The party name now has a character set value.  SIP and Q.SIG have the
ability to indicate what character set a name string is using so it could
be presented properly.

* The dialed party now has a numbering plan value that could be useful to
have available.

The various channel drivers will need to be updated to support the new
core features as needed.  They have simply been converted to supply
current functionality at this time.


The following items of note were either corrected or enhanced:

* The CONNECTEDLINE() and REDIRECTING() dialplan functions were
consolidated into func_callerid.c to share party id handling code.

* CALLERPRES() is now deprecated because the name and number have their
own presentation values.

* Fixed app_alarmreceiver.c write_metadata().  The workstring[] could
contain garbage.  It also can only contain the caller id number so using
ast_callerid_parse() on it is silly.  There was also a typo in the
CALLERNAME if test.

* Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id
number string.  ast_callerid_parse() alters the given buffer which in this
case is the channel's caller id number string.  Then using
ast_shrink_phone_number() could alter it even more.

* Fixed caller ID name and number memory leak in chan_usbradio.c.

* Fixed uninitialized char arrays cid_num[] and cid_name[] in
sig_analog.c.

* Protected access to a caller channel with lock in chan_sip.c.

* Clarified intent of code in app_meetme.c sla_ring_station() and
dial_trunk().  Also made save all caller ID data instead of just the name
and number strings.

* Simplified cdr.c set_one_cid().  It hand coded the ast_callerid_merge()
function.

* Corrected some weirdness with app_privacy.c's use of caller
presentation.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 15:48:36 +00:00
Tilghman Lesher da8450323f Kill some startup warnings and errors and make some messages more helpful in tracking down the source.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09 17:00:22 +00:00