Commit Graph

22145 Commits

Author SHA1 Message Date
Jonathan Rose a898eb4d07 Fixes deadlocks occuring in chan_agent due to r335976
Bad locking order was added to chan_agent to prevent segfaults from having no locking
in a patch by irroot. This patch addresses the bad locking order by releasing locks before
getting the right locking order to stop deadlocks from occuring when doing multiple
interactions with agents.

(closes issue ASTERISK-19285)
Reported by: Alex Villacis Lasso
Review: https://reviewboard.asterisk.org/r/1708/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-03 21:33:23 +00:00
Kinsey Moore 71a8457d53 Support schema selection in cdr_adaptive_odbc
Asterisk now supports using ODBC with databases where a single schema must be
selected.  Previously, INSERTs would fail because they did not take into
account extra fields cause by having multiple schemas.  This also corrects
some SQL resource leaks.

(closes issue ASTERISK-17106)
Patch-by: Alexander Frolkin
Patch-by: Tilgnman Lesher


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-03 16:50:49 +00:00
Jonathan Rose 79979313e8 Fixes a segfault occuring when performing attended transfer with FAXOPT(gateway)=yes
(closes issue ASTERISK-19184)
Reported by: Alexandr
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-03 16:23:21 +00:00
Kinsey Moore 29318afc15 Ensure entering T.38 passthrough does not cause an infinite loop
After R340970 Asterisk was still polling the RTCP file descriptor after RTCP is
shut down and removed. If the descriptor happened to have data ready when the
removal occured then Asterisk would go into an infinite loop trying to read
data that it can never actually access. This change disables the audio RTCP
file descriptor for the duration of the T.38 transaction.

(closes issue ASTERISK-18951)
Reported-by: Kristijan Vrban
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-02 22:28:36 +00:00
Richard Mudgett 63c5eaee43 Restore the 'w' modifier support for ISDN spans. Dial(DAHDI/g0/1234w888)
This feature also causes the sending complete ie to be sent for switch
types that do not automatically send the ie.  (EuroISDN/ETSI)

The main difference between dialing Dial(DAHDI/g0/1234w888) and
Dial(DAHDI/g0/1234,,D(888)) is the sending of the sending complete ie.

(closes issue ASTERISK-19176)
Reported by: rmudgett
Tested by: rmudgett
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-02 20:18:11 +00:00
Mark Michelson 0f4489dc0f Fix TLS port binding behavior as well as reload behavior:
* Removes references to tlsbindport from http.conf.sample and manager.conf.sample
* Properly bind to port specified in tlsbindaddr, using the default port if specified.
* On a reload, properly close socket if the service has been disabled.

A note has been added to UPGRADE.txt to indicate how ports must be set for TLS.

(closes issue ASTERISK-16959)
reported by Olaf Holthausen

(closes issue ASTERISK-19201)
reported by Chris Mylonas

(closes issue ASTERISK-19204)
reported by Chris Mylonas

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-02 18:55:05 +00:00
Jonathan Rose 5164196972 Fix sip show peers port output, align columns, and fix ami port output.
A previous patch I committed from ASTERISK-16930 unexpectedly changed some output for
the AMI action "sippeers" which this patch changes back. Also, this aligns the output
for the cli command "sip show peers" and fixes another issue that patch introduced by
using ast_sockaddr_stringify calls multiple times without immediately using the pointer.
I also went ahead and did a little janitorial work to clean up whitespace in
_sip_show_peers.

(issue ASTERISK-16930)
(closes issue ASTERISK-19281)
Reported by: Patrick El Youssef
Patches:
	ASTERISK-19281.diff uploaded by Walter Doekes (license 5674)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-02 17:07:35 +00:00
Jonathan Rose 0e334d427b Use ast_sockaddr_stringify_fmt wrappers for various functions in chan_sip
There are a number of cleaner looking wrappers for ast_sockaddr_stringify_fmt
available which are slightly more readable than using a direct call to
ast_sockaddr_stringify_fmt. This patch switches a number of those calls in
chan_sip to use those wrappers and is generally harmless.

(Closes issue ASTERISK-16930)
Reported by: Michael L. Young
Patches:
	chan_sip-broken-registration-1.8.diff uploaded by Michael L. Young (license 5026)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 21:18:03 +00:00
Richard Mudgett 23bc964e1c Constify some more channel driver technology callback parameters.
Review: https://reviewboard.asterisk.org/r/1707/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 19:53:38 +00:00
Richard Mudgett 797d633139 Remove inconsistency in CEL eventtype for user defined events.
The CEL eventtype field for ODBC and PGSQL backends should be USER_DEFINED
instead of the user defined event name supplied by the CELGenUserEvent
application.  If the field is output as a number, the user defined name
does not have a value and is always output as 21 for USER_DEFINED and the
userdeftype field would be required to supply the user defined name.

The following CEL backends (cel_odbc, cel_pgsql, cel_custom, cel_manager,
and cel_sqlite3_custom) can be independently configured to remove this
inconsistency.

* Allows cel_manager, cel_custom, and cel_sqlite3_custom to behave the
same way.

(closes issue ASTERISK-17189)
Reported by: Bryant Zimmerman

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 17:42:15 +00:00
Richard Mudgett a99b3c817b Fix ExtenSpy and simplify the channel search functions.
When ast_channel name was opaquified, the channel search functions did not
get converted correctly.  As a result ExtenSpy which uses a channel
iterator search by exten@context could never find anything.

* Updated the doxygen documentation for the search functions in channel.h.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 17:21:40 +00:00
Sean Bright 544333b435 Resolve an overlap in the ast_audiohook_flags values.
AST_AUDIOHOOK_TRIGGER_WRITE and AST_AUDIOHOOK_WANTS_DTMF were overlapping which
may have caused unintended side effects.  This patch moves
AST_AUDIOHOOK_TRIGGER_WRITE, and updates AST_AUDIOHOOK_TRIGGER_MODE to reflect
the original intention.

This will affect existing modules that use these flags, so be sure to recompile
as necessary.

(closes issue ASTERISK-19246)
Reported by: feyfre
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 15:59:54 +00:00
Matthew Jordan 863493118b Added clarification for the VERBOSITY setting to etc_default_asterisk
Clarified that using the VERBOSITY setting in etc_default_asterisk is the
same as using the -v command line switch, which causes Asterisk to launch
in console mode.

(closes issue ASTERISK-17030)
Reported by: Jonas
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 15:07:24 +00:00
Terry Wilson 5861bab06d Allow res_calendar to be unloaded
The calendaring tech modules depend on res_calendar and initially
res_calendar just bumped the use count so that it couldn't be unloaded.
res_calendar can potentially create many threads and I've seen issues
where the Asterisk shutdown has failed where it looked like these
threads could be the culprit.

This patch adds unload support for res_calendar. Unloading res_calendar
will also unload the dependant tech modules as well.

(closes issue ASTERISK-16744)
Review: https://reviewboard.asterisk.org/r/1657/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 00:08:27 +00:00
Richard Mudgett 2d7a40de58 Fix memory leak in error paths for action_originate().
* Fix memory leak of vars in error paths for action_originate().

* Moved struct fast_originate_helper tech and data members to stringfields.

* Simplified ActionID header handling for fast_originate().

* Added doxygen note to ast_request() and ast_call() and the associated
channel callbacks that the data/addr parameters should be treated as const
char *.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-31 17:26:09 +00:00
Terry Wilson de57235ac6 Re-link peers by IP when dnsmgr changes the IP
Asterisk's dnsmgr currently takes a pointer to an ast_sockaddr and updates it
anytime an address resolves to something different. There are a couple of
issues with this. First, the ast_sockaddr is usually the address of an
ast_sockaddr inside a refcounted struct and we never bump the refcount of those
structs when using dnsmgr. This makes it possible that a refresh could happen
after the destructor for that object is called (despite ast_dnsmgr_release
being called in that destructor). Second, the module using dnsmgr cannot be
aware of an address changing without polling for it in the code. If an action
needs to be taken on address update (like re-linking a SIP peer in the
peers_by_ip table), then polling for this change negates many of the benefits
of having dnsmgr in the first place.

This patch adds a function to the dnsmgr API that calls an update callback
instead of blindly updating the address itself. It also moves calls to
ast_dnsmgr_release outside of the destructor functions and into cleanup
functions that are called when we no longer need the objects and increments the
refcount of the objects using dnsmgr since those objects are stored on the
ast_dnsmgr_entry struct. A helper function for returning the proper default SIP
port (non-tls vs tls) is also added and used.

This patch also incorporates changes from a patch posted by Timo Teräs to
ASTERISK-19106 for related dnsmgr issues.

(closes issue ASTERISK-19106)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30 23:58:51 +00:00
Alec L Davis f92d6412ab Merged revisions 353369 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r353369 | alecdavis | 2012-01-31 11:42:28 +1300 (Tue, 31 Jan 2012) | 9 lines
  
  Merged revisions 353368 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r353368 | alecdavis | 2012-01-31 11:40:40 +1300 (Tue, 31 Jan 2012) | 2 lines
    
    prevent debug messsges displaying -ve Cseq numbers. Missed in R353320
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30 22:44:50 +00:00
Alec L Davis 0ccc1f5274 Merged revisions 353321 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r353321 | alecdavis | 2012-01-31 11:16:22 +1300 (Tue, 31 Jan 2012) | 25 lines
  
  Merged revisions 353320 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r353320 | alecdavis | 2012-01-31 10:57:49 +1300 (Tue, 31 Jan 2012) | 18 lines
    
    RFC3261 Section 8.1.1.5. The sequence number value MUST be expressible as a 32-bit unsigned integer
    
    * fix: use %u instead of %d when dealing with CSeq numbers - to remove possibility of -ve numbers.
    
    * fix: change all uses of seqno and friends (ocseq icseq) from 'int' or 'unsigned int' to uint32_t.
    
    Summary of CSeq numbers.
    An initial CSeq number must be less than 2^31
    A CSeq number can increase in value up to 2^32-1
    An incrementing CSeq number must not wrap around to 0.
    
    Tested with Asterisk 1.8.8.2 with Grandstream phones.
     
    alecdavis (license 585)
    Tested by: alecdavis
     
    Review: https://reviewboard.asterisk.org/r/1699/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30 22:28:37 +00:00
Kevin P. Fleming c6489d7b32 Correct serious flaw in the top-level Makefile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30 21:34:52 +00:00
Kevin P. Fleming 92ef8a6fe1 Address OpenSSL initialization issues when using third-party libraries.
When Asterisk is used with various third-party libraries (CURL, PostgresSQL,
many others) that have the ability themselves to use OpenSSL, it is possible
for conflicts to arise in how the OpenSSL libraries are initialized and
shutdown. This patch addresses these conflicts by 'wrapping' the important
functions from the OpenSSL libraries in a new shared library that is part
of Asterisk itself, and is loaded in such a way as to ensure that *all*
calls to these functions will be dispatched through the Asterisk wrapper
functions, not the native functions.

This new library is optional, but enabled by default. See the CHANGES file
for documentation on how to disable it.

Along the way, this patch also makes a few other minor changes:

* Changes MODULES_DIR to ASTMODDIR throughout the build system, in order to
  more closely match what is used during run-time configuration.

* Corrects some errors in the configure script where AC_CHECK_TOOLS was used
  instead of AC_PATH_PROG.

* Adds a new variable for linker flags in the build system (DYLINK), used for
  producing true shared libraries (as opposed to the dynamically loadable
  modules that the build system produces for 'regular' Asterisk modules).

* Moves the Makefile bits that handle installation and uninstallation of the
  main Asterisk binary into main/Makefile from the top-level Makefile.

* Moves a couple of useful preprocessor macros from optional_api.h to
  asterisk.h.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30 21:21:16 +00:00
Kevin P. Fleming 82f313b7b8 Clarify log WARNING message when port-zero SDP 'm' lines received.
Previously, if an m-line in an SDP offer or answer had a port number of zero,
that line was skipped, and resulted in an 'Unsupported SDP media type...'
warning message. This was misleading, as the media type was not unsupported,
but was ignored because the m-line indicated that the media stream had been
rejected (in an answer) or was not going to be used (in an offer).
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30 12:50:40 +00:00
Damien Wedhorn 843c7ef088 Allow softkey reject while device onhook.
Fixes up softkey endcall. Previous code was a copy of onhook, now
allows for endcall softkey to be used while device is still onhook.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-29 22:33:08 +00:00
Russell Bryant dd35aa1555 Find even more network interfaces.
The previous change made the code look for emN and pciN in addition to what
it did originally, which was search for ethN.  However, it needed to be looking
for pciN#N, so that's what it does now.

This also moves the memset() to be before every ioctl().
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-29 02:45:28 +00:00
Kevin P. Fleming 7023350098 Add 'L16-256' MIME subtype alias for slin16.
Asterisk has supported the 'L16' MIME subtype for 16kHz signed linear (PCM)
audio for quite some time, but some endpoints refer to it as 'L16-256'. This
commit adds this as an alias for the existing format.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-28 14:52:05 +00:00
Russell Bryant 3b785264b0 Update ast_set_default_eid() to find more network interfaces.
As of Fedora 15, ethN is not the name of ethernet interfaces.  The names
are emN or pciN.  Update some code that searched for interfaces named
ethN to look for the new names, as well.  For more information about why
this change was made, see this page:

    http://domsch.com/blog/?p=455
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-28 04:31:07 +00:00
Richard Mudgett 2e04182efc Audit of ao2_iterator_init() usage for v10. Missed one.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27 21:38:54 +00:00
Richard Mudgett f2c2d83c92 Audit of ao2_iterator_init() usage for v10.
Fix double format_cap iterator cleanup.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27 19:33:49 +00:00
Jonathan Rose 8a401484da Make failed PauseMonitor and UnpauseMonitor with no valid channel not close AMI session.
I also went ahead and took a little time to make sure that the manager value
AMI_SUCCESS was used instead of just return 0 being thrown around everywhere since that's
how we handle this stuff these days.

(closes issue ASTERISK-19249)
Reporter: Jamuel Starkey
Patches:
	res_monitor.c-ASTERISK-19249.diff uploaded by Jamuel Starkey (license 5766)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27 19:26:53 +00:00
Richard Mudgett 27b69e7d29 Audit of ao2_iterator_init() usage for v1.8.
Fixes numerous reference leaks and missing ao2_iterator_destroy() calls as
a result.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27 18:47:16 +00:00
Terry Wilson 5bfea5fdbf Add aresult variable for CALENDAR_WRITE
This patch adds a CALENDAR_SUCCESS=1/0 variable that is set to show whether or
not CALENDAR_WRITE has passed. This patch also adds some debugging for caldav
PUT responses and no longer treats responses with no body as an error (as a PUT
gets a 201 Created with no body).

(closes issue ASTERISK-16903)
Reported by: Clod Patry
Tested by: Terry Wilson
Patches:
  	calendarstatus.diff uploaded by Clod Patry (License #5138), slightly modified by Terry Wilson

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

M    res/res_calendar.c
M    res/res_calendar_exchange.c
M    res/res_calendar_caldav.c


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27 15:57:40 +00:00
Alec L Davis e0ca02fe21 Merged revisions 352863 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r352863 | alecdavis | 2012-01-27 13:08:03 +1300 (Fri, 27 Jan 2012) | 19 lines
  
  Merged revisions 352862 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r352862 | alecdavis | 2012-01-27 13:05:30 +1300 (Fri, 27 Jan 2012) | 12 lines
    
    rfc4235 - Section 4.1: Versions MUST be representable using a non-negative 32 bit integer.
    
    If a BLF subscription exists for long enough, using %d may print negative version numbers.
    Unlikely, as 2^32 at 1 update per second is ~137 years, or half that before the versions number started going negative.
    
    Tested with Asterisk 1.8.8.2 with Grandstream phones.
     
    alecdavis (license 585)
    Tested by: alecdavis
     
    Review: https://reviewboard.asterisk.org/r/1694/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27 00:11:41 +00:00
Alexandr Anikin 075b8385a0 Fix outbound DTMF for inband mode (tell asterisk core to generate DTMF
sounds).

(Closes issue ASTERISK-19233)
Reported by: Matt Behrens
Patches:
        chan_ooh323.c.patch uploaded by Matt Behrens (License #6346)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-26 20:44:37 +00:00
Jonathan Rose f4d98aeb28 Copy amaflags to sip_pvt from peer during create_addr_from_peer
For whatever reason, we don't have a single function for copying data like this
from SIP peers to the SIP pvt. This patch adds the copying of amaflags to the
sip_pvt, but it would probably be worth discussing this function along with
the others that essentially just copy some amount of data from a peer to a
private.

(Closes issue ASTERISK-19029)
Reported by: Matt Lehner
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-26 19:09:02 +00:00
Alec L Davis ed32b1c098 Merged revisions 352705 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r352705 | alecdavis | 2012-01-26 19:33:11 +1300 (Thu, 26 Jan 2012) | 27 lines
  
  Merged revisions 352704 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r352704 | alecdavis | 2012-01-26 19:27:07 +1300 (Thu, 26 Jan 2012) | 20 lines
    
    Cleanup dialog-info+xml Notify dialog
    
    Make similar to other Notify messages.
    
    sample output:
    
    <?xml version="1.0"?>
    <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="715" state="full" entity="sip:8523@192.168.x.xx">
    <dialog id="8523">
    <state>terminated</state>
    </dialog>
    </dialog-info>
    
    Tested with Asterisk 1.8.8.2 with Grandstream phones.
     
    alecdavis (license 585)
    Tested by: alecdavis
     
    Review: https://reviewboard.asterisk.org/r/1693/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-26 06:36:23 +00:00
Paul Belanger 5be89b07e2 Fix -Werror=unused-but-set-variable compiler error (gcc 4.6.2)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 22:25:30 +00:00
Kevin P. Fleming 9ee8a74461 Remove "asterisk/version.h" in favor of "asterisk/ast_version.h".
A long time ago, in a land far far away, we added "asterisk/ast_version.h",
which provides the ast_get_version() and ast_get_version_num() functions. These
were added so that modules that needed the version information for the Asterisk
instance they were loaded in could actually get it (as opposed the version that
they were compiled against). We changed everything in the tree to use the
new mechanism (although later main/test.c was added using the old method).
However, the old mechanism was never removed, and as a result, new code is
still trying to use it.

This commit removes asterisk/version.h and replaces it with a header that
will generate a compile-time error if you try to use it (the error message
tells you which header you should use instead). It also removes the Makefile
and build_tools bits that generated the file, and it updates main/test.c to
use the 'proper' method of getting the Asterisk version information.

This is an API change and thus is being committed for trunk only, but it's
a fairly minor one and definitely improves the situation for out-of-tree
modules.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 21:31:28 +00:00
Kevin P. Fleming 261cde4675 Blocked revisions 352616
........
Avoid unnecessary rebuilds of main/test.c.

main/test.c includes "asterisk/version.h", when it should include
"asterisk/ast_version.h" instead (and it should use the ast_get_version()
and ast_get_version_num() functions). This commit modifies it to extract
the Asterisk version information using the proper APIs, and as a result means
that main/test.c no longer needs to be rebuilt when a Subversion checkout
is updated or modified.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 21:22:25 +00:00
Terry Wilson 080ea28515 Remove some extraneous debugging from registry memleak fix
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 17:33:23 +00:00
Richard Mudgett cbe57b11cb Fixes for sending SIP MESSAGE outside of calls.
* Fix authenticate MESSAGE losing custom headers added by the MESSAGE_DATA
function in the authorization attempt.

* Pass up better From header contents for SIP to use.  Now is in the
"display-name" <URI> format expected by MessageSend.  (Note that this is a
behavior change that could concievably affect some people.)

* Block user from adding standard headers that are added automatically.
(To, From,...)

* Allow the user to override the Content-Type header contents sent by
MessageSend.

* Decrement Max-Forwards header if the user transferred it from an
incoming message.

* Expand SIP short header names so the dialplan and other code only has to
deal with the full names.

* Documents what SIP expects in the MessageSend(from) parameter.

(closes issue ASTERISK-18992)
Reported by: Yuri

(closes issue ASTERISK-18917)
Reported by: Shaun Clark

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 17:23:25 +00:00
Terry Wilson 4bf5e3716e Clean up some SIP registry-related memory leaks
1) Be sure and free at unload the epa_backend we allocate at startup
2) Do the same sip_registry cleanup at unload we do at reload

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 17:02:29 +00:00
Kevin P. Fleming 50de9578aa Eliminate unnecessary rebuilds of main/format*.c.
These files have no need to include "asterisk/version.h", and doing so forces
them to be rebuilt each time a Subversion checkout moves between 'modified'
and 'unmodified' states.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 16:54:54 +00:00
Jonathan Rose 973aeabf2d Redocuments sip types peer, user, friend in sip.conf.sample
There was faulty information in the sample config describing user as a synonym for friend
so it has been changed to better elaborate on the differences between the three entity
types.

(closes issue ASTERISK-15537)
Reported by: yarique
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 16:42:55 +00:00
Terry Wilson 213f7a65b5 Fix channel opaquification of stringfields for chan_vpb
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 01:21:23 +00:00
Mark Michelson 0fe9043233 Don't do a DNS lookup on an outbound REGISTER host if there is an outbound proxy configured.
(closes issue ASTERISK-16550)
reported by: Olle Johansson
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 22:28:08 +00:00
Jonathan Rose b68b7e55ac Set core sounds version to 1.4.22.
Now that we have the right license for the Russian 1.4.22 sounds as well as the sounds
for the Australian English 1.4.22 sounds, we can finally set the sounds to use 1.4.22!

(closes issue ASTERISK-18978)
Reported by: Cameron Twomey
Patches:
	confbridge.tar.001 uploaded by Cameron Twomey
    confbridge.tar.002 uploaded by Cameron Twomey
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 20:37:09 +00:00
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
Richard Mudgett 2144ba5df2 Fix locking issues with channel datastores in func_odbc.c.
* Fixed a potential memory leak when an existing datastore is manually
destroyed by inline code instead of calling ast_datastore_free().

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

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

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

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


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

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

(issue ASTERISK-19179)
Reported by: TSAREGORODTSEV Yury

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


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

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

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


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

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 20:29:48 +00:00