asterisk/asterisk.git
7 years agonamed_acl: Remove systemname option from acl.conf, use asterisk.conf value
Jonathan Rose [Thu, 19 Jul 2012 20:37:10 +0000 (20:37 +0000)]
named_acl: Remove systemname option from acl.conf, use asterisk.conf value

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

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

7 years agoCallID Logging: Remove new line/carriage return from callID change test event
Jonathan Rose [Thu, 19 Jul 2012 19:07:25 +0000 (19:07 +0000)]
CallID Logging: Remove new line/carriage return from callID change test event

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

7 years agoUse the bruteforce method to get debugging enabled for pjproject.
Joshua Colp [Thu, 19 Jul 2012 12:14:29 +0000 (12:14 +0000)]
Use the bruteforce method to get debugging enabled for pjproject.

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

7 years agoTurn on debugging for pjproject so we can get a better idea of what is causing the...
Joshua Colp [Thu, 19 Jul 2012 10:46:48 +0000 (10:46 +0000)]
Turn on debugging for pjproject so we can get a better idea of what is causing the generic CCSS test crash.

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

7 years agocallid logging: Issue test events when the callid is changed for a channel
Jonathan Rose [Wed, 18 Jul 2012 19:48:09 +0000 (19:48 +0000)]
callid logging: Issue test events when the callid is changed for a channel

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

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

7 years agoResolve severe memory leak in CEL logging modules.
Kevin P. Fleming [Wed, 18 Jul 2012 19:18:40 +0000 (19:18 +0000)]
Resolve severe memory leak in CEL logging modules.

A customer reported a significant memory leak using Asterisk 1.8. They
have tracked it down to ast_cel_fabricate_channel_from_event() in
main/cel.c, which is called by both in-tree CEL logging modules
(cel_custom.c and cel_sqlite3_custom.c) for each and every CEL event
that they log.

The cause was an incorrect assumption about how data attached to an
ast_channel would be handled when the channel is destroyed; the data
is now stored in a datastore attached to the channel, which is
destroyed along with the channel at the proper time.

(closes issue AST-916)
Reported by: Thomas Arimont
Review: https://reviewboard.asterisk.org/r/2053/
........

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

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

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

7 years agoEnsure that all ast_datastore_info structures are 'const'.
Kevin P. Fleming [Wed, 18 Jul 2012 17:18:20 +0000 (17:18 +0000)]
Ensure that all ast_datastore_info structures are 'const'.

While addressing a bug, I came across a instance of 'struct ast_datastore_info'
that was not declared 'const'. Since the API already expects them to be
'const', this patch changes the declarations of all existing instances
that were not already declared that way.
........

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

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

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

7 years agoFix a crash in pjnath when starting an ICE connectivity check and immediately destroy...
Joshua Colp [Wed, 18 Jul 2012 15:15:41 +0000 (15:15 +0000)]
Fix a crash in pjnath when starting an ICE connectivity check and immediately destroying the ICE session.

The initial ICE connectivity check is scheduled as a timer item that is to be executed immediately. It is possible for this timer item to start executing while the ICE session it is working on is destroyed. To reduce the chance of this any timer items that need to be immediately executed will be executed within the thread that has started the initial ICE connectivity check.

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

7 years agoFix a crash occurring as a result of excess stack usage.
Joshua Colp [Wed, 18 Jul 2012 11:38:05 +0000 (11:38 +0000)]
Fix a crash occurring as a result of excess stack usage.

This fix involves moving the allocation of some temporary codec structures to the heap and also reduces the number of maximum payloads to something more sane for both regular and low memory builds.

(closes issue ASTERISK-20140)
Reported by: jonnt

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

7 years agoAdded option 'interdigit_timer' to unistim.conf to make able controll hardcoded dial...
Igor Goncharovskiy [Wed, 18 Jul 2012 07:17:00 +0000 (07:17 +0000)]
Added option 'interdigit_timer' to unistim.conf to make able controll hardcoded dial timeout constant.

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

7 years agoAdd pubsub unsubscription support so subscriptions do not linger for MWI and device...
Joshua Colp [Tue, 17 Jul 2012 19:05:36 +0000 (19:05 +0000)]
Add pubsub unsubscription support so subscriptions do not linger for MWI and device state progatation.

The pubsub code did not attempt to remove subscriptions at all. This has now changed so that if a client is being disconnected it will unsubscribe. It will also unsubscribe at connection time so if it unexpectedly disconnected duplicate subscriptions will not occur.

(closes issue ASTERISK-19882)
Reported by: mattvryan

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

7 years agoFix a crash as a result of propagating MWI or device state over XMPP when the client...
Joshua Colp [Tue, 17 Jul 2012 16:32:10 +0000 (16:32 +0000)]
Fix a crash as a result of propagating MWI or device state over XMPP when the client is disconnected.

The MWI and device state propagation code wrongly assumes that an XMPP client connection will remain established at all times. This fix corrects that by making the lifetime of the subscription the same as the lifetime of the connection itself. As the connection is established and disconnected the subscription itself is created and destroyed.

(closes issue ASTERISK-18078)
Reported by: elguero

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

7 years agoCode cleanup and bugfix in chan_sip outboundproxy parsing.
Walter Doekes [Mon, 16 Jul 2012 19:58:00 +0000 (19:58 +0000)]
Code cleanup and bugfix in chan_sip outboundproxy parsing.

The bug was clearing the global outboundproxy when a peer-specific
outboundproxy was bad. The cleanup reduces duplicate code.

Review: https://reviewboard.asterisk.org/r/2034/
Reviewed by: Mark Michelson
........

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

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

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

7 years agoFix an issue where a service discovery request could crash Asterisk.
Joshua Colp [Mon, 16 Jul 2012 19:14:29 +0000 (19:14 +0000)]
Fix an issue where a service discovery request could crash Asterisk.

A server sending a service discovery request to us may or may not put a from attribute in the message. If the from attribute is present use it in the to attribute for the result. If the from attribute is not present do not add a to attribute.

(issue ASTERISK-16203)
Reported by: wubbla

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

7 years agoFix a bug where some XMPP servers would reject authentication. We need to use the...
Joshua Colp [Mon, 16 Jul 2012 17:26:40 +0000 (17:26 +0000)]
Fix a bug where some XMPP servers would reject authentication. We need to use the user portion of the JID and not the full configured username.

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

7 years agoAdd missing namespace for old non-SASL based authentication.
Joshua Colp [Mon, 16 Jul 2012 16:54:55 +0000 (16:54 +0000)]
Add missing namespace for old non-SASL based authentication.

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

7 years agoFix a bug exposed by the testsuite where text streams would no longer be parsed corre...
Joshua Colp [Mon, 16 Jul 2012 15:08:53 +0000 (15:08 +0000)]
Fix a bug exposed by the testsuite where text streams would no longer be parsed correctly.

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

7 years agoAdd comments about the BUILD_NATIVE change
Kinsey Moore [Mon, 16 Jul 2012 14:02:10 +0000 (14:02 +0000)]
Add comments about the BUILD_NATIVE change

This is a significant change and mention of it should have gone into
UPGRADE.txt and CHANGES.
........

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

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

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

7 years agoFix an issue where specifying the resource in the username would cause authentication...
Joshua Colp [Mon, 16 Jul 2012 12:58:18 +0000 (12:58 +0000)]
Fix an issue where specifying the resource in the username would cause authentication to fail.

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

7 years agoAdd support for SIP over WebSocket.
Joshua Colp [Mon, 16 Jul 2012 12:35:04 +0000 (12:35 +0000)]
Add support for SIP over WebSocket.

This allows SIP traffic to be exchanged over a WebSocket connection which is useful for rtcweb.

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

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

7 years agoDeactivate timer for dialing entered number on hook switch hang up.
Igor Goncharovskiy [Mon, 16 Jul 2012 07:38:18 +0000 (07:38 +0000)]
Deactivate timer for dialing entered number on hook switch hang up.

(closes issue ASTERISK-19554)
Reported by: Stefano Villani

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

7 years agoAdd French translation for chan_unistim phones on-screen menus.
Igor Goncharovskiy [Mon, 16 Jul 2012 07:34:12 +0000 (07:34 +0000)]
Add French translation for chan_unistim phones on-screen menus.

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

7 years agoReduce memory consumption and add the H.264 and H.263 modules I shamefully neglected...
Joshua Colp [Fri, 13 Jul 2012 18:41:07 +0000 (18:41 +0000)]
Reduce memory consumption and add the H.264 and H.263 modules I shamefully neglected to add.

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

7 years agoAdd support for parsing SDP attributes, generating SDP attributes, and passing it...
Joshua Colp [Fri, 13 Jul 2012 16:49:40 +0000 (16:49 +0000)]
Add support for parsing SDP attributes, generating SDP attributes, and passing it through.

This support includes codecs such as H.263, H.264, SILK, and CELT. You are able to set up a call and have attribute information pass. This should help considerably with video calls.

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

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

7 years agolive_ast: don't set working directory
Tzafrir Cohen [Fri, 13 Jul 2012 00:05:46 +0000 (00:05 +0000)]
live_ast: don't set working directory

contrib/scripts/live_ast currently assumes that it is being run from the
top-level directory of the source tree. It creates a script that will
also set the working directory.

This fix avoids the need to set the working directory if the caller sets
LIVE_AST_BASE_DIR instead.

It relies on realpath for that. If realpath is not available, it will
fall back to the original behaviour.

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

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

7 years agoHandle deprecated (aliased) option names with the config options api
Terry Wilson [Thu, 12 Jul 2012 21:43:09 +0000 (21:43 +0000)]
Handle deprecated (aliased) option names with the config options api

Add a simple way to register "deprecated" option names that alias to a
different "current" name.

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

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

7 years agoAdd missing ast_hangup() calls on some analog exception paths.
Richard Mudgett [Thu, 12 Jul 2012 20:28:07 +0000 (20:28 +0000)]
Add missing ast_hangup() calls on some analog exception paths.

Make starting analog_ss_thread() or __analog_ss_thread() failure paths
hangup the channel.
........

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

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

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

7 years agoInclude Expires header for SIP PUBLISH requests
Kinsey Moore [Thu, 12 Jul 2012 20:06:23 +0000 (20:06 +0000)]
Include Expires header for SIP PUBLISH requests

RFC3903 requres SIP PUBLISH requests to have Expires headers, so add
them.

Review: https://reviewboard.asterisk.org/r/2003/
Patch-by: gareth
........

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

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

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

7 years agoPrevent double uri_escaping in chan_sip when pedantic is enabled
Kinsey Moore [Thu, 12 Jul 2012 19:05:11 +0000 (19:05 +0000)]
Prevent double uri_escaping in chan_sip when pedantic is enabled

If pedantic mode is enabled, outbound invites will have double-escaped
contacts.  This avoids setting an already-escaped string into a field
where it is expected to be unescaped.

(closes issue ASTERISK-20023)
Reported by: Walter Doekes
........

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

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

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

7 years agoCorrect Documentation For DEC Function
Michael L. Young [Thu, 12 Jul 2012 14:38:44 +0000 (14:38 +0000)]
Correct Documentation For DEC Function

The documentation for DEC in func_math.c was incorrect.  Looks like a copy and
paste error.

(Closes issue ASTERISK-20095)
Reported by: Billy Chia
Tested by: Michael L. Young
Patches:
    func_math.patch uploaded by Billy Chia (license 6381)
........

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

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

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

7 years agoReverting last merge since it wasn't completed properly.
Michael L. Young [Thu, 12 Jul 2012 14:36:44 +0000 (14:36 +0000)]
Reverting last merge since it wasn't completed properly.

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

7 years agoCorrect Documentation For DEC Function
Michael L. Young [Thu, 12 Jul 2012 14:27:56 +0000 (14:27 +0000)]
Correct Documentation For DEC Function

The documentation for DEC in func_math.c was incorrect.  Looks like a copy and
paste error.

(Closes issue ASTERISK-20095)
Reported by: Billy Chia
Tested by: Michael L. Young
Patches:
    func_math.patch uploaded by Billy Chia (license 6381)
........

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

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

7 years agoNamed ACLs: Introduces a system for creating and sharing ACLs
Jonathan Rose [Wed, 11 Jul 2012 18:33:36 +0000 (18:33 +0000)]
Named ACLs: Introduces a system for creating and sharing ACLs

This patch adds Named ACL functionality to Asterisk. This allows system
administrators to define an ACL and refer to it by a unique name. Configurable
items can then refer to that name when specifying access control lists.
It also includes updates to all core supported consumers of ACLs. That includes
manager, chan_sip, and chan_iax2. This feature is based on the deluxepine-trunk
by Olle E. Johansson and provides a subset of the Named ACL functionality
implemented in that branch. For more information on this feature, see acl.conf
and/or the Asterisk wiki.

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

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

7 years agoAllow the REALTIME() function to report errors back to the caller.
Tilghman Lesher [Wed, 11 Jul 2012 17:16:50 +0000 (17:16 +0000)]
Allow the REALTIME() function to report errors back to the caller.

Also, do more error checking on the arguments specified to the REALTIME()
function and clarify the documentation.  While I was editing the file, a
few coding guidelines fixups, as well.

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

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

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

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

7 years agoDon't perform an XInclude to a document node that may not always be present
Matthew Jordan [Wed, 11 Jul 2012 17:14:45 +0000 (17:14 +0000)]
Don't perform an XInclude to a document node that may not always be present

Because some of the manager events are defined in the top of the source, due
to the macro calls not containing all necessary information to have the
documentation colocated with the call itself, several include statements were
failing when built with 'make'.  While this did not cause any problems in
compilation or validation, it did result in a number of warnings being dumped
to stderr.

This patch changes those references such that they always resolve, regardless
of the documentation build options.

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

7 years agoDo not consider failure to read the configuration file in chan_motif to be a show...
Joshua Colp [Wed, 11 Jul 2012 16:42:01 +0000 (16:42 +0000)]
Do not consider failure to read the configuration file in chan_motif to be a show stopper for loading Asterisk by returning decline instead of failure.

(closes issue ASTERISK-20103)
Reported by: Terry Wilson

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

7 years agoFix validation errors when producing documentation using default build script
Matthew Jordan [Wed, 11 Jul 2012 02:06:05 +0000 (02:06 +0000)]
Fix validation errors when producing documentation using default build script

The awk script parses out the first instance of the DOCUMENTATION tag that it
finds within a file.  If a file did not previously have a DOCUMENTATION tag
but received one due to it having an AMI event, then the XML fragment
associated with the AMI event was erroneously placed in the resulting XML
file.  Without the python scripts, these XML fragments will not validate.

This patch adds DOCUMENTATION tags at the top of those files that did
not previously have them to prevent the awk script from pulling AMI event
documentation.

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

7 years agoAdd some additional documentation for core AMI events
Matthew Jordan [Tue, 10 Jul 2012 22:26:27 +0000 (22:26 +0000)]
Add some additional documentation for core AMI events

This patch adds some basic documentation for a number of modules.  This
includes core source files in Asterisk (those in main), as well as
chan_agent, chan_dahdi, chan_local, sig_analog, and sig_pri.  The DTD
has also been updated to allow referencing of AMI commands.

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

7 years agoFix failing SDP_offer_answer test
Kinsey Moore [Tue, 10 Jul 2012 15:36:37 +0000 (15:36 +0000)]
Fix failing SDP_offer_answer test

Asterisk now generates image stream declinations with the same
transport case that it used to before the stream declination
improvements. (udptl vs UDPTL)

(closes issue SWP-4736)

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

7 years agoAdd additional description stanza names from the old Google Talk protocol which is...
Joshua Colp [Tue, 10 Jul 2012 15:25:12 +0000 (15:25 +0000)]
Add additional description stanza names from the old Google Talk protocol which is used with Google Voice.

(closes issue ASTERISK-20114)
Reported by: Malcolm Davenport

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

7 years agoRespect codec preference order when adding codecs to a media description.
Joshua Colp [Tue, 10 Jul 2012 14:00:05 +0000 (14:00 +0000)]
Respect codec preference order when adding codecs to a media description.

This change allows an endpoint in motif.conf to be configured with a preference of G.722 and fallback of ulaw. With Google this allows communication with Google Talk clients to use G.722 while when using Google Voice ulaw will be used.

(closes issue ASTERISK-20114)
Reported by: Malcolm Davenport

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

7 years agoImprove Goto and GotoIf related documentation
Kinsey Moore [Tue, 10 Jul 2012 13:40:32 +0000 (13:40 +0000)]
Improve Goto and GotoIf related documentation

Correct documentation on labeliftrue and labeliffalse parameters of
GotoIf() and update several other locations that use the same syntax.

(closes issue ASTERISK-20007)
Patch-by: Leif Madsen
Reported-by: WIMPy
........

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

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

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

7 years agoFix initial loading problem with res_curl
Matthew Jordan [Tue, 10 Jul 2012 13:34:15 +0000 (13:34 +0000)]
Fix initial loading problem with res_curl

When the OpenSSL duplicate initialization issues were resolved in r351447,
res_curl could fail to load if it checked SSL_library_init after SSL
initialization completed.  This is due to the SSL_library_init stub returning
a value of 0 for success, as opposed to a value of 1.  OpenSSL uses a value of
1 to indicate success - in fact, SSL_library_init is documented to always return
1.  Interestingly, the CURL libraries actually checked the return value - the fact
that nothing else that depends on OpenSSL was having problems loading probably means
they don't check the return value.

(closes issue AST-924)
Reported by: Guenther Kelleter
patches:
  (AST-924.patch license #6372 uploaded by Guenther Kelleter)

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

7 years agoAdd required items for Google video support.
Joshua Colp [Tue, 10 Jul 2012 11:49:18 +0000 (11:49 +0000)]
Add required items for Google video support.

This adds legacy STUN support for RTCP sockets, adds RTCP candidates to the Google transport information, and adds required codec parameters.

(closes issue ASTERISK-20106)
Reported by: Malcolm Davenport

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

7 years agoWhen receiving a STUN binding request send one out as the Google Talk client uses...
Joshua Colp [Mon, 9 Jul 2012 22:38:25 +0000 (22:38 +0000)]
When receiving a STUN binding request send one out as the Google Talk client uses this as a method to determine if the remote party is still reachable or not.

Failure to do this results in the Google Talk client ignoring RTP packets after a specific period of time. This is also done as a result of receiving a STUN binding request so that the username information can be used from the inbound request, thus not requiring it to be stored on a per candidate basis.

(closes issue ASTERISK-20107)
Reported by: Malcolm Davenport

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

7 years agoAdd support for exposing the received contact URI and also for setting the request...
Joshua Colp [Mon, 9 Jul 2012 19:51:37 +0000 (19:51 +0000)]
Add support for exposing the received contact URI and also for setting the request URI in messages.

(closes issue AST-911)

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

7 years agoForce the clock rate of G.722 to be 16000 when using the Google transports as it...
Joshua Colp [Mon, 9 Jul 2012 19:05:25 +0000 (19:05 +0000)]
Force the clock rate of G.722 to be 16000 when using the Google transports as it is 8000 elsewhere.

(closes issue ASTERISK-20105)
Reported by: Malcolm Davenport

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

7 years agoDocument that multiple endpoints using the same connection is not supported.
Joshua Colp [Mon, 9 Jul 2012 18:54:43 +0000 (18:54 +0000)]
Document that multiple endpoints using the same connection is not supported.

(closes issue ASTERISK-20104)
Reported by: Malcolm Davenport

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

7 years agoAdd Digium phones context to sip_notify sample config.
Jason Parker [Mon, 9 Jul 2012 17:07:06 +0000 (17:07 +0000)]
Add Digium phones context to sip_notify sample config.

This makes it so that they can be reconfigured remotely.

(closes issue ASTERISK-19910)
........

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

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

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

7 years agoFix an issue where media would not flow for situations where the legacy STUN code...
Joshua Colp [Mon, 9 Jul 2012 16:44:24 +0000 (16:44 +0000)]
Fix an issue where media would not flow for situations where the legacy STUN code is in use.

The STUN packets should *not* be blocked by strict RTP.

(closes issue ASTERISK-20102)
Reported by: Malcolm Davenport

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

7 years agoAdd additional namespaces for Google Talk which are used for the gmail client.
Joshua Colp [Mon, 9 Jul 2012 16:27:47 +0000 (16:27 +0000)]
Add additional namespaces for Google Talk which are used for the gmail client.

(closes issue ASTERISK-20101)
Reported by: Malcolm Davenport

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

7 years agoFix dependency to be on res_xmpp. Long ago in a galaxy far far away it used to use...
Joshua Colp [Mon, 9 Jul 2012 15:58:36 +0000 (15:58 +0000)]
Fix dependency to be on res_xmpp. Long ago in a galaxy far far away it used to use res_jabber.

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

7 years agochan_sip: Fix small behavioral change accidentally introduced in r369750
Jonathan Rose [Mon, 9 Jul 2012 14:54:22 +0000 (14:54 +0000)]
chan_sip: Fix small behavioral change accidentally introduced in r369750

When removing the warning for AST_CONTROL_FLASH from sip_indicate, I also
inadvertently changed the return value, which would likely make the indication
not be sent in audio. This fixes that while still removing the warning message.
........

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

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

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

7 years agoAdd a new unified Jingle, Google Jingle, and Google Talk channel driver written from...
Joshua Colp [Sat, 7 Jul 2012 17:06:51 +0000 (17:06 +0000)]
Add a new unified Jingle, Google Jingle, and Google Talk channel driver written from scratch called chan_motif.

This channel driver is a replacement for both chan_gtalk and chan_jingle but adds additional features not found in either.
These features include full configuration reload, video, full codec support, bidirectional cause code mapping, hold,
unhold, and ringing indication. It is also compliant with the current published Jingle and Google Jingle specifications.
The original Google Talk protocol is also supported for Google Voice interoperability.

You may ask yourself though where the name motif comes from... and I would say to you... music!

motif: a perceivable or salient recurring fragment or succession of notes

Sorta like a jingle!

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

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

7 years agoRemove unnecessary generation of informational cause frames
Kinsey Moore [Fri, 6 Jul 2012 22:03:44 +0000 (22:03 +0000)]
Remove unnecessary generation of informational cause frames

It is not necessary to generate information cause code frames on every
protocol event that occurs.  This removes all the instances where the
frame was not conveying a cause code and was instead just conveying a
protocol-specific message.  This also corrects the generation of the
message associated with disconnects for MFC/R2 to use the MFC/R2
specific text for the disconnect cause.

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

7 years agochan_sip: Add case for FLASH control frames so that we don't display a warning.
Jonathan Rose [Fri, 6 Jul 2012 21:28:26 +0000 (21:28 +0000)]
chan_sip: Add case for FLASH control frames so that we don't display a warning.

chan_sip channels can receive flash control frames when connected to analog
phones and possibly for other reasons. There really isn't a reason to warn when
these frames are received, we can safely ignore them.

Patches:
    dahdi_sip_flash.diff uploaded by Jonathan Rose (license 6182)
........

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

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

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

7 years agoRemove a superfluous and dangerous freeing of an SSL_CTX.
Mark Michelson [Fri, 6 Jul 2012 18:49:17 +0000 (18:49 +0000)]
Remove a superfluous and dangerous freeing of an SSL_CTX.

The problem here is that multiple server sessions share
a SSL_CTX. When one session ended, the SSL_CTX would be
freed and set NULL, leaving the other sessions unable to
function.

The code being removed is superfluous because the SSL_CTX
structures for servers will be properly freed when ast_ssl_teardown
is called.

(closes issue ASTERISK-20074)
Reported by Trevor Helmsley
Patches:
ASTERISK-20074.diff uploaded by Mark Michelson (license #5049)
Testers:
Trevor Helmsley
........

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

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

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

7 years agoFix bridging thread leak.
Mark Michelson [Fri, 6 Jul 2012 15:31:52 +0000 (15:31 +0000)]
Fix bridging thread leak.

The bridge thread was exiting but was never being
reaped using pthread_join(). This has been fixed now
by calling pthread_join() in ast_bridge_destroy().

(closes issue ASTERISK-19834)
Reported by Marcus Hunger

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

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

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

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

7 years agoImport revision 4196 from pjproject trunk. Fix a crash issue when starting ICE connec...
Joshua Colp [Fri, 6 Jul 2012 14:32:30 +0000 (14:32 +0000)]
Import revision 4196 from pjproject trunk. Fix a crash issue when starting ICE connectivity checks and immediately destroying the ICE session. This was exposed by the SIP CCSS test.

Full fix for this issue will be worked on as a medium to long term roadmap item.

pjroject issue viewable at https://trac.pjsip.org/repos/ticket/1548

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

7 years agoAdd 'stun show status' command
Matthew Jordan [Thu, 5 Jul 2012 21:36:41 +0000 (21:36 +0000)]
Add 'stun show status' command

This patch adds a new CLI command, 'stun show status'.  This command will show
a table describing all known STUN servers and statuses.

(closes issue ASTERISK-18046)
Reported by: Jeremy Kister
Tested by: Jeremy Kister
patches:
  (stun-show-status-v4-trunk.patch license #6232 uploaded by Jeremy Kister)

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

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

7 years agoMake res/pjproject ignore more files.
Richard Mudgett [Thu, 5 Jul 2012 19:36:22 +0000 (19:36 +0000)]
Make res/pjproject ignore more files.

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

7 years agoAST-2012-011: Resolve heap corruption issue with voicemail
Kinsey Moore [Thu, 5 Jul 2012 19:36:21 +0000 (19:36 +0000)]
AST-2012-011: Resolve heap corruption issue with voicemail

The heard and deleted arrays in the voicemail state structure were not
handled properly following the memory leak fix in r354890 and a fix for
an invalid free in r356797.  This could result in accessing and writing
into freed memory.  The allocation for these arrays has been reworked
to avoid the possibility of invalid frees, access of freed memory, and
crashes that were occurring as a result of this.

Locking around accesses and modifications of the voicemail state
structure members dh_arraysize, heard, and deleted has been added to
prevent simultaneous modification and access when IMAP storage is in
use.  If IMAP storage is not in use, this locking is not compiled in.

Review: https://reviewboard.asterisk.org/r/1994/
(closes issue ASTERISK-19923)
Reported by: Dan Delaney
Tested by: Dan Delaney, Julian Yap
Patches:
  vm_alloc_fix.diff uploaded by kmoore (license 6273)

........

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

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

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

7 years agoMake res/pjproject ignore some generated files.
Richard Mudgett [Thu, 5 Jul 2012 19:32:29 +0000 (19:32 +0000)]
Make res/pjproject ignore some generated files.

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

7 years agoTweak some comments and whitespace in utils.h
Richard Mudgett [Thu, 5 Jul 2012 19:22:03 +0000 (19:22 +0000)]
Tweak some comments and whitespace in utils.h

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

7 years agoapp_mixmonitor: Fix a reference leak in manager_mixmonitor function
Jonathan Rose [Thu, 5 Jul 2012 18:11:58 +0000 (18:11 +0000)]
app_mixmonitor: Fix a reference leak in manager_mixmonitor function

Manager_mixmonitor included an early return on failed executions of mixmonitor
that would result in a leaked channel reference.

(closes issue ASTERISK-19943)
Reported by: Mark Murawski
Patches:
mixmonitor-trunk-368394.patch uploaded by Mark Murawski (license 5791)

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

7 years agoDo not send a BYE when a provisional response arrives during a re-INVITE
Matthew Jordan [Thu, 5 Jul 2012 17:03:43 +0000 (17:03 +0000)]
Do not send a BYE when a provisional response arrives during a re-INVITE

Commits r369557 and r369579 were done to improve handling of re-INVITEs
when the UA that was supposed to receive the re-INVITE fails to respond.
A limitation of those patches occurred when a UA sent a provisional
response to the re-INVITE.  This triggered a sending of a BYE in
check_pending.  This patch tweaks the handling of the re-INVITE such that
a BYE is not sent in response to those messages.

(issue ASTERISK-19992)
Reported by: Steve Davies
Tested by: Steve Davies
patches:
  (reinvite_tweak.diff license #5012 by Steve Davies)
........

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

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

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

7 years agoFix dev mode ooh323 warnings
Alexandr Anikin [Thu, 5 Jul 2012 11:42:23 +0000 (11:42 +0000)]
Fix dev mode ooh323 warnings

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

7 years agoAdded direct media support to ooh323 channel driver
Alexandr Anikin [Wed, 4 Jul 2012 21:42:05 +0000 (21:42 +0000)]
Added direct media support to ooh323 channel driver
options are documented in config sample
sample config rename to proper name - ooh323.conf

To change media address ooh323 send empty TCS if there was
completed TCS exchange or send facility forwardedelements
with new fast start proposal if not.
Then close transmit logical channels and renew TCS exchange.

If new fast start proposal is received then ooh323 stack call back
channel driver routine to change rtp address in the rtp instance.
If empty TCS is received then close transmit logical channels and
renew TCS exchange

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

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

7 years agofix small mistake in the previous
Alexandr Anikin [Wed, 4 Jul 2012 18:50:47 +0000 (18:50 +0000)]
fix small mistake in the previous

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

7 years agoFix modern gcc warning
Alexandr Anikin [Wed, 4 Jul 2012 18:46:56 +0000 (18:46 +0000)]
Fix modern gcc warning

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

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

7 years agoMore improvements to re-INVITEs timing out after a provisional response
Terry Wilson [Tue, 3 Jul 2012 17:07:20 +0000 (17:07 +0000)]
More improvements to re-INVITEs timing out after a provisional response

There is no need to call check_pendings() on a final response to an INVITE
when destroying the scheduler entry as it will be done later during normal
processing.

(issue ASTERISK-19992)
........

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

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

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

7 years agoBetter handle re-INVITEs with provisional but no final repsonses
Terry Wilson [Tue, 3 Jul 2012 14:49:19 +0000 (14:49 +0000)]
Better handle re-INVITEs with provisional but no final repsonses

A previous attempt at fixing this issue had negative side effects related
to attended transfers which this patch should resolve. Many thanks to
Steve Davies for all of the good suggestions and testing.

(closes issue ASTERISK-19992)
Reported by: Steve Davies
Tested by: Steve Davies, Terry Wilson
Review: https://reviewboard.asterisk.org/r/2009/
........

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

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

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

7 years agoAdd a cleaned up drop-in replacement for res_jabber called res_xmpp. This provides...
Joshua Colp [Mon, 2 Jul 2012 14:06:19 +0000 (14:06 +0000)]
Add a cleaned up drop-in replacement for res_jabber called res_xmpp. This provides the same externally facing functionality but is implemented differently internally.

This is currently not built by default but this will be changed once chan_jingle2 (insert actual name in your head when reading this after it has been merged)
is in the tree.

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

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

7 years agoEnsure the timer heap is protected by a lock.
Joshua Colp [Mon, 2 Jul 2012 00:35:40 +0000 (00:35 +0000)]
Ensure the timer heap is protected by a lock.

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

7 years agoEnable IPv6 support in pjproject.
Joshua Colp [Sun, 1 Jul 2012 20:03:28 +0000 (20:03 +0000)]
Enable IPv6 support in pjproject.

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

7 years agoDon't try to send connectivity checks on RTCP if RTCP is no longer present and don...
Joshua Colp [Sun, 1 Jul 2012 19:36:49 +0000 (19:36 +0000)]
Don't try to send connectivity checks on RTCP if RTCP is no longer present and don't do multiple ICE connectivity checks at once.

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

7 years agoAdd support for ICE/STUN/TURN in res_rtp_asterisk and chan_sip.
Joshua Colp [Sun, 1 Jul 2012 17:28:57 +0000 (17:28 +0000)]
Add support for ICE/STUN/TURN in res_rtp_asterisk and chan_sip.

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

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

7 years agoFix apparent copy and paste error where incorrect "glue" is used.
Mark Michelson [Fri, 29 Jun 2012 20:32:40 +0000 (20:32 +0000)]
Fix apparent copy and paste error where incorrect "glue" is used.
........

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

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

7 years agoHangup handlers - Dialplan subroutines that run when the channel hangs up.
Richard Mudgett [Fri, 29 Jun 2012 17:02:32 +0000 (17:02 +0000)]
Hangup handlers - Dialplan subroutines that run when the channel hangs up.

Hangup handlers are an alternative to the h extension.  They can be used
in addition to the h extension.  The idea is to attach a Gosub routine to
a channel that will execute when the call hangs up.  Whereas which h
extension gets executed depends on the location of dialplan execution when
the call hangs up, hangup handlers are attached to the call channel.  You
can attach multiple handlers that will execute in the order of most
recently added first.

(closes issue ASTERISK-19549)
Reported by: Mark Murawski
Tested by: rmudgett

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

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

7 years agoWith some configurations a transport is not actually specified so assume UDP in these...
Joshua Colp [Fri, 29 Jun 2012 16:56:29 +0000 (16:56 +0000)]
With some configurations a transport is not actually specified so assume UDP in these cases.
........

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

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

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

7 years agoRemove obsolete struct ast_channel note.
Richard Mudgett [Fri, 29 Jun 2012 16:42:32 +0000 (16:42 +0000)]
Remove obsolete struct ast_channel note.

The opaquing the ast_channel struct no longer requires .cleancount to be
changed when the struct is changed.

* Bump .cleancount value one last time because of struct ast_channel for
old times sake.

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

7 years agoMake the address family filter specific to the transport.
Joshua Colp [Fri, 29 Jun 2012 15:33:39 +0000 (15:33 +0000)]
Make the address family filter specific to the transport.

(closes issue ASTERISK-16618)
Reported by: Leif Madsen

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

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

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

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

7 years agoAdd the ability to set flags via the config options api
Terry Wilson [Thu, 28 Jun 2012 01:12:06 +0000 (01:12 +0000)]
Add the ability to set flags via the config options api

Allows the setting of flags via the config options api.
For example, code like this:

#define OPT1 1 << 0
#define OPT2 1 << 1
#define OPT3 1 << 2

struct thing {
   unsigned int flags;
};

and a config like this:

[blah]
opt1=yes
opt2=no
opt3=yes

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

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

7 years agoAST-2012-010: Clean up after a reinvite that never gets a final response
Terry Wilson [Wed, 27 Jun 2012 21:21:27 +0000 (21:21 +0000)]
AST-2012-010: Clean up after a reinvite that never gets a final response

The basic problem is that if a re-INVITE is sent by Asterisk and it receives a
provisional response, but no final response, then the dialog is never torn
down. In addition to leaking memory, this also leaks file descriptors and will
eventually lead to Asterisk no longer being able to process calls.

This patch just keeps track of whether there is an outstanding re-INVITE, and if
there is goes ahead and cleans up everything as though there was no outstanding
reinvite.

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

(closes issue ASTERISK-19992)
Reported by: Steve Davies
Tested by: Steve Davies, Terry Wilson
........

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

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

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

7 years agoUnique Call ID logging Phases III and IV
Jonathan Rose [Tue, 26 Jun 2012 21:45:22 +0000 (21:45 +0000)]
Unique Call ID logging Phases III and IV

Adds call ID logging changes to specific channel drivers that weren't handled
handled in phase II of Call ID Logging. Also covers logging for threads for
threads created by systems that may be involved with many different calls.
Extra special thanks to Richard for rigorous review of chan_dahdi and its
various signalling modules.

review: https://reviewboard.asterisk.org/r/1927/
review: https://reviewboard.asterisk.org/r/1950/

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

7 years agoFix crash in unloading of res_adsi module
Matthew Jordan [Tue, 26 Jun 2012 13:23:12 +0000 (13:23 +0000)]
Fix crash in unloading of res_adsi module

When res_adsi is unloaded, it removes the ADSI functions that it previously installed
by passing a NULL adsi_funcs pointer to ast_adsi_install_funcs.  This function was not
checking whether or not the adsi_funcs pointer passed in was NULL before dereferencing
it to check whether or not the version of the functions matches what the core was
expecting it.

This patch makes it so that the version is only checked if a potentially valid adsi_funcs
pointer was passed in.  Passing in NULL removes the installed functions, bypassing the
version check.
........

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

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

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

7 years agoUpdate "manager show event" to support tab completion
Matthew Jordan [Mon, 25 Jun 2012 20:43:26 +0000 (20:43 +0000)]
Update "manager show event" to support tab completion

Thank you rmudgett for pointing out that I was missing this in the initial
check-in for AMI event documentation (r369346)

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

7 years agoFix incorrect duration reporting in CDRs created in batch mode
Matthew Jordan [Mon, 25 Jun 2012 19:39:03 +0000 (19:39 +0000)]
Fix incorrect duration reporting in CDRs created in batch mode

Certain places in core/cdr.c would, if the duration value were 0, calculate the
duration as being the delta between the current time and the time at which the
CDR record was started.  While this does not typically cause a problem in
non-batch mode, this can cause an issue in batch mode where CDR records are
gathered and written long after those calls have ended. In particular, this
affects calls that were never answered, as those are expected to have a duration
of 0.  Often, this would result in CDR logs with a significant number of calls
with lengthy durations, but dispositions of "BUSY".

Note that this does not affect cdr_csv, as that backend does not use
ast_cdr_getvar and instead directly reports the duration value.  The affected
core backends include cdr_apative_odbc and cdr_custom; other extended or
deprecated CDR backends may potentially still directly manipulate the duration
values.

(issue ASTERISK-19860)
Reported by: Thomas Arimont

(issue AST-883)
Reported by: Thomas Arimont
Tested by: Matt Jordan

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

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

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

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

7 years agoRe-fix how local tag is generated when sending a 481 to an INVITE.
Mark Michelson [Mon, 25 Jun 2012 19:26:31 +0000 (19:26 +0000)]
Re-fix how local tag is generated when sending a 481 to an INVITE.

Match our local tag to whatever to-tag was sent in the initial INVITE.
Because the size of the to-tag may not fit in the buffer in the sip_pvt,
it has been changed to a string field.

(closes issue ASTERISK-19892)
reported by Walter Doekes

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

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

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

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

7 years agoAdd AMI event documentation
Matthew Jordan [Mon, 25 Jun 2012 17:59:34 +0000 (17:59 +0000)]
Add AMI event documentation

This patch adds the core changes necessary to support AMI event documentation
in the source files of Asterisk, and adds documentation to those AMI events
defined in the core application modules.  Event documentation is built from
the source by two new python scripts, located in build_tools:
get_documentation.py and post_process_documentation.py.

The get_documentation.py script mirrors the actions of the existing AWK
get_documentation scripts, except that it will scan the entirety of a source
file for Asterisk documentation.  Upon encountering it, if the documentation
happens to be an AMI event, it will attempt to extract information about the
event directly from the manager event macro calls that raise the event.  The
post_process_documentation.py script combines manager event instances that
are the same event but documented in multiple source files.  It generates
the final core-[lang].xml file.

As this process can take longer to complete than a typical 'make all', it
is only performed if a new make target, 'full', is chosen.

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

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

7 years agoFix Bridge application occasionally returning to the wrong location.
Richard Mudgett [Mon, 25 Jun 2012 16:07:02 +0000 (16:07 +0000)]
Fix Bridge application occasionally returning to the wrong location.

* Fix do_bridge_masquerade() getting the resume location from the zombie
channel.  The code must not touch a clone channel after it has masqueraded
it.  The clone channel has become a zombie and is starting to hangup.

(closes issue ASTERISK-19985)
Reported by: jamicque
Patches:
      jira_asterisk_19985_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: jamicque
........

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

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

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

7 years agoMultiple revisions 369323-369324
Mark Michelson [Mon, 25 Jun 2012 15:55:25 +0000 (15:55 +0000)]
Multiple revisions 369323-369324

........
  r369323 | mmichelson | 2012-06-25 10:35:43 -0500 (Mon, 25 Jun 2012) | 9 lines

  Eliminate embedding of res_adsi.so module.

  The way this is done is to stop using the optional API.
  Instead, res_adsi.so, when loaded fills in a table of
  function pointers.

  Review: https://reviewboard.asterisk.org/r/1991
........
  r369324 | mmichelson | 2012-06-25 10:50:17 -0500 (Mon, 25 Jun 2012) | 2 lines

  Forgot to svn add this file in my last commit.
........

Merged revisions 369323-369324 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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

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

7 years agoBe more consistent with the return code for requests received from invalid domain.
Mark Michelson [Mon, 25 Jun 2012 14:30:19 +0000 (14:30 +0000)]
Be more consistent with the return code for requests received from invalid domain.

When Asterisk receives an INVITE from an external domain when allowexternaldomains=no
send a 403 instead of a 404. This is consistent with Asterisk's behavior when receiving
a REGISTER in this situation.

(Closes issue ASTERISK-19601)
Reported by Matthew Jordan
Patches:
ASTERISK-19601-no401.patch uploaded by Mark Michelson (License #5049)
........

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

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

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

7 years agoFix F and F(x) action logic in Bridge application.
Richard Mudgett [Sat, 23 Jun 2012 00:33:41 +0000 (00:33 +0000)]
Fix F and F(x) action logic in Bridge application.

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

7 years agoFix Bridge application and AMI Bridge action error handling.
Richard Mudgett [Sat, 23 Jun 2012 00:29:18 +0000 (00:29 +0000)]
Fix Bridge application and AMI Bridge action error handling.

* Fix AMI Bridge action disconnecting the AMI link on error.

* Fix AMI Bridge action and Bridge application not checking if their
masquerades were successful.

* Fix Bridge application running the h-exten when it should not.

* Made do_bridge_masquerade() return if the masquerade was successful so
the Bridge application and AMI Bridge action could deal with it correctly.

* Made bridge_call_thread_launch() hangup the passed in channels if the
bridge_call_thread fails to start.  Those channels would have been
orphaned.

* Made builtin_atxfer() check the success of the transfer masquerade
setup.
........

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

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

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

7 years agoExplicitly check caller hangup in app Queue rather than a polluted res2 value.
Richard Mudgett [Fri, 22 Jun 2012 22:12:06 +0000 (22:12 +0000)]
Explicitly check caller hangup in app Queue rather than a polluted res2 value.
........

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

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

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

7 years agoFix F and F(x) action logic in Queue application.
Richard Mudgett [Fri, 22 Jun 2012 21:51:05 +0000 (21:51 +0000)]
Fix F and F(x) action logic in Queue application.

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

7 years agoCheck if PBX was started and fix F and F(x) action logic in Dial application.
Richard Mudgett [Fri, 22 Jun 2012 21:43:44 +0000 (21:43 +0000)]
Check if PBX was started and fix F and F(x) action logic in Dial application.
........

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

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

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

7 years agoCheck if PBX was started for generic CCSS recall.
Richard Mudgett [Fri, 22 Jun 2012 21:06:36 +0000 (21:06 +0000)]
Check if PBX was started for generic CCSS recall.
........

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

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

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

7 years agoChange incorrect chan_sip zombie hangup debug message. They are all zombies now.
Richard Mudgett [Fri, 22 Jun 2012 20:52:54 +0000 (20:52 +0000)]
Change incorrect chan_sip zombie hangup debug message.  They are all zombies now.
........

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

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

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