asterisk/asterisk.git
7 years agoReduce memory consumption significantly for users of the RTP engine API by storing...
Joshua Colp [Tue, 7 Aug 2012 13:07:58 +0000 (13:07 +0000)]
Reduce memory consumption significantly for users of the RTP engine API by storing only the payloads present and in use instead of every possible one.

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

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

7 years agoAdd named callgroups/pickupgroups
Matthew Jordan [Tue, 7 Aug 2012 12:46:36 +0000 (12:46 +0000)]
Add named callgroups/pickupgroups

This patch adds named calledgroups/pickupgroups to Asterisk.  Named groups are
implemented in parallel to the existing numbered callgroup/pickupgroup
implementation.  However, unlike the existing implementation, which is limited
to a maximum of 64 defined groups, the number of defined groups allowed for
named callgroups/pickupgroups is effectively unlimited.

Named groups are configured with the keywords "namedcallgroup" and
"namedpickupgroup".  This corresponds to the numbered group definitions of
"callgroup" and "pickupgroup".  Note that as the implementation of named groups
coexists with the existing numbered implementation, a defined named group of
"4" does not equate to numbered group 4.

Support for the named groups has been added to the SIP, DAHDI, and mISDN channel
drivers.

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

Uploaded by:
Guenther Kelleter(license #6372)

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

7 years agoRevert r370820
Matthew Jordan [Mon, 6 Aug 2012 17:04:40 +0000 (17:04 +0000)]
Revert r370820

That change is wrong, wrong, wrong.

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

7 years agoUpdate the MySQL voicemail_data contrib script to reflect Asterisk 11 changes
Matthew Jordan [Mon, 6 Aug 2012 17:00:28 +0000 (17:00 +0000)]
Update the MySQL voicemail_data contrib script to reflect Asterisk 11 changes

All voicemails now have a 'msg_id' included in their metadata.  The ODBC
message storage backend now requires this column; as such, the MySQL contrib
script that creates the voicemail_data table has been updated with the appropriate
column information.

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

7 years agoImprove debug message for temporary outbound proxies.
Mark Michelson [Mon, 6 Aug 2012 15:18:18 +0000 (15:18 +0000)]
Improve debug message for temporary outbound proxies.

Thanks to Paul Belanger for pointing this out.
........

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

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

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

7 years agoMultiple revisions 370769-370771
Mark Michelson [Fri, 3 Aug 2012 21:52:57 +0000 (21:52 +0000)]
Multiple revisions 370769-370771

........
  r370769 | mmichelson | 2012-08-03 16:35:00 -0500 (Fri, 03 Aug 2012) | 24 lines

  Fix error in the "IPorHost" section of a SIP dialstring.

  This is based on the review request posted by Walter Doekes
  (referenced lower in the commit message)

  The main fix here is to treat the IPorHost portion of the dial
  string as a temporary outbound proxy. This ensures requests
  get sent to the proper location.

  Due to the age of the request, some parts were no longer relevant.
  For instance, the request moved outbound proxy parsing code into
  a single method. This is done in a previous commit, so it was not
  necessary to do again.

  Also, the review request fixed some errors with regards to request
  routing for CANCEL and ACK requests. This has also been fixed in
  more recent commits.

  (closes issue ASTERISK-19677)
  reported by Walter Doekes

  Review https://reviewboard.asterisk.org/r/1859
........
  r370770 | mmichelson | 2012-08-03 16:39:35 -0500 (Fri, 03 Aug 2012) | 3 lines

  Remove unused variable.
........
  r370771 | mmichelson | 2012-08-03 16:43:52 -0500 (Fri, 03 Aug 2012) | 5 lines

  Seriously? Another compilation error fixed.

  Somebody beat me.
........

Merged revisions 370769-370771 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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

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

7 years agoFix regression from r370636
Kinsey Moore [Thu, 2 Aug 2012 15:51:17 +0000 (15:51 +0000)]
Fix regression from r370636

When the chan_sip cleanup went in, a typo was included that caused some
subscriptions of non-Polycom phones to be limited to the same
capabilities as Polycom phones. This resolves the failures in the test
suite resulting from this regression.

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

7 years agoFix a possible crash due to passing NULL to ast_variables_dup()
Mark Michelson [Wed, 1 Aug 2012 19:37:03 +0000 (19:37 +0000)]
Fix a possible crash due to passing NULL to ast_variables_dup()

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

7 years agoMake astobj2.h not include linkedlists.h.
Richard Mudgett [Wed, 1 Aug 2012 18:52:29 +0000 (18:52 +0000)]
Make astobj2.h not include linkedlists.h.

Using astobj2 does not require linkedlists.h be included even though
astob2 uses linked lists internally.

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

7 years agoRevert alloca changes for utils
Kinsey Moore [Wed, 1 Aug 2012 02:26:53 +0000 (02:26 +0000)]
Revert alloca changes for utils

These changes were a tad overzealous in the utils directory.
Unfortunately, these don't compile with a "make".
........

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

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

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

7 years agoAdd headers from SIPAddHeader to outbound REFER requests.
Mark Michelson [Tue, 31 Jul 2012 22:28:16 +0000 (22:28 +0000)]
Add headers from SIPAddHeader to outbound REFER requests.

This is a patch from kkm from review board.

This is useful for adding headers to REFER requests that
emanate from a Transfer() dialplan application call.

This also fixes some uses of the Referred-by header, removing
an extra set of angle brackets.

I've modified the reporter's original patch to not require
any additions to the sip_refer header and to just remove the
referred_by_name from sip_refer since it is no longer needed
or used.

(closes Issue ASTERISK-17639)
reported by Kirill Katsnelson
Patches:
019059-sip-refer-addheaders-trunk-353549.diff
uploaded by Kirill Katsnelson (license #5845)

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

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

7 years agoAdd "setvar" option to manager.conf.
Mark Michelson [Tue, 31 Jul 2012 21:21:57 +0000 (21:21 +0000)]
Add "setvar" option to manager.conf.

With this option set, channel variables can be set on
every manager originate. The Variable header can still
be used to set additional channel variables for individual
calls if desired.

This work was completed by Olle Johansson on review board.
I have applied the review feedback and am committing it in
order to get this into trunk before Asterisk 11 is branched.

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

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

7 years agoSchedule pokes of registered SIP peers within a given timespan after SIP reload
Matthew Jordan [Tue, 31 Jul 2012 21:20:59 +0000 (21:20 +0000)]
Schedule pokes of registered SIP peers within a given timespan after SIP reload

With a large number of SIP peers registered, performing a SIP reload causes a
flood of SIP OPTIONS request packets.  These are immediately sent out, and, as
responses come back, can cause peers to be flagged as 'lagged' due to handling
of the many response messages.

This fix prevents this "packet storm" and schedules the pokes for a random
time.  That time varies between 1 ms and the peer's qualify time, or, if
the qualify time is unknown, the global qualifyfreq setting.

The committed patch has some very small modifications to the patch schmidts
wrote for the review.

(closes issue ASTERISK-19154)
Reported by: Nicolo Mazzon
patches:
  issue19154.patch license #6034 uploaded by schmidts

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

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

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

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

7 years agoMove event cache updates into event processing thread.
Russell Bryant [Tue, 31 Jul 2012 20:33:57 +0000 (20:33 +0000)]
Move event cache updates into event processing thread.

Prior to this patch, updating the device state cache was done by the thread
that originated the event.  It would update the cache and then queue the event
up for another thread to dispatch.  This thread moves the cache updating part
to be in the same thread as event dispatching.

I was working with someone on a heavily loaded Asterisk system and while
reviewing backtraces of the system while it was having problems, I noticed that
there were a lot of threads contending for the lock on the event cache.  By
simply moving this into a single thread, this helped performance *a lot* and
alleviated some deadlock-like symptoms.

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

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

7 years agoClean up and ensure proper usage of alloca()
Kinsey Moore [Tue, 31 Jul 2012 20:21:43 +0000 (20:21 +0000)]
Clean up and ensure proper usage of alloca()

This replaces all calls to alloca() with ast_alloca() which calls gcc's
__builtin_alloca() to avoid BSD semantics and removes all NULL checks
on memory allocated via ast_alloca() and ast_strdupa().

(closes issue ASTERISK-20125)
Review: https://reviewboard.asterisk.org/r/2032/
Patch-by: Walter Doekes (wdoekes)
........

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

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

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

7 years agoAdd "dialplan remove context" and modify "dialplan add include"
Mark Michelson [Tue, 31 Jul 2012 19:57:21 +0000 (19:57 +0000)]
Add "dialplan remove context" and modify "dialplan add include"

From corruptor's review board posting:

"I've noticed that we can remove particular extension from context with
dialplan remove extension command but in order to remove all extensions
in the context we should delete them on by one. I've created dialplan
remove context command which uses ast_context_destroy to destroy the
whole context with all extensions. I've created to functions for in
pbx_config.c: handle_cli_dialplan_remove_context which actually removes
context and complete_dialplan_remove_context which completes input.
They are based on other similar functions and pretty trivial but I can be
mistaken somewhere.

"I've also modified dialplan add include <context2> into <context1>. I've
made it similar dialplan add extension ... command. It creates <context1>
if it doesn't exist and I've also modified complete_dialplan_add_include
and removed check for existance of <context2> because we can include
non-existent context into another one. (I usually include empty
(non-existent) contexts in advance). Should we raise warning in this case
as it's raised while reading extensions.conf?

"I use those functions with AMI. I think manager commands should be created
in addition to those CLI commands."

I've addressed the latest comments on review board and have made some other
coding guidelines-related cleanup. I also have modified the CHANGES file to
mention these new commands.

(closes issue ASTERISK-19292)
reported by Andrey Solovyev

Patches:
dialplan_add_include.patch
    uploaded by Andrey Solovyev (license #5214)
    dialplan_remove_context.patch
    uploaded by Andrey Solovyev (license #5214)

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

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

7 years agoClean up chan_sip
Kinsey Moore [Tue, 31 Jul 2012 19:10:41 +0000 (19:10 +0000)]
Clean up chan_sip

This clean up was broken out from
https://reviewboard.asterisk.org/r/1976/ and addresses the following:
 - struct sip_refer converted to use the stringfields API.
 - sip_{refer|notify}_allocate -> sip_{notify|refer}_alloc to match
   other *alloc functions.
 - Replace get_msg_text, get_msg_text2 and get_pidf_body -> No, not
   get_pidf_msg_text_body3 but get_content, to match add_content.
 - get_body doesn't get the request body, renamed to get_content_line.
 - get_body_by_line doesn't get the body line, and is just a simple if
   test. Moved code inline and removed function.
 - Remove camelCase in struct sip_peer peer state variables,
   onHold -> onhold, inUse -> inuse, inRinging -> ringing.
 - Remove camelCase in struct sip_request rlPart1 -> rlpart1,
   rlPart2 -> rlpart2.
 - Rename instances of pvt->randdata to pvt->nonce because that is what
   it is, no need to update struct sip_pvt because _it already has a
   nonce field_.
 - Removed struct sip_pvt randdata stringfield.
 - Remove useless (and inconsistent) 'header' suffix on variables in
   handle_request_subscribe.
 - Use ast_strdupa on Event header in handle_request_subscribe to avoid
   overly complicated strncmp calls to find the event package.
 - Move get_destination check in handle_request_subscribe to avoid
   duplicate checking for packages that don't need it.
 - Move extension state callback management in handle_request_subscribe
   to avoid duplicate checking for packages that don't need it.
 - Remove duplicate append_date prototype.
 - Rename append_date -> add_date to match other add_xxx functions.
 - Added add_expires helper function, removed code that manually added
   expires header.
 - Remove _header suffix on add_diversion_header (no other header adding
   functions have this).
 - Don't pass req->debug to request handle_request_XXXXX handlers if req
   is also being passed.
 - Don't pass req->ignore to check_auth as req is already being passed.
 - Don't create a subscription in handle_request_subscribe if
   p->expiry == 0.
 - Don't walk of the back of referred_by_name when splitting string in
   get_refer_info
 - Remove duplicate check for no dialog in handle_incoming when
   sipmethod == SIP_REFER, handle_request_refer checks for that.

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

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

7 years agoTweak unit test warning message.
Richard Mudgett [Mon, 30 Jul 2012 23:26:51 +0000 (23:26 +0000)]
Tweak unit test warning message.

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

7 years agoFix some presence-state unit test typos.
Richard Mudgett [Mon, 30 Jul 2012 23:18:13 +0000 (23:18 +0000)]
Fix some presence-state unit test typos.

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

7 years agoDECLINE to load confbridge if the config fails to load.
Richard Mudgett [Mon, 30 Jul 2012 20:27:39 +0000 (20:27 +0000)]
DECLINE to load confbridge if the config fails to load.

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

7 years agoRelease B channel allocation on error path in chan_misdn.
Richard Mudgett [Mon, 30 Jul 2012 16:57:41 +0000 (16:57 +0000)]
Release B channel allocation on error path in chan_misdn.
........

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

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

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

7 years agoapp_meetme: Change app_meetme support level to extended from deprecated
Jonathan Rose [Mon, 30 Jul 2012 14:52:02 +0000 (14:52 +0000)]
app_meetme: Change app_meetme support level to extended from deprecated

(closes issue ASTERISK-20134)
Reported by: Leif Madsen
........

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

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

7 years agoFix ast_event_new unit test.
Russell Bryant [Mon, 30 Jul 2012 13:45:42 +0000 (13:45 +0000)]
Fix ast_event_new unit test.

One of my recent commits broke this test.  The error was:

[test_event.c:event_new_test:214]: Events expected to be identical
have different size: 69 != 59

The difference in size occurred because the first event had
the EID IE added to the event twice.  ast_event_new() now always
adds it automatically.  Previously it only added it if there
were no IEs specified, which was kind of weird.

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

7 years agoAdd a "corosync ping" CLI command.
Russell Bryant [Mon, 30 Jul 2012 00:14:18 +0000 (00:14 +0000)]
Add a "corosync ping" CLI command.

This patch adds a new CLI command to the res_corosync module.  It is primarily
used as a debugging tool.  It lets you fire off an event which will cause
res_corosync on other nodes in the cluster to place messages into the logger if
everything is working ok.  It verifies that the corosync communication is
working as expected.

I didn't put anything in the CHANGES file for this, because this module is new
in Asterisk 11.  There is already a generic "res_corosync new module" entry in
there so I figure that covers it just fine.

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

7 years agoAllow specifying a port number for the MySQL server.
Russell Bryant [Mon, 30 Jul 2012 00:05:25 +0000 (00:05 +0000)]
Allow specifying a port number for the MySQL server.

This patch allows you to specify a port number for the MySQL server.
It's useful if a MySQL server is running on a non-standard port.
Even though this module is deprecated in favor of func_odbc, someone
asked for this feature and it seems pretty harmless to add.

It has been tested using a number of combinations of with/without a
port number specified in the dialplan and changing the port number
 for mysqld.

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

7 years agochan_sip: Add SIPpeerstatus command to AMI
Jonathan Rose [Thu, 26 Jul 2012 15:31:05 +0000 (15:31 +0000)]
chan_sip: Add SIPpeerstatus command to AMI

This patch was submitted by mnicholson a while back. It adds a new AMI action
which allows users to request SIP peer status on demand similar to existing
PeerStatus events and to the output you would see from CLI with sip show peer

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

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

7 years agores_agi: Add message indicating need for \n character in verbose message
Jonathan Rose [Wed, 25 Jul 2012 21:22:34 +0000 (21:22 +0000)]
res_agi: Add message indicating need for \n character in verbose message

The while loop responsible for reading AGI messages from a fastAGI service
can end up looping indefinitely when an AGI script fails to indicate the end
of a message with a \n character. This patch adds an indication that we are
expecting a \n character to end the message to make it more clear to users
that this is necessary if they are receiving this warning over and over.

(issue ASTERISK-20061)
Reported by: Eike Kuiper
........

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

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

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

7 years agoRepair editline builds using in-tree editline sources.
Kevin P. Fleming [Wed, 25 Jul 2012 14:27:48 +0000 (14:27 +0000)]
Repair editline builds using in-tree editline sources.

The previous change to the build system for using a system-provided editline
library was missing a crucial include directory for building against the
copy of the library in the Asterisk source tree.

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

7 years agoUse an absolute path when referring to the embedded editline directory.
Kevin P. Fleming [Wed, 25 Jul 2012 12:37:58 +0000 (12:37 +0000)]
Use an absolute path when referring to the embedded editline directory.

This patch changes the build system to refer to the embedded editline directory
using an absolute path, which will resolve a problem seen on the CentOS
automated build agents.

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

7 years agoEnable usage of system-provided NetBSD editline library if available.
Kevin P. Fleming [Wed, 25 Jul 2012 12:21:54 +0000 (12:21 +0000)]
Enable usage of system-provided NetBSD editline library if available.

This patch changes the Asterisk configure script and build system to detect
the presence of the NetBSD editline library (libedit) on the system. If it is
found, it will be used in preference to the version included in the Asterisk
source tree.

(closes issue ASTERISK-18725)
Reported by: Jeffrey C. Ollie
Review: https://reviewboard.asterisk.org/r/1528/
Patches:
  0001-Allow-linking-building-against-an-external-editline.patch uploaded by jcollie (license #5373) (heavily modified by kpfleming)

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

7 years agoRevert a change that broke compilation
Terry Wilson [Wed, 25 Jul 2012 03:51:28 +0000 (03:51 +0000)]
Revert a change that broke compilation

1) There is no such function as ast_ref()
2) The patch was originally credited as the one uploaded by Guenther
   Kelleter (license 6372) via issue AST-921, but the patch committed
   was not the patch referenced on the issue.
3) Guenther Kelleter's patch was actually correct. It moved the
   ast_free above the presencechange_cleanup label. I am not
   committing his change as it is not technically necesary--calling
   ast_free(NULL) is perfectly safe and I worry that moving the
   ast_free outside of the label could lead to future bugs if
   someone ever adds another failure conditional and expects
   'goto presencechange_cleanup;' to clean up after everything.

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

7 years agoDon't attempt free of NULL ptr in pbx.c handle_presencechange
Jonathan Rose [Tue, 24 Jul 2012 21:30:21 +0000 (21:30 +0000)]
Don't attempt free of NULL ptr in pbx.c handle_presencechange

(closes issue AST-921)
Reported by: Guenther Kelleter
Patches:
    nullptr.patch uploaded by Guenther Kelleter (license 6372)

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

7 years agoSilence a warning message from older versions of GCC.
Kevin P. Fleming [Tue, 24 Jul 2012 19:12:09 +0000 (19:12 +0000)]
Silence a warning message from older versions of GCC.

Revision 370426 introduced the use of a nested function in tests/test_acl.c,
but the lack of the 'auto' scope specifier on the function and a forward
declaration resulted in compilation errors on the automated test systems.

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

7 years agochan_oss: fix "sample rate" error message
Tzafrir Cohen [Tue, 24 Jul 2012 17:16:40 +0000 (17:16 +0000)]
chan_oss: fix "sample rate" error message

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

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

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

7 years agoRewrite a comment that didn't adequately explain the code it was documenting.
Kevin P. Fleming [Tue, 24 Jul 2012 16:54:26 +0000 (16:54 +0000)]
Rewrite a comment that didn't adequately explain the code it was documenting.
........

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

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

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

7 years agoUpdate CHANGES for list/negation ACL feature.
Kevin P. Fleming [Tue, 24 Jul 2012 16:48:45 +0000 (16:48 +0000)]
Update CHANGES for list/negation ACL feature.

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

7 years agoAllow permit/deny ACL lines to contain multiple items and negated entries.
Kevin P. Fleming [Tue, 24 Jul 2012 16:47:33 +0000 (16:47 +0000)]
Allow permit/deny ACL lines to contain multiple items and negated entries.

Rules in ACLs (specified using 'permit' and 'deny') can now contain multiple
items (separated by commas), and items in the rule can be negated by prefixing
them with '!'. This simplifies Asterisk Realtime configurations, since it is no
longer necessray to control the order that the 'permit' and 'deny' columns are
returned from queries.

Review: https://reviewboard.asterisk.org/r/1592/
Initial patch contributed by Tilghman Lesher
Unit tests written by Kevin P. Fleming

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

7 years agoBuild is underway so logging can go away.
Joshua Colp [Tue, 24 Jul 2012 16:15:30 +0000 (16:15 +0000)]
Build is underway so logging can go away.

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

7 years agoTemporarily enable pj logging to console for debugging pjnath issue exposed by build...
Joshua Colp [Tue, 24 Jul 2012 16:09:39 +0000 (16:09 +0000)]
Temporarily enable pj logging to console for debugging pjnath issue exposed by build slave.

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

7 years agoRemove code, that operate with cdr in attempt_transfer(). That was removed somewhere...
Igor Goncharovskiy [Tue, 24 Jul 2012 08:53:01 +0000 (08:53 +0000)]
Remove code, that operate with cdr in attempt_transfer(). That was removed somewhere between 1.2 and 1.4 and acidentaly put back in chan_unistim.

(closes issue ASTERISK-19628)
Reported by: Igor Olhovskiy

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

7 years agoEnable usage of system-provided iLBC library.
Kevin P. Fleming [Mon, 23 Jul 2012 21:27:56 +0000 (21:27 +0000)]
Enable usage of system-provided iLBC library.

The WebRTC version of the iLBC codec is now package as a library and is
available on some platforms. This patch allows codec_ilbc to be built against
that library if it is present.

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

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

7 years agoUnit tests for the Jitter Buffer API; remove unnecessary resync
Matthew Jordan [Mon, 23 Jul 2012 21:15:26 +0000 (21:15 +0000)]
Unit tests for the Jitter Buffer API; remove unnecessary resync

This patch includes the following:
* Unit tests for the abstract Jitter Buffer API.  This includes both fixed
  and adaptive flavors, testing nominal creation, frame input, frame retrieval,
  resyncing; off nominal frame input overflow, out of order, and others.
* Tweaks to the abstract_jb API to remove the unnecessary resync_threshold
  parameter from the create function (resync_threshold is already in the
  struct passed into the create function)
* Ensure the fixed jitter buffer is empty before destroying it, to avoid an
  ASSERT
* Don't "resync" the adaptive jitter buffer.  The mechanism that was being
  used actually causes the jitter buffer to think its being overflowed by going
  around the jitterbuf API and attempting to 'resynch' it improperly.  If a
  resync is needed, the jitter buffer will do it properly by itself.  Note that
  this is only an optimization needed for trunk, as the worst that happens is
  the loss of three voice packets before the adaptive jitter buffer will resync
  anyway.

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

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

7 years agoAdd separate configuration options for subscription and registration minexpiry and...
Mark Michelson [Mon, 23 Jul 2012 21:10:54 +0000 (21:10 +0000)]
Add separate configuration options for subscription and registration minexpiry and maxexpiry.

This offers more fine-grained control over how long subscriptions last without negatively
affecting the expiration range for registrations.

Uploaded by:
Guenther Kelleter(license #6372)

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

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

7 years agoImprove documentation for the SHELL() dialplan function.
Kevin P. Fleming [Mon, 23 Jul 2012 21:10:27 +0000 (21:10 +0000)]
Improve documentation for the SHELL() dialplan function.
........

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

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

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

7 years agoAdd notes to UPGRADE.txt about addition of msg_id to VoiceMails.
Mark Michelson [Mon, 23 Jul 2012 21:02:52 +0000 (21:02 +0000)]
Add notes to UPGRADE.txt about addition of msg_id to VoiceMails.

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

7 years agoBlocked revisions 370361
Kevin P. Fleming [Mon, 23 Jul 2012 14:51:45 +0000 (14:51 +0000)]
Blocked revisions 370361

........
Free any datastores attached to dummy channels.

Revision 370205 added the use of a datastore attached to a dummy channel to
resolve a memory leak, but ast_dummy_channel_destructor() in this branch did
not free datastores, resulting in a continued (but slightly smaller) memory
leak. This patch backports the change to free said datastores from the Asterisk
trunk.

(related to issue AST-916)
........

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

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

7 years agoUpdate UPGRADE.txt with notes about ICE support and res_xmpp.
Joshua Colp [Mon, 23 Jul 2012 00:15:39 +0000 (00:15 +0000)]
Update UPGRADE.txt with notes about ICE support and res_xmpp.

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

7 years agoUpdate CHANGES for Asterisk 11
Matthew Jordan [Sun, 22 Jul 2012 23:37:00 +0000 (23:37 +0000)]
Update CHANGES for Asterisk 11

This updates the CHANGES file with things that were committed for
Asterisk 11, but were not noted in that file.

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

7 years agoPrevent multiple local candidates from being added with the same information and...
Joshua Colp [Sun, 22 Jul 2012 17:03:24 +0000 (17:03 +0000)]
Prevent multiple local candidates from being added with the same information and add support for disabling ICE on a per-peer basis.

(closes issue ASTERISK-20088)
Reported by: wimpy

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

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

7 years agoFix segfault introduced by conversion to ACO API
Terry Wilson [Sat, 21 Jul 2012 13:25:26 +0000 (13:25 +0000)]
Fix segfault introduced by conversion to ACO API

The value "none" is specified in the config file as a valid value for
the "video_mode" option. The code prior to the ACO conversion did not
check for "none", but just ignored it and relied on the default zero
value. The parsing with ACO is more strict, so without handling
"none" specifically, parsing would fail.

When parsing failed, but the module loaded anyway, the config info
would never be stored, and one place in the code did not check for
this case and would segfault. It was also possible that the
aco_info struct's internals would be destroyed and used as well.

This patch keeps the module from loading after parse failures, adds
the "none" option to "video_mode", registers CLI functions only
after parsing has completed, checks the config data for NULL before
accessing it, and returns -1 on some allocation failures when
initializing.

(closes issue ASTERISK-20159)
Reported by: Birger "WIMPy" Harzenetter
Tested by: Birger "WIMPy" Harzenetter
Patches:
    confbridge_fix3.txt uploaded by Terry Wilson

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

7 years agochan_iax2: Fix a segfault introduced by call ID logging
Jonathan Rose [Fri, 20 Jul 2012 19:36:05 +0000 (19:36 +0000)]
chan_iax2: Fix a segfault introduced by call ID logging

Didn't previously check that a non NULL IAX channel was stored in the array
at the requested position before attempting iax_pvt_callid_get

(closes issue ASTERISK-20145)
Reported by: Birger "WIMPy" Harzenetter

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

7 years agoClean up ManagerEvent Dial documentation
Matthew Jordan [Fri, 20 Jul 2012 19:08:47 +0000 (19:08 +0000)]
Clean up ManagerEvent Dial documentation

The paragraph describing the SubEvent belongs with the SubEvent parameter
itself, and not with its enum values.  The order of parsing was placing
the description after the last enum, which isn't correct.

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

7 years agoFix build error in chan_misdn from commit 370316
Kinsey Moore [Fri, 20 Jul 2012 18:37:44 +0000 (18:37 +0000)]
Fix build error in chan_misdn from commit 370316

chan_misdn was not updated properly to account for a change in
parameters for HANGUPCAUSE functionality. It now builds properly.

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

7 years agoExport the ast_websocket_set_nonblock function for use by other modules.
Joshua Colp [Fri, 20 Jul 2012 16:25:01 +0000 (16:25 +0000)]
Export the ast_websocket_set_nonblock function for use by other modules.

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

7 years agoAdd hangupcause translation support
Kinsey Moore [Fri, 20 Jul 2012 15:48:55 +0000 (15:48 +0000)]
Add hangupcause translation support

The HANGUPCAUSE hash (trunk only) meant to replace SIP_CAUSE has now
been replaced with the HANGUPCAUSE and HANGUPCAUSE_KEYS dialplan
functions to better facilitate access to the AST_CAUSE translations
for technology-specific cause codes. The HangupCauseClear application
has also been added to remove this data from the channel.

(closes issue SWP-4738)
Review: https://reviewboard.asterisk.org/r/2025/

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

7 years agoUpdate CHANGES about adding the AccountCode header to the AMI Hangup event.
Richard Mudgett [Fri, 20 Jul 2012 15:40:19 +0000 (15:40 +0000)]
Update CHANGES about adding the AccountCode header to the AMI Hangup event.

(issue ASTERISK-19963)

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

7 years agoAdd the AccountCode header to the AMI Hangup event.
Richard Mudgett [Fri, 20 Jul 2012 01:15:55 +0000 (01:15 +0000)]
Add the AccountCode header to the AMI Hangup event.

It's harder to correlate the Newchannel and Hangup AMI events without
specifying "AccountCode" in both.

(closes issue ASTERISK-19963)
Reported by: Oleg A. Arkhangelsky
Patches:
      hangup_acctcode.diff (license #6397) patch uploaded by Oleg A. Arkhangelsky

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

7 years agoConvert app_confbridge to use the config options framework
Terry Wilson [Thu, 19 Jul 2012 23:21:40 +0000 (23:21 +0000)]
Convert app_confbridge to use the config options framework

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

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

7 years agoFix compiler warnings.
Richard Mudgett [Thu, 19 Jul 2012 22:25:00 +0000 (22:25 +0000)]
Fix compiler warnings.

gcc (GCC) 4.2.4 has problems casting away constness.
........

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

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

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

7 years agoAdd the ability to specify technology specific documentation
Matthew Jordan [Thu, 19 Jul 2012 22:17:13 +0000 (22:17 +0000)]
Add the ability to specify technology specific documentation

A number of applications/AMI commands in Asterisk have specific behavioral
differences depending on the resource or channel technology those
applications are executed on.  For example, the MessageSend application/
command is technology agnostic, but how the channel drivers that support
that functionality behave is dependant on the protocols and channel
driver implementation.  Prior to this patch, those details were either
documented in the application/command documentation itself, or were left
undocumented.

This patch adds a new element to the documentation schema, <info/>.  An info
node is essentially a piece of technology specific reference information that
can be included by any top level XML documentation node.  For example, the
MessageSend application can now include XMPP/SIP specific information, where
that technology specific information can be defined in chan_motif/res_xmpp/
chan_sip.  Likewise, that information can also be included in the MessageSend
AMI command.

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

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

7 years agoFix compilation error when MALLOC_DEBUG is enabled
Matthew Jordan [Thu, 19 Jul 2012 22:08:20 +0000 (22:08 +0000)]
Fix compilation error when MALLOC_DEBUG is enabled

To fix a memory leak in CEL, a channel datastore was introduced whose
destruction function pointer was pointed to the ast_free macro.  Without
MALLOC_DEBUG enabled this compiles as fine, as ast_free is defined as free.
With MALLOC_DEBUG enabled, however, ast_free takes on a definition from a
different place then utils.h, and became undefined.  This patch resolves this
by using a reference to ast_free_ptr.  When MALLOC_DEBUG is enabled, this
calls ast_free; when MALLOC_DEBUG is not enabled, this is defined to be
ast_free, which is defined to be free.

(issue AST-916)
Reported by: Thomas Arimont
........

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

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

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

7 years agoHandle extremely out of order RFC 2833 DTMF
Matthew Jordan [Thu, 19 Jul 2012 21:45:20 +0000 (21:45 +0000)]
Handle extremely out of order RFC 2833 DTMF

The current implementation of RFC 2833 DTMF handling in res_rtp_asterisk will,
if a packet arrives out of order, drop the packet.  This is to prevent
duplicate ton generation in the Asterisk core.  Since the RTP layer does not
buffer data itself, this is the only option the RTP layer currently has for
handling packets that arrive out of order.

For the most part, this doesn't matter.  For a particular digit, so long as a
BEGIN packet arrives before the first END packet, the digit will be produced.
If subsequent BEGIN packets arrive interleaved with the ENDs, they will be
dropped; likewise, if the BEGIN or END packets themselves are out of order,
those packets are dropped but sufficient information is conveyed to the
Asterisk core to produce the appropriate digit.

For certain sequences of DTMF packets - most notably when, for a particular
digit, an END packet arrives before any BEGIN packet for that digit - this
is a real problem.  When an END arrives before any BEGINs, the END packet is
dropped - but at the same time, it causes subsequent BEGIN packets for that
digit to be ignored.  When the next in order END packet arrives, it too is
dropped - Asterisk believes that there was no initial BEGIN.

The solution this patch provides is to trust the END packet to convey the
information needed for the Asterisk core to produce the DTMF digit.  If we
receive an END packet, and it:
  * Has a timestamp greater then the last timestamp received from an END
    packet
  * Does not have the same sequence number as the last received sequence
    number (and is thus not an END packet retransmission)
Then we send the END frame up to the Asterisk core.  It contains enough
DTMF information for Asterisk to produce the digit.

On the other hand, if we receive a BEGIN or continuation packet that occurs
with a timestamp equal to or less then the last END timestamp, then we've
received something out of order - but we already have received enough
information to produce the digit.  These packets are dropped.

Much thanks goes to Olle Johansson (oej) for providing the idea for this
solution.

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

(closes issue ASTERISK-18404)
Reported by: Stephane Chazelas
Tested by: Matt Jordan
........

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

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

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

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