Compare commits

..

966 Commits

Author SHA1 Message Date
Asterisk Autobuilder
cb5d32bd70 Importing release summary for 11.12.0 release.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.12.0@421401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-19 16:07:33 +00:00
Asterisk Autobuilder
545bd17cf2 Update ChangeLog, .version, remove old summaries
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.12.0@421397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-19 16:00:31 +00:00
Asterisk Autobuilder
8d630d5a1e Create 11.12.0
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.12.0@421394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-19 15:54:29 +00:00
Asterisk Autobuilder
0ae8d2ed7c Use autotagged externals
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.12.0-rc1@420810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 18:51:02 +00:00
Asterisk Autobuilder
db70852da1 Importing release summary for 11.12.0-rc1 release.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.12.0-rc1@420809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 18:50:50 +00:00
Asterisk Autobuilder
d6436fa263 Importing files for 11.12.0-rc1 release.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.12.0-rc1@420807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 18:50:34 +00:00
Asterisk Autobuilder
052e07b0bf Creating tag for the release of asterisk-11.12.0-rc1
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.12.0-rc1@420806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 18:48:46 +00:00
Walter Doekes
9aba91e5a6 general: Fix memory Corruption in __ast_string_field_ptr_build_va.
If the space left in a stringfield is between 0 and
(alignof(ast_string_field_allocation)-1) adding new data would cause
memory corruption, because we would assume enough space (unsigned
underrun).

Thanks Arnd Schmitter for reporting and finding out the cause!

ASTERISK-23508 #close
Reported by: Arnd Schmitter
Tested by: Arnd Schmitter, JoshE

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@420715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 10:36:38 +00:00
Walter Doekes
d43da8846c tcptls: Avoid compiler warning on non-dev-mode.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@420655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 09:52:36 +00:00
Richard Mudgett
d779523c8c chan_sip: Replace sip_tls_read() and resolve the large SDP poll issue.
Replace sip_tls_read() and sip_tcp_read() with a single function and
resolve the poll/wait issue with large SDP payloads.

ASTERISK-18345 #close
Reported by: Stephane Chazelas
Patches:
      tcptls_pollv4.diff (license #5835) patch uploaded by Elazar Broad

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@420435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-07 21:37:04 +00:00
George Joseph
0430c887f3 pbx_lua: fix regression with global sym export and context clash by pbx_config.
ASTERISK-23818 (lua contexts being overwritten by contexts of the same name in
pbx_config) surfaced because pbx_lua, having the AST_MODFLAG_GLOBAL_SYMBOLS
set, was always force loaded before pbx_config.  Since I couldn't find any
reason for pbx_lua to export it's symbols to the rest of Asterisk, I simply
changed the flag to AST_MODFLAG_DEFAULT.  Problem solved.  What I didn't
realize was that the symbols need to be exported not because Asterisk needs
them but because any external Lua modules like luasql.mysql need the base
Lua language APIs exported (ASTERISK-17279).

Back to ASTERISK-23818...  It looks like there's an issue in pbx.c where
context_merge was only merging includes, switches and ignore patterns if
the context was already existing AND has extensions, or if the context was
brand new.  If pbx_lua is loaded before pbx_config, the context will exist
BUT pbx_lua, being implemented as a switch, will never place extensions in
it, just the switch statement.  The result is that when pbx_config loads,
it never merges the switch statement created by pbx_lua into the final
context.

This patch sets pbx_lua's modflag back to AST_MODFLAG_GLOBAL_SYMBOLS and adds
an "else if" in context_merge that catches the case where an existing context
has includes, switchs or ingore patterns but no actual extensions.

ASTERISK-23818 #close
Reported by: Dennis Guse
Reported by: Timo Teräs
Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3891/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@420147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-06 16:08:07 +00:00
Richard Mudgett
9707876002 format.c: Add reason comments for the format_list ordering.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@420054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-05 18:23:59 +00:00
Rusty Newton
af592bbc94 Manager - Improve documentation for manager commands Getvar and Setvar.
The documentation for these commands did not make it clear that they could
accept expressions and functions. Modified to make this clear, but tried
not to be overly explicit.

ASTERISK-21178 #close
Reported by: Rusty Newton
Tested by: Rusty Newton

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@419943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-04 19:44:08 +00:00
Richard Mudgett
c2e464699f datastores: Audit ast_channel_datastore_remove usage.
Audit of v1.8 usage of ast_channel_datastore_remove() for datastore memory
leaks.

* Fixed leaks in app_speech_utils and func_frame_trace.

* Fixed app_speech_utils not locking the channel when accessing the
channel datastore list.

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

Audit of v11 usage of ast_channel_datastore_remove() for datastore memory
leaks.

* Fixed leak in func_jitterbuffer.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@419685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-28 18:34:18 +00:00
Richard Mudgett
4c47641f0c features.c: Allow appliationmap to use Gosub.
Using DYNAMIC_FEATURES with a Gosub application as the mapped application
does not work.  It does not work because Gosub just pushes the current
dialplan context, exten, and priority onto a stack and sets the specified
Gosub location.  Gosub does not have a dialplan execution loop to run
dialplan like Macro.

* Made the DYNAMIC_FEATURES application mapping feature call
ast_app_exec_macro() and ast_app_exec_sub() for the Macro and Gosub
applications respectively.

* Backported ast_app_exec_macro() and ast_app_exec_sub() from v11 to
execute dialplan routines from the DYNAMIC_FEATURES application mapping
feature.

NOTE: This issue does not affect v12+ because it already does what this
patch implements.

AST-1391 #close
Reported by: Guenther Kelleter

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@419631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 23:13:48 +00:00
Corey Farrell
aaa44d6ea5 chan_sip: sip_subscribe_mwi_destroy should not call sip_destroy
sip_subscribe_mwi_destroy calls sip_destroy on the reference counted
mwi->call.  This results in the fields of mwi->call being freed, but
mwi->call itself it leaked.  If other code is still using mwi->call
it can cause problems.  This change uses dialog_unref instead, to
balance the ref provided by sip_alloc().

ASTERISK-24087 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3834/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@419441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-24 17:56:51 +00:00
Jason Parker
9219a97997 Don't cause Asterisk to exit if ooh323.conf not found.
(closes issue ASTERISK-23814)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@419375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-24 16:49:35 +00:00
Scott Griepentrog
59795008d5 app_voicemail: use a consistent generator string
When updating voicemail.conf when a user changes
their pin, change the generator string to be the
same as the module name when reading so that the
same config_hook will be called.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@419284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-23 13:21:40 +00:00
Kinsey Moore
22b9d0ddff Fix more dev-mode build issues
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@419162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-22 14:00:33 +00:00
Matthew Jordan
bfc6904871 manager: Return ActionID on nominal responses to PresenceState action
When the PresenceState action is executed, the nominal path fails to include
the ActionID in the successful response. This patch adds a call to
astman_start_ack, which guarantees that an ActionID (if provided) will be
sent back to the AMI client.

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

ASTERISK-23985 #close


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@418713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-15 22:05:16 +00:00
Jonathan Rose
3d419e8796 func_uri: URIENCODE/URIDECODE - allow empty strings as argument
Previously these two dialplan functions would issue warnings and
return failure when an empty string is used as the argument. Now
they will not issue a warning and will successfully return an
empty string.

ASTERISK-23911 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3745/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@418649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-15 17:32:15 +00:00
Corey Farrell
148b8d128e astobj2: work around REF_DEBUG race which causes out of order log entries
* Update refcounter.py to use delta's to track the current reference count.
* Use result from internal_ao2_ref to write old_refcount to refs_log.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@418505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-13 21:51:19 +00:00
Corey Farrell
7a914e14d0 Fix minor reference leaks in app_skel and TEST_FRAMEWORK
* Cleanup games object in app_skel.
* Cleanup stasis subscription to TEST_FRAMEWORK in manager.c (12+).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@418465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-13 16:43:37 +00:00
Scott Griepentrog
a100307eaa config: inform config hook of change when writing file
When updated configuration is written back to the conf
file - for example when a user changes their voicemail
pin, make sure that any config hook that wants to know
of changes is informed.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@418366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-11 14:23:18 +00:00
Matthew Jordan
dfdf47a752 include/asterisk/xmpp.h: Convert indentation to tabs
This is a whitespace only change.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@418323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-10 15:35:21 +00:00
Richard Mudgett
073356fa18 chan_dahdi/sig_pri: Fix type mismatch in the idledial feature's channel creation.
Square pegs in round holes don't work very well.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@418262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-10 01:42:26 +00:00
Richard Mudgett
2f1d2a9ef6 chan_dahdi: Add inband_on_setup_ack compatibility option.
The new inband_on_setup_ack option causes Asterisk to assume inband audio
may be present when a SETUP_ACKNOWLEDGE message is received.

Q.931 Section 5.1.3 says that in scenarios with overlap dialing, when a
dialtone is sent from the network side, progress indicator 8 "Inband info
now available" MAY be sent to the CPE if no digits were received with the
SETUP.  It is thus implied that the ie is mandatory if digits came with
the SETUP and dialtone is needed.  This option should be enabled, when the
network sends dialtone and you want to hear it, but the network doesn't
send the progress indicator when needed.

NOTE: For Q.SIG setups this option should be enabled when outgoing overlap
dialing is also enabled because Q.SIG does not send the progress indicator
with the SETUP ACK.

The commit -r413714 (AST-1338) which causes this issue was dealing with a
SIP-to-ISDN interoperability issue.

This commit is a merge of the two patches indicated below.

ASTERISK-23897 #close
Reported by: Pavel Troller
Patches:
      pri-4.diff (license #6302) patch uploaded by Pavel Troller
      jira_asterisk_23897_v11.patch (license #5621) patch uploaded by rmudgett

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-03 21:48:03 +00:00
Matthew Jordan
8f5461d3dc main/untils: Prevent potential infinite loop in ast_careful_fwrite
A loop in ast_careful_fwrite exists that will continually attempt to write to
a file stream, even in the presence of EAGAIN/EINTR errors. However, if a
connection that uses ast_careful_fwrite closes suddenly, ast_careful_fwrite's
call to fflush may return EAGAIN/EINTER along with EOF. A subsequent call to
fflush will return EOF but not clear errno, resulting in an infinite loop.

This patch clears errno after it is detected and handled the loop, such that
any subsequent call to fflush will not get erroneously stuck.

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

#ASTERISK-23984 #close
Reported by: Steve Davies
patches:
  fflush_loop_fix uploaded by one47 (License 5012)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-03 11:24:50 +00:00
Joshua Colp
915de454f8 res_rtp_asterisk: Add SHA-256 support for DTLS and perform DTLS negotiation on RTCP.
This change fixes up DTLS support in res_rtp_asterisk so it can accept and provide
a SHA-256 fingerprint, so it occurs on RTCP, and so it occurs after ICE negotiation
completes. Configuration options to chan_sip have also been added to allow behavior
to be tweaked (such as forcing the AVP type media transports in SDP).

ASTERISK-22961 #close
Reported by: Jay Jideliov

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-30 19:42:18 +00:00
Matthew Jordan
1644cd874d chan_sip: be more tolerant of whitespace between attributes in SDP fmtp line
This patch is essentially a backport of a small portion of r397526 from
ASTERISK-21981. In that patch, pass through support and format attribute
negotiation was added for Opus. Part of that included being more tolerant to
whitespace in the fmtp line of an SDP; that part of the patch is being
applied here.

As the author of the backport pointed out, in SDP, the fmtp line is allowed to
include whitespace between attributes. RFC 3267 chapter 8.3 (from 2001)
includes an example for this. This was not removed in the updated RFC 4867 in
2007.

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

ASTERISK-23916 #close
Reported by: Alexander Traud
patches:
  sdpFMTPspace_Asterisk11.patch uploaded by Alexander Traud (License 6520)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-30 03:23:20 +00:00
Corey Farrell
23d1b904b0 Ensure REF_DEBUG records entrys for attempts to ao2_ref an invalid object
This change ensures that __ao2_ref_debug writes to ref_log when given a
non-NULL pointer to an invalid ao2 object.  This is to ensure that we
record any attempt manipulate references of already freed objects.

ASTERISK-23948 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3677/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-27 19:26:07 +00:00
Corey Farrell
fe70d27731 refcounter.py: prevent use of excessive RAM with large refs logs
When processing a 212MB refs file, refcounter.py used over 3GB of RAM.
This change greatly reduces memory usage in two ways:

* Saving object history in whole lines instead of separated values.
* Not saving normal/skewed/leaked object lists unless they are requested.

ASTERISK-23921 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3668/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-27 19:16:00 +00:00
Matthew Jordan
5d3078bd48 res_http_websocket: Export symbol for ast_websocket_set_timeout
Thanks to Sean Bright for pointing out that this was missed in #asterisk-dev.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-26 18:25:19 +00:00
Matthew Jordan
0b9601052b udptl: Correct FEC to not consider negative sequence numbers as missing
When using FEC, with span=3 and entries=4 Asterisk will attempt to repair
the packet with sequence number 5, as it will see that packet -4 is
missing. The result is Asterisk sending garbage packets that can kill a
fax.

This patch adds a check to see if the sequence number is valid before
checking if the packet is missing.

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

#ASTERISK-23908 #close
Reported by: Torrey Searle
patches:
  udptl_fec.patch uploaded by Torrey Searle (License 5334)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-26 12:22:22 +00:00
Matthew Jordan
32d684ee25 res_http_websocket: Close websocket correctly and use careful fwrite
When a client takes a long time to process information received from Asterisk,
a write operation using fwrite may fail to write all information. This causes
the underlying file stream to be in an unknown state, such that the socket
must be disconnected. Unfortunately, there are two problems with this in
Asterisk's existing websocket code:
1. Periodically, during the read loop, Asterisk must write to the connected
   websocket to respond to pings. As such, Asterisk maintains a reference to
   the session during the loop. When ast_http_websocket_write fails, it may
   cause the session to decrement its ref count, but this in and of itself
   does not break the read loop. The read loop's write, on the other hand,
   does not break the loop if it fails. This causes the socket to get in a
   'stuck' state, preventing the client from reconnecting to the server.
2. More importantly, however, is that the fwrite in ast_http_websocket_write
   fails with a large volume of data when the client takes awhile to process
   the information. When it does fail, it fails writing only a portion of
   the bytes. With some debugging, it was shown that this was failing in a
   similar fashion to ASTERISK-12767. Switching this over to ast_careful_fwrite
   with a long enough timeout solved the problem.

ASTERISK-23917 #close
Reported by: Matt Jordan

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-26 12:06:22 +00:00
Corey Farrell
2875174e97 chan_sip: Fix handling of "From" headers longer than 256 characters
From headers were processed using a 256 character buffer on the stack.
This change replaces that with a heap allocation by ast_strdup.

ASTERISK-23790 #close
Reported by: uniken1
Tested by: uniken1
Review: https://reviewboard.asterisk.org/r/3669/
Patches:
    chan_sip-large-from-header-1.8-r3.patch uploaded by wdoekes (license 5674)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-26 10:04:01 +00:00
Joshua Colp
3e642e66d1 res_rtp_asterisk: Return the length of data written when sending via ICE instead of 0.
ASTERISK-23834 #close
Reported by: Richard Kenner


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-23 18:49:14 +00:00
Rusty Newton
cd6a931be5 main/features - documentation - reformat examples and options in features.conf.sample to show clearly which options apply in which section
The features.conf sample can be a bit confusing about what parking options can be set only in the general context, or both in the general context (for the default parking lot) and in other parking lot contexts. A bug was filed due to confusion and a little googling will show lots of other confused users.

Despite some comments on the individual options, it still reads in a confusing way. In this patch I separate out those options with some headings in to attempt a better layout. I went ahead and modified other headings in the file, or added them to facilitate better visual scanning.

ASTERISK-23667
Review: https://reviewboard.asterisk.org/r/3622/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-23 14:35:53 +00:00
George Joseph
c7e9233a81 build: Turn FORTIFY_SOURCE off if DONT_OPTIMIZE is set.
AST_FORTIFY_SOURCE is automatically set in ./Makefile even if DONT_OPTIMIZE
is set in menuselect.  This causes gcc to complain that _FORTIFY_SOURCE
requires optimization and the build will fail.  You can specify
"make AST_FORTIFY_SOURCE=''" but I always forget.

This patch moves the set of AST_FORTIFY_SOURCE to Makefile.rules and only
sets it if DONT_OPTIMIZE is "no".  The move is necessary because the
top-level Makefile doesn't include menuselect.makeopts.

This doesn't solve the entire problem however because res_config_mysql
seems to force _FORTIFY_SOURCE so res_config_mysql has to be disabled
for now if DONT_OPTIMIZE is set.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3664/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-22 20:52:19 +00:00
George Joseph
2b4423d2b3 build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.
ast_ext_tool_check.m4 isn't handling cases where a path to a package is
provided (E.G. --with-mysqlclient=/some/sysroot) and the package has a config
tool (E.G. mysql_config) and the package has its own subdirectories in include
or lib.  For example, mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql
but ast_ext_tool_check sets MYSQLCLIENT_LIB to ${MYSQLCLIENT_DIR}/usr/lib.
libxml2 has the same problem with its includes.  They're in 
${LIBXML2_DIR}/usr/include/libxml2 not directly in ${LIBXML2_DIR}/usr/include.
Both cause configure to fail and there are others in the same boat.

The problem is caused by logic in ast_ext_tool_check that overrides the result
of the config tool's --cflags and --libs options if package_DIR is set.

This patch prepends package_DIR (if specified) to the -L and -I results from
the package's config tool instead of overriding them.

A regenerated ./configure and include/asterisk/autoconfig.h.in are included
but can be regenerated by running ./bootstrap.sh at any time.

Tested by: George Joseph
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3550/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-20 23:14:52 +00:00
George Joseph
a6ba838fce build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.
ast_ext_tool_check.m4 isn't handling cases where a path to a package is
provided (E.G. --with-mysqlclient=/some/sysroot) and the package has a config
tool (E.G. mysql_config) and the package has its own subdirectories in include
or lib.  For example, mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql
but ast_ext_tool_check sets MYSQLCLIENT_LIB to ${MYSQLCLIENT_DIR}/usr/lib.
libxml2 has the same problem with its includes.  They're in 
${LIBXML2_DIR}/usr/include/libxml2 not directly in ${LIBXML2_DIR}/usr/include.
Both cause configure to fail and there are others in the same boat.

The problem is caused by logic in ast_ext_tool_check that overrides the result
of the config tool's --cflags and --libs options if package_DIR is set.

This patch prepends package_DIR (if specified) to the -L and -I results from
the package's config tool instead of overriding them.

Tested by: George Joseph
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3550/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-20 21:57:00 +00:00
Kinsey Moore
b583f708cb Fix build warnings with TEST_FRAMEWORK enabled
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-19 19:34:37 +00:00
George Joseph
874be8b530 Remove the problematic and unneeded AST_MODFLAG_GLOBAL_SYMBOLS from pbx_lua.c
AST_MODFLAG_GLOBAL_SYMBOLS was causing the module to be incorrectly loaded
before pbx_config.  pbx_config was therefore blowing away contexts that were
created by pbx_lua.  With AST_MODFLAG_DEFAULT the load order is now correct
and contexs are being properly merged.  AST_MODFLAG_GLOBAL_SYMBOLS was not
needed anyway since no other modules needed its global symbols that early.

ASTERISK-23818 #close
Reported by: Dennis Guse
Tested by: Dennis Guse
Tested by: George Joseph

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-19 16:02:12 +00:00
George Joseph
b960b9c2d5 Update extensions.lua.sample with naming conflict guidance.
The sample extensions.lua was causing pbx_lua to fail to load when parsing
'app.goto("default", "s", 1)' because in Lua 5.2, 'goto' is now a reserved
word.  This patch adds guidance to extensions.lua.sample and changed
'app.goto("default", "s", 1)' to 'app.['goto']("default", "s", 1)'. 

ASTERISK-23844 #close
Reported by: rnewton
Tested by: gtjoseph
Review: https://reviewboard.asterisk.org/r/3627/
 

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-18 17:06:39 +00:00
Mark Michelson
cc7bc40c2a Allow the PUSH and UNSHIFT functions to set inheritable channel variables.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-17 18:40:35 +00:00
Kinsey Moore
15d2f541b4 MoH: Don't restart stream on repeated start calls
Currently, music on hold will stop and then start again from the
beginning if ast_moh_start() is called multiple times. This can happen
if a call is put on hold repeatedly (the channel receives multiple
HOLD control frames) and can be triggered from ARI by starting MoH on a
channel multiple times. This is fairly jarring/annoying to users.

This change prevents MoH from being restarted if the requested music
class is the same as the one currently playing.

This includes an extra check to prevent the errors previously
experienced in the testsuite and has 100+ test runs behind it.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-17 16:21:00 +00:00
Igor Goncharovskiy
07a0838e2a We have faced situation when using CDR and CEL by sqlite3 modules. With system having high load (~100 concurrent calls created by sipp) we found many cdr and cel records missed. There is special finction in sqlite3, that make able to fix this situation - sqlite3_wait_timeout, that also can replace awful code cdr_sqlite3 ad cel_sqlite3 modules. Also this function can be used for aastdb and res_config_sqlite3 to avoid missed writes to sqlite db.
#ASTERISK-23766 #close
Reported by: Igor Goncharovsky

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-16 09:00:18 +00:00
Matthew Jordan
8d848c048d MoH: Undo commit r416150 (1.8)
This patch reverts r416150. When the comparison between mohclass->name and
state->class->name is made, you are not guaranteed that (a) state->class is
non-NULL or that state or state->class are in a safe state.

Crashes caught by the bridges/transfer_capabilities test.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-15 21:17:02 +00:00
Kinsey Moore
71c9c7612e MoH: Don't restart stream on repeated start calls
Currently, music on hold will stop and then start again from the
beginning if ast_moh_start() is called multiple times. This can happen
if a call is put on hold repeatedly (the channel receives multiple
HOLD control frames) and can be triggered from ARI by starting MoH on a
channel multiple times. This is fairly jarring/annoying to users.

This change prevents MoH from being restarted if the requested music
class is the same as the one currently playing.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-13 13:08:32 +00:00
Richard Mudgett
11553fd489 AST-2014-007: Fix of fix to allow AMI and SIP TCP to send messages.
ASTERISK-23673 #close
Reported by: Richard Mudgett

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@416067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-13 05:06:02 +00:00
Rusty Newton
7e2ed2e032 main/pbx - documentation - enhance 'core show hints' and 'core show hint' help text
Adds descriptive help text to 'core show hints' and 'core show hint'. The text describes the various columns for the sake of clarity.

ASTERISK-23764
Review: https://reviewboard.asterisk.org/r/3610/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-12 21:16:15 +00:00
Corey Farrell
c7df3bd093 chan_sip: DEBUG messages in sdp_crypto.c display despite a DEBUG level of zero
Change debug level for messages in sdp_crypto.c from zero to one.  This
ensures the messages are not displayed when debugging is disabled.  Change
does not apply to 12+ as it was already fixed in those versions.

ASTERISK-23246 #close
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/3605/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-12 17:20:05 +00:00
Richard Mudgett
df686c50d8 AST-2014-007: Fix DOS by consuming the number of allowed HTTP connections.
Simply establishing a TCP connection and never sending anything to the
configured HTTP port in http.conf will tie up a HTTP connection.  Since
there is a maximum number of open HTTP sessions allowed at a time you can
block legitimate connections.

A similar problem exists if a HTTP request is started but never finished.

* Added http.conf session_inactivity timer option to close HTTP
connections that aren't doing anything.  Defaults to 30000 ms.

* Removed the undocumented manager.conf block-sockets option.  It
interferes with TCP/TLS inactivity timeouts.

* AMI and SIP TLS connections now have better authentication timeout
protection.  Though I didn't remove the bizzare TLS timeout polling code
from chan_sip.

* chan_sip can now handle SSL certificate renegotiations in the middle of
a session.  It couldn't do that before because the socket was non-blocking
and the SSL calls were not restarted as documented by the OpenSSL
documentation.

* Fixed an off nominal leak of the ssl struct in
handle_tcptls_connection() if the FILE stream failed to open and the SSL
certificate negotiations failed.

The patch creates a custom FILE stream handler to give the created FILE
streams inactivity timeout and timeout after a specific moment in time
capability.  This approach eliminates the need for code using the FILE
stream to be redesigned to deal with the timeouts.

This patch indirectly fixes most of ASTERISK-18345 by fixing the usage of
the SSL_read/SSL_write operations.

ASTERISK-23673 #close
Reported by: Richard Mudgett
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-12 16:22:19 +00:00
Jonathan Rose
0df802b473 Correct UPGRADE.txt notes in r415825
The change was marked against the wrong version of Asterisk. My apologies.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-12 15:42:10 +00:00
Scott Griepentrog
a5f39fc2ba app_queue: delayed state can cause early leavewhenempty ringing
In app_queue, device state changes arrive in event messages and
update the queue member status value.  That value is checked in
get_member_status() to decide that the caller should leave when
there are no available members.  Although event messages can be
delayed by other activity, there is no adverse affect by lagged
status except in one specific case: there is only one available
member, it was just rung, and leavewhenempty is enabled set for
ringing members.  This change adds a direct check of the device
state only under this condition where the caller may be dropped
incorrectly, resolving this issue without affecting performance
of app_queue normally.

AST-1248 #close
Review: https://reviewboard.asterisk.org/r/3595/
Reported by: Thomas Arimont
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-12 15:40:41 +00:00
Jonathan Rose
064bd035e7 MixMonitor: Add class authorization requirements to MixMonitor AMI commands
MixMonitor AMI commands StartMixMonitor and StopMixMonitor lacked class
authorization. StopMixMonitor now requires that the manager user either have
the call or system class authorization. StartMixMonitor is a slightly larger
issue since it can execute shell commands if the right arguments are passed
into it, and we consider this a permission escalation. A security release
will be issued for problem this shortly.

ASTERISK-23609 #close
Reported by: Corey Farrell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-12 15:22:02 +00:00
Richard Mudgett
33a4ae86a1 format.c: Fix misuse of hash container function.
The supplied hash function to a container must be idempotent given the
object's key value to figure out which container bucket the object belongs
in.  Returning a random number or the current container count is not
idempotent.  The "computed hash" value doesn't help find the object later
in those cases.

* Fixed the format_list container to actually be a list since that is how
the container is used.  Conceptually, if more than 283 formats were added
to the format_list then odd things may have happened before the fix.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-11 22:44:30 +00:00
Alexandr Anikin
73945f9a97 chan_ooh323: fix loading module failure if there no accessible h323_log or ooh323 config file
change return 1 to return AST_MODULE_LOAD_FAILURE on module load routine
few cosmetic changes

ASTERISK-23814 #close

(closes issue ASTERISK-23814)

Reported by: Igor Goncharovsky
Patches:
	ASTERISK-23814-ast11.patch


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-10 09:13:43 +00:00
Walter Doekes
ea8009da8e safe_asterisk: Cleanup additions to r415132.
Replaced a stray echo that should've been a message call in
safe_asterisk. I'm using the contents of the old message inside the
if $NOTIFY so peoples log parsing scripts won't get confused by new
messages. I'll clean that up in trunk.

(Note that a 'make install' still won't overwrite your old safe_asterisk
if it exists. See ASTERISK-21965.)

ASTERISK-23492 #close
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-09 11:57:09 +00:00
Corey Farrell
2173e79720 autoservice: stop thread on graceful shutdown
This change adds thread shutdown to autoservice for graceful shutdowns only.
ast_register_cleanup is backported to 1.8 to allow this.  The logger callid
is also released on shutdown in 11+.

ASTERISK-23827 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3594/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-09 03:47:11 +00:00
Jonathan Rose
a92d272d2f chan_sip: Fix order of variables specified in SIPNotify action
Prior to this patch, sequential variables would be ordered in reverse
from the order specified in the manager action.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-06 21:27:41 +00:00
Richard Mudgett
4cc6c7683c config: Fix config files not reloading when only an included file changes.
The twisted logic determining if a config file should be reloaded was
mostly broken and disabled.  The incorrect test that ASTERISK-23383 fixed
actually reenabled the broken logic.  The incorrect test was causing the
timestamp to always be cleared which caused config files with includes to
always be reloaded.

* Made wildcard includes always cause a reload.  Determining if a file was
deleted cannot be determined without restructuring the cache to determine
if any files are missing from the last files actually loaded.  Also
without refactoring config_text_file_load(), the glob loop couldn't check
more than one file for changes anyway.

* Made remove the cache entry if the file no longer exists when trying to
get its timestamp or it is no longer a regular file.  This fixes the
corner case where the file was loaded, then deleted, then the config
reloaded, then the file restored with the same timestamp, and then the
config reloaded again.

* Made remove the cache entry include list when actually loading the file.
This gets rid of any stale includes the file had from the last time the
file was loaded.

ASTERISK-23683 #close
Reported by: tootai

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-05 17:45:24 +00:00
Matthew Jordan
a890f5469b app_confbridge: Allow muting of users waiting to enter a ConfBridge
Prior to this patch, users waiting to enter a ConfBridge were not considered
when muted via the CLI or via AMI. Instead, a confusing message would be
emitted stating that the channel did not exist.

This patch allows a user to be muted when waiting to enter a ConfBridge
conference. This is equivalent to start when muted, only toggled via the CLI
or AMI.

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

ASTERISK-23824 #close
patches:
  rb3582.patch uploaded by tm1000 (License 6524)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-05 14:32:38 +00:00
Walter Doekes
2fbf3e8811 safe_asterisk: Cleanup and debian compatibility.
Cleans up the safe_asterisk script and adds the ASTSAFE_FOREGROUND
option that allows the debian asterisk init script to capture the
right pid.

* Drop the vim #modeline which wasn't used. Use test consistently
  without the odd configure xno syntax. Double quote all paths.
  General cleanup.
* Don't output message()s to the console but only to TTY if set.
* Allow TTY to be "no" as well as empty (debian compatibility with
  debian/patches/safe_asterisk-config).
* Add option to export ASTSAFE_FOREGROUND=1 from the init script
  that calls this to disable backgrounding. Debian uses a similar
  method in debian/patches/safe_asterisk-nobg).

ASTERISK-23492 #close
Review: https://reviewboard.asterisk.org/r/3574/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-04 20:12:36 +00:00
Corey Farrell
b9838a9960 app_confbridge: Correct verification of conference name length
Conference names were not checked for maximum length, allowing unexpected
behaviour.  This change adds checking to ensure the maximum length is not
exceeded.  The maximum length is also changed from 32 to AST_MAX_EXTENSION.

ASTERISK-23035 #close
Reported by: Iñaki Cívico
Tested by: Iñaki Cívico
Patches:
    confbridge-enforce_max-1.8.patch uploaded by coreyfarrell (license 5909)
    confbridge-enforce_max-11up.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-04 07:20:22 +00:00
Walter Doekes
fb0754681a func_odbc: Fix fixed size buffers fix (r414968).
The change that removed the fixed size buffers in odbc-related code --
removing arbitrary column width limits -- was incomplete. This change
adds: no segfault on writesql without insertsql and return value checks
after strdup.

While I was in the vicinity I cleaned up the linefeeds in the odbc
function descriptions, moved some code for clarity, removed some blobs
and noted (but didn't fix) that the 'odbc write ... exec' CLI command
doesn't behave as the dialplan equivalent when insertsql= is used.

#ASTERISK-23582 #close
Review: https://reviewboard.asterisk.org/r/3579/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-03 07:32:30 +00:00
Matthew Jordan
c0494ad9c9 main/config.c: AMI action UpdateConfig EmptyCat clears all categories
When invoking UpdateConfig AMI action with Action set to EmptyCat, Asterisk
will make all categories empty in the config but the one requested with a
Cat variable. This is due to a bug in ast_category_empty (main/config.c)
that makes an incorrect comparison for a category name.

This patch corrects the comparison such that only the requested category
is cleared.

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

ASTERISK-23803 #close
Reported by: zvision
patches:
  manager.c.diff uploaded by zvision (License 5755)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-30 11:59:02 +00:00
Kinsey Moore
b4042d348f PBX: Prevent incorrect hint parsing
Dynamic and pattern matching hints should not be checked for their last
known state until they are instantiated by subscribers.

(closes issue AFS-56)
Reported by: John Hardin
Patch AFS-56-pbx.diff submitted by Matt Jordan (license 6283)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-29 18:33:34 +00:00
Joshua Colp
80237dcf5b res_config_odbc: Use dynamically sized buffers to store row data so values do not get truncated.
ASTERISK-23582 #close
ASTERISk-23582 #comment Reported by: Walter Doekes

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 11:36:01 +00:00
Walter Doekes
1ab8cca110 chan_unistim: Unlock mutex in rare OOM condition.
ASTERISK-23792 #close
Reported by: Peter Whisker

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 09:41:53 +00:00
Walter Doekes
611f27fbd9 chan_sip: Start session timer at 200, not at INVITE.
Asterisk started counting the session timer at INVITE while the other
end correctly started at 200. This meant that for short session-expiries
(90 seconds) combined with long ringing times (e.g. 30 seconds), asterisk
would wrongly assume that the timer was hit before the other end thought
it was time to send a session refresh. This resulted in prematurely
ended calls.

This changes the session timer to start counting first at 200 like RFC
says it should.

(Also removed a few excess NULL checks that would never hit, because if
they did, asterisk would have crashed already.)

ASTERISK-22551 #close
Reported by: i2045 

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-27 21:19:26 +00:00
Walter Doekes
7041eee5e5 res_config_odbc: Fix old and new ast_string_field memory leaks.
The ODBC realtime driver uses ^NN parameter encoding to cope with the
special meaning of the semi-colon. A semi-colon in a field is
interpreted as if the key was supplied twice, something which isn't
otherwise possible with fixed database columns. E.g. allow=alaw;ulaw
is parsed as allow=alaw and allow=ulaw. A literal semi-colon is
rewritten to ^3B when stored in the database.

The module uses a stringfield to efficiently store the encoded
parameters. However, this stringfield wasn't always freed in some
off-nominal cases.

Commit r413241 fixed initialization so the encoding for INSERT and
DELETE queries wouldn't crash. (Only SELECTs and UPDATEs worked
apparently.) But that commit forgot the frees. This change cleans
that up.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-27 19:46:48 +00:00
Jonathan Rose
f992988b1f Blocked revisions 414488
........
Backport Asterisk 11 r413876 to 1.8
........
r413876 | jrose | 2014-05-13 12:40:00 -0500 (Tue, 13 May 2014) | 6 lines

chan_sip: Add TLS and SRTP status to CLI command 'sip show channel'

ASTERISK-23564 #close
Reported by: Patrick Laimbock
Review: https://reviewboard.asterisk.org/r/3474/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-23 16:07:57 +00:00
Richard Mudgett
c3d1e68377 app_meetme: Don't interrupt MOH for waitmarked users.
Occasionally, when the last marked user leaves the conference, waitmarked
users don't get MOH if MOH is supposed to be played while a waitmarked
user is waiting for another marked user.

* Made not interrupt MOH when the user is a waitmarked user.  The
waitmarked user doesn't need to hear any leave announcements from the
conference as the user would have already heard different leave
announcements if they were enabled.  Apparently DAHDI occasionally sends
unending non-silent streams to these users or a normal user still in the
conference has continuous high background noise.  These non-silent streams
cause MOH to be suspended while the never ending "announcement" is played.

Issue caused by ASTERISK-13680.

AST-1349 #close
Reported by: Tyler Stewart

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-22 15:50:38 +00:00
Matthew Jordan
95eb7df060 UPGRADE: Add note for REF_DEBUG flag
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-22 13:59:32 +00:00
Richard Mudgett
e5843ab97d chan_local: Only block media frames when a generator is on both ends of a local channel.
The fix for ASTERISK-12292 was a bit too aggressive.  You could have
generators pointed at each other on local channels but need to get other
kinds of frames such as DTMF or CONNECTED_LINE frames accross.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-21 22:05:53 +00:00
Scott Griepentrog
7d1a06a5dd pbx.c: prevent potential crash from recursive replace()
Recurisve usage of replace() resulted in corruption of the
temporary string storage and potential crash.  By changing
the string to be allocated separtely per instance, this is
eliminated.

ASTERISK-23650 #comment Reported by: Roel van Meer
ASTEIRSK-23650 #close

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-21 19:05:32 +00:00
Alexandr Anikin
f704632ffa chan_ooh323: fix h323_log full path name
* fix to use astlogdir option for h323_log file instead of hardcoded

ASTERISK-23754 #close

Reported by: Igor Goncharovsky
Patches:
	ooh323_logger_patch.diff
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-19 13:37:27 +00:00
Richard Mudgett
c9e1d7a154 chan_dahdi: Fix analog dialtone detection.
* Check if waitingfordt (waitfordialtone) is enabled in dahdi_read() to
allow the DSP to operate early enough to detect dialtone.

* Made use the correct variable in my_check_waitingfordt().

ASTERISK-23709 #close
Reported by: Steve Davies
Patches:
      dialtone_detect_fix (license #5012) patch uploaded by Steve Davies

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-16 20:03:46 +00:00
Richard Mudgett
b2be6e5616 sig_pri.c: Pull the pri_dchannel() PRI_EVENT_RING case into its own function.
* Populate the CALLERID(ani2) value (and the special CALLINGANI2 channel
variable) with the ANI2 value in addition to the PRI specific ANI2 channel
variable.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-16 17:23:42 +00:00
Richard Mudgett
e5d1800160 app_meetme: Fix overwrite of DAHDI conference data structure.
Starting a conference recording using the admin menu overwrites the DAHDI
conference data structure used to modify the admin user's conference mute
mode.

* Made no longer pass the user's DAHDI conference data structure into the
menu functions.  The menu now uses its own DAHDI conference data
structure to start the recording channel.

* Moved the unlock conf->playlock to before playing the conf-full message.
No sense keeping the lock while that prompt is playing.  The user is never
going to get into the conference at that point.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-15 21:44:34 +00:00
Walter Doekes
3e5fb27f06 Blocked revisions 413949
> Apparently this was already fixed in Asterisk 11.
> https://reviewboard.asterisk.org/r/1944/ (r368519, 2012-06-05 16:41:43 +0200)
........
chan_local+app_dial: Propagagate call answered elsewhere over local channels.

AST_FLAG_ANSWERED_ELSEWHERE was not propagated back from local channels.
It is now. That means that when a call is picked up from a callgroup of
local channels, the other channels will now properly see it as "picked up".

This occurs when you use a construct like Dial(Local/a@context&Local/b@context)
where a@context and b@context dial two chan_sip devices respectively. If one
device picks up, the other will not see "1 missed call" anymore. In this
respect, it now behaves the same as when doing Dial(SIP/a&SIP/b).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-15 15:51:42 +00:00
Walter Doekes
655e69954c res_musiconhold: Minor cleanup.
Fix a few free()'s that should be ast_free()'s. Reverted an old
workaround that isn't necessary. Reorder a tiny bit of code.
Remove a bit of commented-out code.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-14 15:31:27 +00:00
Jonathan Rose
93e4470a65 chan_sip: Add TLS and SRTP status to CLI command 'sip show channel'
ASTERISK-23564 #close
Reported by: Patrick Laimbock
Review: https://reviewboard.asterisk.org/r/3474/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-13 17:40:00 +00:00
Walter Doekes
adb50be36d chan_sip+CEL: Add missing ANSWER and PICKUP events to INVITE/w/replaces pickup.
When doing a "BLF-style call pickup" -- an INVITE with Replaces: header -- the
CEL log would lack the ANSWER and PICKUP events.

This patch adds the two missing events to the handle_invite_replaces() function.

ASTERISK-22977 #close
Review: https://reviewboard.asterisk.org/r/3073/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-13 14:34:31 +00:00
Walter Doekes
8ade79ebe3 h264: Fix H264 SDP payload format.
https://tools.ietf.org/html/rfc3984#section-8.1 says profile-level-id
takes 3 bytes in base16 (6 hex digits).

This fixes video setup in certain cases.

ASTERISK-23664 #close
ASTERISK-23664 #comment Patch r3530.patch uploaded by Guillaume Maudoux.
Review: https://reviewboard.asterisk.org/r/3530/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-13 13:50:10 +00:00
Walter Doekes
4471447ea8 rtp: Fix case typo in H263+ mime.
http://tools.ietf.org/html/rfc3555#section-4.2.6 says the canonical
mime subtype is "H263-1998", not "h263-1998". Original code was added
in r183101 on 2009-03-19 02:26:50 +0100.

This fixes issues with Polycom phones.

ASTERISK-23665 #close
ASTERISK-23665 #comment Patch r3529.patch uploaded by Guillaume Maudoux, backported by me.
Review: https://reviewboard.asterisk.org/r/3529/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-13 13:32:46 +00:00
Richard Mudgett
e99783e792 chan_dahdi/sig_pri: Prevent unnecessary PROGRESS events when overlap dialing is enabled.
When overlap dialing is enabled, the lack of inband audio available
information in the SETUP_ACKNOWLEDGE events causes an interoperability
problem with SIP.  sig_pri doesn't know if there is dialtone present when
a SETUP_ACKNOWLEDGE is received so it assumes it is there and posts an
AST_CONTROL_PROGRESS frame.  The SIP channel driver then sends out a 183
Session Progress and blocks the desired 180 Ringing message when the
ALERTING message comes in.

* Made the configure script detect if the installed version of libpri
supports the SETUP_ACKNOWLEDGE enhancements.

* Using the new API, made generate an AST_CONTROL_PROGRESS frame on an
incoming SETUP_ACKNOWLEDGE message when the message indicates inband audio
is present instead of assuming that dialtone is present.

* Using the new API, made SETUP_ACKNOWLEDGE send out an inband audio
available indication only if dialtone is expected.  The change also makes
the fallback behaviour of sending the PROGRESS message better by sending
it only if dialtone is expected.

* Changed receiving a PROCEEDING message to not generate an
AST_CONTROL_PROGRESS frame if the progress indication ie indicates
non-end-to-end-ISDN.  This helps interoperability with SIP.

* Changed sending a PROCEEDING message in response to an
AST_CONTROL_PROCEEDING frame to not indicate inband audio available.  It
was silly to do so anyway because the channel driver doesn't know if
inband audio is even available.  This helps interoperability with SIP.

This patch and a corresponding change in libpri work together to allow
Asterisk to control the inband audio available progress indication ie on
the SETUP_ACKNOWLEDGE message when dialtone is present.

AST-1338 #close
Reported by: Tyler Stewart

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-12 23:48:13 +00:00
Jonathan Rose
c4e0f4361f app_chanspy: Fix a test that was failing on account of r413551
ASTERISK-23381 #close
ASTERISK-23381 #comment Reported by: Robert Moss
Review: https://reviewboard.asterisk.org/r/3505/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-12 22:02:34 +00:00
Kinsey Moore
87afd43d47 Blocked revisions 413591
........
Fix 32bit build for chan_sip


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-12 12:06:08 +00:00
Kinsey Moore
79d3c5bac1 Fix 32bit build for func_env
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 23:08:38 +00:00
Kinsey Moore
abac3330cf Allow Asterisk to compile under GCC 4.10
This resolves a large number of compiler warnings from GCC 4.10 which
cause the build to fail under dev mode. The vast majority are
signed/unsigned mismatches in printf-style format strings.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 22:28:40 +00:00
Jonathan Rose
d55a68a531 app_chanspy: Fix a bug where Barge mode could fail
If the barge audiohook was attached prior to the spyee and its peer
actually being bridged, the audiohook would not be applied and the
connected peer would not be able to hear audio from the spy when the
spy is in barge mode.

(closes issue ASTERISK-23381)
Reported by: Robert Moss
Review: https://reviewboard.asterisk.org/r/3505/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 16:10:14 +00:00
Joshua Colp
50925e6c24 app_queue: Extend documentation for various Manager actions and events.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-08 00:34:43 +00:00
Richard Mudgett
f9e01d04a6 app_confbridge: Fix ref leak in CLI "confbridge kick" command.
Fixed ref leak in the CLI "confbridge kick" command when the channel to be
kicked was not in the conference.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-07 20:29:09 +00:00
Mark Michelson
0becabfd1b Fix encoding of custom prepare extra data.
Patches:
	res_config_odbc-take2.patch by John Hardin (License #6512)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-07 17:48:55 +00:00
Mark Michelson
01731d5566 Ensure that all parts of SQL UPDATEs and DELETEs are encoded.
Patches:
	res_config_odbc.patch by John Hardin (License #6512)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-06 17:01:30 +00:00
Mark Michelson
b57c1dd870 Prevent crashes in res_config_odbc due to uninitialized string fields.
Patches:
    odbc-crash.patch by John Hardin (License #6512)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 20:25:00 +00:00
Mark Michelson
96cb273948 Return the number of rows affected by a SQL insert, rather than an object ID.
The realtime API specifies that the store callback is supposed to return the number
of rows affected. res_config_pgsql was instead returning an Oid cast as an int, which
during any nominal execution would be cast to 0. Returning 0 when more than 0 rows were
inserted causes problems to the function's callers.

To give an idea of how strange code can be, this is the necessary code change to fix
a device state issue reported against chan_pjsip in Asterisk 12+. The issue was that
the registrar would attempt to insert contacts into the database. Because of the 0
return from res_config_pgsql, the registrar would think that the contact was not successfully
inserted, even though it actually was. As such, even though the contact was query-able
and it was possible to call the endpoint, Asterisk would "think" the endpoint was unregistered,
meaning it would report the device state as UNAVAILABLE instead of NOT_INUSE.

The necessary fix applies to all versions of Asterisk, so even though the bug reported
only applies to Asterisk 12+, the code correction is being inserted into 1.8+.

Closes issue ASTERISK-23707
Reported by Mark Michelson
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 19:50:07 +00:00
Richard Mudgett
709d39b662 chan_sip.c: Fixed off-nominal message iterator ref count and alloc fail issues.
* Fixed early exit in sip_msg_send() not destroying the message iterator.

* Made ast_msg_var_iterator_next() and ast_msg_var_iterator_destroy()
tolerant of a NULL iter parameter in case ast_msg_var_iterator_init()
fails.

* Made ast_msg_var_iterator_destroy() clean up any current message data
ref.

* Made struct ast_msg_var_iterator, ast_msg_var_iterator_init(),
ast_msg_var_iterator_next(), ast_msg_var_unref_current(), and
ast_msg_var_iterator_destroy() use iter instead of i.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-30 20:26:16 +00:00
Kinsey Moore
4fce454645 Websocket: Add session locking and delay close
This resolves a race condition where data could be written to a NULL
FILE pointer causing a crash as a websocket connection was in the
process of shutting down by adding locking to websocket session writes
and by deferring session teardown until session destruction.

(closes issue ASTERISK-23605)
Review: https://reviewboard.asterisk.org/r/3481/
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-30 13:04:14 +00:00
Matthew Jordan
374f32fcc9 res_rtp_asterisk: Add support for DTLS handshake retransmissions
On congested networks, it is possible for the DTLS handshake messages to get
lost. This patch adds a timer to res_rtp_asterisk that will periodically
check to see if the handshake has succeeded. If not, it will retransmit the
DTLS handshake.

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

ASTERISK-23649 #close
Reported by: Nitesh Bansal
patches:
  dtls_retransmission.patch uploaded by Nitesh Bansal (License 6418)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-25 17:47:21 +00:00
Richard Mudgett
7594bb6041 http: Fix spurious ERROR message in responses with no content.
Backport -r411687 and fix the fix because content_length is the length of
out plus the length of the file controlled by fd.

When a response has an out content length of 0, fwrite would be called to
write a buffer with no data in it.  This resulted in the following classic
error message:

  [Apr  3 11:49:17] ERROR[26421] http.c: fwrite() failed: Success

This patch makes it so that we only attempt to write the content of out if
the out string is non-zero.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-23 17:51:19 +00:00
Jonathan Rose
642a4e6f80 chan_sip: trust_id_outbound CHANGES message improvement
(closes issue AST-1301)

(closes issue ASTERISK-19465)
Reported by: Krzysztof Chmielewski
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 17:53:29 +00:00
Jonathan Rose
d81a53c1c8 Typo in CHANGES
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 16:22:50 +00:00
Kinsey Moore
d924b4cdae HTTP: Add TCP_NODELAY to accepted connections
This adds the TCP_NODELAY option to accepted connections on the HTTP
server built into Asterisk. This option disables the Nagle algorithm
which controls queueing of outbound data and in some cases can cause
delays on receipt of response by the client due to how the Nagle
algorithm interacts with TCP delayed ACK. This option is already set on
all non-HTTP AMI connections and this change would cover standard HTTP
requests, manager HTTP connections, and ARI HTTP requests and
websockets in Asterisk 12+ along with any future use of the HTTP
server.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 16:13:36 +00:00
Jonathan Rose
43f21b8564 chan_sip: Add sendrpid trust options
In r411189, some behavior was changed which made sendrpid behavior
act in a more trusting manner by sending full user data for peers
set with private caller presence in P-Asserted-Identity headers.
Since this changed long time expected behaviors, we decided to pull
that patch when that was pointed out by the community. Instead, this
patch provides a trust_id_outbound setting which will expose the data
per RFC-3325 if set to 'yes' and simply not send the PAI/RPID headers
at all if set to 'no'. By default trust_id_outbound will be set to
'legacy' which will preserve the behavior prior to these patches.
Extra special thanks to Walter Doekes for providing advice and
feedback.

(closes issue AST-1301)

(closes issue ASTERISK-19465)
Reported by: Krzysztof Chmielewski

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 15:51:40 +00:00
Igor Goncharovskiy
a4de660c40 Fix wrong dialtone. The "modulation" should not be referenced for tone+tone as it refers to the on-off characteristic - this often resulted in a single tone rather than the multitone as in the UK.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 08:29:39 +00:00
Matthew Jordan
b5b698afbf app_sms: Fix uninitialized values; hangup channel when REL is sent successfully
This patch fixes two issues in app_sms:
(1) Firstly, the 'flags' field on the stack in sms_exec() is uninitialised,
    causing it to use the wrong protocol in some cases. This patch correctly
    initializes the flags fields.

(2) Secondly, when disconnect supervision is not working or
    inbanddisconnect=yes is set in chan_dahdi.conf, app_sms was failing to
    terminate the call after it sent the REL(ease) message and the peer stopped
    talking to it. This patch fixes the code to handle the 'bad stop bit'
    message more gracefully in that case, and hang up the call.

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

ASTERISK-18331 #close
Reported by: David Woodhouse
patches:
  asterisk-fix-sms.patch uploaded by David Woodhouse (License 5754)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-19 01:02:08 +00:00
Rusty Newton
9d9f73cbfe sounds: Fix Sounds Makefile and XML that didn't support new sound prompt sets
In sounds/Makefile

 1 Adds and moves some lines necessary for the en_GB core set. I'm just following how the other sets are defined here.
 2 removes the ES extra sounds related lines as we don't have ES extra sound sets. 

In sounds/sounds.xml

 3 Adds member definitons for EN_AU, EN_GB, IT for core sound sets, and EN_GB in extra sound sets

ASTERISK-23550 #close
Review: https://reviewboard.asterisk.org/r/3464/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 17:15:27 +00:00
Matthew Jordan
49517d41d9 Blocked revisions 412480
........
channels/chan_oss: Fix compilation problem on SmartOS/Illumos/SunOS

THis patch fixes an issue in chan_oss when building on certain platforms. It
ensures that soundcard.h is found.

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

Note that this patch is a part of the patch on ASTERISK-23576; the Makefile
portion only applies to Asterisk 11+.

(issue ASTERISK-23576)
Reported by: Sebastian Wiedenroth
patches:
  fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 20:23:46 +00:00
Matthew Jordan
d78c26ac97 main/Makefile: Fix build failure on SmartOS/Illumos/SunOS
This patch fixes two issues when building on SmartOS:

- channels/chan_oss.c: it makes sure soundcard.h is found
- main/Makefile: only use "-Wl,--version-script" when GNU LD is used as the Sun
  Linker doesn't support that. Similar checks are already used elswhere in the
  Makefile

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

ASTERISK-23576 #close
Reported by: Sebastian Wiedenroth
patches:
  fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 20:06:11 +00:00
Richard Mudgett
bb3b4352ac chan_sip.c: Moved some sip_pvt unrefs after their last use.
* Moved sip_pvt unref in ast_hangup() and handle_request_do() to the end
of the function.  The unref needs to happen after the last use of the
pointer.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 16:23:12 +00:00
Jonathan Rose
1d1cc62fba Reverting r411189 so that it can be put up for public review
---
  r411189 | jrose | 2014-03-26 10:50:48 -0500 (Wed, 26 Mar 2014) | 12 lines

  chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)

  Prior to this patch, the P-Asserted-Identity header would include anonymous
  caller id information which seems to go against the point of the
  P-Asserted-Identity header. Now the real caller ID information will be
  included in this header. Also, no privacy header would be included.
  This patch adds 'Privacy: id' to outgoing SIP messages that include the
  P-Asserted-Identity header.

  (closes issue AST-1301)
---
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 15:40:01 +00:00
Corey Farrell
6bf7f01aee autoservice: fix reference leak of logger callid.
autoservice acquires a local reference to the logger callid of each channel
in a loop.  This local reference was not released, causing the callid of
every channel in autoservice to leak.  This change moves the callid unref
inside the loop.

ASTERISK-23616 #close
Reported by: ibercom


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-14 15:50:30 +00:00
Richard Mudgett
d4b964c29d app_stack: Add missing unlock in off-nominal path of STACK_PEEK function.
ASTERISK-23620 #close
Reported by: Bradley Watkins
Patches:
      ASTERISK-23620_unlock_oldlist.patch (license #5021) patch uploaded by Bradley Watkins
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11 21:38:53 +00:00
Matthew Jordan
33d1220bee main/astobj2: Make REF_DEBUG a menuselect item; improve REF_DEBUG output
This patch does the following:
(1) It makes REF_DEBUG a meneselect item. Enabling REF_DEBUG now enables
    REF_DEBUG globally throughout Asterisk.
(2) The ref debug log file is now created in the AST_LOG_DIR directory.
    Every run will now blow away the previous run (as large ref files
    sometimes caused issues). We now also no longer open/close the file
    on each write, instead relying on fflush to make sure data gets written
    to the file (in case the ao2 call being performed is about to cause a
    crash)
(3) It goes with a comma delineated format for the ref debug file. This
    makes parsing much easier. This also now includes the thread ID of the
    thread that caused ref change.
(4) A new python script instead for refcounting has been added in the
    contrib/scripts folder.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11 02:10:22 +00:00
Richard Mudgett
67ba890a5d Internal timing: Add notice that the -I and internal_timing option are no longer needed.
Add notice messages during execution that the -I command line option and
the astersik.conf internal_timing option are no longer needed.  The
internal timing functionality is now always enabled if there is a timing
module loaded.

NOTE: Since the command line options and the asterisk.conf config file are
processed before the logging system is initialized, the messages are
output to stderr.

Change requested as a result of asterisk-dev list comments about the
commit for ASTERISK-22846 that removed the -I and internal_timing options.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08 21:20:09 +00:00
Richard Mudgett
8382e5fbcc config: Fix CB_ADD_LEN() to work as originally intended.
Fix a long standing bug in CB_ADD_LEN() behaving like CB_ADD().

ASTERISK-23546 #close
Reported by: Walter Doekes
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08 20:50:45 +00:00
Richard Mudgett
e72594e403 app_confbridge: Fix confbridge.conf dsp_talking_threshold option setting wrong parameter.
Fixed copy pasta error.

ASTERISK-23545 #close
Reported by: John Knott


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08 17:58:49 +00:00
Walter Doekes
188d8f2bc7 configs: Clean up long line and typo in res_odbc.conf.sample.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-07 14:48:07 +00:00
Richard Mudgett
45ebd29e10 internal_timing: Remove the option and always make it enabled if a timing module is loaded.
The masquerade supertest frequently fails because either the local channel
chain doesn't completely optimize out or the DTMF handshake doesn't
completely get accross.  Local channel optimization requires frames
flowing to trigger when optimization can happen.  When optimization
happens the media frame that triggered the optimization is dropped.
Sending DTMF requires frames to flow in the other direction for timing
purposes while sending nothing.  If internal timing is not enabled when
MOH is playing, Asterisk switches to received timing when an audio frame
is received.  With optimization dropping media frames and MOH not sending
frames unless it receives frames, occasionaly there are no more frames
being passed and the test fails.

* The asterisk command line -I option and the asterisk.conf
internal_timing option are removed.  Asterisk now always uses internal
timing when needed if any timing module is loaded.  The issue
ASTERISK-14861 did this quite awhile ago in v1.4 but effectively is broken
if other internal timing modules besides DAHDI are used.  The
ast_read_generator_actions() now only does received timing if it has no
choice for frame generators like MOH, silence, and playback streaming.

* Cleaned up some code dealing with frame generators in
ast_deactivate_generator(), generator_write_format_change(),
ast_activate_generator(), and ast_channel_stop_silence_generator().

ASTERISK-22846 #close
Reported by: Matt Jordan

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-04 18:46:18 +00:00
Corey Farrell
6208cfee0d app_voicemail: fix missing symbol
ASTERISK-23391 caused a regression where the symbol 'defaultlanguage'
was used by app_voicemail but not exported by main/asterisk.  This
change renames the variable to ast_defaultlanguage.  The variable was
already renamed in Asterisk 12+.

(closes issue ASTERISK-23559)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3408/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-01 20:43:57 +00:00
Joshua Colp
84a4ba6c68 app_queue: Fix a bug where realtime members would be deleted during reload causing waiting callers to get ejected.
This patch causes realtime queue members to remain in queues during the reload process. Previously these
members would be removed causing any waiting callers to be ejected from the queue with a reason of "EXITEMPTY".

ASTERISK-23547 #close
ASTERISK-23547 #comment Patch app_queue_fix_realtime_reload_1.8_trunk.patch submitted by Italo Rossi (license 6409)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-01 16:49:44 +00:00
Alexandr Anikin
d2fcf48476 process stack command even if gatekeeper client isn't register
don't destroy gatekeeper client if it is not started
don't destroy gatekeeper client in some sort of gatekeeper errors
signal rtp create condition when call cleared before rtp structure created

(closes issue ASTERISK-23460)

Reported by: Dmitry Melekhov
Patches:
	ASTERISK-23460-2.patch

Tested by: Dmitry Melekhov



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 17:44:11 +00:00
Scott Griepentrog
90cb9c4711 http: response body often missing after specific request
This patch works around a problem with the HTTP body
being dropped from the response to a specific client
and under specific circumstances:

a) Client request comes from node.js user agent
   "Shred" via use of swagger-client library.

b) Asterisk and Client are *not* on the same
   host or TCP/IP stack

In testing this problem, it has been determined that
the write of the HTTP body is lost, even if the data
is written using low level write function.  The only
solution found is to instruct the TCP stack with the
shutdown function to flush the last write and finish
the transmission.  See review for more details.


ASTERISK-23548 #close
(closes issue ASTERISK-23548)
Reported by: Sam Galarneau
Review: https://reviewboard.asterisk.org/r/3402/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 16:16:53 +00:00
Matthew Jordan
9655e762aa UPGRADE: Note IAX2 compatibility issue between 1.4 and 1.8+ systems.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 15:43:42 +00:00
Matthew Jordan
45fd6e01bd res_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.
This patch fixes setting nullable integer columns to NULL instead of an empty
string, which fails for PostgreSQL, for example. The current code is supposed
to do so, but the check is broken. The patch also allows the first column in
the list to be a nullable integer.

This patch also adds a compatibility setting in res_odbc.conf,
allow_empty_string_in_nontext. It is enabled by default. It should be disabled
for database backends (such as PostgreSQL) that require NULL instead of an
empty string for Integer columns.

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

(issue ASTERISK-23459)
Reported by: zvision
patches:
  res_config_odbc.diff uploaded by zvision (License 5755)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 04:27:02 +00:00
Matthew Jordan
16fdca5b59 chan_sip: Add MESSAGE request to allowed methods
The allowed methods advertised by chan_sip did not previously note the MESSAGE
request. Even in Asterisk 1.8, we do accept in-dialog MESSAGE requests; we
should advertise that we support MESSAGE requests.

ASTERISK-23504 #close
ASTERISK-23504 #comment Reported by: Martin Kontsek
ASTERISK-23504 #comment Patch sip.h_patch.diff uploaded by Martin Kontsek (license 6587)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 03:51:34 +00:00
Corey Farrell
8fe29356ac Fix dialplan function NULL channel safety issues
(closes issue ASTERISK-23391)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3386/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27 19:13:09 +00:00
Corey Farrell
90fa4e3c36 main/formats: Fix crash in ast_format_cmp during non-clean shutdown.
* Backport ast_register_cleanup from Asterisk 12.
* Use ast_register_cleanup for format_attr_shutdown.

ast_register_cleanup was originally commited in r390122 by dlee.

(closes issue ASTERISK-23103)
Reported by: JoshE


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27 18:18:23 +00:00
Joshua Colp
818f476893 say: Fix a bug where SayNumber in Polish tries to play incorrect sound.
This change fixes a bug where calling SayNumber with a number divisible by
100 using the Polish language would cause the code to attempt to play a
sound file with an empty name.

(closes issue ASTERISK-23509)
Reported by: zvision

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-26 22:44:11 +00:00
Jonathan Rose
6a4e040aa8 chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)
Prior too this patch, the P-Asserted-Identity header would include anonymous
caller id information which seems to go against the point of the
P-Asserted-Identity header. Now the real caller ID information will be
included in this header. Also, no privacy header would be included.
This patch adds 'Privacy: id' to outgoing SIP messages that include the
P-Asserted-Identity header.

(closes issue AST-1301)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-26 15:57:36 +00:00
Kinsey Moore
336ecce920 chan_sip: Fix incorrect use of timers
If update_provisional_keepalive() is called while
send_provisional_keepalive_full() is waiting on the PVT lock, then
pvt->provisional_keepalive_sched_id will be changed to a new sched_id
value by update_provisional_keepalive(), but that new sched_id then may
be overwritten with -1 by send_provisional_keepalive_full(), killing
the pvt's reference to a schedule and "leaking" the reference.

(closes issue ASTERISK-22079)
Review: https://reviewboard.asterisk.org/r/3368/
Reported by: Jamuel Starkey, Matteo, Leif Madsen, Steve Davies
Patches:
    provisional_keepalive_fix.diff uploaded by Steve Davies (license 5012)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-25 15:52:55 +00:00
Joshua Colp
4644a07334 chan_sip: Always use fromdomain if set for domain, even if callerid is set to restricted.
(closes issue ASTERISK-20841)
Reported by: Kelly Goedert
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-24 21:37:26 +00:00
Jonathan Rose
5b0f3c7458 app_confbridge: Fix bug - users with startmuted set don't start muted
(closes issue ASTERISK-23461)
Reported by: Chico Manobela
Review: https://reviewboard.asterisk.org/r/3373/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-20 22:46:11 +00:00
Sean Bright
7199c911d9 res_fax_spandsp: Use g711_free() when available.
Per Johann Steinwendtner on the asterisk-dev mailing list:

http://lists.digium.com/pipermail/asterisk-dev/2014-March/066102.html

g711_free() was introduced in spandsp 0.0.6pre4 and g711_release() became a
noop.  I opted not to remove the call to g711_release() since it is harmless
and to call g711_free() if we have a sufficiently recent version of spandsp.

(issue ASTERISK-20149)
Reported by: Alexandr Gordeev


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18 11:50:13 +00:00
Russ Meyerriecks
d2e4c2208e !fixup: callerid: Logic error in checksum processing
Fixes syntax error in previous commit :-(
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 21:55:37 +00:00
Russ Meyerriecks
4a0a04e5ca callerid: Logic error in checksum processing
Callerid checksum-ing was being handled incorrectly here. When the checksum is
calculated to be 0x00, it will perform 0x100-0x00 which results in 0x100. This
value will then fail the otherwise correct callerid message.

This patch changes the logic to simply add the calculated checksum to the
transmitted 2's compliment checksum.  

Review: https://reviewboard.asterisk.org/r/3356/
(closes issue ASTERISK-23488)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 21:19:49 +00:00
Jonathan Rose
83fe45376c manager: fix memory leak in manager_add_filter function
(closes issue ASTERISK-23420)
Reported by: Etienne Lessard
Patches:
    manager_eventfilter_leak uploaded by Etienne Lessard (license 6394)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 21:12:33 +00:00
Mark Michelson
59ca55e7b7 Remove an extra ast_cond_wait() that slipped through the patch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 20:53:02 +00:00
Mark Michelson
0edf689519 Prevent delayed astdb syncs.
The syncing thread sleeps for a second before waiting to be
told to attempt to sync again. If a signal were sent during this
sleeping period, we would end up having to wait until the next
sync signal occurred in order to sync up the astdb.

This code rearrangement also ensures that any pending transactions
will be synced prior to Asterisk shutting down.

Patches: db_sync.patch by John Hardin (License #6512)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 15:56:43 +00:00
Richard Mudgett
4a3c8065ab app_confbridge: Make explicitly stop MOH if a user is kicked or hangs up while MOH is playing.
When MOH is playing to a user in a conference and the user is kicked or
hangs up from the conference then the AMI MusicOnHoldStop events didn't
happen.  (Asterisk v11 AMI event: MusicOnHold, state:Stop)

(closes issue ASTERISK-23311)
Reported by: Benjamin Keith Ford

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-12 18:35:14 +00:00
Richard Mudgett
771a703366 AST-2014-001: Stack overflow in HTTP processing of Cookie headers.
Sending a HTTP request that is handled by Asterisk with a large number of
Cookie headers could overflow the stack.

Another vulnerability along similar lines is any HTTP request with a
ridiculous number of headers in the request could exhaust system memory.

(closes issue ASTERISK-23340)
Reported by: Lucas Molas, researcher at Programa STIC, Fundacion; and Dr. Manuel Sadosky, Buenos Aires, Argentina
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 17:09:42 +00:00
Kinsey Moore
0c014422c1 AST-2014-002: chan_sip: Exit early on bad session timers request
This change allows chan_sip to avoid creation of the channel and
consumption of associated file descriptors altogether if the inbound
request is going to be rejected anyway.

(closes issue ASTERISK-23373)
Reported by: Corey Farrell
Patches:
     chan_sip-earlier-st-1.8.patch uploaded by Corey Farrell (license 5909)
     chan_sip-earlier-st-11.patch uploaded by Corey Farrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 13:18:55 +00:00
Corey Farrell
099b165e7b chan_sip: Fix deadlock of monlock between unload_module and do_monitor
Release monlock before calling pthread_join.  This ensures do_monitor
cannot freeze by locking monlock during module unload.

(closes issue ASTERISK-21406)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3284/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 22:52:38 +00:00
Matthew Jordan
69fb0d2585 chan_sip: Allow static realtime members to be qualified during module load.
When a static realtime peer with qualify=yes is loaded, Asterisk will fail to
send an OPTIONS request due to the lastms being equal to 0. This results in
the peer being unable to receive calls from Asterisk because the status is
permanently UNKNOWN.

This patch allows an OPTIONS request to be sent during module load by
ignoring the lastms value on startup only.

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

(closes issue ASTERISK-17523)
Reported by: Maciej Krajewski
Tested by: wushumasters
patches:
  realtime_fix_11.7.0.txt uploaded by Trevor Peirce (license 6112)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 04:38:47 +00:00
Russell Bryant
fa1d3b0941 moh: fix a refcount error with realtime MOH
I observed a crash in res_musiconhold on an Asterisk 11 system using realtime
MOH.  Investigation of the backtrace showed a corrupt mohclass, implying that
it got destroyed before the code expected it to.  I went looking for reference
counting errors that could have caused this crash and this patch this result.
It contains 2 changes.

1) Remove a usless block of code that was impossible to reach.  There was even
a comment indicating that it was impossible to reach.  The conditional includes
"!ast_test_flag(global_flags, MOH_CACHERTCLASSES)" and it's inside of an if
block with the opposite check "ast_test_flag(global_flags,
MOH_CACHERTCLASSES)".  There's no good reason to keep it around.

2) A similar block to #1 contained a reference counting error.  It stores
state->class in the local variable mohclass without increasing its reference
count.  The reference count on mohclass is decremented at the end of the
function.  This block of code probably very rarely runs, which would help
explain why this system was working fine for many months before experiencing a
crash.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 23:15:42 +00:00
Matthew Jordan
69192903af res_fax_spandsp: Fix crash when passing ulaw/alaw data to spandsp
When acting as a T.38 fax gateway, res_fax_spandsp would at times cause a crash
in libspandsp. This would occur when, during fax tone detection, a ulaw/alaw
frame would be passed to modem_connect_tones_rx. That particular routine
expects the data to be in slin format. This patch looks at the frame type and,
if the data is ulaw/alaw, converts the format to slin before passing it to
modem_connect_tones_rx.

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

(closes issue ASTERISK-20149)
Reported by: Alexandr Gordeev
Tested by: Michal Rybarik
patches:
  spandsp_g711decode.diff uploaded by Michal Rybarik (license 6578)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 01:58:10 +00:00
Kinsey Moore
a14a4d5194 config: Fix inverted test
The test of the result of the stat() call was inverted such that its
output was only used if the call failed. This inverts the test so that
the output of stat() is used correctly. This was causing full reloads
on unchanged files.

(closes issue ASTERISK-23383)
Reported by: David Woolley
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 20:37:51 +00:00
Mark Michelson
185257db13 Fix documentation for PRESENCE_STATE to properly illustrate how to create a presence hint.
There was a missing comma.
This was discovered by Dan Kaplan.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 18:45:52 +00:00
David M. Lee
647c6859db Corrected cross-platform stat nanosecond code
When nanosecond time resolution was added for identifying config file
changes, it didn't cover all of the myriad of ways that one might obtain
nanosecond time resolution off of struct stat.

Rather than complicate the #if even further figuring out one system from
the next, this patch directly tests for the three struct members I know
about today, and #ifdef's accordingly.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 16:55:52 +00:00
Walter Doekes
c4c22efdeb Blocked revisions 409436
........
buildsystem: Unbreak 'make -qp' on 1.8.

r408083 caused trouble with make -qp. Backport r408193 to 1.8 as well.

(closes issue ASTERISK-23382)
Reported by: Corey Farrell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 15:11:09 +00:00
Sean Bright
4947a0b91b Fix references to 'keys' CLI commands in astgenkey
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 12:04:59 +00:00
Igor Goncharovskiy
c332bb27ed Correct RTP handling in chan_unistim and fix transfer process broken in previous fix:
- Fixed too early RTP setup with phone, that cause no ringback tone on caller side
- Handle call transfer cancel only in STATE_CALL case (related to ASTERISK-23073)

(Reported by: Németh Tamás, niurkin sil)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 06:28:36 +00:00
Igor Goncharovskiy
62a4018771 Add update_peer function to unistim_rtp_glue, improve other unistim_rtp_glue functions conforming to other channel drivers. Do not forget auto-detected and user-selected phone settings on 'unistim reload'
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 05:54:11 +00:00
Moises Silva
7f1450e32c Fix res/res_http_websocket.c build failure in 32bit due to incorrect print format for uint64_t
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 04:55:11 +00:00
Moises Silva
9792c46a09 Fix WebRTC over WSS not working
Several fixes for the WebSockets implementation in res/res_http_websocket.c

* Flush the websocket session FILE* as fwrite() may not actually guarantee sending
  the data to the network. If we do not flush, it seems that buffering on the SSL
  socket for outbound messages causes issues

* Refactored ast_websocket_read to take into account that SSL file descriptors
  may be ready to read via fread() but poll() will not actually say so because
  the data was already read from the network buffers and is now in the libc buffers

(closes issue ASTERISK-23099)
(closes issue ASTERISK-21930)
Review: https://reviewboard.asterisk.org/r/3248/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 00:25:44 +00:00
Michael L. Young
506bfece74 func_audiohookinheritance: Check If A Channel Was Specified
This patch prevents a crash when using the function audiohookinheritance without
setting the channel.

(closes issue ASTERISK-23104)
Reported by: Joel Vandal
Tested by: Joel Vandal
Patches:
    asterisk-23104_audiohook_inherit_no_channel-11.diff
                                     uploaded by Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 19:33:31 +00:00
Kinsey Moore
bac36c6b82 AO2: Add an assert for bad objects
This adds an assert that will only be active if Asterisk is compiled
with DO_CRASH and allows the testsuite to fail tests that would
otherwise require log file parsing.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 16:51:11 +00:00
Jonathan Rose
7e083b9781 res_rtp_asterisk: Fix one way audio problems with hold/unhold when using ICE
ICE sessions will now be restarted if sessions are changed to use new sets of
remote candidates.

(closes issue ASTERISK-22911)
Reported by: Vytis Valentinavičius
Review: https://reviewboard.asterisk.org/r/3275/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 16:40:39 +00:00
Kinsey Moore
b5b1e27266 rtp_engine: Clean up after a failed remote bridge
Upon failure of an INVITE transaction meant to initiate a remote native
bridge, rtp_engine.c would not clean up non-reference-counted bridge
instance pointers leaving a dangling pointer which was being used to
perform a local native bridge after the other channel had hung up. This
lead to dereferencing into freed memory and plenty of AO2 errors. This
change allows the remote native bridge loop to clean up properly when
the bridge fails.

(closes issue ASTERISK-23310)
Reported by: Jeremy Laine
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 15:35:49 +00:00
Sean Bright
51d8abf542 Minor whitespace change to 'sip show peers' output.
(closes issue ASTERISK-23406)
Reported by: ibercom
Tested by: ibercom
Patches:
    asterisk-11.patch uploaded by ibercom
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 14:52:00 +00:00
Matthew Jordan
6224e9521a doxygen: Tweak the link back to ye olde Digium website
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-03 02:07:20 +00:00
Tzafrir Cohen
a223679ae1 Makefile: replace -O6 with -O3
-O6 is not a legal option of gcc. Unofficially gcc considers it to be
equivalent of -O3. clang chalks on it, though. This commit sets the 
default optimization flag to be -O3, like gcc actually considered it.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-02 12:26:17 +00:00
Richard Mudgett
bcf5878c71 chan_sip: Add precautionary p->owner checks.
* Add precautionary p->owner checks in sip_hangup(), get_refer_info(),
get_also_info(), and interpret_t38_parameters().

* Simplify some tangled logic in get_refer_info(), get_also_info(), and
add_rpid().

* Removed some dead code in handle_request_invite().

(closes issue ASTERISK-23323)
Reported by: Walter Doekes
Patches:
      issueA23323-more_p_owner_checks-1.8.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-11.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-12.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-trunk.patch (license #5674) uploaded by wdoekes (modified)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 21:30:50 +00:00
Kinsey Moore
7f2bd4ea18 app_queue: Fix documentation generation
The documentation for QueueMemberPaused was causing documentation
generation to fail because the documentation for that AMI event was in
the wrong location. This moves that documentation the correct location
and adds a missing parameter.

(closes issue SWDAT-261)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 21:13:49 +00:00
Richard Mudgett
16ef371cb9 chan_sip: Fix crash in ast_channel_hangupcause_set().
* Fix crash in ast_channel_hangupcause_set() because p->owner not checked
before calling.  Regression introduced by the fix for ASTERISK-22621.

(closes issue ASTERISK-23135)
Reported by: OK

(issue ASTERISK-23323)
Reported by: Walter Doekes
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 18:00:21 +00:00
Jonathan Rose
c382714769 res_rtp_asterisk: correct build error from r409129
Accidentally placed a declaration below functional code

(issue ASTERISK-23213)
Reported by: Andrea Suisani
Review: https://reviewboard.asterisk.org/r/3256/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 19:38:10 +00:00
Jonathan Rose
8a7ef07f94 res_rtp_asterisk: Fix checklist creating problems in ICE sessions
Prior to this patch, local candidate lists including SRFLX would fail to start
properly when building ICE candidate check lists. This patch fixes that problem
by making sure that each SRFLX candidate is associated with the proper
base address so that the check list can create matches properly.
This patch was written by jcolp. The issue will be left open to await testing
by the issue participants.

(issue ASTERISK-23213)
Reported by: Andrea Suisani
Review: https://reviewboard.asterisk.org/r/3256/




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 19:19:02 +00:00
David M. Lee
280807c109 Fix memory stomping bug in astman.
This memset complained in dev mod on my Ubuntu box. The memset is both
unnecessary and dangerous. At this point, m hasn't been initialized
yet, so the memset will write off to whatever address happens to be
on the stack at the time.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 16:24:20 +00:00
Corey Farrell
78d560157a res_fax: Warn that minrate=2400 is not valid for V.27 instead of failing load.
Change minrate from 2400 to 4800 on config reload in response to changes from
ASTERISK-22790 only.  Any config with minrate of 2400 that would fail before
r405693 will still fail.

Comment out many settings in res_fax.conf.sample. The defaults are set in
res_fax.c, so setting the same value in sample config does nothing but make
the sample config more fragile.

(closes issue ASTERISK-23231)
Reported by: David Brillert
Review: https://reviewboard.asterisk.org/r/3261/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 16:03:56 +00:00
Matthew Jordan
6087765a48 rtp_engine: fix crash during remote native bridging when calling get_codecs
When two RTP channels are in a remote bridge, the remote bridging loop in
rtp_engine will periodically check to see if the two channels can still be
bridged. One of the many things it checks is whether or not the codecs have
changed on the channel. If the codec has changed, it will break out of the
loop to re-determine which type of bridge is appropriate.

In order to perform this check, the ast_rtp_glue virtual table's get_codec
callback is called for each channel. The callback implementations assume
that the channel tech private is valid when called; as such, there has
always been some code in place to check whether or not the channel pvt is
NULL before calling. However, this check is insufficient.

The channels are unlocked during the remote bridging loop. It is possible
for a channel to get masqueraded between the check for the pvt being NULL and
the actual call to get_codec. When this occurs, the callback is called with a
ZOMBIE channel, which now has a NULL pvt. Crash.

While this has always been possible in Asterisk 1.8, it is much more likely to
occur in Asterisk 11 and later versions due to the timing changes that occur
when getting the codec from a channel. Note that this is much more likely to be
reproduced on slow, boggy hardware running Asterisk 11 - but fairly rarely
otherwise.

Also Note: This crash was also caught by the various SIP blind transfer tests,
in addition to the bug report Alec filed.

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

(closes issue ASTERISK-21737)
Reported by: Alec Davis
Tested by: Alec Davis
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409002 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 12:47:29 +00:00
Rusty Newton
8882542192 configs/voicemail.conf.sample - Make mailcmd sample text more explicit
Made the wording a bit more explicit. Didn't really change the meaning.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-25 17:43:09 +00:00
Alexandr Anikin
70184544f9 ignore AST_CONTROL_PVT_CAUSE_CODE without any messages
(closes issue ASTERISK-23336)
Reported by: Alexander Semych



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-22 17:42:56 +00:00
Corey Farrell
5a7221decb Remove extra defines of AST_PBX_MAX_STACK.
* Ensure AST_PBX_MAX_STACK is only defined in extconf.h and pbx.h.
* Fix incorrect function parameters in utils/extconf.c.

(closes issue ASTERISK-23141)
Reported by: Maxim
Review: https://reviewboard.asterisk.org/r/3241/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-22 02:28:07 +00:00
Kevin Harwell
e2dae45080 app_forkcdr: ForkCDR v option does not keep CDR variables for subsequent records
When the 'v' option is specified to ForkCDR application, AST_CDR_FLAG_KEEP_VARS
flag is set only for the first CDR in the chain. So ForkCDR works fine with this
option only once. After the second and further calls to ForkCDR, CDR variables
get cleared on all CDRs besides the first one and moved to the newly forked CDR.
It always sets the KEEP_VARS flag on the first CDR in the chain, instead of the
most recent CDR which is used as a base to fork a new CDR.

This patch sets KEEP_VARS flag on the most recent CDR on the stack (the CDR used
for forking).

(closes issue ASTERISK-23260)
Reported by: zvision
Patches:
     app_forkcdr.diff uploaded by zvision (license 5755)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 20:21:46 +00:00
Kevin Harwell
380516fe2c install_prereq: Missing uuid[-dev] for debian distros
Added uuid and uuid-dev to install prereq script.

(closes issue ASTERISK-23255)
Reported by: Rusty Newton


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 19:04:21 +00:00
Kevin Harwell
574fefa004 rtp_engine: Dynamic payload change in rtp mapping not supported
Asterisk didn't support the dynamic payload change in rtp mapping in the 200
OK response.

Scenario:
Asterisk sends the INVITE proposing alaw and telephone-event, it proposes
rtpmap:101 for telephone-event.  Peer responds with 2xx, it answers with
alaw and telephone-event also, but it proposes a different rtpmap number
(rtpmap:103) for telephone-event.

Expected Behaviour:
Asterisk should honour the rtpmapping in the response and send DTMF packets
using 103 as payload type for DTMF.

Actual Behaviour: Asterisk sends DTMF packets using payload type 101.

With this patch asterisk now supports changes that can occur in the rtp mapping
in the response.

(closes issue ASTERISK-23279)
Reported by: NITESH BANSAL
Review: https://reviewboard.asterisk.org/r/3225/
Patches:
     dynamic_payload_change.patch uploaded by nbansal (license 6418)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 18:25:51 +00:00
Kevin Harwell
1f842e3974 rtp_engine: Output mixup in ${CHANNEL(rtpqos,audio,all)}
Fixed the output of CHANNEL(rtpqos,audio,all) to use txjitter instead
of rxjitter.

(closes issue ASTERISK-23261)
Reported by: rsw686
Patches:
     rtpqos.patch uploaded by rsw686 (license 5887)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 15:58:11 +00:00
Kevin Harwell
abc6d90f72 channel.c: MOH is not working for transferee after attended transfer
Updated the code to check to see if MOH is playing on the transferor and if
so then start it on the channel that replaces it during a masquerade.

Example scenario of the problem:
Alice calls Bob and then Bob begins the attended transfer process into a queue.
Upon going on hold Alice hears music and so does Bob once he is in the queue.
Bob then transfers Alice into the queue and then music for Alice stops even
though she should be hearing it since has now replaced Bob in the queue.

The problem that was occurring is that once the channel was masqueraded the app
(queues, confbridge, etc...) had no way of knowing that the channel had just
been swapped out thus it did not start music for the present channel.

Credit to Olle Johansson for pointing me in the right direction on this issue.

(closes issue ASTERISK-19499)
Reported by: Timo Teräs
Review: https://reviewboard.asterisk.org/r/3226/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 15:27:53 +00:00
Alexandr Anikin
d336863c9c Fix type of roundTripDelay variables
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 10:40:07 +00:00
Michael L. Young
9b6f81af07 app_chanspy: Documentation Update To Clarify "x" Option
When using the "x" option (specify a DTMF digit to exit the application), it is
not obvious in the documentation that this only works when spying on a channel.
If a channel being used to spy on other channels is waiting to connect to a
channel or is no longer attached to a channel, the DTMF is ignored.

As noted on the issue tracker, since there are workarounds available and this is
a rarely used option we are opting for a documentation change here.

(closes issue ASTERISK-22661)
Reported by: Chris Hillman
Patches:
    asterisk-22661-doc-clarify-chan_spy.diff
                                     uploaded by Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 00:47:47 +00:00
Rusty Newton
a378423c8e apps/app_queue - Fix incorrect Macro parameter documentation
Macro is executed on the called channel, not the calling channel.

(closes issue ASTERISK-23069)
Reported By: Bryan Anderson
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20 02:41:16 +00:00
Richard Mudgett
6271995d24 config: Add file size and nanosecond resolution fields to the cached modified config file information.
Repeatedly modifying config files and reloading too fast sometimes fails
to reload the configuration because the cached modification timestamp has
one second resolution.

* Added file size and nanosecond resolution fields to the cached config
file modification timestamp information.  Now if the file size changes or
the file system supports nanosecond resolution the modified file has a
better chance of being detected for reload.

* Added a missing unlock in an off-nominal code path.

(closes issue AST-1303)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 19:05:00 +00:00
Alexandr Anikin
fe57f9d643 process receiveAndTransmit user input remote caps instead of receive only
send receiveAndTransmit user input our caps instead of receive only
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 11:45:31 +00:00
Alexandr Anikin
3276383e22 Allow different socket and signalling ip on h.323 connection if gk mode is active
Reported by: Gabriele Odone
Patches:
	ASTERISK-22738-1.patch
Tested by: Gabriele Odone


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 10:15:46 +00:00
Matthew Jordan
991c953da0 pbx: Handle a completely empty dialplan during a context merge
It is highly unlikely, but - at least in Asterisk 12 - theoretically possible
to load Asterisk with no dialplan whatsoever. If that occurs, and some other
module (that is not a pbx module) attempts to merge its contexts into the
dialplan, the existing merge routine will crash. This is because it is not
insane, and rightly believes that you provided some sort of dialplan,
somewhere.

This patch will gracefully merge the contexts in such a case. Note that this
is highly unlikely to occur in 1.8/11, as features will most likely provide
some dialplan via parking. However, in Asterisk 12, parking is now provided
by res_parking, and hence may create its dialplan later.

(closes issue ASTERISK-23297)
Reported by: CJ Oster

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-16 03:15:49 +00:00
Matthew Jordan
450aa97c29 buildsystem: Unbreak the build (infloop) on Asterisk 11+
Apparently r408084 ( https://reviewboard.asterisk.org/r/3212/ ) broke the
build. This patch fixes it by ignoring the .lastclean dependencies if the
MENUSELECT_EMBED variable is not defined.

patches:
  tmp.diff uploaded by wdoekes (License 5674)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-16 01:47:45 +00:00
Scott Griepentrog
8387e420b9 pbx: ast_custom_function_unregister resource leak
In pbx.c ast_custom_function_unregister(), a list
of escalations being removed from the list wasn't
being free'd creating a leak. This patch corrects
that by freeing the records.

Review: https://reviewboard.asterisk.org/r/3213/
Reported by: Corey Farrell
Patches:
     acf_escalating_leak.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 21:53:38 +00:00
Scott Griepentrog
016326c992 format.c: correct possible null pointer dereference
In ast_format_sdp_parse and ast_format_sdp_generate
the check checks for a valid interface and function
were potentially confusing, and hid an error in the
test of the presence of the function that is called
later.  This patch clears up and corrects the test.

Review: https://reviewboard.asterisk.org/r/3208/
(closes issue ASTERISK-23098)
Reported by: marcelloceschia
Patches:
     main_format.patch uploaded by marcelloceschia (license 6036)
	 ASTERISK-23098.patch uploaded by coreyfarrell (license 5909)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 21:27:09 +00:00
Walter Doekes
44ba436edf buildsystem: Don't force main to depend on everything else.
Directory 'main' only needs to depend on embedded modules. If no
module embedding is selected, the dependency is dropped.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 13:27:34 +00:00
Rusty Newton
389a33f95a configs/agents.conf.sample - Remove example for non-functional "goodbye" parameter
The "goodbye" parameter is not implemented in the source code, it does nothing.

(closes issue SWP-6518)
Reported By: Steve Pitts
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 01:24:22 +00:00
Walter Doekes
05710c7ea5 res_config_pgsql: Fix ast_update2_realtime calls.
Fix so multiple updates from a single call works (add missing ',').
Remove bogus ast_free's that weren't supposed to be there.
Moved a few spaces for readability.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-10 16:34:27 +00:00
Kinsey Moore
2254a05348 ConfBridge: Correct prompt playback target
Currently, when the first marked user enters the conference that
contains waitmarked users, a prompt is played indicating that the user
is being placed into the conference. Unfortunately, this prompt is
played to the marked user and not the waitmarked users which is not
very helpful.

This patch changes that behavior to play a prompt stating
"The conference will now begin" to the entire conference after adding
and unmuting the waitmarked users since the design of confbridge is not
conducive to playing a prompt to a subset of users in a conference in
an asynchronous manner.

(closes issue PQ-1396)
Review: https://reviewboard.asterisk.org/r/3155/
Reported by: Steve Pitts


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-10 15:28:16 +00:00
Tzafrir Cohen
311f2eeada chan_dahdi: handle DAHDI_EVENT_REMOVED on a pri D-Channel
When a DAHDI device is removed at run-time it sends the event
DAHDI_EVENT_REMOVED on each channel. This is intended to signal the
userspace program to close the respective file handle, as the driver of
the device will need all of them closed to properly clean-up.

This event has long since been handled in chan_dahdi (chan_zap at the
time). However the event that is sent on a D-Channel of a "PRI" (ISDN)
span simply gets ignored.

This commit adds handling for closing the file descriptor (and shutting
down the span, while we're at it).

It also adds a CLI command 'pri destroy span <N>' to destroy the span
and its DAHDI channels.

Backported from trunk/12.

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

Merged revisions 394552 394567 from http://svn.asterisk.org/svn/asterisk/trunk
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-09 15:52:58 +00:00
Richard Mudgett
d3834e4a85 chan_iax2: Add some more iaxs[] NULL checks to a routine already full of them.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 20:46:04 +00:00
Richard Mudgett
08d90eeda5 chan_iax2: Block unnecessary control frames to/from the wire.
Establishing an IAX2 call between Asterisk v1.4 and v1.8 (or later)
results in an unexpected call disconnect.  The problem happens because
newer values in the enum ast_control_frame_type are not consistent between
the branch versions of Asterisk.

For example:
1) v1.4 calls v1.8 (or later) using IAX2

2) v1.8 answers and sends a connected line update control frame.  (on v1.8
AST_CONTROL_CONNECTED_LINE = 22)

3) v1.4 receives the control frame as an end-of-q (on v1.4
AST_CONTROL_END_OF_Q = 22)

4) v1.4 disconnects the call once the receive queue becomes empty.

Several things are done by this patch to fix the problem and attempt to
prevent it from happening again in the future:

* Added a warning at the definition of enum ast_control_frame_type about
how to add new control frame values.

* Made block sending and receiving control frames that have no reason to
go over the wire.

* Extended the connectedline iax.conf parameter to also include the
redirecting information updates.

* Updated the connectedline iax.conf parameter documentation to include a
notice that the parameter must be "no" when the peer is an Asterisk v1.4
instance.

(closes issue AST-1302)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 17:56:57 +00:00
Tzafrir Cohen
47048654df indications.conf: add stutter tone; end properly
* If the "stutter" (voicemail indication) tone is indeed a stutter tone,
  and it ends with a constant tone, make sure that it is the dial tone.
  This was done for India (in), Mexico (mx) and the Philippines (ph).
* If no "stutter" tone exists for a country, provide one. This was done for
  Spain (es), Malaysia (my) and Venezuela (ve).

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 13:06:35 +00:00
Rusty Newton
18efd59b14 formats/format_wav: enhancing log message "Not a wav file" to be clear on what is supported
Modifying the log message to be more specific as to what is supported. Specifically it seems format_wav supports only PCM encoded versions with a lower-case '.wav' extension.

(closes issues ASTERISK-22310)
Reported by: Jim Credland
Review: https://reviewboard.asterisk.org/r/3188/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-05 22:59:39 +00:00
Jonathan Rose
cf8998cca7 chan_local: Fix reversed LocalOptimization field in LocalBridge event
(closes issue ASTERISK-23232)
Reported by: Leon Roy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-05 20:37:14 +00:00
Kinsey Moore
96492b9616 Logger: Fix handling of absolute paths
This fixes path handling for log files so that an extra / is not
appended to the file path when the path is absolute (begins with /).
This would previously result in different but functionally equivalent
paths in the output of 'logger show channels'.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-05 20:37:12 +00:00
Richard Mudgett
741dc49934 devicestate: Make ast_devstate_changed_literal() return value and doxygen consistent.
Nothing actually cares about the value anyway.

(closes issue ASTERISK-23178)
Reported by: Jonathan Rose
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04 19:56:05 +00:00
Richard Mudgett
62727f2e00 tcptls.c: Made TLS handle a certificate chain file.
Thanks to Guillaume Martres for doing the necessary research to validate
the change.

(closes issue ASTERISK-17727)
Reported by: LN
Patches:
      use_certificate_chain.patch (license #5864) patch uploaded by st
      documente_certificate_chain.patch (license #6576) patch uploaded by Guillaume Martres
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04 17:58:17 +00:00
Joshua Colp
65e9857f09 res_clialiases: Fix crash when reloading and re-aliasing an alias that is in use.
The code assumed that unregistering the alias would always succeed while in
practice this is not actually true. A common case is the "reload" command itself.
If the cli_aliases.conf configuration file was changed and reload executed the
command would fail to unregister and ultimately point to freed memory.

The reload process now checks whether unregistering succeeded or not and if not
the old CLI alias is retained.

(closes issue ASTERISK-19773)
Reported by: Joel Vandal

(closes issue ASTERISK-22757)
Reported by: Gareth Blades
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04 02:20:52 +00:00
Corey Farrell
3e94a9925c app_stack: protect against missing parameters to STACK_PEEK and LOCAL_PEEK
STACK_PEEK requires 2 parameters and LOCAL_PEEK requires 1 parameter.  This
protects against situations where those parameters are blank or missing by
logging an error and returning.

(closes issue ASTERISK-23220)
Reported by: James Sharp
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-01 00:23:42 +00:00
Matthew Jordan
2bbbf85601 app_dial: Allow macro/gosub pre-bridge execution to occur on priorities
The parsing for the destination of the macro/gosub uses the '^' character to
separate out context, extension, and priority. However, the logic for the
macro/gosub execution was written such that it would only do the actual
macro/gosub jump if a '^' character existed. This doesn't apply when the
macro/gosub jump occurs in a priority/priority label. This patch changes
the logic so that the parsing still occurs, but the jump will occur even
for priorities/priority labels.

(issue ASTERISK-23164)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 23:28:30 +00:00
Corey Farrell
1968d29447 res_rtp_asterisk & udptl: fix port selection to work with SELinux restrictions
ast_bind to a port reserved for another program by SELinux causes
errno == EACCES.  This caused random failures when binding rtp or
udptl sockets.  Treat EACCES as a non-fatal error, try next port.

(closes issue ASTERISK-23134)
Reported by: Corey Farrell
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-30 20:28:40 +00:00
Sean Bright
fd09d365a7 Make a NOTICE about an invalid channel name more useful.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-30 17:32:35 +00:00
Russell Bryant
979f0b3c9c queues.conf.sample Fix documented default for persistentmembers
Closes issue ASTERISK-22662
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-29 00:39:19 +00:00
Kevin Harwell
c84296ef71 cdr_radius, cel_radius: build agains libfreeradius-client
Asterisk's RADIUS module currently build against libradiusclient-ng, but this
project has been superseeded by libfreeradius-client. The API is 99% compatible
except that the header name has changed, the library name has changed, and
the configuration file location has changed.

(closes issue ASTERISK-22980)
Reported by: Jeremy Lainé
Patches:
     freeradius-client.patch uploaded by sharky (license 6561)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 23:10:47 +00:00
Scott Griepentrog
ab09661031 rtp_engine: improved handling of get_rtp_info failure
In ast_rtp_instance_make_compatible(), after a failure of
channel tech call get_rtp_info() to return peer_instance,
the null pointer would be passed to ao2_ref, producing an
error that looked like a refernce counting problem but is
not.  This patch corrects that and adds helpful LOG_ERROR
messages to indicate which failure path occurred.

(issue AST-1276)
Review: https://reviewboard.asterisk.org/r/3156/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 16:40:28 +00:00
Russell Bryant
b2f5dd0bfd Allow nested #includes in extconfig.conf
extconfig.conf was hard-coded to not allow nested includes for some reason.
The code has been this way since a patch was merged for ASTERISK-3333 (revision
4889), which was a significant update to this code ("Merge config updates").

I can't figure out any good reason why this should be limited.  This patch just
removes the limit and uses the default nesting depth limit.

Closes issue ASTERISK-17837

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-27 20:35:25 +00:00
Russell Bryant
b619a405a5 Protect ast_filestream object when on a channel
The ast_filestream object gets tacked on to a channel via
chan->timingdata.  It's a reference counted object, but the reference
count isn't used when putting it on a channel.  It's theoretically
possible for another thread to interfere with the channel while it's
unlocked and cause the filestream to get destroyed.

Use the astobj2 reference count to make sure that as long as this code
path is holding on the ast_filestream and passing it into the file.c
playback code, that it knows it's valid.

Bug reported by Leif Madsen.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-27 01:14:19 +00:00
Richard Mudgett
7a86a88090 tcptls.c: Add missing cleanup on off nominal path.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-26 23:01:31 +00:00
Richard Mudgett
c0bbfe63f9 CEL: Protect data structures during reload and shutdown.
The CEL data structures need to be protected during a configuration reload
and shutdown.  Asterisk crashed during a shutdown because CEL events were
still in flight and the CEL data structures were already destroyed.

* Protected the appset and linkedids ao2 containers using the reload_lock.
As a result appset, linkedids, and held objects don't need a lock.

* Added NULL checks before use of the appset and linkedids ao2 containers
in case the CEL module is already shutdown.

* Fixed overloading of the linkedids held objects reference count.  During
shutdown any held objects would be leaked.

* Fixed memory leak of linkedids held objects if the LINKEDID_END is not
being tracked.  The objects in the linkedids container were not removed if
the LINKEDID_END event is not used.

* Added access protection to the appset container during the CLI "cel show
status" command.

* Made CEL config reload not set defaults if the cel.conf file is invalid.

(closes issue AST-1253)
Reported by: Guenther Kelleter

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 23:07:08 +00:00
Richard Mudgett
637ff12bca manager: Register atexit shutdown routine only once.
* Made register atexit shutdown routine only once in __init_manager().

* Fixed some initial load failure conditions in __init_manager().

* Made reset options to defaults on reload when the reload will actually
happen.

* Removed unnecessary container traversals of the white/black filters
during manager_free_user().

* ast_free() does not need a NULL check before calling.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 21:53:43 +00:00
Jonathan Rose
ab81490ebc res_config_pgsql: Fix a memory leak and use RAII_VAR for cleanup when practical
Review: https://reviewboard.asterisk.org/r/3141/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 21:14:09 +00:00
Richard Mudgett
11d4a03d75 manager: Protect data structures during shutdown.
Occasionally, the manager module would get an "INTERNAL_OBJ: bad magic
number" error on a "core restart gracefully" command if an AMI connection
is established.

* Added ao2_global_obj protection to the sessions global container.

* Fixed the order of unreferencing a session object in session_destroy().

* Removed unnecessary container traversals of the white/black filters
during session_destructor().

(closes issue AST-1242)
Reported by: Guenther Kelleter

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 17:54:18 +00:00
Scott Griepentrog
b072381fb5 pbx.c: Pre-initialize timezone to avoid crash on destroy
In ast_build_timing, initialize the timezone value to NULL
in order to avoid deferencing an uninitialized value later
when calling ast_destroy_timing.  The timezone value could
be uninitialized if ast_build_timing were to fail due to a
zero length time string.

(closes issue ASTERISK-22861)
Reported by: Sebastian Murray-Roberts
Review: https://reviewboard.asterisk.org/r/3134/
Patches:
     ast_build_timing-initialize-timezone.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22 22:18:03 +00:00
Kinsey Moore
5e6a9d0461 ConfBridge: Fix channel parameter documentation
Confbridge AMI and CLI commands for mute, unmute, and setting the
single video source can accept channel prefixes in lieu of a full
channel name, but documentation states only that it is required and is
a channel name. This corrects the documentation.

(closes issue PQ-1397)
Reported by: Steve Pitts


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22 19:31:12 +00:00
Kinsey Moore
9f8388bb14 chan_sip: Decline image streams on unsupported transports
This change allows chan_sip to decline individual image streams over
unsupported transports in the SDP of the 200 response. Previously,
an image stream offer with RTP/AVP as the transport would cause
chan_sip to respond with a 488.

(closes issue ASTERISK-22988)
Reported by: adomjan
Original patch by: adomjan
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22 18:30:18 +00:00
Walter Doekes
d79ae049b3 manager: Clarify eventfilter documentation. Textual changes only.
Review: https://reviewboard.asterisk.org/r/3133/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21 21:05:11 +00:00
Kinsey Moore
4314a33ae2 chan_mgcp: Enforce locking for oseq
This restricts direct usage of global oseq so that all accesses are
locked and threads are not racing to get oseq values that they did not
claim.

This also fixes a build error in res_pktccops under dev mode.

(closes issue ASTERISK-23100)
Reported by: adomjan
Patch by: adomjan
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21 19:59:34 +00:00
Richard Mudgett
916d97c5a0 chan_dahdi/PRI: Suppress CONNECTED_LINE updates when nothing in the udpate is valid.
* Also simplified some subddress handling code.

(closes issue ASTERISK-23008)
Reported by: Michael Cargile
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-20 22:04:50 +00:00
Rusty Newton
9e6407596b Documentation: doc fixes across various parts of the code for ASTERISK issues 23061,23028,23046,23027
Fixes typos of "transfered" instead of "transferred" in various code. Fixes incorrect gosub param help text for app_queue.
Fixes Asterisk man pages containing unquoted minus signs. Adds note about the "textsupport" option in sip.conf.sample.

(issue ASTERISK-23061)
(issue ASTERISK-23028)
(issue ASTERISK-23046)
(issue ASTERISK-23027)
(closes issue ASTERISK-23061)
(closes issue ASTERISK-23028)
(closes issue ASTERISK-23046)
(closes issue ASTERISK-23027)
Reported by: Eugene, Jeremy Laine, Denis Pantsyrev
Patches:
 transferred.patch uploaded by Jeremy Laine (license 6561)
 hyphen.patch uploaded by Jeremy Laine (license 6561)
 sip.conf.sample.patch uploaded by Eugene (license 6360)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17 15:40:37 +00:00
Kevin Harwell
6a7984281d manager: Originate doesn't abort on failed format_cap allocation
action_originate responds to the remote system with an error when cap==NULL,
but doesn't return (abort the originate).  Patched to return.

(closes issue ASTERISK-23034)
Reported by: Corey Farrell
Patches:
     ASTERISK-23034.patch uploaded by coreyfarrell (license 5909)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16 19:51:17 +00:00
Kevin Harwell
b83fb704c9 res_fax: check_modem_rate() returned incorrect rate for V.27
According to the new standard for V.27 and V.32 they are able to transmit
at a bit rate of 4,800 or 9,600.  The check_mode_rate function needed to be
updated to reflect this.  Also, because of this change the default 'minrate'
value was updated to be 4800.

(closes issue ASTERISK-22790)
Reported by: Paolo Compagnini
Patches:
     res_fax.txt uploaded by looserouting (license 6548)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16 18:57:43 +00:00
Joshua Colp
3d1ce59cf2 cel_manager: Don't crash if configuration file is invalid.
The cel_manager module did not properly handle the case where the
configuration file was invalid. The module will now output a warning
message and disable itself if this occurs.

Reported by: Bryan Walters
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-15 16:35:30 +00:00
Scott Griepentrog
7f12e96389 chan_sip: No BYE message sent after INVITE with Replaces
Setting channel state DOWN is an unnecessary step that was
only being done in handle_invite_replaces().  This changes
that by removing the call and reducing locking.

(closes issue ASTERISK-23010)
Reported by: Ryan Tilton
Review: https://reviewboard.asterisk.org/r/3116/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 18:43:56 +00:00
Scott Griepentrog
f8a0a58f0d chan_sip: fix Local From tag on outbound register regression
In ASTERISK-12117, an improvement to insure consistant local from tags
on outbound registrations resulted in an undesirable behavior - caused
by leftover unexpired sip_pvt dialogs (with the previous cseq number),
resulting in many uncessary REGISTER requests.  Instead of significant
rework of transmit_register(), this change deletes the dialogs after a
200 OK response indiciating a successful registration, keeping the old
dialogs from interfering with normal operation.

(closes issue ASTERISK-22946)
Reported by: Stephan Eisvogel
Review: https://reviewboard.asterisk.org/r/3109/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 18:12:52 +00:00
Richard Mudgett
f90a045a36 verbosity: Fix performance of console verbose messages.
The per console verbose level feature as previously implemented caused a
large performance penalty.  The fix required some minor incompatibilities
if the new rasterisk is used to connect to an earlier version.  If the new
rasterisk connects to an older Asterisk version then the root console
verbose level is always affected by the "core set verbose" command of the
remote console even though it may appear to only affect the current
console.  If an older version of rasterisk connects to the new version
then the "core set verbose" command will have no effect.

* Fixed the verbose performance by not generating a verbose message if
nothing is going to use it and then filtered any generated verbose
messages before actually sending them to the remote consoles.

* Split the "core set debug" and "core set verbose" CLI commands to remove
the per module verbose support that cannot work with the per console
verbose level.

* Added a silent option to the "core set verbose" command.

* Fixed "core set debug off" tab completion.

* Made "core show settings" list the current console verbosity in addition
to the root console verbosity.

* Changed the default verbose level of the 'verbose' setting in the
logger.conf [logfiles] section.  The default is now to once again follow
the current root console level.  As a result, using the AMI Command action
with "core set verbose" could again set the root console verbose level and
affect the verbose level logged.

(closes issue AST-1252)
Reported by: Guenther Kelleter

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 17:26:35 +00:00
Matthew Jordan
b12f6bc358 chan_sip: Hangup transferer/transferee when transfer to Parking fails
When performing a SIP transfer to a Park extension, if the Park fails, chan_sip
will currently not hang up either the transferer or the transfer target. This
results in the channels being orphaned with no thread to service frames,
resulting in stuck channels.

This patch immediately hangs up the two channels if a Park fails.

(closes issue ASTERISK-22834)
Reported by: rsw686
Tested by: rsw686

(closes issue ASTERISK-23047)
Reported by: Tommy Thompson
Tested by: Tommy Thomspon

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 15:32:16 +00:00
Matthew Jordan
6d73ecd6e9 res/Makefile: alias dist-clean to distclean
A 'make distclean' is equivalent to 'make dist-clean' in the top most Makefile.
This patch updates the res/Makefile to recognize both distclean and dist-clean.
Note that this is needed for removing build.mak, which can run into problems
if the source file of Asterisk or its path is changed after build.mak is
generated.

(issue ASTERISK-22480)
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-13 21:45:35 +00:00
Richard Mudgett
9556fb2516 Logging callid: Fix some sizeof() references per coding guidelines.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-10 17:50:40 +00:00
Kevin Harwell
dee9ce4a0b res_rtp_asterisk: Fails to resume WebRTC call from hold
In ast_rtp_ice_start if the ice session create check list failed, start check
was never initiated and ice_started was never set to true.  Upon re-entering
the function (for instance, [un]hold) it would try to create the check list
again with duplicate remote candidates.

Fixed so that if the create check list fails the necessary data structures
are properly re-initialized for any subsequent retries.

Note, it was decided to not stop ice support (by calling ast_rtp_ice_stop) on a
check list failure because it possible things might still work.  However, a
debug message was added to help with any future troubleshooting.

(closes issue ASTERISK-22911)
Reported by: Vytis Valentinavičius
Patches:
     works_on_my_machine.patch uploaded by xytis (license 6558)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 16:49:55 +00:00
Matthew Jordan
f9465fd40d app_confbridge: Fix crash caused when waitmarked/marked users leave together
When waitmarked users join a ConfBridge, the conference state is transitioned
from EMPTY -> INACTIVE. In this state, the users are maintined in a waiting
users list. When a marked user joins, the ConfBridge conference transitions
from INACTIVE -> MULTI_MARKED, and all users are put onto the active list of
users. This process works correctly.

When the marked user leaves, if they are the last marked user, the MULTI_MARKED
state does the following:
(1) It plays back a message to the bridge stating that the leader has left the
    conference. This requires an unlocking of the bridge.
(2) It moves waitmarked users back to the waiting list
(3) It transitions to the appropriate state: in this case, INACTIVE

However, because it plays the prompt back to the bridge before moving the users
and before finishing the state transition, this creates a race condition: with
the bridge unlocked, waitmarked users who leave the conference (or are kicked
from it) can cause a state transition of the bridge to another state before
the conference is transitioned to the INACTIVE state. This causes the state
machine to get a bit wonky, often leading to a crash when the MULTI_MARKED state
attempts to conclude its processing.

This patch fixes this problem:
(1) It prevents kicked users from being kicked again. That's just a nicety.
(2) More importantly, it fixes the race condition by only playing the prompt
    once the state has transitioned correctly to INACTIVE. If waitmarked users
    sneak out during the prompt being played, no harm no foul.

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

Note that the patch committed here is essentially the same as uploaded by
Simon Moxon on ASTERISK-22740, with the addition of the double kick prevention.

(closes issue AST-1258)
Reported by: Steve Pitts

(closes issue ASTERISK-22740)
Reported by: Simon Moxon
patches:
  ASTERISK-22740.diff uploaded by Simon Moxon (license 6546)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 15:41:31 +00:00
Walter Doekes
06e1bdd480 "Minimun" typo.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 14:12:40 +00:00
Kinsey Moore
10cf34d36a pbx_lua: Add support for Lua 5.2
This adds support for Lua 5.2 in pbx_lua which is available on newer
operating systems.

(closes issue ASTERISK-23011)
Review: https://reviewboard.asterisk.org/r/3075/
Reported by: George Joseph
Patch by: George Joseph
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-08 16:17:32 +00:00
Kinsey Moore
05f0ad2c56 UPGRADE: Add a note about non-functionality
Add a note that the "retry on 403 response to REGISTER" for chan_sip is
non-functional in the versions in which it was first introduced.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-08 15:43:45 +00:00
Kinsey Moore
9433c584d8 Add the missing part of r400140
When the patch to add retry-on-forbidden-response was committed, part
of the patch for chan_sip was not committed which caused the feature to
be entirely nonfunctional. This corrects the code in question.

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2874
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-07 20:45:15 +00:00
Tzafrir Cohen
fec771b7c8 asterisk.c: suppress live_dangerously warning on rasterisk
Even since the fixes of AST-2013-007, Asterisk prints the following
warning on startup if the user decided to live dangerously:

  Privilege escalation protection disabled!
  See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.

This message is intended for the logs and interactive startup. No need
for it to appear on a remote console. This commit removes it from there.

(closes issue ASTERISK-23084)
Review: https://reviewboard.asterisk.org/r/3101/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 22:24:18 +00:00
Kevin Harwell
4b7d8e4df4 cel_pgsql: module not correctly reloading
Upon reload the module unconditionally "unloaded" the module (freeing memory
and setting pointers to NULL) and then when attempting a "load" if the config
file had not changed then nothing would be reinitialized.

By moving the "unload" to occur conditionally (reload only) after an attempted
configuration load, but before module "loading" alleviates the issue. The module
now loads/unloads/reloads correctly.

(closes issue ASTERISK-22871)
Reported by: Matteo
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 21:58:17 +00:00
Kevin Harwell
dd413377dc chan_dahdi: dahdi show channels slices PRI channel dnid on output
dahdi show channels output slices the callerid (which is dnid copied over on
PRI channels). If the channel naming structures look like:

 'DAHDI/i1/1408409XXXX-6'

then the output slices 1408409XXXX down to 1408409XXX. This patch just opens
it up to 15 chars so you can see the whole thing.

(closes issue ASTERISK-22918)
Reported by: outtolunc
Patches:
     svn_chan_dahdi.c.format12_15.diff.txt uploaded by outtolunc (license 5198)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 18:57:59 +00:00
Kevin Harwell
a8393e64bc app_meetme: compiler warning
Fixed a compiler warning (errors in 'dev-mode') given by gcc version 4.8.1.
The one in app_meetme involved the 'sizeof-pointer-memaccess'
(see: http://gcc.gnu.org/gcc-4.8/porting_to.html) warning. Fixed so
it would no longer issue a warning and can compile again in 'dev-mode'.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 18:27:25 +00:00
Scott Griepentrog
0abb5b9e18 func_strings: use memmove to prevent overlapping memory on strcpy
When calling REPLACE() with an empty replace-char argument, strcpy
is used to overwrite the the matching <find-char>.  However as the
src and dest arguments to strcpy must not overlap, it causes other
parts of the string to be overwritten with adjacent characters and
the result is mangled.  Patch replaces call to strcpy with memmove
and adds a test suite case for REPLACE.

(closes issue ASTERISK-22910)
Reported by: Gareth Palmer
Review: https://reviewboard.asterisk.org/r/3083/
Patches:
    func_strings.patch uploaded by Gareth Palmer (license 5169)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-02 19:35:54 +00:00
Kevin Harwell
27eb7cc704 cel_pgsql: deadlock on unload and core_event_dispatcher
A deadlock can happen between a thread unloading or reloading the cel_pgsql
module and the core_event_dispatcher taskprocessor thread. Description of
what is happening:

Thread 1 (for example, a netconsole thread):

    a "module reload cel_pgsql" is launched
    the thread enter the "my_unload_module" function (cel_pgsql.c)
    the thread acquire the write lock on psql_columns
    the thread enter the "ast_event_unsubscribe" function (event.c)
    the thread try to acquire the write lock on ast_event_subs[sub->type]

Thread 2 (core_event_dispatcher taskprocessor thread):

    the taskprocessor pop a CEL event
    the thread enter the "handle_event" function (event.c)
    the thread acquire the read lock on ast_event_subs[sub->type]
    the thread callback the "pgsql_log" function (cel_pgsql.c), since it's a subscriber of CEL events
    the thread try to acquire a read lock on psql_columns

(closes issue ASTERISK-22854)
Reported by: Etienne Lessard
Patches:
     cel_pgsql_fix_deadlock_event.patch uploaded by hexanol (license 6394)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-31 21:26:00 +00:00
Kevin Harwell
864d62349b channels.c: core show channeltypes slicing
'core show channeltypes' type column is being sliced, resulting in incomplete
type names.

(closes issue ASTERISK-22919)
Reported by: outtolunc
Patches:
     svn_channel.c.format_15.diff.txt uploaded by outtolunc (license 5198)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-30 23:16:04 +00:00
Scott Griepentrog
f7a03cc968 say.c: correct time for polish
In ast_say_date_with_format_pl(), change ast_say_number() to
use tm_sec instead of tm_mn.

(closes issue ASTERISK-22856)
Reported by: Robert Mordec
Review: https://reviewboard.asterisk.org/r/3082/
Patches:
     say.c.patch uploaded by veilen (license 6555)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20 21:15:41 +00:00
Scott Griepentrog
1f1ac57bbe res_fax.c: crash on framehook with no dsp in fax detect
In fax_detect_framehook() a null pointer reference can occur where a
voice frame is processed but no dsp is attached to the fax detection
structure.  The code block that rejects frames that detection cannot
be processed on is checking for dsp but falls through when it should
instead return, as this change implements.

(closes issue ASTERISK-22942)
Reported by: adomjan
Review: https://reviewboard.asterisk.org/r/3076/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19 16:57:29 +00:00
Scott Griepentrog
e87fa7d731 astdb: crash in sqlite3 during shutdown
When Asterisk is shut down, the astdb_atexit() function releases
(finalize) the previously initiated (prepared) SQL statements in
sqlite3.  Another thread making a subsequent request can cause a
crash in sqlite3.  This patch eliminates that issue by resetting
the statement pointer after it is released/cleared.  The sqlite3
code detects the null pointer, and aborts the operation cleanly.

(closes issue AST-1265)
Reported by: Alexander Hömig
(closes issue ASTERISK-22350)
Reported by: Birger "WIMPy" Harzenetter
Review: https://reviewboard.asterisk.org/r/3078/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19 16:30:33 +00:00
Alexandr Anikin
c9b2d2ee68 Handle temporary failures on gk registration
Introduce new 'stopped' state for gk client and restart gk client
on failures
Remove ooh323 stack command lock as it is not need now.
(closes issue ASTERISK-21960)
Reported by: Dmitry Melekhov
Patches:
	ASTERISK-21960.patch
	ASTERISK-21960-stacklockup-2.patch
Tested by: Dmitry Melekhov



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19 08:15:45 +00:00
Jason Parker
38c1c1de83 Add AMI event for presence state.
Review: https://reviewboard.asterisk.org/r/3039/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18 22:34:21 +00:00
Richard Mudgett
2b39b36de8 ooh323c: Fix gcc 4.6.3 compiler warnings.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18 20:19:30 +00:00
Joshua Colp
d9b7ce0599 res_calendar: Protect channel when adding datastore.
This change adds a missing channel lock when adding a datastore
to a channel.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18 11:59:49 +00:00
Rusty Newton
acaa978d71 func_strings: Documentation fix for QUOTE()
Example output was inaccurate.

(issue ASTERISK-22970)
(closes issue ASTERISK-22970)
Reported by: Gareth Palmer
Patches:
   func_strings.patch uploaded by Gareth Palmer (license 5169)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18 00:28:49 +00:00
Rusty Newton
05117c87b7 Several components: fixing Typos in comments and code, "avaliable" instead of "available"
(issue ASTERISK-23021)
(closes issue ASTERISK-23021)
Reported by: Jeremy Lainé
Tested by: Rusty Newton
Patches:
   available.patch uploaded by Jeremy Lainé (license 6561)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@404045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-17 23:35:07 +00:00
David M. Lee
a9ee948e90 security: Inhibit execution of privilege escalating functions
This patch allows individual dialplan functions to be marked as
'dangerous', to inhibit their execution from external sources.

A 'dangerous' function is one which results in a privilege escalation.
For example, if one were to read the channel variable SHELL(rm -rf /)
Bad Things(TM) could happen; even if the external source has only read
permissions.

Execution from external sources may be enabled by setting
'live_dangerously' to 'yes' in the [options] section of asterisk.conf.
Although doing so is not recommended.

(closes issue ASTERISK-22905)
Review: http://reviewboard.digium.internal/r/432/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@403917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-16 17:14:14 +00:00
Scott Griepentrog
faf4f6187b pbx.c: put copy of ast_exten.data on stack to prevent memory corruption
During dialplan execution in pbx_extension_helper(), the contexts global
read lock prevents link list corruption, but was released with a pointer
to the ast_exten and data later used in variable substitution.  Instead,
this patch removes pbx_substitute_variables() and locates a copy of the
ast_exten data on the stack before releasing the lock, where ast_exten
could get free'd by another thread performing a module reload.

(issue AST-1179)
Reported by: Thomas Arimont
(issue AST-1246)
Reported by: Alexander Hömig
Review: https://reviewboard.asterisk.org/r/3055/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@403863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-16 15:55:04 +00:00
Scott Griepentrog
8d5186ef53 app_sms: BufferOverflow when receiving odd length 16 bit message
This patch prevents an infinite loop overwriting memory when
a message is received into the unpacksms16() function, where
the length of the message is an odd number of bytes.

(closes issue ASTERISK-22590)
Reported by: Jan Juergens
Tested by: Jan Juergens
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@403855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-16 15:25:37 +00:00
Russell Bryant
788dccff42 Reset peer outboundproxy on sip.conf reload
If you set a peer's outboundproxy and then removed it from the config,
this would not get picked up in a config reload.  This patch fixes that
by resetting it in set_peer_defaults().

Closes ASTERISK-19454
Review: https://reviewboard.asterisk.org/r/3065/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@403635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 19:14:52 +00:00
Matthew Jordan
e7d81f02e5 res_fax_spandsp: Always init T.38 session to avoid crashes during state change
Prior to this patch, res_fax_spandsp was conservative with how it initialized
the spandsp T.38 context. It would only initialize it if the driver thought
the current state was a T.38 fax. While this works fine in nominal situations,
in certain off nominal situations, res_fax_spandsp can believe that a T.38
fax will not occur when in fact one has started. In particular, this was
discovered when res_fax would fall back to audio after timing out on a T.38
upgrade. The SIP channel driver would continue to retry the re-INVITE and -
if the remote end responded after res_fax timed out with a 200 OK - a T.38
frame would be delivered to the res_fax stack when it no longer expected it.

As it turns out, there does not appear to be any downside to always
initializing the T.38 context, other than the actual memory allocation.
Since that avoids this off nominal situation (and others which are equally
likely hard to predict), this is the safest way to avoid this problem.

Much thanks to Torrey as well for providing a scenario that reproduces this
issue.

(closes issue ASTERISK-21242)
Reported by: Ashley Winters
Tested by: Torrey Searle
patches:
  always-init-t38.patch uploaded by awinters (License 6477)
  A_PARTY.xml uploaded by tsearle (License 5334)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@403450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 03:11:05 +00:00
Alexandr Anikin
6861233e52 Check and reject non-digits e164 values on peers and general sections in ooh323.conf
Regenerate e164 endpoint list on reload ooh323
(issue ASTERISK-22901)
Reported by: Cyril CONSTANTIN
Patches:
	ASTERISK-22901.patch



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@403288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-02 17:55:49 +00:00
Joshua Colp
bef4ec92ad translate: Move freeing of frame to after it is used.
When translating from one format to another it is possible
to inform the translation function that the source frame should
be freed. This was previously done immediately but shortly
afterwards the frame that was freed was accessed and used again.

This change moves code around a bit so that the frame is now
freed after it has been completely used.

(closes issue ASTERISK-22788)
Reported by: Corey Farrell
Patches:
	translate-access-after-free-11up.patch uploaded by coreyfarrell (license 5909)
	translate-access-after-free-1.8.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@403015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22 17:11:07 +00:00
Kinsey Moore
c5c9050b89 chan_dahdi: Fix crash during caller ID read
Asterisk will sometimes core dump during caller id read on analog
channels due to a negative return value from the read() in
my_get_callerid that slips through as a negative length argument to
callerid_feed() if the errno returned by DAHDI is ELAST. This change
ensures that the negative return is treated properly even when it is
ELAST.

(closes issue ASTERISK-22746)
Reported by: Michael Walton
Patches:
    chan_dahdi_cid_crash_fix.r401410.patch uploaded by Michael Walton (License 6502)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 15:00:36 +00:00
Mark Michelson
6d85bb82e1 Get rid of some inaccurate comments.
I'm doing some unrelated work in app_confbridge and finding
these "invalid pin" comments to be annoying. Get out!



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-11 19:26:08 +00:00
Kinsey Moore
3b3c9f38f4 app_queue: Honor penalty limits of 0
In the current app_queue code from 1.8 up to trunk the upper and lower
penalties can be set to 0 but the value is interpreted to be disabled
instead of actually setting limits. This is especially evident if min
and max limits are set to 0 and members with penalties of 0 and 1 are
in the queue since the member with penalty 1 will still receive calls.
This patch adjusts the special disabled value to be INT_MAX instead of
0.

(closes issue ASTERISK-20862)
Review: https://reviewboard.asterisk.org/r/2995/
Reported by: Schmooze Com
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-11 15:35:22 +00:00
Scott Griepentrog
fe7c661e12 chan_sip: keep same local (from) tag for outgoing register requests
For outbound register requests the tag on the From line was
updated every 20 seconds prior to a successful registration
and also once for each registration renewal.  That behavior
can possibly cause the registration to be denied because of
the different tag, and is not aligned with the intention of
RFC 3261 8.1.3.5 "... request constitutes a new transaction
and SHOULD have the same value of the Call-ID, To, and From
of the previous request...".  This updates chan_sip to have
a field to keep the local tag in the registration structure
and use that tag for registration requests where the callid
is also unchanged.

(closes issue ASTERISK-12117)
Reported by: Pawel Pierscionek
Review: https://reviewboard.asterisk.org/r/2988/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08 22:48:34 +00:00
Kevin Harwell
5b51b31321 Recorded merge of revisions 402468 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
chan_sip: notify dialog info ignores presentation indicator in callerid

The presentation indicator in a callerid (e.g. set by dialplan function
Set(CALLERID(name-pres)= ...)) is not checked when SIP Dialog Info Notifies
are generated during extension monitoring.  Added a check to make sure the
name and/or number presentations on the callee (remote identity) are set to
allow.  If they are restricted then "anonymous" is used instead.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-05 15:11:07 +00:00
Kevin Harwell
1664326ba9 chan_sip: notify dialog info ignores presentation indicator in callerid
The presentation indicator in a callerid (e.g. set by dialplan function
Set(CALLERID(name-pres)= ...)) is not checked when SIP Dialog Info Notifies
are generated during extension monitoring.  Added a check to make sure the
name and/or number presentations on the callee (remote identity) are set to
allow.  If they are restricted then "anonymous" is used instead.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-04 20:52:58 +00:00
Richard Mudgett
864163492c confbridge: Separate user muting from system muting overrides.
The system overrides the user muting requests when MOH is playing or a
waitmarked user is waiting for a marked user to join.  System muting
overrides interfere with what the user may wish the muting to be when the
system override ends.

* User muting requests are now independent of the system muting overrides.
The effective muting is now the logical or of the user request and system
override.

* Added a Muted column to the CLI "confbridge list <conference>" command.

* Added a Muted header to the AMI ConfbridgeList action ConfbridgeList
event.

(closes issue AST-1102)
Reported by: John Bigelow

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-02 02:11:03 +00:00
Richard Mudgett
1f051c7e2d config: Allow ConfBridge DTMF menus to have '#' as the first digit.
ConfBridge allows custom DTMF menus to be created in the confbridge.conf
file by assigning a DTMF key sequence to a sequence of actions as follows:

DTMF-sequence = action,action...

Unfortunately, the normal config file processing code interprets an
initial '#' character as starting a directive such as #include.

* Add the ability to escape the first non-blank character in a config line
so the '#' character can be used without triggering the directive
processing code.

(closes issue AFS-2)
(closes issue ASTERISK-22478)
Reported by: Nicolas Tanski
Patches:
      jira_asterisk_22478_v11.patch (license #5621) patch uploaded by rmudgett (modified)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-01 23:52:45 +00:00
Kinsey Moore
2d5debf45c chan_sip: Fix RTCP port for SRFLX ICE candidates
This corrects one-way audio between Asterisk and Chrome/jssip as a
result of Asterisk inserting the incorrect RTCP port into RTCP SRFLX
ICE candidates. This also exposes an ICE component enumeration to
extract further details from candidates.

(closes issue ASTERISK-21383)
Reported by: Shaun Clark
Review: https://reviewboard.asterisk.org/r/2967/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-01 12:31:49 +00:00
Matthew Jordan
45a6969b3c core/loader: Don't call dlclose in a while loop
For awhile now, we've noticed continuous integration builds hanging on CentOS 6
64-bit build agents. After resolving a number of problems with symbols, strange
locks, and other shenanigans, the problem has persisted. In all cases, gdb
shows the Asterisk process stuck in loader.c on one of the infinite while loops
that calls dlclose repeatedly until success.

The documentation of dlclose states that it returns 0 on success; any other
value on error. It does not state that repeatedly calling it will eventually
clear those errors. Most likely, the repeated calls to dlclose was to force a
close by exhausting the references on the library; however, that will never
succeed if:
(a) There is some fundamental error at work in the loaded library that
    precludes unloading it
(b) Some other loaded module is referencing a symbol in the currently loaded
    module

This results in Asterisk sitting forever.

Since we have matching pairs of dlopen/dlclose, this patch opts to only call
dlclose once, and log out as an ERROR if dlclose fails to return success. If
nothing else, this might help to determine why on the CentOS 6 64-bit build agent
things are not closing successfully.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-31 15:59:50 +00:00
Rusty Newton
4390105b3d Updates for 1.4.25 core sounds and 1.4.14 extra sounds, plus new en_GB language set
The new sound packages relate to issues: ASTERISK-22544, ASTERISK-22411, ASTERISK-21413, ASTERISK-20782
Modified sounds/Makefile for the new sound versions and to account for the new en_GB language set.

(issue ASTERISK-22659)
(closes issue ASTERISK-22659)
(closes issue ASTERISK-22411)
(closes issue ASTERISK-22544)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-29 23:42:45 +00:00
Matthew Jordan
3fd342af8c Remove some spammy debug messages; improve clarity of others
Debug messages aren't free. Even when the debug level is sufficiently low such
that the messages are never evaluated, there is a cost to having to parse
Asterisk logs that contain debug messages that (a) fail to convey sufficient
information or (b) occur so frequently as to be next to meaningless. Based on
having to stare at lots of DEBUG messages, this patch makes the following
changes:

* channel.c: When copying variables from a parent channel to a child channel,
  specify the channels involved. Do not log anything for a variable that is not
  inherited; the fact that it doesn't have an _ or __ already signifies that it
  won't be inherited.
* pbx.c: Specify what function evaluation has occurred that created the result.
* translate.c: Bump up the translator path messages to 10. I've never once had
  to use these debug messages, and for each format that is registered (on
  startup) and unregistered (on shutdown) the entire f^2 matrix is logged out.
  For short tests in the Asterisk Test Suite, this should make finding the
  actual test much easier.
* xmldoc.c: The debug message that 'blah' is not found in the tree is expected.
  Often, description elements - which are not required - are not provided.
  This debug message adds no additional value, as it is not indicative of an
  error or helpful in debugging which element did not contain a 'blah' element
  as a child. If an element is supposed to contain a child element, then that
  XML tree should have failed validation in the first place.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-29 12:49:53 +00:00
Michael L. Young
9731431f08 chan_sip: Clarify 'Forcerport' Setting Displayed When Running "sip show peers"
While looking at ASTERISK-22236, Walter Doekes pointed out that when running
"sip show peers", the setting being displayed can be confusing.  The display of
"N" used to mean NAT (i.e. yes).  The NAT setting has gone through many
different changes resulting in the display of different characters to try and
convey what the current setting is for 'Forcerport' (A for Auto and Forcerport
is currently on, a for Auto but Forcerport is off, Y for yes, and N for no).
During the initial code review to try and clarify these settings (especially
since "N" no longer meant what it used to mean in prior versions of Asterisk),
Mark Michelson suggested using the full space available to display the settings
which helped to make the settings very clear.  That was a great suggestion.

Therefore, this patch does the following:

* The column for 'Forcerport' now will show: Auto (Yes), Auto (No), Yes, or No.

* A column for the 'Comedia' setting has been added.  It too will display the
  setting in a non-cryptic way: Auto (Yes), Auto (No), Yes, or No.

* UPGRADE.txt has been updated to document this change.

(closes issue ASTERISK-22728)
Reported by: Walter Doekes
Tested by: Michael L. Young
Patches:
    asterisk-forcerport-display-clarification_v3.diff
                                     uploaded by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-28 14:50:12 +00:00
Scott Griepentrog
90da875326 rtp_engine: fix rtp payloads copy and improve argument names
In function ast_rtp_instance_early _bridge_make_compatible the
use of instance 0/1 as arguments doesn't clearly communicate a
direction that the copying of payloads from the source channel
to the destination channel will occur, making it more probable
to have the arguments to ast_rtp_codecs_payloads_copy() put in
the reverse order.  This patch renames the arguments with _dst
and _src suffixes and corrects the copy direction.

(closes issue ASTERISK-21464)
Reported by: Kevin Stewart
Review: https://reviewboard.asterisk.org/r/2894/
........

Merged revisions 402000 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Test shows rtpmap:119 being copied per this change, but is not in sip invite


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@402042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 23:32:19 +00:00
Scott Griepentrog
53b25ff6eb pbx.c: fix confused match caller id that deleted exten still in hash
This fixes a bug where a zero length callerid match adjacent to a no
match callerid extension entry would be deleted together, which then
resulted in hashtable references to free'd memory.  A third state of
the matchcid value has been added to indicate match to any extension
which allows enforcing comparison of matchcid on/off without errors.

(closes issue AST-1235)
Reported by: Guenther Kelleter
Review: https://reviewboard.asterisk.org/r/2930/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 20:44:40 +00:00
Jonathan Rose
c2e28fae9c Put clicompat-r2.patch back in
We've figured out how to resolve the problems this was causing in 12/trunk,
so this can go back in now.

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    clicompat-r2.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 17:29:26 +00:00
Jonathan Rose
c10d4cf11c revert clicompat-r2.patch from r401704
Patch caused the following build errors against testsuite
https://bamboo.asterisk.org/bamboo/browse/AST-ATRUNKBUILD4-244

(issue ASTERISK-22467)
Reported by: Corey Farrell
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 16:43:49 +00:00
Kevin Harwell
b0288cc8ad chan_sip: Allow a sip peer to accept both AVP and AVPF calls
Adapts the behaviour of avpf to only impact the format of outgoing calls. For
inbound calls, both AVP and AVPF calls will be accepted regardless of the value
of avpf in the configuration.

(closes issue ASTERISK-22005)
Reported by: Torrey Searle
Patches:
     optional_avpf_trunk.patch uploaded by tsearle (license 5334)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25 16:05:55 +00:00
Kevin Harwell
cb6492b7e2 Logging: Logging types ignored after specifying a verbose level
If one specified a verbose level within a logging facility in
logger.conf then any component after it was ignored.  Fixed so
all values are correctly read.

(closes issue ASTERISK-22456)
Reported by: Kevin Harwell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 20:44:09 +00:00
Jonathan Rose
a941dc3159 utils: Fix memory leaks and missed unregistration of CLI commands on shutdown
Final set of patches in a series of memory leak/cleanup patches by Corey Farrell

(closes issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    main-utils-1.8.patch uploaded by coreyfarrell (license 5909)
    main-utils-11.patch uploaded by coreyfarrell (license 5909)
    main-utils-12up.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 20:33:37 +00:00
Jonathan Rose
b59d4497fe test_linkedlists: Fix memory leak
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    test_linkedlists-1.8.patch uploaded by coreyfarrell (license 5909)
    test_linkedlists-11up.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 19:55:23 +00:00
Jonathan Rose
19457016bd jitterbuf: Fix memory leak on jitter buffer reset
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    jitterbuf-jb_reset-leak-1.8.patch
    jitterbuf-jb_reset-leak-11up.patch
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 19:41:07 +00:00
Jonathan Rose
d4da5d79bf astobj2: Unregister debug CLI commands at exit
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    astobj2-clean-debug-cli-1.8-11.patch uploaded by coreyfarrell (license 5909)
    astobj2-clean-debug-cli-12up.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 19:28:10 +00:00
Jonathan Rose
9dae9a5644 app_voicemail: Memory Leaks against tests
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    app_voicemail-1.8.patch uploaded by coreyfarrell (license 5909)
    app_voicemail-11up.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 18:44:38 +00:00
Jonathan Rose
037dee9eaa memory leaks: Memory leak cleanup patch by Corey Farrell (second set)
Also covers ast_app_parse_timelen-fail-zero-length.patch, but the patch was
replaced with one of my own.

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    chan_dahdi-cleanup_push.patch uploaded by coreyfarrell (license 5909)
    clicompat-r2.patch uploaded by coreyfarrell (license 5909)
    codecs-ilbc-doCPLC.patch uploaded by coreyfarrell (license 5909)
    data-cleanup-test-registration.patch uploaded by coreyfarrell (license 5909)
    main-asterisk-kill-listener.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 16:40:59 +00:00
Jonathan Rose
bab6b3610a memory leaks: Memory leak cleanup patch by Corey Farrell (first set)
(issue ASTERSIK-22467)
Reported by: Corey Farrell
Patches:
    chan_sip-parse_contact_header_test-free-contacts.patch uploaded by coreyfarrell (license 5909)
    cli-filename-completion-leak.patch uploaded by coreyfarrell (license 5909)
    func_math.patch uploaded by corefarrell (license 5909)
    main-test-cleanup.patch uploaded by coreyfarrell (license 5909)
    test_dlinklists.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 19:55:05 +00:00
Jonathan Rose
4241f7b6ea res_rtp_asterisk: Address jittery DTMF events in RTP streams
(closes issue ASTERISK-21170)
Reported by: NITESH BANSAL
Patches:
    dtmf-timestamp.patch uploaded by NITESH BANSAL (license 6418)
Review: https://reviewboard.asterisk.org/r/2938/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 17:37:15 +00:00
Richard Mudgett
4e5291c1db cdr_adaptive_odbc: Also apply a filter when the CDR value is empty.
Extra CDR records are written if a filtered CDR value is empty because the
filter is not checked.

(closes issue ASTERISK-22272)
Reported by: Jordi Llull Chavarria
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 16:46:26 +00:00
Kinsey Moore
c932415383 chan_mgcp: Properly handle malformed media lines
This corrects a situation in which a media line was not parsed properly
and resulted in a crash.

(closes issue ASTERISK-21190)
Reported by: adomjan
Patches:
    chan_mgcp.c-sscnaf_fix uploaded by adomjan (License 5448)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 15:22:54 +00:00
Joshua Colp
aa0fcfff6b chan_sip: Fix an issue where an incompatible audio format may be added to SDP.
If preferred codecs included any non-audio format the code would
mistakenly add the audio format, even if it was not a joint capability
with the remote side.

(closes issue ASTERISK-21131)
Reported by: nbougues
Patches:
	patch_unsupported_codec_1.8.patch uploaded by nbougues (license 6470)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 11:11:18 +00:00
Matthew Jordan
0336f4b606 res_rtp_asterisk: Fix crash when RTCP is not available during SSRC change
In r400089, a patch was put in to correct erroneous RTCP statistic resets.
Unfortunately, ast_rtp_read can be called on an RTP instance that does not
have RTCP information. This patch prevents that crash by only resetting
the statistics if we do actually have an RTCP instance.

(issue AST-1174)

(closes issue ASTERISK-22667)
Reported by: John Bigelow
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-22 22:42:24 +00:00
Richard Mudgett
2a40f6219a app_queue: Fix CLI "queue remove member" queue_log entry.
The queue_log entry resulting from CLI "queue remove member" when
log_membername_as_agent is enabled is wrong.  It always uses the interface
name instead of the member name in the queue_log entry.

* Get the queue member before removing it from the queue so the member
name is available for the queue_log entry.

(closes issue ASTERISK-21826)
Reported by: Oscar Esteve
Patches:
      fix_membername.diff (license #6505) patch uploaded by Oscar Esteve
         (modified to fix potential ref leak)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-22 19:02:15 +00:00
Richard Mudgett
c1066265ad chan_dahdi: Fix unable to get index warning when transferring an analog call.
Transferring an analog call using flashhooks generated an unable to get
index WARNING message when the transfer is completed.

* Removed unnecessary analog subchannel shell games when transferring a
call using flashhooks.

Thanks to Tzafrir Cohen for mentioning this in a comment on issue
ASTERISK-22720.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-22 00:16:24 +00:00
Kevin Harwell
a1ddd8987d Segfault in LIBEDIT_INTERNAL after tgetstr(), when libncurses5-dev
isn't installed

Include the appropriate declarations when not using termcap, but term+curses
and [n]curses do not exist.

(closes issue ASTERISK-22351)
Reported by: A. Iglesias
Patches:
    issueA22351_libedit_internal_without_ncurses_dev.patch uploaded by wdoekes (license 5674)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-21 19:46:22 +00:00
Michael L. Young
44826ac192 Remove Port Restriction When Checking For NAT
When trying to determine if a peer is behind NAT, we should not be using the
ports when comparing addresses.

This patch removes the port from being checked and just useds the addresses
now.

(closes issue ASTERISK-22729)
Reported by: Michael L. Young
Tested by: Michael L. Young
Patches:
    asterisk-remove-using-port-for-nat-check.diff
                                     uploaded by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 15:11:46 +00:00
Walter Doekes
8a6db34dc8 Properly copy/remove the device state cache flag over a masquerade.
In r378303 the AST_FLAG_DISABLE_DEVSTATE_CACHE flag was added that tells
the devstate system to not cache states for non-real devices. However,
when optimizing away channels (ast_do_masquerade), that flag wasn't
copied.

In my case, using Local devices as queue members created a situation
where the endpoint was considered in use, but the state change of the
device being available again was ignored (not cached). The endpoint
channel was optimized into the (previously) Local channel, but kept
the do-not-cache flag. The end result being that the queue member
apparently stayed in use forever.

(closes issue ASTERISK-22718)
Reported by: Walter Doekes

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 14:43:26 +00:00
Michael L. Young
5ee5dccf51 Fix Setting A chan_sip Dialog's SIP_NAT_FORCE_RPORT Flag
A condition was added in a commit to fix ASTERISK-21374, that, if the
SIP_PAGE3_NAT_AUTO_RPORT flag was set, to then copy a peer's SIP_NAT_FORCE_RPORT
flag to the dialog.  This condition should not have been there since it assumed
that if Asterisk is in an environment where NAT is involved, that the auto_* nat
settings or force_rport setting would be on in the global settings.  If the nat
setting in the global setting is set to 'nat=no' and then turned on for peers
(which is not quite the recommended way, although it is allowed) this flag is
never copied to the dialog resulting in problems like, REGISTER replies going
to the wrong port.

This patch removes this conditional check and will now always use the peer's
flag which by this point in the code the checks on whether the peer is behind
NAT or not (if using auto_force_rport) have already been run.

(closes issue ASTERISK-22236)
Reported by: Filip Frank
Tested by: Michael L. Young
Patches:
    asterisk-2236-always-set-rport.diff uploaded
                                              by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-17 20:32:32 +00:00
Kinsey Moore
75ec0df0a0 Reduce log level of a non-pubsub error message
Drop an error log message to debug level 1 since distributed device
state functions correctly when receiving this message and it spams the
logs.

(closes issue ASTERISK-22410)
Reported by: abelbeck
Patches:
    asterisk-1.8-res_jabber-log-nonpubsub-error-to-debug.patch uploaded by abelbeck (License 5903)
    asterisk-11-res_xmpp-log-nonpubsub-error-to-debug.patch uploaded by abelbeck (License 5903)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-17 15:36:50 +00:00
Walter Doekes
20b41f41c2 Don't check all realtime queues when doing "queue show some_queue".
When using realtime queues, queues have to be fetched from the database
every now and then to see if any info has been changed or to see if the
queue has been removed. When fetching info for an individual queue, the
pruning of other queues is unnecessarily costly.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-16 11:52:24 +00:00
Richard Mudgett
82a3fa8032 chan_iax2: Fix channel left locked in off nominal code path.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@401016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-15 19:57:06 +00:00
Mark Michelson
ea53dd63be Prevent chan_sip from sending duplicate BYEs.
When a 200 OK for an initial INVITE is received, we were doing
the right thing by ACKing and sending an immediate BYE. However,
we also were doing the wrong thing and queuing an answer frame,
thus causing the call to be answered. This would cause the call
to be hung up by the channel thread, thus resulting in a second
BYE being sent out.

In this fix, I also have set the hangupcause to be correct since
the initial BYE being sent by Asterisk had an unknown hangup
cause. I have changed to using "Bearer capabilty not available"
since the call was hung up due to an SDP offer/answer error.

(closes issue ASTERISK-22621)
reported by Kinsey Moore
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-15 14:58:12 +00:00
Richard Mudgett
f46a73f1c4 chan_dahdi: Reflect the set software gain in the CLI "dahdi show channel" output.
* Remember the swgain setting from CLI "dahdi set swgain" command so the
CLI "dahdi show channel" output will reflect the current setting.

* Updated CLI "dahdi set hwgain" and "dahdi set swgain" documentation.

(issue ASTERISK-22429)
Reported by: Jaco Kroon
Patches:
      jira_asterisk_22429_v1.8_v2.patch (license #5621) patch uploaded by rmudgett
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-14 21:44:07 +00:00
Mark Michelson
23b6a34d45 chan_sip: Do not increment the SDP version between 183 and 200 responses.
Bumping the SDP version number can cause interoperability problems
since receivers of the responses will expect that a 200 SDP will
be identical to a previous 183 SDP.

(closes issue ASTERISK-21204)
reported by NITESH BANSAL

Patches:
	dont-increment-session-version-in-2xx-after-183.patch uploaded by NITESH BANSAL (License #6418)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-14 21:42:30 +00:00
Kinsey Moore
688f76dffb Add warning when compiling with iODBC support
When running configure, libiodbc2 development headers will fulfill the
requirement for ODBC development headers, but will not function
properly. This adds a warning when libiodbc2 development headers are
detected instead of unixodbc development headers.

(closes issue ASTERISK-22459)
Reported by: Patrick Maille
Tested by: Walter Doekes
Patches:
    issueA22459_warn_when_using_iodbc.patch uploaded by Walter Doekes (License 5674)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-08 22:27:59 +00:00
Richard Mudgett
ae78f04e4f app_confbridge: Can now set the language used for announcements to the conference.
ConfBridge now has the ability to set the language of announcements to the
conference.  The language can be set on a bridge profile in
confbridge.conf or by the dialplan function
CONFBRIDGE(bridge,language)=en.

(closes issue ASTERISK-19983)
Reported by: Jonathan White
Patches:
      M19983_rev2.diff (license #5138) patch uploaded by junky (modified)
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-08 20:14:14 +00:00
Richard Mudgett
3bc28a1af4 app_confbridge: Fix duplicate default_user profile.
* Fixed looking in the wrong profiles container to see if the default_user
profile is already created in verify_default_profiles().  The bridge
profile container is never going to hold user profiles. :)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-08 19:08:12 +00:00
Kinsey Moore
09df02a03e Fix func_config list entry allocation
The AST_CONFIG dialplan function defined in func_config.c allocates its
config file list entries using ast_malloc. List entry allocations
destined for use with Asterisk's linked list API must be ast_calloc()d
or otherwise initialized so that list pointers are set to NULL. These
uses of ast_malloc have been replaced by ast_calloc to prevent
dereferencing of uninitialized pointer values when traversing the list.

(closes issue ASTERISK-22483)
Reported by: Brian Scott
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-08 18:18:21 +00:00
Kinsey Moore
69ab5a7cd1 Fix STUN crash when using IPv6 any address
Ensure that when chan_sip binds to the IPv6 any address ([::]), IPv4
candidates are also added.

(closes issue ASTERISK-21917)
Reported by: Torrey Searle
Patches:
    0023_ipv6_stun_crash.patch uploaded by Torrey Searle (License 5334)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-08 15:42:44 +00:00
Michael L. Young
ac850376a5 app_queue: Fix Queuelog EXITWITHKEY only logging two of four fields
Commit r62462 added two extra fields for logging "the original position the
caller entered the queue at, and the amount of time the caller was waiting in
the queue."  But when r75969 was merged from 1.4 into trunk (r75977), these two
fields disappeared. Those two extra fields were not logged in 1.4 and when the
patch was merged, those fields went away.

Therefore, this is a regression and was caught by the reporter because he was
reading the awesome "Asterisk: The Definitive Guide" book.

(closes issue ASTERISK-22197)
Reported by: Dalius M.
Tested by: Dalius M.
Patches:
    asterisk-22197-q-log-exitwithkey.diff
				     uploaded by Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-06 17:09:13 +00:00
Jonathan Rose
b8980c3be8 chan_sip: Don't ignore expires value in contact header if it lacks semicolon
(closes issue ASTERISK-22574)
Reported by: Filip Jenicek
Patches:
    chan_sip_expires.patch uploaded by Filip Jenicek (license 6277)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-03 22:59:04 +00:00
Kinsey Moore
a055bdd4b4 Fix security events for AMI invalid password
In r337595, additional security events were added for chan_sip
authentication failures. The new IEs added to the existing invalid
password event were defined as required IEs, but existing users of the
event did not set the new IEs and could not since they didn't apply to
existing uses. They are now marked as optional IEs.

(closes issue ASTERISK-22578)
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-03 19:22:41 +00:00
Kinsey Moore
7652756518 res_rtp_multicast: Ensure SSRC is set properly
This fixes a bug where the SSRC field on multicast RTP can be stuck at
0 which can cause problems for endpoints trying to make sense of
incoming streams.

(closes issue ASTERISK-22567)
Reported by: Simone Camporeale
Patches:
    22567_res_mulitcast_ssrc.patch uploaded by Simone Camporeale (License 6536)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-03 18:28:07 +00:00
Michael L. Young
b4e0f80ec0 Cast Integer Argument To Unsigned Char
The member reg in the peercnt structure is an unsigned char and peercnt_modify()
is expecting an unsigned char argument which gets assigned to peercnt->reg.

This patch fixes that by casting the integer argument being passed to
peercnt_modify to unsigned char.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02 21:31:36 +00:00
Tzafrir Cohen
093625b9fd man pages for astdb2bdb and astdb2sqlite3
Review: https://reviewboard.asterisk.org/r/2898/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02 17:36:28 +00:00
Kinsey Moore
fb1c96baf4 chan_sip: Allow Asterisk to retry after 403 on register
This adds a global option in chan_sip to allow it to continue
attempting registration if a 403 is received, clearing the cached nonce
and treating it as a non-fatal response. Normally, this would cause
registration attempts to that endpoint to stop.

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2874/
Reported by: Rudi
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30 15:26:39 +00:00
Matthew Jordan
ecdd1e76eb res_rtp_asterisk: Correct erroneous lost packet information in RTCP reports
RTCP's calculation of the number of lost packets in an RTP stream is based on
that stream's sequence number count, the number of received packets, and how
many packets we expect to receive. When the SSRC for an RTP stream changes,
there can - and almost always will be - a large jump in the next packet's
timestamp and sequence number. If we don't reset the number of received
packets, sequence number count, and other metrics used by RTCP, the next RR/SR
report will use the previous SSRC's values to calculate the lost packet count
for the new SSRC - resulting in a very large number of lost packets.

This patch modifies res_rtp_asterisk such that, if it detects a SSRC change, it
will reset the various values used by the RTCP calculations. From the
perspective of RTCP, this appears as a new media stream - which is what it is.

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

(closes issue AST-1174)
Reported by: Thomas Arimont
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28 22:21:37 +00:00
Matthew Jordan
4886cd2d37 Add check for openSUSE when detecting bfd library
In ASTERISK-17842, some additional library checks were added to the configure
script so that the bfd library could be found on CentOS and Fedora systems.

As it turns out, openSUSE requires an additional library. This patch adds
another check to the configure script for openSUSE that will add that library.

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

(closes issue AST-1169)
Reported by: Guenther Kelleter
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28 21:59:12 +00:00
Richard Mudgett
ee37433d8e chan_sip: Increase some scratch buffer sizes dealing with caller id.
* Eliminated an unnecessary initialization in check_user_full().

(closes issue ASTERISK-22477)
Reported by: Michael Shepelev
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@400014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27 21:35:37 +00:00
Jonathan Rose
b9133abc09 chan_sip: Reject calls on 200 OKs if no SDP has been received
When Asterisk receives a 200 OK in response to an invite, that peer should have
sent an SDP at some point by then. If the channel has never received an SDP,
media won't have been set and the remote address won't be known. Endpoints in
general should not be doing this. This patch makes it so that Asterisk will
simply hang up a call if it sends a 200 OK at this point. So far this odd
behavior for endpoints has only been observed in tests which involved manually
created SIP transactions in SIPp.

(closes issue ASTERISK-22424)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2827/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27 17:24:58 +00:00
Richard Mudgett
7ca3e44c3f chan_dahdi: CLI "core stop gracefully" has needless delay for PRI and SS7.
The PRI and SS7 link control threads are not stopped correctly when the
chan_dahdi.so module is unloaded.  The link control threads pri_dchannel()
and ss7_linkset() are not awakened from a poll() to cancel the thread.

* Added a SIGURG signal after requesting the thread cancel to break the
link control thread poll() immediately.

For SS7 it was slightly worse, the link poll() timeout would always be
whatever was the last libss7 scheduled event time used.  If no libss7
scheduled event was pending, the thread could run more often than
necessary.

* Set nextms to 60 seconds for the ss7_linkset() poll() if there is no
other libss7 scheduled event.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-25 20:28:29 +00:00
Michael L. Young
591c3b403e chan_sip: Fix Realtime Peer Update Problem When Un-registering And Expires Header In 200ok
1st Issue
When a realtime peer sends an un-REGISTER request, Asterisk
un-registers the peer but the database table record still has regseconds and
fullcontact for the peer.  This results in calls attempting to be routed to the
peer which is no longer registered.  The expected behavior is to get
busy/congested when attempting to call an un-registered peer through the
dialplan.

What was discovered is that we are clearing out the peer's registration in the
database in parse_register_contact() when calling expire_register() but then
upon returning from parse_register_contact(), update_peer() is run which stores
back in the database table regseconds and fullcontact.

2nd Issue
The reporter pointed out that the 200 ok being returned by Asterisk
after un-registering a peer contains a Contact header with ;expires= and the
Expires header is not set to 0.  This is actually a regression.

Tests were created for this second issue (ASTERISK-22548).  The tests have been
reviewed and a Ship It! was received on those tests.

This patch does the following:

* Do not ignore the Expires header value even when it is set to 0.  The patch
  sets the pvt->expiry earlier on in the function so that it is set properly and
  used.

* If pvt->expiry is 0, do not call update_peer since that means the peer has
  already been un-registered and there is no need to update the database record
  again since nothing has changed.

(closes issue ASTERISK-22428)
Reported by: Ben Smithurst
Tested by: Ben Smithurst, Michael L. Young
Patches:
  asterisk-22428-rt-peer-update-and-expires-header.diff
                                              by Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-25 19:27:06 +00:00
Richard Mudgett
46c2c5ea14 chan_iax2: Prevent some needless breaking of the native IAX2 bridge.
* Clean up some twisted code in the iax2_bridge() loop.

* Add AST_CONTROL_VIDUPDATE and AST_CONTROL_SRCCHANGE to a list of frames
to prevent the native bridge loop from breaking.

* Passing the AST_CONTROL_T38_PARAMETERS frame should also allow FAX over
a native IAX2 bridge.

(issue ABE-2912)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-24 20:20:06 +00:00
Kinsey Moore
2fb3e52fda Ensure global types in the config framework are initialized
If a config object was allocated but one of its global objects was
never encountered, then the global object's defaults were never
applied. Ensure that global objects are initialized properly upon
allocation instead of on configuration.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-20 22:35:00 +00:00
Kevin Harwell
44f616bd2e Fix memory leak in logger.
Fixed a memory leak discovered in the logger where a temporary string buffer
was not being freed.

(closes issue ASTERISK-22540)
Reported by: John Hardin


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-20 14:23:30 +00:00
Jonathan Rose
155e9f821c chan_sip: Make direct media reinvites for T38 put Asterisk in the media path
Prior to this patch, Asterisk would incorrectly use the previous endpoint
addresses in SDP in spite of providing its own port. T38 is never meant to
be done through directmedia and Asterisk should always be in the media path
for these streams.

(closes issue ASTERISK-17273)
Reported by: Kevin Stewart

(closes issue ASTERISK-18706)
Reported by: Jeremy Kister

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-19 16:45:02 +00:00
Richard Mudgett
9a0537cc98 UDPTL: Backport some fixes from v12 that should be in v11.
Backported the following as applied to udptl.c:
* -r398020 Fixup udpdl defaults if config file not present.
* -r398533 Fixup improper use of ao2_global_obj_replace().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-18 23:36:12 +00:00
Kinsey Moore
0ca5aec494 Fix jitter buffer log file creation
This adjusts '/'-to-'#' replacement to replace all instances of '/'
instead of just the first to ensure that the jitter buffer log file
gets the correct name as per Richard Kenner's suggestion.

(closes issue ASTERISK-21036)
Reported by: Richard Kenner
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-18 19:55:46 +00:00
Matthew Jordan
623ee577a0 Update prep_tarball with new documentation files on the Asterisk wiki
This will now pull both a command reference for the version being prepared,
as well as an Admin Guide that applies to all versions of Asterisk.

(issue ASTERISK-22439)
Reported by: Olle Johansson
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-18 17:22:48 +00:00
Matthew Jordan
c96b43b532 Add a WARNING in bridge_softmix when a timing module isn't loaded
If bridge_softmix fails to be created because no timing source is present in
Asterisk, this will currently fail gracefully but with (most likely) a generic
error message by whatever module tried to create the softmix bridge. This
patch adds a more explicit warning so you can actually diagnose and fix the
problem.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-18 17:17:13 +00:00
Michael L. Young
1c37158fe0 Fix Segfault When Syntax Of A Line Under [applicationmap] Is Invalid
When processing the lines under the [applicationmap] context in features.conf, a
segfault occurs from attempting to process a line with an invalid syntax
(basically missing most of the arguments).

Example:
[applicationmap]
automon=*6

* This patch moves the checking for empty arguments to before they are accessed.

* Also, checked the "todo" comment and removed it.  Some applications do not
  require arguments.

(closes issue ASTERISK-22416)
Reported by: CGI.NET
Tested by: CGI.NET
Patches:
    asterisk-22416-check-syntax-first_v2.diff by Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-18 01:34:09 +00:00
Kevin Harwell
1347333a46 Remote console: more output discrepancies
The remote console continued to have issues with its output.  In this case CLI
command output would either not show up (if verbose level = 0) or would contain
verbose prefixes (if verbose level > 0) once log messages were sent to the
remote console.  The fix now now adds verbose prefix data to all new lines
contained in a verbose log string.

(closes issue ASTERISK-22450)
Reported by: David Brillert
(closes issue AST-1193)
Reported by: Guenther Kelleter
Review: https://reviewboard.asterisk.org/r/2825/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-17 18:32:57 +00:00
Kevin Harwell
3c33267453 Confbridge: empty conference not being torn down
Confbridge would not properly tear down an empty conference bridge when all
users were kicked via end_marked=yes and at least one user was also set to
wait_marked.  This occurred because while end_marked users were being kicked
and at least one was also set to wait_marked then the leave wait_marked handler
would be called on that user, but there would be no waiting user (still
considered active).  The waiting users would decrement and now be negative.  The
conference would remain, but be put into an inactive state.  The solution was
to move from the active list to the wait list, those users with wait_marked set
right before kicking.  This allows both the active and wait users to decrement
correctly and the confbridge to tear down properly.

A crashed also occurred when trying to list the specific conference from the CLI.
This happened because the conference specified was invalid.  Since the
conference properly tears down now there is no way to reference it thus
alleviating the crash as well.

(closes issue ASTERISK-21859)
Reported by: Chris Gentle
Review: https://reviewboard.asterisk.org/r/2848/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-17 14:24:02 +00:00
Richard Mudgett
4b6a36bc5f chan_iax2: Fix saving the wrong expiry time in astdb.
When a new IAX2 client registers, the astdb database is updated with the
value of minregexpire defined in iax.conf instead of using the expiry time
that is provided by the client.  The provided expiry time of the client is
updated after inserting the astdb entry.  As a consequence, restarting or
reloading asterisk creates clients whose registration may expire before
they reregister.  The clients are therefore unavailable after minregexpire
seconds until they reregister.

* Move updating of the expiry time to before inserting into the astdb.

(closes issue ASTERISK-22504)
Reported by: Stefan Wachtler
Patches:
      chan_iax2.c.patch (license #6533) patch uploaded by Stefan Wachtler
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-16 16:42:35 +00:00
David M. Lee
fb51ba1688 Don't write to /tmp/refs when REF_DEBUG is not defined.
If MALLOC_DEBUG is enabled, then the debug destructor for the container
is used, which would erroneously write to /tmp/refs. This patch only
uses the debug destructor if ref_debug is used.

(closes issue ASTERISK-22536)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-13 20:49:33 +00:00
Kinsey Moore
4ffd79c102 Fix several crashes in MeetMeAdmin
This change ensures that MeetMeAdmin commands requiring a user actually
get a user and fixes another issue where an extra dereference could
occur for a last-entered user being ejected if a user identifier was
also provided.

(closes issue ASTERISK-21907)
Reported by: Alex Epshteyn
Review: https://reviewboard.asterisk.org/r/2844/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@399034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-13 13:48:34 +00:00
Jonathan Rose
d91ceb38f5 chan_sip: Revert r398835 due to failing tests involving originate
(issue ASTERISK-22424)
Reported by: Jonathan Rose
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-12 20:19:39 +00:00
Rusty Newton
f5d53c84bb 'queue add member' help text correction
You are adding dial strings to the queue, not channels. An aribitrary string
could be used, but you are typically referencing a channel. Correcting the
command help text.

(issue ASTERISK-22263)
(closes issue ASTERISK-22263)
Reported By: Rusty Newton
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-12 00:02:37 +00:00
Rusty Newton
d75d1e2e64 Documentation fix - waitfordialtone is not boolean, it's time in milliseconds
Changing text in chan_dahdi.conf sample to be accurate.

(issue ASTERISK-22308)
(closes issue ASTERISK-22308)
Reported By: Malcolm Davenport
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-11 23:50:27 +00:00
Jonathan Rose
0860ba2a1b chan_sip: Reject calls without prior SDP on 200 OK
If we receive a 200 OK without SDP, we will now check to see if
the remote address has been established for that channel's RTP
session and if the to tag for that channel has changed from
the most recent to tag in a response less than 200.
If either a change has been made since the last to-tag was
received or the remote address is unset, then we will drop
the call.

(closes issue ASTERISK-22424)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2827/diff/#index_header
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-11 19:46:39 +00:00
Russell Bryant
496f59ecbe Fix typo in confbridge.conf.sample
The denoise filter requires func_speex, not codec_speex.  Fix this in the
description of the denoise=yes option in confbridge.conf.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-11 18:01:33 +00:00
Richard Mudgett
d8b4adb590 Fix incorrect usages of ast_realloc().
There are several locations in the code base where this is done:
buf = ast_realloc(buf, new_size);

This is going to leak the original buf contents if the realloc fails.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10 17:56:56 +00:00
David M. Lee
72a07f9646 Fixed utils directory breakage from r398748, this time with extra hate.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10 17:48:52 +00:00
David M. Lee
7942751aa6 Fixed utils directory breakage from r398648
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10 17:23:56 +00:00
Richard Mudgett
3f6b151a72 MALLOC_DEBUG: Change fence magic number to be completely different from the freed magic number.
Race conditions between freeing a nul terminated string and
ast_strdup()'ing it are more likely to be detected if the fence and freed
magic numbers are completely different.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-09 23:21:46 +00:00
David M. Lee
85ceb09623 Fix DEBUG_THREADS when lock is acquired in __constructor__
This patch fixes some long-standing bugs in debug threads that were
exacerbated with recent Optional API work in Asterisk 12.

With debug threads enabled, on some systems, there's a lock ordering
problem between our mutex and glibc's mutex protecting its module list
(Ubuntu Lucid, glibc 2.11.1 in this instance). In one thread, the module
list will be locked before acquiring our mutex. In another thread, our
mutex will be locked before locking the module list (which happens in
the depths of calling backtrace()).

This patch fixes this issue by moving backtrace() calls outside of
critical sections that have the mutex acquired. The bigger change was to
reentrancy tracking for ast_cond_{timed,}wait, which wrongly assumed
that waiting on the mutex was equivalent to a single unlock (it actually
suspends all recursive locks on the mutex).

(closes issue ASTERISK-22455)
Review: https://reviewboard.asterisk.org/r/2824/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-09 20:02:32 +00:00
Kinsey Moore
e688096e2b Prevent XMPP timeout on blank responses
Sometimes the Google Voice servers have a bad habit of sending out 1
byte replies to the xmpp resource. When a blank 1 byte reply is
received from the socket the buffer attempts to wait (endlessly) for
the rest of the reply from google which effectively blocks the socket
and google voice calls will no longer come into the server.

This patch allows the xmpp module to correctly detect empty packets and
send out ping replies to google. It also sets a socket timeout on the
default socket which prevents the xmpp socket from closing and
preventing future google voice calls from coming into the server.

Furthermore instead of sending an empty reply back to google we send a
proper xmpp ping reply back. This also adds several more
socket messages.

(closes issue ASTERISK-22347)
Reported by: Andrew Nagy
Review: https://reviewboard.asterisk.org/r/2771
Patches:
    xmpp_fix_1.diff uploaded by Andrew Nagy (License #6524)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-07 00:59:41 +00:00
Kinsey Moore
08be45178a Commit the remainder of r398523
This is a missing part of the commit in revision 398523 that corrects
the name of a variable.

(issue ASTERISK-22435)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 21:00:56 +00:00
Kinsey Moore
2d902e728f Fix Jabber/XMPP distributed MWI
The mailbox and context are swapped on the receiving end for all users
of Jabber and XMPP distributed MWI in Asterisk 1.8 and all more recent
versions. This swaps those values to be correct when publishing to the
internal event system from Jabber/XMPP distributed MWI state.

(closes issue ASTERISK-22435)
Reported by: abelbeck
Tested by: Michael Keuter
Patches:
    asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch uploaded by abelbeck
    asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch uploaded by abelbeck
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 19:28:16 +00:00
Kinsey Moore
7644d7b8e2 Fix chan_h323 compilation
This fixes the things in chan_h323 that were missed or ignored in the
great channel opaquification and gets chan_h323 back into a compiling
state.

(closes issue ASTERISK-22365)
Reported by: Dmitry Melekhov
Patches:
    chan_h323.patch uploaded by Dmitry Melekhov


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 15:58:04 +00:00
Richard Mudgett
6630c560fd chan_iax2: Reduce indentation in __attempt_transmit().
* Reduce indentation in __attempt_transmit().

* Don't update the static last error time variable every time in
__schedule_action() and socket_read().
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 19:13:43 +00:00
Richard Mudgett
aa8405923a chan_iax2: Fix stray reference to worker thread idle_list.
* Fix stray reference to idle_list in cleanup_thread_list().  This may be
the reason for the note in iax2_process_thread() about threads not being
removed from the task lists.

* Move cleanup_thread_list(&idle_list) to after the other lists are
cleaned up.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 17:29:24 +00:00
Richard Mudgett
ed61d21419 chan_iax2: Fix bridgecallno deadlock avoidance.
* Fix bridgecallno deadlock avoidance.  When doing deadlock avoidance, you
need to retest the status of values for each loop to see if you still need
the lock for bridgecallno.

* As a safety check, after acquiring the bridgecallno lock you should
check if iaxs[bridgecallno] is NULL just like the current callno checks.

* Move setting thread->iostate to IAX_IOSTATE_IDLE to after processing any
deferred frames to ensure that the iostate is IDLE when it is placed back
into the idle list.  defer_full_frame() tries to ensure
iax2_process_thread() wakes up to process the frame.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 17:10:28 +00:00
Richard Mudgett
a4db8b381a chan_iax2: Add missing control frame names to debug frame decode output. (Part 2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 23:14:44 +00:00
Richard Mudgett
5f7e74ba56 chan_iax2: Add missing control frame names to debug frame decode output.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 22:53:58 +00:00
Jonathan Rose
453b01c52a unit tests: test_voicemail_api leaks stringfields from snapshots
(closes issue ASTERISK-22414)
Reported by: Corey Farrell
Patches:
    test_voicemail_api-leaks-11.patch uploaded by coreyfarrell (license 5909)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 21:33:08 +00:00
Jonathan Rose
02ddd169b5 app_voicemail: Fix leaking config objects when msg_id doesn't match
(issues ASTERISK-22414)
Reported by: Corey Farrell
Patch:
    test_voicemail_api-leaks-11.patch uploaded by coreyfarrell (license 5909)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 21:11:48 +00:00
Richard Mudgett
a3241cb426 chan_misdn: Fix misdn debug output printed with arbitrary verbose levels.
Fix the misdn debug output to remote consoles.  chan_misdn uses
ast_console_puts() which doesn't know about verbose levels.  Better to use
ast_verbose() instead.  Without this patch the misdn debug messages are
appended to the verbose level which ever was set by the message sent to
the console before, i.e.  any undefined level.

(closes issue AST-1218)
Reported by: Guenther Kelleter
Patches:
      misdnlog.patch (license #6372) patch uploaded by Guenther Kelleter
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 15:57:03 +00:00
Alexandr Anikin
bff9593cae Fix remote tcs sequence handling on empty tcs received
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-03 19:45:44 +00:00
Walter Doekes
7d9f246feb Be a little more verbose when loading cel_custom.conf.
Review: https://reviewboard.asterisk.org/r/2805/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-02 07:28:04 +00:00
Kevin Harwell
71857a4a5e Fix various memory leaks
main/config.c - cleanup cache fie includes
res/res_security_log.c - unregister logger level
channesl/chan_sip.c - cleanup io context and notify_types
main/translator.c - cleanup at shutdown
main/named_acl.c - cleanup cli commands
main/indications.c - ast_get_indication_tone() unref default_tone_zone if used

(closes issues ASTERISK-22378)
Reported by: Corey Farrell
Patches:
     config_shutdown.patch uploaded by coreyfarrell (license 5909)
     res_security_log.patch uploaded by coreyfarrell (license 5909)
     chan_sip-11.patch uploaded by coreyfarrell (license 5909)
     indications_refleak.patch uploaded by coreyfarrell (license 5909)
     named_acl-cli_unreg-11.patch uploaded by coreyfarrell (license 5909)
     translate_shutdown.patch uploaded by coreyfarrell (license 5909)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 19:16:20 +00:00
Kevin Harwell
b41873d7e9 Memory leak fix
ast_xmldoc_printable returns an allocated block that must be freed by the
caller.  Fixed manager.c and res_agi.c to stop leaking these results.

(closes issue ASTERISK-22395)
Reported by: Corey Farrell
Patches:
     manager-leaks-11.patch uploaded by coreyfarrell (license 5909)
     res_agi-xmldoc-leaks.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 17:53:56 +00:00
Kevin Harwell
3c376008f5 Fix memory leak
Fixed a features.c test that leaked a reference to a parked call.  This caused
chancount to never reach 0, so graceful shutdown stops.  Also added an
unregister test.

(closes issue ASTERISK-22413)
Reported by: Corey Farrell
Patches:
     features-TEST_FRAMEWORK.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 17:00:26 +00:00
Richard Mudgett
1dc893bbe8 test_substituition: Fix failed test reporting to actually report failure.
You cannot put the "Testing <blah> pass/fail" on a single line before
actually performing the test.  Now any additional failure information is
logged before the test pass/fail announcement.

* Added an additional CDR(answer,u) test.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 16:57:00 +00:00
Kevin Harwell
3eb037cbb5 Fix memory leaks
(closes issue ASTERISK-22368)
Reported by: Corey Farrell
Patches:
     issueA22368_mixmonitor_free_filename.patch uploaded by wdoekes (license 5674)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 16:20:21 +00:00
Kevin Harwell
3e0157c46f Check return value on fwrite
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 15:22:35 +00:00
Kevin Harwell
15994e3bf7 Verbose logging discrepancies
Refactored cases where a combination of ast_verbose/options_verbose were
present.  Also in general tried to eliminate, in as many places as possible,
where the options_verbose global variable was being used.  Refactored the way
local and remote consoles handle verbose message logging in an attempt to
solve the various discrepancies that sometimes would show between the two.

(closes issue AST-1193)
Reported by: Guenther Kelleter
Review: https://reviewboard.asterisk.org/r/2798/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29 22:16:41 +00:00
Matthew Jordan
c58bab8ce3 AST-2013-005: Fix crash caused by invalid SDP
If the SIP channel driver processes an invalid SDP that defines media
descriptions before connection information, it may attempt to reference
the socket address information even though that information has not yet
been set. This will cause a crash.

This patch adds checks when handling the various media descriptions that
ensures the media descriptions are handled only if we have connection
information suitable for that media.

Thanks to Walter Doekes, OSSO B.V., for reporting, testing, and providing
the solution to this problem.

(closes issue ASTERISK-22007)
Reported by: wdoekes
Tested by: wdoekes
patches:
  issueA22007_sdp_without_c_death.patch uploaded by wdoekes (License 5674)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27 18:03:08 +00:00
Richard Mudgett
fdc86bb44c Fix uninitialized value in struct ast_control_pvt_cause_code usage.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27 16:40:46 +00:00
Matthew Jordan
4fd979228d AST-2013-004: Fix crash when handling ACK on dialog that has no channel
A remote exploitable crash vulnerability exists in the SIP channel driver if an
ACK with SDP is received after the channel has been terminated. The handling
code incorrectly assumed that the channel would always be present.

This patch adds a check such that the SDP will only be parsed and applied if
Asterisk has a channel present that is associated with the dialog.

Note that the patch being applied was modified only slightly from the patch
provided by Walter Doekes of OSSO B.V.

(closes issue ASTERISK-21064)
Reported by: Colin Cuthbertson
Tested by: wdoekes, Colin Cutherbertson
patches:
  issueA21064_fix.patch uploaded by wdoekes (License 5674)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27 15:55:16 +00:00
Joshua Colp
71ce810908 Make libuuid an optional dependency for res_rtp_asterisk instead of a requirement.
Review: https://reviewboard.asterisk.org/r/2777/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 21:57:14 +00:00
Richard Mudgett
0cd0977454 Fix memory corruption when trying to get "core show locks".
Review https://reviewboard.asterisk.org/r/2580/ tried to fix the mismatch
in memory pools but had a math error determining the buffer size and
didn't address other similar memory pool mismatches.

* Effectively reverted the previous patch to go in the same direction as
trunk for the returned memory pool of ast_bt_get_symbols().

* Fixed memory leak in ast_bt_get_symbols() when BETTER_BACKTRACES is
defined.

* Fixed some formatting in ast_bt_get_symbols().

* Fixed sig_pri.c freeing memory allocated by libpri when MALLOC_DEBUG is
enabled.

* Fixed __dump_backtrace() freeing memory from ast_bt_get_symbols() when
MALLOC_DEBUG is enabled.

* Moved __dump_backtrace() because of compile issues with the utils
directory.

(closes issue ASTERISK-22221)
Reported by: Matt Jordan

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 16:07:18 +00:00
Walter Doekes
0bdd6ce706 Add _IO_stdin_used in version-script to fix SIGBUSes on Sparc.
The --version-script,asterisk.exports linker flag (and the module
exports) didn't provide _IO_stdin_used in the list of exported symbols.
That causes some kind of libc compatibility mode to kick in, where
stdio file structures (stdout/stderr) land somewhere else. In the
case of the Sparc, they landed on misaligned memory.

This became apparent first after r376428 (Reorder startup sequence)
when a lot of ast_log's were replaced with fprintf's. Writing to
stderr triggered a SIGBUS. (Compared to x86 and amd64 architectures,
the Sparc is very picky about memory alignment.)

(issue ASTERISK-21763)
(issue ASTERISK-21665)

Reported by: Jeremy Kister
Review: https://reviewboard.asterisk.org/r/2760/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-22 08:22:39 +00:00
Jonathan Rose
81ddc42fd3 UDPTL: Fix a regression where UDPTL won't load default settings
If the file udptl.conf is unavailable at startup, UDPTL will fail to
initialize and while it makes some noise, it isn't immediately
obvious why consumers start to fail when using it. This patch makes
UDPTL load as though an empty config was provided  when udptl is
unavailable at startup.

(closes issue ASTERISK-22349)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2773/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21 23:02:35 +00:00
David M. Lee
041b910b17 Complete http_shutdown.
This patch frees up some resources allocated in http.c.
 * tcp listeners stopped
 * tls settings freed
 * uri redirects freed
 * unregister internal http.c uri's

(closes issue ASTERISK-22237)
Reported by: Corey Farrell

Patches:
    http.patch uploaded by Corey Farrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21 17:07:06 +00:00
Matthew Jordan
eac2c3b91a Set 14400 as the default max bit rate if T38MaxBitRate is not specified
If an endpoint fails to include the T38MaxBitRate attribute during negotiation,
Asterisk will negotiate a bit rate of 2400 instead of the ITU recommended
bit rate of 14400. This patch fixes this by making AST_T38_RATE_14400 the
'default' value of the enum by assigning it a value of 0, such that if an
endpoint fails to include the attribute, the default will be 14400.

Note that Walter Doekes included the nice comment in frame.h about why we are
purposefully assigning AST_T38_RATE_14400 a value of 0.

(closes issue ASTERISK-22275)
Reported by: Andreas Steinmetz
patches:
  fax-fix.patch uploaded by anstein (License 6523)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21 15:12:57 +00:00
Mark Michelson
142c5d4816 Prevent a crash on outbound SIP MESSAGE requests.
If a From header on an outbound out-of-call SIP MESSAGE were
malformed, the result could crash Asterisk.

In addition, if a From header on an incoming out-of-call SIP
MESSAGE request were malformed, the message was happily accepted
rather than being rejected up front. The incoming message path
would not result in a crash, but the behavior was bad nonetheless.

(closes issue ASTERISK-22185)
reported by Zhang Lei


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21 14:36:39 +00:00
Michael L. Young
88a5f18dec Fix Not Storing Current Incoming Recv Address
In 1.8, r384779 introduced a regression by retrieving an old dialog and keeping
the old recv address since recv was already set.  This has caused a problem when
a proxy is involved since responses to incoming requests from the proxy server,
after an outbound call is established, are never sent to the correct recv
address.

In 11, r382322 introduced this regression.

The fix is to revert that change and always store the recv address on incoming
requests.

Thank you Walter Doekes for helping to point out this error and Mark Michelson
for your input/review of the fix.

(closes issue ASTERISK-22071)
Reported by: Alex Zarubin
Tested by: Alex Zarubin, Karsten Wemheuer
Patches:
    asterisk-22071-store-recvd-address.diff by Michael L. Young (license 5026)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21 02:11:26 +00:00
Mark Michelson
3b91cde004 Remove REF_DEBUG definition.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 17:41:39 +00:00
Mark Michelson
e510fa1514 Fix refcounting of sip_pvt in test_sip_rtpqos test and unlink it from the list of pvts.
(closes issue ASTERISK-22248)
reported by Corey Farrell
patches:
	test_sip_rtpqos.patch uploaded by Corey Farrell (license #5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 16:23:11 +00:00
Kinsey Moore
d9380e3ece Unregister CLI commands on exit
This patch ensures that CLI commands enabled by DEBUG_FD_LEAKS and
DEBUG_THREADLOCALS are cleaned up properly on exit.

(closes issue ASTERISK-22238)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    debug_cli_unregister.patch uploaded by Corey Farrell
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 15:27:16 +00:00
Kinsey Moore
e71f01d16c Fix xmldoc memory leak
This fixes a single-attribute memory leak that was occurring when the
"required" attribute was not true.

(closes issue ASTERISK-22249)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    xmldoc-free_attr_required.patch uploaded by Corey Farrell
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 14:25:30 +00:00
Kinsey Moore
9e1be72421 Protect CEL from an invalid config on reload
This patch fixes CEL to properly handle an invalid config on reload.

(closes issue ASTERISK-22259)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    cel-config.patch uploaded by Corey Farrell
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@397034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 14:07:45 +00:00
Walter Doekes
96ee3eb860 Add "autoframing" option to sip.conf.sample and h323.conf.sample.
The autoframing option was added to chan_sip.c in r43243 (mogorman,
2006-09-19 01:32:57), but never made its way into the sample configs.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 11:47:16 +00:00
Matthew Jordan
186a2b171c Fix invalid access to disposed memory in main/data unit test
It is not safe to iterate over a macro'd list of ao2 objects, deref them such
that the item's destructor is called, and leave them in the list. The list
macro to iterate over items requires the item to be a valid allocated object
in order to proceed to the next item; with MALLOC_DEBUG on the corruption of
the linked list is caught in the crash.

This patch fixes the invalid access to free'd memory by removing the ao2 item
from the list before de-refing it.

Note that this is a backport of r396915 from Asterisk trunk.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 01:18:34 +00:00
Matthew Jordan
7103d3aaed Let Queue wrap up time influence member availability
Queue members who happen to be in multiple queues at the same time may not
have any wrap up time. This problem occurred due to a code change in Asterisk
11.3.0 that unified device state tracking of Queue members in multiple
Queues (which fixed some other problems, but unfortunately caused this one).

This patch fixes the behavior by having the is_member_available function
check the queue's wrap up time and the time of the member's last call, such
that for a particular queue, the member won't be considered available if their
last call is within the wrap up time.

(closes issue ASTERISK-22189)
Reported by: Tony Lewis
Tested by: Tony Lewis



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 00:06:37 +00:00
Matthew Jordan
15b32a230f Resolve conflicts between CONFFLAG_DONT_DENOISE and CONFFLAG_INTROUSER_VMREC
When r382230 added an option to not denoise the MeetMe conference (if a user
had a channel whose format's sample rate changed frequently, for example),
the value added was the maximum allowed value for the constants that define
the options for MeetMe in 1.8. Not so in 11 - unfortunately, the option
CONFFLAG_DONT_DENOISE conflicts with CONFFLAG_INTROUESR_VMREC. This patch
fixes that, and also tweaks one of the way in which the constants was
declared for consistency.

Thanks to Tony Mountifield for pointing out the problem and solution.

(closes issue ASTERISK-22269)
Reported by: Tony Mountifield

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-19 23:53:55 +00:00
John Bigelow
b44258d174 Add test suite events to indicate when a feature is detected or not
These are needed by the bridge test suite tests for them to be able to run
against Asterisk 11.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-16 22:45:10 +00:00
Kinsey Moore
3dcbd04a94 Remove leading spaces from the CLI command before parsing
If you've mistakenly put a space before typing in a command, the
leading space will be included as part of the command, and the command
parser will not find the corresponding command. This patch rectifies
that situation by stripping the leading spaces on commands.

Review: https://reviewboard.asterisk.org/r/2709/
Patch-by: Tilghman Lesher
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-15 16:29:56 +00:00
Joshua Colp
12c855af79 Tweak comment for why usleep is used.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-14 19:06:28 +00:00
Joshua Colp
0d039869d2 Tweak test_hashtab_thrash test to allow the critical threads to execute.
Depending on certain conditions it was possible for the hashtab counting thread
to starve other threads, preventing them from executing in the expected fashion.
This change adds a sleep to allow the others to do what they need to do. While
this doesn't thrash the hashtab as much as previously, it at least works.

(closes issue ASTERISK-22276)
Reported by: Matt Jordan
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-14 18:08:27 +00:00
Walter Doekes
f83b144899 chan_sip: Convert 'just did sched_add waitid...' from warning to debug message.
Patches:
    reviewboard-2377.patch uploaded by Paul Belanger
Review: https://reviewboard.asterisk.org/r/2377/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-13 18:45:55 +00:00
Walter Doekes
16160ea357 chan_sip: Fix IP-addr in warning when rejecting a contact ACL.
Patches:
    reviewboard-2155.patch uploaded by Paul Belanger
Review: https://reviewboard.asterisk.org/r/2155/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-13 18:34:39 +00:00
Walter Doekes
b3eef9957e Consistent memory allocation by ast_bt_get_symbols.
Always use ast_alloc/ast_free. This is handled differently in trunk (r391012).

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 20:21:52 +00:00
Igor Goncharovskiy
8d9eff176e - Fix different issues with call transfer cancel. In case 3rd party busy or congestion call was not returned.
- Fix displaying soft button 'Redial' in case of no redial number exists



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 07:03:50 +00:00
Walter Doekes
9dfb4be39d Check result of ast_var_assign() calls for memory allocation failure (2).
Missed a spot in the previous commit.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06 08:37:37 +00:00
Walter Doekes
5c8ba4c4d6 Check result of ast_var_assign() calls for memory allocation failure.
We try to keep the system running even when all available memory is
spent.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06 08:19:42 +00:00
Michael L. Young
1e03a50878 Fix Registration Failure When A Peer And TLS Are Used
If a peer is used in a register line and TLS is defined as the transport, the
registration fails since the transport on the dialog is never set properly
resulting in UDP being used instead of TLS.

This patch sets the dialog's transport based on the transport that was defined
in the register line.  If the register line does not specify a transport, the
parsing function for the register line always defaults back to UDP.

(closes issue ASTERISK-21964)
Reported by: Doug Bailey
Tested by: Doug Bailey
Patches:
    asterisk-21964-set-reg-dialog-transport.diff
					by Michael L. Young (license 5026)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 20:19:41 +00:00
Michael L. Young
63a714f197 Blocked revisions 396236
........
Restore Extra Line Break Between Peers When Running AMI Action SIPPeers

The commit (r387133) for fixing ASTERISK-21466 accidentally removed an extra
line break between the peers returned by the AMI action SIPPeers.  This
results in some parsers breaking because they expect this extra line break.

This patch restores that extra line break.

(closes issue ASTERISK-22239)
Reported by: Jacek Konieczny
Tested by: Jacek Konieczny, Michael L. Young
Patches:
    asterisk-ami_sippeers_separator.patch by Jacek Konieczny (license 6298)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 19:48:22 +00:00
Michael L. Young
d9a406a884 Change "from" to "From".
(related to issue ASTERISK-21903)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 18:48:31 +00:00
Michael L. Young
a317b5fc93 Adding a note to UPGRADE.txt about a change made to res_agi in order to
indicate when streaming an audio file fails like it is done in other parts
of the code to indicate an error.

Note was requested by Paul Belanger: 
http://lists.digium.com/pipermail/asterisk-dev/2013-July/061420.html

(related to issue ASTERISK-21903)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 18:42:58 +00:00
Matthew Jordan
3754c3a7dd Update copyright year to 2013 in asterisk.c; some whitespace fixes
(closes issue ASTERISK-22179)
Reported by: Malcolm Davenport
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@395033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-22 13:50:54 +00:00
Matthew Jordan
06f0da01f5 Add an upgrade note for libuuid dependency; remove note in CHANGES
This patch notes that libuuid is now a dependency for res_rtp_asterisk; this
was introduced in between 11.4.0 and 11.5.0 to resolve a dependency for
pjproject, which res_rtp_asterisk uses for ICE/STUN/TURN support.

It also removes a conflicting note from CHANGES. While support for playing
prompts to the first participant was added for app_queue, it was disabled
by default and an option added to enable it. That was properly noted in the
UPGRADE.txt file.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@395020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 22:51:58 +00:00
Matthew Jordan
5b3d9a9b20 Clean up documentation
This patch cleans up documentation in func_channel for the following items:
* rtpsource
* secure_signaling
* secure_media
* various OOH323 parameters

(closes issue ASTERISK-20969)
Reported by: snuffy
patches:
  func_chan-update.diff uploaded by snuffy (License 5024)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@394981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 22:08:33 +00:00
Matthew Jordan
07edcbb23a Provide proper ring tone in indications.conf for Malaysia
The ring tone provided in the sample indications.conf was incorrect. This patch
modifies the sample ring tone to be what it should:
  ring = 425/400,0/200,425/400,0/2000

This brings it in line with the tone definition in DAHDI 2.7.0. (zonedata.c)

(closes issue ASTERISK-21997)
Reported by: Filip Jenicek
patches:
  malaysia_ring.patch uploaded by phill (License 6277)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@394941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 18:16:36 +00:00
Matthew Jordan
03a1e40d8e Tolerate presence of RFC2965 Cookie2 header by ignoring it
This patch modifies parsing of cookies in Asterisk's http server by doing an
explicit comparison of the "Cookie" header instead of looking at the first
6 characters to determine if the header is a cookie header. This avoids
parsing "Cookie2" headers and overwriting the previously parsed "Cookie"
header.

Note that we probably should be appending the cookies in each "Cookie"
header to the parsed results; however, while clients can send multiple
cookie headers they never really do. While this patch doesn't improve
Asterisk's behavior in that regard, it shouldn't make it any worse either.

Note that the solution in this patch was pointed out on the issue by the
issue reporter, Stuart Henderson.

(closes issue ASTERISK-21789)
Reported by: Stuart Henderson
Tested by: mjordan, Stuart Henderson
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@394900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 03:09:59 +00:00
Matthew Jordan
e3661c7fe4 Update PostgreSQL realtime scripts with schema for queue_log table
This patch updates the realtime SQL scripts with an entry that will create the
queue_log table. This brings the PostgreSQL scripts inline with the MySQL
scripts, with respect to what tables they will create.

(closes issue ASTERISK-21021)
Reported by: Eugene
patches:
  queue_log.sql uploaded by varnav (license 6360)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@394897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 02:38:43 +00:00
Matthew Jordan
35caf6f92b Document connectedline parameter for chan_iax2
The connectedline parameter for a chan_iax2 peer was undocumented. This patch
documents the options in the sample configuration file.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@394890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 02:20:36 +00:00
Michael L. Young
3b731ff2d0 Properly indicate failure to open an audio stream in res_agi
If there is an error streaming an audio file, the current return status makes it
difficult for an AGI script to determine that there was an error with the audio
file.

This patches changes the result to return -1 and the function returns
RESULT_FAILURE instead of RESULT_SUCCESS.  From looking at other parts of
res_agi, this would appear to be the proper way to handle an error.

(closes issue ASTERISK-21903)
Reported by: Ariel Wainer
Tested by: Ariel Wainer
Patches:
	asterisk-21903-return-stream-res_1.8.diff
					by Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@394641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 12:52:33 +00:00
Matthew Jordan
7bb2991218 Provide error message for QUEUE_MEMBER when member is not in queue
When QUEUE_MEMBER is used and the member specified is not in the queue,
Asterisk provides an ERROR message that indicates that the option specified
is not valid. This patch now properly displays an ERROR message that the
member is not in the queue if an interface is specified.

(closes issue ASTERISK-21980)
Reported by: Avraam David


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@394345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-14 02:34:43 +00:00
Matthew Jordan
4c8e75bcf0 Clarify documentation for function PASSTHRU
It is not apparent to the average user that the PASSTHRU function should not
be passed as ${PASSTHRU(string)} but just as PASSTHRU(string) to functions
which take a variable name and not its contents.

This patch clarifies the behavior in the documentation and provides an example.

(closes issue ASTERISK-21717)
Reported by: Richard Miller
patches:
  func_strings.diff uploaded by Richard Miller (license 5685)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@394303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-14 01:59:19 +00:00
Moises Silva
bc78bfee41 Fix a longstanding issue with MFC-R2 configuration that prevented users
from mixing different variants or general MFC-R2 settings within the same E1 line.

Most users do not have a problem with this since MFC-R2 lines are usually fractional E1s, or
the whole E1 has the same country variant and R2 settings.

In Venezuela however is common to have inbound MFC-R2 and outbound DTMF-R2 within the same E1.

This fix now properly parses the chan_dahdi.conf file to generate a new openr2 context every
time a new channel => section is found and the configuration was changed.

(closes issue ASTERISK-21117)
Reported by: Rafael Angulo
Related Elastix issue: http://bugs.elastix.org/view.php?id=1612
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@394173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 21:28:07 +00:00
Russell Bryant
9959caa047 astobj2-ify the SLA code
The SLA code within app_meetme was written before asotbj2 had been
merged into Asterisk.  Worse, support for reloads did not exist at first
and was added later as a bolt-on feature.  I knew at the time that
reloading was not safe at all while SLA was in use, so the reload would
be queued up to execute when the system was idle.  Unfortunately, this
approach was still prone to errors beyond the fact that this was the
only place in Asterisk where configuration was not reloaded
instantly when requested.

This patch converts various SLA objects to be reference counted objects
using astobj2.  This allows reloads to be processed while the system is
in use.  The code ensures that the objects will not disappear while one
of the other threads is using them.  However, they will be immediately
removed from the global trunk and station containers so no new calls
will use them if removed from configuration.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@393929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-10 01:49:41 +00:00
Richard Mudgett
802c27b394 MixMonitor: Fix refleak in manager_stop_mixmonitor() if could not stop monitoring.
........

Merged revisions 393490 from http://svn.asterisk.org/svn/asterisk/trunk


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@393630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 23:52:04 +00:00
Richard Mudgett
c03b11466d chan_dahdi: Fix segfault reloading chan_dahdi when round robin is used.
* Clear round_robin[] in dahdi_restart().

(closes issue ASTERISK-21847)
Reported by: Ivo Andonov
Patches:
      jira_asterisk_21847_v1.8.patch (license #5621) patch uploaded by rmudgett
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@393628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 23:30:20 +00:00
Igor Goncharovskiy
9ce8896d15 Fix issue with inability to cancell call transfer made by on-sceen menus.
Reported by: Igor Olhovskiy



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@393395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-02 10:14:09 +00:00
Matthew Jordan
2ffb648a20 Fix memory/ref counting leaks in a variety of locations
This patch fixes the following memory leaks:
 * http.c: The structure containing the addresses to bind to was not being
   deallocated when no longer used
 * named_acl.c: The global configuration information was not disposed of
 * config_options.c: An invalid read was occurring for certain option types.
 * res_calendar.c: The loaded calendars on module unload were not being
   properly disposed of.
 * chan_motif.c: The format capabilities needed to be disposed of on module
   unload. In addition, this now specifies the default options for the
   maxpayloads and maxicecandidates in such a way that it doesn't cause the
   invalid read in config_options.c to occur.

(issue ASTERISK-21906)
Reported by: John Hardin
patches:
  http.patch uploaded by jhardin (license 6512)
  named_acl.patch uploaded by jhardin (license 6512)
  config_options.patch uploaded by jhardin (license 6512)
  res_calendar.patch uploaded by jhardin (license 6512)
  chan_motif.patch uploaded by jhardin (license 6512)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@392810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25 01:07:29 +00:00
Jonathan Rose
be6c8d267c app_mixmonitor: Fix crashes caused by unloading app_mixmonitor
Unloading app_mixmonitor while active mixmonitors were running would
cause a segfault. This patch fixes that by making it impossible to
unload app_mixmonitor while mixmonitors are active.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-14 16:21:41 +00:00
Richard Mudgett
365e81053b app_confbridge: Fix memory leak on reload.
The config framework options should not be registered multiple times.
Instead the configuration just needs to be reprocessed by the config
framework.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-13 18:47:48 +00:00
David M. Lee
7e0ebaa2e0 Fix segfault for certain invalid WebSocket input.
The WebSocket code would allocate, on the stack, a string large enough
to hold a key provided by the client, and the WEBSOCKET_GUID. If the key
is NULL, this causes a segfault. If the key is too large, it could
overflow the stack.

This patch checks the key for NULL and checks the length of the key to
avoid stack smashing nastiness.

(closes issue ASTERISK-21825)
Reported by: Alfred Farrugia
Tested by: Alfred Farrugia, David M. Lee
Patches:
    issueA21825_check_if_key_is_sent.patch uploaded by Walter Doekes (license 5674)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-12 21:00:38 +00:00
Matthew Jordan
56a4d03ee2 Fix memory leak while loading priority modules and adding formats
This patch fixes two memory leaks:
 * When we load a module with the LOAD_PRIORITY flag, we remove its entry from
   the load order list. Unfortunately, we don't free the memory associated with
   entry in the list. This patch corrects that and properly frees the memory
   for the module in the list.

 * When adding a custom format (such as SILK or CELT), the routine for adding
   the format was leaking a reference. RAII_VAR cleans this up properly.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-12 02:25:23 +00:00
Igor Goncharovskiy
13b2c25687 Fix issue with no sound in both way in case of previous call to chan_unistim phone was canceled.
(related to ASTERISK-20183)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-11 10:22:00 +00:00
Alec L Davis
a90ad16e55 IAX2: Transfer Reject: Lock bridgecallno before touching it, refactor
1). When touching the bridgecallno, we need to lock it.

2). Remove magic number '0' and replace with TRANSFER_NONE.

3). Exit early if no bridgecallno.

4). Reduce indentation.

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-11 08:10:12 +00:00
Matthew Jordan
4a99d74105 Add announce-to-first-user option for app_queue
In r386792, the ability to play prompts to the first caller in a call queue was
added. While this is arguably a bug fix for those who expect the first caller
to continue receiving prompts while the agent is dialed, it has the side effect
of preventing the first caller from hearing the agent immediately upon
bridging. This may not be a problem for those who really want this option, but
for those who didn't care whether or not the first caller in queue heard their
position, it was an issue.

This patch disables the ability for the first caller in the queue to hear
prompts and adds a new option, announce-to-first-user, to queues.conf. Those
who the behavior can enable it by setting this value to True.

Note that if we ever implement the ability to have the prompts be stopped
upon bridging, this option can be removed.

(closes issue ASTERISK-21782)
Reported by: Remi Quezada
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10 14:25:23 +00:00
Alec L Davis
f09521a0d5 chan_iax2: nativebridge refactor, missed unlock bridgecallno
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10 09:32:01 +00:00
Alec L Davis
30cfce07f7 fix bad edit after conflict resolution
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10 08:34:46 +00:00
Alec L Davis
20b9dac9fc IAX2: refactor nativebridge transfer
remove triple checking of iaxs[fr->callno]->transferring

reduce indentation.

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10 08:23:52 +00:00
Alec L Davis
9fca44e6d4 IAX2: fix race condition with nativebridge transfers.
1). When touching the bridgecallno, we need to lock it.

2). stop_stuff() which calls iax2_destroy_helper()
    Assumes the lock on the pvt is already held, when iax2_destroy_helper() is called.
    Thus we need to lock the bridgecallno pvt before we call stop_stuff(iaxs[fr->callno]->bridgecallno);

3).   When evaluating the state of 'callno->transferring' of the current leg,
    we can't change it to READY unless the bridgecallno is locked.
      Why, if we are interrupted by the other call leg before 'transferring = TRANSFER_RELEASED',
    the interrupt will find that it is READY and that the bridgecallno is also READY so Releases the legs.

(closes issue ASTERISK-21409)

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@391063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10 07:32:51 +00:00
Alexandr Anikin
55b2eebe39 remove unnecessary declarations
(issue ASTERISK-21800)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@390229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31 10:34:20 +00:00
Alexandr Anikin
5a9206c43b reject call attempts when gatekeeper is configured but not registered
(closes issue ASTERISK-21800)
Reported by: Dmitry Melekhov
Patches:
        ASTERISK-21800-1.patch
Tested by: Dmitry Melekhov
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@390228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31 10:19:52 +00:00
Richard Mudgett
829edeffe9 Fix segfault when dealing with chan_agent channels.
Check the returned bridged pointer for NULL to avoid a crash.  It looks
like chan_agent is returning a NULL pointer when it probably should be
returning a pointer to the channel the Agent channel is pretending to be.

(closes issue ASTERISK-21793)
Reported by: Rodrigo P. Telles
Patches:
      jira_asterisk_21793_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Rodrigo P. Telles
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@390047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-29 20:18:01 +00:00
Jonathan Rose
249d7c2790 Fix a memory copying bug in slinfactory which was causing mixmonitor issues.
Reported by: Michael Walton
Tested by: Jonathan Rose
Patches:
    slinfactory.c.ASTERISK-21799.patch uploaded by Michael Walton (license 6502)
(closes issue ASTERISK-21799)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@389896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28 17:43:23 +00:00
Matthew Jordan
1aed26bc0a Print all logger messages on shutdown
When Asterisk shuts down and shuts down the loggin gsubsystem, any
messages currently in flight will not get logged. This patch prevents the
loop writing messages from breaking out prematurely, such that all of the
messages are logged.

(closes issue ASTERISK-21716)
Reported by: Corey Farrell
patches:
  logger-process-all-messages.patch uploaded by Corey Farrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@389677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24 11:49:08 +00:00
Igor Goncharovskiy
97ca159774 Fix several problems caused by multiple line usage with i2004 phones.
Reported by: Daniel Bohling, MihaiMircea

(closes issue ASTERISK-21061)
(closes issue ASTERISK-21120)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@389661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24 10:12:01 +00:00
Jason Parker
54bd3a2a9f Add doxygen.log to svn:ignore property.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@389245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-20 17:43:51 +00:00
Kevin Harwell
faeea4c0f2 Fix for segfault in __ast_rwlock_destroy with DEBUG_THREADS
If DEBUG_THREADS is enabled __ast_rwlock_destroy causes a segfault while trying
to access a possible NULL t->track object.  A NULL check has been added before
trying to access the memory.

(closes issue ASTERISK-21724)
Reported by: Corey Farrell
Fixed by: Corey Farrell
Patches:
	ast_rwlock_destroy-segv.patch uploaded by Corey Farrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-15 15:57:25 +00:00
Jason Parker
67729f6249 Fix VM snapshot handling for combined INBOX.
The snapshot API contains an option that allow for combining of new 
and old messages within a single snapshot. New messages, however, 
include options beyond just 'INBOX' - it also includes the Urgent 
folder. A previous patch that combined INBOX and Urgent accidentally 
impacted snapshots that attempted to gain messages from just the Old 
folder. This patch fixes the snapshot gathering such that the API 
returns the appropriate messages for the folder selected, with and 
without the combine option.

This should make it more clear about what's happening.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-15 14:25:35 +00:00
Kinsey Moore
457d5c39dc Use srtp_shutdown when available
This allows the SRTP library to be shut down properly when the
functionality is offered by libsrtp.

Review: https://reviewboard.asterisk.org/r/2538/
(closes issue ASTERISK-21719)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-15 12:39:55 +00:00
Richard Mudgett
a58b7639dd Make ao2 global objects not always use the debug version of the ao2_ref() calls.
The debug versions of ao2_ref() should only be used if REF_DEBUG is
enabled so nothing is written to /tmp/refs unexpectedly.

(closes issue ASTERISK-21785)
Reported by: abelbeck
Patches:
      jira_asterisk_21785_v11.patch (license #5621) patch uploaded by rmudgett
Tested by: abelbeck


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-14 18:55:57 +00:00
Michael L. Young
672040ab2e Fix Missing CALL-ID When Logging Through Syslog
The CALL-ID (ie [C-00000074]) is missing when logging to syslog.  This was just
an oversight when this feature was added.

* Add CALL-IDs when using syslog

(closes issue ASTERISK-21430)
Reported by: Nikola Ciprich
Tested by: Nikola Ciprich, Michael L. Young
Patches:
    asterisk-21430-syslog-callid_trunk.diff by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-13 21:17:44 +00:00
Michael L. Young
eec46f56f4 Fix Crash Caused By One-way Audio With auto_* NAT Settings Fix
The prior code committed, r385473, failed to take into consideration that not
all outgoing calls will be to a peer.  My fault.

This patch does the following:

* Check if there is a related peer involved.  If there is, check and set NAT 
  settings according to the peer's settings.

* Fix a problem with realtime peers.  If the global setting has auto_force_rport
  set and we issued a "sip reload" while a peer is still registered, the peer's
  flags for NAT are reset to off.  When this happens, we were always setting the
  contact address of the peer to that of the full contact info that we had.

(closes issue ASTERISK-21374)
Reported by: jmls
Tested by: Michael L. Young
Patches:
   asterisk-21374-fix-crash-and-rt-peers.diff by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-13 21:05:38 +00:00
Kinsey Moore
6b5b35b756 Revert r388529 for now
Adding the cleanup function needs some deeper thought since it
apparently doesn't exist for all variants of libsrtp.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-13 20:35:28 +00:00
Jonathan Rose
5287afb80c pbx: Fix lack of cleanup on macrolock and context_table
(closes issue ASTERISK-21723)
Reported by: Corey Farrell
Patches:
    core-pbx-cleanup.patch uploaded by Correy Farrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-13 19:24:59 +00:00
Kinsey Moore
c3a0ce8338 Close libsrtp properly
Ensure that libsrtp is shutdown properly when res_srtp is unloaded.

(closes issue ASTERISK-21719)
Reported by: Corey Farrell
Patches:
    res_srtp-library-shutdown.patch uploaded by Corey Farrell
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-13 18:09:21 +00:00
Richard Mudgett
e712c4320f Fix SendText AMI action to never return non-zero.
AMI actions must never return non-zero unless they intend to close the AMI
connection.  (Which is almost never.)

(closes issue ASTERISK-21779)
Reported by: Paul Goldbaum
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-13 14:26:57 +00:00
Richard Mudgett
f296671ec5 Allow mISDN to send PROGRESS messsage.
* Made isdn_msg_parser.c build a progress message with the mandatory
progress indicator IE.  (The mISDNuser NT state machine rejected sending
the incomplete message.)

Note: The associated mISDN and mISDNuser patches respectively are viewable
here:
http://svnview.digium.com/svn/thirdparty?view=rev&rev=200
http://svnview.digium.com/svn/thirdparty?view=rev&rev=201

(closes issue AST-1153)
Reported by: Guenther Kelleter
Patches:
      progress-chan_misdn.diff (license #6372) patch uploaded by Guenther Kelleter
      progress-misdn.diff (license #6372) mISDN patch uploaded by Guenther Kelleter
      progress-misdnuser.diff (license #6372) mISDNuser patch uploaded by Guenther Kelleter
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10 22:11:12 +00:00
Richard Mudgett
2e52e2aa20 Add version.c to list of ignored files in the utils directory.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10 21:49:27 +00:00
Mark Michelson
3c28267b7e Fix memory leak in pbx_dundi
pbx_dundi added an io context without removing
it. This caused a memory leak when the module was
unloaded.

(closes ASTERISK-21718)
Reported by Corey Farrell
Patches:
	pbx_dundi-ast_io_remove.patch uploaded by Corey Farrell (License #5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10 20:41:44 +00:00
Sean Bright
771ce9e1e7 Fix copy/paste error in one-touch-recording implementation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10 11:46:00 +00:00
Michael L. Young
08c2a533f2 Fix The Payload Being Set On CN Packets And Do Not Set Marker Bit
When we send out a CN packet (for instance, in the case of using rtpkeepalives),
we are not setting the payload code properly.  Also, we are setting the marker
bit when we shouldn't be according to RFC 3389, section 4.

AST_RTP_CN is not defined by AST_FORMAT codes.  Therefore, we should be using
ast_rtp_codecs_payload_code() rather than ast_rtp_codecs_payload_lookup().

11 and trunk already use the appropriate function.

* In 1.8, use ast_rtp_codecs_payload_code()

* Remove the setting of the marker bit

* Fix the debug message by incrementing the seqno after the debug message is set
  in order to display the correct seqno that was sent out

(closes issue ASTERISK-21246)
Reported by: Peter Katzmann
Tested by: Peter Katzmann, Michael L. Young
Patches:
    asterisk-21246-rtp-cng-payload-error_1.8_v2.diff
                                     uploaded by Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-09 04:10:27 +00:00
Michael L. Young
e26179599a Fix Segfault In app_queue When "persistentmembers" Is Enabled And Using Realtime
When the "ignorebusy" setting was deprecated, we added some code to allow us to
be compatible with older setups that are still using the "ignorebusy" setting
instead of "ringinuse".  We set a char *variable with the column name to use,
which helps the realtime functions to use the correct column in their SQL
queries.  When "persistentmembers" is enabled, we are not setting this variable
before the realtime functions were called to load members.  This results in the
variable being NULL and therefore causing a segfault when loading members during
the module's process of loading.

The solution was to move the code that sets that variable to be before these
realtime functions are called during the loading of the module.

(closes issue ASTERISK-21738)
Reported by: JoshE
Tested by: JoshE
Patches:
    asterisk-21738-rt-ringinuse-field-not-set.diff
                                     uploaded by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@388108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-09 03:30:49 +00:00
Alec L Davis
527a611c80 chan_sip: NOTIFYs for BLF start queuing up and fail to be sent out after retries fail
RFC6665 4.2.2: ... after a failed State NOTIFY transaction remove the subscription

The problem is that the State Notify requests rely on the 200OK reponse for pacing control
and to not confuse the notify susbsystem.
The issue is, the pendinginvite isn't cleared if a response isn't received,
thus further notify's are never sent.

The solution, follow RFC 6665 4.2.2's 'SHOULD' and remove the subscription after failure.
  
(closes issue ASTERISK-21677)

Reported by: Dan Martens
Tested by: Dan Martens, David Brillert, alecdavis
alecdavis (license 585)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-08 07:19:11 +00:00
David M. Lee
1a3c5aaa6c Minor fixups to Doxygen comments.
The \example tags marks an entire file as an example, not a code snippet.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-07 18:29:30 +00:00
Russell Bryant
a1b9d36dd1 Make SLA reload more paranoid.
Reload support was originally not included for SLA.  It was added later,
but in a fairly non-traditional way.  It basically sets a flag
indicating that a reload is pending, and then waits for a time where it
thinks everything SLA related is idle and unused, and *then* executes
the reload.  It does this because the reload process is destructive.  It
starts by throwing everything away and starting over.

There are a number of problems with this approach.  One of them is that
the check to see if anything in use was incomplete.  This patch makes it
more complete and thus less likely for a crash to occur during reload
processing.  However, this approach still has problems so some much more
significant reworking of this code will need to come in as a next step.

Patch credit and testing by CoreDial, LLC.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-06 15:55:27 +00:00
Matthew Jordan
0313fb6618 Update utils Makefile to handle r387294
Alec's patch that added the Asterisk version to 'core show locks' angered the
items in utils, as they exist somewhat outside of the Asterisk build system.
Some day, this Makefile should get nuked from high orbit, but for now, include
version.c in its list of stuff to pile in.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02 17:15:04 +00:00
Alec L Davis
aec4d2f239 chan_sip: Session-Expires: Set timer to correctly expire at (~2/3) of the interval when not the refresher
RFC 4028 Section 10
	if the side not performing refreshes does not receive a
	session refresh request before the session expiration, it SHOULD send
	a BYE to terminate the session, slightly before the session
	expiration.  The minimum of 32 seconds and one third of the session
	interval is RECOMMENDED.

Prior to this asterisk would refresh at 1/2 the Session-Expires interval,
or if the remote device was the refresher, asterisk would timeout at interval end.

Now, when not refresher, timeout as per RFC noted above.

(closes issue ASTERISK-21742)

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02 08:09:59 +00:00
Alec L Davis
2846881045 chan_sip: Honor Session-Expires in 200OK response when it's a RE-INVITE when asterisk is the refresher.
RFC 4028 Section 7.2
 "UACs MUST be prepared to receive a Session-Expires header field in a
 response, even if none were present in the request." 

What changed
  After ASTERISK-20787, inbound calls to asterisk with no Session-Expires in the INVITE are now are offered
  a Session-Expires (1800 asterisk default) in the response, with asterisk as the refresher.

Symptom:
  After 900 seconds (asterisk default refresher period 1800), asterisk RE-INVITEs the device, the device
   may respond with a much lower Session-Expires (180 in our case) value that it is now using.

  Asterisk ignores this response, as it's deemed both an INBOUND CALL, and a RE-INVITE.

  After 180 seconds the device times out and sends BYE (hangs up), asterisk is still working with the
  refresher period of 1800 as it ignored the 'Session Expires: 180' in the previous 200OK response.
 
Fix:
	handle_response_invite() when 200OK, remove check for outbound and reinvite.
  
(closes issue ASTERISK-21664)

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02 07:22:59 +00:00
Alec L Davis
a08c0c7e5d chan_dahdi: fix lower bound check with -ve integer conversion from a float
Lower bound of a 16bit signed int is -32768 not -32767

(closes issue ASTERISK-21744)

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02 06:54:05 +00:00
Alec L Davis
6c3f4dd0c6 Add Asterisk Version to core show locks
Assist with reporting 'core show locks' when submitting bug reports.

Example below:

===========================
== SVN-branch-1.8-...
== Currently Held Locks
===========================


(closes issue ASTERISK-21743)

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02 06:45:31 +00:00
Matthew Jordan
a1d8e4fbd6 Clear the DTMF sending digit tracking on off nominal paths
In certain situations, when the RTP engine goes to send a DTMF end digit
it may be in a situation where the remote address is no longer available,
or the digit that was supposed to be sent is invalid. In such cases, we
need to clear the RTP counters appropriately. Otherwise, when the RTP
source is set again, we'll continue to think that we're in the middle of
sending a DTMF digit, which can confuse the remote party (signficantly).

(closes issue ASTERISK-21522)
Reported by: Corey Farrell
patches:
  rtp_dtmf_process_end.patch uploaded by Corey Farrell (License 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01 21:17:38 +00:00
Matthew Jordan
95dcae4aa6 Prevent crash in 'sip show peers' when the number of peers on a system is large
When you have lots of SIP peers (according to the issue reporter, around 3500),
the 'sip show peers' CLI command or AMI action can crash due to a poorly placed
string duplication that occurs on the stack. This patch refactors the command
to not allocate the string on the stack, and handles the formatting of a single
peer in a separate function call.

(closes issue ASTERISK-21466)
Reported by: Guillaume Knispel
patches:
  fix_sip_show_peers_stack_overflow_asterisk_11.3.0-v2.patch uploaded by gknispel (License 6492)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01 18:35:46 +00:00
Matthew Jordan
c5a0a69dd9 Fix CDR not being created during an externally initiated blind transfer
Way back when in the dark days of Asterisk 1.8.9, blind transferring a call
in a context that included the 'h' extension would inadvertently execute the
hangup code logic on the transferred channel. This was a "bad thing". The fix
was to properly check for the softhangup flags on the channel and only execute
the 'h' extension logic (and, in later versions, hangup handler logic) if the
channel was well and truly dead (Jim).

Unfortunately, CDRs are fickle. Setting the softhangup flag when we detected
that the channel was leaving the bridge (but not to die) caused some crucial
snippet of CDR code, lying in ambush in the middle of the bridging code, to
not get executed. This had the effect of blowing away one of the CDRs that is
typically created during a blind transfer.

While we live and die by the adage "don't touch CDRs in release branches", this
was our bad. The attached patch restores the CDR behavior, and still manages to
not run the 'h' extension during a blind transfer (at least not when it's
supposed to).

Thanks to Steve Davies for diagnosing this and providing a fix.

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

(closes issue ASTERISK-21394)
Reported by: Ishfaq Malik
Tested by: Ishfaq Malik, mjordan
patches:
  fix_missing_blindXfer_cdr2 uploaded by one47 (License 5012)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-30 22:46:16 +00:00
Jonathan Rose
6a8180034f Add forgotten event types to event_names array
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-30 22:15:51 +00:00
Sean Bright
f03ff24bac Use the proper lower bound when doing saturation arithmetic.
16 bit signed integers have a range of [-32768, 32768).  The existing code
was using the interval (-32768, 32768) instead.  This patch fixes that.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-30 13:46:53 +00:00
Rusty Newton
fdf45e459f Modifying sounds/Makefile to pull down 1.4.24 core sounds
1.4.24 core sounds includes a full set of Italian prompts for core sounds and a fix for the missing voicemail prompts in the Russian language.

(closes issue ASTERISK-19431)
(closes issue ASTERISK-19721)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-29 23:35:51 +00:00
Olle Johansson
aa676fbb84 Play periodic prompts for first call in a call queue
Review: https://reviewboard.asterisk.org/r/2263/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-29 08:54:10 +00:00
Matthew Jordan
bf9fe01359 Clean up memory leak in config file on off nominal paths when glob is allowed
If a system allows for its usage, Asterisk will use glob to help parse
Asterisk .conf files. The config file loading routine was leaking the memory
allocated by the glob() routine when the config file was in an unmodified
or invalid state.

This patch properly calls globfree in those off nominal paths.

(closes issue ASTERISK-21412)
Reported by: Corey Farrell
patches:
  config_glob_leak.patch uploaded by Corey Farrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-26 21:27:32 +00:00
Matthew Jordan
65c34c59de Clean up resources in features on exit
This patch cleans up two things features:
* It properly unregisters the CLI commands that features registered
* It cancels and performs a pthread_join on the created parking thread. This
  not only properly joins a non-detached thread, but also prevents disposing
  of the parking lots prior to the parking thread completely exiting.

(closes issue ASTERISK-21407)
Reported by: Corey Farrell
patches:
  features_shutdown-r2.patch uploaded by Corey Farrell (License 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-26 21:13:36 +00:00
Michael L. Young
9d809c0f42 Fix Displaying Symmetric RTP Global Setting
* Use comedia_string() to display correctly the symmetric rtp setting when
  running "sip show settings"


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-25 03:02:30 +00:00
Michael L. Young
99f3a897fb Change Case On Forcerport For Consistency
* Change "ForcerPort" to "Forcerport" to match everywhere else it is displayed
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-25 02:45:34 +00:00
Richard Mudgett
c1c2ae1e5f Fix crash when AMI redirect action redirects two channels out of a bridge.
The two party bridging loops were changing the bridge peer pointers
without the channel locks held.  Thus when ast_channel_massquerade()
tested and used the pointer there is a small window of opportunity for the
pointers to become NULL even though the masquerade code has the channels
locked.

(closes issue ASTERISK-21356)
Reported by: William luke
Patches:
      jira_asterisk_21356_v11.patch (license #5621) patch uploaded by rmudgett
Tested by: William luke
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-22 16:30:53 +00:00
Matthew Jordan
a3a58d9d44 Prevent res_timing_pthread from blocking callers
There were several reports of deadlock when using
res_timing_pthread. Backtraces indicated that one thread was blocked
waiting for the write to the pipe to complete and this thread held
the container lock for the timers.  Therefore any thread that wanted
to create a new timer or read an existing timer would block waiting
for either the timer lock or the container lock and deadlock ensued.

This patch changes the way the pipe is used to eliminate this source
of deadlocks:

1) The pipe is placed in non-blocking mode so that it would never
block even if the following changes someone fail...

2) Instead of writing bytes into the pipe for each "tick" that's
fired the pipe now has two states--signaled and unsignaled. If
signaled, the pipe is hot and any pollers of the read side
filedescriptor will be woken up. If unsigned the pipe is idle. This
eliminates even the chance of filling up the pipe and reduces the
potential overhead of calling unnecessary writes.

3) Since we're tracking the signaled / unsignaled state, we can
eliminate the exta poll system call for every firing because we know
that there is data to be read.

(closes issue ASTERISK-21389)
Reported by: Matt Jordan
Tested by: Shaun Ruffell, Matt Jordan, Tony Lewis
patches:
  0001-res_timing_pthread-Reduce-probability-of-deadlocking.patch uploaded by sruffell (License 5417)

(closes issue ASTERISK-19754)
Reported by: Nikola Ciprich

(closes issue ASTERISK-20577)
Reported by: Kien Kennedy

(closes issue ASTERISK-17436)
Reported by: Henry Fernandes

(closes issue ASTERISK-17467)
Reported by: isrl

(closes issue ASTERISK-17458)
Reported by: isrl

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-19 22:25:49 +00:00
David M. Lee
173259bb3b cli.c: Properly initialize debug_modules and verbose_modules.
This avoids some lock errors on the core set {debug,verbose} commands.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-19 05:18:54 +00:00
David M. Lee
42d2f385af Fix lock errors on startup.
In messages.c, there are several places in the code where we create a
tmp_tech_holder and pass that into an ao2_find call. Unfortunately, we
weren't initializing the rwlock on the tmp_tech_holder, which the hash
function was locking. It's apparently harmless, but still not the best
code.

This patch extracts all that copy/pasted code into two functions,
msg_find_by_tech and msg_find_by_tech_name, which properly initialize
and destroy the rwlock on the tmp_tech_holder.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@386006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-18 16:07:03 +00:00
Alec L Davis
f49c09b8e5 Distributed Device State broken at sites using res_xmpp or res_jabber where Secuity Advisory AST-2012-015 is inplace
res_xmpp was not adding AST_EVENT_IE_CACHABLE to the event as each message came in,
then devstate_change_collector_cb() was unable to find AST_EVENT_IE_CACHABLE in the event,
so defaulted incorrectly to AST_DEVSTATE_NOT_CACHABLE.

(issue ASTERISK-20175)
(closes issue ASTERISK-21429)
(closes issue ASTERISK-21069)
(closes issue ASTERISK-21164)

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-16 23:27:51 +00:00
Alec L Davis
2814d40134 Distributed Device State broken at sites using res_xmpp or res_jabber where Secuity Advisory AST-2012-015 is inplace
res_jabber/res_xmpp were not adding AST_EVENT_IE_CACHABLE to the event as each message came in,
then devstate_change_collector_cb() was unable to find AST_EVENT_IE_CACHABLE in the event,
so defaulted incorrectly to AST_DEVSTATE_NOT_CACHABLE.

(issue ASTERISK-20175)
(closes issue ASTERISK-21429)
(closes issue ASTERISK-21069)
(closes issue ASTERISK-21164)

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-16 23:13:58 +00:00
Jason Parker
5387ac4484 Don't unnecessarily rebuild things on every run of 'make'.
Review: https://reviewboard.asterisk.org/r/2449/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-15 17:23:19 +00:00
David M. Lee
918addee55 Fix the svn:keywords property on several files.
Normally I think keyword expansion is silly, but the one time it would have
been good, it didn't work because the property had quotes in it. This patch
fixes obviously busted svn:keywords properties.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-15 15:18:54 +00:00
Matthew Jordan
70c792d035 Calculate the timestamp for outbound RTP if we don't have timing information
This patch calculates the timestamp for outbound RTP when we don't have timing
information. This uses the same approach in res_rtp_asterisk. Thanks to both
Pietro and Tzafrir for providing patches.

(closes issue ASTERISK-19883)
Reported by: Giacomo Trovato
Tested by: Pietro Bertera, Tzafrir Cohen
patches:
  rtp-timestamp-1.8.patch uploaded by tzafrir (License 5035)
  rtp-timestamp.patch uploaded by pbertera (License 5943)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-14 03:00:27 +00:00
Matthew Jordan
9c315f85c1 Don't attempt to create a voice frame on a read error
Prior to this patch, a read error in snd_pcm_readi would still be treated as a
nominal result when constructing a voice frame from the expected data. Since
the value returned is negative, as opposed to the number of samples read,
this could result in a crash. With this patch, we now return a null frame
when a read error is detected.

Note that the patch on ASTERISK-21329 was modified slightly for this commit,
in that we bail immediately on detecting the read error, rather than bypassing
the construction of the voice frame.

(closes issue ASTERISK-21329)
Reported by: Keiichiro Kawasaki
patches:
  chan_alsa.diff uploaded by kawasaki (License 6489)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-14 02:30:19 +00:00
Michael L. Young
08e30bfa1f Fix Manager Segfault When app_queue Is Unloaded
When app_queue is unloaded, some manager commands are not being unregistered
which result in a segfault.  This patch corrects this.

(closes issue ASTERISK-21397)
Reported by: Peter Katzmann, Corey Farrell
Tested by: Corey Farrell
Patches:
    asterisk-21397-missing-unreg-manager-cmd_1.8.diff
                                                 Michael L. Young (license 5026)
    asterisk-21397-missing-unreg-manager-cmd_11.diff
                                                 Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-12 22:37:46 +00:00
Kinsey Moore
835cdcba29 Allow codec_resample to be unloaded
Ensure that trans_size is correct to prevent uninitialized entries from
preventing reload.

(closes issue ASTERISK-21401)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    codec_resample-unload.patch uploaded by Corey Farrell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-12 22:25:38 +00:00
Michael L. Young
dc06b35547 Fix app_voicemail Segfault And A Few Memory Leaks
The original report was that app_voicemail would crash.  This was caused by
ast_config_load() returning CONFIG_STATUS_FILEINVALID but no checks being
performed for that return status.  After adding the initial patch to fix this
issue, Jaco Kroon (jkroon) added some fixes to memory leaks he had discovered.

During review, Walter Doekes (wdoekes) suggested adding a helper function in
order to determine if we had a valid configuration or not.

This patch does the following:

* Creates a helper function to check if the configuration is valid

* Adds calls to the new helper function where appropiate

* Fixes memory leaks where the code returned without running
  ast_config_destroy() on the configuration that was loaded

(closes issue ASTERISK-21302)
Reported by: Jaco Kroon
Tested by: Jaco Kroon, Michael L. Young
Patches:
    asterisk-11.3.0-app_voicemail-ast_config-fixes.patch
                                                       Jaco Kroon (license 5671)
    asterisk-21302-valid_cfg_and_mem_leaks_v3-1.8.diff
                                                 Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-12 22:18:42 +00:00
Michael L. Young
f07cccecfd Fix One-Way Audio With auto_* NAT Settings When SIP Calls Initiated By PBX
When we reload Asterisk or chan_sip, the flags force_rport and comedia that are
turned on and off when using the auto_force_rport and auto_comedia nat settings
go back to the default setting off.  These flags are turned on when needed or
off when not needed at the time that a peer registers, re-registers or initiates
a call.  This would apply even when only the default global setting
"nat=auto_force_rport" is being used, which in this case would only affect the
force_rport flag.

Everything is good except for the following:  The nat setting is set to
auto_force_rport and auto_comedia.  We reload Asterisk and the peer's
registration has not expired.  We load in the settings for the peer which turns
force_rport and comedia back to off.  Since the peer has not re-registered or
placed a call yet, those flags remain off.  We then initiate a call to the peer
from the PBX.  The force_rport and comedia flags stay off.  If NAT is involved,
we end up with one-way audio since we never checked to see if the peer is behind
NAT or not.

This patch does the following:

* Moves the checking of whether a peer is behind NAT into its own function

* Create a function to set the peer's NAT flags if they are using the auto_* NAT
  settings

* Adds calls in sip_request_call() to these new functions in order to setup the
  dialog according to the peer's settings

(closes issue ASTERISK-21374)
Reported by: Michael L. Young
Tested by: Michael L. Young
Patches:
    asterisk-21374-auto-nat-outgoing-fix_v2.diff Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-12 15:01:39 +00:00
Alec L Davis
82e70b2128 IAX2 defer_full_frames fail to get sent
Ensure iax2_process_thread is signalled when a deferred frame is queued to it.

(issue ASTERISK-18827)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-12 08:50:53 +00:00
Alec L Davis
4a06abfee4 IAX2, prevent network thread starting before all helper threads are ready
On startup, it's possible for a frame to arrive before the processing threads were ready.

In iax2_process_thread() the first pass through falls into ast_cond_wait, should a frame arrive
before we are at ast_cond_wait, the signal will be ignored.
The result iax2_process_thread stays at ast_cond_wait forever, with deferred frames being queued.  

Fix: When creating initial idle iax2_process_threads, wait for init_cond to be signalled
after each thread is started.
 
(issue ASTERISK-18827)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-12 08:16:15 +00:00
Jason Parker
d8216bd9ee Add dependency on libuuid, for res_rtp_asterisk
pjproject is what actually requires libuuid.

(closes issue ASTERISK-21125)
reported by Private Name

(Ed. note: Really?  Private Name?  I am rolling my eyes so hard right now.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-11 19:59:35 +00:00
Richard Mudgett
4e01e60665 Fix 'pri intense debug span' alias.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-11 16:52:41 +00:00
Matthew Jordan
3a73c367f9 Use LDAP memory management functions instead of Asterisk's
When MALLOC_DEBUG is enabled with res_config_ldap, issues (munmap_chunk:
invalid pointer errors) can occur as the memory is being allocated with
Asterisk's wrappers around malloc/calloc/free/strdup, as opposed to the
LDAP library's wrappers.

This patch uses the LDAP library's wrappers where appropriate, so that
compiling with MALLOC_DEBUG doesn't cause more problems than it solves.

Note that the patch listed below was modified slightly for this commit
to account for some additional memory allocation/deallocations.

(closes issue ASTERISK-17386)
Reported by: John Covert
Tested by: Andrew Latham
patches:
  issue18789-1.8-r316873.patch uploaded by seanbright (License 5060)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-10 14:25:44 +00:00
Matthew Jordan
9511761e81 Fix crash in chan_sip when a core initiated op occurs at the same time as a BYE
When a BYE request is processed in chan_sip, the current SIP dialog is detached
from its associated Asterisk channel structure. The tech_pvt pointer in the
channel object is set to NULL, and the dialog persists for an RFC mandated
period of time to handle re-transmits.

While this process occurs, the channel is locked (which is good).
Unfortunately, operations that are initiated externally have no way of knowing
that the channel they've just obtained (which is still valid) and that they are
attempting to lock is about to have its tech_pvt pointer removed. By the time
they obtain the channel lock and call the channel technology callback, the
tech_pvt is NULL.

This patch adds a few checks to some channel callbacks that make sure the
tech_pvt isn't NULL before using it. Prime offenders were the DTMF digit
callbacks, which would crash if AMI initiated a DTMF on the channel at the
same time as a BYE was received from the UA. This patch also adds checks on
sip_transfer (as AMI can also cause a callback into this function), as well
as sip_indicate (as lots of things can queue an indication onto a channel).

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

(closes issue ASTERISK-20225)
Reported by: Jeff Hoppe
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-10 14:05:07 +00:00
Rusty Newton
ac5bec497a Modified the list of keys for the driver backends for sake of sample clarity
Added a line showing the mapping of "mysql" to res_config_mysql available in add-ons. We used "mysql" as an example driver key in the sample, but didn't show what module it mapped too. Also added a subtitle above the list of keys for driver backends.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-08 23:36:32 +00:00
Michael L. Young
fb652f9646 Blocked revisions 385008
........
Fix For Not Overriding The Default Settings In chan_sip

The initial report was that the "nat" setting in the [general] section was not
having any effect in overriding the default setting.  Upon confirming that this
was happening and looking into what was causing this, it was discovered that
other default settings would not be overriden as well.

This patch works similar to what occurs in build_peer().  We create a temporary
ast_flags structure and using a mask, we override the default settings with
whatever is set in the [general] section.

In the bug report, the reporter who helped to test this patch noted that the
directmedia settings were being overriden properly as well as the nat settings.

(closes issue ASTERISK-21225)
Reported by: Alexandre Vezina
Tested by: Alexandre Vezina, Michael L. Young
Patches:
  asterisk-21225-handle-options-default-prob_1.8_v4.diff.diff
						Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-08 19:56:45 +00:00
Michael L. Young
74c57919a4 Fix For Not Overriding The Default Settings In chan_sip
The initial report was that the "nat" setting in the [general] section was not
having any effect in overriding the default setting.  Upon confirming that this
was happening and looking into what was causing this, it was discovered that
other default settings would not be overriden as well.

This patch works similar to what occurs in build_peer().  We create a temporary
ast_flags structure and using a mask, we override the default settings with
whatever is set in the [general] section.

In the bug report, the reporter who helped to test this patch noted that the
directmedia settings were being overriden properly as well as the nat settings.

This issue is also present in Asterisk 1.8 and a separate patch will be applied
to it.

(issue ASTERISK-21225)
Reported by: Alexandre Vezina
Tested by: Alexandre Vezina, Michael L. Young
Patches:
  asterisk-21225-handle-options-default-prob_v4.diff
						Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-05 20:34:16 +00:00
Michael L. Young
92419e15e2 Blocked revisions 384779
........
Backport Appropiate NAT Setting Cleanup

In ASTERISK-20904, the focus was around the changes to NAT that took place in
Asterisk 11.  Since the report stated that 1.8 was fine, we didn't take a look
at 1.8 at the time.

While working on ASTERISK-21225, I could see that 1.8 would benefit from having
some of those changes applied to it.

This patch does the following:

* The important part of this patch is that it sets the peer's flags earlier in
  build_peer so that the code properly uses the peer's flags based on the peer's
  configuration.
* constify req parameter in check_via()
* update realtime schemas under the contrib directory to handle properly the NAT
  settings available in 1.8 as well as to handle the changes made in 11 to make
  upgrading easier when installing newer versions of Asterisk

(closes issue ASTERISK-21243)
Reported by: Michael L. Young
Patches:
    asterisk-20904-changes_for_1.8.diff Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-04 19:34:02 +00:00
Richard Mudgett
fe8c92adc8 chan_dahdi: Add inband_on_proceeding compatibility option.
The new inband_on_proceeding option causes Asterisk to assume inband audio
may be present when a PROCEEDING message is received.

Q.931 Section 5.1.2 says the network cannot assume that the CPE side has
attached to the B channel at this time without explicitly sending the
progress indicator ie informing the CPE side to attach to the B channel
for audio.  However, some non-compliant ISDN switches send a PROCEEDING
without the progress indicator ie indicating inband audio is available and
assume that the CPE device has connected the media path for listening to
ringback and other messages.

ASTERISK-17834 which causes this issue was dealing with a non-compliant
network switch.

(closes issue ASTERISK-21151)
Reported by: Gianluca Merlo
Tested by: rmudgett
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-03 20:18:32 +00:00
Matthew Jordan
50cdbaa94d Update documentation for CHANNEL function
Document that you can read/write the 'accountcode' and 'amaflags' on a channel.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-03 17:10:54 +00:00
David M. Lee
042579a9cb Fixed spurious rebuilds of func_version.
func_version.so was being rebuilt every time, because build.h was
changing every build, because of the cleantest dependency that was
added in r384410 to fix parallel make bugs.

Now build.h will only be created if it does not exist, which was the
original behavior of the Makefile.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-02 17:34:50 +00:00
Joshua Colp
eaa02d0f68 Remove silly use of strncmp.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-01 14:07:11 +00:00
David M. Lee
620c0e2762 Fix parallel make problems.
Occasionally, make -j would fail due to missing includes, or other
unusual errors.

This was due to the 'cleantest' target, which was designed to force a
make clean when some change in the code would cause the typical
depedency checking to fail. Several targets in the main Makefile did
not depend upon cleantest, hence would run in parallel to it. By
adding the dependency, make -j runs happily now.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-01 13:28:02 +00:00
Jonathan Rose
429dd44b39 app_voicemail: Add blank argument to externnotify if no context argument
At least one call to run_externnotify provides a NULL context parameter and
because the snprintf statement doesn't account for a NULL context parameter,
it simply writes '(null)' to the arguments string instead. This patch makes
it write two quotes back to back for that argument instead in the event of
a NULL context.

(closes issue ASTERISK-18207)
Reported by: Barry L. Kline
Patches:
	modified from patch-20130306 uploaded by Karsten Wemheuer (License 5930)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-29 16:31:45 +00:00
Kinsey Moore
ef79c00991 Address uninitialized conditional that valgrind found
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 19:51:29 +00:00
Matthew Jordan
66024dbae0 Fix a file descriptor leak in off nominal path
While looking at the security vulnerability in ASTERISK-20967, Walter noticed
a file descriptor leak and some other issues in off nominal code paths. This
patch corrects them.

Note that this patch is not related to the vulnerability in ASTERISK-20967,
but the patch was placed on that issue.

(closes issue ASTERISK-20967)
Reported by: wdoekes
patches:
  issueA20967_file_leak_and_unused_wkspace.patch uploaded by wdoekes (License 5674)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 18:51:11 +00:00
Kinsey Moore
d014e51a18 Fix white noise on SRTP decryption
When res_rtp_asterisk.c was altered to avoid attempting to apply
unprotect algorithms to non-audio RTP packets, the test used was
incorrect. This caused the audio packets to not be decrypted and
resulted in loud white noise on the other endpoint (or both endpoints
depending on the call legs involved). The test now properly checks the
version field in the RTP header to ensure that RTP and RTCP are
decrypted while other types of packets are not.

(closes issue ASTERISK-21323)
Reported by: andrea
Tested by: Kinsey Moore, andrea, John Bigelow
Patches:
    whitenoise_fix.diff uploaded by Kinsey Moore
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 17:06:07 +00:00
Matthew Jordan
b984d78c5c AST-2013-003: Prevent username disclosure in SIP channel driver
When authenticating a SIP request with alwaysauthreject enabled, allowguest
disabled, and autocreatepeer disabled, Asterisk discloses whether a user
exists for INVITE, SUBSCRIBE, and REGISTER transactions in multiple ways. The
information is disclosed when:
 * A "407 Proxy Authentication Required" response is sent instead of a
   "401 Unauthorized" response
 * The presence or absence of additional tags occurs at the end of "403
   Forbidden" (such as "(Bad Auth)")
 * A "401 Unauthorized" response is sent instead of "403 Forbidden" response
   after a retransmission
 * Retransmission are sent when a matching peer did not exist, but not when a
   matching peer did exist.

This patch resolves these various vectors by ensuring that the responses sent
in all scenarios is the same, regardless of the presence of a matching peer.

This issue was reported by Walter Doekes, OSSO B.V. A substantial portion of
the testing and the solution to this problem was done by Walter as well - a
huge thanks to his tireless efforts in finding all the ways in which this
setting didn't work, providing automated tests, and working with Kinsey on
getting this fixed.

(closes issue ASTERISK-21013)
Reported by: wdoekes
Tested by: wdoekes, kmoore
patches:
  AST-2013-003-1.8 uploaded by kmoore, wdoekes (License 6273, 5674)
  AST-2013-003-10 uploaded by kmoore, wdoekes (License 6273, 5674)
  AST-2013-003-11 uploaded by kmoore, wdoekes (License 6273, 5674)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 15:23:08 +00:00
Matthew Jordan
ccbe965e9f AST-2013-002: Prevent denial of service in HTTP server
AST-2012-014, fixed in January of this year, contained a fix for Asterisk's
HTTP server for a remotely-triggered crash. While the fix put in place fixed
the possibility for the crash to be triggered, a denial of service vector still
exists with that solution if an attacker sends one or more HTTP POST requests
with very large Content-Length values. This patch resolves this by capping
the Content-Length at 1024 bytes. Any attempt to send an HTTP POST with
Content-Length greater than this cap will not result in any memory allocation.
The POST will be responded to with an HTTP 413 "Request Entity Too Large"
response.

This issue was reported by Christoph Hebeisen of TELUS Security Labs

(closes issue ASTERISK-20967)
Reported by: Christoph Hebeisen
patches:
  AST-2013-002-1.8.diff uploaded by mmichelson (License 5049)
  AST-2013-002-10.diff uploaded by mmichelson (License 5049)
  AST-2013-002-11.diff uploaded by mmichelson (License 5049)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 14:38:02 +00:00
Matthew Jordan
916a397fc3 AST-2013-001: Prevent buffer overflow through H.264 format negotiation
The format attribute resource for H.264 video performs an unsafe read against a
media attribute when parsing the SDP. The value passed in with the format
attribute is not checked for its length when parsed into a fixed length buffer.
This patch resolves the vulnerability by only reading as many characters from
the SDP value as will fit into the buffer.

(closes issue ASTERISK-20901)
Reported by: Ulf Harnhammar
patches:
  h264_overflow_security_patch.diff uploaded by jrose (License 6182)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27 14:26:44 +00:00
Matthew Jordan
1eff40f21d Resolve deadlock between SIP registration and channel based functions
In r373424, several reentrancy problems in chan_sip were addressed. As a
result, the SIP channel driver is now properly locking the channel driver
private information in certain operations that it wasn't previously. This
exposed two latent problems either in register_verify or by functions called
by register_verify. This includes:
 * Holding the private lock while calling sip_send_mwi_to_peer. This can create
   a new sip_pvt via sip_alloc, which will obtain the channel container lock.
   This is a locking inversion, as any channel related lock must be obtained
   prior to obtaining the SIP channel technology private lock.

   Note that this issue was already fixed in Asterisk 11.

 * Holding the private lock while calling sip_poke_peer. In the same vein as
   sip_send_mwi_to_peer, sip_poke_peer can create a new SIP private, causing
   the same locking inversion.

Note that this locking inversion typically occured when CLI commands were run
while a SIP REGISTER request was being processed, as many CLI commands (such
as 'sip show channels', 'core show channels', etc.) have to obtain the channel
container lock.

(issue ASTERISK-21068)
Reported by: Nicolas Bouliane

(issue ASTERISK-20550)
Reported by: David Brillert

(issue ASTERISK-21314)
Reported by: Badalian Vyacheslav

(issue ASTERISK-21296)
Reported by: Gabriel Birke
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26 02:28:31 +00:00
Matthew Jordan
b5e32e5871 Resolve deadlock between pending CDR and batch CDR locks
r375757 attempted to resolve a race condition between multiple submissions of
CDRs while in batch mode from attempting to destroy the scheduled batch
submission by extending the batch CDR lock. Unfortunately, this causes a
deadlock between the pending CDR lock and the batch CDR lock. This patch
resolves the intent of r375757 by simply providing a new lock that protects
the scheduling of the batches. The original batch CDR lock is kept to protect
manipulation of the batch CDR settings, but has been placed such that it
is not held when the pending lock is held.

Thanks to Chase Venters for providing lock analysis on the issue.

(issue ASTERISK-21162)
Reported by: Chase Venters
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26 01:52:21 +00:00
Russell Bryant
e66ae28960 Fix multi-station answer race condition.
When an SLA trunk is ringing (inbound call on the trunk) Asterisk will
make outbound calls to the stations that have that trunk.  If more than
one station answers the call at the same time, all channels other than
the first one to answer are left in a bad state.  The channel gets
leaked, is not connected to anything, and there's no way to get rid of
it.

We now properly clean up these losing channels by hanging up on them.
Since they lost the race, as we process their answer, there is no
ringing trunk for them to answer.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26 01:36:27 +00:00
Richard Mudgett
cf3810a555 Set the CALLERID(dnid-num-plan) for incoming ISDN calls.
The CALLEDTON channel variable is set for incoming ISDN calls to the lower
7 bits of the Q.931 type-of-number/numbering-plan octet.  The
CALLERID(dnid-num-plan) should have the same value.

(closes issue ASTERISK-21248)
Reported by: rmudgett
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 23:24:29 +00:00
Sean Bright
a52a841d8e Properly delimit post data in res_config_curl.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 12:36:33 +00:00
Michael L. Young
e9bf9588f4 Fix StopMixMonitor Hanging Up When Unable To Stop MixMonitor On A Channel
A regression was accidentally introduced when allowing an optional ID to be used
when calling StopMixMonitor.  When we are unable to stop MixMonitor on a
channel, -1 is being returned which triggers the hangup of the channel.

This patch restores the prior behavior by returning 0 whether we were successful
or not.  It also allows the call from the manager to use the return code when
the action fails.

(closes issue ASTERISK-21294)
Reported by: daroz
Tested by: daroz
Patches:
  asterisk-21294-stop_mixmonitor_hangingup.diff Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22 20:41:40 +00:00
Walter Doekes
476659a5ec Have func_curl log a warning when a curl request fails.
Review: https://reviewboard.asterisk.org/r/2403/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-20 20:25:50 +00:00
Walter Doekes
9e9a75408d Minor cleanup in func_curl near hashcompat code.
Review: https://reviewboard.asterisk.org/r/2402/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-20 20:17:14 +00:00
David M. Lee
484cef29dd Remove codecs/speex/*.i on make clean
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-19 15:58:33 +00:00
David M. Lee
42891b9a08 Removed codecs/g722/*.i on make clean
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-19 15:57:29 +00:00
Joshua Colp
c379172cae Fix a bug where resources were not found due to hashing on the priority itself.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16 15:14:37 +00:00
Kinsey Moore
4a50764715 tcptls: Prevent unsupported options from being set
AMI, HTTP, and chan_sip all support TLS in some way, but none of them
support all the options that Asterisk's TLS core is capable of
interpreting. This prevents consumers of the TLS/SSL layer from setting
TLS/SSL options that they do not support.

This also gets tlsverifyclient closer to a working state by requesting
the client certificate when tlsverifyclient is set. Currently, there is
no consumer of main/tcptls.c in Asterisk that supports this feature and
so it can not be properly tested.

Review: https://reviewboard.asterisk.org/r/2370/
Reported-by: John Bigelow
Patch-by: Kinsey Moore
(closes issue AST-1093)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 12:51:34 +00:00
Matthew Jordan
fb8760d679 When a session timer expires during a T.38 call, re-invite with correct SDP
When a session timer expires during a dialog that has re-negotiated to T.38
and Asterisk is the refresher, Asterisk will send a re-INVITE with an SDP
containing audio media only. This causes some hilarity with the poor fax
session under weigh.

This patch corrects that by sending T.38 parameters if we are in the middle of
a T.38 session.

(closes issue ASTERISK-21232)
Reported by: Nitesh Bansal
patches:
  dont-send-audio-reinvite-for-sess-timer-in-t38-call.patch uploaded by nbansal (License 6418)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 01:34:12 +00:00
Matthew Jordan
e76649b53c Fix processing of call files when using KQueue on OS X
In certain situations, call files are not processed when using KQueue with
pbx_spool. Asterisk was sending an invalid timeout value when the spool
directory is empty, causing the call to kevent to error immediately. This
can create a tight loop, increasing the CPU load on the system.

(closes issue ASTERISK-21176)
Reported by: Carlton O'Riley
patches:
  kqueue_osx.patch uploaded by coriley (License 6473)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 01:23:33 +00:00
Jason Parker
e77ab46721 Fix whitespace in AST_EXT_LIB_CHECK macro.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@383062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-14 16:57:09 +00:00
Michael L. Young
d4e02135a3 Fix Sorting Order For Parking Lots Stored In Static Realtime
When retrieving the parking lots from a MySQL database table, the current order
is "filename, cat_metric desc, var_metric asc, category".  If there are multiple
parking lots with the same cat_metric but different categories, everything is
being sorted on cat_metric first resulting in errors when loading the parking
lots.

This patch fixes the problem by sorting on the category field first, then the
cat_metric field.

(closes issue ASTERISK-21035)
Reported by: Alex Epshteyn
Patches:
  asterisk-21035-orderby.diff Michael L. Young (license 5026)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 21:17:17 +00:00
Michael L. Young
4a72692442 Update Contributed Realtime Schema Files - IPv6 Addresses
This commit updates some fields in the contributed realtime schema files to
handle IPv6 addresses.

(closes issue ASTERISK-21173)
Reported by: Torrey Searle
Patches:
  realtime_sql.patch Torrey Searle (license 5334)
  asterisk-21173-update-ip-fields.diff Michael L. Young (license 5026)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 20:39:10 +00:00
Joshua Colp
7031ad62e8 Fix a crash when res_xmpp is configured using a username without a domain.
(closes issue ASTERISK-21156)
Reported by: amsoft2001


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 20:06:28 +00:00
Matthew Jordan
77ca918044 Include the Username field in SIP Registry events when Status is registered
In ASTERISK-17888, the AMI Registry event during SIP registrations was supposed
to include the Username field. Somehow, one of the events was missed. This
patch corrects that - the Username field should be included in all AMI Registry
events involving SIP registrations.

(issue ASTERISK-17888)

(closes issue ASTERISK-21201)
Reported by: Dmitriy Serov
patches:
  chan_sip.c.diff uploaded by Dmitriy Serov (license 6479)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 16:23:16 +00:00
Igor Goncharovskiy
1531ef77a8 Fix core dump on CLI usage
Fix issue with 'unistim show info' CLI command when device connected not configured



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 08:53:09 +00:00
Jonathan Rose
96c231fc18 chan_sip: Update the via header when relaying SMS MESSAGE
Prior to this change, certain conditions for sending the message would
result in an address of '(null)' being used in the via header of the
SIP message because a NULl value of pvt->ourip was used when initially
generating the via header. This is fixed by adding a call to build_via
when the address is set before sending the message.

(closes issue ASTERISK-21148)
Reported by: Zhi Cheng
Patches:
	700-sip_msg_send_via_fix.patch uploaded by Zhi Cheng (license 6475)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-08 20:16:43 +00:00
Matthew Jordan
0b37e777f6 Let vm_mailbox_snapshot combine "Urgent" when no folder is specified
r381835 fixed a bug in vm_mailbox_snapshot where combining INBOX and Old forgot
that Urgent also "counts" as new messages. This fixed the problem when any of
the three folders was specified and the combine option was used.

It missed the case where the folder isn't specified and we build a snapshot of
all folders. This patch corrects that.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 17:57:08 +00:00
Kinsey Moore
3a0a627a00 Ensure that logmsgs are freed properly
Messages sent while the logger thread is shutting down will now have
their associated callid freed properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 15:08:26 +00:00
Matthew Jordan
5b1533ca7b Add a 'secret' probation strictrtp mode to handle delayed changes in RTP source
Often, Asterisk may realize that a change in the source of an RTP stream is
about to occur and ask that the RTP engine reset it's lock on the current RTP
source. In certain scenarios, it may take awhile for the new remote system to
send RTP packets, while the old remote system may continue providing RTP during
that time period. This causes Asterisk to re-lock onto the old source, thereby
rejecting the new source when the old source stops sending RTP and the new
source begins.

This patch prevents that by having a constant secondary, 'secret' probation
mode enabled when an RTP source has been chosen. RTP packets from other sources
are always considered, but never chosen unless the current RTP source stops
sending RTP.

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

(closes issue AST-1124)
Reported by: John Bigelow
Tested by: John Bigelow

(closes issue AST-1125)
Reported by: John Bigelow
Tested by: John Bigelow



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 14:58:23 +00:00
Kinsey Moore
dde15421b5 Recorded merge of revisions 382513 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Correct app_page documentation

The 'A' and 'n' options for Page() mention that the announcement will
be played simultaneously. This is not necessarily the case.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-06 18:28:06 +00:00
Igor Goncharovskiy
d4cb37c956 Fix several unreleased mutex locks that cause problem with processing calls
(Closes issue ASTERISK-21119)
Reported by: Daniel Bohling
Tested by: Daniel Bohling

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-05 03:51:48 +00:00
Jason Parker
0667c05261 Fix comparison of presence state in event subsystem.
Several new IEs were not given types (or names), causing the comparison
function to improperly succeed.  This adds those.

(closes issue AST-1128)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-04 21:12:45 +00:00
Kevin Harwell
04100feed7 Confbridge CLI new record file name check.
This fix checks to make sure that if a confbridge record start command is issued
from the CLI it will always use the file name given on the CLI even if it
changes between start/stop records for a conference.  Previously it had been
reusing the same file between start/stops even if a new filename was given.

(issue AST-1088)
Reported by: John Bigelow


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-04 20:03:09 +00:00
Michael L. Young
2109e47109 Fix / Clean Up Some Items To Handle The New auto_* NAT Options
The original report had to do with a realtime peer behind NAT being pruned and
the peer's private address being used instead of its external address.  Upon
debugging, it was discovered that this was being caused by the addition of
the auto_force_rport and auto_comedia settings.

This patch does the following:

* Adds a missing note to the CHANGES file indicating that the default global nat
  setting is auto_force_rport

* Constify the 'req' parameter for check_via()

* Add calls to check_via() in a couple of places in order for the auto_*
  settings to do their job in attempting to determine if NAT is involved

* Set the flags SIP_NAT_FORCE_RPORT and SIP_PAGE2_SYMMETRICRTP if the auto_*
  settings are in use where it was needed

* Moves the copying of peer flags up in build_peer() to before they are used;
  this fixes the realtime prune issue

* Update the contrib/realtime schemas to allow the nat column to handle the
  different nat setting combinations we have

This patch received a review and "Ship It!" on the issue itself.

(closes issue ASTERISK-20904)
Reported by: JoshE
Tested by: JoshE, Michael L. Young
Patches:
  asterisk-20904-nat-auto-and-rt-peersv2.diff Michael L. Young (license 5026)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-01 04:28:22 +00:00
Joshua Colp
a78bb96d94 While the ICE negotiation is occurring leave strictrtp in an open state, media can and will come from different places.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 21:58:55 +00:00
Joshua Colp
f6b368216a Fix a bug with ICE and strictrtp where media could get dropped.
If the end result of the ICE negotiation resulted in the path for media
changing it was possible for the strictrtp code to discard the RTP packets.
This change causes strictrtp to enter learning mode once again when the
ICE negotiation has completed successfully.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 21:37:01 +00:00
Matthew Jordan
b056a88e08 Prevent deadlock in chan_iax2 when attempting to set caller ID
A deadlock can occur in chan_iax2 when it attempts to set the caller ID, as it
already holds the iax2 private lock and improperly fails to obtain the channel
lock before calling ast_set_callerid. By not safely obtaining the channel lock,
a locking inversion can take place, causing a deadlock.

This patch solves this by calling the required deadlock avoidance functions
that obtain the channel lock before setting the caller ID.

Thanks to Pavel for fixing my syntax errors and testing this patch out.

(closes issue ASTERISK-21128)
Reported by: Pavel Troller
Tested by: Pavel Troller
patches:
  ASTERISK-21128-1.8.diff uploaded by mjordan (license 6283)
  ASTERISK-21128-modified-1.8.diff uploaded by Pavel Troller (license 6302)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 17:16:31 +00:00
Matthew Jordan
47bd918dad Let channels joining a MeetMe conference opt out of the denoiser
For some channel drivers, specifically those that have a varying rate in the
number of audio samples, the audio quality for a MeetMe conference can be
exceedingly poor. This is due to a unilateral application of the DENOISE
function in func_speex to channels joining the conference.

The denoiser function in the speex library is initialized with the number of
audio samples in each sample that will be provided to it. If the number of
audio samples changes, the denoiser has to be thrown away and re-initialized.

While this could be worked around by removing func_speex, that doesn't help
if you actually use the denoiser with other channels on the system.

This patches does the following:
 * Checks for the presence of func_speex as opposed to codec_speex when
   determining if the DENOISE function is present (which is where the function
   is actually implemented)
 * Adds an option to MeetMe 'n' that causes the denoiser to not be applied
   to a channel when it joins. This keeps the current behavior the default, but
   let's users disable the denoiser if it causes problems on their system.

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

(closes issue AST-1062)
Reported by: Thomas Arimont
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 16:52:34 +00:00
Joshua Colp
e26bd56ff4 Relax dialog checking in get_sip_pvt_byid_locked so it works when the dialog is forked.
(closes issue ASTERISK-20638)
Reported by: eelcob
Patches:
      pedantic-call-pickup-from-tag.patch uploaded by eelcob (license 6442)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-27 16:17:50 +00:00
Joshua Colp
2d95e2884e Regenerate the configure script. The one in the tree was not working for me at all.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-27 12:22:30 +00:00
Tzafrir Cohen
6d5b04d708 Consider linux-gnuspe as linux-gnu
* The powerpcspe Linux port uses linux-gnuspe as the OS string.
* Our build system shouldn't really care for that, so just call it linux-gnu.
* Original report: Roland Stigge , http://bugs.debian.org/701505

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 19:45:09 +00:00
Walter Doekes
ce9bc4e9a1 Correct RPID parsing for unquoted display-name.
Parsing Remote-Party-ID will now succeed if display-name is of the
*(token LWS) kind and not just the quoted-string kind.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 19:34:59 +00:00
Tzafrir Cohen
35fce97da3 Remove unneeded linux-gnueabi*
As of r380521 the configure scripts converts the value of linux-gnueabi*
of OSARCH to "linux-gnu". So no point in testing for those values.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 19:19:51 +00:00
Matthew Jordan
4163b04c42 Fix typo in r382068
Well, that was embarrassing. Removed an '-l' that somehow got in there.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 15:38:05 +00:00
Matthew Jordan
d9f20617d0 Clean up ConfBridge commands to account for wait_marked users
When ConfBridge was refactored to better handle the concept of marked,
wait_marked, and normal users co-existing in a conference (thereby implementing
a state machine for the conference), the wait_marked users were put into their
own list of conference participants, separate from the active users. This list
is used for wait_marked users when they are waiting in a conference but no
marked user has joined; normal users may have joined at this point however.
There are several AMI/CLI commands that affect conference users that were not
checking the wait_marked users list:
* CLI/AMI commands that mute/unmute a participant. In this case, wait_marked
  users have to remain in their particular state and should not be affected -
  however, the commands would return "Channel not found" as opposed to the
  appropriate error condition.
* CLI/AMI commands that kick a participant. An admin should always be able to
  kick a participant out of the conference.

This patch fixes both sets of commands, and cleans up the CLI commands slightly
by allowing them to complete a participant name (this was supposed to have been
added, but the function call was commented out and wasn't implemented).

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

(closes issue AST-1114)
Reported by: John Bigelow
Tested by: John Bigelow

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 15:35:05 +00:00
Matthew Jordan
b679563222 Ensure that the default bridge/user profiles are always available
ConfBridge and Page require that there always be a default bridge and user
profile available. While properties of the default profiles can be overriden
in the configuration file, removing them can create situations where neither
application can function properly.

This patch ensures that if an administrator removes the profiles from the
confbridge.conf configuration file, the profiles are added upon load.
Documentation clarifying this has been added to the confbridge.conf.sample file.

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

(closes issue AST-1115)
Reported by: John Bigelow
Tested by: John Bigelow

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 15:24:35 +00:00
Matthew Jordan
586efe0d7f Clean up use of va_end/va_args in res_config_mysql
There were several problems using variadic argument macros in res_config_mysql.
 * Improper use of va_end. Multiple calls to va_end were possible resulting in
   an unbalanced matching of va_start/va_end.
 * Calls to va_arg after a possible encounter of a SENTINEL value.

This patch corrects those errors.

(closes issue ASTERISK-19451)
Reported by: wdoekes
patches:
  ASTERISK-19451-1.8--2.diff uploaded by wdoekes (License 5674)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-25 12:50:07 +00:00
Matthew Jordan
fec0881135 Set the sin_family on the bind address socket during initialization
Somehow, chan_jingle has managed to operate for years without setting the
sin_family on its bindaddr socket. This patch properly sets the field during
initial module load to AF_INET.

Note that the patch on the issue was modified slightly to change the
initialization of the socket from allocation of a chan_jingle private to the
module initialization, as the bindaddr object (which is static) only needs to
have the address set once.

(closes issue ASTERISK-19341)
Reported by: andre valentin
patches:
  0105-chan_jingle.patch uploaded by avalentin (License 6064)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-24 23:00:05 +00:00
Matthew Jordan
e469bc5237 Don't display the AMI ALL class authorization for users if they don't have it
When converting AMI class authorizations to a string representation, the
method always appends the ALL class authorization. This is especially
important for events, as they should always communicate that class
authorization - even if the event itself does not specify ALL as a class
authorization for itself. (Events have always assumed that the ALL class
authorization is implied when they are raised)

Unfortunately, this did mean that specifying a user with restricted class
authorizations would show up in the 'manager show user' CLI command as
having the ALL class authorization.

Rather then modifying the existing string manipulation function, this patch
adds a function that will only return a string if the field being compared
explicitly matches class authorization field it is being compared against.
This prevents ALL from being returned unless it is actually specified for
the user.

(closes issue ASTERISK-20397)
Reported by: Johan Wilfer
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-24 16:26:10 +00:00
Matthew Jordan
dfe7451e1c Make ParkAndAnnounce return to priority + 1 when return context is not defined
The ParkAndAnnounce application documentation for the optional return_context
parameter states the following:

return_context
    The goto-style label to jump the call back into after timeout. Default
    'priority+1'.

Unfortunately, the application was sending the channel back into the dialplan
at 'priority', which is the ParkAndAnnounce application call. This causes an
infinite loop of the channel constantly being parked, announced, timed out,
parked, announced, timed out... while fun, especially for those callers you
wish to drive to the end of madness, this was not the intent of the
application.

(closes issue ASTERISK-20113)
Reported by: serginuez
patches:
  app_parkandannounce.diff uploaded by serginuez (License 6405)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-24 15:37:26 +00:00
Michael L. Young
2d451c64f7 Fix FastAGI To Properly Check For A Connection
When IPv6 support was added to FastAGI, the intent was to have the ability to
check all addresses resolved for a host since we might receive an IPv4 address
and an IPv6 address.  The problem with the current code, is that, since we are
doing O_NONBLOCK, we get EINPROGRESS when calling ast_connect() but are ignoring
this instead of handling it.  We break out of the loop and continue on.  When we
later call ast_poll(), it succeeds but we never check if we have a connection or
not on the socket level.  We then attempt to send data to the host address that
we think is setup and it fails.  We then check the errno and see that we have
"connection refused" and then return with agi failed.

This patch does the following:

* Handles EINPROGRESS by creating the function handle_connection()
  - ast_poll() was moved into this function
  - This function checks the results of the connection on the socket level after
    calling ast_poll()
* Continues to the next address if the above fails to create a connection
* Once all addresses resolved are tried and we still are unable to establish a
  connection, then we return that the FastAGI call failed

(closes issue ASTERISK-21065)
Reported by: Jeremy Kister
Tested by: Jeremy Kister, Michael L. Young
Patches:
  asterisk-21065_poll_correctly_v4.diff Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-22 19:38:06 +00:00
Jonathan Rose
2ae927b930 app_dial: Honor the 'c' flag when the calling party hangs up
Apparently this feature became broken in 11, probably as a result
of the Hangup Cause project.

(closes issue ASTERISK-21113)
Reprted by: Heiko Wundram
Patches:
	app_dial.patch uploaded by Heiko Wundram (license 5822)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-22 15:41:31 +00:00
Matthew Jordan
a5159f3b9a Properly detect launchd
Asterisk was a little too pro-active in claiming that it found launchd. On
systems without launchd - such as FreeBSD - this resulted in certain items
in Asterisk that conflict with launchd to not be selectable, such as
res_timing_kqueue.

(closes issue ASTERISK-20749)
Reported by: Oleg Baranov
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-21 22:48:14 +00:00
Matthew Jordan
c157d591f5 Let vm_mailbox_snapshot_create's combine option apply to "Urgent" as well
The vm_mailbox_snapshot_create function has an option that combines the
contents of INBOX and Old into a single snapshot. The intent of this is that
both 'new' messages and 'deleted' messages are given in a single snapshot, as
some applications prefer this view of the voicemail world. Unfortunately, the
initial implementation ignored the "Urgent" folder. The "Urgent" folder is a
pseudo-INBOX, in that new messages left with the 'U' flag will be placed in
that folder as opposed to INBOX. Thus, the option failed the intent with which
it was added.

This patch makes it so that the "Urgent" folder is included in the snapshot
when that option is used.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-20 19:14:32 +00:00
Kevin Harwell
cf533947c7 Write the correct callid to the data1 field in queue_log for transfer events.
The incorrect callid was being written to the "data1" field in queue_log table
for transfer events.  The callid of the queue was being written instead of the
transfer target's callid.  This now gets the correct "transfer to" number and
places that in the "data1" field of the queue_log table when a transfer event
is triggered.

(closes issue ASTERISK-19960)
Reported by: vladimir shmagin
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19 19:44:58 +00:00
Kevin Harwell
5d8ddec0e2 Confbridge channels staying active when all participants leave.
If you started/stopped recording of a conference multiple times channels
would remain active even when all participants left the conference.  This
was due to the fact that a reference to the confbridge was being added
every time a start record command was issued, but when the recording was
stopped there was no matching de-reference thus keeping the conference alive.
Made sure only a single reference is added for the record thread no matter how
many times recording is started/stopped.  A de-reference is issued upon thread
ending.

Note, this issue is being fixed under AST-1088 since it relates to it and
should have been corrected along with those modifications.

(issue AST-1088)
Reported by: John Bigelow


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19 16:21:18 +00:00
Kevin Harwell
2be1724539 Fixed Confbridge file recording deadlock and appending.
A deadlock occurred after starting/stopping and then restarting a confbridge
recording.  Upon starting a recording a record thread is created that holds a
lock until just before exiting.  Stopping the recording does not stop/exit the
thread or release the lock.  The thread waits until recording begins again.
Starting a stopped recording signals the thread to continue and start recording
again.  However restarting the recording also created another record thread
resulting in a deadlock.  The fix was to make sure the record thread was only
created once.

Also it was noted that filenames for the recordings were being concatenated for
each start/stop.  This was fixed by creating a new file for each conference
session and appending the actual recorded data within the file (e.g. passing
the 'a' option to MixMonitor).

(issue AST-1088)
Reported by: John Bigelow
Review: http://reviewboard.digium.internal/r/374/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-18 22:21:10 +00:00
Walter Doekes
e17ec25d47 Remove "registertrying" and add "rtp_engine" from/to sip.conf.sample
The "registertrying" option was removed in r343220. The "rtp_engine"
option was added in r186078 but erroneously named "engine" in the sample.
Note that there is no global sip setting for a different engine.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-18 20:30:32 +00:00
Jonathan Rose
7a353badc5 PRESENCE_STATE: Provide better documentation for the 'e' option.
Notes that the 'e' option actually decodes data when used as a write function
such as with the SET application while it encodes data when used to read.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-18 19:43:10 +00:00
Matthew Jordan
cb623e7ad6 Don't send presencestate information if the state is invalid
Previously, presencestate information was sent whenever the state was not
NOT_SET. When r381594 actually returned INVALID presence state in all the
places it was supposed to, it caused chan_sip to start adding presence
state information to NOTIFY requests that it previously would not have
added. chan_sip shouldn't be adding presence state information when the
provider is in an invalid state; users can't set the state to invalid and
an invalid state always implies that the provider is in an error condition.

(issue AST-1084)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-16 16:22:37 +00:00
Matthew Jordan
31d1bd4cd8 Fix crash in PresenceState AMI action when specifying an invalid provider
This patch fixes a crash in Asterisk that could be caused by using the
PresenceState AMI action while providing an invalid provider. This patch
also adds some additional warnings when a user attempts to provide the
PresenceState action with invalid data, and removes some NOTICE statements
that were still lurking in the code from testing.

(closes issue AST-1084)
Reported by: John Bigelow
Tested by: John Bigelow


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 23:23:49 +00:00
Mark Michelson
a70075ce10 Fix a crash that occurred when a BYE was received on a replaced dialog.
Reference counting for the channel and its tech_pvt got messed up at
some point between 1.8 and 11. The result was that if a BYE for a dialog
that had been replaced (via an INVITE with Replaces) was received, Asterisk
would crash due to trying to access data on a channel that was no longer there.

The fix I introduced is to remove code that both unrefs the sip_pvt and sets
the channel's tech_pvt to NULL when an INVITE with Replaces is handled. This
way when a BYE is received, the tech_pvt will be non-NULL and so the BYE can
be processed and not cause a crash.

(closes issue ASTERISK-20929)
reported by Kristopher Lalletti
patches:
	ASTERISK-20929.patch uploaded by Mark Michelson (License #5049)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 18:42:02 +00:00
Kevin Harwell
1595101bb6 Stopped spamming of debug messages during attended transfer.
While autoservice is running and servicing a channel the callid is being stored
and removed in the thread's local storage for each iteration of the thread loop.
If debug was set to a sufficient level the log file would be spammed with callid
thread local storage debug messages.

Added a new function that checks to see if the callid to be stored is different
than what is already contained (if anything).  If it is different then
store/replace and log, otherwise just leave as is.  Also made it so all logging
of debug messages pertaining to the callid thread storage outputs only when
TEST_FRAMEWORK is defined.

(issue ASTERISK-21014)
(closes issue ASTERISK-21014)
Report by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/2324/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 17:17:27 +00:00
Jonathan Rose
120a7cbc03 chan_sip: Use video and text crypto attributes to append RTP profiles to SDP
Some bad copy/pasting resulted in using the audio crypto attribute for both
text and video RTP. Also the audio crypto isn't set until after these, so it
was really just bad all around.

(closes ASTERISK-20905)
Reported by: Kristopher Lalletti
patches:
	rtp_crypto_video_text.diff uploaded by Jonathan Rose (license 6182)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 17:12:20 +00:00
Richard Mudgett
6290f197dc End stuck DTMF if AST_SOFTHANGUP_ASYNCGOTO because it isn't a real hangup.
It doesn't hurt to check AST_SOFTHANGUP_UNBRIDGE either, but it should not
be set outside of a bridge.

(issue ASTERISK-20492)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14 19:44:39 +00:00
Matthew Jordan
eda002a828 Don't throw a spurious error when using DBdeltree
The function call ast_db_deltree returns the number of row deleted, or a
negative number if it failed. DBdeltree was treating any non-zero return
as an error, causing a spurious verbose error message to be displayed.

This patch handles the return code of ast_db_deltree correctly.

(closes issue ASTERISK-21070)
Reported by: ianc
patches:
  dbdeltree.diff uploaded by ianc (License #5955)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14 03:48:39 +00:00
Mark Michelson
eecb9c36ff Do not allow native RTP bridging if packetization of media streams differs.
The RTP engine will no longer allow for local and remote native RTP bridges
if packetization of streams differs. Allowing native bridging in this scenario
has been known to cause FAX failures.

(closes ASTERISK-20650)
Reported by: Maciej Krajewski
Patches:
	ASTERISK-20659.patch uploaded by Mark Michelson (License #5049)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-12 20:31:52 +00:00
Kinsey Moore
8fa605d4cc Fix some more REF_DEBUG-related build errors
When sip_ref_peer and sip_unref_peer were exported to be usable in
channels/sip/security_events.c, modifications to those functions when
building under REF_DEBUG were not taken into account. This change
moves the necessary defines into sip.h to make them accessible to
other parts of chan_sip that need them.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-12 20:16:45 +00:00
Kevin Harwell
2df1b43f7a Properly load say.conf upon reload of module app_playback.
If say.conf did not exists prior to originally loading module app_playback it
would not load on subsequent reloads of the module once it had been created.
This occurred because upon reload of the app_playback module it would only
load a new configuration if an old one had previously existed.  This fix simply
removed the association between checking if an old configuration existed and
the loading of the new one.

(closes issue ASTERISK-20800)
Reported by: pgoergler
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-11 20:55:04 +00:00
Matthew Jordan
cb3dd02781 Fix crash in res_xmpp when deleting pubsub node from CLI
An error existed in res_xmpp where it would attempt to delete attributes from
a node that itself was also deleted. Per the iksemel documentation, attributes
added using iks_insert are copied to the parent node's stack, and will be
reclaimed when that node is itself destroyed.

(closes issue ASTERISK-20982)
Reported by: marcelloceschia
patches:
  delete-node-fix.diff uploaded by marcelloceschia (License 6036)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-11 15:03:40 +00:00
Richard Mudgett
9a56a3d738 app_confbridge: Fix crash from receiving an AMI action after ConfBridge unloaded.
Unloading ConfBridge caused the next AMI action received to crash
Asterisk.

* Add the missing unregister of AMI action ConfbridgeSetSingleVideoSrc
when ConfBridge is unloaded.

(closes issue ASTERISK-20994)
Reported by: Jeremy Kister
Patches:
      jira_asterisk_20994_v11.patch (license #5621) patch uploaded by rmudgett
Tested by: Rusty Newton, Jeremy Kister


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-08 17:29:40 +00:00
David M. Lee
ff78dbf2c6 Fixed failing test from r380696.
When I added my extensive suite of session timer unit tests, apparently one of
them was failing and I never noticed. If neither Min-SE nor Session-Expires is
set in the header, it was responding with a Session-Expires of the global
maxmimum instead of the configured max for the endpoint.

(issue ASTERISK-20787)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06 20:14:32 +00:00
Damien Wedhorn
66198610a7 Fix reload skinny with active devices.
Patch ensures that d->activeline and l->activesub are moved over to the
new device and line so that on callend the appropriate subs can be found
to complete hangup before device resets.

(closes issue ASTERISK-16610)
Reported by: wedhorn
Tested by: snuffy, myself
Patches: 
    skinny-reloadactive01.diff uploaded by wedhorn (license 5019)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06 08:42:09 +00:00
Damien Wedhorn
fd266277d4 Reset skinny vmexten on reload.
Make skinny reset vmexten '\0' on reload to ensure that
it is set to '\0' if the appropriate item is removed/commented in 
skinny.conf. part of ASTERISK-21037 

Reported by: snuffy
Tested by: snuffy, myself
Patches: 
    part of immed_dial_fix.diff uploaded by snuffy (license 5024)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06 07:00:39 +00:00
Richard Mudgett
3e5f384eb9 app_page and app_confbridge: Fix custom announcement on entering conference.
The Page and ConfBridge custom announcement did not play when users
entered the conference.

* Fix the CONFBRIDGE(user,announcement) file not getting played.  The code
to do this got removed accidentally when the ConfBridge code was
restructured to be more state machine like.

* Fixed play_prompt_to_user() doxygen comments.

* Fixed the Page A(x) and n options for the caller.  The caller never
played the announcement file and totally ignored the n option.  The code
to do this was lost when the application was converted to use ConfBridge.

* Factored out setup_profile_bridge(), setup_profile_paged(), and
setup_profile_caller() routines to setup ConfBridge profiles.  Made each
profile setup routine use the default template if one has not already been
setup by dialplan.

(closes issue ASTERISK-20990)
Reported by: Jeremy Kister
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-05 19:09:40 +00:00
Richard Mudgett
ef0433e6bc app_confbridge: Fix error messages on exiting conference.
A marked user ending a conference with only end_marked users generates
error messages:
ERROR[0000][C-00000000]: confbridge/conf_state.c:47 conf_invalid_event_fn: Invalid event for confbridge user ''

* The MULTI_MARKED state was doing too much when it was kicking out the
end_marked users from the conference.  The kicked out users will clean up
after themselves when they exit the conference.

(closes issue ASTERISK-20991)
Reported by: Jeremy Kister
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-05 18:49:32 +00:00
Richard Mudgett
6754f20f59 app_page: Fixup application XML documentation typos and inaccuracies.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-05 18:22:05 +00:00
Richard Mudgett
186f8f4a39 Because the compiler can check types with a struct copy and memcpy() cannot.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-05 18:16:55 +00:00
Richard Mudgett
102c20519e Separate option_types[] from the struct definition.
Updated the option_types[] doxygen comment.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-05 18:10:46 +00:00
Jason Parker
e7e730f973 Fix how we build pjproject.
Allow parallel builds, better tolerate failures, build faster.

This also stops running dependencies before top-level configure has been run.

(closes issue ASTERISK-20815)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-04 19:50:52 +00:00
Jason Parker
d9d5028b01 Ignore warnings caused by PJ_TODO()s in pjproject.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31 21:42:34 +00:00
Jason Parker
47f8394517 Fix a few compiler warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31 21:40:09 +00:00
David M. Lee
1412adf576 Process session timers, even if Session-Expires header is missing
Previously, Asterisk only processed session timer information if both the
'Supported: timer' and 'Session-Expires' headers were present. However, the
Session-Expires header is optional. If we were to receive a request with a
Min-SE greater than our configured session-expires, we would respond with a
'Session-Expires' header that was too small.

This patch cleans the situation up a bit, always processing timer information
if the 'Supported: timer' header is present.

(closes issue ASTERISK-20787)
Reported by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/2299/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31 20:10:23 +00:00
Jason Parker
d865240168 Add support for parallel builds of pjproject.
Also adds proper dependency checking, and direct .a file targets.  We don't
take advantage of this currently, but we will soon.

(issue ASTERISK-20815)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31 19:03:03 +00:00
Jason Parker
ff0d016390 Always check for libm, regardless of configure options.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31 19:00:38 +00:00
Jason Parker
e02189ffa1 Remove a cross-compile workaround.
ar and ranlib can be easily detected with autoconf.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31 18:59:28 +00:00
Richard Mudgett
2d1b7d4732 Make CHECK_BLOCKING() debug message more useful.
Change the displayed pthread value to hex format so it can be easily
matched with CLI core show threads or gdb.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31 00:30:53 +00:00
Richard Mudgett
686f2c50c7 chan_dahdi: Fix "dahdi show channels group" for groups greater than 31.
The variable type used was not large enough to hold a group bit field.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-30 21:51:12 +00:00
Matthew Jordan
49959b511f Support building Asterisk for Raspberry Pi/Raspbian with hard-float support
Building Asterisk on Raspbian with hard-float support fails as it uses the
string 'linux-gnueabihf' for host os, as opposed to 'linux-gnueabi'. This patch
modifies the configure script for Asterisk such that it will match on any
string beginning with 'linux-gnueabi', as opposed to requiring an explicit
match.

(closes issue ASTERISK-21006)
Reported by: Christian Hesse
Tested by: Christian Hesse
patches:
  linux-gnueabihf.patch uploaded by Christian Hesse (license 6459)
  linux-gnueabihf-autoconf.patch uploaded by Christian Hesse (license 6459)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-30 17:46:52 +00:00
Matthew Jordan
df83528506 Unregister SIP provider API if module load is declined
A user in #asterisk ran into a problem where a configuration error prevented
the chan_sip module from being loaded. Upon fixing their configuratione error,
they could no longer load the chan_sip module. This was because the
configuration checking happened after the SIP provider was registered with the
Asterisk core, and subsequent attempts to load the SIP module failed as the
provider was already registered.

Since we want to detect any failure in registering chan_sip as early as
possible (as that could be emblematic of a deeper mismatch between module
and Asterisk core), this patch does not change the registration location, but
does ensure that if a module load is declined, we unregister the module as
the SIP api provider.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-30 15:07:59 +00:00
Matthew Jordan
896bf5e5a8 Perform case insensitive comparisons for T.38 attributes
RFC5347 section 2.5.2 states the following:
...
The attribute "T38MaxBitRate" was once incorrectly registered with
IANA as "T38maxBitRate" (lower-case "m"). In accordance with T.38
examples and common implementation practice, the form "T38MaxBitRate"
SHOULD be generated by implementations conforming to this package.
In general, it is RECOMMENDED that implementations of this package
accept lowercase, uppercase, and mixed upper/lowercase encodings of
all the T.38 attributes.
...

Asterisk currently does not perform case insensitive matching on the T.38
attributes. This causes the T38MaxBitRate attribute to be negotiated at
2400 baud instead of 14400 (or whatever value you actually wanted).

This patch makes it so that when we compare T.38 attributes, we do so in a case
insensitive fashion.

Note that while the issue reporter did not directly write the patch, they
contributed to it (and would have provided one themselves if the license had
gone through a tad faster), and hence get attribution for it.

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

(closes issue ASTERISK-20897)
Reported by: Eric Hill
Tested by: Eric Hill
patches:
  -- uploaded by Eric Hill
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-30 14:20:47 +00:00
Matthew Jordan
2a458061b1 Fix memory leak in res_calendar_icalendar
The ICalendar module had a systemic memory leak on each fetch of data from
the ICalendar source. The previous fetched data was not being properly
disposed. This patch makes it so that before each fetch of data, we dispose
of the previously fetched data.

(closes issue ASTERISK-21012)
Reported by: Joel Vandal
Tested by: Joel Vandal
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-30 14:15:27 +00:00
Richard Mudgett
7b41f52cf2 chan_agent: Prevent multiple channels from logging in as the same agent.
Multiple channels logging in as the same agent can result in dead channels
waiting for a condition signal that will never come because another
channel thread stole it.  A symptom is chan_sip repeatedly generating
warning messages about rescheduling autodestruction of dialogs with an
agent channel owner.

* Made only login_exec() (the app AgentLogin) clear the agent_pvt->chan
pointer to prevent multiple channels from logging in as the same agent.
agent_read(), agent_call(), and agent_set_base_channel() no longer
disconnect the agent channel from the agent_pvt.  This also eliminates the
need to keep checking for agent_pvt->chan being NULL.

* Made agent_hangup() not wake up the AgentLogin agent thread until it is
done.

* Made agent_request() not able to get the agent until he has logged in
and any wrapup time has expired.

* Made agent_request() use ast_hangup() instead of agent_hangup() to
correctly dispose of a channel.

* Removed agent_set_base_channel().  Nobody calls it and it is a bad thing
in general.

* Made only agent_devicestate() determine the current device state of an
agent.  Note: Agent group device states have never been supported.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29 17:54:17 +00:00
David M. Lee
765c1ac026 Corrected crypto tag in SDP ANSWER for SRTP. (again)
The original fix (r380043) for getting Asterisk to respond with the correct
tag overlooked some corner cases, and the fact that the same code is in 1.8.

This patch moves the building of the crypto line out of
sdp_crypto_process(). Instead, it merely copies the accepted tag. The call to
sdp_crypto_offer() will build the crypto line in all cases now, using a tag of
"1" in the case of sending offers.

(closes issue ASTERISK-20849)
Reported by: José Luis Millán
Review: https://reviewboard.asterisk.org/r/2295/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29 17:14:51 +00:00
Jonathan Rose
db03ae6c9a call_parking: Make sure fallbacks are used when lacking a flat channel exten
A regression was introduced which removed automatic fallback behavior from
the PBX. This behavior was used by call parking (or at least documented as
how the feature works) in order to select an extension when the flat channel
extension wasn't available from the comebackcontext. Parking now handles
the fallbacks internally in order to keep behavior matching with how it is
documented.

(closes issue ASTERISK-20716)
Reported by: Chris Gentle
Review: https://reviewboard.asterisk.org/r/2296/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29 17:05:23 +00:00
Matthew Jordan
3a6bc03c57 Ensure that a declined media stream is terminated with a '\r\n'
In r369028, chan_sip's processing of media streams in an SDP was modified to
better handle multiple offered media streams. Part of that change modified
how streams were declined. Previously, declined media streams were not
handled in an RFC compliant manner; now, we set the port number to 0 in the
media stream definition and proceed on with the next media stream.

Unfortunately, the formatting of the declined media stream forgot to append a
'\r\n' to the end of the media stream. This is normally added to the accepted
media streams later on in the processing of the SDP. Since the declined media
stream uses a different buffer than the accepted media streams (and is a
malloc'd buffer as opposed to a struct ast_str), it's easier to just slap the
'\r\n' on the declined media stream buffer rather than attempt to append it
later on.

So, that's what we do. And now some devices (and probably some providers) will
be a bit happier (but probably not terribly happy, since we just rejected
something they offered).

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

(closes issue ASTERISK-20908)
Reported by: Dennis DeDonatis
Tested by: Dennis DeDonatis



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29 14:45:46 +00:00
Matthew Jordan
3f49b5faba Update configure script to be compatible with ptlib 2.10.9
With ptlib 2.10.9, the configure script fails due to grep returning multiple
matches for the pattern it searches for. This patch updates the pattern
matching to return only the actual version for the symbol searched for,
PTLIB_VERSION.

(closes issue ASTERISK-20980)
Reported by: Stefan Reuter
patches:
  ASTERISK-20980-1.patch uploaded by Stefan Reuter (license 5339)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29 02:09:51 +00:00
Sean Bright
c835ff7cd4 Correct the number of available call numbers in IAX2.
There is currently an edge case where call number 32768 might be allocated for
a call, even though the IAX2 protocol requires call numbers be only 15 bits.
This resulted in some unpredictable behavior when call number 32678 is chosen.

This patch was mostly written by Richard Mudgett via ReviewBoard.  I'm just
committing it.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-28 21:08:04 +00:00
Russell Bryant
ae5c07f0f1 Change cleanup ordering in filestream destructor.
This patch came about due to a problem observed where wav files had an
empty header.  The header is supposed to be updated in wav_close().  It
turns out that this was broken when the cache_record_files option from
asterisk.conf was enabled.  The cleanup code was moving the file to its
final destination *before* running the close() method of the file
destructor, so the header didn't get updated.

Another problem here is that the move was being done before actually
closing the FILE *.

Finally, the last bug fixed here is that I noticed that wav_close()
checks for stream->filename to be non-NULL.  In the previous cleanup
order, it's checking a pointer to freed memory.  This doesn't actually
cause anything to break, but it's treading on dangerous waters.  Now the
free() of stream->filename is happening after the format module's
close() method gets called, so it's safer.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-28 01:57:26 +00:00
Michael L. Young
dc1100b899 Fix Some Configured Conference Bridge Sounds Not Being Set
The "sound_only_one" sound was not being set even though it was configured.  In
looking into this, I found that the "join" and "leave" prompts were not being
set either.

(closes issue ASTERISK-20898)
Reported by: Stephan
Tested by: Stephan
Patches:
    asterisk-20898-custom-sounds-ignored.diff uploaded by 
                                                 Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-27 20:31:39 +00:00
David M. Lee
7be62f9931 Corrected crypto tag in SDP ANSWER for SRTP.
When Asterisk responds with an SDP ANSWER for SRTP, it had the code to
correctly fill in the crypto data, which was overwritten by a call to
sdp_crypto_offer. Corrected the situation by changing sdp_crypto_offer
to not replacing crypto data if it already exists.

(closes issue ASTERISK-20849)
Reported by: José Luis Millán
Tested by: Iñaki Baz Castillo
Patches:
	fix_sdp_crypto_tags.diff uploaded by Pedro Kiefer (license 6407)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-24 16:39:33 +00:00
Matthew Jordan
322525bece Correct documentation for ConfbridgeList AMI action
The documentation for ConfbridgeList states that the Conference field is
optional. That's not really the case: if you fail to provide a Conference
number, the command will kick back an error.

(closes issue AST-1090)
Reported by: John Bigelow


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-24 04:01:27 +00:00
Richard Mudgett
24b4a30a09 Attempt to be more helpful when using a bad ao2 object pointer.
Put the external obj pointer in the message instead of the internal version.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-23 00:23:26 +00:00
Jonathan Rose
c7d22a6af6 res_fax_spandsp: fix t38 transmission bug caused by not returning success
This patch fixes the problem, but the issue includes a test which is still
being considered for the automated test suite.

(issue ASTERISK-20919)
Reported by: NITESH BANSAL
Patches:
	patch_ast_fax_spandsp.patch uploaded by NITESH BANSAL (license 6418)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22 22:05:14 +00:00
Jonathan Rose
36d3124745 app_meetme: Use new prompts for administrator menu
The old prompts for the administrator menu were inadequate. They didn't mention
that the menu had additional options through the 8 key and pressing the 8 key
wouldn't reveal what those options were. This patch fixes all of that while
also organizing code pertaining to each individual menu type which was
previously all stored in one gigantic function along with many of the basic
conference functions.

(closes issue AST-996)
Reported by: John Bigelow
Review: http://reviewboard.digium.internal/r/360/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22 19:07:42 +00:00
Matthew Jordan
9faedde313 Fix station ringback; trunk hangup issues in SLA
This patch fixes two bugs:
 * If an outbound call is made from a SLA phone using SLAStation, then there is
   no ringtone audible to the phone that originates the call. The indication of
   the ringing was not being passed to the SLA station; this patch fixes that
   by passing through the progress indications.
 * If an SLA station hangs up before the called party answers, then the channel
   to the called party continues to ring until a timeout occurs. If the called
   party manages to answer, Asterisk attempts to connect the called party to
   a non-existant MeetMe room. This patch corrects the behavior by abandoning
   the call attempt if it detects that the SLA station is no longer in use
   while attempting to call the called party.

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

(closes issue ASTERISK-20462)
Reported by: dkerr
patches:
  asterisk-11-bugid20440+20462.patch uploaded by dkerr (license 5558)
  asterisk-11-bugid20462.patch uploaded by dkerr (license 5558)

(closes issue ASTERISK-20440)
Reported by: dkerr
patches:
  asterisk-11-bugid20440.patch uploaded by dkerr (license 5558)
  asterisk-11-bugid20440+20462.patch uploaded by dkerr (license 5558)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22 14:51:54 +00:00
Richard Mudgett
df6a5fb23f confbridge: Minor fixes playing user counts to the conference.
* Generate a warning message if sound files do not exist when trying to
play the user count to the conference.  Use the new helper routine
sound_file_exists() for consistency.

* Put the new user into autoservice when playing user counts to the
conference.

* Check the return value of ast_bridge_impart().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22 00:35:34 +00:00
Matthew Jordan
e7d0d2bd4c Update init.d scripts to handle stderr; readd splash screen for remote consoles
When r376428 was commited to re-order start up sequences to be more tolerant of
forking with thread primitives, a few items were changed that caused changes
in behavior on some distros. This includes:
 * Not displaying the splash screen on a remote console.
 * Displaying an error message on stderr when a remote console cannot connect
   to a running instance of Asterisk.

In the first case, the splash screen was re-added (thanks to Michael L. Young).
In the second case, the various init.d scripts were modified to pipe stderr
to /dev/null, as the error message is useful - if you execute a remote
console or a remote console command execution and it fail, it should tell
you. Note that the error message was always present, it just failed to be
printed prior to r376428.

Much thanks to the folks who quickly reported this problem, provided solutions,
and promptly tested the various init.d scripts on a variety of distros.

(closes issue ASTERISK-20945)
Reported by: Warren Selby
Tested by: Michael L. Young, Jamuel Starkey, kaldemar, Danny Nicholas, mjordan
patches:
  asterisk-20945-remote-intro-msg.diff uploaded by elguero (license 5026)
  ASTERISK-20945-1.8-mjordan.diff uploaded by mjordan (license 6283)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21 20:40:13 +00:00
Kinsey Moore
dbb4b6c8b6 Prevent segfault for interpolated iLBC frames
When iLBC is being used with a jitter buffer and the jb has to
interpolate frames, it generates frames with a null pointer and a
non-zero datalen. This is now handled properly.

(closes issue ASTERISK-20914)
Reported By: John McEleney
Patches:
  ASTERISK-20914-1.8.diff uploaded by Matt Jordan (license 6283)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21 18:33:12 +00:00
Damien Wedhorn
3db7711a63 Fix device call logging issues in skinny
Skinny device call logging (ie missed, place and received calls) has issues 
because the incorrect sequence of callstates is/can be sent to the device.
This patch removes some extra callstate updates driven by forces external
to skinny and ensures the needed intermediary callstate messages are sent.

(closes issue ASTERISK-20964)
Reported by: wedhorn
Tested by: snuffy, myself
Patches: 
    ast11-skinny-calllog01.diff uploaded by wedhorn (license 5019)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21 06:27:24 +00:00
Andrew Latham
bd958b3250 Add LDAP libraries to install script
Add LDAP dev package to Debian/Ubuntu install list.  Existed in Redhat already.

(issue ASTERISK-20886)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21 04:39:23 +00:00
Matthew Jordan
89949f1c5f Fix crash in app_minivm when mime encoding string
An incorrect string initializations was left in ast_str_encode_mime from the
patch that converted string manipulations to use ast_str strings (r191140).
The string initialization causes a crash when ast_str_set is called on
the string later on in the function.

(closes issue ASTERISK-18697)
Reported by: Chris Boot
patches:
  minivm-null-pointer-dereference-fix.patch uploaded by bootc (license 6309)

(issue ASTERISK-20854)
Reported by: Chris Warr
Tested by: Chris Warr
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21 04:07:05 +00:00
Damien Wedhorn
cb5f7233b9 Fix issues with skinny sessions
Fixes a couple of issues with the way skinny handles sessions by ensuring
sessions aren't used after being freed. Some other minor changes.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-20 02:53:29 +00:00
Walter Doekes
bb450bafd7 Add builtin roundf() for systems lacking it.
(closes issue ASTERISK-16854)
Review: https://reviewboard.asterisk.org/r/2276
Reported-by: Ovidiu Sas
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-19 20:49:43 +00:00
Matthew Jordan
f08028c445 Fix astcanary startup problem due to wrong pid value from before daemon call
When Asterisk forks itself into the background via a call to daemon, it must
re-set the pid value of the new process. Otherwise, astcanary gets the pid
value of the process before the fork, which prevents it from running. Asterisk
eventually starts lowering its priority, as it can no longer communicate
with the proverbial canary in the coal mine.

This patch ensures that the correct process identifier is used by astcanary.

Note that this is getting committed to 10 as a regression fix.

(closes issue ASTERISK-20947)
Reported by: Jakob Hirsch
Tested by: mjordan
patches:
  asterisk-10.12.0.astcanary_ppid.diff uploaded by Jakob Hirsch (license 6113)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-19 00:17:53 +00:00
Kinsey Moore
c32dc894ca Fix regression in Confbridge user count
When the restructuring work got committed to Confbridge in r375470 to
fix many open issues, it caused a regression in the reported count of
users when conference information was requested via CLI or manager.
This corrects the user count and user information displayed when
listing conference information from the CLI and manager.

(closes issue ASTERISK-20938)
Reported By: Timo Teras
Patches:
  confbridge-list.patch uploaded by Timo Teras (license 5409)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-18 21:46:58 +00:00
David M. Lee
af6b4fed4f Specify the -rpath linker flag when prefix != /usr.
This allows Asterisk to start without having to specify the
LD_LIBRARY_PATH. This can be disabled by passing --disable-rpath to
configure.

(closes issue ASTERISK-20407)
Reported by: David M. Lee
Review: https://reviewboard.asterisk.org/r/2132/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-18 21:10:23 +00:00
Jonathan Rose
1752c6279d app_voicemail: Improve msg_id handling
app_voicemail will no longer issue error messages when it retrieves an msg_id
with a NULL value from realtime and will instead simply populate the msg_id
field with a newly generated msg_id. In addition, this patch changes the way
msg_ids are generated to eliminate certain causes of duplicate IDs appearing
within a single system. In addition, when messages are copied, they will now
receive a new msg_id.

(closes issue ASTERISK-20717)
Reported by: Alec Davis
Review: https://reviewboard.asterisk.org/r/2220/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-18 18:13:58 +00:00
David M. Lee
f04706fde4 Fix Record-Route parsing for large headers.
Record-Route parsing copied the header into a char[256] array, which can
be a problem if the header is longer than that. This patch parses the
header in place, without the copy, avoiding the issue.

In addition to the original patch, I added a unit test for the new
get_in_brackets_const function.

(closes issue ASTERISK-20837)
Reported by: Corey Farrell
Patches:
	chan_sip-build_route-optimized-rev1.patch uploaded by Corey Farrell (license 5909)
	(with minor changes by dlee)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-18 05:26:56 +00:00
Matthew Jordan
b80431fe60 Fix issue where chan_mobile fails to bind to first available port
Per the bluez API, in order to bind to the first available port, the rc_channel
field of the socket addressing structure used to bind the socket should be set
to 0. Previously, Asterisk had set the rc_channel field set to 1, causing it
to connect to whatever happens to be on port 1.

We could probably not explicitly set rc_channel to 0 since we memset the struct
earlier, but explicitly setting it will hopefully prevent someone from coming
in and setting it to some explicit port in the future.

(closes issue ASTERISK-16357)
Reported by: challado
Tested by: Alexander Heinz, Nikolay Ilduganov, benjamin, eliafino, David van Geyn
patches:
  ASTERISK-16357.diff uploaded by Nikolay Ilduganov (license 6253)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-17 02:30:29 +00:00
Mark Michelson
97addb10b3 Further fix misinformation in the description of manager MailboxStatus command.
The description still claimed that it returned the number of messages rather than
whether there were messages waiting.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 22:49:59 +00:00
Jason Parker
d42db66d4d Reduce number of packages install_prereq installs on Debian systems.
'search' will look for any package containing the name provided, so we need to
force a more exact search.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 21:13:15 +00:00
Richard Mudgett
cb65f124c5 Reduce call-id logging resource usage.
Since there is no need for the call-id logging ao2 object to have a lock,
don't create it with one.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 18:08:27 +00:00
Richard Mudgett
64843422b7 chan_misdn: Fix compile error.
(issue ASTERISK-15456)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 17:48:29 +00:00
Matthew Jordan
fb72636fd8 Let documentation reference links specify which module they're linking to
Again, since res_jabber/res_xmpp have duplicate APIs, their documentation ref
links have to specify which reference they're referring to. The various
documentation parsers can interpret the module attribute however they want
in order to construct the appropriate links.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 17:45:37 +00:00
Matthew Jordan
653cb7e816 Update the dtd to actually *support* the module attribute in all elements
Mea culpa.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 15:30:20 +00:00
Matthew Jordan
28bdf7d292 Add module tags to documentation for res_jabber/res_xmpp
Since res_jabber/res_xmpp provide the same APIs (app/func/manager/etc.),
the XML documentation for each needs to call out which module is providing
the documentation. The module attribute has been added to the various XML
fragments for this purpose.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 15:27:44 +00:00
Matthew Jordan
f551978e9e Fix parsing SMSSRC for SMS messages
The parser for SMS messages would incorrectly parse out the from number.
The parsing would incorrectly start scanning for the from number at the
same index as the first double quote ("); this would inadvertently cause
it to treat the first double quote as the terminating double quote for
the from number as well.

The SMSSRC should now populate correctly.

(closes issue ASTERISK-16822)
Reported by: menschentier
Tested by: Jonas Falck
patches:
 fixSMSSRC.patch uploaded by jonax (license 6320)

(closes issue ASTERISK-19153)
Reported by: Panos Gkikakis
patches:
  sms-sender-fix.diff uploaded by roeften (license 5884)  
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 04:13:33 +00:00
Matthew Jordan
9495a7ba7e Set the INVALID_EXTEN channel variable when chan_misdn forces the 'i' extension
The chan_misdn channel driver will send a channel with an invalid destination
to the 'i' extension itself if said extension can be reached. It forgot,
however, to set the INVALID_EXTEN channel variable when it bounces the channel
to this extension. Dialplan writers everywhere moaned at yet another
inconsistency.

This is yet another example of why duplicating logic in multiple places results
in bugs that stick around in Jira for just under three years.

Yes: ASTERISK-15456 was created on January 18th, 2010. Patch committed on
January 15th, 2013. Ouch.

(closes issue ASTERISK-15456)
Reported by: Thomas Omerzu
patches:
  chan_misdn_invalid.patch2 uploaded by Thomas Omerzu (license 5927)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 00:14:38 +00:00
Matthew Jordan
eabe99a23c Blocked revisions 379091
........
Prevent crash in ConfBridge due to race condition when channels leave bridge

When a channel leaves a bridge, a race condition existed where the
bridge_channel's pvt structure would be accessed after it was disposed of.
This patch prevents that by setting the pointer to the pvt to NULL prior
to disposing of it.

Note that this patch is a backport from Asterisk 10. This particular race
condition was fixed as part of the larger code rework that occurred for that
release.

The solution to this problem was pointed out by Gunnar Harms in ASTERISK-16640.

(closes issue ASTERISK-16640)
Reported by: thomas987

(closes issue ASTERISK-16835)
Reported by: saghul


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-15 03:47:58 +00:00
David M. Lee
992224c9de Fix XML encoding of 'identity display' in NOTIFY messages, continued.
When r378933 was merged into 1.8, it should have also escaped
remote_display, since it will have the same XML encoding problem when
the caller/callee roles are reversed.

(closes issue ABE-2902)
Reported by: Guenther Kelleter
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-14 15:27:19 +00:00
Matthew Jordan
af1666f1cf Reset RTP timestamp; sequence number on SSRC change
In r370252 for ASTERISK-18404, Asterisk's handling of RTP was modified to
better account for out of order RTP packets. This was accomplished by using the
RTP timestamp and sequence number to check for out of order packets. However,
when a SSRC change occurs, the timestamp and sequence number will no longer
have any relation to the previously received packets. The variables tracking
the timestamp and sequence number therefore have to be reset.

(closes issue ASTERISK-20906)
Reported by: Eelco Brolman
patches:
  dtmf_on_hold.patch uploaded by Eelco Brolman (license #6442)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-13 21:44:54 +00:00
David M. Lee
12c51024c3 Fix XML encoding of 'identity display' in NOTIFY messages.
XML encoding in chan_sip is accomplished by naively building the XML
directly from strings. While this usually works, it fails to take into
account escaping the reserved characters in XML.

This patch adds an 'ast_xml_escape' function, which works similarly to
'ast_uri_encode'. This is used to properly escape the local_display
attribute in XML formatted NOTIFY messages.

Several things to note:
 * The Right Thing(TM) to do would probably be to replace the
   ast_build_string stuff with building an ast_xml_doc. That's a much
   bigger change, and out of scope for the original ticket, so I
   refrained myself.
 * It is with great sadness that I wrote my own ast_xml_escape
   function. There's one in libxml2, but it's knee-deep in
   libxml2-ness, and not easily used to one-off escape a
   string.
 * I only escaped the string we know is causing problems
   (local_display). At least some of the other strings are
   URI-encoded, which should be XML safe. Rather than figuring out
   what's safe and escaping what's not, it would be much cleaner to
   simply build an ast_xml_doc for the messages and let the XML
   library do the XML escaping. Like I said, that's out of scope.

(closes issue ABE-2902)
Reported by: Guenther Kelleter
Tested by: Guenther Kelleter
Review: http://reviewboard.digium.internal/r/365/

........

Merged revision 378919 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-12 06:36:54 +00:00
Joshua Colp
cef6475eb0 Retain XMPP filters across reconnections so external modules continue to function as expected.
Previously if an XMPP client reconnected any filters added by an external module were lost.
This issue exhibited itself with chan_motif not receiving and reacting to Jingle signaling.

(closes issue ASTERISK-20916)
Reported by: kuj


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-11 23:04:53 +00:00
David M. Lee
48b3e46f00 Fix end condition in ast_rtp_lookup_mime_multiple2.
The erroneous end condition would never include the AST_RTP_CISCO_DTMF flag
in the debug output.

(closes issue ASTERISK-20772)
Reported by: Xavier Hienne
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09 20:29:32 +00:00
David M. Lee
1f6610acec Move declaration of ast_regex_string_to_regex_pattern futher down strings.h.
The prior location is before the declaration of struct ast_str, which causes
compiler warnings.

(closes issue ASTERISK-20852)
Reported by: Pavel Troller
Patches:
	strings.diff uploaded by Pavel Troller (license 6302)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09 20:07:07 +00:00
David M. Lee
8d7224d5a8 Replace errant tabs with spaces in causes.h.
(closes issue ASTERISK-20826)
Reported by: snuffy
Patches:
	notabs.dif uploaded by snuffy (license 5024)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09 19:37:36 +00:00
Richard Mudgett
0317ece036 app_queue: Fix incorrect assertion.
(issue ASTERISK-16115)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09 00:03:40 +00:00
Richard Mudgett
69fc13fb67 app_queue: Fix multiple calls to a queue member that is in only one queue.
When ringinuse=no queue members can receive more than one call if these
calls happen at nearly the same time.

* Fix so a queue member does not receive more than one call from a queue.

NOTE: This fix does not prevent multiple calls to a member if the member
is in more than one queue.

* Did some refactoring to eliminate some code redundancy.

(issue ASTERISK-16115)
Reported by: nik600
Patches:
      jira_asterisk_16115_single_q_v1.8.patch (license #5621) patch uploaded by rmudgett
      Modified

* Revert the -r341580 and -r341599 changes adding the queues.conf
check_state_unknown option as it was added in an attempt to fix this
problem.  The fix did not need to be optional.  The fix should not have
tried to explicitly set the device state.  Setting the device state by
something other than the device introduces a race condition.  I also could
not see how the change would be effective other than delaying the
app_queue code long enough for the device state to propagate to app_queue.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-08 23:28:03 +00:00
Damien Wedhorn
d35f6c5210 Rewrite skinny dialing to remove threaded simpleswitch
This rewrite changes skinny dialing from the threaded simpleswitch
to a scheduled timeout approach. There were some underlying issues
with the threaded simple switch with occasional corruption and
possible segfaults.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-06 20:40:10 +00:00
Jonathan Rose
d566b201ae res_srtp: Prevent a crash from occurring due to srtp_create failures in srtp_create
Under some circumstances, libsrtp's srtp_create function deallocates memory that
it wasn't initially responsible for allocating. Because we weren't initially
aware of this behavior, this memory was still used in spite of being unallocated
during the course of the srtp_unprotect function. A while back I made a patch
which would set this value to NULL, but that exposed a possible condition where
we would then try to check a member of the struct which would cause a segfault.
In order to address these problems, ast_srtp_unprotect will now set an error value
when it ends without a valid SRTP session which will result in the caller of
srtp_unprotect observing this error and hanging up the relevant channel instead of
trying to keep using the invalid session address.

(closes issue ASTERISK-20499)
Reported by: Tootai
Review: https://reviewboard.asterisk.org/r/2228/diff/#index_header
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-04 23:04:59 +00:00
Kinsey Moore
8653377baf Fix pjproject compilation in certain circumstances
On a fresh checkout of Asterisk 11, running make before ./configure
could cause the pjproject subdirectory to get in an odd state that
would prevent compilation. This patch by Tilghman prevents that from
occurring.

(closes issue ASTERISK-20681)
Reported by: Dinesh Ramjuttun
Tested by: danilo borges, Steve Lang
patches:
  20121208__ccar_solved.diff.txt uploaded by Tilghman Lesher (license 5003)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-04 22:18:21 +00:00
Michael L. Young
10a948a8ca Fix SIP Notify Messages To Have The Proper IP Address In The FROM Field
On a multihomed server when sending a NOTIFY message, we were not figuring out
which network should be used to contact the peer.

This patch fixes the problem by calling ast_sip_ouraddrfor() and then
build_via() so that our NOTIFY message contains the correct IP address.

Also, a debug message is being added to help follow the call-id changes that
occur.  This was helpful for confirming that the IP address was set properly
since the call-id contains the IP address.  It also will be helpful for
troubleshooting purposes when following a call in the debug logs.

(closes issue ASTERISK-20805)
Reported by: Bryan Hunt
Tested by: Bryan Hunt, Michael L. Young
Patches:
    asterisk-20805-notify-ip-v2.diff uploaded by Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-04 21:18:18 +00:00
Joshua Colp
c4587d7170 Don't pass STUN packets through the SRTP unprotect function.
(closes issue AST-1036)
Reported by: jbigelow
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-04 21:16:32 +00:00
Michael L. Young
aeeeb28d27 Fix Queue Log Reporting Every Call COMPLETECALLER With "h" Extension Present
When the "h" extension is present within the context of the queue, all calls
are being reported COMPLETECALLER even when the agent is hanging up the call.

This patch checks to see if the agent hung-up or not instead of only relying on
checking if the queue (caller) channel hung-up or not.  It would appear that
having the h extension in the mix, the pbx goes to the h extension,
"hanging-up" the queue channel and triggering the reporting of COMPLETECALLER.

(closes issue ASTERISK-20743)
Reported by: call
Tested by: call, Michael L. Young
Patches: 
    asterisk-20743-q-cmplt-caller.diff 
                                     uploaded by Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 22:12:27 +00:00
Richard Mudgett
f6ae419786 chan_agent: Fix wrapup time wait response.
* Made agent_cont_sleep() and agent_ack_sleep() stop waiting if the wrapup 
time expires.  agent_cont_sleep() had tried but returned the wrong value 
to stop waiting.  

* Made agent_ack_sleep() take a struct agent_pvt pointer instead of a void
pointer for better type safety.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 19:41:56 +00:00
Kinsey Moore
914397aa23 Add missing test event
This test event was missing from channel.c causing the dial_LS_options
test to fail intermittently because of a race condition where most code
paths emitted the test event but this one did not. The dial_LS_options
test should stop bouncing now.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 18:48:00 +00:00
Richard Mudgett
ce8d64cd99 chan_agent: Misc code cleanup.
* Fix off-nominal path resource cleanup in agent_request().

* Create agent_pvt_destroy() to eliminate inlined versions in many places.

* Pull invariant code out of loop in add_agent().

* Remove redundant module user references in login_exec().

* Remove unused struct agent_pvt logincallerid[] member.

* Remove some redundant code in agent_request().
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 18:44:08 +00:00
Richard Mudgett
bba3c7a1f2 chan_agent: Fix agent_indicate() locking.
Avoid deadlock potential with local channels and simplify the locking.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 17:46:44 +00:00
Joshua Colp
17467a6926 Prevent exhaustion of system resources through exploitation of event cache
This patch changes res_xmpp to no longer cache events under certain circumstances.

(issue ASTERISK-20175)
Reported by: Russell Bryant, Leif Madsen, Joshua Colp
Tested by: kmoore


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 15:38:39 +00:00
Matthew Jordan
3778ed7fc1 Prevent crashes in res_xmpp when receiving large messages
Similar to r378287, res_xmpp was marshaling data read from an external source
onto the stack. For a sufficiently large message, this could cause a stack
overflow. This patch modifies res_xmpp in a similar fashion to res_jabber by
removing the stack allocation, as it was unnecessary.

(issue ASTERISK-20658)
Reported by: wdoekes

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 15:36:05 +00:00
Matthew Jordan
7eb9a846d8 Prevent crashes from occurring when reading from data sources with large values
When reading configuration data from an Asterisk .conf file or when pulling
data from an Asterisk RealTime backend, Asterisk was copying the data on the
stack for manipulation. Unfortunately, it is possible to read configuration
data or realtime data from some data source that provides a large blob of
characters. This could potentially cause a crash via a stack overflow.

This patch prevents large sets of data from being read from an ARA backend or
from an Asterisk conf file.

(issue ASTERISK-20658)
Reported by: wdoekes
Tested by: wdoekes, mmichelson
patches:
 * issueA20658_dont_process_overlong_config_lines.patch uploaded by wdoekes (license 5674)
 * issueA20658_func_realtime_limit.patch uploaded by wdoekes (license 5674)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02 22:02:15 +00:00
Richard Mudgett
b1366d7acf Fix AMI redirect action with two channels failing to redirect both channels.
The AMI redirect action can fail to redirect two channels that are bridged
together.  There is a race between the AMI thread redirecting the two
channels and the bridge thread noticing that a channel is hungup from the
redirects.

* Made the bridge wait for both channels to be redirected before exiting.

* Made the AMI redirect check that all required headers are present before
proceeding with the redirection.

* Made the AMI redirect require that any supplied ExtraChannel exist
before proceeding.  Previously the code fell back to a single channel
redirect operation.

(closes issue ASTERISK-18975)
Reported by: Ben Klang

(closes issue ASTERISK-19948)
Reported by: Brent Dalgleish
Patches:
      jira_asterisk_19948_v11.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett, Thomas Sevestre, Deepak Lohani, Kayode

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02 21:17:42 +00:00
Kinsey Moore
4ae3e66995 Restore branch-1.8-merged on 11
This was accidentally deleted during a merge.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02 18:30:09 +00:00
Matthew Jordan
eda6664de0 Prevent exhaustion of system resources through exploitation of event cache
Asterisk maintains an internal cache for devices in the event subsystem. The
device state cache holds the state of each device known to Asterisk, such that
consumers of device state information can query for the last known state for
a particular device, even if it is not part of an active call. The concept of
a device in Asterisk can include entities that do not have a physical
representation. One way that this occurred was when anonymous calls are allowed
in Asterisk. A device was automatically created and stored in the cache for
each anonymous call that occurred; this was possible in the SIP and IAX2
channel drivers and through channel drivers that utilized the
res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices
are never removed from the system, allowing anonymous calls to potentially
exhaust a system's resources.

This patch changes the event cache subsystem and device state management to
no longer cache devices that are not associated with a physical entity.

(issue ASTERISK-20175)
Reported by: Russell Bryant, Leif Madsen, Joshua Colp
Tested by: kmoore
patches:
  event-cachability-3.diff uploaded by jcolp (license 5000)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02 18:09:55 +00:00
Matthew Jordan
5ebec60090 Resolve crashes due to large stack allocations when using TCP
Asterisk had several places where messages received over various network
transports may be copied in a single stack allocation. In the case of TCP,
since multiple packets in a stream may be concatenated together, this can
lead to large allocations that overflow the stack.

This patch modifies those portions of Asterisk using TCP to either
favor heap allocations or use an upper bound to ensure that the stack will not
overflow:
 * For SIP, the allocation now has an upper limit
 * For HTTP, the allocation is now a heap allocation instead of a stack
   allocation
 * For XMPP (in res_jabber), the allocation has been eliminated since it was
   unnecesary.

Note that the HTTP portion of this issue was independently found by Brandon
Edwards of Exodus Intelligence.

(issue ASTERISK-20658)
Reported by: wdoekes, Brandon Edwards
Tested by: mmichelson, wdoekes
patches:
  ASTERISK-20658_res_jabber.c.patch uploaded by mmichelson (license 5049)
  issueA20658_http_postvars_use_malloc2.patch uploaded by wdoekes (license 5674)
  issueA20658_limit_sip_packet_size3.patch uploaded by wdoekes (license 5674)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02 15:31:41 +00:00
Kinsey Moore
28b36d4864 Ensure chan_sip rejects encrypted streams without crypto info
This ensures that Asterisk rejects encrypted media streams (RTP/SAVP
audio and video) that are missing cryptographic keys and ensures that
the incoming SDP is consistent with RFC4568 as far as having a crypto
attribute present for any SAVP streams.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-31 14:44:41 +00:00
Richard Mudgett
c19b6731ba Give the causes[] a struct name.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-20 21:44:13 +00:00
Richard Mudgett
82ac496986 Add branch-1.8-merged property to allow direct merging from v1.8
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-20 21:26:27 +00:00
Kinsey Moore
32e7992bd5 Add test events for time limit-related hangups
This patch adds hangup-related test events in order to support testing
of time-limited bridges. This aids in testing the S() and L() bridge
options.

(issue SWP-4713)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-18 17:41:35 +00:00
Richard Mudgett
d571d53fa4 Fix potential double free when unloading a module.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-17 23:09:45 +00:00
Richard Mudgett
ac78bb107a Make chan_local module references tied to local_pvt lifetime.
The chan_local module references were manually tied to the existence of
the ;1 and ;2 channel links.

* Made chan_local module references tied to the existence of the local_pvt
structure as well as automatically take care of the module references.

* Tweaked the wording of the local_fixup() failure warning message to make
sense.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-17 23:01:20 +00:00
Jason Parker
c2f104641c Make libasteriskssl.so symlink use a relative path.
This was causing issues when using DESTDIR, since the path to which the link
pointed is not likely to exist (and not useful to exist) on the target system.

(issue ASTNOW-284)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-17 20:58:52 +00:00
Richard Mudgett
e623bdcea8 app_queue: Revert bad ringinuse=no patch.
With the option ringinuse=no set, the patch committed for ASTERISK-16115
causes non-SIP queue members to never be called because the device state
is checked after a channel is created to determine if the member is busy.
These queue members always get the "Member %s is busy, cannot dial"
message.

Most channel drivers other than chan_sip use the default device state
handling.  The default device-state state is considered in use or unknown
if the channel exists or not respectively.

(closes issue ASTERISK-20801)
Reported by: rmudgett
Patches:
      jira_asterisk_16115_revert_r370418_v1.8.patch (license #5621) patch uploaded by rmudgett
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-14 21:32:28 +00:00
Damien Wedhorn
62007e30f8 Fix skinny to recognise vmexten in general section of conf
Fixup the vmexten so if globally set in general section will be honored by
chan_skinny. Also get rid of the 'global_' part of variable name to match
regexten.

(closes issue ASTERISK-20790)
Reported by: snuffy
Tested by: snuffy, myself
Patches: 
    skinny-vm.diff uploaded by snuffy (license 5024)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-14 01:49:30 +00:00
Richard Mudgett
797e403982 confbridge: Fix MOH on simultaneous user entry to a new conference.
When two users entered a new conference simultaneously, one of the callers
hears MOH.  This happened if two unmarked users entered simultaneously and
also if a waitmarked and a marked user entered simultaneously.

* Created a confbridge internal MOH API to eliminate the inlined MOH
handling code.  Note that the conference mixing bridge needs to be locked
when actually starting/stopping MOH because there is a small window
between the conference join unsuspend MOH and actually joining the mixing
bridge.

* Created the concept of suspended MOH so it can be interrupted while
conference join announcements to the user and DTMF features can operate.

* Suspend any MOH until the user is about to actually join the mixing
bridge of the conference.  This way any pre-join file playback does not
need to worry about MOH.

* Made post-join actions only play deferred entry announcement files.
Changing the user/conference state during that time is not protected or
controlled by the state machine.

(closes issue ASTERISK-20606)
Reported by: Eugenia Belova
Tested by: rmudgett

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 21:04:16 +00:00
Damien Wedhorn
d3ab29934c Minor fixes for chan_skinny
Whitespace, change SUBSTATE_ONHOOK to correct SKINNY_ONHOOK and 
correct len of 2 strcmp in skinny_setdebug(). (see opticron's review
on https://reviewboard.asterisk.org/r/2240/)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 20:03:04 +00:00
Damien Wedhorn
38d06ca3d2 Fix skinny debug tab completion
Review the syntax of the 'skinny debug' command to show more than
just 'show' for options to 'skinny debug' command.

(closes issue ASTERISK-20789)
Reported by: snuffy
Tested by: snuffy, myself
Patches:
    skinny-debug.diff uploaded by snuffy (license 5024)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 18:19:35 +00:00
Kinsey Moore
3292e66ca1 Ensure Min-SE is included in outbound INVITEs
Asterisk now includes Min-SE in outbound INVITEs when the value is not
90 (the default) and session timers are not disabled. This has the
effect of Asterisk following RFC4028 more closely with regard to 422
responses and preventing situations in which Asterisk would be forced
to temporarily accept a call to tear it down based on a Session-Expires
below the locally configured Min-SE.

(issue SWP-5051)
Review: https://reviewboard.asterisk.org/r/2222/
Reported-by: Kinsey Moore
Patch-by: Kinsey Moore
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 13:51:49 +00:00
Rusty Newton
990a2e764d Incremented EXTRA_SOUNDS_VERSION in sounds/Makefile to 1.4.12 for new Extra Sounds releases
See CHANGES-* files in English extra 1.4.12 tarballs for new sound prompts added.

(closes ASTERISK-20328)
Reported by: Matt Jordan
(closes AST-755)
Reported by: John Bigelow
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-12 22:42:47 +00:00
Mark Michelson
b6d36124cd Fix a potential deadlock in chan_sip during transfers.
The issue comes from the fact that transfers may perform
a redirecting update on a channel. The issue is that lock
inversion between the channel and its tech_pvt occurs since
the channel lock is released during the transfer process.

The fix is to move when the redirecting update occurs to a
place where neither the tech_pvt or the channel is locked so
that the two can be locked in the proper order.

(closes issue ASTERISK-20708)
reported by Mark Michelson
patches:
	ASTERISK-20708-3.patch uploaded by Mark Michelson (License #5049)

Tested by:
	Tim Ringenbach at Asteria Solutions Group



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 23:59:09 +00:00
Richard Mudgett
573e76447c Cleanup CLI commands on exit for several files.
(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      unregister-cli-multiple-all.patch (license #5909) patch uploaded by Corey Farrell
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 22:01:13 +00:00
Richard Mudgett
0d7879be8c Cleanup udptl on exit.
* Cleanup CLI commands on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      udptl-shutdown-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
      udptl-shutdown-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 21:12:26 +00:00
Mark Michelson
bdd5921950 Fix crash that can occur if CLI registration fails for an aliased command.
A recent memory leak fix in main/cli.c causes an ast_cli_entry's command
field to be freed and NULLed if ast_cli_register() fails. res_clialiases
was ignoring the return value of ast_cli_register() and was then passing
the NULL command off to a a hash function. This resulted in a crash.

The fix is not to ignore the erroneous return value. If ast_cli_register()
fails, then we do not continue trying to process the current alias.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 20:51:47 +00:00
Richard Mudgett
920da001d8 Cleanup taskprocessor on exit.
* Cleanup CLI commands on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      taskprocessor-cleanup-1_8-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      taskprocessor-cleanup-10-only.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 20:45:02 +00:00
Richard Mudgett
737d2e55c6 Cleanup pbx on exit.
* Cleanup CLI commands on exit.

* Unreference hints and statecbs containers on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      pbx-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
      pbx-cleanup-10.patch (license #5909) patch uploaded by Corey Farrell
      pbx-cleanup-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 20:03:23 +00:00
Richard Mudgett
00ea66650b Cleanup logger on exit.
* Cleanup CLI commands, destroy verbosers and logchannels lists on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      logger-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 02:43:41 +00:00
Richard Mudgett
d73bad943d Cleanup indications on exit.
* Made ast_unregister_indication_country() unlink the found tone zone
before selecting a new default_tone_zone to make it impossible to select
the tone zone being unregistered again.

* Ringcadence is no longer parsed twice in store_config_tone_zone().

* Cleanup CLI commands and destroy default_tone_zone on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      indications-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 02:12:26 +00:00
Richard Mudgett
a65e904a51 Cleanup event on exit.
* Cleanup CLI commands on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      event_shutdown-10-only.patch (license #5909) patch uploaded by Corey Farrell
      event_shutdown-1_8-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 01:03:28 +00:00
Richard Mudgett
6368a140a0 Cleanup dnsmgr on exit.
* Cleanup dnsmgr thread and CLI commands on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      dnsmgr-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
      dnsmgr-cleanup-10-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 00:34:46 +00:00
Kinsey Moore
b2c2a84e17 Ensure ReceiveFax provides a CED tone via T.38
When using res_fax_digium, the T.38 CED tone was not being provided
properly which would cause some incoming faxes to fail. This was not an
issue with res_fax_spandsp since it does not strictly honor the
send_ced flag and sends the CED tone whenever receiving a T.38 fax.

(closes issue FAX-343)
Reported-by: Benjamin Tietz
Patch-by: Kinsey Moore
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 16:55:05 +00:00
Kinsey Moore
62a4ae8782 Handle Session-Expires less than local Min-SE in 200 OK
Ensure that a call is immediately torn down if a Session-Expires value
received in a 200 OK is less than the local Min-SE. This also prevents
Asterisk from allowing calls with Session-Expires below the
RFC4028-mandated minimum (90s).

(closes issue ASTERISK-20653)
Review: https://reviewboard.asterisk.org/r/2237/
Patch-by: Kinsey Moore
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 14:43:15 +00:00
Igor Goncharovskiy
eb76c8cd0b Fix codec mismatch
Fix code to send in both rx and tx open stream messages correct codecs. Found that on phase 0/1 phones wrong codecs cause to no audio in some situations. 

(issue ASTERISK-20183)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 06:49:45 +00:00
Igor Goncharovskiy
08de7e8ec4 Remove trailing whitespaces in number from incoming redial list.
Reported by: Igor Olhovskiy



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 05:23:24 +00:00
Igor Goncharovskiy
a8d9e4936b Blocked revisions 377558
........
Fix crash on transfer initiated from insreeen menu on Unistim phones. Removed CDR-related code that moved to do_masquarade before.

(closes issue ASTERISK-20417)
Reported by: Rudolf Migalin
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 05:07:07 +00:00
Tilghman Lesher
984b12310b Improve documentation by making all of the colors used readable,
no matter what the background color is.

Dark blue on a black background is unreadable, as is yellow on a
light background.  This patch turns on the bright attribute for
colors when on a dark background and turns *off* the bright
attribute when the -W command line option is used (indicating a
_light_ background).  This ensures that text is readable in both
cases.

Patch by: tilghman
Review: https://reviewboard.asterisk.org/r/2224
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 01:41:02 +00:00
Tilghman Lesher
780ad107f6 Remove some dead code and additionally handle a case that wasn't handled.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 01:27:47 +00:00
Joshua Colp
26098a9487 Add missing support for "who hung up" to chan_motif.
(closes issue ASTERISK-20671)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2208/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-09 01:22:56 +00:00
Richard Mudgett
7be97a9c31 Fix order of SIP allow/disallow in MySQL contrib script.
Using the contrib sippeers.sql script to create the sippeers MySQL table
would result in being unable to place calls if you set the disallow value
to all.

(closes issue ASTERISK-20756)
Reported by: Andre Luis
Patches:
      sippeers.patch patch uploaded by Andre Luis
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-08 00:29:56 +00:00
Richard Mudgett
8be4493e68 MALLOC_DEBUG: Only wait if we want atexit allocation dumps.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 23:43:36 +00:00
Kinsey Moore
7ce2ba5252 codec_dahdi: Fix output of "transcoder show" CLI command.
In r306010 "Asterisk media architecture conversion - no more format
bitfields", the logic for incrementing encoders and decoders when
opening transcoder channels was changed without making the corresponding
change when decrementing encoder / decoder channels.  The result being
that when a channel was destroyed, codec_dahdi couldn't properly tell if
it was an encoder or decoder, and the default case is to assume it was a
decoder.

This could result in negative numbers for decoders in use like in:
  VOIP6*CLI> transcoder show
  2/-2 encoders/decoders of 92 channels are in use.

(closes issue ASTERISK-19921)
Patch-by: Shaun Ruffell
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 22:02:50 +00:00
Richard Mudgett
97fcde6af7 confbridge: Fix some resource leaks on conference teardown.
* Made destroy_conference_bridge() destroy a missed ast_mutex_t and ast_cond_t.

* Made join_conference_bridge() init the ast_mutex_t's and ast_cond_t so
destroy_conference_bridge() can destroy them unconditionally.

* Made join_conference_bridge() abort if the new conference could not be
added to the conferences container.

* Made leave_conference() discard any post-join actions if
join_conference_bridge() had to abort early.

* Made the join_conference_bridge() diagnostic messages better describe
what happened.

* Renamed leave_conference_bridge() to leave_conference() and made it only
take a conference user pointer.  The conference pointer was redundant.

* Made conf_bridge_profile_copy() use struct copy instead of memcpy().

* No need to lock the conference in start_conf_record_thread() since all
of the callers already have it locked.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06 23:58:21 +00:00
Russell Bryant
baff2aa4b0 Add CLI tab completion to 'acl show'.
The 'acl show' CLI command allows you to show the details about a specific
named ACL in acl.conf.  This patch adds tab completion to the command.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06 17:28:35 +00:00
Matthew Jordan
2c31cfe3b3 Fix memory leak in 'manager show event' when command entered incorrectly
When the CLI command 'manager show event' was run incorrectly and its usage
instructions returned, a reference to the event container was leaked. This
would prevent the container from being reclaimed when Asterisk exits. We now
properly decrement the count on the ao2 object using the nifty RAII_VAR macro.

Thanks to Russell for helping me stumble on this, and Terry for writing that
ridiculously helpful macro.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06 14:11:21 +00:00
Jonathan Rose
e875e4b2c0 res_srtp: Fix a crash caused by srtp_dealloc on an already dealloced session
When srtp_create fails, the session may be dealloced or just not alloced. At
the same time though, the session pointer might not be set to NULL in this
process and attempting to srtp_dealloc it again will cause a segfault. This
patch checks for failure of srtp_create and sets the session pointer to NULL
if it fails.

(closes issue ASTERISK-20499)
Reported by: tootai
Review: https://reviewboard.asterisk.org/r/2228/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-05 17:08:12 +00:00
Joshua Colp
eb3a88351a Fix a SIP request memory leak with TLS connections.
During the TLS re-work in chan_sip some TLS specific code was moved
into a separate function. This function operates on a copy of the
incoming SIP request. This copy was never deinitialized causing a
memory leak for each request processed.

This function is now given a SIP request structure which it can use
to copy the incoming request into. This reduces the amount of memory
allocations done since the internal allocated components are reused
between packets and also ensures the SIP request structure is
deinitialized when the TLS connection is torn down.

(closes issue ASTERISK-20763)
Reported by: deti
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-05 16:50:43 +00:00
Richard Mudgett
b40ac293b6 Fix registering core show codecs/codec CLI commands twice.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-05 02:19:43 +00:00
Richard Mudgett
e750d8dd6e confbridge: Fix several small issues.
* Made func_confbridge_helper() allow an empty value when setting options.
You previously could not Set(CONFBRIDGE(user,pin)=) and clear the
configured pin from the dialplan.

* Made func_confbridge_helper() handle its datastore better if multiple
threads attempt to set the first CONFBRIDGE option value on the channel.

* Made the func_confbridge_helper() only output one diagnostic message
concerning the option.

* Made the bridge video_mode able to repeatedly change in the config file
and CONFBRIDGE dialplan function.  The video_mode option values are an
enum and not independent of each other.

* Made handle_cli_confbridge_show_bridge_profile() better handle the
video_mode option.

* Simplified datastore handling code in conf_find_user_profile() and
conf_find_bridge_profile().

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-05 01:09:39 +00:00
Richard Mudgett
d0c835fa73 confbridge: Update online XML documentation.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-04 22:32:17 +00:00
Russell Bryant
4075be53a1 Add libuuid to install_prereq for Fedora.
I ran this script and my build failed.  pjproject requires this.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-04 12:59:51 +00:00
Richard Mudgett
656af72b89 Cleanup ast_run_atexits() atexits list.
* Convert atexits list to a mutex instead of a rd/wr lock.  The lock is
only write locked.

* Move CLI verbose Asterisk ending message to where AMI message is output
in really_quit() to avoid further surprises about using stuff already
shutdown.

(issue ASTERISK-20649)
Reported by: Corey Farrell
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03 22:58:46 +00:00
Richard Mudgett
869c2b30c9 Cleanup core main on exit.
* Cleanup time zones on exit.

* Make exit clean/unclean report consistent for AMI and CLI in
really_quit().

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      core-cleanup-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
      core-cleanup-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03 20:43:03 +00:00
Richard Mudgett
b71431977e Cleanup config cache on exit.
(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      config-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03 19:32:05 +00:00
Richard Mudgett
365bf5a2a6 Cleanup CLI resources on exit and CLI command registration errors.
(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      cli-leaks-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
      cli-leaks-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03 19:16:20 +00:00
Richard Mudgett
c62f11bd95 Cleanup CDR resources on exit.
* Simplify do_reload() return handling since it never returned anything
other than 0.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      cdr-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
      cdr-cleanup-10-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03 18:43:48 +00:00
Richard Mudgett
a7e9ee3a7b Fix CCSS CLI commands and logger level not unregistered.
(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      ccss-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03 17:08:06 +00:00
Joshua Colp
5935aaa6ec Fix an RTP instance reference count leak in chan_motif.
When setting up an RTP instance the RTCP portion of the instance
keeps a reference to the instance itself. In order to release this
reference and stop RTCP the stop API call must be called before
destroying the instance.

(closes issue ASTERISK-20751)
Reported by: joshoa


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03 14:54:54 +00:00
Joshua Colp
1d83d32489 Tweak extension used for incoming calls received on Motif.
Based on feedback from numerous individuals this patch tweaks incoming calls
to first look for an extension with the name of the endpoint. If no such extension
exists the call will silently fall back to the "s" extension as it previously
did.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-01 00:46:40 +00:00
Richard Mudgett
b8a4eff072 chan_misdn: Fix sending RELEASE_COMPLETE in response to SETUP.
Fix sending a RELEASE_COMPLETE in response to a SETUP if chan_misdn does
not have a B channel available to assign to the call.

(closes issue ABE-2869)
Reported by: Guenther Kelleter
Patches:
      setup-reject_2.diff (license #6372) patch uploaded by Guenther Kelleter
      Modified

........

Merged revision 376949 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-30 21:35:45 +00:00
Sean Bright
258edecea8 Minor spelling fix to the VOLUME documentation.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-30 17:07:46 +00:00
Mark Michelson
da951d0855 Fix potential crashes during SIP attended transfers.
The principal behind this patch is simple. During a transfer,
we manipulate channels that are owned by a separate thread than
the one we currently are running in, so it makes sense that we
need to grab a reference to the channels so that they cannot
disappear out from under us.

In the wild, crashes were sometimes seen when the transferring
party would hang up the call before the transfer target answered
the call. The most common place to see the crash occur was when
attempting to send a connected line update to the transferer
channel.

(closes issue ASTERISK-20226)
Reported by Jared Smith
Patches:
	ASTERISK-20226.patch uploaded by Mark Michelson (License #5049)
Tested by: Jared Smith
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-30 16:36:54 +00:00
Richard Mudgett
0c6a476bb3 chan_local: Fix local_pvt ref leak in local_devicestate().
Regression introduced by ASTERISK-20390 fix.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29 22:59:50 +00:00
Richard Mudgett
903a942b85 Fix compile error.
(issue ASTERISK-20724)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29 22:32:16 +00:00
Michael L. Young
bb38f97269 Improve Code Readability And Fix Setting natdetected Flag
For 1.8, 10, 11 and trunk we are are improving the code readability.

For 11 and trunk, auto nat detection was added.  The natdetected flag was being
set to 1 when the host address in the VIA header did not specifiy a port.  This
patch fixes this by setting the port on the temporary sock address used to
SIP_STANDARD_PORT in order for the sock address comparison to work properly.

(closes issue ASTERISK-20724)
Reported by: Michael L. Young
Patches:
    asterisk-20724-set-port-v2.diff uploaded by Michael L. Young (license 5026)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29 21:57:00 +00:00
Pedro Kiefer
ed6c432874 Fix chan_sip websocket payload handling
Websocket by default doesn't return an ast_str for the payload received. When 
converting it to an ast_str on chan_sip the last character was being omitted, 
because ast_str functions expects that the given length includes the trailing 
0x00. payload_len only has the actual string length without counting the 
trailing zero.

For most cases this passed unnoticed as most of SIP messages ends with \r\n.

(closes issue ASTERISK-20745)
Reported by: Iñaki Baz Castillo
Review: https://reviewboard.asterisk.org/r/2219/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29 17:17:11 +00:00
Richard Mudgett
c223b79688 Add MALLOC_DEBUG atexit unreleased malloc memory summary.
* Adds the following CLI commands to control MALLOC_DEBUG reporting of
unreleased malloc memory when Asterisk is shut down.
memory atexit list on
memory atexit list off
memory atexit summary byline
memory atexit summary byfunc
memory atexit summary byfile
memory atexit summary off

* Made check all remaining allocated region blocks atexit for fence
violations.

* Increased the allocated region hash table size by about three times.  It
still isn't large enough considering the number of malloced blocks
Asterisk uses.

* Made CLI "memory show allocations anomalies" use
regions_check_all_fences().

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29 00:46:31 +00:00
Richard Mudgett
b6101cfec7 Enhance MALLOC_DEBUG CLI commands.
* Fixed CLI "memory show allocations" misspelling of anomalies option.
The command will still accept the original misspelling.

* Miscellaneous tweaks to CLI "memory show allocations" command output
format.

* Made CLI "memory show summary" summarize by line number instead of by
function if a filename is given.

* Made CLI "memory show summary" sort its output by filename or
function-name/line-number depending upon request.

* Miscellaneous tweaks to CLI "memory show summary" command output format.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29 00:06:37 +00:00
Jonathan Rose
f4e00404e7 manager: Make challenge work with allowmultiplelogin=no
Prior to this patch, challenge would yield a multiple logins error if used
without providing the username (which isn't really supposed to be an argument
to challenge) if allowmultiplelogin was set to no because allowmultiplelogin
finds a user with a zero length login name. This check is simply disabled for
the challenge action when the username is empty by this patch.

(closes issue ASTERISK-20677)
Reported by: Vladimir
Patches:
    challenge_action_nomultiplelogin.diff uploaded by Jonathan Rose (license 6182)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-28 16:37:26 +00:00
Richard Mudgett
8a32488929 Fix extension matching with the '-' char.
The '-' char is supposed to be ignored by the dialplan extension matching.
Unfortunately, it's treatment is not handled consistently throughout the
extension matching code.

* Made the old exten matching code consistently ignore '-' chars.

* Made the old exten matching code consistently handle case in the
matching.

* Made ignore empty character sets.

* Fixed ast_extension_cmp() to return -1, 0, or 1 as documented.  The only
user of it in pbx_lua.c was testing for -1.  It was originally returning
the strcmp() value for less than which is not usually going to be -1.

* Fix character set sorting if the sets have the same number of characters
and start with the same character.  Character set [0-9] now sorts before
[02-9a] as originally intended.

* Updated some extension label and priority already in use warnings to
also indicate if the extension is aliased.

(closes issue ASTERISK-19205)
Reported by: Philippe Lindheimer, Birger "WIMPy" Harzenetter
Tested by: rmudgett

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-28 00:08:09 +00:00
Richard Mudgett
37b50fe4e5 Remove unnecessary channel module references.
* Removed call to ast_module_user_hangup_all() in res_config_mysql.c since
it is effectively a noop.  No channels can attach a reference to that
module.

* Removed call to ast_module_user_hangup_all() in app_celgenuserevent.c.
The caller of unload_module() has already called it.

* Removed redundant channel module references in pbx_dundi.c.  The
registered dialplan function callback dispatchers for the read/read2/write
callbacks already reference the module before calling.

* pbx_dundi: Moved unregistering CLI commands, DUNDi switch, and dialplan
functions to the first thing the unload_module() does.  This will reduce
the chance of new channels using DUNDi services while the module is being
torn down.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-27 20:38:23 +00:00
Richard Mudgett
224dd2f60a Made AST_LIST_REMOVE() simpler and use better names.
* Update doxygen of AST_LIST_REMOVE().
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-27 17:47:32 +00:00
Matthew Jordan
c4f013c5c8 Re-initialize logmsgs mutex upon logger initialization to prevent lock errors
Similar to the patch that moved the fork earlier in the startup sequence to
prevent mutex errors in the recursive mutex surrounding the read/write thread
registration lock, this patch re-initializes the logmsgs mutex.  Part of the
start up sequence before forking the process into the background includes
reading asterisk.conf; this has to occur prior to the call to daemon in order
to read startup parameters.  When reading in a conf file, log statements can
be generated.  Since this can't be avoided, the mutex instead is
re-initialized to ensure a reset of any thread tracking information.

This patch also includes some additional debugging to catch errors when
locking or unlocking the recursive mutex that surrounds locks when the
DEBUG_THREADS build option is enabled.  DO_CRASH or THREAD_CRASH will
cause an abort() if a mutex error is detected.

(issue ASTERISK-19463)
Reported by: mjordan
Tesetd by: mjordan
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-22 23:58:08 +00:00
David M. Lee
4c924bdce1 Added missing newlines to websocket ast_logs.
Without these newlines, log messages just continue tacking onto the same
line, and do not flush immediately.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-20 21:58:35 +00:00
Mark Michelson
0cc3b6cd9b Add "Require: timer" to 200 OK responses when appropriate.
The method by which the Require header is added to 200 responses is
inspired by the method that Olle Johansson uses in his darjeeling-prack
branch.

(closes issue ASTERISK-20570)
Reported by Matt Jordan, at the behest of Olle Johansson

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-20 18:57:11 +00:00
Alec L Davis
4e76aa4920 Reduce CLI spam of "Extension Changed" device state messages.
Asterisk 11 follows RFC3265 that states that after every subscribe or resubscribe a notify should be sent.
Thus the console if filled continuously with the following after every subscribe;
  == Extension Changed 8512[phones] new state IDLE for Notify User cisco1
 
In Asterisk 1.8 only changes would be sent. Thus only when a device state changed was anything emitted to the console.

fix:
Only print to console when device state isn't forced.

(closes issue ASTERISK-20706)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-20 17:37:28 +00:00
Walter Doekes
65c8d16d79 Fix most leftover non-opaque ast_str uses.
Instead of calling str->str, one should use ast_str_buffer(str). Same
goes for str->used as ast_str_strlen(str) and str->len as
ast_str_size(str).

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-19 19:54:15 +00:00
Matthew Jordan
2bb01eb0ff Reorder startup sequence to prevent lockups when process is sent to background
Although it is very rare and timing dependent, the potential exists for the
call to 'daemon' to cause what appears to be a deadlock in Asterisk during
startup.  This can occur when a recursive mutex is obtained prior to the
daemon call executing.  Since daemon uses fork to send the process into the
background, any threading primitives are unsafe to re-use after the call.
Implementations of pthread recursive mutexes are highly likely to store the
thread identifier of the thread that previously obtained the mutex.  If
the mutex was locked prior to the fork, a subsequent unlock operation will
potentially fail as the thread identifier is no longer valid.  Since the
mutex is still locked, all subsequent attempts to grab the mutex by other
threads will block.

This behavior exhibited itself most often when DEBUG_THREADS was enabled, as
this compile time option surrounds the mutexes in Asterisk with another
recursive mutex that protects the storage of thread related information.  This
made it much more likely that a recursive mutex would be obtained prior to
daemon and unlocked after the call.

This patch does the following:
a) It backports a patch from Asterisk 11 that prevents the spawning of the
   localtime monitoring thread.  This thread is now spawned after Asterisk has
   fully booted.
b) It re-orders the startup sequence to call daemon earlier during Asterisk
   startup.  This limits the potential of threading primitives being accessed
   by initialization calls before daemon is called.
c) It removes calls to ast_verbose/ast_log/etc. prior to daemon being called.
   Developers should send error messages directly to stderr prior to daemon,
   as calls to ast_log may access recursive mutexes that store thread related
   information.
d) It reorganizes when thread local storage is created for storing lock
   information during the creation of threads.  Prior to this patch, the
   read/write lock protecting the list of threads in ast_register_thread would
   utilize the lock in the thread local storage prior to it being initialized;
   this patch prevents that.

On a very related note, this patch will *greatly* improve the stability of the
Asterisk Test Suite.

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

(closes issue ASTERISK-19463)
Reported by: mjordan
Tested by: mjordan
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-18 20:22:14 +00:00
Matthew Jordan
3d2e80d93b Add a test event that reports changes in ConfBridge state
This patch adds a test event to ConfBridge that reports transitions between
states in ConfBridge.  This is used by tests in the Asterisk Test Suite
that verify state changes based on the entering/leaving of conference
participants.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-18 14:27:20 +00:00
Jonathan Rose
c0c552de2c monitor: prevent attempts to move/remove recordings skipped with 'i' and 'o'.
The i and o options for monitor skip the input and output sides of a recording
respectively. This patch addresses a problem in those options when monitor is
called without specifying a specific filename where monitor will try to move
the recording that was skipped. Since this usually doesn't exist when these
options are used, it would produce a warning when it does this in most cases,
but it is conceivable that there are use cases where this could result in
moving/removing a file unintentionally.

(closes issue ASTERISK-20641)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2190/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-16 19:59:45 +00:00
David M. Lee
c40b60f970 Fixed extconf.c breakage introduced in r376306.
To quote wdoekes:
> Note that I'm not confirming legitimacy of having that file in tree at
> all. Is anyone using aelparse/conf2ael?
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-16 00:09:34 +00:00
David M. Lee
bbf3526314 Migrate hashtest/hashtest2 to be unit tests.
Both hashtest and hashtest2 are manual testing apps that thrash hash
tables (hashtab and ao2 containers, respectively), by spinning up
several threads that randomly insert, delete, lookup and iterate over
the hash table. If the app doesn't crash, the hash table probably passes
the test. Those utils are not a part of the typical Asterisk build, so
they do not usually get compiled. This all makes them less that useful.

This patch removes those manual test programs and replaces them with
Asterisk unit test modules (test_{hashtab,astobj2}_thrash.so). It also
attempts to make the tests more deterministic.

* Rather than spinning up some number of threads that operate on the
  hash table randomly, spin up four threads that concurrenly add,
  remove, lookup and iterate over the hash table.
* Each thread checks the state of the hash table both during and after
  execution, and indicates a test failure if things are not as expected.
* Each thread times out after 60 seconds to prevent deadlocking the unit
  test run.

(closes issue ASTERISK-20505)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2189/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-15 23:38:44 +00:00
Jonathan Rose
0c77685b91 app_meetme: Fix channels lingering when hung up under certain conditions
Channels would get stuck and MeetMe would repeatedly display an Unable
to write frame to channel error in the conf_run function if hung up
during certain sound prompts such as during user count announcements.
This patch fixes that by reintroducing a hangup check in the meetme's
main loop (also in conf_run).

(closes issue ASTERISK-20486)
Reported by: Michael Cargile
Review: https://reviewboard.asterisk.org/r/2187/
Patches:
    meetme_hangup_patch_ASTERISK-20486_v3.diff uploaded by Jonathan Rose (license 6182)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-15 23:03:41 +00:00
Rusty Newton
5d858e92ac Patch to play correct sound file when a voicemail's urgent status is removed
We were attempting to play "vm-urgent-removed", which didn't exist. Now we play "vm-marked-nonurgent" which exists      
and is the correct sound file. Previous behavior was silence and a warning on the CLI.

(issue ASTERISK-20280)
(closes issue ASTERISK-20280)
Reported by: Tomo Takebe
Tested by: Rusty Newton
Patches:
    asterisk20280.patch uploaded by Rusty Newton (license 5829)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-15 02:08:06 +00:00
Richard Mudgett
52d8a7dee4 Fix call files when astspooldir is relative.
Future dated call files are ignored when astspooldir is relative to the
current directory.  The queue_file() assumed that the qdir needed to be
prepended if the given filename did not start with a '/'.  If astspooldir
is relative it is not going to start from the root directory obviously so
it will not start with a '/'.  The filename used in queue_file()
ultimately results in qdir prepended multiple times.

* Made queue_file() not prepend qdir if the filename contains a '/'.

(closes issue ASTERISK-20593)
Reported by: James Le Cuirot
Patches:
      0004-Fix-future-call-files-from-relative-directories.patch (license #6439) patch uploaded by James Le Cuirot
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-14 19:53:23 +00:00
Brent Eagles
852bc686c9 Patch to prevent stopping the active generator when it is not the silence
generator.

This patch introduces an internal helper function to safely check whether the
current generator is the one that is expected before deactivating it. The
current externally accessible ast_channel_stop_generator() function has been
modified to be implemented in terms of the new function.

(closes issue ASTERISK-19918)
Reported by: Eduardo Abad
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-13 18:48:43 +00:00
Joshua Colp
4e04ea29c7 Properly check if the "Context" and "Extension" headers are empty in a ShowDialPlan action.
The code which handles the ShowDialPlan action wrongly assumed that a non-NULL return value
from the function which retrieves headers from an action indicates that the header has a
value. This is incorrect and the contents must be checked to see if they are blank.

(closes issue ASTERISK-20628)
Reported by: jkroon
Patches:
     asterisk-showdialplan-incorrect-error.patch uploaded by jkroon
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-12 20:45:50 +00:00
Michael L. Young
1255a271d4 Fix Dynamic Hints Variable Substition - Underscore Problem
When adding a dynamic hint, if an extension contains an underscore no variable
subsitution is being performed.

This patch changes from checking if the extension contains an underscore to
checking if the extension begins with an underscore.

(closes issue ASTERISK-20639)
Reported by: Steven T. Wheeler
Tested by: Steven T. Wheeler, Michael L. Young
Patches:
  asterisk-20639-dynamic-hint-underscore.diff 
                                     uploaded by Michael L. Young (license 5026)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-12 20:16:57 +00:00
Joshua Colp
fb74294b92 Remove a fixed size limitation for producing SDP and change how ICE support is disabled by default.
With ICE support enabled in chan_sip and a large number of interfaces on the system it was
possible for the produced SDP to be truncated due to some fixed size buffers. These buffers
have now been changed so they will dynamically grow as needed.

ICE support is now also enabled by default in res_rtp_asterisk to provide a smoother experience
for chan_motif users where it is required. To maintain the previous behavior in chan_sip it is
no longer enabled by default there.

(closes issue ASTERISK-20643)
Reported by: coopvr


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-11 17:08:58 +00:00
Mark Michelson
0e7a64e55e Fix a "set but not used" warning on newer gccs.
Turns out the "helpful" setting of ms and res in this
macro is completely useless after the timeout antipattern
fix.

If you're a new guy looking to write code, don't write
a macro like this one.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-08 22:08:58 +00:00
Richard Mudgett
c7e2bf3187 chan_dahdi/SS7: Made reject incoming call for an in-alarm or blocked channel.
If a SS7 call comes in requesting a CIC that is in-alarm, the call is
accepted and connects if the extension exists in the dialplan.  The call
does not have any audio.

* Made release the call immediately with circuit congestion cause.

(closes issue ASTERISK-20204)
Reported by: Tuan Le
Patches:
      jira_asterisk_20204_v1.8.patch (license #5621) patch uploaded by rmudgett
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-08 21:10:47 +00:00
Richard Mudgett
1bba4b00b2 Add MALLOC_DEBUG enhancements.
* Makes malloc() behave like calloc().  It will return a memory block
filled with 0x55.  A nonzero value.

* Makes free() fill the released memory block and boundary fence's with
0xdeaddead.  Any pointer use after free is going to have a pointer
pointing to 0xdeaddead.  The 0xdeaddead pointer is usually an invalid
memory address so a crash is expected.

* Puts the freed memory block into a circular array so it is not reused
immediately.

* When the circular array rotates out a memory block to the heap it checks
that the memory has not been altered from 0xdeaddead.

* Made the astmm_log message wording better.

* Made crash if the DO_CRASH menuselect option is enabled and something is
found.

* Fixed a potential alignment issue on 64 bit systems.
struct ast_region.data[] should now be aligned correctly for all
platforms.

* Extracted region_check_fences() from __ast_free_region() and
handle_memory_show().

* Updated handle_memory_show() CLI usage help.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-08 17:26:16 +00:00
Mark Michelson
a65fbf8012 Multiple revisions 375993-375994
........
  r375993 | mmichelson | 2012-11-07 11:01:13 -0600 (Wed, 07 Nov 2012) | 30 lines
  
  Fix misuses of timeouts throughout the code.
  
  Prior to this change, a common method for determining if a timeout
  was reached was to call a function such as ast_waitfor_n() and inspect
  the out parameter that told how many milliseconds were left, then use
  that as the input to ast_waitfor_n() on the next go-around.
  
  The problem with this is that in some cases, submillisecond timeouts
  can occur, resulting in the out parameter not decreasing any. When this
  happens thousands of times, the result is that the timeout takes much
  longer than intended to be reached. As an example, I had a situation where
  a 3 second timeout took multiple days to finally end since most wakeups
  from ast_waitfor_n() were under a millisecond.
  
  This patch seeks to fix this pattern throughout the code. Now we log the
  time when an operation began and find the difference in wall clock time
  between now and when the event started. This means that sub-millisecond timeouts
  now cannot play havoc when trying to determine if something has timed out.
  
  Part of this fix also includes changing the function ast_waitfor() so that it
  is possible for it to return less than zero when a negative timeout is given
  to it. This makes it actually possible to detect errors in ast_waitfor() when
  there is no timeout.
  
  (closes issue ASTERISK-20414)
  reported by David M. Lee
  
  Review: https://reviewboard.asterisk.org/r/2135/
........
  r375994 | mmichelson | 2012-11-07 11:08:44 -0600 (Wed, 07 Nov 2012) | 3 lines
  
  Remove some debugging that accidentally made it in the last commit.
........

Merged revisions 375993-375994 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-07 19:03:42 +00:00
Richard Mudgett
647810f1d0 Fix stuck DTMF when bridge is broken.
When a bridge is broken by an AMI Redirect action or the ChannelRedirect
application, an in progress DTMF digit could be stuck sending forever.

* Made simulate a DTMF end event when a bridge is broken and a DTMF digit
was in progress.

(closes issue ASTERISK-20492)
Reported by: Jeremiah Gowdy
Patches:
      bridge_end_dtmf-v3.patch.txt (license #6358) patch uploaded by Jeremiah Gowdy
      Modified to jira_asterisk_20492_v1.8.patch
      jira_asterisk_20492_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-06 18:59:33 +00:00
Joshua Colp
5f28931a1f Fix a bug where our Motif ICE candidates were not quite proper, and make us more forgiving.
An issue was reported on the mailing list where calling would result in an "Incomplete
ICE-UDP candidate received on session" error message. This is the result of the ICE-UDP
candidate code not placing a "network" attribute within the candidates. This is now done.
To increase compatibility though I have removed the requirement for the "network" attribute
to exist within ICE-UDP candidates that are received since we don't actually require the
value.

Reported on the mailing list by Jean-Denis Girard.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-06 12:09:45 +00:00
Matthew Jordan
f0cd27e027 Refactor ast_timer_ack to return an error and handle the error in timer users
Currently, if an acknowledgement of a timer fails Asterisk will not realize
that a serious error occurred and will continue attempting to use the timer's
file descriptor.  This can lead to situations where errors stream to the
CLI/log file.  This consumes significant resources, masks the actual problem
that occurred (whatever caused the timer to fail in the first place), and
can leave channels in odd states.

This patch propagates the errors in the timing resource modules up through
the timer core, and makes users of these timers handle acknowledgement
failures.  It also adds some defensive coding around the use of timers
to prevent using bad file descriptors in off nominal code paths.

Note that the patch created by the issue reporter was modified slightly for
this commit and backported to 1.8, as it was originally written for
Asterisk 10.

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

(issue ASTERISK-20032)
Reported by: Jeremiah Gowdy
patches:
  jgowdy-timerfd-6-22-2012.diff uploaded by Jeremiah Gowdy (license 6358)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 23:09:30 +00:00
Richard Mudgett
463cbc55ac Add safety NULL pointer check in module user references.
Made __ast_module_user_remove() check for NULL pointers.
........

Merged revision 375860 from C.3
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 21:41:04 +00:00
Jonathan Rose
1d054dbbba chan_sip: Document a change to user-field encoding introduced with r303509
The change in question was added to improve compliance with RFC3261, but at
the time of commit, it wasn't adequately documented in the UPGRADE notes.

(closes issue ASTERISK-20561)
Reported by: Deniz
Review: https://reviewboard.asterisk.org/r/2177/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 17:59:11 +00:00
Matthew Jordan
769d9aa259 Don't attempt to purge sessions when no sessions exist
Manager's tcp/tls objects have a periodic function that purge old manager
sessions periodically.  During shutdown, the underlying container holding
those sessions can be disposed of and set to NULL before the tcp/tls periodic
function is stopped.  If the periodic function fires, it will attempt to
iterate over a NULL container.

This patch checks for whether or not the sessions container exists before
attempting to purge sessions out of it.  If the sessions container is NULL,
we simply return.

Note that this error was also caught by the Asterisk Test Suite.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-04 03:09:26 +00:00
Matthew Jordan
e4afa2c0e2 Only deref a reserved gateway session if we actually reserved one
Its perfectly acceptable to have a gateway session unreserved when we go to
first allocate one.  Unreffing the reserved gateway session - when its NULL -
will result in an assertion error.

This problem was caught by the Asterisk Test Suite (once we had enough of the
debugging flags enabled)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-04 02:43:25 +00:00
Matthew Jordan
d38c42aab8 Properly clean up manager resources on exit
This patch does two things:
1) It properly unregisters the manager CLI commands
2) It cleans up AMI users on exit.  Prior to this patch, the AMI users
   were not being disposed of properly, resulting in a memory leak.

(closes issue ASTERISK-20646)
Reported by: Corey Farrell
patches:
  manager_shutdown.patch uploaded by Corey Farrell (license 5909)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-04 02:36:55 +00:00
Matthew Jordan
260da253be Properly finalize prepared SQLite3 statements to prevent memory leak
The AstDB uses prepared SQLite3 statements to retrieve data from the SQLite3
database.  These statements should be finalized during Asterisk shutdown so
that the SQLite3 database can be properly closed.  Failure to finalize the
statements results in a memory leak and a failure when closing the database.

This patch fixes those issues by ensuring that all prepared statements are
properly finalized at shutdown.

(closes issue ASTERISK-20647)
Reported by: Corey Farrell
patches:
  astdb-sqlite3_close.patch uploaded by Corey Farrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-04 01:17:25 +00:00
Matthew Jordan
4483067638 Blocked revisions 375759
........
Fix memory leak when unloading XML documentation

This patch is a modified version of a patch originally committed for the
Asterisk 11 branch in r375756.  A portion of that patch, that fixed the
memory leak during unloading XML documentation, applies to branches 1.8
and 10 as well.

The patch for this issue was modified for these two branches.

(issue ASTERISK-20648)
Reported by: Corey Farrell
Tested by: mjordan
patches:
  xmldoc-memory_leak.patch uploaded by Corey Farrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-04 01:03:13 +00:00
Matthew Jordan
717068e362 Fix memory leaks in XML documentation
This patch fixes two memory leaks:
1) When building XML documentation items, the 'name' attribute was extracted
   from XML elements but not properly freed after being copied into the item
   being built.
2) When unloading XML documentation, the doctree container objects were not
   properly freed.

This patch corrects these memory leaks.  Note that this patch was modified
slightly for this commmit, as the case where the 'name' attribute doesn't
exist also wasn't handled in the item construction.  This patch also checks
for that attribute not existing.

(closes issue ASTERISK-20648)
Reported by: Corey Farrell
Tested by: mjordan
patches:
  xmldoc-memory_leak.patch uploaded by Corey Farrell (license 5909)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-04 00:47:17 +00:00
Matthew Jordan
69777a9376 Prevent multiple CDR batches from conflicting when scheduling the CDR write
The Asterisk Test Suite caught an error condition where a scheduled CDR batch
write can be deleted twice if two channels attempt to post their CDRs at the
same time.  The batch CDR mutex is locked while the CDRs are appended to the
current batch list; however, it is unlocked prior to actually scheduling the
CDR write.  As such, two threads can attempt to remove the currently scheduled
batch write at the same time, resulting in an assertion error.

This patch extends the time that the mutex is locked to encompass actually
scheduling the write.  This prevents two threads from unscheduling the
currently scheduled write at the same time.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-03 23:52:54 +00:00
Andrew Latham
794eb78090 Doxygen Updates
Replace links to missing text files removed in the 1.6.x series with links to the wiki.  Doxygen can handle URLs fine, don't atempt to quote them.  Also update the wiki link in the Readme to get everyone on the same page.

(issue ASTERISK-20259)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-03 03:17:49 +00:00
Richard Mudgett
93d85a0087 Things don't need to be that const.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02 20:59:39 +00:00
Damien Wedhorn
f4fb271601 Fix for chan_skinny leaving RTP ports open
Skinny wasn't closing RTP sockets. This patch includes ast_rtp_instance_stop before 
ast_rtp_instance_destroy which fixes the problem. Also add destroy for VRTP (which 
I believe is unused, but exists).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02 20:56:43 +00:00
Richard Mudgett
35e96f995e Multiple revisions 375519-375524
........
  r375519 | rmudgett | 2012-10-30 16:06:15 -0500 (Tue, 30 Oct 2012) | 11 lines

  chan_misdn: Timer primitives must be handled first.

  The frm->addr is a different "address space" than the stack/instance
  address of other Lx primitives.  The test for B channel instance address
  could fail.

  Patches:
	patch01_timers.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2888

  ........
  r375520 | rmudgett | 2012-10-30 16:14:58 -0500 (Tue, 30 Oct 2012) | 10 lines

  chan_misdn: Free memory in error paths and other memory leaks.

  The one line commented with BUG is not easily fixable because there is no
  de-init function one can call.

  Patches:
	patch02_memory.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2888

  ........
  r375521 | rmudgett | 2012-10-30 16:38:41 -0500 (Tue, 30 Oct 2012) | 14 lines

  chan_misdn: ISDN NT L2 de-establish/establish

  * An NT-PTMP cannot de/establish L2 since it doesn't know the TEIs.
  * On NT-PTP L2 is started when L1 is finally active in handle_l1.
  * L2 deactivation logging cleanup.
  * L2 aggregate link status is unknown for NT-PTMP, show as "UNKN".
  * Removed unused functions and code for L2 handling.

  Patches:
	patch03_L2estab.diff (license #6372) patch uploaded by Guenther Kelleter
	Modified

  JIRA ABE-2888

  ........
  r375522 | rmudgett | 2012-10-30 16:56:14 -0500 (Tue, 30 Oct 2012) | 22 lines

  chan_misdn: Fix broken upper_id/lower_id usage.

  Sending PH prim via lower_id layer (3 or 1) simply does not work.  For TE
  (3) it returns an error (len=-6) which is not evaluated by handle_l1(), so
  the L1 layer status ends up wrong.  Instead PH must be sent via L4, only
  then does it reach L1 without an error message.

  And NT PH prims only reach L1 when they are sent to layer 2 id.
  --> use upper_id to send PH primitives.

  * Check for errors in PH_(DE)ACTIVATE | CONFIRM.
  * Debug messages are improved.

  * The lower_id is now not used for anything, except: Why is lower_id layer
  deleted when it wasn't created?  I removed this code since it looks very
  wrong.

  Patches:
	patch04_l1activation.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2888

  ........
  r375523 | rmudgett | 2012-10-30 17:29:15 -0500 (Tue, 30 Oct 2012) | 31 lines

  chan_misdn: Fix loss of B channels if L1 is down.

  If you make 2 calls out an NT PTMP port which is not connected to any
  phone, the B channel associated with that call becomes unusable until
  Asterisk is restarted.

  The problem is the EVENT_SETUP is queued when L1 is not up in
  misdn_lib_send_event().  If L1 cannot be activated the event won't be
  dequeued.  It gets even worse when the call is hung up.  The queued
  EVENT_SETUP will be overwritten by an EVENT_DISCONNECT.  The reserved B
  channel then will never be freed.  If later someone connects a phone to
  the port, L1 will eventually activate and the queued EVENT_DISCONNECT is
  sent down the stack.  However, it is ignored because it is the wrong call
  state.

  The real fix would be that activation and queueing for a new SETUP is done
  by the NT stack.  But since it doesn't, the workaround must be removed
  because it doesn't always work.

  Fix: The event is no longer queued but immediately sent to the stack.  If
  L1 cannot be activated, the L3 state machine that was started by the
  EVENT_SETUP will do its work, i.e.  a timeout will release the B channel
  properly.  The SETUP possibly cannot be sent the first time but is resent
  by T303 in case L1 could be activated.

  Patches:
	patch05_bchan-loss.diff (license #6372) patch uploaded by Guenther Kelleter
	Modified

  JIRA ABE-2888

........
  r375524 | rmudgett | 2012-10-30 18:26:05 -0500 (Tue, 30 Oct 2012) | 13 lines

  chan_misdn: Remove some calls to exit().

  Try proper cleanup when something goes wrong in misdn_lib_init().
  Especially do not call exit()!

  * Fix memory leak because stack_destroy() does not free the stack struct.

  Patches:
	patch06_cleanup-init.diff (license #6372) patch uploaded by Guenther Kelleter
	Modified

  JIRA ABE-2888
........

Merged revisions 375519-375524 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02 18:44:20 +00:00
Michael L. Young
2fce31c09a Fix Wrong Result In Debug Message For SDP Origin Processing
While looking at some debug logs, I noticed that it was being reported that the
SDP origin line was unsupported or failed.  Upon looking into this on my local
machine, I found that I too was getting this debug message yet everything seemed
to be getting processed properly.  What was discovered is, that, the variable to
determine what is displayed in the debug message for the SDP line that was
processed, was not being set for the origin line when the result was successful.

This patch fixes this and was tested on local machine.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02 17:24:01 +00:00
Jonathan Rose
509f348639 chan_sip: Fix a bug causing SIP reloads to remove all entries from the registry
A regression was introduced in chan_sip by changes to sip reload introduced by
r349097. That patch moved peer purging from the beginning of the reload to
after the general configuration was finished. This patch fixes that by undoing
the repositioning of the original peer purging code and using a similar
function after performing general configuration that purges only autocreated
peers that were created when persist mode isn't enabled.

(closes issue ASTERISK-20611)
Reported by: Alisher
Review: https://reviewboard.asterisk.org/r/2171/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-01 14:52:23 +00:00
Joshua Colp
05be2e8bee Fix an issue with res_http_websocket where the chan_sip WebSocket handler could not be registered.
On some systems the optional API support uses the GCC compiler attribute "weakref" to provide its
functionality. This code changes the function names and prefixes "__" to the front. The
res_http_websocket exports file did not take this into account, thereby not allowing those functions
to be global and ultimately found.

(closes issue ASTERISK-20631)
Reported by: danjenkins


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-31 18:00:32 +00:00
Matthew Jordan
7cedfef4fd Properly extract the Body information of an EWS calendar item
Unlike all other calendar modules, res_calendar_ews fails to extract the Body
information for a calendar item.  This is due, in part, to a quirk in the
schema in the XML - not only does a CalendarItem contain a Body element, but
the CalendarItem exists as a descendant of a different Body element.  The neon
parser was erroneously skipping all Body elements.

This patch fixes that by bypassing Body elements that are not a child of
CalendarItem, and parsing the Body element out if it is a child.

Note that the original patch by Terry Wilson only needed slight modifications
to make it properly pull the Body information out; as such, while I've linked
to the patch that I uploaded for Dmitry, I've attributed the patch to Terry.

(closes issue ASTERISK-19738)
Reported by: Dmitry Burilov
Tested by: Dmitry Burilov
patches:
  calendar_ews_body_2012_10_29.diff uploaded by Terry Wilson (license 6283)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-31 14:49:33 +00:00
Richard Mudgett
1fc6b54a5d Fix ConfBridge crash if no timing module loaded.
(closes issue ASTERISK-19448)
Reported by: feyfre
Patches:
      smfix.patch (license #6099) patch uploaded by feyfre
      Modified for coding guidelines.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-30 19:23:04 +00:00
Jonathan Rose
d7d9a99bd6 mixmonitor: Add a test event
This test event is being used to fix the  mixmonitor_audiohook_inherit
test.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-30 19:09:04 +00:00
Jonathan Rose
e1da5dbd57 confbridge: Fix a bug which made conferences not record with AMI/CLI commands
When confbridge was changed to handle conference status with a state machine in
r374658. The function responsible for starting recording for a conference was
refactored with the function actually responsible for launching the recording
thread being split into a function with another name. The old function name was
still used for manually started recordings through AMI or CLI. This patch fixes
that by switching which function is used to start recording the conference.

(closes issue ASTERISK-20601)
Reported by: Vilius
Patches:
    confbridge_mixmonitor.diff uploaded by Jonathan Rose (license 6182)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-30 14:58:19 +00:00
Matthew Jordan
3ac0ced049 Ensure that the Queue application tracks busy members in off nominal situations
There are a few code paths where the Queue application fails to count a paused
or in use queue member as being 'busy'.  This can cause callers to get stuck
in the Queue until a paused agent unpauses themselves.

(closes issue ASTERISK-20623)
Reported by: Bryan Walters
patches:
  app_queue.patch uploaded by Bryan Walters (license 5851)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-30 02:22:20 +00:00
Mark Michelson
d51cc27812 Prevent resetting of NATted realtime peer address on reload.
If a "sip reload" is issued for a SIP peer, then his
IP address will be cleared, thus resulting in forgetting the
public IP address. Asterisk will then attempt to route SIP
traffic to the private IP address.

The fix here is to make "sip reload" ignore realtime peers
when "host = dynamic" is spotted. Realtime peers can now only
have their IP address reset if they have gone from being not
dynamic to being dynamic.

(closes issue ASTERISK-18203)
reported by daren ferreira

(closes issue ASTERISK-20572)
reported by JoshE
Patches:
	fix_nat_realtime.diff uploaded by JoshE (license #6075)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-29 21:23:25 +00:00
Richard Mudgett
48f0d85bd1 Fix the Park 'r' option when a channel parks itself.
When a channel uses the Park appliation to park itself with the 'r'
option, the channel hears music-on-hold instead of the requested ringing.

* Added a missing check for the 'r' option when a channel parks itself.

(closes issue ASTERISK-19382)
Reported by: James Stocks
Patches by: dsessions

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-29 19:29:53 +00:00
Richard Mudgett
421fbee8d8 chan_dahdi: Fix segfault dereferencing a NULL tech_pvt.
The tech support customer was using the AMI Redirect action shortly after
a call was placed.  While the channel tried to do an ast_read(), the
masquerade resulting from the channel redirect took place.  The masquerade
in the middle of the ast_read() resulted in the segfault.

(closes issue AST-1025)
Reported by: Trey Blancher
Patches:
      jira_ast_1025_v1.8_v2.patch (license #5621) patch uploaded by rmudgett
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-29 15:54:42 +00:00
Jonathan Rose
8deafe9dd0 ast_tls_cert script: Better response for various exit conditions to openssl
(closes issue ASTERISK-20260)
Reported by: Daniel O'Connor
Patches:
	ast_tls_cert-update.diff uploaded by Daniel O'Connor (license 6419)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-23 16:22:12 +00:00
Jonathan Rose
7ad1f16efd core: Fix a memory leak in app.c from an early return
ast_app_group_match_get_count allocates memory with the regcomp
function and we previously forgot to free it when bailing out
due to a regex compilation failure against category.

(closes issue AST-1018)
Reported by: Guenther Kelleter
Patches:
	regcomp_memleak.diff uploaded by Guenther Kelleter (license 6372)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-22 20:04:02 +00:00
Jonathan Rose
bcd4e3e8ac GSM: Fix encoding problems with GSM
(closes issue ASTERISK-20457)
Reported by: Richard Miller
Patches:
	code.patch uploaded by Richard Miller (license 5685)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-22 17:22:18 +00:00
Jonathan Rose
c5485ddb4f app_queue: add upgrade notes for 375216
Adds UPGRADE notes describing behavioral changes to rrmemory strategy caused by
375216

(issue AST-989)
Reported by: Thomas Arimont


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18 21:44:22 +00:00
Jonathan Rose
9aab271f60 Blocked revisions 375245
........
app_queue: add upgrade notes for 375216

Adds notes describing behavioral changes to rrmemory strategy caused by
375216

(issue AST-989)
Reported by: Thomas Arimont


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18 21:39:57 +00:00
Jonathan Rose
8d0143f4a6 app_queue: Make ordering of rrmemory/rrordered persist over add/remove members
Prior to this patch, adding, removing or reloading  members to rrmemory would
cause the order to become completely jumbled. Now it behaves more or less like
rrordered other than the fact that it stores the members on a hash table rather
than a linked list. This patch also prevents removal of members and member
reloads from jumbling rrordered queues.

(issue AST-989)
Reported by: Thomas Arimont
Review: https://reviewboard.asterisk.org/r/2164/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18 21:17:15 +00:00
Richard Mudgett
7c69310497 build_tools: Allow Asterisk to report git SHAs in version string.
Make git more attractive for managing work-in-progress.  Especially
convenient when a potential patch set needs to be tested on multiple
platforms since one can use git to keep all the test environments in sync
independent of a subversion server.

Now the Asterisk version will show the exact git SHA5 that was used when
building (still appended by "M" if there are local modifications) from a
git clone of the Asterisk repository so the developer can more easily know
what is actually under test.

You will now get this:

  $ asterisk -V
  Asterisk GIT-1698298

Instead of this:

  $ asterisk -V
  Asterisk UNKNOWN__and_probably_unsupported

This has zero impact for those not using git with the exception of an
extra test in the configure script to gather git's path.  This is
necessary to prevent "sudo make install" from failing since git may not be
in the path in make's shell environment.

(closes issue ASTERISK-20483)
Reported by: Shaun Ruffell
Patches:
      0001-build_tools-Allow-Asterisk-to-report-git-SHAs-in-ver.patch (license #5417) patch uploaded by Shaun Ruffell
      Modified
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18 20:02:02 +00:00
Kinsey Moore
09d951514d Ensure Asterisk fails TCP/TLS SIP calls when certificate checking fails
When placing a call to a TCP/TLS SIP endpoint whose certificate is not
signed by a configured CA certificate, Asterisk would issue a warning
and continue to process the call as if there was not an issue with the
certificate.  Asterisk now properly fails the call if the certificate
fails verification or if the certificate does not exist when
certificate checking is enabled (the default behavior).

(closes issue ASTERISK-20559)
Reported by: kmoore

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-17 19:00:35 +00:00
Walter Doekes
0ee22cfd14 Fixes to the fd-oriented SIP TCP reads.
Don't crash on large user input. Allow SIP headers without space.
Optimize code a bit.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-16 21:44:46 +00:00
Walter Doekes
5fc8671fb7 Update sip_request_call SIP dial string documentation.
This was missed when merging review r1859.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-16 19:23:57 +00:00
Joshua Colp
a318db28e3 Remove a log message that was left in accidentally from call-id logging development.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-16 14:08:28 +00:00
Mark Michelson
94c0fa9098 Fix some potential misuses of ast_str in the code.
Passing an ast_str pointer by value that then calls
ast_str_set(), ast_str_set_va(), ast_str_append(), or
ast_str_append_va() can result in the pointer originally
passed by value being invalidated if the ast_str had
to be reallocated.

This fixes places in the code that do this. Only the
example in ccss.c could result in pointer invalidation
though since the other cases use a stack-allocated ast_str
and cannot be reallocated.

I've also updated the doxygen in strings.h to include
notes about potential misuse of the functions mentioned
previously.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-15 21:15:09 +00:00
Igor Goncharovskiy
5b1a89e1b1 Fix underscreen buttons warnings apeared while transfer process
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@375016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-15 08:11:45 +00:00
Tzafrir Cohen
cabdb471fb Update config.guess and config.sub: 2012-10-10
Update config.guess and config.sub to revision
fb456b34ef4aa02b95dc6be69aaa66fa94a844fb from the savannah.gnu.org git
repo. Adds support for e.g. aarch64 (ARM 64bit).

config.guess:timestamp='2012-09-25'
config.sub:timestamp='2012-10-10'
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14 11:57:11 +00:00
Kinsey Moore
09dac916ba Avoid a segfault on invalid format names
If a format name was not found by ast_getformatbyname, a NULL pointer
would be passed into ast_format_rate and immediately dereferenced.
This ensures that a valid pointer is used since the structure is
already allocated on the stack.

(closes issue DPH-523)
Reported-by: Steve Pitts


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-12 21:57:29 +00:00
Mark Michelson
ccf01fbfdc Do not use a FILE handle when doing SIP TCP reads.
This is used to solve an issue where a poll on a file
descriptor does not necessarily correspond to the readiness
of a FILE handle to be read.

This change makes it so that for TCP connections, we do a
recv() on the file descriptor instead.

Because TCP does not guarantee that an entire message or even
just one single message will arrive during a read, a loop has
been introduced to ensure that we only attempt to handle a
single message at a time. The tcptls_session_instance structure
has also had an overflow buffer added to it so that if more
than one TCP message arrives in one go, there is a place to
throw the excess.

Huge thanks goes out to Walter Doekes for doing extensive review
on this change and finding edge cases where code could fail.

(closes issue ASTERISK-20212)
reported by Phil Ciccone

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-12 16:20:15 +00:00
Joshua Colp
963f94e99f Fix a bug where audio on Google Voice would not work due to ignoring candidates.
Instead of ignoring parts of the message that are not known just ignore the ones
we know may be present and that would cause a problem.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11 21:18:50 +00:00
Joshua Colp
59d02d37de Remove code that should not have gotten in.
(issue ASTERISK-20554)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11 16:04:19 +00:00
Joshua Colp
385b30fbc6 Fix an issue where outgoing calls would fail to establish audio due to ICE negotiation failures.
This change removes the requirement for ufrag and pwd in the transport stanza and also
makes us the controlling agent.

(closes issue ASTERISK-20554)
Reported by: mmichelson


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11 16:02:31 +00:00
Matthew Jordan
7c522a5fd3 Fix incorrect billing duration reported when batch mode is enabled
Similar to r369351, the billing duration can be skewed when batch mode is
enabled.  This happened much more rarely than the duration, as it only
occured when the call was answered (thereby indicating an actual answer
time) and immediately hung up on (indicating a billsec of 0).  Since
a billing time of '0' can either mean that the call immediately ended
or that the CDR was improperly answered, we have to use additional information
to know whether or not we can trust the CDR billsec value.  Prior to this
patch, we looked to see if we had a valid answer time.  If we did, and
billsec was zero, we used the current time to calculate what billsec value
we could from the CDR being written.  If batch mode is enabled, this will
incorrectly report a billsec value being much greater than the actual
duration of the call.

Instead of relying on the presence of an answer time to know whether or not
we can re-calculate the billsec for the CDR, we now also use the presence
of the CDR's end time to know if we need to re-calculate or whether we can
trust the billsec value that we have.  This prevents erroneous jumps in the
billsec value, while still making sure that in the worst case, some billing
time will be calculated.

(closes issue AST-1016)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11 15:44:00 +00:00
Mark Michelson
b5f231501b Don't make chan_sip export global symbols.
During testing, it was discovered that having chan_sip
export global symbols was problematic.

The biggest problem was that load order was affected.
Trying to use realtime could be problematic since in
all likelihood the necessary realtime driver(s) would
not be loaded before chan_sip.

In addition, it was found that it was impossible to
use the Digium Phone Module for Asterisk since it
must be loaded before chan_sip since it must hook
into chan_sip's configuration parsing.

The solution is to use a virtual table in the same
manner that other modules in Asterisk do, like
app_voicemail.

(closes issue ASTERISK-20545)
Reported by: kmoore


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11 15:31:10 +00:00
Joshua Colp
d5dc7d8b03 Consider the Google Talk content stanza name (jin:content) valid.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11 13:33:29 +00:00
Richard Mudgett
01a662cf60 app_queue: Made pass connected line updates from the caller to ringing queue members.
Party A calls Party B
Party B puts Party A on hold.
Party B calls a queue.
Ringing queue member D sees Party B identification.
Party B transfers Party A to the queue.
Queue member D does not get a connected line update for Party A.
Queue member D answers the call and still sees Party B information.

However, if Party A later transfers the call to Party C then queue member
D gets a connected line update for Party C.

* Made pass connected line updates from the caller to queue members while
the queue members are ringing.

(closes issue AST-1017)
Reported by: Thomas Arimont

(closes issue ABE-2886)
Reported by: Thomas Arimont
Tested by: rmudgett

........

Merged revisions 374801 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-10 21:03:29 +00:00
Kinsey Moore
841158f428 Fix segfault regression from r370681
Due to usage of ast_hook_send_action, AMI action handling code should
be able to handle a NULL mansession->session.  This would cause a crash
on NULL dereference if action_originate was called from
ast_hook_send_action.

(closes issue ASTERISK-20544)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-10 13:35:53 +00:00
Richard Mudgett
1239385a58 Fix execution of 'i' extension due to uninitialized variable.
The fix for ASTERISK-18243 added code that could potentially use
dst_exten[] uninitialized.  As a result the 'i' exten may not be executed
when it should.

(closes issue ASTERISK-20455)
Reported by: Richard Miller
Patches:
      pbx-1.8.16.0.diff (license #5685) patch uploaded by Richard Miller
      Made some cosmetic modifications.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-09 22:21:54 +00:00
Joshua Colp
332407b5f8 Improve logging for DTLS-SRTP failure situations.
(closes issue ASTERISK-20487)
Reported by: mjordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-09 21:34:01 +00:00
Joshua Colp
749bd15c6f Add a log message for when DTLS-SRTP is requested and the underlying engine does not support it.
(closes issue ASTERISK-20487)
Reported by: mjordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-09 21:29:07 +00:00
Richard Mudgett
bf919dbaa5 dahdi.conf.sample: Add description for "buffers" setting.
This contains an edited version of the patch originally created by John
Bigelow.

(closes issue ASTERISK-14435)
Reported by: John Bigelow
Patches:
      buffers.patch (license #5091) patch uploaded by John Bigelow
      0001-dahdi.conf.sample-Add-description-for-buffers-settin.patch (license #5417) patch uploaded by Shaun Ruffell
      Modified
........

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

Merged revisions 374728 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 22:30:27 +00:00
Richard Mudgett
337a4c70be Fix deletion of unopenable spool files.
If scan_service() cannot open the spool file, it logs a message saying
that it will delete the file and calls remove_from_queue() to do it.
However, remove_from_queue() fails to delete the spool file because struct
outgoing has not yet been fully initialized.

* Merged allocating a new struct outgoing and init_outgoing() into
new_outgoing().  Allocation is initialization.

* Made apply_outgoing() not initialize the spool filename in struct
outgoing.

* Made apply_outgoing() call ast_trim_blanks() and ast_skip_blanks()
rather than manually inlining them.

* Reduced indentation levels in apply_outgoing().

* Fixed a garbled comment in remove_from_queue().

* Reworked scan_service() to simplify it.

(closes issue ASTERISK-17231)
Reported by: David Chappell
Patches:
      spool_open_failure.diff (license #4997) patch uploaded by David Chappell
      Started with this patch.
........

Merged revisions 374686 from http://svn.asterisk.org/svn/asterisk/branches/1.8

* Fixed some memory leaks on off nominal paths in init_outgoing() when
merging into the new_outgoing() function dealing with o->capabilities.
........

Merged revisions 374695 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 21:21:37 +00:00
Matthew Jordan
3e9b01481a Disable ICE support by default
Since there are a number of legacy devices out there that fail to handle ICE
candidates properly (which is a nice way of saying something much uglier),
disable it by default.

Support for ICE candidates can be enabled in rtp.conf using the icesupport
setting.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 20:38:58 +00:00
Matthew Jordan
ec6bf83e28 Resolve issues in ConfBridge regarding marked, waitmarked, and unmarked users
Thank's to Neil Tallim (flan)'s tireless testing, issue reporting, and patches
it became clear that app_confbridge had some complex logic in how it handled
interactions between marked, waitmarked, and unmarked users.  In particular,
there were some areas in which the interactions between the users resulted
in inconsistent behavior, and app_confbridge was missing logic in how to handle
some corner cases.  Some areas included:
 * Poor handling of mixing unmarked and waitmarked users
 * Inconsistencies in how MOH and muting was applied to various users
 * Handling of various announcements for different user profile options
flan's patches seem to fix the various issues, but highlighted how hard the
code could be to maintain.  In an attempt to make things easier to maintain and
to more fully enumerate the various cases that exist, this patch breaks up the
logic into a state machine-like setup.

Please note that the various state transitioned are documented on the Asterisk
wiki:

https://wiki.asterisk.org/wiki/display/AST/Confbridge+state+changes

Review: //https://reviewboard.asterisk.org/r/2072/

Note that for the following issues, mjordan uploaded the patch, although it
was written by twilson.  Any contributor license discrepency is due to that.

(closes issue ASTERISK-19562)
Reported by: flan
Tested by: flan, mjordan, jrose
patches:
  bugASTERISK-19562_ASTERISK-19726_ASTERISK-20181.patch uploaded by twilson (license 6283)

(closes issue ASTERISK-19726)
Reported by: flan
Tested by: flan
patches:
  bugASTERISK-19562_ASTERISK-19726_ASTERISK-20181.patch uploaded by twilson (license 6283)

(closes issue ASTERISK-20181)
Reported by: Jonathan White
Tested by: Jonathan White
patches:
  bugASTERISK-19562_ASTERISK-19726_ASTERISK-20181.patch uploaded by twilson (license 6283)
........

Merged revisions 374652 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 18:47:10 +00:00
Matthew Jordan
b8d2a62206 pjproject: Fix for Solaris builds. Do not undef s_addr.
pjproject, in order to solve build problems on Windows [1], undefines s_addr in
one of it's headers that is included in res_rtp_asterisk.c. On Solaris s_addr
is not a structure member, but defined to map to the real strucuture member,
therefore when building on Solaris it's possible to get build errors like:

    [CC] res_rtp_asterisk.c -> res_rtp_asterisk.o
    In file included from /export/home/admin/asterisk-11-svn/include/asterisk/stun.h:29,
                     from res_rtp_asterisk.c:51:
    /export/home/admin/asterisk-11-svn/include/asterisk/network.h: In function `inaddrcmp':
    /export/home/admin/asterisk-11-svn/include/asterisk/network.h:92: error: structure has no member named `s_addr'
    /export/home/admin/asterisk-11-svn/include/asterisk/network.h:92: error: structure has no member named `s_addr'
    res_rtp_asterisk.c: In function `ast_rtp_on_ice_tx_pkt':
    res_rtp_asterisk.c:706: warning: dereferencing type-punned pointer will break strict-aliasing rules
    res_rtp_asterisk.c:710: warning: dereferencing type-punned pointer will break strict-aliasing rules
    res_rtp_asterisk.c: In function `rtp_add_candidates_to_ice':
    res_rtp_asterisk.c:1085: error: structure has no member named `s_addr'
    make[2]: *** [res_rtp_asterisk.o] Error 1
    make[1]: *** [res] Error 2
    make[1]: Leaving directory `/export/home/admin/asterisk-11-svn'
    gmake: *** [_cleantest_all] Error 2

Unfortunately, in order to make this work, I also had to make sure pjproject
only used the typdef pj_in_addr and not the struct pj_in_addr so that when
building Asterisk I could "typedef struct in_addr pj_in_addr". It's possible
then that the library and users of those interfaces in Asterisk have a different
idea about the type of the argument, while on the surface it looks like they are
all 32 bit big endian values.

[1] http://trac.pjsip.org/repos/changeset/484

(issues ASTERISK-20366)
Reported by: Ben Klang
Tested by: Ben Klang, mjordan
patches:
  0001-pjproject-Fix-for-Solaris-builds.-Do-not-undef-s.patch uploaded by Shaun Ruffell (license 5417)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 00:41:01 +00:00
Matthew Jordan
d99578264b Trivial patch to make 'best_score' defined for all architectures.
Fixes trivial build error on Solaris:

  acl.c: In function `get_local_address':
  acl.c:196: error: `best_score' undeclared (first use in this function)
  acl.c:196: error: (Each undeclared identifier is reported only once
  acl.c:196: error: for each function it appears in.)
  make[2]: *** [acl.o] Error 1

(issue ASTERISK-20366)
Reported by: Ben Klang
Tested by: Ben Klang
patches:
  0002-main-acl.c-Trivial.-best_score-should-be-defined-for.patch by Shaun Ruffell (license 5417)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-07 17:31:53 +00:00
Matthew Jordan
55b8cd2ec9 Handle capability stanzas that fail to provide node or version information
While XEP-0115 states that the node and ver attributes are both required, some
devices fail to provide either field.  Prior to this patch, failure to provide
the node or ver attribute would cause a crash in res_xmpp.  While failing to
provide the node or ver attribute is technically invalid, since this
information is not utilized by Asterisk except for reporting purposes, for
interoperability reasons, we continue to process the capability stanza anyways.

(closes issue ASTERISK-20495)
Reported by: Martin W
Tested by: Martin W
patches:
  20495.patch uploaded by Martin W (license #6434)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-06 03:20:56 +00:00
Matthew Jordan
a7a10088f3 Update documentation for MessageSend application/command's From field for XMPP
When using the channel technology agnostic application/AMI command MessageSend,
the "From" field is technically optional for the SIP channel driver.  However,
if being sent by the XMPP resource module (either res_xmpp or res_jabber), the
"From" field is necessary, and must correspond to a defined account.  This
patch updates the documentation for this application/AMI command to reflect
this.

(closes issue ASTERISK-20405)
Reported by: Leif Madsen



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-06 01:44:41 +00:00
David M. Lee
98f78d2c1d Multiple revisions 374570,374581
........
  r374570 | dlee | 2012-10-05 15:14:41 -0500 (Fri, 05 Oct 2012) | 22 lines
  
  Improve AMI long line error handling
  
  In AMI's parser, when it receives a long line (> 1024 characters), it discards
  that line, but continues to process the message normally.
  
  Typically, this is not a problem because a) who has lines that long and b)
  usually a discarded line results in an invalid message. But if that line is
  specifying an optional field, then the message will be processed, you get a
  'Response: Success', but things don't work the way you expected them to.
  
  This patch changes the behavior when a line-too-long parse error occurs.
  
  * Changes the log message to avoid way-too-long (and truncated anyways) log
    messages
  * Adds a 'parsing' status flag to Response: Success
  * Sets parsing = MESSAGE_LINE_TOO_LONG if, well, a line is too long
  * Responds with an appropriate error if parsing != MESSAGE_OKAY
  
  (closes issue AST-961)
  Reported by: John Bigelow
  Review: https://reviewboard.asterisk.org/r/2142/
........
  r374581 | dlee | 2012-10-05 15:20:28 -0500 (Fri, 05 Oct 2012) | 1 line
  
  I've committed too much. Reverting part of r374570.
........

Merged revisions 374570,374581 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374586 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-05 20:32:42 +00:00
Richard Mudgett
f76557db58 Merged revisions 374515-374535 from
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier

................
  r374515 | rmudgett | 2012-10-04 17:52:36 -0500 (Thu, 04 Oct 2012) | 10 lines

  chan_misdn: Remove some deadcode

  * Made setup_bc() static.

  Patches:
	patch1_unused-code.diff (license #6372) patch uploaded by Guenther Kelleter
	Modified

  JIRA ABE-2882

................
  r374516 | rmudgett | 2012-10-04 18:01:01 -0500 (Thu, 04 Oct 2012) | 7 lines

  chan_misdn: Remove unused bchan states

  Patches:
	patch2_unused-states.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2882

................
  r374517 | rmudgett | 2012-10-04 18:17:51 -0500 (Thu, 04 Oct 2012) | 16 lines

  chan_misdn: Remove unnecessary null pointer checks and checks for stack->nt

  * cleanup_bc() is always called with valid bc (or it would've crashed
  before).

  * Value of stack->nt is known in advance at some places.

  * Rename handle_event() to handle_event_te(), handle_frm() to
  handle_frm_te().

  Patches:
	patch3_checks.diff (license #6372) patch uploaded by Guenther Kelleter
	Modified

  JIRA ABE-2882

................
  r374518 | rmudgett | 2012-10-04 18:21:59 -0500 (Thu, 04 Oct 2012) | 7 lines

  chan_misdn: Fix spelling in log messages

  Patches:
	patch4_spelling.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2882

................
  r374519 | rmudgett | 2012-10-04 18:31:59 -0500 (Thu, 04 Oct 2012) | 15 lines

  chan_misdn: Don't cleanup a bc twice.

  In handle_frm_te() after calling misdn_lib_send_event(bc,
  EVENT_RELEASE_COMPLETE) bc is emptied, cleaned and set not in use,
  although misdn_lib_send_event() already did the same.  This is bad.  When
  it's not in use we are not allowed to touch it.

  * Moved log message in front of the resulting actions and fixed it to
  match the case.

  Patches:
	patch5_bccleanup.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2882

................
  r374520 | rmudgett | 2012-10-04 18:43:56 -0500 (Thu, 04 Oct 2012) | 12 lines

  chan_misdn: Fix memory leaks, bc, chan not cleaned up etc., really bad stuff.

  * Fix return codes of cb_events() for EVENT_SETUP to use caller's cleanup
  mechanisms.

  * Move cl_queue_chan() call after bearer check.

  Patches:
	patch6_leaks.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2882

................
  r374521 | rmudgett | 2012-10-04 18:48:38 -0500 (Thu, 04 Oct 2012) | 11 lines

  chan_misdn: We must initialize cause on sending a DISCONNECT.

  We must initialize cause on sending a DISCONNECT, so it is later correctly
  indicated to ast_channel in case the answer (RELEASE/RELEASE_COMPLETE)
  does not include one.

  Patches:
	patch7_hangupcause.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2882

................
  r374522 | rmudgett | 2012-10-04 19:03:56 -0500 (Thu, 04 Oct 2012) | 7 lines

  chan_misdn: Remove unused code for upqueue

  Patches:
	patch8_unused-upqueue.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2882

................
  r374523 | rmudgett | 2012-10-04 19:11:50 -0500 (Thu, 04 Oct 2012) | 7 lines

  chan_misdn: Improve debugging (port number, messages fixed, dups removed)

  Patches:
	patch9_debug.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2882

................
  r374533 | rmudgett | 2012-10-05 12:17:18 -0500 (Fri, 05 Oct 2012) | 8 lines

  chan_misdn: Better debug: we can print_bc_info even if there's no ast leg.

  Patches:
	patch10_debug-bc-2.diff (license #6372) patch uploaded by Guenther Kelleter
	Modified.

  JIRA ABE-2882

................
  r374534 | rmudgett | 2012-10-05 12:34:10 -0500 (Fri, 05 Oct 2012) | 16 lines

  chan_misdn: setup_bc() is called too early for an incoming SETUP on TE.

  This prevents the B channel from being setup for HDLC mode when requested
  by the bearer capability and config option hdlc=yes.  It violates
  ETS300102 Ch.5.2.3.2: "The user, in any case, must not connect to the
  channel until a CONNECT ACKNOWLEDGE message has been received."

  * Call setup_bc() on receipt of CONNECT_ACKNOWLEGDE for PTMP, and on first
  response to SETUP for PTP.

  Patches:
	abe-2881-2.diff (license #6372) patch uploaded by Guenther Kelleter
	Modified.

  JIRA ABE-2881

................
  r374535 | rmudgett | 2012-10-05 12:41:05 -0500 (Fri, 05 Oct 2012) | 2 lines

  chan_misdn: Remove some more deadcode.

................
........

Merged revisions 374536 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374537 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-05 18:34:41 +00:00
Alec L Davis
ff8dce40f2 dsp.c User Configurable DTMF_HITS_TO_BEGIN and DTMF_MISSES_TO_END
Instead of a recompile, allow values to be adjusted in dsp.conf

For binary distributions allows easy adjustment for wobbly GSM calls, and other reasons.

Defaults to DTMF_HITS_TO_BEGIN=2 and DTMF_MISSES_TO_END=3

(closes issue ASTERISK-17493)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2144/
........

Merged revisions 374479 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374481 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04 20:18:59 +00:00
Alec L Davis
76436d2064 dsp.c fix incorrect DTMF Digit_Duration.
it's always short by 'hits_to_begin*DTMF_GSIZE', or 25.5ms if hitstobegin=2

(issue ASTERISK-16003)
Tested by: alecdavis
alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2145/
........

Merged revisions 374475 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374476 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04 20:06:45 +00:00
David M. Lee
2659db6d61 Fix DBDelTree error codes for AMI, CLI and AGI
The AMI DBDelTree command will return Success/Key tree deleted successfully even
if the given key does not exist. The CLI command 'database deltree' had a
similar problem, but was saved because it actually responded with '0 database
entries removed'. AGI had a slightly different error, where it would return
success if the database was unavailable.

This came from confusion about the ast_db_deltree retval, which is -1 in the
event of a database error, or number of entries deleted (including 0 for
deleting nothing).

* Changed some poorly named res variables to num_deleted
* Specified specific errors when calling ast_db_deltree (database unavailable
  vs. entry not found vs. success)
* Fixed similar bug in AGI database deltree, where 'Database unavailable'
  results in successful result

(closes issue AST-967)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/2138/
........

Merged revisions 374426 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374427 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04 15:42:07 +00:00
Alec L Davis
259f43f421 dsp.c User configuration of DTMF_NORMAL_TWIST and DTMF_REVERSE_TWIST values
Asterisk's DTMF Specifications are based on AT&T specs, which may not be compatible in other countries.

Various countries have different specifications for the maximum power level differences
between the DTMF low group and high group of frequencies.

Power level difference between frequencies for different Administrations/RPOAs
 NTT        = Max. 5 dB
 AT&T       = 4dB(reverse) to 8dB(normal)
 Danish     = Max. 6 dB
 Australian = Max. 10 dB
 Brazilian  = Max. 9 dB
 ETSI       = Max. 6 dB from ETSI ES 201 235-3 V1.3.1 (2006-03)

Now allow 4 variables to be individually configured in dsp.conf, with reasonable min/max of 2dB to 20dB.
Default is AT&T specifications

Add's the following variables to dsp.conf
;dtmf_normal_twist=6.31 
;dtmf_reverse_twist=2.51 
;relax_dtmf_normal_twist=6.31 
;relax_dtmf_reverse_twist=3.98 


(closes issue ASTERISK-20442)
Reported by: tbsky
Tested by: tbsky,alecdavis

alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2141/
........

Merged revisions 374384 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374385 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04 04:43:32 +00:00
Alec L Davis
cc84ce722e _dsp_init: bring inline with trunk
preparation for clean merge of DTMF TWIST patch

No functional changes, just style.

alecdavis (license 585)
Reported by: Alec Davis
Tested by: alecdavis

related https://reviewboard.asterisk.org/r/2141
........

Merged revisions 374365 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374370 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04 04:21:25 +00:00
Matthew Jordan
d3d952c31b Check for presence of buddy in info/dinfo handlers
The res_jabber resource module uses the ASTOBJ library for managing its ref
counted objects.  After calling ASTOBJ_CONTAINER_FIND to locate a buddy object,
the pointer to the object has to be checked to see if the buddy existed.
Prior to this patch, the buddy object was not checked for NULL; with this patch
in both aji_client_info_handler and aji_dinfo_handler the pointer is checked
before used and, if no buddy object was found, the handlers return an error
code.

This patch does not take the approach that our JID can be used to log in from
another resource.  If that approach is desired, an improvement could be made to
this patch to create the buddy on the fly.  This patch seeks only to prevent
Asterisk from crashing.

FYI: In Asterisk 11+, you really should be using res_xmpp.  It does not have
this problem, as it moved to the astobj2 library.

Note that multiple people have proposed patches for this issue; the patch being
committed here is based on those.

(closes issue ASTERISK-19532)
Reported by: Karsten Wemheuer
Tested by: Byron Clark
patches:
  fix-jabber uploaded by Karsten Wemheuer (license #5930)
  xmpp_no_crash_with_ejabberd.patch uploaded by Byron Clark (license #6157)

(closes issue ASTERISK-19557)
Reported by: ulugutz
........

Merged revisions 374335 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374336 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04 02:15:07 +00:00
Matthew Jordan
ba781b68e9 Destroy the generic_monitors container after the core_instances in ccss
For each item in core_instances disposed of in the shutdown of ccss, any
generic monitor instances referenced by the objects will be removed from
generic_monitors during their destruction.  Hilarity ensues if
generic_monitors no longer exists.

Thanks to the Asterisk Test Suite's generic_ccss test for complaining loudly
when it ran into this.
........

Merged revisions 374300 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-03 17:27:05 +00:00
Matthew Jordan
aa5ac80919 Ensure Shutdown AMI event is still fired during Asterisk shutdown
Richard pointed out that having the manager dispose of itself gracefully
during shutdown meant that the Shutdown event will no longer get fired.
This patch moves the AMI event just prior to running the atexit callbacks.
........

Merged revisions 374230 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374231 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02 21:23:01 +00:00
Matthew Jordan
61ac420dfb Fix findings from check-in on r374177
Richard pointed out two problems with the check-in from r374177:
* The ast_msg_shutdown function declaration doesn't match the prototype
  in main/message.c.
* The ref/alloc function usage in astobj2 (in trunk) can use the ao2_t_*
  variants of the functions to allow the REF_DEBUG flag to enable/disable
  their debug counterparts.
........

Merged revisions 374210 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02 17:12:16 +00:00
Matthew Jordan
8943656ccc Fix a variety of ref counting issues
This patch resolves a number of ref leaks that occur primarily on Asterisk
shutdown.  It adds a variety of shutdown routines to core portions of
Asterisk such that they can reclaim resources allocate duringd initialization.

Review: https://reviewboard.asterisk.org/r/2137
........

Merged revisions 374177 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374178 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02 01:27:19 +00:00
Sean Bright
1449b2cad0 app_queue: Support persisting and loading of long member lists.
Greenlight in #asterisk brought up that he was receiving an error message "Could
not create persistent member string, out of space" when running app_queue in
Asterisk 10.  dump_queue_members() made an assumption that 8K would be enough to
store the generated string, but with queues that have large member lists this is
not always the case.  This patch removes the limitation and uses ast_str instead
of a fixed sized buffer.

The complicating factor comes from the fact that ast_db_get requires a buffer
and buffer size argument, which doesn't let us pull back more than what we pass
in, so I introduced a new ast_db_get_allocated() which returns an ast_strdup()'d
copy of the value from astdb.

As an aside, I did some testing on the maximum size of data that we can store in
the BDB library we distribute and was able to store a 10MB string and retrieve
it with no problems, so I feel this is a safe patch.

Review: https://reviewboard.asterisk.org/r/2136/
........

Merged revisions 374108 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374135 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01 20:26:09 +00:00
Sean Bright
0dd8b496cf Use ast_copy_string instead of strncpy to guarantee a NUL terminated string.
........

Merged revisions 374132 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01 17:27:57 +00:00
Mark Michelson
17aa64c20e Don't destroy confbridge config when error is encountered during a reload.
Not panicking means that the old config is kept.

(closes issue ASTERISK-20458)
Reported by: Leif Madsen
Patches:
	ASTERISK-20458.patch uploaded by Mark Michelson(license #5049)
Tested by Leif Madsen



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01 16:12:43 +00:00
Matthew Jordan
30d590a970 Fix ref leak when adding ICE candidates to an SDP
There was a missing decrement to the reference count for the current ICE
candidate when local candidates are being added to an outbound SDP.  This
patch corrects that.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-29 03:54:15 +00:00
Jonathan Rose
55095aed83 res_jabber: Remove CLI command 'jabber test'
The opinion of development was that it is both improper to have Matt's
personal email address used in the source and that the command wouldn't
be useful without it.

(closes issue AST-467)
Reported by: Malcolm Davenport
........

Merged revisions 374032 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374045 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-28 19:29:07 +00:00
Brent Eagles
ad8f06037b Reset hangup flags on channels created through messages and cleanup globals
in res_xmpp on unload.

This patch fixes an issue where hangup flags were not being reset on a
channel, affecting subsequent use of that channel. The patch also adds some
additional cleanup to res_xmpp to fix an issue with reloading the module.

(closes ASTERISK-20360)
Reported by: Noah Engelberth 
Tested by: beagles
Review: https://reviewboard.asterisk.org/r/2134/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-28 13:02:17 +00:00
Joshua Colp
53d2e20963 Update documentation to make it explicit that "stream file" will not restart musiconhold.
(issue ASTERISK-17367)
Reported by: oej
........

Merged revisions 373989 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373990 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-28 12:16:40 +00:00
Richard Mudgett
7a822e7f55 Fix SendDTMF crash and channel reference leak using channel name parameter.
The SendDTMF channel name parameter has two issues.
1) Crashes if the channel name does not exist.
2) Leaks a channel reference if the channel is the current channel.
Problem introduced by ASTERISK-15956.

* Updated SendDTMF documentation.

* Renamed app to senddtmf_name and tweaked the type.
........

Merged revisions 373945 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373946 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-27 22:19:03 +00:00
Joshua Colp
f8e894e031 Make res_http_websocket an optional dependency on supported platforms for chan_sip.
(closes issue ASTERISK-20439)
Reported by: sruffell
Patches:
     0001-chan_sip-websocket-support-is-an-optional-API.patch uploaded by sruffell (license 5417)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-27 17:05:26 +00:00
Joshua Colp
302cc28472 loader: Ensure dependent modules are properly initialized.
If an Asterisk module specifies a dependency in ast_module_info.nonoptreq, it
is possible for Asterisk to skip calling the modules's .load function.
Asterisk was loading and linking the module via load_dynamic_module() but was
not adding the module to the resource_heap. Therefore the module was not
initialized based on it's priority along with the other modules in the heap.

Now use load_resource() instead of load_dynamic_module() for non-optional
requirement. This will add the module to the resource_heap so the module can
be properly initialized in the correct order.

This is required if there are any module global data structures initialized in
the .load() callback for the module on platforms which do not support weak
references.

(issue ASTERISK-20439)
Reported by: sruffell
Patches:
     0001-loader-Ensure-dependent-modules-are-properly-initial.patch uploaded by sruffell (license 5417)
........

Merged revisions 373909 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373910 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-27 16:51:31 +00:00
Joshua Colp
5e0aff508c Fix an issue where Local channels dialed by app_queue are considered in use immediately.
The chan_local channel driver returns a device state of in use even if a created Local
channel has not yet been dialed. This fix changes the logic to return a state of not
in use until the channel itself has been dialed.

(closes issue ASTERISK-20390)
Reported by: tim_ringenbach

Review: https://reviewboard.asterisk.org/r/2116/
........

Merged revisions 373878 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373879 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-27 11:33:03 +00:00
Mark Michelson
70cb09cd56 Move handling of 408 response so there is no misleading warning message.
(closes issue ASTERISK-20060)
Reported by: Walter Doekes
........

Merged revisions 373848 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373849 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-26 21:16:11 +00:00
Richard Mudgett
33fcc48c91 Fixed meetme tab completion and command documentation.
* Removed unnecessary case sensitivity in meetme list, lock, unlock, mute,
unmute, and kick commands.

* Separated meetme lock/unlock, mute/unmute, and kick commands into their
own registered commands to simplify tab completion and parameter checking.
meetme_lock_cmd(), meetme_mute_cmd(), and meetme_kick_cmd()

* Simplified meetme_show_cmd()

(closes issue AST-1006)
Reported by: John Bigelow
Tested by: rmudgett
........

Merged revisions 373815 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373816 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-26 18:18:01 +00:00
Alec L Davis
5a0a5745ed app_queue: 'agent available' hint, cleanup restart, and initial state
Fix previously untested senarios;

1). On queue initialisation set queue_avail devstate to INUSE.
    Previously was unavailable, which indicated an agent was available.

2). When removing members, if there are no other members available, set queue_avail to INUSE.
    Previously, if a member interface had become 'unavailable', they were never going to be removed, particularly when persistant queues is enabled.

3). When adding a member, check that they are available, if they are set queue_avail to NOT_INUSE.
 Previously on reloaded, members may have been 'unavailable'.

4). When pausing or unpausing a member, set appropriate queue availability. 

alecdavis (license 585)
Reported by: Alec Davis
Tested by: alecdavis

Review: https://reviewboard.asterisk.org/r/2129/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-26 08:29:53 +00:00
Mark Michelson
8501e95d97 Fix saying of date in Dutch.
The Dutch say the date before the month.

(closes issue ASTERISK-20353)
Reported by: Teun Ouwehand
........

Merged revisions 373773 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373774 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 23:09:40 +00:00
Mark Michelson
d9e1cec84a Remove dead code and documentation for nonexistent feature.
multiplelogin was removed from chan_agent back in 1.6.0 when
AgentCallbackLogin() was removed.

(closes issue AST-948)
reported by Steve Pitts
........

Merged revisions 373768 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373769 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 22:55:35 +00:00
Mark Michelson
46ecb0a53f Fix error where improper IMAP greetings would be deleted.
(closes issue ASTERISK-20435)
Reported by: fhackenberger
Patches:
	asterisk-20435-imap-del-greeting.diff uploaded by Michael L. Young (License #5026)
	(with suggested modification made by me)
........

Merged revisions 373735 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373737 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 21:13:46 +00:00
Joshua Colp
59c9a7205a Fix T.38 support when used with chan_local in between.
Users of the T.38 API can indicate AST_T38_REQUEST_PARMS on a channel to request that the
channel indicate a T.38 negotiation with the parameters present on the channel. The return
value of this indication is expected to be AST_T38_REQUEST_PARMS upon success but with
chan_local involved this could never occur.

This fix changes chan_local to always return AST_T38_REQUEST_PARMS for this situation. If
the underlying channel technology on the other side does not support T.38 this would have
been determined ahead of time using ast_channel_get_t38_state and an indication would
not occur.

(closes issue ASTERISK-20229)
Reported by: wdoekes
Patches:
     ASTERISK-20229.patch uploaded by wdoekes (license 5674)

Review: https://reviewboard.asterisk.org/r/2070/
........

Merged revisions 373705 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373706 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 20:13:03 +00:00
Kinsey Moore
dac70de657 Recorded merge of revisions 373703 from http://svn.asterisk.org/svn/asterisk/branches/10
........
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-20415)
Reported by: Michele Cicciotti
patches:
  uploaded by Joshua Colp (trunk r369817)
........

Merged revisions 373702 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 19:35:09 +00:00
Terry Wilson
ba4e0c1591 Properly handle UAC/UAS roles for SIP session timers
The SIP session timer mechanism contains a mandatory 'refresher' parameter
(included in the Session-Expires header) which is used in the session timer
offer/answer signaling within a SIP Invite dialog. It looks like asterisk is
interpreting the uac resp. uas role only as the initial role of client and
server (caller is uac, callee is uas). The standard rfc 4028 however assigns
the client role to the ((RE)-Invite) requester, the server role to the
((RE)-Invite) responder.

This patch has Asterisk track the actual refresher as "us" or "them" as opposed
to relying on just the configured "uas" or "uac" properties.

(closes issue AST-922)
Reported by: Thomas Airmont

Review: https://reviewboard.asterisk.org/r/2118/
........

Merged revisions 373652 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373665 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 18:52:12 +00:00
Kinsey Moore
a645b4c5c9 "show" completion option for "queue" shouldn't appear twice
When tab-completing CLI commands starting with "queue", "show" appeared
twice in the list due to the way that Asterisk's tab completion
functions and the order in which the commands were registered. The
registration order has been altered to resolve this issue.

(closes issue AST-940)
Reported-by: Steve Pitts
........

Merged revisions 373666 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373675 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 18:24:59 +00:00
Richard Mudgett
1db1f76ee7 Fix valgrind found memcpy issues in codec_ilbc.
Valgrind found codec_ilbc using memcpy instead of memmove for overlapping
memory blocks.

(issue ASTERISK-19890)
(closes issue ASTERISK-20231)
Reported by: Walter Doekes
Patches:
      ASTERISK-20231.patch (license #5674) patch uploaded by Walter Doekes
........

Merged revisions 373640 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373645 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 17:21:08 +00:00
Richard Mudgett
40e68791a7 Make rebuild GSM, ilbc, or lpc10 codecs if the respective sources change.
........

Merged revisions 373618 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373633 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 16:56:54 +00:00
Jonathan Rose
57771ffe11 chan_sip: Set Quality of Service for video rtp instance
(closes issue ASTERISK-20201)
Reported by: ddkprog
Patches:
    chan_sip.c.diff uploaded by ddkprog (license 6008)
........

Merged revisions 373617 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373631 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 16:31:41 +00:00
Mark Michelson
00191316f0 "He who go through turnstile sideways is going to Bangkok"
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 14:12:05 +00:00
Kinsey Moore
08908a1f4b Fix documentation for default username in res_odbc
This was previously stated to be "root", but is actually the name of
the context if unspecified.

(closes issue ASTERISK-20258)
Reported by: Stefan x
........

Merged revisions 373578 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373579 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 13:29:02 +00:00
Joshua Colp
d6ece969ba Fix an issue where a caller to ast_write on a MulticastRTP channel would determine it failed when in reality it did not.
When sending RTP packets via multicast the amount of data sent is stored in a variable and returned
from the write function. This is incorrect as any non-zero value returned is considered a failure while
a return value of 0 is success. For callers (such as ast_streamfile) that checked the return value
they would have considered it a failure when in reality nothing went wrong and it was actually a success.

The write function for the multicast RTP engine now returns -1 on failure and 0 on success, as it should.

(closes issue ASTERISK-17254)
Reported by: wybecom
........

Merged revisions 373550 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373551 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 12:07:14 +00:00
Matthew Jordan
918a18ceb7 Revert change to res_rtp_asterisk committed in r373236 (1.8)
The change committed in r373236 attempted to account for endpoints that
increased their RTP timestamp in DTMF end of event re-transmissions.  This
change attempted to make Asterisk continue to work with endpoints that
failed to follow the RFC while maintaining the fix that allowed for out of
order DTMF to be handled.  Unfortunately, there is no free lunch, and this
patch broke any system that sent DTMF immediately after an RTP session was
established or when an SSRC is updated.  As such, that patch is being
reverted for the previous behavior.

Endpoints that erroneously increase the RTP timestamp in DTMF end of event
packets will not work properly with Asterisk.

(issue ASTERISK-20424)
........

Merged revisions 373504 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373505 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-24 22:17:58 +00:00
Richard Mudgett
fcd5d7f458 Be consistent, send From: "Anonymous" <sip:anonymous@anonymous.invalid>
When setting CALLERID(pres)=unavailable in the dialplan, the From header
in the SIP message contains "Anonymous" <sip:Anonymous@anonymous.invalid>.
For consistency, Asterisk should use a lowercase a in the userpart of the
URI.

* Make the From header use a lowercase A in the userpart of the anonymous
URI.

(closes issue ASTERISK-19838)
Reported by: Antti Yrjola
Patches:
      chan_sip_patch_ASTERISK-19838.patch (license #6383) patch uploaded by Antti Yrjola
........

Merged revisions 373500 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373501 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-24 22:12:39 +00:00
Jonathan Rose
759221d515 func_audiohookinherit: Document some missed sources.
This patch also mentions that AUDIOHOOK_INHERIT can be used to
transfer MixMonitor audiohooks. There is also wiki that addresses
audiohooks and the use of AUDIOHOOK_INHERIT at the following link:
https://wiki.asterisk.org/wiki/display/AST/Audiohooks

(closes issue ASTERISK-18220)
Reported by: Ishfaq Malik
........

Merged revisions 373467 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373468 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-24 21:12:28 +00:00
Richard Mudgett
26e45bbfca Fix potential reentrancy problems in chan_sip.
Asterisk v1.8 and later was not as vulnerable to this issue.

* Made find_call() lock each private as it processes the found dialogs.
(Primary cause of ABE-2876)

* Made the other functions that traverse the dialogs container lock each
private as it examines them.

* Fix race condition in sip_call() if the thread that sent the INVITE is
held up long enough for a response to be processed.  The p->initid for the
INVITE retransmission could be added after it was canceled by the response
processing.

* Made __sip_destroy() clean up resource pointers after freeing.  This is
primarily defensive in case someone has a stale private pointer.

* Removed redundant memset() in reqprep().  The call to init_req() already
does the memset() and is the first reference to req in reqprep().

* Removed useless set of req.method in transmit_invite().  The calls to
initreqprep() and reqprep() have to do this because they memset() the req.

JIRA ABE-2876

..........

Merged -r373423 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

Merged revisions 373424 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373466 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-24 21:08:16 +00:00
Joshua Colp
f3e09ab823 Fix a deadlock caused by a race condition between removing a hint and reloading the dialplan and subscribing to the removed hint.
If conditions were right it was possible for both the PBX core and chan_sip to deadlock by both having a lock that the other
wants. In the case of the PBX core it had the contexts lock and wanted a SIP dialog lock, while in the case of chan_sip it
had the SIP dialog lock and wanted the contexts lock.

This fix unlocks the SIP dialog before getting the extension state so that the other thread will not block on trying to lock
it. Once the extension state is retrieved the SIP dialog is locked again and life carries on.

As the SIP dialog is reference counted it is not possible for it to go away after unlocking.

(closes issue ASTERISK-20437)
Reported by: jhutchins
........

Merged revisions 373438 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373440 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-24 19:21:57 +00:00
Joshua Colp
b40fecd9ab Fix an issue with H.264 format attribute comparison and fix an issue with improper SDP being produced.
The H.264 format attribute module compares two format attribute structures to determine if they are
compatible or not. In some instances it was possible for this check to determine that both structures
were incompatible when they actually should be considered compatible. This check has now been made even
more permissive by assuming that if no attribute information is available the two structures are compatible.
If both structures contain attribute information a base level comparison of the H.264 IDC value is done to
see if they are compatible or not.

The above issue uncovered a secondary issue in chan_sip where the SDP being produced would be incorrect if
the formats were considered incompatible. This has now been fixed by checking that all information required
to produce the SDP is available instead of assuming it is.

(closes issue ASTERISK-20464)
Reported by: Leif Madsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-24 14:25:43 +00:00
Brent Eagles
f5699aebee res_rtp_asterisk: Make TURN and STUN server configurations consistent.
This patch removes the turnport configuration property and changes the
turnaddr property to be a combined host[:port] configuration string. The
patch also modifies the documentation in the example configuration to
reflect the property changes and adds some additional text indicating how
the STUN port is configured.

(closes issue ASTERISK-20344)
Reported by: beagles
Tested by: beagles
Review: https://reviewboard.asterisk.org/r/2111/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-24 12:33:10 +00:00
Jonathan Rose
388509cfa9 iax2-provision: Fix improper return on failed cache retrieval
(closes issue ASTERISK-20337)
reported by: John Covert
Patches:
    iax2-provision.c.patch uploaded by John Covert (license 5512)
........

Merged revisions 373342 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373343 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-21 19:29:12 +00:00
Jonathan Rose
237b75db29 app_queue: Make queue reload members and variants of that work
Prior to this patch, 'queue reload members' cli command did not
work at all. This also affects the manager function 'QueueReload'
when supplied with the 'members: yes' field.

(closes issue AST-956)
Reported by: John Bigelow
........

Merged revisions 373298 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373300 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-21 15:31:06 +00:00
Joshua Colp
a27145ac57 Fix incorrect MeetME conference bridge reference count decrementing and sometimes premature destruction.
When using the 'e' or 'E' option to MeetMe the configured conference bridges are loaded and examined to see
if any are empty. If no conference bridges are empty the caller is prompted to enter the number of one.
This operation left around a pointer to the last created conference bridge still containing participants.
When the caller that was not able to find any empty conference bridge hung up this pointer was disposed of
and the reference count of the conference bridge decremented. If there was only a single participant in the
conference bridge it was ultimately destroyed prematurely.

(closes issue AST-994)
Reported by: John Bigelow
........

Merged revisions 373242 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373245 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 19:16:02 +00:00
Matthew Jordan
792a89a9f7 app_queue: Support an 'agent available' hint
Sets INUSE when no free agents, NOT_INUSE when an agent is free.  

modifes handle_statechange() scan members loop to scan for a free agent
and updates the Queue:queuename_avial devstate.

Previously exited early if the member was found in the queue.

Now Exits later when both a member was found, and a free agent was found.


alecdavis (license 585)
Reported by: Alec Davis
Tested by: alecdavis

Review: https://reviewboard.asterisk.org/r/2121/

~~~~

Support all ways a member can be available for 'agent available' hints

Alec's patch in r373188 added the ability to subscribe to a hint for when
Queue members are available.  This patch modifies the check that determines
when a Queue member is available by refactoring the availability checks in
num_available_members into a shared function is_member_available.  This
should now handle the ringinuse option, as well as device state values
other than AST_DEVICE_NOT_INUSE.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 18:59:05 +00:00
Matthew Jordan
3a7a20a284 When processing RFC 2833 DTMF, accomodate increasing timestamps in End events
While endpoints should not be changing the source timestamp between DTMF event
packets, the fact is there exists those endpoints that do exactly that.  To
work around this, we absorb timestamps within the expected re-transmit period.
Note that this period only affects End of Event packets, so it should not
prevent the detection of new DTMF digits that happen to arrive right on top
of each other.

(closes issue ASTERISK-20424)
Reported by: Vladimir Mikhelson
Tested by: mjordan, Vladimir Mikhelson

Review: https://reviewboard.asterisk.org/r/2124
........

Merged revisions 373236 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373237 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 18:44:11 +00:00
Matthew Jordan
e026c03d17 Add queue monitoring hints
This patch adds support for hints on a queue.  Hints can be added using
the nomenclature 'Queue:name', where name is the name of the queue being
monitored.

This nifty feature was done by Alec Davis.

Review: https://reviewboard.asterisk.org/r/1619

Reported by: Alec Davis
Tested by: alecdavis
patches:
  review1619.diff2 by alecdavis (license 585)




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 18:36:11 +00:00
Joshua Colp
42ebea2f2f Add support for DTLS-SRTP to res_rtp_asterisk and chan_sip.
As mentioned on the review for this, WebRTC has moved towards choosing
DTLS-SRTP as the mechanism for key exchange for SRTP. This commit adds
support for this but makes it available for normal SIP clients as well.

Testing has been done to ensure that this introduces no regressions with
existing behavior and also that it functions as expected.

Review: https://reviewboard.asterisk.org/r/2113/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 18:18:47 +00:00
Richard Mudgett
7e9bdcc3e0 Named call pickup groups. Fixes, missing functionality, and improvements.
* ASTERISK-20383
Missing named call pickup group features:

CHANNEL(callgroup) - Need CHANNEL(namedcallgroup)
CHANNEL(pickupgroup) - Need CHANNEL(namedpickupgroup)
Pickup() - Needs to also select from named pickup groups.

* ASTERISK-20384
Using the pickupexten, the pickup channel selection could fail even though
there was a call it could have picked up.  In a call pickup race when
there are multiple calls to pickup and two extensions try to pickup a
call, it is conceivable that the loser will not pick up any call even
though it could have picked up the next oldest matching call.

Regression because of the named call pickup group feature.

* See ASTERISK-20386 for the implementation improvements.  These are the
changes in channel.c and channel.h.

* Fixed some locking issues in CHANNEL().

(closes issue ASTERISK-20383)
Reported by: rmudgett
(closes issue ASTERISK-20384)
Reported by: rmudgett
(closes issue ASTERISK-20386)
Reported by: rmudgett
Tested by: rmudgett

Review: https://reviewboard.asterisk.org/r/2112/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 17:15:05 +00:00
Kinsey Moore
19fcfcb280 Correct handling of unknown SDP stream types
When the patch to handle arbitrary SDP stream arrangements went into
Asterisk, it also included an ability to transparently decline unknown
stream types. The scanf calls used were not checked properly causing
this part of the functionality to be broken.

(closes issue ASTERISK-20203)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 13:00:09 +00:00
Matthew Jordan
bf51f55d08 Blocked revisions 373196
........
Ensure that all ConfBridge sounds can be set using CONFBRIDGE function

The CONFBRIDGE function can be used to set the sounds in a ConfBridge
bridge profile.  Unfortunately, three sounds were missed in the portion
of the code that applies the settings passed in from the function:
sound_only_one, join, and leave.  This patch makes sure that the sounds
passed from the function are applied to the bridge profile.

(closes issue ASTERISK-20404)
Reported by: univ
Tested by: mjordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 02:40:22 +00:00
Sean Bright
522740b00e Don't crash when passing a NULL message to __astman_get_header.
Before this commit, __astman_get_header would blindly dereference the passed in
'struct message *' to traverse the header list.  There are cases, however, such
as '*CLI> sip qualify peer foo' where the message pointer is NULL, so we need
to check for that.
........

Merged revisions 373131 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373132 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-18 20:14:01 +00:00
David M. Lee
0227e81595 Add -fnested-functions compile flag, if needed.
In order to use nested functions on some versions of GCC (e.g. GCC on OS X),
the -fnested-functions flag must be passed to the compiler. This patch adds
detection logic to ./configure to add the flag if necessary. It also adds
a comment to utils.h as to why the nested function needs a prototype.

(closes issue ASTERISK-20399)
Reported by: David M. Lee
Review: https://reviewboard.asterisk.org/r/2102/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-18 15:47:01 +00:00
Richard Mudgett
7687370500 Made companding law for SS7 calls only determined by SS7 signaling type.
For SS7, the companding law for a call was chosen inconsistently depending
upon ss7type (ITU vs ANSI) and the DAHDI companding default (T1 vs E1).
For incoming calls, the companding law was determined by ss7type.  For
outgoing calls, the companding law was determined by the DAHDI default.
With the wrong combination you would get A-law/u-law conflicts.  An
A-law/u-law conflict sounds like bad static on the line.

SS7 ITU  signaling with E1 line: ok
SS7 ITU  signaling with T1 line: noise
SS7 ANSI signaling with E1 line: noise
SS7 ANSI signaling with T1 line: ok

* Fix the companding law used to be determined by the SS7 signaling type
only.
........

Merged revisions 373090 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373101 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-15 00:27:06 +00:00
Matthew Jordan
9e396da730 Resolve memory leaks in TLS initialization and TLS client connections
This patch resolves two sources of memory leaks when using TLS in Asterisk:
1) It removes improper initialization (and multiple re-initializations) of
   portions of the SSL library.  Asterisk calls SSL_library_init and
   SSL_load_error_strings during SSL initialization; collectively this
   obviates the need for calling any of the following during initialization
   or client connection handling:
   * ERR_load_crypto_strings (handled by SSL_load_error_strings)
   * OpenSSL_add_all_algorithms (synonym for SSL_library_init)
   * SSLeay_add_ssl_algorithms (synonym for SSL_library_init)
2) Failure to completely clean up all memory allocated by Asterisk and by
   the SSL library for TLS clients.  This included not freeing the SSL_CTX
   object in the SIP channel driver, as well as not clearing the error
   stack when the TLS client exited.

Note that these memory leaks were found by Thomas Arimont, and this patch
was essentially written by him with some minor tweaks.

(closes issue AST-889)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
patches:
  (bugAST-889.patch) by Thomas Arimont (license 5525)

Review: https://reviewboard.asterisk.org/r/2105
........

Merged revisions 373061 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373062 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-14 19:50:40 +00:00
Matthew Jordan
e2f77f08e0 Blocked revisions 373059
........
Constify __ao2_ref_debug in astobj2

When REF_DEBUG is enabled in certain files - most notably ccss.c - the 'tag'
parameter passed to __ao2_ref_debug will be a const char *.  The function
currently expects that parameter to not be const.  This causes a warning
when compiling, as the const qualifier is being discarded.  With dev-mode
enabled, this prevents compiling Asterisk.

This patch makes __ao2_ref_debug's tag and file parameters const.

(closes issue ASTERISK-20408)
Reported by: mjordan
........

Merged revisions 372959 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-14 18:33:06 +00:00
David M. Lee
d214ab8b37 Fixed make clean when configured --disable-asteriskssl
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-13 20:04:51 +00:00
David M. Lee
061874d811 Fix timeouts for ast_waitfordigit[_full].
ast_waitfordigit_full would simply pass its timeout to ast_waitfor_nandfds,
expecting it to decrement the timeout by however many milliseconds were
waited. This is a problem if it consistently waits less than 1ms. The timeout
will never be decremented, and we wait... FOREVER!

This patch makes ast_waitfordigit_full manage the timeout itself. It maintains
the previously undocumented behavior that negative timeouts wait forever.

(closes issue ASTERISK-20375)
Reported by: Mark Michelson
Tested by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/2109/
........

Merged revisions 373024 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373025 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@373029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-13 18:49:45 +00:00
Joshua Colp
0b9f1c4e0d Skip any non-content information when looking for and handling content.
This fixes a bug with Jitsi and conference calling. Jitsi implements XEP-0298
which places some conference-info information in the session-initiate request
which chan_motif did not expect to occur.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-12 20:53:20 +00:00
Jonathan Rose
980d304089 res_xmpp: Fix a segfault caused by bodyless messages
(closes issue ASTERISK-20361)
Reported by: Noah Engelberth
Review: https://reviewboard.asterisk.org/r/2108/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-12 18:23:04 +00:00
Mark Michelson
cc8afceba5 Add channel name to a warning to make debugging easier.
The "autodestruct with owner in place" message is typically
indicative of a channel reference leak. Printing out the name
of the channel in the message may be helpful when trying to
debug the issue.
........

Merged revisions 372932 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372933 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-12 15:19:01 +00:00
David M. Lee
14947e93cc Fixed r372696 when configured --disable-asteriskssl; properly install libasteriskssl.dylib on OS X.
I didn't realize that libasteriskssl.c was still compiled, even when you
disable asteriskssl; it simple gets statically linked into asterisk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-12 14:18:07 +00:00
Jonathan Rose
79d0efd393 chan_local: Switch from using a random 4 digit hex identifier to unique id
Changes chan_local channels to use an 8 digit hex identifier generated
atomically and sequentially in order to eliminate the chance of having
multiple channels with the same name during high call volume situations.

(issue ASTERISK-20318)
Reported by: Dan Cropp
Review: https://reviewboard.asterisk.org/r/2104/
........

Merged revisions 372902 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372916 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-11 22:32:52 +00:00
Mark Michelson
46b730b070 Fix inability to shutdown gracefully due to an unending channel reference.
message.c makes use of a special message queue channel that exists
in thread storage. This channel never goes away due to the fact that
the taskprocessor used by message.c does not get shut down, meaning
that it never ends the thread that stores the channel.

This patch fixes the problem by shutting down the taskprocessor when
Asterisk is shut down. In addition, the thread storage has a destructor
that will release the channel reference when the taskprocessor is destroyed.

(closes issue AST-937)
Reported by Jason Parker
Patches:
	AST-937.patch uploaded by Mark Michelson (License #5049)
Tested by Jason Parker
........

Merged revisions 372885 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-11 21:15:50 +00:00
Mark Michelson
9bfcbf0f70 Fix bad channel application data reference.
When channels get bridged due to an AMI bridge action
or a DTMF attended transfer, the two channels that
get bridged have their application data pointing to
the other channel's name. This means that if one channel
is hung up but the other moves on, it means that the
channel that moves on will have its application data
pointing at freed memory.

(issue ASTERISK-20335)
Reported by: aragon
........

Merged revisions 372840 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372841 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-11 21:08:55 +00:00
David M. Lee
1de5189762 Corrects the astsbindir setting when installing the sample asterisk.conf.
(closes issue ASTERISK-20406)
........

Merged revisions 372863 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-11 17:16:01 +00:00
Kinsey Moore
b7aa658cf9 Ensure iax2 debug output is displayed when expected
When IAX2 debug was changed from iax_showframe to iax_outputframe,
some instances were missed (or added afterward). This was causing
debug output to not be displayed when expected.

(closes issue ASTERISK-20338)
Reported-by: John Covert
Patch-by: John Covert
........

Merged revisions 372804 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372805 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-10 20:59:09 +00:00
Kinsey Moore
05cccdea8c Deprecate chan_gtalk, chan_jingle, and res_jabber
chan_gtalk, chan_jingle, and res_jabber are now deprecated in favor of
using chan_motif and res_xmpp. They are a feature-equivalent
replacement and are written to be more easily maintainable.

(closes issue ASTERISK-20298)
Review: https://reviewboard.asterisk.org/r/2082/
Reported-by: Leif Madsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-10 19:48:22 +00:00
David M. Lee
95563e7890 res_rtp_asterisk: Eliminate "type-punned pointer" build warning.
Removes "res_rtp_asterisk.c:706: warning: dereferencing type-punned pointer
will break strict-aliasing rules" warning from the build on 32-bit platforms.

The problem is that 'size' was referenced aliased to both (pj_size_t *) and
(pj_ssize_t *). Now just make a copy of size that is the right type so there
isn't any pointer aliasing happening.

It also adds comments and asserts regarding what looks like an inappropriate
use of pj_sock_sendto, but is actually totally fine.

(closes issue ASTERISK-20368)
Reported by: Shaun Ruffell
Tested by: Michael L. Young
Patches:
  0001-res_rtp_asterisk-Eliminate-type-punned-pointer-build.patch uploaded by Shaun Ruffell (license 5417)
    slightly modified by David M. Lee.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-10 19:19:50 +00:00
Jonathan Rose
f1a70f36b6 app_meetme: Document that 'p' option will continue in dialplan.
(closes issue AST-991)
Reported by John Bigelow
........

Merged revisions 372765 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372767 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-10 18:50:27 +00:00
Kinsey Moore
23e4a2e7c6 Recorded merge of revisions 372764 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Warn on CLI when UDPTL init fails

This adds a CLI warning when a SDP offer is rejected due to UDPTL
initialization failure. Previously, there was no indication of the
reason for offer rejection in this case.

(closes issue ASTERISK-20357)
Reported-by: Francesco Usseglio Gaudi
........

Merged revisions 372763 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-10 18:37:41 +00:00
Jonathan Rose
6f75f38287 Masquerade: Retain parkinglot settings made by CHANNEL function.
Prior to this patch, the user would have a parkinglot set on a channel that
was parked and when the channel was retrieved, any attempt by that channel
to park would simply use the default. This patch makes parkinglot values
set in this way be retained through the masquerade.

(closes issue AST-990)
Reported by: Nick Huskinson
Patches:
    masquerade_parkinglot_patch.diff Uploaded by Jonathan Rose (license 6182)
........

Merged revisions 372736 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372737 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-10 17:33:22 +00:00
Matthew Jordan
0067aba7e8 Only re-create an SRTP session when needed
In r356604, SRTP handling was fixed to accomodate multiple crypto keys in an
SDP offer and the ability to re-create an SRTP session when the crypto keys
changed.  In certain circumstances - most notably when a phone is put on
hold after having been bridged for a significant amount of time - the act
of re-creating the SRTP session causes problems for certain models of phones.
The patch committed in r356604 always re-created the SRTP session regardless
of whether or not the cryptographic keys changed.  Since this is technically
not necessary, this patch modifies the behavior to only re-create the SRTP
session if Asterisk detects that the remote key has changed.  This allows
models of phones that do not handle the SRTP session changing to continue
to work, while also providing the behavior needed for those phones that do
re-negotiate cryptographic keys.

(issue ASTERISK-20194)
Reported by: Nicolo Mazzon
Tested by: Nicolo Mazzon

Review: https://reviewboard.asterisk.org/r/2099
........

Merged revisions 372709 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372710 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-09 01:25:18 +00:00
David M. Lee
599b2166b0 Recorded merge of revisions 372695 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Add OPENSSL_INCLUDE to the CFLAGS for ssl.c and tcptls.c.

Without this flag, those files will compile with the system installed
OpenSSL headers (if they exist). This is a real bummer if a different
path was specified using --with-ssl=

(closes issue ASTERISK-20392)
........
Merged revisions 372682 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-08 05:51:48 +00:00
Richard Mudgett
744642c286 Fix MALLOC_DEBUG version of ast_strndup().
(closes issue ASTERISK-20349)
Reported by: Brent Eagles
........

Merged revisions 372655 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372656 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-07 23:07:49 +00:00
Richard Mudgett
b9479a9e83 Remove annoying unconditional debug message from INC/DEC functions.
(closes issue AST-1001)
Reported by: Guenther Kelleter
........

Merged revisions 372628 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372629 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-07 22:09:32 +00:00
Richard Mudgett
84bf4776f2 Fix exception path typo in app_queue.c try_calling().
(closes issue ASTERISK-20380)
Reported by: Jeremy Pepper
Patches:
      fix-local-channel-locking.patch (license #6350) patch uploaded by Jeremy Pepper
........

Merged revisions 372624 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372625 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-07 21:50:30 +00:00
Richard Mudgett
8e471b4991 Fix VoicemailUserEntry event headers ServerEmail and MailCommand reported values.
The AMI action VoicemailUsersList VoicemailUserEntry event headers
ServerEmail and MailCommand did not report the global values if they were
not overridden.  The VoicemailUserEntry event header ServerEmail was not
populated with the global value if the voicemail user did not override it.
The VoicemailUserEntry event header MailCommand was never populated with a
value.

* Removed unused struct ast_vm_user member mailcmd[].

(closes issue AST-973)
Reported by: John Bigelow
Tested by: rmudgett
........

Merged revisions 372620 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372621 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-07 21:27:56 +00:00
David M. Lee
d67ae97ac2 svn:ignore cleanup.
* pjproject bin and lib directories should pretty much ignore everything
* Ignore *.o in codecs/ilbc


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-07 21:04:08 +00:00
David M. Lee
a619858d62 Fix parallel make for res_asterisk_rtp.
Fixes a build regression introduced in r369517 "Add support for ICE/STUN/TURN
in res_rtp_asterisk and chan_sip." [1].

[1] http://svnview.digium.com/svn/asterisk?view=revision&revision=369517

When compiling asterisk in parallel like:
    $ make -j 10

It's possible to get errors like the following:

    .pjlib-util-test-x86_64-unknown-linux-gnu.depend:120: *** missing separator.  Stop.
    make[4]: *** [depend] Error 2
    make[3]: *** [dep] Error 1
    make[2]: *** [/home/sruffell/asterisk-working/res/pjproject/pjnath/lib/libpjnath-x86_64-unknown-linux-gnu.a] Error 2
    make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

This is because the build system is trying to build each of the libraries in
pjproject in parallel. Now the build will build pjproject in a single job and
link the results into res_asterisk_rtp.

Parallel builds, on one test system, saves ~1.5 minutes from a default Asterisk
build:

Single job:
    $ git clean -fdx >/dev/null && time ( ./configure >/dev/null 2>&1 && make >/dev/null 2>&1 )

    real    2m34.529s
    user    1m41.810s
    sys     0m15.970s

Parallel make:
    $ git clean -fdx >/dev/null && time ( ./configure >/dev/null 2>&1 && make -j10 >/dev/null 2>&1 )

    real    1m2.353s
    user    2m39.120s
    sys     0m18.850s

(closes issue ASTERISK-20362)
Reported by: Shaun Ruffel
Patches:
    0001-res_asterisk_rtp-Fix-build-error-when-using-parallel.patch uploaded by Shaun Ruffel (License #5417)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-07 20:36:08 +00:00
Matthew Jordan
9af488e8a8 Free ast_str objects when temp file fails to be created in MiniVM
The previous commit (r372554) was from a patch that was written before
r366880, which ensured that ast_str objects allocated in the sendmail
routine were free'd in off nominal paths.  This commit frees the
string objects in the off nominal path introduced in r372554.

(issue ASTERISK-17133)
Reported by: Tzafrir Cohen
........

Merged revisions 372581 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372582 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-07 02:26:40 +00:00
Matthew Jordan
f356dcf7e4 Fix file descriptor leak and pointer scope issue in MiniVM when sending mail
When MiniVM sends an e-mail and it has the volgain option set, it will spawn
sox in a separate process to handle the manipulation of the sound file.  In
doing so, it creates a temporary file.  There are two problems here:
  1) The file descriptor returned from mkstemp is leaked
  2) The finalfilename character pointer points to a buffer that loses scope
     once volgain processing is finished.

Note that in r316265, Russell fixed some gcc warnings by using the return
value of the mkstemp call.  A warning was placed in minivm that the file
descriptor was going to be leaked.  This patch reverts that change, as it
handles the leak and 'uses' the file descriptor returned from mkstemp.

(closes issue ASTERISK-17133)
Reported by: Tzafrir Cohen
patches:
  minivm_18501_demo.diff uploaded by Tzafrir Cohen (license #5035)
........

Merged revisions 372554 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372555 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-07 02:14:24 +00:00
Matthew Jordan
46df746df0 Update QueueMemberStatus event documentation to include member status values
The Status: header in a QueueMemberStatus event (and other QueueMember* events)
is the numeric value of the device state corresponding to that Queue Member.
As those values are not exactly obvious, listing them in the documentation is
useful.

Matt Riddell reported this indirectly through the wiki page.

(closes issue ASTERISK-20243)
Reported by: Matt Riddell



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-06 22:19:22 +00:00
Richard Mudgett
1af1164d43 Fix loss of MOH on an ISDN channel when parking a call for the second time.
Using the AMI redirect action to take an ISDN call out of a parking lot
causes the MOH state to get confused.  The redirect action does not take
the call off of hold.  When the call is subsequently parked again, the
call no longer hears MOH.

* Make chan_dahdi/sig_pri restart MOH on repeated AST_CONTROL_HOLD frames
if it is already in a state where it is supposed to be sending MOH.  The
MOH may have been stopped by other means.  (Such as killing the generator.)

This simple fix is done rather than making the AMI redirect action post an
AST_CONTROL_UNHOLD unconditionally when it redirects a channel and thus
potentially breaking something with an unexpected AST_CONTROL_UNHOLD.

(closes issue ABE-2873)
Patches:
      jira_abe_2873_c.3_bier.patch (license #5621) patch uploaded by rmudgett
........

Merged revisions 372521 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

Merged revisions 372522 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-06 22:12:46 +00:00
Kinsey Moore
a90717e566 Ensure listed queues are not offered for completion
When using tab-completion for the list of queues on "queue reset stats"
or "queue reload {all|members|parameters|rules}", the tab-completion
listing for further queues erroneously listed queues that had already
been added to the list. The tab-completion listing now only displays
queues that are not already in the list.

(closes issue AST-963)
Reported-by: John Bigelow
........

Merged revisions 372517 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372518 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-06 21:42:35 +00:00
Darren Sessions
909248b763 LDAP Realtime Peers Cannot Register
Prior to 1.8, it was not necessary for an explicit "type" to be set for an
asterisk LDAP realtime peer. Now the routine find_peer actually checks the
type field during registration and fails to find the peer if it is not set.

The attached patches make the realtime type equal whatever type is being 
searched for if the type is 0 upon return from routine build_peer. 

(closes issue ASTERISK-17222)
Reported by: John Covert
Patch by: David Vossel
Tested by: Darren Sessions

Review: https://reviewboard.asterisk.org/r/2095/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-06 18:55:09 +00:00
Jonathan Rose
52dea0c7d1 chan_sip: Note change in behavior to how directmediapermit/deny ACL works
r366547 introduced a change to the directmedia ACL for chan_sip which
modified the behavior significantly. Prior to the patch, this option would
bridge peers with directmedia if a peer's IP address matched its own
directmedia ACL. After that patch, the peer would check the bridged peer's
ACL instead. This change has been present since 1.8.14.0. That patched failed
to document the change in Upgrade.txt, so this patch adds mention of that
change to UPGRADE.txt (UPGRADE-1.8.txt in newer branches)

(issue AST-876)
........

Merged revisions 372471 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372472 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-06 15:56:10 +00:00
Kinsey Moore
cc8037b3d4 Ensure "rules" is tab-completable for "queue show"
Previously, tabbing at the end of "queue show" produced a list of
available queues about which information could be shown, but did not
include an alternative command, "rules", to access information about
queue rules. The "rules" item should now be shown in the list of
tab-completable items.

(closes issue AST-958)
Reported-by: John Bigelow
........

Merged revisions 372444 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372445 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-06 14:30:32 +00:00
Matthew Jordan
b763dc9809 Fix DUNDi message routing bug when neighboring peer is unreachable
Consider a scenario where DUNDi peer PBX1 has two peers that are its neighbors,
PBX2 and PBX3, and where PBX2 and PBX3 are also neighbors.  If the connection
is temporarily broken between PBX1 and PBX3, PBX1 should not include PBX3 in
the list of peers it sends to PBX2 in a DPDISCOVER message, as it cannot send
messages to PBX3.  If it does, PBX2 will assume that PBX3 already received the
message and fail to forward the message on to PBX3 itself.  This patch fixes
this by only including peers in a DPDISCOVER message that are reachable by the
sending node.  This includes all peers with an empty address
(00:00:00:00:00:00) and that are have been reached by a qualify message.

This patch also prevents attempting to qualify a dynamic peer with an empty
address until that peer registers.

The patch uploaded by Peter was modified slightly for this commit.

(closes issue ASTERISK-19309)
Reported by: Peter Racz
patches:
  dundi_routing.patch uploaded by Peter Racz (license 6290)

........

Merged revisions 372417 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372418 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-06 02:50:34 +00:00
Matthew Jordan
1a74d44bf1 Allow configured numbers for FollowMe to be greater than 90 characters
When parsing a 'number' defined in followme.conf, FollowMe previously parsed
the number in the configuration file into a buffer with a length of 90
characters.  This can artificially limit some parallel dial scenarios.  This
patch allows for numbers of any length to be defined in the configuration
file.

Note that Clod Patry originally wrote a patch to fix this problem and received
a Ship It! on the JIRA issue.  The patch originally expanded the buffer to 256
characters.  Instead, the patch being committed duplicates the string in the
config file on the stack before parsing it for consumption by the application.

(closes issue ASTERISK-16879)
Reported by: Clod Patry
Tested by: mjordan
patches:
  followme_no_limit.diff uploaded by Clod Patry (license #5138)

Slightly modified for this commit.
........

Merged revisions 372390 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372391 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-06 00:59:23 +00:00
Richard Mudgett
bdb2361549 Fix compile error.
........

Merged revisions 372372 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 19:43:45 +00:00
Kinsey Moore
9d76b40877 Correct documentation for ModuleLoad AMI action
The documentation incorrectly listed 'rtp' as a reloadable subsystem
and left out many other reloadable subsystems. It is now also
documented that subsystems may only be reloaded, not loaded or
unloaded.

(closes issue AST-977)
Reported-by: John Bigelow
........

Merged revisions 372354 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372358 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 19:24:13 +00:00
Alec L Davis
f37b06b8c9 dsp.c: in ast_mf_detect_init incorrectly sets goertzel samples to 160, should be MF_GSIZE
Related https://reviewboard.asterisk.org/r/2097/
........

Merged revisions 372339 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372341 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 18:46:07 +00:00
Kinsey Moore
7716846ae1 Ensure counts generated in manager_show_dialplan_helper are correct
When manager_show_dialplan_helper was written, the counter increment
for the total number of contexts was placed with the extensions
increment instead of in the enclosing loop.  This function should
now generate correct context counts.

(closes issue AST-970)
Reported-by: John Bigelow
........

Merged revisions 372337 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372338 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 18:36:44 +00:00
Richard Mudgett
fa3858d8a7 Fix coding guidelines issue with a recent commit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 17:35:20 +00:00
Richard Mudgett
9be64d2286 Fix RTP/RTCP read error message confusion.
The RTP/RTCP read error message can report "fail: success" when the
read failure is because of an ICE failure.

* Changed __rtp_recvfrom() to generate a PJ ICE message when ICE fails.

* Changed RTP/RTCP read error message to indicate an unspecified error
when errno is zero.

(closes issue ASTERISK-20288)
Reported by: Joern Krebs
Patches:
      jira_asterisk_20288_err_msg.patch (license #5621) patch uploaded by rmudgett (modified)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 17:33:11 +00:00
Mark Michelson
3f6a00ae36 Re-fix sending unnegotiated payloads during a P2P RTP bridge.
The previous fix still would look in the static_RTP_PT table, which
is inappropriate since we specifically want to find a codec that has
been negotiated.

(closes issue ASTERISK-20296)
reported by NITESH BANSAL
Patches:
	codec_negotiation.patch Uploaded by NITESH BANSAL (License #6418)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 16:04:40 +00:00
Matthew Jordan
99b60d3434 Fix memory leaks in app_voicemail when using IMAP storage or realtime config
This patch fixes two memory leaks:

1. When find_user is called with NULL as its first parameter, the voicemail
   user returned is allocated on the heap.  The inboxcount2 function uses
   find_user in such a fashion when counting new messages, and fails to free
   the resulting voicemail user object.

2. When populate_defaults is called on a voicemail user, it wipes whatever
   flags have been set on the object by copying over the global flags object.
   If the VM_ALLOCED flag was ste on the voicemail user prior to doing so,
   that flag is removed.  This leaks the voicemail user when free_user is later
   called.

(closes issue ASTERISK-19155)
Reported by: Filip Jenicek
patches:
  asterisk.patch2 uploaded by Filip Jenicek (license 6277)

Patch slightly modified for this commit.

Review: https://reviewboard.asterisk.org/r/2096
........

Merged revisions 372268 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372288 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 13:47:31 +00:00
Michael L. Young
47c552b40f Fix breakage caused by last merge. Missing a variable for 11 and trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 12:17:48 +00:00
Alec L Davis
34a332ef35 dsp.c: Fix multiple issues when no-interdigit delay is present, and fast DTMF 50ms/50ms
Revert DTMF hit/miss detector to original -r349249 method with some changes, remove unnecessary;
  1. reseting of hits=0, when no signal, only need to set it once.
  2. incrementing of hits, when the hit is the same as the current hit.
  3. setting of lasthit, when it's the same as before.

Change HITS_TO_BEGIN to 2, MISSES_TO_END to 3

& 3 spelling mistakes

(closes issue ASTERISK-19610)
alecdavis (license 585)
Reported by: Jean-Philippe Lord
Tested by: alecdavis
 
Review: https://reviewboard.asterisk.org/r/2085/
........

Merged revisions 372239 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372240 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 07:41:10 +00:00
Alec L Davis
e225712ae5 dsp.c: optimize goerztzel sample loops, in dtmf_detect, mf_detect and tone_detect
use a temporary short int when repeatedly used to call goertzel_sample.

alecdavis (license 585)
Reported by: alecdavis
Tested by: alecdavis
 
Review: https://reviewboard.asterisk.org/r/2093/
........

Merged revisions 372212 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372213 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 06:50:15 +00:00
Michael L. Young
b9bdea7105 Fix Incrementing Sequence Number For Retransmitted DTMF End Packets
In Asterisk 1.4+, a fix was put in place to increment the sequence number for
retransmitted DTMF end packets.  With the introduction of the RTP engine API in
1.8, the sequence number was no longer being incremented.  This patch fixes this
regression as well as cleans up a few lines that were not doing anything.

(closes issue ASTERISK-20295)
Reported by: Nitesh Bansal
Tested by: Michael L. Young
Patches: 
01_rtp_event_seq_num.patch uploaded by Nitesh Bansal (license 6418)
asterisk-20295-dtmf-fix-cleanup.diff uploaded by Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2083/
........

Merged revisions 372185 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372198 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 04:52:10 +00:00
Matthew Jordan
20ef80a8b4 Fix memory leak when CEL is successfully written to PostgreSQL database
PQClear is not called when the result object of a call to PQExec has a
status of PGRES_COMMAND_OK.  Interestingly enough, the off nominal case was
handled properly, so this memory leak only occurred when CEL records were
successfully written.

This patch properly clears the result in the nominal code path.

(closes issue ASTERISK-19991)
Reported by: Etienne Lessard
Tested by: Etienne Lessard
patches:
  mem_leak_cel_pgsql.patch uploaded by Etienne Lessard (license #6394)
........

Merged revisions 372158 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372165 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 02:25:22 +00:00
Mark Michelson
d649550d23 Fix issue where SIP devices were not notified when custom devices changed to "ringing".
The problem had to do with logic used when checking for what the oldest ringing channel
was. The problem was that if no channel was found, then no notification would be sent.
For custom device states, there is no associated channel, so no notification would get
sent. This fixes the issue by still sending the notification even if no associated
channel can be found for a ringing device state change.

(closes issue ASTERISK-20297)
Reported by Noah Engelberth



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-04 15:48:28 +00:00
Mark Michelson
2dba1e5c58 Prevent crash from using app_page with no confbridge.conf file provided.
Also prevents other potential crashes when using aco API
with uninitialized aco_info structs.

(closes issue ASTERISK-20305)
reported by Noah Engelberth
Tested by Noah Engelberth

Review: https://reviewboard.asterisk.org/r/2086



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-04 15:26:07 +00:00
Mark Michelson
57881c8dd9 Prevent local RTP bridges from sending inappropriate formats to participants.
A change for Asterisk 11 caused a check for failure to incorrectly check the return
value. This resulted in the possibility of transmitting media that a party had not
negotiated. If this media happened to be G.729, then this could potentially result
in one-way audio if no G.729 translators are installed.

(closes issue ASTERISK-20296)
reported by NITESH BANSAL



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-31 21:14:30 +00:00
Mark Michelson
cd3caa1a36 Prevent crash on shutdown due to refcount error on queues container.
When app_queue is unloaded, the queues container has its refcount
decremented, potentially to 0. Then the taskprocessor responsible
for handling device state changes is unreferenced. If the
taskprocessor happens to be just about to run its task, then it
will create and destroy an iterator on the queues container.
This can cause the refcount on the queues container to increase to
1 and then back to 0. Going back to 0 a second time results in
double frees.

This failure was seen periodically in the testsuite when Asterisk
would shut down.
........

Merged revisions 372089 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372090 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30 20:54:06 +00:00
Mark Michelson
6256c7193b Help prevent ringing queue members from being rung when ringinuse set to no.
Queue member status would not always get updated properly when the member
was called, thus resulting in the member getting multiple calls. With this
change, we update the member's status at the time of calling, and we also
check to make sure the member is still available to take the call before
placing an outbound call.

(closes issue ASTERISK-16115)
reported by nik600
Patches:
	app_queue.c-svn-r370418.patch uploaded by Italo Rossi (license #6409)
........

Merged revisions 372048 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372049 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30 18:37:29 +00:00
Matthew Jordan
b40c4649f2 AST-2012-013: Resolve ACL rules being ignored during calls by some IAX2 peers
When an IAX2 call is made using the credentials of a peer defined in a dynamic
Asterisk Realtime Architecture (ARA) backend, the ACL rules for that peer are
not applied to the call attempt. This allows for a remote attacker who is aware
of a peer's credentials to bypass the ACL rules set for that peer.

This patch ensures that the ACLs are applied for all peers, regardless of their
storage mechanism.

(closes issue ASTERISK-20186)
Reported by: Alan Frisch
Tested by: mjordan, Alan Frisch


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30 16:24:43 +00:00
Matthew Jordan
d6fb2b90b7 Block r372020
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30 16:23:33 +00:00
Matthew Jordan
9e853ed652 AST-2012-012: Resolve AMI User Unauthorized Shell Access through ExternalIVR
The AMI Originate action can allow a remote user to specify information that can
be used to execute shell commands on the system hosting Asterisk. This can
result in an unwanted escalation of permissions, as the Originate action, which    
requires the "originate" class authorization, can be used to perform actions
that would typically require the "system" class authorization. Previous attempts
to prevent this permission escalation (AST-2011-006, AST-2012-004) have sought
to do so by inspecting the names of applications and functions passed in with
the Originate action and, if those applications/functions matched a predefined
set of values, rejecting the command if the user lacked the "system" class
authorization. As noted by IBM X-Force Research, the "ExternalIVR"
application is not listed in the predefined set of values. The solution for     
this particular vulnerability is to include the "ExternalIVR" application in the
set of defined applications/functions that require "system" class authorization.             
          
Unfortunately, the approach of inspecting fields in the Originate action against
known applications/functions has a significant flaw. The predefined set of
values can be bypassed by creative use of the Originate action or by certain
dialplan configurations, which is beyond the ability of Asterisk to analyze at
run-time. Attempting to work around these scenarios would result in severely         
restricting the applications or functions and prevent their usage for legitimate
means. As such, any additional security vulnerabilities, where an
application/function that would normally require the "system" class
authorization can be executed by users with the "originate" class authorization,
will not be addressed. Instead, the README-SERIOUSLY.bestpractices.txt file has
been updated to reflect that the AMI Originate action can result in commands
requiring the "system" class authorization to be executed. Proper system
configuration can limit the impact of such scenarios.         
          
(closes issue ASTERISK-20132)
Reported by: Zubair Ashraf of IBM X-Force Research
........

Merged revisions 371998 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371999 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30 16:07:43 +00:00
Matthew Jordan
35c91bcc40 Restore CODING-GUIDELINES to doc folder
In r294740, the CODING-GUIDELINES was removed from the doc folder in favor
of the content on the Asterisk wiki.  Some folks still look in the doc folder
initially for coding guideline suggestions; as such, this patch adds a
CODING-GUIDELINES file back into the doc folder.  The content of the file
merely points to the correct page on the Asterisk wiki where the coding
guidelines currently live.

(closes issue ASTERISK-20279)
Reported by: Andrew Latham
Patches:
  CODING-GUIDELINES.diff uploaded by Andrew Latham (license 5985)
........

Merged revisions 371961 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371962 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30 12:49:17 +00:00
Richard Mudgett
52e48b8926 Fix compile errors.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29 22:38:54 +00:00
Jonathan Rose
cf08fe11f8 app_meetme: Adding test events for following activity in MeetMe.
........

Merged revisions 371919 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371920 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29 21:07:42 +00:00
Richard Mudgett
33f38be40f Fix theoretical compile error with HAVE_EPOLL.
Really shows how much epoll is used since it had not been reported yet.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29 19:56:14 +00:00
Richard Mudgett
127163938d Initialize file descriptors for dummy channels to -1.
Dummy channels usually aren't read from, but functions like SHELL and CURL
use autoservice on the channel.

(closes issue ASTERISK-20283)
Reported by: Gareth Palmer
Patches:
      svn-371580.patch (license #5169) patch uploaded by Gareth Palmer (modified)
........

Merged revisions 371888 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371890 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29 19:45:38 +00:00
Richard Mudgett
b7bb04e7dc Fix hangup cause passthrough regression.
The v1.8 -r369258 change to fix the F and F(x) action logic introduced a
regression in passing the hangup cause from the called channel to the
caller channel.

(closes issue ASTERISK-20287)
Reported by: Konstantin Suvorov
Patches:
      app_dial_hangupcause.patch (license #6421) patch uploaded by Konstantin Suvorov (modified)
Tested by: rmudgett
........

Merged revisions 371860 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371861 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29 18:32:35 +00:00
Jonathan Rose
862adf23cf chan_sip: Send 408 on retransmit timeout instead of 603
(closes issue ASTERISK-20124)
Reported by: Walter Doekes
........

Merged revisions 371824 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371825 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29 17:25:19 +00:00
Mark Michelson
cb85c66baf Fix misleading documentation in agents.conf.sample regarding ackcall usage.
The documentation made it sound as if the DTMF acknowledgment was needed
at the time the agent logs in, rather than when the agent is called. This
is likely a relic from the days when there were multiple ways of logging
in agents.

(closes issue AST-962)
reported by Steve Pitts
........

Merged revisions 371787 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371789 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27 21:50:42 +00:00
Mark Michelson
29bda732a8 Fix incorrect documentation of the MailboxStatus manager command.
The "Waiting" field was misdocumented as reporting the number of
messages waiting. In reality, it simply indicated the presence or
absence of waiting messages.
........

Merged revisions 371782 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371783 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27 21:31:37 +00:00
David M. Lee
cc2171a003 svn:ignore pjproject bin & output for all platforms.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27 18:14:50 +00:00
Mark Michelson
adbadf6253 Fix incorrectly documented option in queues.conf
sharedlastcall defaults to "no" not "yes"

(closes issue AST-979)
reported by Steve Pitts
........

Merged revisions 371747 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371748 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27 17:51:25 +00:00
Mark Michelson
50d55266a1 Re-add merge and block properties.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27 17:49:57 +00:00
David M. Lee
8a2234472b Fixes ast_rwlock_timed[rd|wr]lock for BSD and variants.
The original implementations simply wrap pthread functions, which take
absolute time as an argument. The spinlock version for systems without
those functions treated the argument as a delta. This patch fixes the
spinlock version to be consistent with the pthread version.

(closes issue ASTERISK-20240)
Reported by: Egor Gorlin
Patches:
	lock.c.patch uploaded by Egor Gorlin (license 6416)
........

Merged revisions 371718 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27 16:55:39 +00:00
Kinsey Moore
a97c6e85f8 Implement workaround for BETTER_BACKTRACES crash
When compiling with BETTER_BACKTRACES enabled, Asterisk will sometimes
crash when "core show locks" is run. This happens regularly in the
testsuite since several tests run "core show locks" to help with
debugging. This seems to be a fault with libraries on certain operating
systems (notably CentOS 6.2/6.3) running on virtual machines and
utilizing gcc 4.4.6.

(closes issue ASTERISK-20090)
........

Merged revisions 371690 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371691 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27 14:07:12 +00:00
Alec L Davis
2994f7ff41 mf_detect: incorrectly used DTMF_GSIZE instead of MF_GSIZE
........

Merged revisions 371662 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371663 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-26 23:07:57 +00:00
Joshua Colp
266d2cb75b Add support for call-id logging to chan_motif.
Review: https://reviewboard.asterisk.org/r/2077/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-22 15:54:18 +00:00
Mark Michelson
ff4674440d Fix misuses of asprintf throughout the code.
This fixes three main issues

* Change asprintf() uses to ast_asprintf() so that it
pairs properly with ast_free() and no longer causes
MALLOC_DEBUG to freak out.

* When ast_asprintf() fails, set the pointer NULL if
it will be referenced later.

* Fix some memory leaks that were spotted while taking
care of the first two points.

(Closes issue ASTERISK-20135)
reported by Richard Mudgett

Review: https://reviewboard.asterisk.org/r/2071
........

Merged revisions 371590 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371591 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-21 20:54:19 +00:00
Mark Michelson
d131f3985a Use thread-local storage to store pj_thread_descs.
pj_thread_register() takes a parameter of type pj_thread_desc.
It was assumed that pj_thread_register either used this item
temporarily or made a copy of it. Unfortunately, all it does is
keep a pointer to the structure in thread-local storage. This
means that if our pj_thread_desc goes out of scope, then pjlib
will be referencing bogus data quite often, most commonly on
operations involving a pj_mutex_t.

In our case, our pj_thread_desc was on the stack and went out
of scope very shortly after registering our thread with pjlib.
With this change, the pj_thread_desc is stored in thread-local
storage so the pointer that pjlib keeps in thread-local storage
will reference legitimate memory.

(closes issue ASTERISK-20237)
reported by Jeremy Pepper
Patches:
	ASTERISK-20237.patch uploaded by Mark Michelson (license #5049)
Tested by Jeremy Pepper



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-20 20:09:13 +00:00
Kinsey Moore
3f789aa865 Ignore recovered zero-length secondary UDPTL packets
In some cases, recovering lost packets using the secondary packet
recovery mechanism with UDPTL/T.38 can result in the recovery of
zero-length packets. These must be ignored or the frame generated from
them can cause segfaults and allocation failures.

(closes issue ASTERISK-19762)
(closes issue ASTERISK-19373)
Reported-by: Benjamin (bulkorok)
Reported-by: Rob Gagnon (rgagnon)
........

Merged revisions 371544 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371545 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-20 15:34:40 +00:00
Matthew Jordan
73755ee4c2 Recorded merge of revisions 371529 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Remove old debug code from http configuration loading

(closes issue ASTERISK-20254)
Reported by: Andrew Latham
Patches:
  http.diff uploaded by Andrew Latham (license #5985)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-18 02:35:32 +00:00
Matthew Jordan
80900ac680 Remove old debug code from http configuration loading
(closes issue ASTERISK-20254)
Reported by: Andrew Latham
Patches:
  http.diff uploaded by Andrew Latham (license #5985)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-18 02:08:48 +00:00
Matthew Jordan
85084f390a Fix typo in JabberSend that looked for '2' instead of '@' in recipient argument
The summary says about all there is to say.

(closes issue ASTERISK-20239)
Reported by: Gregory Porras



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-18 01:59:51 +00:00
Matthew Jordan
b86c036cd8 Make the name of the "HangupCauseClear" application consistent
The name of the "HangupCauseClear" application is "HangupCauseClear",
not "HangupcauseClear".  The incorrect case of 'cause' caused the
XML documentation to not register properly.

As an aside, this commit message felt very awkward, but I'm not sure
how else to note that "X", which has to be "X", was referred to as "x".

(closes issue ASTERISK-20253)
Reported by: Andrew Latham
Patches:
  hangupcause.diff uploaded by Andrew Latham (license #5985)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-18 01:34:12 +00:00
Matthew Jordan
999d44a199 Update module support level on a variety of modules and compiler options
Some core support modules and compiler options were no longer tagged with a
module support level.  This patch adds 'core' back to those options.

Note that this patch modifies a few of the patches provided by Andrew Latham
slightly.  res_curl and res_fax are both 'core' supported modules.

(closes issue ASTERISK-20215)
Reported by: Andrew Latham
Tested by: mjordan
Patches:
  astcanary.diff (license #5985) uploaded by Andrew Latham
  cflagsxml.diff (license #5985) uploaded by Andrew Latham
  curl_fax.diff (license #5985) uploaded by Andrew Latham
  soundsxml.diff (license #5985) uploaded by Andrew Latham




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-18 01:08:03 +00:00
Matthew Jordan
099107b0aa Fix memory leak in XML documentation
When formatting documentation fields, the XML documentation parser calls
xmldoc_get_formatted.  This function allocates a string buffer at the
beginning of its routine.  Unfortunately, on certain code paths, it also
calls xmldoc_string_cleanup, which assumes that it will create the string
buffer.  The previously allocated string buffer is then leaked by the
xmldoc_string_cleanup routine.

Now: we don't do that.

(closes issue AST-932)
Reported by: Alexander Homig
........

Merged revisions 371469 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371491 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-17 20:22:56 +00:00
Joshua Colp
ef1f1b16a8 When a peer registers using WebSocket do not resolve the Contact provided.
(closes issue ASTERISK-20238)
Reported by: james.mortensen


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-17 19:49:29 +00:00
Kinsey Moore
33c2ee2e90 Add instrumentation to subsystem reloads
When Asterisk is built with TEST_FRAMEWORK defined, Asterisk will now
generate TestEvent AMI events on subsystem reloads such as cdr, dnsmgr,
extconfig, etc.

(issue PQ-1126)
........

Merged revisions 371436 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371437 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-17 15:58:25 +00:00
Joshua Colp
bda007b5c2 Add some additional H.264 attributes, "max-smbps" and "max-fps", for passthrough.
(closes issue ASTERISK-20206)
Reported by: ddkprog
Patches:
     res_format_attr_h264.c.diff uploaded by ddkprog (license 6008)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-17 12:24:55 +00:00
Russell Bryant
c9cf719b36 rtp: Ensure defaults are set without rtp.conf.
While building up a new install to test chan_motif, I ran into a failure
due to icesupport being disabled.  This was due to me not having an
rtp.conf.  It was intended in the code for it to be enabled by default,
but it was only applied if rtp.conf existed.

This patch updates res_rtp_asterisk to be consistent in how it handles
defaults.  A few options didn't have their default values set globally,
including icesupport.  They are now set and icesupport is enabled by
default, even if you do not have an rtp.conf.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-17 12:23:57 +00:00
Terry Wilson
ed2b01f301 Handle integer over/under-flow in ast_parse_args
The strtol family of functions will return *_MIN/*_MAX on overflow. To
detect when an overflow has happened, errno must be set to 0 before
calling the function, then checked afterward.

(closes issue ASTERISK-20120)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2073/
........

Merged revisions 371392 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371398 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-16 23:02:46 +00:00
Kinsey Moore
94bbcafcd2 Add module reload instrumentation for TEST_FRAMEWORK
This adds AMI events for module reloads when Asterisk is built with
TEST_FRAMEWORK enabled and corrects generation of the module load AMI
event.

(issue PQ-1126)
........

Merged revisions 371393 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371394 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-16 22:44:17 +00:00
Jonathan Rose
cf9265008d chan_sip: Use pvt outgoing_call variable to set Remote-Party-ID Header
Previously the pvt SIP_OUTGOING flag was used instead, which will frequently
flip during reinvites.

(closes issue AST-897)
Reported by: Thomas Arimont
........

Merged revisions 371357 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371358 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-16 19:43:45 +00:00
Jonathan Rose
80ee807c13 chan_sip: Trigger reinvite if the SDP answer is included in the SIP ACK
Under certain conditions, a SIP transaction involving directmedia wouldn't
trigger a re-invite because the SDP answer was included in an ACK instead
of in a message that we would have triggered the invite with. This patch
just queues a source change control frame if the dialog is using
directmedia when we find sdp for an ACK.

(closes issue AST-913)
Reported by: Thomas Arimont
........

Merged revisions 371337 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371338 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-16 16:35:50 +00:00
Mark Michelson
760909af3c Fix bug where final queue member would not be removed from memory.
If a static queue had realtime members, then there could be a potential
for those realtime members not to be properly deleted from memory.

If the queue's members were loaded from realtime and then all the
members were deleted from the backend, then the queue would still
think these members existed. The reason was that there was a short-
circuit in code such that if there were no members found in the
backend, then the queue would not be updated to reflect this.

Note that this only affected static queues with realtime members.
Realtime queues with realtime members were unaffected by this issue.

(closes issue ASTERISK-19793)
reported by Marcus Haas
........

Merged revisions 371306 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371313 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-15 23:28:07 +00:00
Michael L. Young
75f68294fc Fix Segfault When Registering SIP Over WebSockets
The helper function, get_address_family_filter, in chan_sip for dns resolution
by address family was not recognizing the websockets transport and resulting in
a null pointer being sent to functions in netsock2, in an attempt to determine
if we are bound to ANY address ([::]) or not.

This patch fixes this issue by handling the transport types SIP_TRANSPORT_WS and
SIP_TRANSPORT_WSS which results in a sock address being set properly for use in
determining the address family.

(closes issue ASTERISK-20221)
Reported by: Sven Beisiegel
Tested by: Sven Beisiegel, James Mortensen
Patches: 
asterisk-20221-ws-family-filter.diff uploaded by Michael L. Young (license 5026)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-15 20:40:25 +00:00
Kinsey Moore
5add0570b5 Avoid unconditional NULLing of mwipvt on relatedpeer on SIP dialog destruction
The other instance of this bug was fixed by jcolp/file in r121496. If
we are destroying a dialog only set the MWI dialog pointer on the
related peer to NULL if it is the dialog currently being destroyed.

(closes issue ASTERISK-20119)
Patch-by: Misha Vodsedalek
........

Merged revisions 371270 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371271 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-15 20:17:00 +00:00
Kinsey Moore
d7fbceb55b Add HANGUPCAUSE information to callee channels
This adds HANGUPCAUSE information to called channels so that hangup
handlers can, in conjunction with predial dialplan execution, access
the hangupcause information when the dialed channel hangs up on a
one-to-one basis instead of a many-to-one basis as with HANGUPCAUSE
usage on the caller channel.

Review: https://reviewboard.asterisk.org/r/2069/
(closes issue ASTERISK-20198)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-15 17:52:47 +00:00
Kinsey Moore
121495f7a9 Add test instrumentation
This adds test instrumentation for loading and unloading of modules
and for certain actions in MeetMe to be used in the testsuite or any
other consumer of AMI events.  These will only be generated when
Asterisk is built with TEST_FRAMEWORK enabled.

(issue PQ-1131)
(issue PQ-1133)
........

Merged revisions 371201 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371203 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-13 20:28:31 +00:00
Mark Michelson
85a6ab78ce Fix problem where incorrect pointer was checked for nullity.
........

Merged revisions 371198 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371199 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-13 19:52:45 +00:00
Richard Mudgett
90b098d7b9 Update CHANGES for private party ID.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-10 22:03:23 +00:00
Mark Michelson
bdcdb0dc87 Fix a couple of documentation problems in app_queue.c
* The RemoveQueueMember app made mention of options that could
be passed in, but no options are supported. I have removed the
listing of options from the documentation.

* The RQMSTATUS variable did not list "NOTDYNAMIC" as a possible
value that could be set.

(closes issue AST-949)
reported by Steve Pitts

(closes issue AST-954)
reported by Steve Pitts
........

Merged revisions 371141 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371142 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-10 21:32:05 +00:00
Matthew Jordan
81abe96456 _ _ _ _ _ _
/ \   ___| |_ ___ _ __(_)___| | __ / | / |
    / _ \ / __| __/ _ \ '__| / __| |/ / | | | |
   / ___ \__  \|  | __/ |  | \__ \   <  | | | |
  /_/   \_\___/\__\___|_|  |_|___/_|\_\ |_| |_|

Because it's one greater than 10.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@371121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-10 20:08:14 +00:00
4174 changed files with 1379293 additions and 786995 deletions

View File

@@ -1,87 +0,0 @@
name: Bug
description: File a bug report
title: "[bug]: "
labels: ["bug", "triage"]
#assignees:
# - octocat
body:
- type: markdown
attributes:
value: |
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.
A good first step is for you to review the Asterisk Issue Guidelines if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the Patch Contribution Process.
Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.
Please note that by submitting data, code, or documentation to Sangoma through GitHub, you accept the Terms of Use present at
https://www.asterisk.org/terms-of-use/.
Thanks for taking the time to fill out this bug report!
- type: dropdown
id: severity
attributes:
label: Severity
options:
- Trivial
- Minor
- Major
- Critical
- Blocker
validations:
required: true
- type: input
id: versions
attributes:
label: Versions
description: Enter one or more versions separated by commas.
validations:
required: true
- type: input
id: components
attributes:
label: Components/Modules
description: Enter one or more components or modules separated by commas.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Operating Environment
description: OS, Disribution, Version, etc.
validations:
required: true
- type: dropdown
id: frequency
attributes:
label: Frequency of Occurrence
options:
- "Never"
- "One Time"
- "Occasional"
- "Frequent"
- "Constant"
- type: textarea
id: description
attributes:
label: Issue Description
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: markdown
attributes:
value: |
[Asterisk Issue Guidelines](https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines)
- type: checkboxes
id: guidelines
attributes:
label: Asterisk Issue Guidelines
options:
- label: Yes, I have read the Asterisk Issue Guidelines
required: true

View File

@@ -1,11 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Asterisk Community Support
url: https://community.asterisk.org
about: Please ask and answer questions here.
- name: Feature Requests (Without Code)
url: https://github.com/asterisk/asterisk-feature-requests/issues
about: Please submit feature requests (without code) here.
- name: Improvement Requests (Without Code)
url: https://github.com/asterisk/asterisk-feature-requests/issues
about: Please submit improvement requests (without code) here.

View File

@@ -1,27 +0,0 @@
name: Improvement
description: Submit an improvement to existing functionality
title: "[improvement]: "
labels: ["improvement", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.
A good first step is for you to review the Asterisk Issue Guidelines if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the Patch Contribution Process.
Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.
Please note that by submitting data, code, or documentation to Sangoma through GitHub, you accept the Terms of Use present at
https://www.asterisk.org/terms-of-use/.
Thanks for taking the time to fill out this bug report!
- type: textarea
id: description
attributes:
label: Improvement Description
description: Describe the improvement in as much detail as possible
validations:
required: true

View File

@@ -1,27 +0,0 @@
name: New Feature Submission
description: Submit a New Feature
title: "[new-feature]: "
labels: ["new-feature", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.
A good first step is for you to review the Asterisk Issue Guidelines if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the Patch Contribution Process.
Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.
Please note that by submitting data, code, or documentation to Sangoma through GitHub, you accept the Terms of Use present at
https://www.asterisk.org/terms-of-use/.
Thanks for taking the time to fill out this bug report!
- type: textarea
id: description
attributes:
label: Feature Description
description: Describe the new feature in as much detail as possible
validations:
required: true

View File

@@ -1,24 +0,0 @@
name: CreateDocs
on:
workflow_dispatch:
inputs:
branches:
description: "JSON array of branches: ['18','20'] (no spaces) or leave blank for all current branches."
required: false
type: string
schedule:
# Times are UTC
- cron: '0 04 * * *'
jobs:
CreateDocs:
if: ${{ ( github.event_name == 'schedule' && fromJSON(vars.WIKIDOCS_ENABLE) ) || github.event_name == 'workflow_dispatch' }}
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches || vars.WIKIDOC_BRANCHES) }}
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskCreateDocs.yml@main
with:
asterisk_repo: ${{ github.repository }}
base_branch: ${{ matrix.branch }}

View File

@@ -1,15 +0,0 @@
name: Issue Opened
run-name: "Issue ${{github.event.number}} ${{github.event.action}} by ${{github.actor}}"
on:
issues:
types: opened
jobs:
triage:
runs-on: ubuntu-latest
steps:
- name: initial labeling
uses: andymckay/labeler@master
with:
add-labels: "triage"
ignore-if-labeled: true

View File

@@ -1,11 +0,0 @@
name: NightlyAdmin
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
jobs:
NightlyAdmin:
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskNightlyAdmin.yml@main
secrets:
ASTERISKTEAM_PAT: ${{ secrets.ASTERISKTEAM_PAT }}

View File

@@ -1,25 +0,0 @@
name: NightlyTests
on:
workflow_dispatch:
inputs:
branches:
required: false
type: string
description: "Array of branches to run: ['21','master']. Defaults to NIGHTLYTEST_BRANCHES"
group_list:
required: false
type: string
description: "Array of test groups to run: ['ari1','channels']. Defaults to NIGHTLYTEST_LIST"
schedule:
# Monday-Saturday 2am
- cron: '0 2 * * 1-6'
jobs:
NightlyTests:
name: NightlyTests
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskNightlyTest.yml@main
with:
branches: ${{ inputs.branches || vars.NIGHTLYTEST_BRANCHES }}
group_list: ${{ inputs.group_list || vars.NIGHTLYTEST_LIST }}
realtime: false

View File

@@ -1,14 +0,0 @@
name: PRCPCheck
run-name: "PR ${{ github.event.number }} CPCheck by ${{ github.actor }}"
on:
pull_request_target:
types: [ labeled ]
jobs:
PRCPCheck:
name: "run-cpcheck"
if: ${{ github.event.label.name == vars.CHERRY_PICK_TEST_LABEL }}
concurrency:
group: cpcheck-${{ github.triggering_actor }}-${{ github.head_ref }}
cancel-in-progress: true
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskPRCPCheck.yml@main

View File

@@ -1,14 +0,0 @@
name: PRCheck
run-name: "PR ${{ github.event.number }} Check(${{github.event.action}}) by ${{ github.actor }}"
on:
pull_request_target:
types: [ opened, reopened, synchronize, labeled ]
jobs:
PRCheck:
name: "run-check"
if: ${{ (github.event.action != 'labeled') || (github.event.action == 'labeled' && github.event.label.name == vars.RECHECKPR_LABEL) }}
concurrency:
group: check-${{ github.triggering_actor }}-${{ github.head_ref }}
cancel-in-progress: true
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskPRCheck.yml@main

View File

@@ -1,14 +0,0 @@
name: PRMerge
run-name: "PR ${{ github.event.number }} Merge by ${{ github.actor }}"
on:
pull_request_target:
types: [ labeled ]
jobs:
PRMerge:
name: "run-merge"
if: contains(fromJSON(vars.MERGE_APPROVED_LABELS), github.event.label.name)
concurrency:
group: merge-${{ github.triggering_actor }}-${{ github.head_ref }}
cancel-in-progress: true
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskPRMerge.yml@main

View File

@@ -1,94 +0,0 @@
name: Releaser
run-name: ${{ github.actor }} is creating ${{vars.PRODUCT_NAME}} release ${{inputs.new_version}}
on:
workflow_dispatch:
inputs:
release_type:
description: |
Release Type:
required: true
type: choice
options:
- STANDARD
- SECURITY
- HOTFIX
default: STANDARD
new_version:
description: |
New Version:
Examples:
20.4.0-rc1, 20.4.0-rc2, 20.4.0, 20.4.1
certified-20.4-cert1-rc1, certified-20.4-cert1
required: true
type: string
advisories:
description: |
Comma separated list of advisories for SECURITY releases.
NO SPACES
Example: GHSA-4xjp-22g4-9fxm,GHSA-4xjp-22g4-zzzz
required: false
type: string
skip_cherry_pick:
description: |
Skip automatic cherry-pick for regular RC1 releases? USE WITH CAUTION!
required: true
type: boolean
default: false
force_cherry_pick:
description: |
Force cherry-pick for non-RC1 releases? USE WITH CAUTION!
required: true
type: boolean
default: false
skip_test_builds:
description: |
Skip test builds? USE WITH CAUTION!
required: true
type: boolean
default: false
push_release_branches:
description: |
Push release branches live?
required: true
type: boolean
default: false
create_github_release:
description: |
Create the GitHub release?
required: true
type: boolean
default: false
push_tarballs:
description: |
Push tarballs to downloads server?
required: true
type: boolean
default: false
send_email:
description: |
Send announcement emails?
required: true
type: boolean
default: false
jobs:
Releaser:
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskRelease.yml@main
with:
release_type: ${{inputs.release_type}}
new_version: ${{inputs.new_version}}
advisories: ${{inputs.advisories}}
skip_cherry_pick: ${{inputs.skip_cherry_pick}}
force_cherry_pick: ${{inputs.force_cherry_pick}}
skip_test_builds: ${{inputs.skip_test_builds}}
push_release_branches: ${{inputs.push_release_branches}}
create_github_release: ${{inputs.create_github_release}}
push_tarballs: ${{inputs.push_tarballs}}
send_email: ${{inputs.send_email}}
secrets:
gpg_private_key: ${{secrets.ASTDEV_GPG_PRIV_KEY}}
asteriskteam_gh_token: ${{secrets.ASTERISKTEAM_PAT}}
asteriskteam_email_username: ${{secrets.ASTERISKTEAM_SES_KEY_ID}}
asteriskteam_email_secret: ${{secrets.ASTERISKTEAM_SES_KEY_SECRET}}
deploy_ssh_priv_key: ${{secrets.DOWNLOADS_DEPLOY_SSH_PRIV_KEY}}
deploy_ssh_username: ${{secrets.DOWNLOADS_DEPLOY_SSH_USERNAME}}

View File

@@ -1,25 +0,0 @@
name: WeeklyTests
on:
workflow_dispatch:
inputs:
branches:
required: false
type: string
description: "Array of branches to run: ['21','master']. Defaults to NIGHTLYTEST_BRANCHES"
group_list:
required: false
type: string
description: "Array of test groups to run: ['ari1','channels']. Defaults to NIGHTLYTEST_LIST"
schedule:
# Sunday 2am
- cron: '0 2 * * 0'
jobs:
WeeklyTests:
name: WeeklyTests
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskNightlyTest.yml@main
with:
branches: ${{ inputs.branches || vars.NIGHTLYTEST_BRANCHES }}
group_list: ${{ inputs.group_list || vars.NIGHTLYTEST_LIST }}
realtime: true

40
.gitignore vendored
View File

@@ -1,40 +0,0 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
# See .gitignore in subdirectories for more ignored files
*~
*.[oadi]
*.gz
*.ii
*.oo
*.eo
*.so
*.exports
*.moduleinfo
*.makeopts
*.makedeps
.lastclean
/.pc
aclocal.m4
autom4te.cache
config.log
config.status
defaults.h
makeopts
makeopts.embed_rules
menuselect-tree
*.sha1
*.pyc
*.gcno
*.gcda
latex
doxygen.log
out/
*.orig
tests/CI/output
.develvars

1
.lastclean Normal file
View File

@@ -0,0 +1 @@
40

View File

@@ -1 +1 @@
20.18.2
11.12.0

10
BUGS
View File

@@ -1,22 +1,22 @@
Asterisk Bug Tracking Information
=================================
To learn about and report Asterisk bugs, please visit
To learn about and report Asterisk bugs, please visit
the official Asterisk Bug Tracker at:
https://github.com/asterisk/asterisk/issues/
https://issues.asterisk.org/jira
For more information on using the bug tracker, or to
For more information on using the bug tracker, or to
learn how you can contribute by acting as a bug marshal
please see:
https://docs.asterisk.org/Asterisk-Community/Asterisk-Issue-Guidelines/
http://www.asterisk.org/developers/bug-guidelines
If you would like to submit a feature request, please
resist the temptation to post it to the bug tracker.
Feature requests should be posted to the asterisk-dev
mailing list, located at:
http://lists.digium.com
http://lists.digium.com
Thank you!

2679
CHANGES Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
ChangeLogs/ChangeLog-20.18.2.html

View File

@@ -1 +0,0 @@
ChangeLogs/ChangeLog-20.18.2.md

401
CREDITS
View File

@@ -1,322 +1,255 @@
=== DEVELOPMENT SUPPORT ===
We'd like to thank the following companies for helping fund development of
Asterisk:
We'd like to thank the following companies for helping fund development of
Asterisk.
Pilosoft, Inc. - for supporting ADSI development in Asterisk
* Pilosoft, Inc. - for supporting ADSI development in Asterisk
Asterlink, Inc. - for supporting broad Asterisk development
* Asterlink, Inc. - for supporting broad Asterisk development
GFS - for supporting ALSA development
* GFS - for supporting ALSA development
Telesthetic - for supporting SIP development
* Telesthetic - for supporting SIP development
Christos Ricudis - for substantial code contributions
* Christos Ricudis - for substantial code contributions
nic.at - ENUM support in Asterisk
* nic.at - ENUM support in Asterisk
Paul Bagyenda, Digital Solutions - for initial Voicetronix driver development
* Paul Bagyenda, Digital Solutions - for initial Voicetronix driver
development.
John Todd, TalkPlus, Inc. and JR Richardson, Ntegrated Solutions. - for funding
the development of SIP Session Timers support.
* John Todd, TalkPlus, Inc. and JR Richardson, Ntegrated Solutions.
for funding the development of SIP Session Timers support.
Omnitor AB, Gunnar Hellström, for funding work with videocaps, T.140 RED,
originate with video/text and many more contributions.
* Omnitor AB, Gunnar Hellström, for funding work with videocaps,
T.140 RED, originate with video/text and many more
contributions.
ClearIT AB for work with meetme, res_mutestream, RTCP, manager and tonezones
* ClearIT AB for work with meetme, res_mutestream, RTCP, manager and
tonezones.
* NetNation Communications (www.netnation.com)
Kevin Lindsay <kevinl@netnation.com>
Persistent Dynamic Queue Members
* inAccess Networks (work funded by Hellas On Line (HOL) www.hol.gr)
Priorities in queues
* Voop AS, Nuvio Inc, Inotel S.A and Foniris Telecom A/S - funding for
rewrite of SIP transfers
=== WISHLIST CONTRIBUTORS ===
We'd like to thank the following for contributing to our wishlist
* Jeremy McNamara - SpeeX support
* Nick Seraphin - RDNIS support
* Gary - Phonejack ADSI (in progress)
* Wasim - Hangup detect
=== WISHLIST CONTRIBUTERS ===
Jeremy McNamara - SpeeX support
Nick Seraphin - RDNIS support
Gary - Phonejack ADSI (in progress)
Wasim - Hangup detect
=== HARDWARE DONORS ===
* Thanks to QuickNet Technologies for their donation of an Internet
PhoneJack and Linejack card to the project. (http://www.quicknet.net)
We'd like to thank the following for granting access to hardware for testing.
* Thanks to VoipSupply for their donation of Sipura ATAs to the project for
T.38 testing. (http://www.voipsupply.com)
* Thanks to QuickNet Technologies for their donation of an Internet
PhoneJack and Linejack card to the project.
(http://www.quicknet.net)
* Thanks to VoipSupply for their donation of Sipura ATAs to the project
for T.38 testing. (http://www.voipsupply.com)
* Thanks to Grandstream for their donation of ATAs to the project for
T.38 testing. (http://www.grandstream.com)
* Thanks to Grandstream for their donation of ATAs to the project for
T.38 testing. (http://www.grandstream.com)
=== MISCELLANEOUS PATCHES ===
Jim Dixon - Zapata Telephony and app_rpt
http://www.zapatatelephony.org/app_rpt.html
We'd like to thank the following for their patches
Russell Bryant - Asterisk release manager and countless enhancements and bug
fixes.
russell(AT)digium.com
* Jim Dixon - Zapata Telephony and app_rpt
http://www.zapatatelephony.org/app_rpt.html
Anthony Minessale II - Countless big and small fixes, and relentless forward
push. ChanSpy, ForkCDR, ControlPlayback, While/EndWhile, DumpChan, Dictate,
MacroIf, ExecIf, ExecIfTime, RetryDial, MixMonitor applications; many
realtime concepts and implementation pieces, including res_config_odbc;
format_slin; cdr_custom; several features in Dial including L(), G() and
enhancements to M() and D(); several CDR enhancements including CDR
variables; attended transfer; one touch record; native MOH; manager
eventmask; command line '-t' flag to allow recording/voicemail on nfs
shares; #exec command and multiline comments in config files; setvar in iax
and sip configs.
anthmct(AT)yahoo.com http://www.asterlink.com
* Russell Bryant - Asterisk release manager and countless enhancements
and bug fixes. russell(AT)digium.com
James Golovich - Innumerable contributions, including SIP TCP and TLS support.
You can find him and asterisk-perl at http://asterisk.gnuinter.net
* Anthony Minessale II - Countless big and small fixes, and relentless
forward push. ChanSpy, ForkCDR, ControlPlayback, While/EndWhile,
DumpChan, Dictate, MacroIf, ExecIf, ExecIfTime, RetryDial,
MixMonitor applications; many realtime concepts and
implementation pieces, including res_config_odbc; format_slin;
cdr_custom; several features in Dial including L(), G() and
enhancements to M() and D(); several CDR enhancements including
CDR variables; attended transfer; one touch record; native MOH;
manager eventmask; command line '-t' flag to allow
recording/voicemail on nfs shares; #exec command and multiline
comments in config files; setvar in iax and sip configs.
anthm(AT)signalwire.com http://www.signalwire.com
Andre Bierwirth - Extension hints and status
* James Golovich - Innumerable contributions, including SIP TCP and TLS
support. You can find him and asterisk-perl at
http://asterisk.gnuinter.net
Jean-Denis Girard - Various contributions from the South Pacific Islands
jd-girard(AT)esoft.pf http://www.esoft.pf
* Andre Bierwirth - Extension hints and status
William Jordan / Vonage - MySQL enhancements to Voicemail
wjordan(AT)vonage.com
* Jean-Denis Girard - Various contributions from the South Pacific
Islands jd-girard(AT)sysnux.pf http://www.sysnux.pf
Jac Kersing - Various fixes
* William Jordan / Vonage - MySQL enhancements to Voicemail
wjordan(AT)vonage.com
Steven Critchfield - Seek and Trunc functions for playback and recording
critch(AT)basesys.com
* Jac Kersing - Various fixes
Jefferson Noxon - app_lookupcidname, app_db, and various other contributions
* Steven Critchfield - Seek and Trunc functions for playback and
recording critch(AT)basesys.com
Klaus-Peter Junghanns - in-band DTMF on SIP and MGCP
* Jefferson Noxon - app_lookupcidname, app_db, and various other
contributions
Ross Finlayson - Dynamic RTP payload support
* Klaus-Peter Junghanns - in-band DTMF on SIP and MGCP
Mahmut Fettahlioglu - Audio recording, music-on-hold changes, alaw file
format, and various fixes. Can be contacted at mahmut(AT)oa.com.au
* Ross Finlayson - Dynamic RTP payload support
James Dennis - Cisco SIP compatibility patches to work with SIP service
providers. Can be contacted at asterisk(AT)jdennis.net
* Mahmut Fettahlioglu - Audio recording, music-on-hold changes, alaw
file format, and various fixes. Can be contacted at
mahmut(AT)oa.com.au
Tilghman Lesher - ast_localtime(); ast_say_date_with_format();
GotoIfTime, SayUnixTime, HasNewVoicemail applications;
CUT, SORT, EVAL, CURL, FIELDQTY, STRFTIME, some QUEUE* functions;
func_odbc, cdr_adaptive_odbc, and other innumerable bug fixes.
tilghman(AT)digium.com http://asterisk.drunkcoder.com/
* James Dennis - Cisco SIP compatibility patches to work with SIP
service providers. Can be contacted at asterisk(AT)jdennis.net
Jayson Vantuyl - Manager protocol changes, various other bugs.
jvantuyl(AT)computingedge.net
* Tilghman Lesher - ast_localtime(); ast_say_date_with_format();
GotoIfTime, SayUnixTime, HasNewVoicemail applications;
CUT, SORT, EVAL, CURL, FIELDQTY, STRFTIME, some QUEUE*
functions; func_odbc, cdr_adaptive_odbc, and other innumerable
bug fixes. tilghman(AT)digium.com
http://asterisk.drunkcoder.com
Thorsten Lockert - OpenBSD, FreeBSD ports, making MacOS X port run on 10.3,
dialplan include verification, route lookup on OpenBSD, SNMP agent
support (res_snmp), various other bugs. tholo(AT)sigmasoft.com
* Jayson Vantuyl - Manager protocol changes, various other bugs.
jvantuyl(AT)computingedge.net
Josh Roberson - chan_zap reload support, Advanced Voicemail Features, & other
misc. patches. - josh(AT)asteriasgi.com, http://www.asteriasgi.com
* Thorsten Lockert - OpenBSD, FreeBSD ports, making MacOS X port run on
10.3, dialplan include verification, route lookup on OpenBSD,
SNMP agent support (res_snmp), various other bugs.
tholo(AT)sigmasoft.com
William Waites - syslog support, SIP NAT traversal for SIP-UA. ww(AT)styx.org
* Josh Roberson - chan_zap reload support, Advanced Voicemail Features,
& other misc. patches. josh(AT)asteriasgi.com
http://www.asteriasgi.com
Rich Murphey - Porting to FreeBSD, NetBSD, OpenBSD, and Darwin.
rich(AT)whiteoaklabs.com http://whiteoaklabs.com
* William Waites - syslog support, SIP NAT traversal for SIP-UA.
ww(AT)styx.org
Simon Lockhart - Porting to Solaris (based on work of Logan ???)
simon(AT)slimey.org
* Rich Murphey - Porting to FreeBSD, NetBSD, OpenBSD, and Darwin.
rich(AT)whiteoaklabs.com http://whiteoaklabs.com
Olle E. Johansson - SIP RFC compliance, documentation and testing, testing,
SIP outbound proxy support, Manager 1.1 update, SIP transfer support,
SIP presence support, SIP call state updates (dialog-info),
QUEUE_EXISTS function, device state provider architecture,
multiparking (together with mvanbaak), meetme and parking device states,
MiniVM - the small voicemail system, many documentation
updates/corrections, and many bug fixes.
oej(AT)edvina.net, http://edvina.net
* Simon Lockhart - Porting to Solaris (based on work of Logan ???)
simon(AT)slimey.org
Steve Kann - new jitter buffer for IAX2
stevek(AT)stevek.com
* Olle E. Johansson - SIP RFC compliance, documentation and testing,
testing, SIP outbound proxy support, Manager 1.1 update, SIP
transfer support, SIP presence support, SIP call state updates
(dialog-info), QUEUE_EXISTS function, device state provider
architecture, multiparking (together with mvanbaak), meetme and
parking device states, MiniVM - the small voicemail system,
RTP improvements, RTCP enhancements, DTMF timing fixes,
many documentation updates/corrections, and many bug fixes.
oej(AT)edvina.net, http://edvina.net
Constantine Filin - major contributions to the Asterisk Realtime Architecture
* Steve Kann - new jitter buffer for IAX2
stevek(AT)stevek.com
Steve Murphy - privacy support, $[ ] parser upgrade, AEL2 parser upgrade.
murf(AT)digium.com
* Constantine Filin - major contributions to the Asterisk Realtime
Architecture
Claude Patry - bug fixes, feature enhancements, and bug marshalling
cpatry(AT)gmail.com
* Steve Murphy - privacy support, $[ ] parser upgrade, AEL2 parser
upgrade. murf(AT)digium.com
Miroslav Nachev, miro(AT)space-comm.com COSMOS Software Enterprises, Ltd.
- for Variable for No Answer Timeout for Attended Transfer
* Claude Patry - bug fixes, feature enhancements, and bug marshalling
cpatry(AT)gmail.com
Slav Klenov & Vanheuverzwijn Joachim - development of the generic jitterbuffer
Securax Ltd. info(AT)securax.be
* Miroslav Nachev, miro(AT)space-comm.com
COSMOS Software Enterprises, Ltd.
Variable for No Answer Timeout for Attended Transfer
Roy Sigurd Karlsbakk - providing funding for generic jitterbuffer development
roy(AT)karlsbakk.net, Briiz Telecom AS
* Slav Klenov & Vanheuverzwijn Joachim - development of the generic
jitterbuffer Securax Ltd. info(AT)securax.be
Voop AS, Nuvio Inc, Inotel S.A and Foniris Telecom A/S - funding for rewrite
of SIP transfers
* Roy Sigurd Karlsbakk - providing funding for generic jitterbuffer
development roy(AT)karlsbakk.net, Briiz Telecom AS
Philippe Sultan - RADIUS CDR module, many fixes to res_jabber and gtalk/jingle
channel drivers.
INRIA, http://www.inria.fr/
* Voop AS, Nuvio Inc, Inotel S.A and Foniris Telecom A/S - rewrite
of SIP transfers
John Martin, Aupix - Improved video support in the SIP channel
T.140 text support in RTP/SIP
* Philippe Sultan - RADIUS CDR module, many fixes to res_jabber and
gtalk/jingle channel drivers. INRIA, http://www.inria.fr/
Steve Underwood - Provided T.38 pass through support.
* John Martin, Aupix - Improved video support in the SIP channel
T.140 text support in RTP/SIP
George Konstantoulakis - Support for Greek in voicemail added by InAccess
Networks (work funded by HOL, www.hol.gr) gkon(AT)inaccessnetworks.com
* Steve Underwood - Provided T.38 pass through support.
Daniel Nylander - Support for Swedish and Norwegian languages in voicemail.
http://www.danielnylander.se/
* George Konstantoulakis - Support for Greek in voicemail added by
InAccess Networks (work funded by HOL, www.hol.gr)
gkon(AT)inaccessnetworks.com
Stojan Sljivic - An option for maximum number of messsages per mailbox in
voicemail. Also an issue with voicemail synchronization has been fixed.
GDS Partners www.gdspartners.com . stojan.sljivic(AT)gdspartners.com
* Daniel Nylander - Support for Swedish and Norwegian languages in
voicemail. http://www.danielnylander.se/
Bartosz Supczinski - Support for Polish added by DIR (www.dir.pl)
Bartosz.Supczinski(AT)dir.pl
* Stojan Sljivic - An option for maximum number of messsages per
mailbox in voicemail. Also an issue with voicemail
synchronization has been fixed. GDS Partners
www.gdspartners.com stojan.sljivic(AT)gdspartners.com
James Rothenberger - Support for IMAP storage integration added by
OneBizTone LLC Work funded by University of Pennsylvania jar(AT)onebiztone.com
* Bartosz Supczinski - Support for Polish added by DIR (www.dir.pl)
Bartosz.Supczinski(AT)dir.pl
Paul Cadach - Bringing chan_h323 up to date, bug fixes, and more!
* James Rothenberger - Support for IMAP storage integration added by
OneBizTone LLC Work funded by University of Pennsylvania
jar(AT)onebiztone.com
Voop AS - Financial support for a lot of work with the SIP driver and the IAX
trunk MTU patch
* Paul Cadach - Bringing chan_h323 up to date, bug fixes, and more!
Cedric Hans - Development of chan_unistim
cedric.hans(AT)mlkj.net
* Voop AS - Financial support for a lot of work with the SIP driver
and the IAX trunk MTU patch
Takao Takahashi & Mina Naguib - chan_unistim improvements for smaller devices
* Cedric Hans - Development of chan_unistim cedric.hans(AT)mlkj.net
Sergio Fadda - console_video: video support for chan_oss and chan_alsa
* Takao Takahashi & Mina Naguib - chan_unistim improvements for
smaller devices
Marta Carbone - console_video and the astobj2 framework
* Sergio Fadda - console_video: video support for chan_oss and
chan_alsa
Luigi Rizzo - astobj2, console_video, windows build, chan_oss cleanup,
and a bunch of infrastructure work (loader, new_cli, ...)
* Marta Carbone - console_video and the astobj2 framework
Brett Bryant - digit option for musiconhold selection, ENUMQUERY and ENUMRESULT functions,
feature group configuration for features.conf, per-file CLI debug and verbose settings,
TCP and TLS support for SIP, and various bug fixes.
brettbryant(AT)gmail.com
* Luigi Rizzo - astobj2, console_video, windows build, chan_oss cleanup,
and a bunch of infrastructure work (loader, new_cli, ...)
Sergey Tamkovich - Realtime support for MusicOnHold, store and destroy realtime methods and
implementations for odbc, sqlite, and pgsql realtime drivers, attended transfer updates,
multiple speeds for ControlPlayback, and multiple bug fixes
- See http://voip-info.org/users/view/sergee
serg(AT)voipsolutions.ru
* Brett Bryant - digit option for musiconhold selection, ENUMQUERY and
ENUMRESULT functions, feature group configuration for
features.conf, per-file CLI debug and verbose settings, TCP and
TLS support for SIP, and various bug fixes.
brettbryant(AT)gmail.com
Klaus Darillon - the SIPremoveHeader function in chan_sip
* Sergey Tamkovich - Realtime support for MusicOnHold, store and destroy
realtime methods and implementations for odbc, sqlite, and pgsql
realtime drivers, attended transfer updates, multiple speeds for
ControlPlayback, and multiple bug fixes See
http://voip-info.org/users/view/sergee serg(AT)voipsolutions.ru
Moises Silva (moy) - for writing LibOpenR2, and providing support for it in chan_dahdi
moises.silva(AT)gmail.com
* Klaus Darillon - the SIPremoveHeader function in chan_sip and SIP Path
Support.
Eliel C. Sardanons - XML documentation implementation, and various other contributions
eliels(AT)gmail.com
* Moises Silva (moy) - for writing LibOpenR2, and providing support for
it in chan_dahdi moises.silva(AT)gmail.com
Sean Bright - Snom call pickup, newt interface for menuselect, cdr_tds rewrite,
countless other improvements, fixes, and good ideas.
sean(AT)malleable.com
* Eliel C. Sardanons - XML documentation implementation, and various
other contributions eliels(AT)gmail.com
Jan Kaláb - Calendaring support for Exchange Server 2007+ via Exchange Web Services.
* Sean Bright - Snom call pickup, newt interface for menuselect,
cdr_tds rewrite, countless other improvements, fixes, and good
ideas. sean(AT)malleable.com
University of Oslo (uio.no), Norway - SIP Max-Forwards setting support (developed by oej)
* Jan Kaláb - Calendaring support for Exchange Server 2007+ via
Exchange Web Services.
FCCN, Lissabon, Portugal - SIP show channels CLI command (developed by oej)
* University of Oslo (uio.no), Norway - SIP Max-Forwards setting
support (developed by oej)
Viagenie, Canada - IPv6 support in socket layers and SIP implementation
Developers: Marc Blanchet, Simon Perreault and Jean-Philippe Dionne
* FCCN, Lissabon, Portugal - SIP show channels CLI command
(developed by oej)
ClearIT AB, Sweden - res_mutestream, queue_exists and various other patches (developed by oej)
* Viagenie, Canada - IPv6 support in socket layers and SIP
implementation Developers: Marc Blanchet, Simon Perreault and
Jean-Philippe Dionne
Despegar.com, Argentina - AstData API implementation, also sponsored by Google as part of the
gsoc/2009 program (developed by Eliel)
* ClearIT AB, Sweden - res_mutestream, queue_exists and various other
patches (developed by oej)
* Despegar.com, Argentina - AstData API implementation, also sponsored
by Google as part of the gsoc/2009 program (developed by Eliel)
* Philippe Lindheimer - DEV_STATE additions to CCSS
* Andrew "lathama" Latham <lathama at gmail dot com>
Doxygen, HTTP-Static, Phoneprov, make update
* George Joseph - PJSIP CLI commands, PJSIP_HEADER dialplan function
Philippe Lindheimer - DEV_STATE additions to CCSS
=== OTHER CONTRIBUTIONS ===
We'd like to thank the following for their listed contributions.
* John Todd - Monkey sounds and associated teletorture prompt
* Michael Jerris - bug marshaling
* Leif Madsen, Jared Smith and Jim van Meggelen - the Asterisk book
available under a Creative Commons License at
http://www.asteriskdocs.org
* Brian M. Clapper - poll.c emulation
This product includes software developed by
Brian M. Clapper <bmc(AT)clapper.org>
John Todd - Monkey sounds and associated teletorture prompt
Michael Jerris - bug marshaling
Leif Madsen, Jared Smith and Jim van Meggelen - the Asterisk book
available under a Creative Commons License at http://www.asteriskdocs.org
Brian M. Clapper - poll.c emulation
This product includes software developed by Brian M. Clapper <bmc(AT)clapper.org>
=== HOLD MUSIC ===
We'd like to thank the following for hold music
* Music provided by www.opsound.org
Music provided by www.opsound.org
=== OTHER SOURCE CODE IN ASTERISK ===
Asterisk uses libedit, the lightweight readline replacement from NetBSD.
The cdr_radius module uses libradiusclient-ng, which is also from NetBSD.
They are BSD-licensed and require the following statement:
We'd like to thank the following for their code use
This product includes software developed by the NetBSD
Foundation, Inc. and its contributors.
* Asterisk uses libedit, the lightweight readline replacement from
NetBSD.
* The cdr_radius module uses libradiusclient-ng, which is also from
NetBSD.
* They are BSD-licensed and require the following statement:
This product includes software developed by the NetBSD
Foundation, Inc. and its contributors.
Digium did not implement the codecs in Asterisk. Here is the copyright on the
GSM source:
* Digium did not implement the codecs in Asterisk.
Here is the copyright on the GSM source:
Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann,
Technische Universitaet Berlin
Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann,
Technische Universitaet Berlin
Any use of this software is permitted provided that this notice is not
removed and that neither the authors nor the Technische Universitaet Berlin

31085
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,562 +0,0 @@
## Change Log for Release asterisk-20.10.0
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.10.0.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.9.3...20.10.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.10.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 24
- Commit Authors: 9
- Issues Resolved: 18
- Security Advisories Resolved: 0
### User Notes:
- #### res_pjsip_notify: add dialplan application
A new dialplan application PJSIPNotify is now available
which can send SIP NOTIFY requests from the dialplan.
The pjsip send notify CLI command has also been enhanced to allow
sending NOTIFY messages to a specific channel. Syntax:
pjsip send notify <option> channel <channel>
- #### channel: Add multi-tenant identifier.
tenantid has been added to channels. It can be read in
dialplan via CHANNEL(tenantid), and it can be set using
Set(CHANNEL(tenantid)=My tenant ID). In pjsip.conf, it is recommended to
use the new tenantid option for pjsip endpoints (e.g., tenantid=My
tenant ID) so that it will show up in Newchannel events. You can set it
like any other channel variable using set_var in pjsip.conf as well, but
note that this will NOT show up in Newchannel events. Tenant ID is also
available in CDR and can be accessed with CDR(tenantid). The peer tenant
ID can also be accessed with CDR(peertenantid). CEL includes tenant ID
as well if it has been set.
- #### res_pjsip_config_wizard.c: Refactor load process
The res_pjsip_config_wizard.so module can now be reloaded.
### Upgrade Notes:
- #### channel: Add multi-tenant identifier.
A new versioned struct (ast_channel_initializers) has been
added that gets passed to __ast_channel_alloc_ap. The new function
ast_channel_alloc_with_initializers should be used when creating
channels that require the use of this struct. Currently the only value
in the struct is for tenantid, but now more fields can be added to the
struct as necessary rather than the __ast_channel_alloc_ap function. A
new option (tenantid) has been added to endpoints in pjsip.conf as well.
CEL has had its version bumped to include tenant ID.
### Commit Authors:
- Alexei Gradinari: (2)
- Ben Ford: (1)
- Cade Parker: (1)
- George Joseph: (10)
- Jaco Kroon: (1)
- Jean-Denis Girard: (1)
- Mike Bradeen: (3)
- Sean Bright: (2)
- Tinet-Mucw: (3)
## Issue and Commit Detail:
### Closed Issues:
- 740: [new-feature]: Add multi-tenant identifier to chan_pjsip
- 763: [bug]: autoservice thread stuck in an endless sleep
- 780: [bug]: Infinite loop of "Indicated Video Update", max CPU usage
- 799: [improvement]: Add PJSIPNOTIFY dialplan application
- 801: [bug]: res_stasis: Occasional 200ms delay adding channel to a bridge
- 809: [bug]: CLI stir_shaken show verification kills asterisk
- 816: [bug]: res_pjsip_config_wizard doesn't load properly if res_pjsip is loaded first
- 831: [bug]: app_voicemail ODBC
- 845: [bug]: Buffer overflow in handling of security mechanisms in res_pjsip
- 847: [bug]: Asterisk not using negotiated fall-back 8K digits
- 854: [bug]: wrong properties in stir_shaken.conf.sample
- 856: [bug]: res_pjsip_sdp_rtp leaks astobj2 ast_format
- 861: [bug]: ChanSpy unable to read audiohook read direction frame when no packet lost on both side of the call
- 876: [bug]: ChanSpy unable to write whisper_audiohook when set flag OPTION_READONLY
- 879: [bug]: res_stir_shaken/verification.c: Getting verification errors when global_disable=yes
- 884: [bug]: A ':' at the top of in stir_shaken.conf make Asterisk producing a core file when starting
- 889: [bug]: res_stir_shaken/verification.c has a stale include for jansson.h that can cause compilation to fail
- 904: [bug]: stir_shaken: attest_level isn't being propagated correctly from attestation to profile to tn
### Commits By Author:
- #### Alexei Gradinari (2):
- res_pjsip_sdp_rtp fix leaking astobj2 ast_format
- autoservice: Do not sleep if autoservice_stop is called within autoservice thr..
- #### Ben Ford (1):
- channel: Add multi-tenant identifier.
- #### Cade Parker (1):
- chan_mobile: decrease CHANNEL_FRAME_SIZE to prevent delay
- #### George Joseph (10):
- bridge_softmix: Fix queueing VIDUPDATE control frames
- res_pjsip_config_wizard.c: Refactor load process
- stir_shaken: CRL fixes and a new CLI command
- manager.c: Fix FRACK when doing CoreShowChannelMap in DEVMODE
- stir_shaken.conf.sample: Fix bad references to private_key_path
- security_agreements.c: Refactor the to_str functions and fix a few other bugs
- res_stir_shaken: Check for disabled before param validation
- res_stir_shaken.c: Fix crash when stir_shaken.conf is invalid
- res_stir_shaken: Remove stale include for jansson.h in verification.c
- stir_shaken: Fix propagation of attest_level and a few other values
- #### Jaco Kroon (1):
- configure: Use . file rather than source file.
- #### Jean-Denis Girard (1):
- app_voicemail: Fix sql insert mismatch caused by cherry-pick
- #### Mike Bradeen (3):
- res_stasis: fix intermittent delays on adding channel to bridge
- res_pjsip_notify: add dialplan application
- res_pjsip_sdp_rtp: Use negotiated DTMF Payload types on bitrate mismatch
- #### Sean Bright (2):
- alembic: Make 'revises' header comment match reality.
- res_pjsip_logger.c: Fix 'OPTIONS' tab completion.
- #### Tinet-mucw (3):
- res_pjsip_sdp_rtp.c: Fix DTMF Handling in Re-INVITE with dtmf_mode set to auto
- app_chanspy.c: resolving the issue with audiohook direction read
- app_chanspy.c: resolving the issue writing frame to whisper audiohook.
### Commit List:
- stir_shaken: Fix propagation of attest_level and a few other values
- res_stir_shaken: Remove stale include for jansson.h in verification.c
- res_stir_shaken.c: Fix crash when stir_shaken.conf is invalid
- res_stir_shaken: Check for disabled before param validation
- app_chanspy.c: resolving the issue writing frame to whisper audiohook.
- app_voicemail: Fix sql insert mismatch caused by cherry-pick
- res_pjsip_sdp_rtp: Use negotiated DTMF Payload types on bitrate mismatch
- app_chanspy.c: resolving the issue with audiohook direction read
- security_agreements.c: Refactor the to_str functions and fix a few other bugs
- res_pjsip_sdp_rtp fix leaking astobj2 ast_format
- stir_shaken.conf.sample: Fix bad references to private_key_path
- res_pjsip_logger.c: Fix 'OPTIONS' tab completion.
- alembic: Make 'revises' header comment match reality.
- chan_mobile: decrease CHANNEL_FRAME_SIZE to prevent delay
- res_pjsip_notify: add dialplan application
- manager.c: Fix FRACK when doing CoreShowChannelMap in DEVMODE
- channel: Add multi-tenant identifier.
- configure: Use . file rather than source file.
- res_stasis: fix intermittent delays on adding channel to bridge
- res_pjsip_sdp_rtp.c: Fix DTMF Handling in Re-INVITE with dtmf_mode set to auto
- stir_shaken: CRL fixes and a new CLI command
- res_pjsip_config_wizard.c: Refactor load process
- bridge_softmix: Fix queueing VIDUPDATE control frames
### Commit Details:
#### stir_shaken: Fix propagation of attest_level and a few other values
Author: George Joseph
Date: 2024-09-24
attest_level, send_mky and check_tn_cert_public_url weren't
propagating correctly from the attestation object to the profile
and tn.
* In the case of attest_level, the enum needed to be changed
so the "0" value (the default) was "NOT_SET" instead of "A". This
now allows the merging of the attestation object, profile and tn
to detect when a value isn't set and use the higher level value.
* For send_mky and check_tn_cert_public_url, the tn default was
forced to "NO" which always overrode the profile and attestation
objects. Their defaults are now "NOT_SET" so the propagation
happens correctly.
* Just to remove some redundant code in tn_config.c, a bunch of calls to
generate_sorcery_enum_from_str() and generate_sorcery_enum_to_str() were
replaced with a single call to generate_acfg_common_sorcery_handlers().
Resolves: #904
#### res_stir_shaken: Remove stale include for jansson.h in verification.c
Author: George Joseph
Date: 2024-09-17
verification.c had an include for jansson.h left over from previous
versions of the module. Since res_stir_shaken no longer has a
dependency on jansson, the bundled version wasn't added to GCC's
include path so if you didn't also have a jansson development package
installed, the compile would fail. Removing the stale include
was the only thing needed.
Resolves: #889
#### res_stir_shaken.c: Fix crash when stir_shaken.conf is invalid
Author: George Joseph
Date: 2024-09-13
* If the call to ast_config_load() returns CONFIG_STATUS_FILEINVALID,
check_for_old_config() now returns LOAD_DECLINE instead of continuing
on with a bad pointer.
* If CONFIG_STATUS_FILEMISSING is returned, check_for_old_config()
assumes the config is being loaded from realtime and now returns
LOAD_SUCCESS. If it's actually not being loaded from realtime,
sorcery will catch that later on.
* Also refactored the error handling in load_module() a bit.
Resolves: #884
#### res_stir_shaken: Check for disabled before param validation
Author: George Joseph
Date: 2024-09-11
For both attestation and verification, we now check whether they've
been disabled either globally or by the profile before validating
things like callerid, orig_tn, dest_tn, etc. This prevents useless
error messages.
Resolves: #879
#### app_chanspy.c: resolving the issue writing frame to whisper audiohook.
Author: Tinet-mucw
Date: 2024-09-10
ChanSpy(${channel}, qEoSw): because flags set o, ast_audiohook_set_frame_feed_direction(audiohook, AST_AUDIOHOOK_DIRECTION_READ); this will effect whisper audiohook and spy audiohook, this makes writing frame to whisper audiohook impossible. So add function start_whispering to starting whisper audiohook.
Resolves: #876
#### autoservice: Do not sleep if autoservice_stop is called within autoservice thr..
Author: Alexei Gradinari
Date: 2024-09-04
It's possible that ast_autoservice_stop is called within the autoservice thread.
In this case the autoservice thread is stuck in an endless sleep.
To avoid endless sleep ast_autoservice_stop must check that it's not called
within the autoservice thread.
Fixes: #763
#### app_voicemail: Fix sql insert mismatch caused by cherry-pick
Author: Jean-Denis Girard
Date: 2024-08-07
When commit e8c9cb80 was cherry-picked in from master, the
fact that the 20 and 18 branches still had the old "macrocontext"
column wasn't taken into account so the number of named parameters
didn't match the number of '?' placeholders. They do now.
We also now use ast_asprintf to create the full mailbox query SQL
statement instead of trying to calculate the proper length ourselves.
Resolves: #831
#### res_pjsip_sdp_rtp: Use negotiated DTMF Payload types on bitrate mismatch
Author: Mike Bradeen
Date: 2024-08-21
When Asterisk sends an offer to Bob that includes 48K and 8K codecs with
matching 4733 offers, Bob may want to use the 48K audio codec but can not
accept 48K digits and so negotiates for a mixed set.
Asterisk will now check Bob's offer to make sure Bob has indicated this is
acceptible and if not, will use Bob's preference.
Fixes: #847
#### app_chanspy.c: resolving the issue with audiohook direction read
Author: Tinet-mucw
Date: 2024-08-30
ChanSpy(${channel}, qEoS): When chanspy spy the direction read, reading frame is often failed when reading direction read audiohook. because chanspy only read audiohook direction read; write_factory_ms will greater than 100ms soon, then ast_slinfactory_flush will being called, then direction read will fail.
Resolves: #861
#### security_agreements.c: Refactor the to_str functions and fix a few other bugs
Author: George Joseph
Date: 2024-08-17
* A static array of security mechanism type names was created.
* ast_sip_str_to_security_mechanism_type() was refactored to do
a lookup in the new array instead of using fixed "if/else if"
statments.
* security_mechanism_to_str() and ast_sip_security_mechanisms_to_str()
were refactored to use ast_str instead of a fixed length buffer
to store the result.
* ast_sip_security_mechanism_type_to_str was removed in favor of
just referencing the new type name array. Despite starting with
"ast_sip_", it was a static function so removing it doesn't affect
ABI.
* Speaking of "ast_sip_", several other static functions that
started with "ast_sip_" were renamed to avoid confusion about
their public availability.
* A few VECTOR free loops were replaced with AST_VECTOR_RESET().
* Fixed a meomry leak in pjsip_configuration.c endpoint_destructor
caused by not calling ast_sip_security_mechanisms_vector_destroy().
* Fixed a memory leak in res_pjsip_outbound_registration.c
add_security_headers() caused by not specifying OBJ_NODATA in
an ao2_callback.
* Fixed a few ao2_callback return code misuses.
Resolves: #845
#### res_pjsip_sdp_rtp fix leaking astobj2 ast_format
Author: Alexei Gradinari
Date: 2024-08-23
PR #700 added a preferred_format for the struct ast_rtp_codecs,
but when set the preferred_format it leaks an astobj2 ast_format.
In the next code
ast_rtp_codecs_set_preferred_format(&codecs, ast_format_cap_get_format(joint, 0));
both functions ast_rtp_codecs_set_preferred_format
and ast_format_cap_get_format increases the ao2 reference count.
Fixes: #856
#### stir_shaken.conf.sample: Fix bad references to private_key_path
Author: George Joseph
Date: 2024-08-22
They should be private_key_file.
Resolves: #854
#### res_pjsip_logger.c: Fix 'OPTIONS' tab completion.
Author: Sean Bright
Date: 2024-08-19
Fixes #843
#### alembic: Make 'revises' header comment match reality.
Author: Sean Bright
Date: 2024-08-17
#### chan_mobile: decrease CHANNEL_FRAME_SIZE to prevent delay
Author: Cade Parker
Date: 2024-08-07
On modern Bluetooth devices or lower-powered asterisk servers, decreasing the channel frame size significantly improves latency and delay on outbound calls with only a mild sacrifice to the quality of the call (the frame size before was massive overkill to begin with)
#### res_pjsip_notify: add dialplan application
Author: Mike Bradeen
Date: 2024-07-09
Add dialplan application PJSIPNOTIFY to send either pre-configured
NOTIFY messages from pjsip_notify.conf or with headers defined in
dialplan.
Also adds the ability to send pre-configured NOTIFY commands to a
channel via the CLI.
Resolves: #799
UserNote: A new dialplan application PJSIPNotify is now available
which can send SIP NOTIFY requests from the dialplan.
The pjsip send notify CLI command has also been enhanced to allow
sending NOTIFY messages to a specific channel. Syntax:
pjsip send notify <option> channel <channel>
#### manager.c: Fix FRACK when doing CoreShowChannelMap in DEVMODE
Author: George Joseph
Date: 2024-08-08
If you run an AMI CoreShowChannelMap on a channel that isn't in a
bridge and you're in DEVMODE, you can get a FRACK because the
bridge id is empty. We now simply return an empty list for that
request.
#### channel: Add multi-tenant identifier.
Author: Ben Ford
Date: 2024-05-21
This patch introduces a new identifier for channels: tenantid. It's
a stringfield on the channel that can be used for general purposes. It
will be inherited by other channels the same way that linkedid is.
You can set tenantid in a few ways. The first is to set it in the
dialplan with the Set and CHANNEL functions:
exten => example,1,Set(CHANNEL(tenantid)=My tenant ID)
It can also be accessed via CHANNEL:
exten => example,2,NoOp(CHANNEL(tenantid))
Another method is to use the new tenantid option for pjsip endpoints in
pjsip.conf:
[my_endpoint]
type=endpoint
tenantid=My tenant ID
This is considered the best approach since you will be able to see the
tenant ID as early as the Newchannel event.
It can also be set using set_var in pjsip.conf on the endpoint like
setting other channel variable:
set_var=CHANNEL(tenantid)=My tenant ID
Note that set_var will not show tenant ID on the Newchannel event,
however.
Tenant ID has also been added to CDR. It's read-only and can be accessed
via CDR(tenantid). You can also get the tenant ID of the last channel
communicated with via CDR(peertenantid).
Tenant ID will also show up in CEL records if it has been set, and the
version number has been bumped accordingly.
Fixes: #740
UserNote: tenantid has been added to channels. It can be read in
dialplan via CHANNEL(tenantid), and it can be set using
Set(CHANNEL(tenantid)=My tenant ID). In pjsip.conf, it is recommended to
use the new tenantid option for pjsip endpoints (e.g., tenantid=My
tenant ID) so that it will show up in Newchannel events. You can set it
like any other channel variable using set_var in pjsip.conf as well, but
note that this will NOT show up in Newchannel events. Tenant ID is also
available in CDR and can be accessed with CDR(tenantid). The peer tenant
ID can also be accessed with CDR(peertenantid). CEL includes tenant ID
as well if it has been set.
UpgradeNote: A new versioned struct (ast_channel_initializers) has been
added that gets passed to __ast_channel_alloc_ap. The new function
ast_channel_alloc_with_initializers should be used when creating
channels that require the use of this struct. Currently the only value
in the struct is for tenantid, but now more fields can be added to the
struct as necessary rather than the __ast_channel_alloc_ap function. A
new option (tenantid) has been added to endpoints in pjsip.conf as well.
CEL has had its version bumped to include tenant ID.
#### configure: Use . file rather than source file.
Author: Jaco Kroon
Date: 2024-08-05
source is a bash concept, so when /bin/sh points to another shell the
existing construct won't work.
Reference: https://bugs.gentoo.org/927055
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
#### res_stasis: fix intermittent delays on adding channel to bridge
Author: Mike Bradeen
Date: 2024-07-10
Previously, on command execution, the control thread was awoken by
sending a SIGURG. It was found that this still resulted in some
instances where the thread was not immediately awoken.
This change instead sends a null frame to awaken the control thread,
which awakens the thread more consistently.
Resolves: #801
#### res_pjsip_sdp_rtp.c: Fix DTMF Handling in Re-INVITE with dtmf_mode set to auto
Author: Tinet-mucw
Date: 2024-08-02
When the endpoint dtmf_mode is set to auto, a SIP request is sent to the UAC, and the SIP SDP from the UAC does not include the telephone-event. Later, the UAC sends an INVITE, and the SIP SDP includes the telephone-event. In this case, DTMF should be sent by RFC2833 rather than using inband signaling.
Resolves: asterisk#826
#### stir_shaken: CRL fixes and a new CLI command
Author: George Joseph
Date: 2024-07-19
* Fixed a bug in crypto_show_cli_store that was causing asterisk
to crash if there were certificate revocation lists in the
verification certificate store. We're also now prefixing
certificates with "Cert:" and CRLs with "CRL:" to distinguish them
in the list.
* Added 'untrusted_cert_file' and 'untrusted_cert_path' options
to both verification and profile objects. If you have CRLs that
are signed by a different CA than the incoming X5U certificate
(indirect CRL), you'll need to provide the certificate of the
CRL signer here. Thse will show up as 'Untrusted" when showing
the verification or profile objects.
* Fixed loading of crl_path. The OpenSSL API we were using to
load CRLs won't actually load them from a directory, only a file.
We now scan the directory ourselves and load the files one-by-one.
* Fixed the verification flags being set on the certificate store.
- Removed the CRL_CHECK_ALL flag as this was causing all certificates
to be checked for CRL extensions and failing to verify the cert if
there was none. This basically caused all certs to fail when a CRL
was provided via crl_file or crl_path.
- Added the EXTENDED_CRL_SUPPORT flag as it is required to handle
indirect CRLs.
* Added a new CLI command...
`stir_shaken verify certificate_file <certificate_file> [ <profile> ]`
which will assist troubleshooting certificate problems by allowing
the user to manually verify a certificate file against either the
global verification certificate store or the store for a specific
profile.
* Updated the XML documentation and the sample config file.
Resolves: #809
#### res_pjsip_config_wizard.c: Refactor load process
Author: George Joseph
Date: 2024-07-23
The way we have been initializing the config wizard prevented it
from registering its objects if res_pjsip happened to load
before it.
* We now use the object_type_registered sorcery observer to kick
things off instead of the wizard_mapped observer.
* The load_module function now checks if res_pjsip has been loaded
already and if it was it fires the proper observers so the objects
load correctly.
Resolves: #816
UserNote: The res_pjsip_config_wizard.so module can now be reloaded.
#### bridge_softmix: Fix queueing VIDUPDATE control frames
Author: George Joseph
Date: 2024-07-17
softmix_bridge_write_control() now calls ast_bridge_queue_everyone_else()
with the bridge_channel so the VIDUPDATE control frame isn't echoed back.
softmix_bridge_write_control() was setting bridge_channel to NULL
when calling ast_bridge_queue_everyone_else() for VIDUPDATE control
frames. This was causing the frame to be echoed back to the
channel it came from. In certain cases, like when two channels or
bridges are being recorded, this can cause a ping-pong effect that
floods the system with VIDUPDATE control frames.
Resolves: #780

View File

@@ -1,766 +0,0 @@
## Change Log for Release asterisk-20.11.0
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.11.0.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.10.0...20.11.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.11.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 40
- Commit Authors: 9
- Issues Resolved: 22
- Security Advisories Resolved: 0
### User Notes:
- #### res_pjsip: Add new endpoint option "suppress_moh_on_sendonly"
The new "suppress_moh_on_sendonly" endpoint option
can be used to prevent playing MOH back to a caller if the remote
end sends "sendonly" or "inactive" (hold) to Asterisk in an SDP.
- #### app_mixmonitor: Add 'D' option for dual-channel audio.
The MixMonitor application now has a new 'D' option which
interleaves the recorded audio in the output frames. This allows for
stereo recording output with one channel being the transmitted audio and
the other being the received audio. The 't' and 't' options are
compatible with this.
- #### manager.c: Restrict ModuleLoad to the configured modules directory.
The ModuleLoad AMI action now restricts modules to the
configured modules directory.
- #### manager: Enhance event filtering for performance
You can now perform more granular filtering on events
in manager.conf using expressions like
`eventfilter(name(Newchannel),header(Channel),method(starts_with)) = PJSIP/`
This is much more efficient than
`eventfilter = Event: Newchannel.*Channel: PJSIP/`
Full syntax guide is in configs/samples/manager.conf.sample.
- #### db.c: Remove limit on family/key length
The `ast_db_*()` APIs have had the 253 byte limit on
"/family/key" removed and will now accept families and keys with a
total length of up to SQLITE_MAX_LENGTH (currently 1e9!). This
affects the `DB*` dialplan applications, dialplan functions,
manager actions and `databse` CLI commands. Since the
media_cache also uses the `ast_db_*()` APIs, you can now store
resources with URIs longer than 253 bytes.
### Upgrade Notes:
### Commit Authors:
- Allan Nathanson: (1)
- Ben Ford: (3)
- Chrsmj: (1)
- George Joseph: (15)
- Jiangxc: (1)
- Naveen Albert: (7)
- Peter Jannesen: (2)
- Sean Bright: (8)
- Thomas Guebels: (2)
## Issue and Commit Detail:
### Closed Issues:
- 487: [bug]: Segfault possibly in ast_rtp_stop
- 821: [bug]: app_dial: The progress timeout doesn't cause Dial to exit
- 881: [bug]: Long URLs are being rejected by the media cache because of an astdb key length limit
- 882: [bug]: Value CHANNEL(userfield) is lost by BRIDGE_ENTER
- 897: [improvement]: Restrict ModuleLoad AMI action to the modules directory
- 900: [bug]: astfd.c: NULL pointer passed to fclose with nonnull attribute causes compilation failure
- 902: [bug]: app_voicemail: Pager emails are ill-formatted when custom subject is used
- 916: [bug]: Compilation errors on FreeBSD
- 923: [bug]: Transport monitor shutdown callback only works on the first disconnection
- 924: [bug]: dnsmgr.c: dnsmgr_refresh() should not flag change if IP address order changes
- 928: [bug]: chan_dahdi: MWI while off-hook when hung up on after recall ring
- 932: [bug]: When connected to multiple IP addresses the transport monitor is only set on the first one
- 937: [bug]: Wrong format for sample config file 'geolocation.conf.sample'
- 938: [bug]: memory leak - CBAnn leaks a small amount format_cap related memory for every confbridge
- 945: [improvement]: Add stereo recording support for app_mixmonitor
- 951: [new-feature]: func_evalexten: Add `EVAL_SUB` function
- 974: [improvement]: change and/or remove some wiki mentions to docs mentions in the sample configs
- 979: [improvement]: Add ability to suppress MOH when a remote endpoint sends "sendonly" or "inactive"
- 982: [bug]: The addition of tenantid to the ast_sip_endpoint structure broke ABI compatibility
- 990: [improvement]: The help for PJSIP_AOR should indicate that you need to call PJSIP_CONTACT to get contact details
- 995: [bug]: suppress_moh_on_sendonly should use AST_BOOL_VALUES instead of YESNO_VALUES in alembic script
### Commits By Author:
- #### Allan Nathanson (1):
- dnsmgr.c: dnsmgr_refresh() incorrectly flags change with DNS round-robin
- #### Ben Ford (3):
- manager.c: Restrict ModuleLoad to the configured modules directory.
- app_mixmonitor: Add 'D' option for dual-channel audio.
- Add res_pjsip_config_sangoma external module.
- #### George Joseph (15):
- db.c: Remove limit on family/key length
- manager.c: Split XML documentation to manager_doc.xml
- manager: Enhance event filtering for performance
- manager.conf.sample: Fix mathcing typo
- Fix application references to Background
- res_rtp_asterisk: Fix dtls timer issues causing FRACKs and SEGVs
- manager.c: Add unit test for Originate app and appdata permissions
- geolocation.sample.conf: Fix comment marker at end of file
- core_unreal.c: Fix memory leak in ast_unreal_new_channels()
- pjproject_bundled: Tweaks to support out-of-tree development
- res_srtp: Change Unsupported crypto suite msg from verbose to debug
- res_pjsip: Move tenantid to end of ast_sip_endpoint
- func_pjsip_aor/contact: Fix documentation for contact ID
- res_pjsip: Add new endpoint option "suppress_moh_on_sendonly"
- res_pjsip: Change suppress_moh_on_sendonly to OPT_BOOL_T
- #### Naveen Albert (7):
- app_voicemail: Fix ill-formatted pager emails with custom subject.
- astfd.c: Avoid calling fclose with NULL argument.
- main, res, tests: Fix compilation errors on FreeBSD.
- chan_dahdi: Never send MWI while off-hook.
- app_dial: Fix progress timeout.
- app_dial: Fix progress timeout calculation with no answer timeout.
- func_evalexten: Add EVAL_SUB function.
- #### Peter Jannesen (2):
- cel_custom: Allow absolute filenames.
- channel: Preserve CHANNEL(userfield) on masquerade.
- #### Sean Bright (8):
- res_pjsip_pubsub: Persist subscription 'generator_data' in sorcery
- cdr_custom: Allow absolute filenames.
- res_agi.c: Ensure SIGCHLD handler functions are properly balanced.
- alembic: Drop redundant voicemail_messages index.
- func_base64.c: Ensure we set aside enough room for base64 encoded data.
- Revert "res_rtp_asterisk: Count a roll-over of the sequence number even on los..
- chan_sip.c: Fix __sip_reliable_xmit build error
- res_pjsip.c: Fix Contact header rendering for IPv6 addresses.
- #### Thomas Guebels (2):
- pjsip_transport_events: Avoid monitor destruction
- pjsip_transport_events: handle multiple addresses for a domain
- #### chrsmj (1):
- samples: remove and/or change some wiki mentions
- #### jiangxc (1):
- res_agi.c: Prevent possible double free during `SPEECH RECOGNIZE`
### Commit List:
- res_pjsip: Change suppress_moh_on_sendonly to OPT_BOOL_T
- res_pjsip: Add new endpoint option "suppress_moh_on_sendonly"
- res_pjsip.c: Fix Contact header rendering for IPv6 addresses.
- samples: remove and/or change some wiki mentions
- func_pjsip_aor/contact: Fix documentation for contact ID
- res_pjsip: Move tenantid to end of ast_sip_endpoint
- pjsip_transport_events: handle multiple addresses for a domain
- func_evalexten: Add EVAL_SUB function.
- res_srtp: Change Unsupported crypto suite msg from verbose to debug
- Add res_pjsip_config_sangoma external module.
- app_mixmonitor: Add 'D' option for dual-channel audio.
- pjsip_transport_events: Avoid monitor destruction
- app_dial: Fix progress timeout calculation with no answer timeout.
- pjproject_bundled: Tweaks to support out-of-tree development
- chan_sip.c: Fix __sip_reliable_xmit build error
- core_unreal.c: Fix memory leak in ast_unreal_new_channels()
- dnsmgr.c: dnsmgr_refresh() incorrectly flags change with DNS round-robin
- geolocation.sample.conf: Fix comment marker at end of file
- func_base64.c: Ensure we set aside enough room for base64 encoded data.
- app_dial: Fix progress timeout.
- chan_dahdi: Never send MWI while off-hook.
- manager.c: Add unit test for Originate app and appdata permissions
- alembic: Drop redundant voicemail_messages index.
- res_agi.c: Ensure SIGCHLD handler functions are properly balanced.
- main, res, tests: Fix compilation errors on FreeBSD.
- res_rtp_asterisk: Fix dtls timer issues causing FRACKs and SEGVs
- manager.c: Restrict ModuleLoad to the configured modules directory.
- res_agi.c: Prevent possible double free during `SPEECH RECOGNIZE`
- cdr_custom: Allow absolute filenames.
- astfd.c: Avoid calling fclose with NULL argument.
- channel: Preserve CHANNEL(userfield) on masquerade.
- cel_custom: Allow absolute filenames.
- app_voicemail: Fix ill-formatted pager emails with custom subject.
- res_pjsip_pubsub: Persist subscription 'generator_data' in sorcery
- Fix application references to Background
- manager.conf.sample: Fix mathcing typo
- manager: Enhance event filtering for performance
- manager.c: Split XML documentation to manager_doc.xml
- db.c: Remove limit on family/key length
### Commit Details:
#### res_pjsip: Change suppress_moh_on_sendonly to OPT_BOOL_T
Author: George Joseph
Date: 2024-11-15
The suppress_moh_on_sendonly endpoint option should have been
defined as OPT_BOOL_T in pjsip_configuration.c and AST_BOOL_VALUES
in the alembic script instead of OPT_YESNO_T and YESNO_VALUES.
Also updated contrib/ast-db-manage/README.md to indicate that
AST_BOOL_VALUES should always be used and provided an example.
Resolves: #995
#### res_pjsip: Add new endpoint option "suppress_moh_on_sendonly"
Author: George Joseph
Date: 2024-11-05
Normally, when one party in a call sends Asterisk an SDP with
a "sendonly" or "inactive" attribute it means "hold" and causes
Asterisk to start playing MOH back to the other party. This can be
problematic if it happens at certain times, such as in a 183
Progress message, because the MOH will replace any early media you
may be playing to the calling party. If you set this option
to "yes" on an endpoint and the endpoint receives an SDP
with "sendonly" or "inactive", Asterisk will NOT play MOH back to
the other party.
Resolves: #979
UserNote: The new "suppress_moh_on_sendonly" endpoint option
can be used to prevent playing MOH back to a caller if the remote
end sends "sendonly" or "inactive" (hold) to Asterisk in an SDP.
#### res_pjsip.c: Fix Contact header rendering for IPv6 addresses.
Author: Sean Bright
Date: 2024-11-08
Fix suggested by @nvsystems.
Fixes #985
#### samples: remove and/or change some wiki mentions
Author: chrsmj
Date: 2024-11-01
Cleaned some dead links. Replaced word wiki with
either docs or link to https://docs.asterisk.org/
Resolves: #974
#### func_pjsip_aor/contact: Fix documentation for contact ID
Author: George Joseph
Date: 2024-11-09
Clarified the use of the contact ID returned from PJSIP_AOR.
Resolves: #990
#### res_pjsip: Move tenantid to end of ast_sip_endpoint
Author: George Joseph
Date: 2024-11-06
The tenantid field was originally added to the ast_sip_endpoint
structure at the end of the AST_DECLARE_STRING_FIELDS block. This
caused everything after it in the structure to move down in memory
and break ABI compatibility. It's now at the end of the structure
as an AST_STRING_FIELD_EXTENDED. Given the number of string fields
in the structure now, the initial string field allocation was
also increased from 64 to 128 bytes.
Resolves: #982
#### pjsip_transport_events: handle multiple addresses for a domain
Author: Thomas Guebels
Date: 2024-10-29
The key used for transport monitors was the remote host name for the
transport and not the remote address resolved for this domain.
This was problematic for domains returning multiple addresses as several
transport monitors were created with the same key.
Whenever a subsystem wanted to register a callback it would always end
up attached to the first transport monitor with a matching key.
The key used for transport monitors is now the remote address and port
the transport actually connected to.
Fixes: #932
#### func_evalexten: Add EVAL_SUB function.
Author: Naveen Albert
Date: 2024-10-17
This adds an EVAL_SUB function, which is similar to the existing
EVAL_EXTEN function but significantly more powerful, as it allows
executing arbitrary dialplan and capturing its return value as
the function's output. While EVAL_EXTEN should be preferred if it
is possible to use it, EVAL_SUB can be used in a wider variety
of cases and allows arbitrary computation to be performed in
a dialplan function call, leveraging the dialplan.
Resolves: #951
#### res_srtp: Change Unsupported crypto suite msg from verbose to debug
Author: George Joseph
Date: 2024-11-01
There's really no point in spamming logs with a verbose message
for every unsupported crypto suite an older client may send
in an SDP. If none are supported, there will be an error or
warning.
#### Add res_pjsip_config_sangoma external module.
Author: Ben Ford
Date: 2024-11-01
Adds res_pjsip_config_sangoma as an external module that can be
downloaded via menuselect. It lives under the Resource Modules section.
#### app_mixmonitor: Add 'D' option for dual-channel audio.
Author: Ben Ford
Date: 2024-10-28
Adds the 'D' option to app_mixmonitor that interleaves the input and
output frames of the channel being recorded in the monitor output frame.
This allows for two streams in the recording: the transmitted audio and
the received audio. The 't' and 'r' options are compatible with this.
Fixes: #945
UserNote: The MixMonitor application now has a new 'D' option which
interleaves the recorded audio in the output frames. This allows for
stereo recording output with one channel being the transmitted audio and
the other being the received audio. The 't' and 't' options are
compatible with this.
#### pjsip_transport_events: Avoid monitor destruction
Author: Thomas Guebels
Date: 2024-10-28
When a transport is disconnected, several events can arrive following
each other. The first event will be PJSIP_TP_STATE_DISCONNECT and it
will trigger the destruction of the transport monitor object. The lookup
for the transport monitor to destroy is done using the transport key,
that contains the transport destination host:port.
A reconnect attempt by pjsip will be triggered as soon something needs to
send a packet using that transport. This can happen directly after a
disconnect since ca
Subsequent events can arrive later like PJSIP_TP_STATE_DESTROY and will
also try to trigger the destruction of the transport monitor if not
already done. Since the lookup for the transport monitor to destroy is
done using the transport key, it can match newly created transports
towards the same destination and destroy their monitor object.
Because of this, it was sometimes not possible to monitor a transport
after one or more disconnections.
This fix adds an additional check on the transport pointer to ensure
only a monitor for that specific transport is removed.
Fixes: #923
#### app_dial: Fix progress timeout calculation with no answer timeout.
Author: Naveen Albert
Date: 2024-10-16
If to_answer is -1, simply comparing to see if the progress timeout
is smaller than the answer timeout to prefer it will fail. Add
an additional check that chooses the progress timeout if there is
no answer timeout (or as before, if the progress timeout is smaller).
Resolves: #821
#### pjproject_bundled: Tweaks to support out-of-tree development
Author: George Joseph
Date: 2024-10-17
* pjproject is now configured with --disable-libsrtp so it will
build correctly when doing "out-of-tree" development. Asterisk
doesn't use pjproject for handling media so pjproject doesn't
need libsrtp itself.
* The pjsua app (which we used to use for the testsuite) no longer
builds in pjproject's master branch so we just skip it. The
testsuite no longer needs it anyway.
See third-party/pjproject/README-hacking.md for more info on building
pjproject "out-of-tree".
#### chan_sip.c: Fix __sip_reliable_xmit build error
Author: Sean Bright
Date: 2024-10-17
Fixes #954
#### Revert "res_rtp_asterisk: Count a roll-over of the sequence number even on los..
Author: Sean Bright
Date: 2024-10-07
This reverts commit cb5e3445be6c55517c8d05aca601b648341f8ae9.
The original change from 16 to 15 bit sequence numbers was predicated
on the following from the now-defunct libSRTP FAQ on sourceforge.net:
> *Q6. The use of implicit synchronization via ROC seems
> dangerous. Can senders and receivers lose ROC synchronization?*
>
> **A.** It is possible to lose ROC synchronization between sender and
> receiver(s), though it is not likely in practice, and practical
> steps can be taken to avoid it. A burst loss of 2^16 packets or more
> will always break synchronization. For example, a conversational
> voice codec that sends 50 packets per second will have its ROC
> increment about every 22 minutes. A network with a burst of packet
> loss that long has problems other than ROC synchronization.
>
> There is a higher sensitivity to loss at the very outset of an SRTP
> stream. If the sender's initial sequence number is close to the
> maximum value of 2^16-1, and all packets are lost from the initial
> packet until the sequence number cycles back to zero, the sender
> will increment its ROC, but the receiver will not. The receiver
> cannot determine that the initial packets were lost and that
> sequence-number rollover has occurred. In this case, the receiver's
> ROC would be zero whereas the sender's ROC would be one, while their
> sequence numbers would be so close that the ROC-guessing algorithm
> could not detect this fact.
>
> There is a simple solution to this problem: the SRTP sender should
> randomly select an initial sequence number that is always less than
> 2^15. This ensures correct SRTP operation so long as fewer than 2^15
> initial packets are lost in succession, which is within the maximum
> tolerance of SRTP packet-index determination (see Appendix A and
> page 14, first paragraph of RFC 3711). An SRTP receiver should
> carefully implement the index-guessing algorithm. A naive
> implementation can unintentionally guess the value of
> 0xffffffffffffLL whenever the SEQ in the packet is greater than 2^15
> and the locally stored SEQ and ROC are zero. (This can happen when
> the implementation fails to treat those zero values as a special
> case.)
>
> When ROC synchronization is lost, the receiver will not be able to
> properly process the packets. If anti-replay protection is turned
> on, then the desynchronization will appear as a burst of replay
> check failures. Otherwise, if authentication is being checked, then
> it will appear as a burst of authentication failures. Otherwise, if
> encryption is being used, the desynchronization may not be detected
> by the SRTP layer, and the packets may be improperly decrypted.
However, modern libSRTP (as of 1.0.1[1]) now mentions the following in
their README.md[2]:
> The sequence number in the rtp packet is used as the low 16 bits of
> the sender's local packet index. Note that RTP will start its
> sequence number in a random place, and the SRTP layer just jumps
> forward to that number at its first invocation. An earlier version
> of this library used initial sequence numbers that are less than
> 32,768; this trick is no longer required as the
> rdbx_estimate_index(...) function has been made smarter.
So truncating our initial sequence number to 15 bit is no longer
necessary.
1. https://github.com/cisco/libsrtp/blob/0eb007f0dc611f27cbfe0bf9855ed85182496cec/CHANGES#L271-L289
2. https://github.com/cisco/libsrtp/blob/2de20dd9e9c8afbaf02fcf5d4048ce1ec9ddc0ae/README.md#implementation-notes
#### core_unreal.c: Fix memory leak in ast_unreal_new_channels()
Author: George Joseph
Date: 2024-10-15
When the channel tech is multistream capable, the reference to
chan_topology was passed to the new channel. When the channel tech
isn't multistream capable, the reference to chan_topology was never
released. "Local" channels are multistream capable so it didn't
affect them but the confbridge "CBAnn" and the bridge_media
"Recorder" channels are not so they caused a leak every time one
of them was created.
Also added tracing to ast_stream_topology_alloc() and
stream_topology_destroy() to assist with debugging.
Resolves: #938
#### dnsmgr.c: dnsmgr_refresh() incorrectly flags change with DNS round-robin
Author: Allan Nathanson
Date: 2024-09-29
The dnsmgr_refresh() function checks to see if the IP address associated
with a name/service has changed. The gotcha is that the ast_get_ip_or_srv()
function only returns the first IP address returned by the DNS query. If
there are multiple IPs associated with the name and the returned order is
not consistent (e.g. with DNS round-robin) then the other IP addresses are
not included in the comparison and the entry is flagged as changed even
though the IP is still valid.
Updated the code to check all IP addresses and flag a change only if the
original IP is no longer valid.
Resolves: #924
#### geolocation.sample.conf: Fix comment marker at end of file
Author: George Joseph
Date: 2024-10-08
Resolves: #937
#### func_base64.c: Ensure we set aside enough room for base64 encoded data.
Author: Sean Bright
Date: 2024-10-08
Reported by SingularTricycle on IRC.
Fixes #940
#### app_dial: Fix progress timeout.
Author: Naveen Albert
Date: 2024-10-03
Under some circumstances, the progress timeout feature added in commit
320c98eec87c473bfa814f76188a37603ea65ddd does not work as expected,
such as if there is no media flowing. Adjust the waitfor call to
explicitly use the progress timeout if it would be reached sooner than
the answer timeout to ensure we handle the timers properly.
Resolves: #821
#### chan_dahdi: Never send MWI while off-hook.
Author: Naveen Albert
Date: 2024-10-01
In some circumstances, it is possible for the do_monitor thread to
erroneously think that a line is on-hook and send an MWI FSK spill
to it when the line is really off-hook and no MWI should be sent.
Commit 0a8b3d34673277b70be6b0e8ac50191b1f3c72c6 previously fixed this
issue in a more readily encountered scenario, but it has still been
possible for MWI to be sent when it shouldn't be. To robustly fix
this issue, query DAHDI for the hook status to ensure we don't send
MWI on a line that is actually still off hook.
Resolves: #928
#### manager.c: Add unit test for Originate app and appdata permissions
Author: George Joseph
Date: 2024-10-03
This unit test checks that dialplan apps and app data specified
as parameters for the Originate action are allowed with the
permissions the user has.
#### alembic: Drop redundant voicemail_messages index.
Author: Sean Bright
Date: 2024-09-26
The `voicemail_messages_dir` index is a left prefix of the table's
primary key and therefore unnecessary.
#### res_agi.c: Ensure SIGCHLD handler functions are properly balanced.
Author: Sean Bright
Date: 2024-09-30
Calls to `ast_replace_sigchld()` and `ast_unreplace_sigchld()` must be
balanced to ensure that we can capture the exit status of child
processes when we need to. This extends to functions that call
`ast_replace_sigchld()` and `ast_unreplace_sigchld()` such as
`ast_safe_fork()` and `ast_safe_fork_cleanup()`.
The primary change here is ensuring that we do not call
`ast_safe_fork_cleanup()` in `res_agi.c` if we have not previously
called `ast_safe_fork()`.
Additionally we reinforce some of the documentation and add an
assertion to, ideally, catch this sooner were this to happen again.
Fixes #922
#### main, res, tests: Fix compilation errors on FreeBSD.
Author: Naveen Albert
Date: 2024-09-29
asterisk.c, manager.c: Increase buffer sizes to avoid truncation warnings.
config.c: Include header file for WIFEXITED/WEXITSTATUS macros.
res_timing_kqueue: Use more portable format specifier.
test_crypto: Use non-linux limits.h header file.
Resolves: #916
#### res_rtp_asterisk: Fix dtls timer issues causing FRACKs and SEGVs
Author: George Joseph
Date: 2024-09-16
In dtls_srtp_handle_timeout(), when DTLSv1_get_timeout() returned
success but with a timeout of 0, we were stopping the timer and
decrementing the refcount on instance but not resetting the
timeout_timer to -1. When dtls_srtp_stop_timeout_timer()
was later called, it was atempting to stop a stale timer and could
decrement the refcount on instance again which would then cause
the instance destructor to run early. This would result in either
a FRACK or a SEGV when ast_rtp_stop(0 was called.
According to the OpenSSL docs, we shouldn't have been stopping the
timer when DTLSv1_get_timeout() returned success and the new timeout
was 0 anyway. We should have been calling DTLSv1_handle_timeout()
again immediately so we now reschedule the timer callback for
1ms (almost immediately).
Additionally, instead of scheduling the timer callback at a fixed
interval returned by the initial call to DTLSv1_get_timeout()
(usually 999 ms), we now reschedule the next callback based on
the last call to DTLSv1_get_timeout().
Resolves: #487
#### manager.c: Restrict ModuleLoad to the configured modules directory.
Author: Ben Ford
Date: 2024-09-25
When using the ModuleLoad AMI action, it was possible to traverse
upwards through the directories to files outside of the configured
modules directory. We decided it would be best to restrict access to
modules exclusively in the configured directory. You will now get an
error when the specified module is outside of this limitation.
Fixes: #897
UserNote: The ModuleLoad AMI action now restricts modules to the
configured modules directory.
#### res_agi.c: Prevent possible double free during `SPEECH RECOGNIZE`
Author: jiangxc
Date: 2024-07-17
When using the speech recognition module, crashes can occur
sporadically due to a "double free or corruption (out)" error. Now, in
the section where the audio stream is being captured in a loop, each
time after releasing fr, it is set to NULL to prevent repeated
deallocation.
Fixes #772
#### cdr_custom: Allow absolute filenames.
Author: Sean Bright
Date: 2024-09-26
A follow up to #893 that brings the same functionality to
cdr_custom. Also update the sample configuration files to note support
for absolute paths.
#### astfd.c: Avoid calling fclose with NULL argument.
Author: Naveen Albert
Date: 2024-09-24
Don't pass through a NULL argument to fclose, which is undefined
behavior, and instead return -1 and set errno appropriately. This
also avoids a compiler warning with glibc 2.38 and newer, as glibc
commit 71d9e0fe766a3c22a730995b9d024960970670af
added the nonnull attribute to this argument.
Resolves: #900
#### channel: Preserve CHANNEL(userfield) on masquerade.
Author: Peter Jannesen
Date: 2024-09-20
In certain circumstances a channel may undergo an operation
referred to as a masquerade. If this occurs the CHANNEL(userfield)
value was not preserved causing it to get lost. This change makes
it so that this field is now preserved.
Fixes: #882
#### cel_custom: Allow absolute filenames.
Author: Peter Jannesen
Date: 2024-09-20
If a filename starts with a '/' in cel_custom [mappings] assume it is
a absolute file path and not relative filename/path to
AST_LOG_DIR/cel_custom/
#### app_voicemail: Fix ill-formatted pager emails with custom subject.
Author: Naveen Albert
Date: 2024-09-24
Add missing end-of-headers newline to pager emails with custom
subjects, since this was missing from this code path.
Resolves: #902
#### res_pjsip_pubsub: Persist subscription 'generator_data' in sorcery
Author: Sean Bright
Date: 2024-09-23
Fixes #895
#### Fix application references to Background
Author: George Joseph
Date: 2024-09-20
The app is actually named "BackGround" but several references
in XML documentation were spelled "Background" with the lower
case "g". This was causing documentation links to return
"not found" messages.
#### manager.conf.sample: Fix mathcing typo
Author: George Joseph
Date: 2024-09-24
#### manager: Enhance event filtering for performance
Author: George Joseph
Date: 2024-07-31
UserNote: You can now perform more granular filtering on events
in manager.conf using expressions like
`eventfilter(name(Newchannel),header(Channel),method(starts_with)) = PJSIP/`
This is much more efficient than
`eventfilter = Event: Newchannel.*Channel: PJSIP/`
Full syntax guide is in configs/samples/manager.conf.sample.
#### manager.c: Split XML documentation to manager_doc.xml
Author: George Joseph
Date: 2024-08-01
#### db.c: Remove limit on family/key length
Author: George Joseph
Date: 2024-09-11
Consumers like media_cache have been running into issues with
the previous astdb "/family/key" limit of 253 bytes when needing
to store things like long URIs. An Amazon S3 URI is a good example
of this. Now, instead of using a static 256 byte buffer for
"/family/key", we use ast_asprintf() to dynamically create it.
Both test_db.c and test_media_cache.c were also updated to use
keys/URIs over the old 253 character limit.
Resolves: #881
UserNote: The `ast_db_*()` APIs have had the 253 byte limit on
"/family/key" removed and will now accept families and keys with a
total length of up to SQLITE_MAX_LENGTH (currently 1e9!). This
affects the `DB*` dialplan applications, dialplan functions,
manager actions and `databse` CLI commands. Since the
media_cache also uses the `ast_db_*()` APIs, you can now store
resources with URIs longer than 253 bytes.

View File

@@ -1,65 +0,0 @@
## Change Log for Release asterisk-20.11.1
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.11.1.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.11.0...20.11.1)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.11.1.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 1
- Commit Authors: 1
- Issues Resolved: 0
- Security Advisories Resolved: 1
- [GHSA-33x6-fj46-6rfh](https://github.com/asterisk/asterisk/security/advisories/GHSA-33x6-fj46-6rfh): Path traversal via AMI ListCategories allows access to outside files
### User Notes:
- #### manager.c: Restrict ListCategories to the configuration directory.
The ListCategories AMI action now restricts files to the
configured configuration directory.
### Upgrade Notes:
### Commit Authors:
- Ben Ford: (1)
## Issue and Commit Detail:
### Closed Issues:
- !GHSA-33x6-fj46-6rfh: Path traversal via AMI ListCategories allows access to outside files
### Commits By Author:
- #### Ben Ford (1):
- manager.c: Restrict ListCategories to the configuration directory.
### Commit List:
- manager.c: Restrict ListCategories to the configuration directory.
### Commit Details:
#### manager.c: Restrict ListCategories to the configuration directory.
Author: Ben Ford
Date: 2024-12-17
When using the ListCategories AMI action, it was possible to traverse
upwards through the directories to files outside of the configured
configuration directory. This action is now restricted to the configured
directory and an error will now be returned if the specified file is
outside of this limitation.
Resolves: #GHSA-33x6-fj46-6rfh
UserNote: The ListCategories AMI action now restricts files to the
configured configuration directory.

File diff suppressed because it is too large Load Diff

View File

@@ -1,575 +0,0 @@
<html><head><title>ChangeLog for asterisk-20.13.0</title></head><body>
<h2>Change Log for Release asterisk-20.13.0</h2>
<h3>Links:</h3>
<ul>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.13.0.html">Full ChangeLog</a> </li>
<li><a href="https://github.com/asterisk/asterisk/compare/20.12.0...20.13.0">GitHub Diff</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.13.0.tar.gz">Tarball</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk">Downloads</a> </li>
</ul>
<h3>Summary:</h3>
<ul>
<li>Commits: 29</li>
<li>Commit Authors: 12</li>
<li>Issues Resolved: 12</li>
<li>Security Advisories Resolved: 0</li>
</ul>
<h3>User Notes:</h3>
<ul>
<li>
<h4>ari/pjsip: Make it possible to control transfers through ARI</h4>
Call transfers on the PJSIP channel can now be controlled by
ARI. This can be enabled by using the PJSIP_TRANSFER_HANDLING(ari-only)
dialplan function.</li>
</ul>
<h3>Upgrade Notes:</h3>
<h3>Commit Authors:</h3>
<ul>
<li>Allan Nathanson: (1)</li>
<li>Ben Ford: (1)</li>
<li>Fabriziopicconi: (1)</li>
<li>George Joseph: (11)</li>
<li>Holger Hans Peter Freyther: (1)</li>
<li>Jeremy Lainé: (1)</li>
<li>Joshua Elson: (1)</li>
<li>Luz Paz: (3)</li>
<li>Maximilian Fridrich: (1)</li>
<li>Mike Bradeen: (1)</li>
<li>Naveen Albert: (1)</li>
<li>Sean Bright: (6)</li>
</ul>
<h2>Issue and Commit Detail:</h2>
<h3>Closed Issues:</h3>
<ul>
<li>211: [bug]: stasis: Off-nominal channel leave causes bridge to be destroyed</li>
<li>1085: [bug]: utils: Compilation failure with DEVMODE due to old-style definitions</li>
<li>1101: [bug]: when setting a var with a double quotes and using Set(HASH)</li>
<li>1109: [bug]: Off nominal memory leak in res/ari/resource_channels.c</li>
<li>1112: [bug]: STIR/SHAKEN verification doesn't allow anonymous callerid to be passed to the dialplan.</li>
<li>1119: [bug]: Realtime database not working after upgrade from 22.0.0 to 22.2.0</li>
<li>1122: Need status on CVE-2024-57520 claim.</li>
<li>1124: [bug]: Race condition between bridge and channel delete can over-write cause code set in hangup.</li>
<li>1131: [bug]: CHANGES link broken in README.md</li>
<li>1135: [bug]: Problems with video decoding due to RTP marker bit set</li>
<li>1149: [bug]: res_pjsip: Mismatch in tcp_keepalive_enable causes not to enable</li>
<li>1164: [bug]: WARNING Message in messages.log for res_curl.conf [globals]</li>
</ul>
<h3>Commits By Author:</h3>
<ul>
<li>
<h4>Allan Nathanson (1):</h4>
</li>
<li>
<p>config.c: #include of non-existent file should not crash</p>
</li>
<li>
<h4>Ben Ford (1):</h4>
</li>
<li>
<p>documentation: Update Gosub, Goto, and add new documentationtype.</p>
</li>
<li>
<h4>George Joseph (11):</h4>
</li>
<li>docs: Add version information to ARI resources and methods.</li>
<li>docs: Add version information to AGI command XML elements.</li>
<li>func_strings.c: Prevent SEGV in HASH single-argument mode.</li>
<li>resource_channels.c: Fix memory leak in ast_ari_channels_external_media.</li>
<li>res_stir_shaken: Allow missing or anonymous CID to continue to the dialplan.</li>
<li>res_config_pgsql: Fix regression that removed dbname config.</li>
<li>bridging: Fix multiple bridging issues causing SEGVs and FRACKs.</li>
<li>swagger_model.py: Fix invalid escape sequence in get_list_parameter_type().</li>
<li>manager.c: Check for restricted file in action_createconfig.</li>
<li>README.md: Updates and Fixes</li>
<li>
<p>res_pjsip_outbound_registration.c: Remove xpointer reference to user_agent.</p>
</li>
<li>
<h4>Holger Hans Peter Freyther (1):</h4>
</li>
<li>
<p>ari/pjsip: Make it possible to control transfers through ARI</p>
</li>
<li>
<h4>Jeremy Lainé (1):</h4>
</li>
<li>
<p>docs: Fix minor typo in MixMonitor AMI action</p>
</li>
<li>
<h4>Joshua Elson (1):</h4>
</li>
<li>
<p>fix: Correct default flag for tcp_keepalive_enable option</p>
</li>
<li>
<h4>Luz Paz (3):</h4>
</li>
<li>docs: Fix various typos in main/ Found via `codespell -q 3 -S "./CREDITS" -L a..</li>
<li>docs: Fix various typos in channels/ Found via `codespell -q 3 -S "./CREDITS,*..</li>
<li>
<p>docs: Fix typos in cdr/ Found via codespell</p>
</li>
<li>
<h4>Maximilian Fridrich (1):</h4>
</li>
<li>
<p>Revert "res_rtp_asterisk.c: Set Mark on rtp when timestamp skew is too big"</p>
</li>
<li>
<h4>Mike Bradeen (1):</h4>
</li>
<li>
<p>bridge_channel: don't set cause code on channel during bridge delete if alread..</p>
</li>
<li>
<h4>Naveen Albert (1):</h4>
</li>
<li>
<p>utils: Disable old style definition warnings for libdb.</p>
</li>
<li>
<h4>Sean Bright (6):</h4>
</li>
<li>docs: Indent <since> tags.</li>
<li>channel.c: Remove dead AST_GENERATOR_FD code.</li>
<li>res_rtp_asterisk.c: Use correct timeout value for T.140 RED timer.</li>
<li>docs: AMI documentation fixes.</li>
<li>res_rtp_asterisk.c: Don't truncate spec-compliant <code>ice-ufrag</code> or <code>ice-pwd</code>.</li>
<li>
<p>res_config_curl.c: Remove unnecessary warnings.</p>
</li>
<li>
<h4>fabriziopicconi (1):</h4>
</li>
<li>rtp.conf.sample: Correct stunaddr example.</li>
</ul>
<h3>Commit List:</h3>
<ul>
<li>documentation: Update Gosub, Goto, and add new documentationtype.</li>
<li>res_config_curl.c: Remove unnecessary warnings.</li>
<li>res_pjsip_outbound_registration.c: Remove xpointer reference to user_agent.</li>
<li>README.md: Updates and Fixes</li>
<li>res_rtp_asterisk.c: Don't truncate spec-compliant <code>ice-ufrag</code> or <code>ice-pwd</code>.</li>
<li>fix: Correct default flag for tcp_keepalive_enable option</li>
<li>docs: AMI documentation fixes.</li>
<li>config.c: #include of non-existent file should not crash</li>
<li>manager.c: Check for restricted file in action_createconfig.</li>
<li>swagger_model.py: Fix invalid escape sequence in get_list_parameter_type().</li>
<li>Revert "res_rtp_asterisk.c: Set Mark on rtp when timestamp skew is too big"</li>
<li>res_rtp_asterisk.c: Use correct timeout value for T.140 RED timer.</li>
<li>docs: Fix typos in cdr/ Found via codespell</li>
<li>bridging: Fix multiple bridging issues causing SEGVs and FRACKs.</li>
<li>res_config_pgsql: Fix regression that removed dbname config.</li>
<li>res_stir_shaken: Allow missing or anonymous CID to continue to the dialplan.</li>
<li>resource_channels.c: Fix memory leak in ast_ari_channels_external_media.</li>
<li>ari/pjsip: Make it possible to control transfers through ARI</li>
<li>channel.c: Remove dead AST_GENERATOR_FD code.</li>
<li>func_strings.c: Prevent SEGV in HASH single-argument mode.</li>
<li>docs: Add version information to AGI command XML elements.</li>
<li>docs: Fix minor typo in MixMonitor AMI action</li>
<li>utils: Disable old style definition warnings for libdb.</li>
<li>rtp.conf.sample: Correct stunaddr example.</li>
<li>docs: Add version information to ARI resources and methods.</li>
<li>docs: Indent <since> tags.</li>
</ul>
<h3>Commit Details:</h3>
<h4>documentation: Update Gosub, Goto, and add new documentationtype.</h4>
<p>Author: Ben Ford
Date: 2025-03-14</p>
<p>Gosub and Goto were not displaying their syntax correctly on the docs
site. This change adds a new way to specify an optional context, an
optional extension, and a required priority that the xml stylesheet can
parse without having to know which optional parameters come in which
order. In Asterisk, it looks like this:</p>
<pre><code>parameter name="context" documentationtype="dialplan_context"
parameter name="extension" documentationtype="dialplan_extension"
parameter name="priority" documentationtype="dialplan_priority" required="true"
</code></pre>
<p>The stylesheet will ignore the context and extension parameters, but for
priority, it will automatically inject the following:</p>
<pre><code>[[context,]extension,]priority
</code></pre>
<p>This is the correct oder for applications such as Gosub and Goto.</p>
<h4>res_config_curl.c: Remove unnecessary warnings.</h4>
<p>Author: Sean Bright
Date: 2025-03-17</p>
<p>Resolves: #1164</p>
<h4>res_pjsip_outbound_registration.c: Remove xpointer reference to user_agent.</h4>
<p>Author: George Joseph
Date: 2025-03-14</p>
<p>Commit e86f937e added AMI documentation to the module but the cherry-pick
from master to the 20 branch pulled in an xpointer reference to the
<code>user_agent</code> config option which doesn't actually exist in 20. This causes
asterisk to fail to start because it can't load the core-en_US.xml
documentation file. The CI cherry-pick tests should have caught this but
there was bug in the cherry-picker that was causing the commits to be
cherry-picked to the wrong branch. Just removing the xpointer reference
resolves the issue.</p>
<h4>README.md: Updates and Fixes</h4>
<p>Author: George Joseph
Date: 2025-03-05</p>
<ul>
<li>Outdated information has been removed.</li>
<li>New links added.</li>
<li>Placeholder added for link to change logs.</li>
</ul>
<p>Going forward, the release process will create HTML versions of the README
and change log and will update the link in the README to the current
change log for the branch...</p>
<ul>
<li>In the development branches, the link will always point to the current
release on GitHub.</li>
<li>In the "releases/*" branches and the tarballs, the link will point to the
ChangeLogs/ChangeLog-<version>.html file in the source directory.</li>
<li>On the downloads website, the link will point to the
ChangeLog-<version>.html file in the same directory.</li>
</ul>
<p>Resolves: #1131</p>
<h4>res_rtp_asterisk.c: Don't truncate spec-compliant <code>ice-ufrag</code> or <code>ice-pwd</code>.</h4>
<p>Author: Sean Bright
Date: 2025-03-07</p>
<p>RFC 8839[1] indicates that the <code>ice-ufrag</code> and <code>ice-pwd</code> attributes
can be up to 256 bytes long. While we don't generate values of that
size, we should be able to accomodate them without truncating.</p>
<ol>
<li>https://www.rfc-editor.org/rfc/rfc8839#name-ice-ufrag-and-ice-pwd-attri</li>
</ol>
<h4>fix: Correct default flag for tcp_keepalive_enable option</h4>
<p>Author: Joshua Elson
Date: 2025-03-06</p>
<p>Resolves an issue where the tcp_keepalive_enable option was not properly enabled in the sample configuration due to an incorrect default flag setting.</p>
<p>Fixes: #1149</p>
<h4>docs: AMI documentation fixes.</h4>
<p>Author: Sean Bright
Date: 2025-02-18</p>
<p>Most of this patch is adding missing PJSIP-related event
documentation, but the one functional change was adding a sorcery
to-string handler for endpoint's <code>redirect_method</code> which was not
showing up in the AMI event details or <code>pjsip show endpoint
&lt;endpoint&gt;</code> output.</p>
<p>The rest of the changes are summarized below:</p>
<ul>
<li>app_agent_pool.c: Typo fix Epoche -&gt; Epoch.</li>
<li>stasis_bridges.c: Add missing AttendedTransfer properties.</li>
<li>stasis_channels.c: Add missing AgentLogoff properties.</li>
<li>pjsip_manager.xml:<ul>
<li>Add missing AorList properties.</li>
<li>Add missing AorDetail properties.</li>
<li>Add missing ContactList properties.</li>
<li>Add missing ContactStatusDetail properties.</li>
<li>Add missing EventDetail properties.</li>
<li>Add missing AuthList properties.</li>
<li>Add missing AuthDetail properties.</li>
<li>Add missing TransportDetail properties.</li>
<li>Add missing EndpointList properties.</li>
<li>Add missing IdentifyDetail properties.</li>
</ul>
</li>
<li>res_pjsip_registrar.c: Add missing InboundRegistrationDetail documentation.</li>
<li>res_pjsip_pubsub.c:<ul>
<li>Add missing ResourceListDetail documentation.</li>
<li>Add missing InboundSubscriptionDetail documentation.</li>
<li>Add missing OutboundSubscriptionDetail documentation.</li>
</ul>
</li>
<li>res_pjsip_outbound_registration.c: Add missing OutboundRegistrationDetail documentation.</li>
</ul>
<h4>config.c: #include of non-existent file should not crash</h4>
<p>Author: Allan Nathanson
Date: 2025-03-03</p>
<p>Corrects a segmentation fault when a configuration file has a #include
statement that referenced a file that does not exist.</p>
<p>Resolves: https://github.com/asterisk/asterisk/issues/1139</p>
<h4>manager.c: Check for restricted file in action_createconfig.</h4>
<p>Author: George Joseph
Date: 2025-03-03</p>
<p>The <code>CreateConfig</code> manager action now ensures that a config file can
only be created in the AST_CONFIG_DIR unless <code>live_dangerously</code> is set.</p>
<p>Resolves: #1122</p>
<h4>swagger_model.py: Fix invalid escape sequence in get_list_parameter_type().</h4>
<p>Author: George Joseph
Date: 2025-03-04</p>
<p>Recent python versions complain when backslashes in strings create invalid
escape sequences. This causes issues for strings used as regex patterns like
<code>'^List\[(.*)\]$'</code> where you want the regex parser to treat <code>[</code> and <code>]</code>
as literals. Double-backslashing is one way to fix it but simply converting
the string to a raw string <code>re.match(r'^List\[(.*)\]$', text)</code> is easier
and less error prone.</p>
<h4>Revert "res_rtp_asterisk.c: Set Mark on rtp when timestamp skew is too big"</h4>
<p>Author: Maximilian Fridrich
Date: 2025-02-28</p>
<p>This reverts commit f30ad96b3f467739c38ff415e80bffc4afff1da7.</p>
<p>The original change was not RFC compliant and caused issues because it
set the RTP marker bit in cases when it shouldn't be set. See the
linked issue #1135 for a detailed explanation.</p>
<p>Fixes: #1135.</p>
<h4>res_rtp_asterisk.c: Use correct timeout value for T.140 RED timer.</h4>
<p>Author: Sean Bright
Date: 2025-02-24</p>
<p>Found while reviewing #1128</p>
<h4>docs: Fix typos in cdr/ Found via codespell</h4>
<p>Author: Luz Paz
Date: 2025-02-12</p>
<h4>docs: Fix various typos in channels/ Found via `codespell -q 3 -S "./CREDITS,*..</h4>
<p>Author: Luz Paz
Date: 2025-02-04</p>
<h4>docs: Fix various typos in main/ Found via `codespell -q 3 -S "./CREDITS" -L a..</h4>
<p>Author: Luz Paz
Date: 2025-02-04</p>
<h4>bridging: Fix multiple bridging issues causing SEGVs and FRACKs.</h4>
<p>Author: George Joseph
Date: 2025-01-22</p>
<p>Issues:</p>
<ul>
<li>
<p>The bridging core allowed multiple bridges to be created with the same
unique bridgeId at the same time. Only the last bridge created with the
duplicate name was actually saved to the core bridges container.</p>
</li>
<li>
<p>The bridging core was creating a stasis topic for the bridge and saving it
in the bridge-&gt;topic field but not increasing its reference count. In the
case where two bridges were created with the same uniqueid (which is also
the topic name), the second bridge would get the <em>existing</em> topic the first
bridge created. When the first bridge was destroyed, it would take the
topic with it so when the second bridge attempted to publish a message to
it it either FRACKed or SEGVd.</p>
</li>
<li>
<p>The bridge destructor, which also destroys the bridge topic, is run from the
bridge manager thread not the caller's thread. This makes it possible for
an ARI developer to create a new one with the same uniqueid believing the
old one was destroyed when, in fact, the old one's destructor hadn't
completed. This could cause the new bridge to get the old one's topic just
before the topic was destroyed. When the new bridge attempted to publish
a message on that topic, asterisk could either FRACK or SEGV.</p>
</li>
<li>
<p>The ARI bridges resource also allowed multiple bridges to be created with
the same uniqueid but it kept the duplicate bridges in its app_bridges
container. This created a situation where if you added two bridges with
the same "bridge1" uniqueid, all operations on "bridge1" were performed on
the first bridge created and the second was basically orphaned. If you
attempted to delete what you thought was the second bridge, you actually
deleted the first one created.</p>
</li>
</ul>
<p>Changes:</p>
<ul>
<li>
<p>A new API <code>ast_bridge_topic_exists(uniqueid)</code> was created to determine if
a topic already exists for a bridge.</p>
</li>
<li>
<p><code>bridge_base_init()</code> in bridge.c and <code>ast_ari_bridges_create()</code> in
resource_bridges.c now call <code>ast_bridge_topic_exists(uniqueid)</code> to check
if a bridge with the requested uniqueid already exists and will fail if it
does.</p>
</li>
<li>
<p><code>bridge_register()</code> in bridges.c now checks the core bridges container to
make sure a bridge doesn't already exist with the requested uniqueid.
Although most callers of <code>bridge_register()</code> will have already called
<code>bridge_base_init()</code>, which will now fail on duplicate bridges, there
is no guarantee of this so we must check again.</p>
</li>
<li>
<p>The core bridges container allocation was changed to reject duplicate
uniqueids instead of silently replacing an existing one. This is a "belt
and suspenders" check.</p>
</li>
<li>
<p>A global mutex was added to bridge.c to prevent concurrent calls to
<code>bridge_base_init()</code> and <code>bridge_register()</code>.</p>
</li>
<li>
<p>Even though you can no longer create multiple bridges with the same uniqueid
at the same time, it's still possible that the bridge topic might be
destroyed while a second bridge with the same uniqueid was trying to use
it. To address this, the bridging core now increments the reference count
on bridge-&gt;topic when a bridge is created and decrements it when the
bridge is destroyed.</p>
</li>
<li>
<p><code>bridge_create_common()</code> in res_stasis.c now checks the stasis app_bridges
container to make sure a bridge with the requested uniqueid doesn't already
exist. This may seem like overkill but there are so many entrypoints to
bridge creation that we need to be safe and catch issues as soon in the
process as possible.</p>
</li>
<li>
<p>The stasis app_bridges container allocation was changed to reject duplicate
uniqueids instead of adding them. This is a "belt and suspenders" check.</p>
</li>
<li>
<p>The <code>bridge show all</code> CLI command now shows the bridge name as well as the
bridge id.</p>
</li>
<li>
<p>Response code 409 "Conflict" was added as a possible response from the ARI
bridge create resources to signal that a bridge with the requested uniqueid
already exists.</p>
</li>
<li>
<p>Additional debugging was added to multiple bridging and stasis files.</p>
</li>
</ul>
<p>Resolves: #211</p>
<h4>bridge_channel: don't set cause code on channel during bridge delete if alread..</h4>
<p>Author: Mike Bradeen
Date: 2025-02-18</p>
<p>Due to a potential race condition via ARI when hanging up a channel hangup with cause
while also deleting a bridge containing that channel, the bridge delete can over-write
the hangup cause code resulting in Normal Call Clearing instead of the set value.</p>
<p>With this change, bridge deletion will only set the hangup code if it hasn't been
previously set.</p>
<p>Resolves: #1124</p>
<h4>res_config_pgsql: Fix regression that removed dbname config.</h4>
<p>Author: George Joseph
Date: 2025-02-11</p>
<p>A recent commit accidentally removed the code that sets dbname.
This commit adds it back in.</p>
<p>Resolves: #1119</p>
<h4>res_stir_shaken: Allow missing or anonymous CID to continue to the dialplan.</h4>
<p>Author: George Joseph
Date: 2025-02-05</p>
<p>The verification check for missing or anonymous callerid was happening before
the endpoint's profile was retrieved which meant that the failure_action
parameter wasn't available. Therefore, if verification was enabled and there
was no callerid or it was "anonymous", the call was immediately terminated
instead of giving the dialplan the ability to decide what to do with the call.</p>
<ul>
<li>
<p>The callerid check now happens after the verification context is created and
the endpoint's stir_shaken_profile is available.</p>
</li>
<li>
<p>The check now processes the callerid failure just as it does for other
verification failures and respects the failure_action parameter. If set
to "continue" or "continue_return_reason", <code>STIR_SHAKEN(0,verify_result)</code>
in the dialplan will return "invalid_or_no_callerid".</p>
</li>
<li>
<p>If the endpoint's failure_action is "reject_request", the call will be
rejected with <code>433 "Anonymity Disallowed"</code>.</p>
</li>
<li>
<p>If the endpoint's failure_action is "continue_return_reason", the call will
continue but a <code>Reason: STIR; cause=433; text="Anonymity Disallowed"</code>
header will be added to the next provisional or final response.</p>
</li>
</ul>
<p>Resolves: #1112</p>
<h4>resource_channels.c: Fix memory leak in ast_ari_channels_external_media.</h4>
<p>Author: George Joseph
Date: 2025-02-04</p>
<p>Between ast_ari_channels_external_media(), external_media_rtp_udp(),
and external_media_audiosocket_tcp(), the <code>variables</code> structure being passed
around wasn't being cleaned up properly when there was a failure.</p>
<ul>
<li>
<p>In ast_ari_channels_external_media(), the <code>variables</code> structure is now
defined with RAII_VAR to ensure it always gets cleaned up.</p>
</li>
<li>
<p>The ast_variables_destroy() call was removed from external_media_rtp_udp().</p>
</li>
<li>
<p>The ast_variables_destroy() call was removed from
external_media_audiosocket_tcp(), its <code>endpoint</code> allocation was changed to
to use ast_asprintf() as external_media_rtp_udp() does, and it now
returns an error on failure.</p>
</li>
<li>
<p>ast_ari_channels_external_media() now checks the new return code from
external_media_audiosocket_tcp() and sets the appropriate error response.</p>
</li>
</ul>
<p>Resolves: #1109</p>
<h4>ari/pjsip: Make it possible to control transfers through ARI</h4>
<p>Author: Holger Hans Peter Freyther
Date: 2024-06-15</p>
<p>Introduce a ChannelTransfer event and the ability to notify progress to
ARI. Implement emitting this event from the PJSIP channel instead of
handling the transfer in Asterisk when configured.</p>
<p>Introduce a dialplan function to the PJSIP channel to switch between the
"core" and "ari-only" behavior.</p>
<p>UserNote: Call transfers on the PJSIP channel can now be controlled by
ARI. This can be enabled by using the PJSIP_TRANSFER_HANDLING(ari-only)
dialplan function.</p>
<h4>channel.c: Remove dead AST_GENERATOR_FD code.</h4>
<p>Author: Sean Bright
Date: 2025-02-06</p>
<p>Nothing ever sets the <code>AST_GENERATOR_FD</code>, so this block of code will
never execute. It also is the only place where the <code>generate</code> callback
is called with the channel lock held which made it difficult to reason
about the thread safety of <code>ast_generator</code>s.</p>
<p>In passing, also note that <code>AST_AGENT_FD</code> isn't used either.</p>
<h4>func_strings.c: Prevent SEGV in HASH single-argument mode.</h4>
<p>Author: George Joseph
Date: 2025-01-30</p>
<p>When in single-argument mode (very rarely used), a malformation of a column
name (also very rare) could cause a NULL to be returned when retrieving the
channel variable for that column. Passing that to strncat causes a SEGV. We
now check for the NULL and print a warning message.</p>
<p>Resolves: #1101</p>
<h4>docs: Add version information to AGI command XML elements.</h4>
<p>Author: George Joseph
Date: 2025-01-24</p>
<p>This process was a bit different than the others because everything
is in the same file, there's an array that contains the command
names and their handler functions, and the last command was created
over 15 years ago.</p>
<ul>
<li>Dump a <code>git blame</code> of res/res_agi.c from BEFORE the handle_* prototypes
were changed.</li>
<li>Create a command &lt;&gt; handler function xref by parsing the the agi_command
array.</li>
<li>For each entry, grep the function definition line "static int handle_*"
from the git blame output and capture the commit. This will be the
commit the command was created in.</li>
<li>Do a <code>git tag --contains &lt;commit&gt; | sort -V | head -1</code> to get the
tag the function was created in.</li>
<li>Add a single since/version element to the command XML. Multiple versions
aren't supported here because the branching and tagging scheme changed
several times in the 2000's.</li>
</ul>
<h4>docs: Fix minor typo in MixMonitor AMI action</h4>
<p>Author: Jeremy Lainé
Date: 2025-01-28</p>
<p>The <code>Options</code> argument was erroneously documented as lowercase
<code>options</code>.</p>
<h4>utils: Disable old style definition warnings for libdb.</h4>
<p>Author: Naveen Albert
Date: 2025-01-23</p>
<p>Newer versions of gcc now warn about old style definitions, such
as those in libdb, which causes compilation failure with DEVMODE
enabled. Ignore these warnings for libdb.</p>
<p>Resolves: #1085</p>
<h4>rtp.conf.sample: Correct stunaddr example.</h4>
<p>Author: fabriziopicconi
Date: 2024-09-25</p>
<h4>docs: Add version information to ARI resources and methods.</h4>
<p>Author: George Joseph
Date: 2025-01-27</p>
<ul>
<li>
<p>Dump a git blame of each file in rest-api/api-docs.</p>
</li>
<li>
<p>Get the commit for each "resourcePath" and "httpMethod" entry.</p>
</li>
<li>
<p>Find the tags for each commit (same as other processes).</p>
</li>
<li>
<p>Insert a "since" array after each "resourcePath" and "httpMethod" entry.</p>
</li>
</ul>
<h4>docs: Indent <since> tags.</h4>
<p>Author: Sean Bright
Date: 2025-01-23</p>
<p>Also updates the 'since' of applications/functions that existed before
XML documentation was introduced (1.6.2.0).</p>
</body></html>

View File

@@ -1,589 +0,0 @@
## Change Log for Release asterisk-20.13.0
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.13.0.html)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.12.0...20.13.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.13.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 29
- Commit Authors: 12
- Issues Resolved: 12
- Security Advisories Resolved: 0
### User Notes:
- #### ari/pjsip: Make it possible to control transfers through ARI
Call transfers on the PJSIP channel can now be controlled by
ARI. This can be enabled by using the PJSIP_TRANSFER_HANDLING(ari-only)
dialplan function.
### Upgrade Notes:
### Commit Authors:
- Allan Nathanson: (1)
- Ben Ford: (1)
- Fabriziopicconi: (1)
- George Joseph: (11)
- Holger Hans Peter Freyther: (1)
- Jeremy Lainé: (1)
- Joshua Elson: (1)
- Luz Paz: (3)
- Maximilian Fridrich: (1)
- Mike Bradeen: (1)
- Naveen Albert: (1)
- Sean Bright: (6)
## Issue and Commit Detail:
### Closed Issues:
- 211: [bug]: stasis: Off-nominal channel leave causes bridge to be destroyed
- 1085: [bug]: utils: Compilation failure with DEVMODE due to old-style definitions
- 1101: [bug]: when setting a var with a double quotes and using Set(HASH)
- 1109: [bug]: Off nominal memory leak in res/ari/resource_channels.c
- 1112: [bug]: STIR/SHAKEN verification doesn't allow anonymous callerid to be passed to the dialplan.
- 1119: [bug]: Realtime database not working after upgrade from 22.0.0 to 22.2.0
- 1122: Need status on CVE-2024-57520 claim.
- 1124: [bug]: Race condition between bridge and channel delete can over-write cause code set in hangup.
- 1131: [bug]: CHANGES link broken in README.md
- 1135: [bug]: Problems with video decoding due to RTP marker bit set
- 1149: [bug]: res_pjsip: Mismatch in tcp_keepalive_enable causes not to enable
- 1164: [bug]: WARNING Message in messages.log for res_curl.conf [globals]
### Commits By Author:
- #### Allan Nathanson (1):
- config.c: #include of non-existent file should not crash
- #### Ben Ford (1):
- documentation: Update Gosub, Goto, and add new documentationtype.
- #### George Joseph (11):
- docs: Add version information to ARI resources and methods.
- docs: Add version information to AGI command XML elements.
- func_strings.c: Prevent SEGV in HASH single-argument mode.
- resource_channels.c: Fix memory leak in ast_ari_channels_external_media.
- res_stir_shaken: Allow missing or anonymous CID to continue to the dialplan.
- res_config_pgsql: Fix regression that removed dbname config.
- bridging: Fix multiple bridging issues causing SEGVs and FRACKs.
- swagger_model.py: Fix invalid escape sequence in get_list_parameter_type().
- manager.c: Check for restricted file in action_createconfig.
- README.md: Updates and Fixes
- res_pjsip_outbound_registration.c: Remove xpointer reference to user_agent.
- #### Holger Hans Peter Freyther (1):
- ari/pjsip: Make it possible to control transfers through ARI
- #### Jeremy Lainé (1):
- docs: Fix minor typo in MixMonitor AMI action
- #### Joshua Elson (1):
- fix: Correct default flag for tcp_keepalive_enable option
- #### Luz Paz (3):
- docs: Fix various typos in main/ Found via `codespell -q 3 -S "./CREDITS" -L a..
- docs: Fix various typos in channels/ Found via `codespell -q 3 -S "./CREDITS,*..
- docs: Fix typos in cdr/ Found via codespell
- #### Maximilian Fridrich (1):
- Revert "res_rtp_asterisk.c: Set Mark on rtp when timestamp skew is too big"
- #### Mike Bradeen (1):
- bridge_channel: don't set cause code on channel during bridge delete if alread..
- #### Naveen Albert (1):
- utils: Disable old style definition warnings for libdb.
- #### Sean Bright (6):
- docs: Indent <since> tags.
- channel.c: Remove dead AST_GENERATOR_FD code.
- res_rtp_asterisk.c: Use correct timeout value for T.140 RED timer.
- docs: AMI documentation fixes.
- res_rtp_asterisk.c: Don't truncate spec-compliant `ice-ufrag` or `ice-pwd`.
- res_config_curl.c: Remove unnecessary warnings.
- #### fabriziopicconi (1):
- rtp.conf.sample: Correct stunaddr example.
### Commit List:
- documentation: Update Gosub, Goto, and add new documentationtype.
- res_config_curl.c: Remove unnecessary warnings.
- res_pjsip_outbound_registration.c: Remove xpointer reference to user_agent.
- README.md: Updates and Fixes
- res_rtp_asterisk.c: Don't truncate spec-compliant `ice-ufrag` or `ice-pwd`.
- fix: Correct default flag for tcp_keepalive_enable option
- docs: AMI documentation fixes.
- config.c: #include of non-existent file should not crash
- manager.c: Check for restricted file in action_createconfig.
- swagger_model.py: Fix invalid escape sequence in get_list_parameter_type().
- Revert "res_rtp_asterisk.c: Set Mark on rtp when timestamp skew is too big"
- res_rtp_asterisk.c: Use correct timeout value for T.140 RED timer.
- docs: Fix typos in cdr/ Found via codespell
- bridging: Fix multiple bridging issues causing SEGVs and FRACKs.
- res_config_pgsql: Fix regression that removed dbname config.
- res_stir_shaken: Allow missing or anonymous CID to continue to the dialplan.
- resource_channels.c: Fix memory leak in ast_ari_channels_external_media.
- ari/pjsip: Make it possible to control transfers through ARI
- channel.c: Remove dead AST_GENERATOR_FD code.
- func_strings.c: Prevent SEGV in HASH single-argument mode.
- docs: Add version information to AGI command XML elements.
- docs: Fix minor typo in MixMonitor AMI action
- utils: Disable old style definition warnings for libdb.
- rtp.conf.sample: Correct stunaddr example.
- docs: Add version information to ARI resources and methods.
- docs: Indent <since> tags.
### Commit Details:
#### documentation: Update Gosub, Goto, and add new documentationtype.
Author: Ben Ford
Date: 2025-03-14
Gosub and Goto were not displaying their syntax correctly on the docs
site. This change adds a new way to specify an optional context, an
optional extension, and a required priority that the xml stylesheet can
parse without having to know which optional parameters come in which
order. In Asterisk, it looks like this:
parameter name="context" documentationtype="dialplan_context"
parameter name="extension" documentationtype="dialplan_extension"
parameter name="priority" documentationtype="dialplan_priority" required="true"
The stylesheet will ignore the context and extension parameters, but for
priority, it will automatically inject the following:
[[context,]extension,]priority
This is the correct oder for applications such as Gosub and Goto.
#### res_config_curl.c: Remove unnecessary warnings.
Author: Sean Bright
Date: 2025-03-17
Resolves: #1164
#### res_pjsip_outbound_registration.c: Remove xpointer reference to user_agent.
Author: George Joseph
Date: 2025-03-14
Commit e86f937e added AMI documentation to the module but the cherry-pick
from master to the 20 branch pulled in an xpointer reference to the
`user_agent` config option which doesn't actually exist in 20. This causes
asterisk to fail to start because it can't load the core-en_US.xml
documentation file. The CI cherry-pick tests should have caught this but
there was bug in the cherry-picker that was causing the commits to be
cherry-picked to the wrong branch. Just removing the xpointer reference
resolves the issue.
#### README.md: Updates and Fixes
Author: George Joseph
Date: 2025-03-05
* Outdated information has been removed.
* New links added.
* Placeholder added for link to change logs.
Going forward, the release process will create HTML versions of the README
and change log and will update the link in the README to the current
change log for the branch...
* In the development branches, the link will always point to the current
release on GitHub.
* In the "releases/*" branches and the tarballs, the link will point to the
ChangeLogs/ChangeLog-<version>.html file in the source directory.
* On the downloads website, the link will point to the
ChangeLog-<version>.html file in the same directory.
Resolves: #1131
#### res_rtp_asterisk.c: Don't truncate spec-compliant `ice-ufrag` or `ice-pwd`.
Author: Sean Bright
Date: 2025-03-07
RFC 8839[1] indicates that the `ice-ufrag` and `ice-pwd` attributes
can be up to 256 bytes long. While we don't generate values of that
size, we should be able to accomodate them without truncating.
1. https://www.rfc-editor.org/rfc/rfc8839#name-ice-ufrag-and-ice-pwd-attri
#### fix: Correct default flag for tcp_keepalive_enable option
Author: Joshua Elson
Date: 2025-03-06
Resolves an issue where the tcp_keepalive_enable option was not properly enabled in the sample configuration due to an incorrect default flag setting.
Fixes: #1149
#### docs: AMI documentation fixes.
Author: Sean Bright
Date: 2025-02-18
Most of this patch is adding missing PJSIP-related event
documentation, but the one functional change was adding a sorcery
to-string handler for endpoint's `redirect_method` which was not
showing up in the AMI event details or `pjsip show endpoint
<endpoint>` output.
The rest of the changes are summarized below:
* app_agent_pool.c: Typo fix Epoche -> Epoch.
* stasis_bridges.c: Add missing AttendedTransfer properties.
* stasis_channels.c: Add missing AgentLogoff properties.
* pjsip_manager.xml:
- Add missing AorList properties.
- Add missing AorDetail properties.
- Add missing ContactList properties.
- Add missing ContactStatusDetail properties.
- Add missing EventDetail properties.
- Add missing AuthList properties.
- Add missing AuthDetail properties.
- Add missing TransportDetail properties.
- Add missing EndpointList properties.
- Add missing IdentifyDetail properties.
* res_pjsip_registrar.c: Add missing InboundRegistrationDetail documentation.
* res_pjsip_pubsub.c:
- Add missing ResourceListDetail documentation.
- Add missing InboundSubscriptionDetail documentation.
- Add missing OutboundSubscriptionDetail documentation.
* res_pjsip_outbound_registration.c: Add missing OutboundRegistrationDetail documentation.
#### config.c: #include of non-existent file should not crash
Author: Allan Nathanson
Date: 2025-03-03
Corrects a segmentation fault when a configuration file has a #include
statement that referenced a file that does not exist.
Resolves: https://github.com/asterisk/asterisk/issues/1139
#### manager.c: Check for restricted file in action_createconfig.
Author: George Joseph
Date: 2025-03-03
The `CreateConfig` manager action now ensures that a config file can
only be created in the AST_CONFIG_DIR unless `live_dangerously` is set.
Resolves: #1122
#### swagger_model.py: Fix invalid escape sequence in get_list_parameter_type().
Author: George Joseph
Date: 2025-03-04
Recent python versions complain when backslashes in strings create invalid
escape sequences. This causes issues for strings used as regex patterns like
`'^List\[(.*)\]$'` where you want the regex parser to treat `[` and `]`
as literals. Double-backslashing is one way to fix it but simply converting
the string to a raw string `re.match(r'^List\[(.*)\]$', text)` is easier
and less error prone.
#### Revert "res_rtp_asterisk.c: Set Mark on rtp when timestamp skew is too big"
Author: Maximilian Fridrich
Date: 2025-02-28
This reverts commit f30ad96b3f467739c38ff415e80bffc4afff1da7.
The original change was not RFC compliant and caused issues because it
set the RTP marker bit in cases when it shouldn't be set. See the
linked issue #1135 for a detailed explanation.
Fixes: #1135.
#### res_rtp_asterisk.c: Use correct timeout value for T.140 RED timer.
Author: Sean Bright
Date: 2025-02-24
Found while reviewing #1128
#### docs: Fix typos in cdr/ Found via codespell
Author: Luz Paz
Date: 2025-02-12
#### docs: Fix various typos in channels/ Found via `codespell -q 3 -S "./CREDITS,*..
Author: Luz Paz
Date: 2025-02-04
#### docs: Fix various typos in main/ Found via `codespell -q 3 -S "./CREDITS" -L a..
Author: Luz Paz
Date: 2025-02-04
#### bridging: Fix multiple bridging issues causing SEGVs and FRACKs.
Author: George Joseph
Date: 2025-01-22
Issues:
* The bridging core allowed multiple bridges to be created with the same
unique bridgeId at the same time. Only the last bridge created with the
duplicate name was actually saved to the core bridges container.
* The bridging core was creating a stasis topic for the bridge and saving it
in the bridge->topic field but not increasing its reference count. In the
case where two bridges were created with the same uniqueid (which is also
the topic name), the second bridge would get the _existing_ topic the first
bridge created. When the first bridge was destroyed, it would take the
topic with it so when the second bridge attempted to publish a message to
it it either FRACKed or SEGVd.
* The bridge destructor, which also destroys the bridge topic, is run from the
bridge manager thread not the caller's thread. This makes it possible for
an ARI developer to create a new one with the same uniqueid believing the
old one was destroyed when, in fact, the old one's destructor hadn't
completed. This could cause the new bridge to get the old one's topic just
before the topic was destroyed. When the new bridge attempted to publish
a message on that topic, asterisk could either FRACK or SEGV.
* The ARI bridges resource also allowed multiple bridges to be created with
the same uniqueid but it kept the duplicate bridges in its app_bridges
container. This created a situation where if you added two bridges with
the same "bridge1" uniqueid, all operations on "bridge1" were performed on
the first bridge created and the second was basically orphaned. If you
attempted to delete what you thought was the second bridge, you actually
deleted the first one created.
Changes:
* A new API `ast_bridge_topic_exists(uniqueid)` was created to determine if
a topic already exists for a bridge.
* `bridge_base_init()` in bridge.c and `ast_ari_bridges_create()` in
resource_bridges.c now call `ast_bridge_topic_exists(uniqueid)` to check
if a bridge with the requested uniqueid already exists and will fail if it
does.
* `bridge_register()` in bridges.c now checks the core bridges container to
make sure a bridge doesn't already exist with the requested uniqueid.
Although most callers of `bridge_register()` will have already called
`bridge_base_init()`, which will now fail on duplicate bridges, there
is no guarantee of this so we must check again.
* The core bridges container allocation was changed to reject duplicate
uniqueids instead of silently replacing an existing one. This is a "belt
and suspenders" check.
* A global mutex was added to bridge.c to prevent concurrent calls to
`bridge_base_init()` and `bridge_register()`.
* Even though you can no longer create multiple bridges with the same uniqueid
at the same time, it's still possible that the bridge topic might be
destroyed while a second bridge with the same uniqueid was trying to use
it. To address this, the bridging core now increments the reference count
on bridge->topic when a bridge is created and decrements it when the
bridge is destroyed.
* `bridge_create_common()` in res_stasis.c now checks the stasis app_bridges
container to make sure a bridge with the requested uniqueid doesn't already
exist. This may seem like overkill but there are so many entrypoints to
bridge creation that we need to be safe and catch issues as soon in the
process as possible.
* The stasis app_bridges container allocation was changed to reject duplicate
uniqueids instead of adding them. This is a "belt and suspenders" check.
* The `bridge show all` CLI command now shows the bridge name as well as the
bridge id.
* Response code 409 "Conflict" was added as a possible response from the ARI
bridge create resources to signal that a bridge with the requested uniqueid
already exists.
* Additional debugging was added to multiple bridging and stasis files.
Resolves: #211
#### bridge_channel: don't set cause code on channel during bridge delete if alread..
Author: Mike Bradeen
Date: 2025-02-18
Due to a potential race condition via ARI when hanging up a channel hangup with cause
while also deleting a bridge containing that channel, the bridge delete can over-write
the hangup cause code resulting in Normal Call Clearing instead of the set value.
With this change, bridge deletion will only set the hangup code if it hasn't been
previously set.
Resolves: #1124
#### res_config_pgsql: Fix regression that removed dbname config.
Author: George Joseph
Date: 2025-02-11
A recent commit accidentally removed the code that sets dbname.
This commit adds it back in.
Resolves: #1119
#### res_stir_shaken: Allow missing or anonymous CID to continue to the dialplan.
Author: George Joseph
Date: 2025-02-05
The verification check for missing or anonymous callerid was happening before
the endpoint's profile was retrieved which meant that the failure_action
parameter wasn't available. Therefore, if verification was enabled and there
was no callerid or it was "anonymous", the call was immediately terminated
instead of giving the dialplan the ability to decide what to do with the call.
* The callerid check now happens after the verification context is created and
the endpoint's stir_shaken_profile is available.
* The check now processes the callerid failure just as it does for other
verification failures and respects the failure_action parameter. If set
to "continue" or "continue_return_reason", `STIR_SHAKEN(0,verify_result)`
in the dialplan will return "invalid_or_no_callerid".
* If the endpoint's failure_action is "reject_request", the call will be
rejected with `433 "Anonymity Disallowed"`.
* If the endpoint's failure_action is "continue_return_reason", the call will
continue but a `Reason: STIR; cause=433; text="Anonymity Disallowed"`
header will be added to the next provisional or final response.
Resolves: #1112
#### resource_channels.c: Fix memory leak in ast_ari_channels_external_media.
Author: George Joseph
Date: 2025-02-04
Between ast_ari_channels_external_media(), external_media_rtp_udp(),
and external_media_audiosocket_tcp(), the `variables` structure being passed
around wasn't being cleaned up properly when there was a failure.
* In ast_ari_channels_external_media(), the `variables` structure is now
defined with RAII_VAR to ensure it always gets cleaned up.
* The ast_variables_destroy() call was removed from external_media_rtp_udp().
* The ast_variables_destroy() call was removed from
external_media_audiosocket_tcp(), its `endpoint` allocation was changed to
to use ast_asprintf() as external_media_rtp_udp() does, and it now
returns an error on failure.
* ast_ari_channels_external_media() now checks the new return code from
external_media_audiosocket_tcp() and sets the appropriate error response.
Resolves: #1109
#### ari/pjsip: Make it possible to control transfers through ARI
Author: Holger Hans Peter Freyther
Date: 2024-06-15
Introduce a ChannelTransfer event and the ability to notify progress to
ARI. Implement emitting this event from the PJSIP channel instead of
handling the transfer in Asterisk when configured.
Introduce a dialplan function to the PJSIP channel to switch between the
"core" and "ari-only" behavior.
UserNote: Call transfers on the PJSIP channel can now be controlled by
ARI. This can be enabled by using the PJSIP_TRANSFER_HANDLING(ari-only)
dialplan function.
#### channel.c: Remove dead AST_GENERATOR_FD code.
Author: Sean Bright
Date: 2025-02-06
Nothing ever sets the `AST_GENERATOR_FD`, so this block of code will
never execute. It also is the only place where the `generate` callback
is called with the channel lock held which made it difficult to reason
about the thread safety of `ast_generator`s.
In passing, also note that `AST_AGENT_FD` isn't used either.
#### func_strings.c: Prevent SEGV in HASH single-argument mode.
Author: George Joseph
Date: 2025-01-30
When in single-argument mode (very rarely used), a malformation of a column
name (also very rare) could cause a NULL to be returned when retrieving the
channel variable for that column. Passing that to strncat causes a SEGV. We
now check for the NULL and print a warning message.
Resolves: #1101
#### docs: Add version information to AGI command XML elements.
Author: George Joseph
Date: 2025-01-24
This process was a bit different than the others because everything
is in the same file, there's an array that contains the command
names and their handler functions, and the last command was created
over 15 years ago.
* Dump a `git blame` of res/res_agi.c from BEFORE the handle_* prototypes
were changed.
* Create a command <> handler function xref by parsing the the agi_command
array.
* For each entry, grep the function definition line "static int handle_*"
from the git blame output and capture the commit. This will be the
commit the command was created in.
* Do a `git tag --contains <commit> | sort -V | head -1` to get the
tag the function was created in.
* Add a single since/version element to the command XML. Multiple versions
aren't supported here because the branching and tagging scheme changed
several times in the 2000's.
#### docs: Fix minor typo in MixMonitor AMI action
Author: Jeremy Lainé
Date: 2025-01-28
The `Options` argument was erroneously documented as lowercase
`options`.
#### utils: Disable old style definition warnings for libdb.
Author: Naveen Albert
Date: 2025-01-23
Newer versions of gcc now warn about old style definitions, such
as those in libdb, which causes compilation failure with DEVMODE
enabled. Ignore these warnings for libdb.
Resolves: #1085
#### rtp.conf.sample: Correct stunaddr example.
Author: fabriziopicconi
Date: 2024-09-25
#### docs: Add version information to ARI resources and methods.
Author: George Joseph
Date: 2025-01-27
* Dump a git blame of each file in rest-api/api-docs.
* Get the commit for each "resourcePath" and "httpMethod" entry.
* Find the tags for each commit (same as other processes).
* Insert a "since" array after each "resourcePath" and "httpMethod" entry.
#### docs: Indent <since> tags.
Author: Sean Bright
Date: 2025-01-23
Also updates the 'since' of applications/functions that existed before
XML documentation was introduced (1.6.2.0).

View File

@@ -1,537 +0,0 @@
<html><head><title>ChangeLog for asterisk-20.14.0</title></head><body>
<h2>Change Log for Release asterisk-20.14.0</h2>
<h3>Links:</h3>
<ul>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.14.0.html">Full ChangeLog</a> </li>
<li><a href="https://github.com/asterisk/asterisk/compare/20.13.0...20.14.0">GitHub Diff</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.14.0.tar.gz">Tarball</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk">Downloads</a> </li>
</ul>
<h3>Summary:</h3>
<ul>
<li>Commits: 24</li>
<li>Commit Authors: 18</li>
<li>Issues Resolved: 12</li>
<li>Security Advisories Resolved: 0</li>
</ul>
<h3>User Notes:</h3>
<ul>
<li>
<h4>stasis/control.c: Set Hangup Cause to No Answer on Dial timeout</h4>
<p>A Dial timeout on POST /channels/{channelId}/dial will now result in a
CANCEL and ChannelDestroyed with cause 19 / User alerting, no answer. Previously
no explicit cause was set, resulting in a cause of 16 / Normal Call Clearing.</p>
</li>
<li>
<h4>contrib: Add systemd service and timer files for malloc trim.</h4>
<p>Service and timer files for systemd have been added to the
contrib/systemd/ directory. If you are experiencing memory issues,
install these files to have "malloc trim" periodically run on the
system.</p>
</li>
<li>
<h4>Add log-caller-id-name option to log Caller ID Name in queue log</h4>
<p>This patch adds a global configuration option, log-caller-id-name, to queues.conf
to control whether the Caller ID name is logged as parameter 4 when a call enters a queue.
When log-caller-id-name=yes, the Caller ID name is included in the queue log,
Any '|' characters in the caller ID name will be replaced with '_'.
(provided its allowed by the existing log_restricted_caller_id rules).
When log-caller-id-name=no (the default), the Caller ID name is omitted.</p>
</li>
<li>
<h4>asterisk.c: Add "pre-init" and "pre-module" capability to cli.conf.</h4>
<p>In cli.conf, you can now define startup commands that run before
core initialization and before module initialization.</p>
</li>
<li>
<h4>audiosocket: added support for DTMF frames</h4>
<p>The AudioSocket protocol now forwards DTMF frames with
payload type 0x03. The payload is a 1-byte ascii representing the DTMF
digit (0-9,*,#...).</p>
</li>
</ul>
<h3>Upgrade Notes:</h3>
<ul>
<li>
<h4>ARI: REST over Websocket</h4>
This commit adds the ability to make ARI REST requests over the same
websocket used to receive events.
See https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/ARI-REST-over-WebSocket/</li>
</ul>
<h3>Commit Authors:</h3>
<ul>
<li>Albrecht Oster: (1)</li>
<li>Alexei Gradinari: (1)</li>
<li>Allan Nathanson: (1)</li>
<li>Andreas Wehrmann: (1)</li>
<li>Ben Ford: (1)</li>
<li>Florent CHAUVEAU: (1)</li>
<li>George Joseph: (4)</li>
<li>Joshua C. Colp: (1)</li>
<li>Luz Paz: (1)</li>
<li>Mark Murawski: (1)</li>
<li>Mike Bradeen: (1)</li>
<li>Mkmer: (1)</li>
<li>Naveen Albert: (3)</li>
<li>Norm Harrison: (2)</li>
<li>Peter Jannesen: (1)</li>
<li>Phoneben: (1)</li>
<li>Sean Bright: (1)</li>
<li>Zhai Liangliang: (1)</li>
</ul>
<h2>Issue and Commit Detail:</h2>
<h3>Closed Issues:</h3>
<ul>
<li>505: [bug]: res_pjproject: ast_sockaddr_cmp() always fails on sockaddrs created by ast_sockaddr_from_pj_sockaddr()</li>
<li>643: [new-feature]: pjsip show contact -- show all details same as AMI PJSIPShowContacts</li>
<li>963: [bug]: missing hangup cause for ARI ChannelDestroyed when Dial times out</li>
<li>1091: [improvement]: app queue :add to queue log callerid name</li>
<li>1144: [bug]: action_redirect don't remove bridge_after_goto data</li>
<li>1171: [improvement]: Need the capability in audiohook.c for fractional (float) type volume adjustments.</li>
<li>1181: [bug]: Incorrect PJSIP Endpoint Device States on Multiple Channels</li>
<li>1190: [bug]: Crash when starting ConfBridge recording over CLI and AMI</li>
<li>1197: [bug]: ChannelHangupRequest does not show cause code in all cases</li>
<li>1206: [improvement]: chan_iax2: Minor improvements to documentation and warning messages.</li>
<li>1220: [bug]: res_pjsip_caller_id: OLI is not parsed if contained in a URI parameter</li>
<li>1224: [improvement]: app_meetme: Removal version is incorrect</li>
</ul>
<h3>Commits By Author:</h3>
<ul>
<li>
<h4>Albrecht Oster (1):</h4>
</li>
<li>
<p>res_pjproject: Fix DTLS client check failing on some platforms</p>
</li>
<li>
<h4>Alexei Gradinari (1):</h4>
</li>
<li>
<p>chan_pjsip: set correct Endpoint Device State on multiple channels</p>
</li>
<li>
<h4>Allan Nathanson (1):</h4>
</li>
<li>
<p>file.c: missing "custom" sound files should not generate warning logs</p>
</li>
<li>
<h4>Andreas Wehrmann (1):</h4>
</li>
<li>
<p>pbx_ael: unregister AELSub application and CLI commands on module load failure</p>
</li>
<li>
<h4>Ben Ford (1):</h4>
</li>
<li>
<p>contrib: Add systemd service and timer files for malloc trim.</p>
</li>
<li>
<h4>Florent CHAUVEAU (1):</h4>
</li>
<li>
<p>audiosocket: added support for DTMF frames</p>
</li>
<li>
<h4>George Joseph (4):</h4>
</li>
<li>ARI: REST over Websocket</li>
<li>ari_websockets: Fix frack if ARI config fails to load.</li>
<li>asterisk.c: Add "pre-init" and "pre-module" capability to cli.conf.</li>
<li>
<p>Prequisites for ARI Outbound Websockets</p>
</li>
<li>
<h4>Joshua C. Colp (1):</h4>
</li>
<li>
<p>channel: Always provide cause code in ChannelHangupRequest.</p>
</li>
<li>
<h4>Luz Paz (1):</h4>
</li>
<li>
<p>docs: Fix typos in apps/</p>
</li>
<li>
<h4>Mark Murawski (1):</h4>
</li>
<li>
<p>chan_pjsip: Add the same details as PJSIPShowContacts to the CLI via 'pjsip s..</p>
</li>
<li>
<h4>Mike Bradeen (1):</h4>
</li>
<li>
<p>stasis/control.c: Set Hangup Cause to No Answer on Dial timeout</p>
</li>
<li>
<h4>Naveen Albert (3):</h4>
</li>
<li>chan_iax2: Minor improvements to documentation and warning messages.</li>
<li>app_meetme: Remove inaccurate removal version from xmldocs.</li>
<li>
<p>res_pjsip_caller_id: Also parse URI parameters for ANI2.</p>
</li>
<li>
<h4>Norm Harrison (2):</h4>
</li>
<li>audiosocket: fix timeout, fix dialplan app exit, server address in logs</li>
<li>
<p>asterisk/channel.h: fix documentation for 'ast_waitfor_nandfds()'</p>
</li>
<li>
<h4>Peter Jannesen (1):</h4>
</li>
<li>
<p>action_redirect: remove after_bridge_goto_info</p>
</li>
<li>
<h4>Sean Bright (1):</h4>
</li>
<li>
<p>app_confbridge: Prevent crash when publishing channel-less event.</p>
</li>
<li>
<h4>Zhai Liangliang (1):</h4>
</li>
<li>
<p>Update config.guess and config.sub</p>
</li>
<li>
<h4>mkmer (1):</h4>
</li>
<li>
<p>audiohook.c: Add ability to adjust volume with float</p>
</li>
<li>
<h4>phoneben (1):</h4>
</li>
<li>Add log-caller-id-name option to log Caller ID Name in queue log</li>
</ul>
<h3>Commit List:</h3>
<ul>
<li>res_pjsip_caller_id: Also parse URI parameters for ANI2.</li>
<li>app_meetme: Remove inaccurate removal version from xmldocs.</li>
<li>docs: Fix typos in apps/</li>
<li>stasis/control.c: Set Hangup Cause to No Answer on Dial timeout</li>
<li>chan_iax2: Minor improvements to documentation and warning messages.</li>
<li>pbx_ael: unregister AELSub application and CLI commands on module load failure</li>
<li>res_pjproject: Fix DTLS client check failing on some platforms</li>
<li>Prequisites for ARI Outbound Websockets</li>
<li>contrib: Add systemd service and timer files for malloc trim.</li>
<li>action_redirect: remove after_bridge_goto_info</li>
<li>channel: Always provide cause code in ChannelHangupRequest.</li>
<li>Add log-caller-id-name option to log Caller ID Name in queue log</li>
<li>asterisk.c: Add "pre-init" and "pre-module" capability to cli.conf.</li>
<li>app_confbridge: Prevent crash when publishing channel-less event.</li>
<li>ari_websockets: Fix frack if ARI config fails to load.</li>
<li>ARI: REST over Websocket</li>
<li>audiohook.c: Add ability to adjust volume with float</li>
<li>audiosocket: added support for DTMF frames</li>
<li>asterisk/channel.h: fix documentation for 'ast_waitfor_nandfds()'</li>
<li>audiosocket: fix timeout, fix dialplan app exit, server address in logs</li>
<li>Update config.guess and config.sub</li>
<li>chan_pjsip: set correct Endpoint Device State on multiple channels</li>
<li>file.c: missing "custom" sound files should not generate warning logs</li>
</ul>
<h3>Commit Details:</h3>
<h4>res_pjsip_caller_id: Also parse URI parameters for ANI2.</h4>
<p>Author: Naveen Albert
Date: 2025-04-26</p>
<p>If the isup-oli was sent as a URI parameter, rather than a header
parameter, it was not being parsed. Make sure we parse both if
needed so the ANI2 is set regardless of which type of parameter
the isup-oli is sent as.</p>
<p>Resolves: #1220</p>
<h4>app_meetme: Remove inaccurate removal version from xmldocs.</h4>
<p>Author: Naveen Albert
Date: 2025-04-26</p>
<p>app_meetme is deprecated but wasn't removed as planned in 21,
so remove the inaccurate removal version.</p>
<p>Resolves: #1224</p>
<h4>docs: Fix typos in apps/</h4>
<p>Author: Luz Paz
Date: 2025-04-09</p>
<p>Found via codespell</p>
<h4>stasis/control.c: Set Hangup Cause to No Answer on Dial timeout</h4>
<p>Author: Mike Bradeen
Date: 2025-04-17</p>
<p>Other Dial operations (dial, app_dial) use Q.850 cause 19 when a dial timeout occurs,
but the Dial command via ARI did not set an explicit reason. This resulted in a
CANCEL with Normal Call Clearing and corresponding ChannelDestroyed.</p>
<p>This change sets the hangup cause to AST_CAUSE_NO_ANSWER to be consistent with the
other operations.</p>
<p>Fixes: #963</p>
<p>UserNote: A Dial timeout on POST /channels/{channelId}/dial will now result in a
CANCEL and ChannelDestroyed with cause 19 / User alerting, no answer. Previously
no explicit cause was set, resulting in a cause of 16 / Normal Call Clearing.</p>
<h4>chan_iax2: Minor improvements to documentation and warning messages.</h4>
<p>Author: Naveen Albert
Date: 2025-04-18</p>
<ul>
<li>Update Dial() documentation for IAX2 to include syntax for RSA
public key names.</li>
<li>Add additional details to a couple warnings to provide more context
when an undecodable frame is received.</li>
</ul>
<p>Resolves: #1206</p>
<h4>pbx_ael: unregister AELSub application and CLI commands on module load failure</h4>
<p>Author: Andreas Wehrmann
Date: 2025-04-18</p>
<p>This fixes crashes/hangs I noticed with Asterisk 20.3.0 and 20.13.0 and quickly found out,
that the AEL module doesn't do proper cleanup when it fails to load.
This happens for example when there are syntax errors and AEL fails to compile in which case pbx_load_module()
returns an error but load_module() doesn't then unregister CLI cmds and the application.</p>
<h4>res_pjproject: Fix DTLS client check failing on some platforms</h4>
<p>Author: Albrecht Oster
Date: 2025-04-10</p>
<p>Certain platforms (mainly BSD derivatives) have an additional length
field in <code>sockaddr_in6</code> and <code>sockaddr_in</code>.
<code>ast_sockaddr_from_pj_sockaddr()</code> does not take this field into account
when copying over values from the <code>pj_sockaddr</code> into the <code>ast_sockaddr</code>.
The resulting <code>ast_sockaddr</code> will have an uninitialized value for
<code>sin6_len</code>/<code>sin_len</code> while the other <code>ast_sockaddr</code> (not converted from
a <code>pj_sockaddr</code>) to check against in <code>ast_sockaddr_pj_sockaddr_cmp()</code>
has the correct length value set.</p>
<p>This has the effect that <code>ast_sockaddr_cmp()</code> will always indicate
an address mismatch, because it does a bitwise comparison, and all DTLS
packets are dropped even if addresses and ports match.</p>
<p><code>ast_sockaddr_from_pj_sockaddr()</code> now checks whether the length fields
are available on the current platform and sets the values accordingly.</p>
<p>Resolves: #505</p>
<h4>Prequisites for ARI Outbound Websockets</h4>
<p>Author: George Joseph
Date: 2025-04-16</p>
<p>stasis:
* Added stasis_app_is_registered().
* Added stasis_app_control_mark_failed().
* Added stasis_app_control_is_failed().
* Fixed res_stasis_device_state so unsubscribe all works properly.
* Modified stasis_app_unregister() to unsubscribe from all event sources.
* Modified stasis_app_exec to return -1 if stasis_app_control_is_failed()
returns true.</p>
<p>http:
* Added ast_http_create_basic_auth_header().</p>
<p>md5:
* Added define for MD5_DIGEST_LENGTH.</p>
<p>tcptls:
* Added flag to ast_tcptls_session_args to suppress connection log messages
to give callers more control over logging.</p>
<p>http_websocket:
* Add flag to ast_websocket_client_options to suppress connection log messages
to give callers more control over logging.
* Added username and password to ast_websocket_client_options to support
outbound basic authentication.
* Added ast_websocket_result_to_str().</p>
<h4>contrib: Add systemd service and timer files for malloc trim.</h4>
<p>Author: Ben Ford
Date: 2025-04-16</p>
<p>Adds two files to the contrib/systemd/ directory that can be installed
to periodically run "malloc trim" on Asterisk. These files do nothing
unless they are explicitly moved to the correct location on the system.
Users who are experiencing Asterisk memory issues can use this service
to potentially help combat the problem. These files can also be
configured to change the start time and interval. See systemd.timer(5)
and systemd.time(7) for more information.</p>
<p>UserNote: Service and timer files for systemd have been added to the
contrib/systemd/ directory. If you are experiencing memory issues,
install these files to have "malloc trim" periodically run on the
system.</p>
<h4>action_redirect: remove after_bridge_goto_info</h4>
<p>Author: Peter Jannesen
Date: 2025-03-13</p>
<p>Under certain circumstances the context/extens/prio are stored in the
after_bridge_goto_info. This info is used when the bridge is broken by
for hangup of the other party. In the situation that the bridge is
broken by an AMI Redirect this info is not used but also not removed.
With the result that when the channel is put back in a bridge and the
bridge is broken the execution continues at the wrong
context/extens/prio.</p>
<p>Resolves: #1144</p>
<h4>channel: Always provide cause code in ChannelHangupRequest.</h4>
<p>Author: Joshua C. Colp
Date: 2025-04-16</p>
<p>When queueing a channel to be hung up a cause code can be
specified in one of two ways:</p>
<ol>
<li>
<p>ast_queue_hangup_with_cause
This function takes in a cause code and queues it as part
of the hangup request, which ultimately results in it being
set on the channel.</p>
</li>
<li>
<p>ast_channel_hangupcause_set + ast_queue_hangup
This combination sets the hangup cause on the channel before
queueing the hangup instead of as part of that process.</p>
</li>
</ol>
<p>In the #2 case the ChannelHangupRequest event would not contain
the cause code. For consistency if a cause code has been set
on the channel it will now be added to the event.</p>
<p>Resolves: #1197</p>
<h4>Add log-caller-id-name option to log Caller ID Name in queue log</h4>
<p>Author: phoneben
Date: 2025-02-28</p>
<p>Add log-caller-id-name option to log Caller ID Name in queue log</p>
<p>This patch introduces a new global configuration option, log-caller-id-name,
to queues.conf to control whether the Caller ID name is logged when a call enters a queue.</p>
<p>When log-caller-id-name=yes, the Caller ID name is logged
as parameter 4 in the queue log, provided its allowed by the
existing log_restricted_caller_id rules. If log-caller-id-name=no (the default),
the Caller ID name is omitted from the logs.</p>
<p>Fixes: #1091</p>
<p>UserNote: This patch adds a global configuration option, log-caller-id-name, to queues.conf
to control whether the Caller ID name is logged as parameter 4 when a call enters a queue.
When log-caller-id-name=yes, the Caller ID name is included in the queue log,
Any '|' characters in the caller ID name will be replaced with '_'.
(provided its allowed by the existing log_restricted_caller_id rules).
When log-caller-id-name=no (the default), the Caller ID name is omitted.</p>
<h4>asterisk.c: Add "pre-init" and "pre-module" capability to cli.conf.</h4>
<p>Author: George Joseph
Date: 2025-04-10</p>
<p>Commands in the "[startup_commands]" section of cli.conf have historically run
after all core and module initialization has been completed and just before
"Asterisk Ready" is printed on the console. This meant that if you
wanted to debug initialization of a specific module, your only option
was to turn on debug for everything by setting "debug" in asterisk.conf.</p>
<p>This commit introduces options to allow you to run CLI commands earlier in
the asterisk startup process.</p>
<p>A command with a value of "pre-init" will run just after logger initialization
but before most core, and all module, initialization.</p>
<p>A command with a value of "pre-module" will run just after all core
initialization but before all module initialization.</p>
<p>A command with a value of "fully-booted" (or "yes" for backwards
compatibility) will run as they always have been...after all
initialization and just before "Asterisk Ready" is printed on the console.</p>
<p>This means you could do this...</p>
<p><code>[startup_commands]
core set debug 3 res_pjsip.so = pre-module
core set debug 0 res_pjsip.so = fully-booted</code></p>
<p>This would turn debugging on for res_pjsip.so to catch any module
initialization debug messages then turn it off again after the module is
loaded.</p>
<p>UserNote: In cli.conf, you can now define startup commands that run before
core initialization and before module initialization.</p>
<h4>app_confbridge: Prevent crash when publishing channel-less event.</h4>
<p>Author: Sean Bright
Date: 2025-04-07</p>
<p>Resolves: #1190</p>
<h4>ari_websockets: Fix frack if ARI config fails to load.</h4>
<p>Author: George Joseph
Date: 2025-04-02</p>
<p>ari_ws_session_registry_dtor() wasn't checking that the container was valid
before running ao2_callback on it to shutdown registered sessions.</p>
<h4>ARI: REST over Websocket</h4>
<p>Author: George Joseph
Date: 2025-03-12</p>
<p>This commit adds the ability to make ARI REST requests over the same
websocket used to receive events.</p>
<p>For full details on how to use the new capability, visit...</p>
<p>https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/ARI-REST-over-WebSocket/</p>
<p>Changes:</p>
<ul>
<li>Added utilities to http.c:<ul>
<li>ast_get_http_method_from_string().</li>
<li>ast_http_parse_post_form().</li>
</ul>
</li>
<li>Added utilities to json.c:<ul>
<li>ast_json_nvp_array_to_ast_variables().</li>
<li>ast_variables_to_json_nvp_array().</li>
</ul>
</li>
<li>Added definitions for new events to carry REST responses.</li>
<li>Created res/ari/ari_websocket_requests.c to house the new request handlers.</li>
<li>Moved non-event specific code out of res/ari/resource_events.c into
res/ari/ari_websockets.c</li>
<li>Refactored res/res_ari.c to move non-http code out of ast_ari_callback()
(which is http specific) and into ast_ari_invoke() so it can be shared
between both the http and websocket transports.</li>
</ul>
<p>UpgradeNote: This commit adds the ability to make ARI REST requests over the same
websocket used to receive events.
See https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/ARI-REST-over-WebSocket/</p>
<h4>audiohook.c: Add ability to adjust volume with float</h4>
<p>Author: mkmer
Date: 2025-03-18</p>
<p>Add the capability to audiohook for float type volume adjustments. This allows for adjustments to volume smaller than 6dB. With INT adjustments, the first step is 2 which converts to ~6dB (or 1/2 volume / double volume depending on adjustment sign). 3dB is a typical adjustment level which can now be accommodated with an adjustment value of 1.41.</p>
<p>This is accomplished by the following:
Convert internal variables to type float.
Always use ast_frame_adjust_volume_float() for adjustments.
Cast int to float in original functions ast_audiohook_volume_set(), and ast_volume_adjust().
Cast float to int in ast_audiohook_volume_get()
Add functions ast_audiohook_volume_get_float, ast_audiohook_volume_set_float, and ast_audiohook_volume_adjust_float.</p>
<p>This update maintains 100% backward compatibility.</p>
<p>Resolves: #1171</p>
<h4>audiosocket: added support for DTMF frames</h4>
<p>Author: Florent CHAUVEAU
Date: 2025-02-28</p>
<p>Updated the AudioSocket protocol to allow sending DTMF frames.
AST_FRAME_DTMF frames are now forwarded to the server, in addition to
AST_FRAME_AUDIO frames. A new payload type AST_AUDIOSOCKET_KIND_DTMF
with value 0x03 was added to the protocol. The payload is a 1-byte
ascii representing the DTMF digit (0-9,*,#...).</p>
<p>UserNote: The AudioSocket protocol now forwards DTMF frames with
payload type 0x03. The payload is a 1-byte ascii representing the DTMF
digit (0-9,*,#...).</p>
<h4>asterisk/channel.h: fix documentation for 'ast_waitfor_nandfds()'</h4>
<p>Author: Norm Harrison
Date: 2023-04-03</p>
<p>Co-authored-by: Florent CHAUVEAU <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#102;&#108;&#111;&#114;&#101;&#110;&#116;&#99;&#104;&#64;&#112;&#109;&#46;&#109;&#101;">&#102;&#108;&#111;&#114;&#101;&#110;&#116;&#99;&#104;&#64;&#112;&#109;&#46;&#109;&#101;</a></p>
<h4>audiosocket: fix timeout, fix dialplan app exit, server address in logs</h4>
<p>Author: Norm Harrison
Date: 2023-04-03</p>
<ul>
<li>Correct wait timeout logic in the dialplan application.</li>
<li>Include server address in log messages for better traceability.</li>
<li>Allow dialplan app to exit gracefully on hangup messages and socket closure.</li>
<li>Optimize I/O by reducing redundant read()/write() operations.</li>
</ul>
<p>Co-authored-by: Florent CHAUVEAU <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#102;&#108;&#111;&#114;&#101;&#110;&#116;&#99;&#104;&#64;&#112;&#109;&#46;&#109;&#101;">&#102;&#108;&#111;&#114;&#101;&#110;&#116;&#99;&#104;&#64;&#112;&#109;&#46;&#109;&#101;</a></p>
<h4>chan_pjsip: Add the same details as PJSIPShowContacts to the CLI via 'pjsip s..</h4>
<p>Author: Mark Murawski
Date: 2025-03-23</p>
<p>CLI 'pjsip show contact' does not show enough information.
One must telnet to AMI or write a script to ask Asterisk for example what the User-Agent is on a Contact
This feature adds the same details as PJSIPShowContacts to the CLI</p>
<p>Resolves: #643</p>
<h4>Update config.guess and config.sub</h4>
<p>Author: Zhai Liangliang
Date: 2025-03-26</p>
<h4>chan_pjsip: set correct Endpoint Device State on multiple channels</h4>
<p>Author: Alexei Gradinari
Date: 2025-03-25</p>
<ol>
<li>
<p>When one channel is placed on hold, the device state is set to ONHOLD
without checking other channels states.
In case of AST_CONTROL_HOLD set the device state as AST_DEVICE_UNKNOWN
to calculate aggregate device state of all active channels.</p>
</li>
<li>
<p>The current implementation incorrectly classifies channels in use.
The only channels that has the states: UP, RING and BUSY are considered as "in use".
A channel should be considered "in use" if its state is anything other than
DOWN or RESERVED.</p>
</li>
<li>
<p>Currently, if the number of channels "in use" is greater than device_state_busy_at,
the system does not set the state to BUSY. Instead, it incorrectly assigns an aggregate
device state.
The endpoint device state should be BUSY if the number of channels "in use" is greater
than or equal to device_state_busy_at.</p>
</li>
</ol>
<p>Fixes: #1181</p>
<h4>file.c: missing "custom" sound files should not generate warning logs</h4>
<p>Author: Allan Nathanson
Date: 2025-03-18</p>
<p>With <code>sounds_search_custom_dir = yes</code> we first look to see if a sound file
is present in the "custom" sound directory before looking in the standard
sound directories. We should not be issuing a WARNING log message if a
sound cannot be found in the "custom" directory.</p>
<p>Resolves: https://github.com/asterisk/asterisk/issues/1170</p>
</body></html>

View File

@@ -1,564 +0,0 @@
## Change Log for Release asterisk-20.14.0
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.14.0.html)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.13.0...20.14.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.14.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 24
- Commit Authors: 18
- Issues Resolved: 12
- Security Advisories Resolved: 0
### User Notes:
- #### stasis/control.c: Set Hangup Cause to No Answer on Dial timeout
A Dial timeout on POST /channels/{channelId}/dial will now result in a
CANCEL and ChannelDestroyed with cause 19 / User alerting, no answer. Previously
no explicit cause was set, resulting in a cause of 16 / Normal Call Clearing.
- #### contrib: Add systemd service and timer files for malloc trim.
Service and timer files for systemd have been added to the
contrib/systemd/ directory. If you are experiencing memory issues,
install these files to have "malloc trim" periodically run on the
system.
- #### Add log-caller-id-name option to log Caller ID Name in queue log
This patch adds a global configuration option, log-caller-id-name, to queues.conf
to control whether the Caller ID name is logged as parameter 4 when a call enters a queue.
When log-caller-id-name=yes, the Caller ID name is included in the queue log,
Any '|' characters in the caller ID name will be replaced with '_'.
(provided its allowed by the existing log_restricted_caller_id rules).
When log-caller-id-name=no (the default), the Caller ID name is omitted.
- #### asterisk.c: Add "pre-init" and "pre-module" capability to cli.conf.
In cli.conf, you can now define startup commands that run before
core initialization and before module initialization.
- #### audiosocket: added support for DTMF frames
The AudioSocket protocol now forwards DTMF frames with
payload type 0x03. The payload is a 1-byte ascii representing the DTMF
digit (0-9,*,#...).
### Upgrade Notes:
- #### ARI: REST over Websocket
This commit adds the ability to make ARI REST requests over the same
websocket used to receive events.
See https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/ARI-REST-over-WebSocket/
### Commit Authors:
- Albrecht Oster: (1)
- Alexei Gradinari: (1)
- Allan Nathanson: (1)
- Andreas Wehrmann: (1)
- Ben Ford: (1)
- Florent CHAUVEAU: (1)
- George Joseph: (4)
- Joshua C. Colp: (1)
- Luz Paz: (1)
- Mark Murawski: (1)
- Mike Bradeen: (1)
- Mkmer: (1)
- Naveen Albert: (3)
- Norm Harrison: (2)
- Peter Jannesen: (1)
- Phoneben: (1)
- Sean Bright: (1)
- Zhai Liangliang: (1)
## Issue and Commit Detail:
### Closed Issues:
- 505: [bug]: res_pjproject: ast_sockaddr_cmp() always fails on sockaddrs created by ast_sockaddr_from_pj_sockaddr()
- 643: [new-feature]: pjsip show contact -- show all details same as AMI PJSIPShowContacts
- 963: [bug]: missing hangup cause for ARI ChannelDestroyed when Dial times out
- 1091: [improvement]: app queue :add to queue log callerid name
- 1144: [bug]: action_redirect don't remove bridge_after_goto data
- 1171: [improvement]: Need the capability in audiohook.c for fractional (float) type volume adjustments.
- 1181: [bug]: Incorrect PJSIP Endpoint Device States on Multiple Channels
- 1190: [bug]: Crash when starting ConfBridge recording over CLI and AMI
- 1197: [bug]: ChannelHangupRequest does not show cause code in all cases
- 1206: [improvement]: chan_iax2: Minor improvements to documentation and warning messages.
- 1220: [bug]: res_pjsip_caller_id: OLI is not parsed if contained in a URI parameter
- 1224: [improvement]: app_meetme: Removal version is incorrect
### Commits By Author:
- #### Albrecht Oster (1):
- res_pjproject: Fix DTLS client check failing on some platforms
- #### Alexei Gradinari (1):
- chan_pjsip: set correct Endpoint Device State on multiple channels
- #### Allan Nathanson (1):
- file.c: missing "custom" sound files should not generate warning logs
- #### Andreas Wehrmann (1):
- pbx_ael: unregister AELSub application and CLI commands on module load failure
- #### Ben Ford (1):
- contrib: Add systemd service and timer files for malloc trim.
- #### Florent CHAUVEAU (1):
- audiosocket: added support for DTMF frames
- #### George Joseph (4):
- ARI: REST over Websocket
- ari_websockets: Fix frack if ARI config fails to load.
- asterisk.c: Add "pre-init" and "pre-module" capability to cli.conf.
- Prequisites for ARI Outbound Websockets
- #### Joshua C. Colp (1):
- channel: Always provide cause code in ChannelHangupRequest.
- #### Luz Paz (1):
- docs: Fix typos in apps/
- #### Mark Murawski (1):
- chan_pjsip: Add the same details as PJSIPShowContacts to the CLI via 'pjsip s..
- #### Mike Bradeen (1):
- stasis/control.c: Set Hangup Cause to No Answer on Dial timeout
- #### Naveen Albert (3):
- chan_iax2: Minor improvements to documentation and warning messages.
- app_meetme: Remove inaccurate removal version from xmldocs.
- res_pjsip_caller_id: Also parse URI parameters for ANI2.
- #### Norm Harrison (2):
- audiosocket: fix timeout, fix dialplan app exit, server address in logs
- asterisk/channel.h: fix documentation for 'ast_waitfor_nandfds()'
- #### Peter Jannesen (1):
- action_redirect: remove after_bridge_goto_info
- #### Sean Bright (1):
- app_confbridge: Prevent crash when publishing channel-less event.
- #### Zhai Liangliang (1):
- Update config.guess and config.sub
- #### mkmer (1):
- audiohook.c: Add ability to adjust volume with float
- #### phoneben (1):
- Add log-caller-id-name option to log Caller ID Name in queue log
### Commit List:
- res_pjsip_caller_id: Also parse URI parameters for ANI2.
- app_meetme: Remove inaccurate removal version from xmldocs.
- docs: Fix typos in apps/
- stasis/control.c: Set Hangup Cause to No Answer on Dial timeout
- chan_iax2: Minor improvements to documentation and warning messages.
- pbx_ael: unregister AELSub application and CLI commands on module load failure
- res_pjproject: Fix DTLS client check failing on some platforms
- Prequisites for ARI Outbound Websockets
- contrib: Add systemd service and timer files for malloc trim.
- action_redirect: remove after_bridge_goto_info
- channel: Always provide cause code in ChannelHangupRequest.
- Add log-caller-id-name option to log Caller ID Name in queue log
- asterisk.c: Add "pre-init" and "pre-module" capability to cli.conf.
- app_confbridge: Prevent crash when publishing channel-less event.
- ari_websockets: Fix frack if ARI config fails to load.
- ARI: REST over Websocket
- audiohook.c: Add ability to adjust volume with float
- audiosocket: added support for DTMF frames
- asterisk/channel.h: fix documentation for 'ast_waitfor_nandfds()'
- audiosocket: fix timeout, fix dialplan app exit, server address in logs
- Update config.guess and config.sub
- chan_pjsip: set correct Endpoint Device State on multiple channels
- file.c: missing "custom" sound files should not generate warning logs
### Commit Details:
#### res_pjsip_caller_id: Also parse URI parameters for ANI2.
Author: Naveen Albert
Date: 2025-04-26
If the isup-oli was sent as a URI parameter, rather than a header
parameter, it was not being parsed. Make sure we parse both if
needed so the ANI2 is set regardless of which type of parameter
the isup-oli is sent as.
Resolves: #1220
#### app_meetme: Remove inaccurate removal version from xmldocs.
Author: Naveen Albert
Date: 2025-04-26
app_meetme is deprecated but wasn't removed as planned in 21,
so remove the inaccurate removal version.
Resolves: #1224
#### docs: Fix typos in apps/
Author: Luz Paz
Date: 2025-04-09
Found via codespell
#### stasis/control.c: Set Hangup Cause to No Answer on Dial timeout
Author: Mike Bradeen
Date: 2025-04-17
Other Dial operations (dial, app_dial) use Q.850 cause 19 when a dial timeout occurs,
but the Dial command via ARI did not set an explicit reason. This resulted in a
CANCEL with Normal Call Clearing and corresponding ChannelDestroyed.
This change sets the hangup cause to AST_CAUSE_NO_ANSWER to be consistent with the
other operations.
Fixes: #963
UserNote: A Dial timeout on POST /channels/{channelId}/dial will now result in a
CANCEL and ChannelDestroyed with cause 19 / User alerting, no answer. Previously
no explicit cause was set, resulting in a cause of 16 / Normal Call Clearing.
#### chan_iax2: Minor improvements to documentation and warning messages.
Author: Naveen Albert
Date: 2025-04-18
* Update Dial() documentation for IAX2 to include syntax for RSA
public key names.
* Add additional details to a couple warnings to provide more context
when an undecodable frame is received.
Resolves: #1206
#### pbx_ael: unregister AELSub application and CLI commands on module load failure
Author: Andreas Wehrmann
Date: 2025-04-18
This fixes crashes/hangs I noticed with Asterisk 20.3.0 and 20.13.0 and quickly found out,
that the AEL module doesn't do proper cleanup when it fails to load.
This happens for example when there are syntax errors and AEL fails to compile in which case pbx_load_module()
returns an error but load_module() doesn't then unregister CLI cmds and the application.
#### res_pjproject: Fix DTLS client check failing on some platforms
Author: Albrecht Oster
Date: 2025-04-10
Certain platforms (mainly BSD derivatives) have an additional length
field in `sockaddr_in6` and `sockaddr_in`.
`ast_sockaddr_from_pj_sockaddr()` does not take this field into account
when copying over values from the `pj_sockaddr` into the `ast_sockaddr`.
The resulting `ast_sockaddr` will have an uninitialized value for
`sin6_len`/`sin_len` while the other `ast_sockaddr` (not converted from
a `pj_sockaddr`) to check against in `ast_sockaddr_pj_sockaddr_cmp()`
has the correct length value set.
This has the effect that `ast_sockaddr_cmp()` will always indicate
an address mismatch, because it does a bitwise comparison, and all DTLS
packets are dropped even if addresses and ports match.
`ast_sockaddr_from_pj_sockaddr()` now checks whether the length fields
are available on the current platform and sets the values accordingly.
Resolves: #505
#### Prequisites for ARI Outbound Websockets
Author: George Joseph
Date: 2025-04-16
stasis:
* Added stasis_app_is_registered().
* Added stasis_app_control_mark_failed().
* Added stasis_app_control_is_failed().
* Fixed res_stasis_device_state so unsubscribe all works properly.
* Modified stasis_app_unregister() to unsubscribe from all event sources.
* Modified stasis_app_exec to return -1 if stasis_app_control_is_failed()
returns true.
http:
* Added ast_http_create_basic_auth_header().
md5:
* Added define for MD5_DIGEST_LENGTH.
tcptls:
* Added flag to ast_tcptls_session_args to suppress connection log messages
to give callers more control over logging.
http_websocket:
* Add flag to ast_websocket_client_options to suppress connection log messages
to give callers more control over logging.
* Added username and password to ast_websocket_client_options to support
outbound basic authentication.
* Added ast_websocket_result_to_str().
#### contrib: Add systemd service and timer files for malloc trim.
Author: Ben Ford
Date: 2025-04-16
Adds two files to the contrib/systemd/ directory that can be installed
to periodically run "malloc trim" on Asterisk. These files do nothing
unless they are explicitly moved to the correct location on the system.
Users who are experiencing Asterisk memory issues can use this service
to potentially help combat the problem. These files can also be
configured to change the start time and interval. See systemd.timer(5)
and systemd.time(7) for more information.
UserNote: Service and timer files for systemd have been added to the
contrib/systemd/ directory. If you are experiencing memory issues,
install these files to have "malloc trim" periodically run on the
system.
#### action_redirect: remove after_bridge_goto_info
Author: Peter Jannesen
Date: 2025-03-13
Under certain circumstances the context/extens/prio are stored in the
after_bridge_goto_info. This info is used when the bridge is broken by
for hangup of the other party. In the situation that the bridge is
broken by an AMI Redirect this info is not used but also not removed.
With the result that when the channel is put back in a bridge and the
bridge is broken the execution continues at the wrong
context/extens/prio.
Resolves: #1144
#### channel: Always provide cause code in ChannelHangupRequest.
Author: Joshua C. Colp
Date: 2025-04-16
When queueing a channel to be hung up a cause code can be
specified in one of two ways:
1. ast_queue_hangup_with_cause
This function takes in a cause code and queues it as part
of the hangup request, which ultimately results in it being
set on the channel.
2. ast_channel_hangupcause_set + ast_queue_hangup
This combination sets the hangup cause on the channel before
queueing the hangup instead of as part of that process.
In the #2 case the ChannelHangupRequest event would not contain
the cause code. For consistency if a cause code has been set
on the channel it will now be added to the event.
Resolves: #1197
#### Add log-caller-id-name option to log Caller ID Name in queue log
Author: phoneben
Date: 2025-02-28
Add log-caller-id-name option to log Caller ID Name in queue log
This patch introduces a new global configuration option, log-caller-id-name,
to queues.conf to control whether the Caller ID name is logged when a call enters a queue.
When log-caller-id-name=yes, the Caller ID name is logged
as parameter 4 in the queue log, provided its allowed by the
existing log_restricted_caller_id rules. If log-caller-id-name=no (the default),
the Caller ID name is omitted from the logs.
Fixes: #1091
UserNote: This patch adds a global configuration option, log-caller-id-name, to queues.conf
to control whether the Caller ID name is logged as parameter 4 when a call enters a queue.
When log-caller-id-name=yes, the Caller ID name is included in the queue log,
Any '|' characters in the caller ID name will be replaced with '_'.
(provided its allowed by the existing log_restricted_caller_id rules).
When log-caller-id-name=no (the default), the Caller ID name is omitted.
#### asterisk.c: Add "pre-init" and "pre-module" capability to cli.conf.
Author: George Joseph
Date: 2025-04-10
Commands in the "[startup_commands]" section of cli.conf have historically run
after all core and module initialization has been completed and just before
"Asterisk Ready" is printed on the console. This meant that if you
wanted to debug initialization of a specific module, your only option
was to turn on debug for everything by setting "debug" in asterisk.conf.
This commit introduces options to allow you to run CLI commands earlier in
the asterisk startup process.
A command with a value of "pre-init" will run just after logger initialization
but before most core, and all module, initialization.
A command with a value of "pre-module" will run just after all core
initialization but before all module initialization.
A command with a value of "fully-booted" (or "yes" for backwards
compatibility) will run as they always have been...after all
initialization and just before "Asterisk Ready" is printed on the console.
This means you could do this...
```
[startup_commands]
core set debug 3 res_pjsip.so = pre-module
core set debug 0 res_pjsip.so = fully-booted
```
This would turn debugging on for res_pjsip.so to catch any module
initialization debug messages then turn it off again after the module is
loaded.
UserNote: In cli.conf, you can now define startup commands that run before
core initialization and before module initialization.
#### app_confbridge: Prevent crash when publishing channel-less event.
Author: Sean Bright
Date: 2025-04-07
Resolves: #1190
#### ari_websockets: Fix frack if ARI config fails to load.
Author: George Joseph
Date: 2025-04-02
ari_ws_session_registry_dtor() wasn't checking that the container was valid
before running ao2_callback on it to shutdown registered sessions.
#### ARI: REST over Websocket
Author: George Joseph
Date: 2025-03-12
This commit adds the ability to make ARI REST requests over the same
websocket used to receive events.
For full details on how to use the new capability, visit...
https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/ARI-REST-over-WebSocket/
Changes:
* Added utilities to http.c:
* ast_get_http_method_from_string().
* ast_http_parse_post_form().
* Added utilities to json.c:
* ast_json_nvp_array_to_ast_variables().
* ast_variables_to_json_nvp_array().
* Added definitions for new events to carry REST responses.
* Created res/ari/ari_websocket_requests.c to house the new request handlers.
* Moved non-event specific code out of res/ari/resource_events.c into
res/ari/ari_websockets.c
* Refactored res/res_ari.c to move non-http code out of ast_ari_callback()
(which is http specific) and into ast_ari_invoke() so it can be shared
between both the http and websocket transports.
UpgradeNote: This commit adds the ability to make ARI REST requests over the same
websocket used to receive events.
See https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/ARI-REST-over-WebSocket/
#### audiohook.c: Add ability to adjust volume with float
Author: mkmer
Date: 2025-03-18
Add the capability to audiohook for float type volume adjustments. This allows for adjustments to volume smaller than 6dB. With INT adjustments, the first step is 2 which converts to ~6dB (or 1/2 volume / double volume depending on adjustment sign). 3dB is a typical adjustment level which can now be accommodated with an adjustment value of 1.41.
This is accomplished by the following:
Convert internal variables to type float.
Always use ast_frame_adjust_volume_float() for adjustments.
Cast int to float in original functions ast_audiohook_volume_set(), and ast_volume_adjust().
Cast float to int in ast_audiohook_volume_get()
Add functions ast_audiohook_volume_get_float, ast_audiohook_volume_set_float, and ast_audiohook_volume_adjust_float.
This update maintains 100% backward compatibility.
Resolves: #1171
#### audiosocket: added support for DTMF frames
Author: Florent CHAUVEAU
Date: 2025-02-28
Updated the AudioSocket protocol to allow sending DTMF frames.
AST_FRAME_DTMF frames are now forwarded to the server, in addition to
AST_FRAME_AUDIO frames. A new payload type AST_AUDIOSOCKET_KIND_DTMF
with value 0x03 was added to the protocol. The payload is a 1-byte
ascii representing the DTMF digit (0-9,*,#...).
UserNote: The AudioSocket protocol now forwards DTMF frames with
payload type 0x03. The payload is a 1-byte ascii representing the DTMF
digit (0-9,*,#...).
#### asterisk/channel.h: fix documentation for 'ast_waitfor_nandfds()'
Author: Norm Harrison
Date: 2023-04-03
Co-authored-by: Florent CHAUVEAU <florentch@pm.me>
#### audiosocket: fix timeout, fix dialplan app exit, server address in logs
Author: Norm Harrison
Date: 2023-04-03
- Correct wait timeout logic in the dialplan application.
- Include server address in log messages for better traceability.
- Allow dialplan app to exit gracefully on hangup messages and socket closure.
- Optimize I/O by reducing redundant read()/write() operations.
Co-authored-by: Florent CHAUVEAU <florentch@pm.me>
#### chan_pjsip: Add the same details as PJSIPShowContacts to the CLI via 'pjsip s..
Author: Mark Murawski
Date: 2025-03-23
CLI 'pjsip show contact' does not show enough information.
One must telnet to AMI or write a script to ask Asterisk for example what the User-Agent is on a Contact
This feature adds the same details as PJSIPShowContacts to the CLI
Resolves: #643
#### Update config.guess and config.sub
Author: Zhai Liangliang
Date: 2025-03-26
#### chan_pjsip: set correct Endpoint Device State on multiple channels
Author: Alexei Gradinari
Date: 2025-03-25
1. When one channel is placed on hold, the device state is set to ONHOLD
without checking other channels states.
In case of AST_CONTROL_HOLD set the device state as AST_DEVICE_UNKNOWN
to calculate aggregate device state of all active channels.
2. The current implementation incorrectly classifies channels in use.
The only channels that has the states: UP, RING and BUSY are considered as "in use".
A channel should be considered "in use" if its state is anything other than
DOWN or RESERVED.
3. Currently, if the number of channels "in use" is greater than device_state_busy_at,
the system does not set the state to BUSY. Instead, it incorrectly assigns an aggregate
device state.
The endpoint device state should be BUSY if the number of channels "in use" is greater
than or equal to device_state_busy_at.
Fixes: #1181
#### file.c: missing "custom" sound files should not generate warning logs
Author: Allan Nathanson
Date: 2025-03-18
With `sounds_search_custom_dir = yes` we first look to see if a sound file
is present in the "custom" sound directory before looking in the standard
sound directories. We should not be issuing a WARNING log message if a
sound cannot be found in the "custom" directory.
Resolves: https://github.com/asterisk/asterisk/issues/1170

View File

@@ -1,611 +0,0 @@
<html><head><title>ChangeLog for asterisk-20.15.0</title></head><body>
<h2>Change Log for Release asterisk-20.15.0</h2>
<h3>Links:</h3>
<ul>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.15.0.html">Full ChangeLog</a> </li>
<li><a href="https://github.com/asterisk/asterisk/compare/20.14.1...20.15.0">GitHub Diff</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.15.0.tar.gz">Tarball</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk">Downloads</a> </li>
</ul>
<h3>Summary:</h3>
<ul>
<li>Commits: 29</li>
<li>Commit Authors: 14</li>
<li>Issues Resolved: 19</li>
<li>Security Advisories Resolved: 1</li>
<li><a href="https://github.com/asterisk/asterisk/security/advisories/GHSA-c7p6-7mvq-8jq2">GHSA-c7p6-7mvq-8jq2</a>: cli_permissions.conf: deny option does not work for disallowing shell commands</li>
</ul>
<h3>User Notes:</h3>
<ul>
<li>
<h4>res_stir_shaken.so: Handle X5U certificate chains.</h4>
<p>The STIR/SHAKEN verification process will now load a full
certificate chain retrieved via the X5U URL instead of loading only
the end user cert.</p>
</li>
<li>
<h4>res_stir_shaken: Add "ignore_sip_date_header" config option.</h4>
<p>A new STIR/SHAKEN verification option "ignore_sip_date_header" has
been added that when set to true, will cause the verification process to
not consider a missing or invalid SIP "Date" header to be a failure. This
will make the IAT the sole "truth" for Date in the verification process.
The option can be set in the "verification" and "profile" sections of
stir_shaken.conf.
Also fixed a bug in the port match logic.
Resolves: #1251
Resolves: #1271</p>
</li>
<li>
<h4>app_record: Add RECORDING_INFO function.</h4>
<p>The RECORDING_INFO function can now be used
to retrieve the duration of a recording.</p>
</li>
<li>
<h4>app_queue: queue rules Add support for QUEUE_RAISE_PENALTY=rN to raise penal..</h4>
<p>This change introduces QUEUE_RAISE_PENALTY=rN, allowing selective penalty raises
only for members whose current penalty is within the [min_penalty, max_penalty] range.
Members with lower or higher penalties are unaffected.
This behavior is backward-compatible with existing queue rule configurations.</p>
</li>
<li>
<h4>res_odbc: cache_size option to limit the cached connections.</h4>
<p>New cache_size option for res_odbc to on a per class basis limit the
number of cached connections. Please reference the sample configuration
for details.</p>
</li>
<li>
<h4>res_odbc: cache_type option for res_odbc.</h4>
<p>When using res_odbc it should be noted that back-end
connections to the underlying database can now be configured to re-use
the cached connections in a round-robin manner rather than repeatedly
re-using the same connection. This helps to keep connections alive, and
to purge dead connections from the system, thus more dynamically
adjusting to actual load. The downside is that one could keep too many
connections active for a longer time resulting in resource also begin
consumed on the database side.</p>
</li>
<li>
<h4>ARI Outbound Websockets</h4>
<p>Asterisk can now establish websocket sessions <em>to</em> your ARI applications
as well as accepting websocket sessions <em>from</em> them.
Full details: http://s.asterisk.net/ari-outbound-ws</p>
</li>
<li>
<h4>res_websocket_client: Create common utilities for websocket clients.</h4>
<p>A new module "res_websocket_client" and config file
"websocket_client.conf" have been added to support several upcoming new
capabilities that need common websocket client configuration.</p>
</li>
<li>
<h4>asterisk.c: Add option to restrict shell access from remote consoles.</h4>
<p>A new asterisk.conf option 'disable_remote_console_shell' has
been added that, when set, will prevent remote consoles from executing
shell commands using the '!' prefix.
Resolves: #GHSA-c7p6-7mvq-8jq2</p>
</li>
<li>
<h4>sig_analog: Add Call Waiting Deluxe support.</h4>
<p>Call Waiting Deluxe can now be enabled for FXS channels
by enabling its corresponding option.</p>
</li>
</ul>
<h3>Upgrade Notes:</h3>
<ul>
<li>
<h4>jansson: Upgrade version to jansson 2.14.1</h4>
<p>jansson has been upgraded to 2.14.1. For more
information visit jansson Github page: https://github.com/akheron/jansson/releases/tag/v2.14.1
Resolves: #1178</p>
</li>
<li>
<h4>Alternate Channel Storage Backends</h4>
<p>With this release, you can now select an alternate channel
storage backend based on C++ Maps. Using the new backend may increase
performance and reduce the chances of deadlocks on heavily loaded systems.
For more information, see http://s.asterisk.net/dc679ec3</p>
</li>
</ul>
<h3>Commit Authors:</h3>
<ul>
<li>George Joseph: (10)</li>
<li>Itzanh: (1)</li>
<li>Jaco Kroon: (2)</li>
<li>Joe Searle: (1)</li>
<li>Michal Hajek: (1)</li>
<li>Mike Bradeen: (2)</li>
<li>Mkmer: (1)</li>
<li>Nathan Monfils: (1)</li>
<li>Naveen Albert: (3)</li>
<li>Phoneben: (1)</li>
<li>Sean Bright: (2)</li>
<li>Stanislav Abramenkov: (1)</li>
<li>Sven Kube: (2)</li>
<li>Thomas B. Clark: (1)</li>
</ul>
<h2>Issue and Commit Detail:</h2>
<h3>Closed Issues:</h3>
<ul>
<li>!GHSA-c7p6-7mvq-8jq2: cli_permissions.conf: deny option does not work for disallowing shell commands</li>
<li>271: [new-feature]: sig_analog: Add Call Waiting Deluxe support.</li>
<li>548: [improvement]: Get Record() audio duration/length</li>
<li>1088: [bug]: app_sms: Compilation failure in DEVMODE due to stringop-overflow error in GCC 15 pre-release</li>
<li>1141: [bug]: res_pjsip: Contact header set incorrectly for call redirect (302 Moved temp.) when external_* set</li>
<li>1178: [improvement]: jansson: Upgrade version to jansson 2.14.1</li>
<li>1230: [bug]: ast_frame_adjust_volume and ast_frame_adjust_volume_float crash on interpolated frames</li>
<li>1234: [bug]: Set CalllerID lost on DTMF attended transfer</li>
<li>1240: [bug]: WebRTC invites failing on Chrome 136</li>
<li>1243: [bug]: make menuconfig fails due to changes in GTK callbacks</li>
<li>1251: [improvement]: PJSIP shouldn't require SIP Date header to process full shaken passport which includes iat</li>
<li>1254: [bug]: ActiveChannels not reported when using AMI command PJSIPShowEndpoint</li>
<li>1271: [bug]: STIR/SHAKEN not accepting port 8443 in certificate URLs</li>
<li>1272: [improvement]: STIR/SHAKEN handle X5U certificate chains</li>
<li>1276: MixMonitor produces broken recordings in bridged calls with asymmetric codecs (e.g., alaw vs G.722)</li>
<li>1279: [bug]: regression: 20.12.0 downgrades quality of wav16 recordings</li>
<li>1282: [bug]: Alternate Channel Storage Backends menuselect not enabling it</li>
<li>1287: [bug]: channelstorage.c: Compilation failure with DEBUG_FD_LEAKS</li>
<li>1288: [bug]: Crash when destroying channel with C++ alternative storage backend enabled</li>
<li>ASTERISK-30373: sig_analog: Add Call Waiting Deluxe options</li>
</ul>
<h3>Commits By Author:</h3>
<ul>
<li>
<h4>George Joseph (10):</h4>
</li>
<li>Alternate Channel Storage Backends</li>
<li>lock.h: Add include for string.h when DEBUG_THREADS is defined.</li>
<li>asterisk.c: Add option to restrict shell access from remote consoles.</li>
<li>res_websocket_client: Create common utilities for websocket clients.</li>
<li>ARI Outbound Websockets</li>
<li>res_websocket_client: Add more info to the XML documentation.</li>
<li>res_stir_shaken: Add "ignore_sip_date_header" config option.</li>
<li>res_stir_shaken.so: Handle X5U certificate chains.</li>
<li>channelstorage_cpp_map_name_id: Fix callback returning non-matching channels.</li>
<li>
<p>channelstorage: Rename callbacks that conflict with DEBUG_FD_LEAKS.</p>
</li>
<li>
<h4>Itzanh (1):</h4>
</li>
<li>
<p>app_sms.c: Fix sending and receiving SMS messages in protocol 2</p>
</li>
<li>
<h4>Jaco Kroon (2):</h4>
</li>
<li>res_odbc: cache_type option for res_odbc.</li>
<li>
<p>res_odbc: cache_size option to limit the cached connections.</p>
</li>
<li>
<h4>Joe Searle (1):</h4>
</li>
<li>
<p>pjproject: Increase maximum SDP formats and attribute limits</p>
</li>
<li>
<h4>Michal Hajek (1):</h4>
</li>
<li>
<p>audiohook.c: Improve frame pairing logic to avoid MixMonitor breakage with mix..</p>
</li>
<li>
<h4>Mike Bradeen (2):</h4>
</li>
<li>chan_pjsip: Serialize INVITE creation on DTMF attended transfer</li>
<li>
<p>res_pjsip_nat.c: Do not overwrite transfer host</p>
</li>
<li>
<h4>Nathan Monfils (1):</h4>
</li>
<li>
<p>manager.c: Invalid ref-counting when purging events</p>
</li>
<li>
<h4>Naveen Albert (3):</h4>
</li>
<li>app_sms: Ignore false positive vectorization warning.</li>
<li>sig_analog: Add Call Waiting Deluxe support.</li>
<li>
<p>app_record: Add RECORDING_INFO function.</p>
</li>
<li>
<h4>Sean Bright (2):</h4>
</li>
<li>res_pjsip: Fix empty <code>ActiveChannels</code> property in AMI responses.</li>
<li>
<p>channelstorage_makeopts.xml: Remove errant XML character.</p>
</li>
<li>
<h4>Stanislav Abramenkov (1):</h4>
</li>
<li>
<p>jansson: Upgrade version to jansson 2.14.1</p>
</li>
<li>
<h4>Sven Kube (2):</h4>
</li>
<li>res_audiosocket.c: Set the TCP_NODELAY socket option</li>
<li>
<p>res_audiosocket.c: Add retry mechanism for reading data from AudioSocket</p>
</li>
<li>
<h4>Thomas B. Clark (1):</h4>
</li>
<li>
<p>menuselect: Fix GTK menu callbacks for Fedora 42 compatibility</p>
</li>
<li>
<h4>mkmer (1):</h4>
</li>
<li>
<p>frame.c: validate frame data length is less than samples when adjusting volume</p>
</li>
<li>
<h4>phoneben (1):</h4>
</li>
<li>app_queue: queue rules Add support for QUEUE_RAISE_PENALTY=rN to raise penal..</li>
</ul>
<h3>Commit List:</h3>
<ul>
<li>channelstorage: Rename callbacks that conflict with DEBUG_FD_LEAKS.</li>
<li>channelstorage_cpp_map_name_id: Fix callback returning non-matching channels.</li>
<li>channelstorage_makeopts.xml: Remove errant XML character.</li>
<li>res_stir_shaken.so: Handle X5U certificate chains.</li>
<li>res_stir_shaken: Add "ignore_sip_date_header" config option.</li>
<li>app_record: Add RECORDING_INFO function.</li>
<li>app_sms.c: Fix sending and receiving SMS messages in protocol 2</li>
<li>res_websocket_client: Add more info to the XML documentation.</li>
<li>res_odbc: cache_size option to limit the cached connections.</li>
<li>res_odbc: cache_type option for res_odbc.</li>
<li>res_pjsip: Fix empty <code>ActiveChannels</code> property in AMI responses.</li>
<li>ARI Outbound Websockets</li>
<li>res_websocket_client: Create common utilities for websocket clients.</li>
<li>asterisk.c: Add option to restrict shell access from remote consoles.</li>
<li>frame.c: validate frame data length is less than samples when adjusting volume</li>
<li>res_audiosocket.c: Add retry mechanism for reading data from AudioSocket</li>
<li>res_audiosocket.c: Set the TCP_NODELAY socket option</li>
<li>menuselect: Fix GTK menu callbacks for Fedora 42 compatibility</li>
<li>jansson: Upgrade version to jansson 2.14.1</li>
<li>pjproject: Increase maximum SDP formats and attribute limits</li>
<li>manager.c: Invalid ref-counting when purging events</li>
<li>res_pjsip_nat.c: Do not overwrite transfer host</li>
<li>chan_pjsip: Serialize INVITE creation on DTMF attended transfer</li>
<li>sig_analog: Add Call Waiting Deluxe support.</li>
<li>app_sms: Ignore false positive vectorization warning.</li>
<li>lock.h: Add include for string.h when DEBUG_THREADS is defined.</li>
<li>Alternate Channel Storage Backends</li>
</ul>
<h3>Commit Details:</h3>
<h4>channelstorage: Rename callbacks that conflict with DEBUG_FD_LEAKS.</h4>
<p>Author: George Joseph
Date: 2025-07-08</p>
<p>DEBUG_FD_LEAKS replaces calls to "open" and "close" with functions that keep
track of file descriptors, even when those calls are actually callbacks
defined in structures like ast_channelstorage_instance-&gt;open and don't touch
file descriptors. This causes compilation failures. Those callbacks
have been renamed to "open_instance" and "close_instance" respectively.</p>
<p>Resolves: #1287</p>
<h4>channelstorage_cpp_map_name_id: Fix callback returning non-matching channels.</h4>
<p>Author: George Joseph
Date: 2025-07-09</p>
<p>When the callback() API was invoked but no channel passed the test, callback
would return the last channel tested instead of NULL. It now correctly
returns NULL when no channel matches.</p>
<p>Resolves: #1288</p>
<h4>audiohook.c: Improve frame pairing logic to avoid MixMonitor breakage with mix..</h4>
<p>Author: Michal Hajek
Date: 2025-05-21</p>
<p>This patch adjusts the read/write synchronization logic in audiohook_read_frame_both()
to better handle calls where participants use different codecs or sample sizes
(e.g., alaw vs G.722). The previous hard threshold of 2 * samples caused MixMonitor
recordings to break or stutter when frames were not aligned between both directions.</p>
<p>The new logic uses a more tolerant limit (1.5 * samples), which prevents audio tearing
without causing excessive buffer overruns. This fix specifically addresses issues
with MixMonitor when recording directly on a channel in a bridge using mixed codecs.</p>
<p>Reported-by: Michal Hajek <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#109;&#105;&#99;&#104;&#97;&#108;&#46;&#104;&#97;&#106;&#101;&#107;&#64;&#100;&#97;&#107;&#116;&#101;&#108;&#97;&#46;&#99;&#111;&#109;">&#109;&#105;&#99;&#104;&#97;&#108;&#46;&#104;&#97;&#106;&#101;&#107;&#64;&#100;&#97;&#107;&#116;&#101;&#108;&#97;&#46;&#99;&#111;&#109;</a></p>
<p>Resolves: #1276
Resolves: #1279</p>
<h4>channelstorage_makeopts.xml: Remove errant XML character.</h4>
<p>Author: Sean Bright
Date: 2025-06-30</p>
<p>Resolves: #1282</p>
<h4>res_stir_shaken.so: Handle X5U certificate chains.</h4>
<p>Author: George Joseph
Date: 2025-06-18</p>
<p>The verification process will now load a full certificate chain retrieved
via the X5U URL instead of loading only the end user cert.</p>
<ul>
<li>
<p>Renamed crypto_load_cert_from_file() and crypto_load_cert_from_memory()
to crypto_load_cert_chain_from_file() and crypto_load_cert_chain_from_memory()
respectively.</p>
</li>
<li>
<p>The two load functions now continue to load certs from the file or memory
PEMs and store them in a separate stack of untrusted certs specific to the
current verification context.</p>
</li>
<li>
<p>crypto_is_cert_trusted() now uses the stack of untrusted certs that were
extracted from the PEM in addition to any untrusted certs that were passed
in from the configuration (and any CA certs passed in from the config of
course).</p>
</li>
</ul>
<p>Resolves: #1272</p>
<p>UserNote: The STIR/SHAKEN verification process will now load a full
certificate chain retrieved via the X5U URL instead of loading only
the end user cert.</p>
<h4>res_stir_shaken: Add "ignore_sip_date_header" config option.</h4>
<p>Author: George Joseph
Date: 2025-06-15</p>
<p>UserNote: A new STIR/SHAKEN verification option "ignore_sip_date_header" has
been added that when set to true, will cause the verification process to
not consider a missing or invalid SIP "Date" header to be a failure. This
will make the IAT the sole "truth" for Date in the verification process.
The option can be set in the "verification" and "profile" sections of
stir_shaken.conf.</p>
<p>Also fixed a bug in the port match logic.</p>
<p>Resolves: #1251
Resolves: #1271</p>
<h4>app_record: Add RECORDING_INFO function.</h4>
<p>Author: Naveen Albert
Date: 2024-01-22</p>
<p>Add a function that can be used to retrieve info
about a previous recording, such as its duration.</p>
<p>This is being added as a function to avoid possibly
trampling on dialplan variables, and could be extended
to provide other information in the future.</p>
<p>Resolves: #548</p>
<p>UserNote: The RECORDING_INFO function can now be used
to retrieve the duration of a recording.</p>
<h4>app_sms.c: Fix sending and receiving SMS messages in protocol 2</h4>
<p>Author: Itzanh
Date: 2025-04-06</p>
<p>This fixes bugs in SMS messaging to SMS-capable analog phones that prevented app_sms.c from talking to phones using SMS protocol 2.</p>
<ul>
<li>Fix MORX message reception (from phone to Asterisk) in SMS protocol 2</li>
<li>Fix MTTX message transmission (from Asterisk to phone) in SMS protocol 2</li>
</ul>
<p>One of the bugs caused messages to have random characters and junk appended at the end up to the character limit. Another bug prevented Asterisk from sending messages from Asterisk to the phone at all. A final bug caused the transmission from Asterisk to the phone to take a long time because app_sms.c did not hang up after correctly sending the message, causing the phone to have to time out and hang up in order to complete the message transmission.</p>
<p>This was tested with a Linksys PAP2T and with a GrandStream HT814, sending and receiving messages with Telefónica DOMO Mensajes phones from Telefónica Spain. I had to play with both the network jitter buffer and the dB gain to get it to work. One of my phones required the gain to be set to +3dB for it to work, while another required it to be set to +6dB.</p>
<p>Only MORX and MTTX were tested, I did not test sending and receiving messages to a TelCo SMSC.</p>
<h4>app_queue: queue rules Add support for QUEUE_RAISE_PENALTY=rN to raise penal..</h4>
<p>Author: phoneben
Date: 2025-05-26</p>
<p>This update adds support for a new QUEUE_RAISE_PENALTY format: rN</p>
<p>When QUEUE_RAISE_PENALTY is set to rN (e.g., r4), only members whose current penalty
is greater than or equal to the defined min_penalty and less than or equal to max_penalty
will have their penalty raised to N.</p>
<p>Members with penalties outside the min/max range remain unchanged.</p>
<p>Example behaviors:</p>
<p>QUEUE_RAISE_PENALTY=4 → Raise all members with penalty &lt; 4 (existing behavior)
QUEUE_RAISE_PENALTY=r4 → Raise only members with penalty in [min_penalty, max_penalty] to 4</p>
<p>Implementation details:</p>
<p>Adds parsing logic to detect the r prefix and sets the raise_respect_min flag</p>
<p>Modifies the raise logic to skip members outside the defined penalty range when the flag is active</p>
<p>UserNote: This change introduces QUEUE_RAISE_PENALTY=rN, allowing selective penalty raises
only for members whose current penalty is within the [min_penalty, max_penalty] range.
Members with lower or higher penalties are unaffected.
This behavior is backward-compatible with existing queue rule configurations.</p>
<h4>res_websocket_client: Add more info to the XML documentation.</h4>
<p>Author: George Joseph
Date: 2025-06-05</p>
<p>Added "see-also" links to chan_websocket and ARI Outbound WebSocket and
added an example configuration for each.</p>
<h4>res_odbc: cache_size option to limit the cached connections.</h4>
<p>Author: Jaco Kroon
Date: 2024-12-13</p>
<p>Signed-off-by: Jaco Kroon <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#106;&#97;&#99;&#111;&#64;&#117;&#108;&#115;&#46;&#99;&#111;&#46;&#122;&#97;">&#106;&#97;&#99;&#111;&#64;&#117;&#108;&#115;&#46;&#99;&#111;&#46;&#122;&#97;</a></p>
<p>UserNote: New cache_size option for res_odbc to on a per class basis limit the
number of cached connections. Please reference the sample configuration
for details.</p>
<h4>res_odbc: cache_type option for res_odbc.</h4>
<p>Author: Jaco Kroon
Date: 2024-12-10</p>
<p>This enables setting cache_type classes to a round-robin queueing system
rather than the historic stack mechanism.</p>
<p>This should result in lower risk of connection drops due to shorter idle
times (the first connection to go onto the stack could in theory never
be used again, ever, but sit there consuming resources, there could be
multiple of these).</p>
<p>And with a queue rather than a stack, dead connections are guaranteed to
be detected and purged eventually.</p>
<p>This should end up better balancing connection_cnt with actual load
over time, assuming the database doesn't keep connections open
excessively long from it's side.</p>
<p>Signed-off-by: Jaco Kroon <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#106;&#97;&#99;&#111;&#64;&#117;&#108;&#115;&#46;&#99;&#111;&#46;&#122;&#97;">&#106;&#97;&#99;&#111;&#64;&#117;&#108;&#115;&#46;&#99;&#111;&#46;&#122;&#97;</a></p>
<p>UserNote: When using res_odbc it should be noted that back-end
connections to the underlying database can now be configured to re-use
the cached connections in a round-robin manner rather than repeatedly
re-using the same connection. This helps to keep connections alive, and
to purge dead connections from the system, thus more dynamically
adjusting to actual load. The downside is that one could keep too many
connections active for a longer time resulting in resource also begin
consumed on the database side.</p>
<h4>res_pjsip: Fix empty <code>ActiveChannels</code> property in AMI responses.</h4>
<p>Author: Sean Bright
Date: 2025-05-27</p>
<p>The logic appears to have been reversed since it was introduced in
05cbf8df.</p>
<p>Resolves: #1254</p>
<h4>ARI Outbound Websockets</h4>
<p>Author: George Joseph
Date: 2025-03-28</p>
<p>Asterisk can now establish websocket sessions <em>to</em> your ARI applications
as well as accepting websocket sessions <em>from</em> them.
Full details: http://s.asterisk.net/ari-outbound-ws</p>
<p>Code change summary:
* Added an ast_vector_string_join() function,
* Added ApplicationRegistered and ApplicationUnregistered ARI events.
* Converted res/ari/config.c to use sorcery to process ari.conf.
* Added the "outbound-websocket" ARI config object.
* Refactored res/ari/ari_websockets.c to handle outbound websockets.
* Refactored res/ari/cli.c for the sorcery changeover.
* Updated res/res_stasis.c for the sorcery changeover.
* Updated apps/app_stasis.c to allow initiating per-call outbound websockets.
* Added CLI commands to manage ARI websockets.
* Added the new "outbound-websocket" object to ari.conf.sample.
* Moved the ARI XML documentation out of res_ari.c into res/ari/ari_doc.xml</p>
<p>UserNote: Asterisk can now establish websocket sessions <em>to</em> your ARI applications
as well as accepting websocket sessions <em>from</em> them.
Full details: http://s.asterisk.net/ari-outbound-ws</p>
<h4>res_websocket_client: Create common utilities for websocket clients.</h4>
<p>Author: George Joseph
Date: 2025-05-02</p>
<p>Since multiple Asterisk capabilities now need to create websocket clients
it makes sense to create a common set of utilities rather than making
each of those capabilities implement their own.</p>
<ul>
<li>A new configuration file "websocket_client.conf" is used to store common
client parameters in named configuration sections.</li>
<li>APIs are provided to list and retrieve ast_websocket_client objects created
from the named configurations.</li>
<li>An API is provided that accepts an ast_websocket_client object, connects
to the remote server with retries and returns an ast_websocket object. TLS is
supported as is basic authentication.</li>
<li>An observer can be registered to receive notification of loaded or reloaded
client objects.</li>
<li>An API is provided to compare an existing client object to one just
reloaded and return the fields that were changed. The caller can then decide
what action to take based on which fields changed.</li>
</ul>
<p>Also as part of thie commit, several sorcery convenience macros were created
to make registering common object fields easier.</p>
<p>UserNote: A new module "res_websocket_client" and config file
"websocket_client.conf" have been added to support several upcoming new
capabilities that need common websocket client configuration.</p>
<h4>asterisk.c: Add option to restrict shell access from remote consoles.</h4>
<p>Author: George Joseph
Date: 2025-05-19</p>
<p>UserNote: A new asterisk.conf option 'disable_remote_console_shell' has
been added that, when set, will prevent remote consoles from executing
shell commands using the '!' prefix.</p>
<p>Resolves: #GHSA-c7p6-7mvq-8jq2</p>
<h4>frame.c: validate frame data length is less than samples when adjusting volume</h4>
<p>Author: mkmer
Date: 2025-05-12</p>
<p>Resolves: #1230</p>
<h4>res_audiosocket.c: Add retry mechanism for reading data from AudioSocket</h4>
<p>Author: Sven Kube
Date: 2025-05-13</p>
<p>The added retry mechanism addresses an issue that arises when fragmented TCP
packets are received, each containing only a portion of an AudioSocket packet.
This situation can occur if the external service sending the AudioSocket data
has Nagle's algorithm enabled.</p>
<h4>res_audiosocket.c: Set the TCP_NODELAY socket option</h4>
<p>Author: Sven Kube
Date: 2025-05-13</p>
<p>Disable Nagle's algorithm by setting the TCP_NODELAY socket option.
This reduces latency by preventing delays caused by packet buffering.</p>
<h4>menuselect: Fix GTK menu callbacks for Fedora 42 compatibility</h4>
<p>Author: Thomas B. Clark
Date: 2025-05-12</p>
<p>This patch resolves a build failure in <code>menuselect_gtk.c</code> when running
<code>make menuconfig</code> on Fedora 42. The new version of GTK introduced stricter
type checking for callback signatures.</p>
<p>Changes include:
- Add wrapper functions to match the expected <code>void (*)(void)</code> signature.
- Update <code>menu_items</code> array to use these wrappers.</p>
<p>Fixes: #1243</p>
<h4>jansson: Upgrade version to jansson 2.14.1</h4>
<p>Author: Stanislav Abramenkov
Date: 2025-03-24</p>
<p>UpgradeNote: jansson has been upgraded to 2.14.1. For more
information visit jansson Github page: https://github.com/akheron/jansson/releases/tag/v2.14.1</p>
<p>Resolves: #1178</p>
<h4>pjproject: Increase maximum SDP formats and attribute limits</h4>
<p>Author: Joe Searle
Date: 2025-05-15</p>
<p>Since Chrome 136, using Windows, when initiating a video call the INVITE SDP exceeds the maximum number of allowed attributes, resulting in the INVITE being rejected. This increases the attribute limit and the number of formats allowed when using bundled pjproject.</p>
<p>Fixes: #1240</p>
<h4>manager.c: Invalid ref-counting when purging events</h4>
<p>Author: Nathan Monfils
Date: 2025-05-05</p>
<p>We have a use-case where we generate a <em>lot</em> of events on the AMI, and
then when doing <code>manager show eventq</code> we would see some events which
would linger for hours or days in there. Obviously something was leaking.
Testing allowed us to track down this logic bug in the ref-counting on
the event purge.</p>
<p>Reproducing the bug was not super trivial, we managed to do it in a
production-like load testing environment with multiple AMI consumers.</p>
<p>The race condition itself:</p>
<ol>
<li>something allocates and links <code>session</code></li>
<li><code>purge_sessions</code> iterates over that <code>session</code> (takes ref)</li>
<li><code>purge_session</code> correctly de-referencess that session</li>
<li><code>purge_session</code> re-evaluates the while() loop, taking a reference</li>
<li><code>purge_session</code> exits (<code>n_max &gt; 0</code> is false)</li>
<li>whatever allocated the <code>session</code> deallocates it, but a reference is
now lost since we exited the <code>while</code> loop before de-referencing.</li>
<li>since the destructor is never called, the session-&gt;last_ev-&gt;usecount
is never decremented, leading to events lingering in the queue</li>
</ol>
<p>The impact of this bug does not seem major. The events are small and do
not seem, from our testing, to be causing meaningful additional CPU
usage. Mainly we wanted to fix this issue because we are internally
adding prometheus metrics to the eventq and those leaked events were
causing the metrics to show garbage data.</p>
<h4>res_pjsip_nat.c: Do not overwrite transfer host</h4>
<p>Author: Mike Bradeen
Date: 2025-05-08</p>
<p>When a call is transfered via dialplan behind a NAT, the
host portion of the Contact header in the 302 will no longer
be over-written with the external NAT IP and will retain the
hostname.</p>
<p>Fixes: #1141</p>
<h4>chan_pjsip: Serialize INVITE creation on DTMF attended transfer</h4>
<p>Author: Mike Bradeen
Date: 2025-05-05</p>
<p>When a call is transfered via DTMF feature code, the Transfer Target and
Transferer are bridged immediately. This opens the possibilty of a race
condition between the creation of an INVITE and the bridge induced colp
update that can result in the set caller ID being over-written with the
transferer's default info.</p>
<p>Fixes: #1234</p>
<h4>sig_analog: Add Call Waiting Deluxe support.</h4>
<p>Author: Naveen Albert
Date: 2023-08-24</p>
<p>Adds support for Call Waiting Deluxe options to enhance
the current call waiting feature.</p>
<p>As part of this change, a mechanism is also added that
allows a channel driver to queue an audio file for Dial()
to play, which is necessary for the announcement function.</p>
<p>ASTERISK-30373 #close</p>
<p>Resolves: #271</p>
<p>UserNote: Call Waiting Deluxe can now be enabled for FXS channels
by enabling its corresponding option.</p>
<h4>app_sms: Ignore false positive vectorization warning.</h4>
<p>Author: Naveen Albert
Date: 2025-01-24</p>
<p>Ignore gcc warning about writing 32 bytes into a region of size 6,
since we check that we don't go out of bounds for each byte.
This is due to a vectorization bug in gcc 15, stemming from
gcc commit 68326d5d1a593dc0bf098c03aac25916168bc5a9.</p>
<p>Resolves: #1088</p>
<h4>lock.h: Add include for string.h when DEBUG_THREADS is defined.</h4>
<p>Author: George Joseph
Date: 2025-05-02</p>
<p>When DEBUG_THREADS is defined, lock.h uses strerror(), which is defined
in the libc string.h file, to print warning messages. If the including
source file doesn't include string.h then strerror() won't be found and
and compile errors will be thrown. Since lock.h depends on this, string.h
is now included from there if DEBUG_THREADS is defined. This way, including
source files don't have to worry about it.</p>
<h4>Alternate Channel Storage Backends</h4>
<p>Author: George Joseph
Date: 2024-12-31</p>
<p>Full details: http://s.asterisk.net/dc679ec3</p>
<p>The previous proof-of-concept showed that the cpp_map_name_id alternate
storage backed performed better than all the others so this final PR
adds only that option. You still need to enable it in menuselect under
the "Alternate Channel Storage Backends" category.</p>
<p>To select which one is used at runtime, set the "channel_storage_backend"
option in asterisk.conf to one of the values described in
asterisk.conf.sample. The default remains "ao2_legacy".</p>
<p>UpgradeNote: With this release, you can now select an alternate channel
storage backend based on C++ Maps. Using the new backend may increase
performance and reduce the chances of deadlocks on heavily loaded systems.
For more information, see http://s.asterisk.net/dc679ec3</p>
</body></html>

View File

@@ -1,677 +0,0 @@
## Change Log for Release asterisk-20.15.0
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.15.0.html)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.14.1...20.15.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.15.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 29
- Commit Authors: 14
- Issues Resolved: 19
- Security Advisories Resolved: 1
- [GHSA-c7p6-7mvq-8jq2](https://github.com/asterisk/asterisk/security/advisories/GHSA-c7p6-7mvq-8jq2): cli_permissions.conf: deny option does not work for disallowing shell commands
### User Notes:
- #### res_stir_shaken.so: Handle X5U certificate chains.
The STIR/SHAKEN verification process will now load a full
certificate chain retrieved via the X5U URL instead of loading only
the end user cert.
- #### res_stir_shaken: Add "ignore_sip_date_header" config option.
A new STIR/SHAKEN verification option "ignore_sip_date_header" has
been added that when set to true, will cause the verification process to
not consider a missing or invalid SIP "Date" header to be a failure. This
will make the IAT the sole "truth" for Date in the verification process.
The option can be set in the "verification" and "profile" sections of
stir_shaken.conf.
Also fixed a bug in the port match logic.
Resolves: #1251
Resolves: #1271
- #### app_record: Add RECORDING_INFO function.
The RECORDING_INFO function can now be used
to retrieve the duration of a recording.
- #### app_queue: queue rules Add support for QUEUE_RAISE_PENALTY=rN to raise penal..
This change introduces QUEUE_RAISE_PENALTY=rN, allowing selective penalty raises
only for members whose current penalty is within the [min_penalty, max_penalty] range.
Members with lower or higher penalties are unaffected.
This behavior is backward-compatible with existing queue rule configurations.
- #### res_odbc: cache_size option to limit the cached connections.
New cache_size option for res_odbc to on a per class basis limit the
number of cached connections. Please reference the sample configuration
for details.
- #### res_odbc: cache_type option for res_odbc.
When using res_odbc it should be noted that back-end
connections to the underlying database can now be configured to re-use
the cached connections in a round-robin manner rather than repeatedly
re-using the same connection. This helps to keep connections alive, and
to purge dead connections from the system, thus more dynamically
adjusting to actual load. The downside is that one could keep too many
connections active for a longer time resulting in resource also begin
consumed on the database side.
- #### ARI Outbound Websockets
Asterisk can now establish websocket sessions _to_ your ARI applications
as well as accepting websocket sessions _from_ them.
Full details: http://s.asterisk.net/ari-outbound-ws
- #### res_websocket_client: Create common utilities for websocket clients.
A new module "res_websocket_client" and config file
"websocket_client.conf" have been added to support several upcoming new
capabilities that need common websocket client configuration.
- #### asterisk.c: Add option to restrict shell access from remote consoles.
A new asterisk.conf option 'disable_remote_console_shell' has
been added that, when set, will prevent remote consoles from executing
shell commands using the '!' prefix.
Resolves: #GHSA-c7p6-7mvq-8jq2
- #### sig_analog: Add Call Waiting Deluxe support.
Call Waiting Deluxe can now be enabled for FXS channels
by enabling its corresponding option.
### Upgrade Notes:
- #### jansson: Upgrade version to jansson 2.14.1
jansson has been upgraded to 2.14.1. For more
information visit jansson Github page: https://github.com/akheron/jansson/releases/tag/v2.14.1
Resolves: #1178
- #### Alternate Channel Storage Backends
With this release, you can now select an alternate channel
storage backend based on C++ Maps. Using the new backend may increase
performance and reduce the chances of deadlocks on heavily loaded systems.
For more information, see http://s.asterisk.net/dc679ec3
### Commit Authors:
- George Joseph: (10)
- Itzanh: (1)
- Jaco Kroon: (2)
- Joe Searle: (1)
- Michal Hajek: (1)
- Mike Bradeen: (2)
- Mkmer: (1)
- Nathan Monfils: (1)
- Naveen Albert: (3)
- Phoneben: (1)
- Sean Bright: (2)
- Stanislav Abramenkov: (1)
- Sven Kube: (2)
- Thomas B. Clark: (1)
## Issue and Commit Detail:
### Closed Issues:
- !GHSA-c7p6-7mvq-8jq2: cli_permissions.conf: deny option does not work for disallowing shell commands
- 271: [new-feature]: sig_analog: Add Call Waiting Deluxe support.
- 548: [improvement]: Get Record() audio duration/length
- 1088: [bug]: app_sms: Compilation failure in DEVMODE due to stringop-overflow error in GCC 15 pre-release
- 1141: [bug]: res_pjsip: Contact header set incorrectly for call redirect (302 Moved temp.) when external_* set
- 1178: [improvement]: jansson: Upgrade version to jansson 2.14.1
- 1230: [bug]: ast_frame_adjust_volume and ast_frame_adjust_volume_float crash on interpolated frames
- 1234: [bug]: Set CalllerID lost on DTMF attended transfer
- 1240: [bug]: WebRTC invites failing on Chrome 136
- 1243: [bug]: make menuconfig fails due to changes in GTK callbacks
- 1251: [improvement]: PJSIP shouldn't require SIP Date header to process full shaken passport which includes iat
- 1254: [bug]: ActiveChannels not reported when using AMI command PJSIPShowEndpoint
- 1271: [bug]: STIR/SHAKEN not accepting port 8443 in certificate URLs
- 1272: [improvement]: STIR/SHAKEN handle X5U certificate chains
- 1276: MixMonitor produces broken recordings in bridged calls with asymmetric codecs (e.g., alaw vs G.722)
- 1279: [bug]: regression: 20.12.0 downgrades quality of wav16 recordings
- 1282: [bug]: Alternate Channel Storage Backends menuselect not enabling it
- 1287: [bug]: channelstorage.c: Compilation failure with DEBUG_FD_LEAKS
- 1288: [bug]: Crash when destroying channel with C++ alternative storage backend enabled
- ASTERISK-30373: sig_analog: Add Call Waiting Deluxe options
### Commits By Author:
- #### George Joseph (10):
- Alternate Channel Storage Backends
- lock.h: Add include for string.h when DEBUG_THREADS is defined.
- asterisk.c: Add option to restrict shell access from remote consoles.
- res_websocket_client: Create common utilities for websocket clients.
- ARI Outbound Websockets
- res_websocket_client: Add more info to the XML documentation.
- res_stir_shaken: Add "ignore_sip_date_header" config option.
- res_stir_shaken.so: Handle X5U certificate chains.
- channelstorage_cpp_map_name_id: Fix callback returning non-matching channels.
- channelstorage: Rename callbacks that conflict with DEBUG_FD_LEAKS.
- #### Itzanh (1):
- app_sms.c: Fix sending and receiving SMS messages in protocol 2
- #### Jaco Kroon (2):
- res_odbc: cache_type option for res_odbc.
- res_odbc: cache_size option to limit the cached connections.
- #### Joe Searle (1):
- pjproject: Increase maximum SDP formats and attribute limits
- #### Michal Hajek (1):
- audiohook.c: Improve frame pairing logic to avoid MixMonitor breakage with mix..
- #### Mike Bradeen (2):
- chan_pjsip: Serialize INVITE creation on DTMF attended transfer
- res_pjsip_nat.c: Do not overwrite transfer host
- #### Nathan Monfils (1):
- manager.c: Invalid ref-counting when purging events
- #### Naveen Albert (3):
- app_sms: Ignore false positive vectorization warning.
- sig_analog: Add Call Waiting Deluxe support.
- app_record: Add RECORDING_INFO function.
- #### Sean Bright (2):
- res_pjsip: Fix empty `ActiveChannels` property in AMI responses.
- channelstorage_makeopts.xml: Remove errant XML character.
- #### Stanislav Abramenkov (1):
- jansson: Upgrade version to jansson 2.14.1
- #### Sven Kube (2):
- res_audiosocket.c: Set the TCP_NODELAY socket option
- res_audiosocket.c: Add retry mechanism for reading data from AudioSocket
- #### Thomas B. Clark (1):
- menuselect: Fix GTK menu callbacks for Fedora 42 compatibility
- #### mkmer (1):
- frame.c: validate frame data length is less than samples when adjusting volume
- #### phoneben (1):
- app_queue: queue rules Add support for QUEUE_RAISE_PENALTY=rN to raise penal..
### Commit List:
- channelstorage: Rename callbacks that conflict with DEBUG_FD_LEAKS.
- channelstorage_cpp_map_name_id: Fix callback returning non-matching channels.
- channelstorage_makeopts.xml: Remove errant XML character.
- res_stir_shaken.so: Handle X5U certificate chains.
- res_stir_shaken: Add "ignore_sip_date_header" config option.
- app_record: Add RECORDING_INFO function.
- app_sms.c: Fix sending and receiving SMS messages in protocol 2
- res_websocket_client: Add more info to the XML documentation.
- res_odbc: cache_size option to limit the cached connections.
- res_odbc: cache_type option for res_odbc.
- res_pjsip: Fix empty `ActiveChannels` property in AMI responses.
- ARI Outbound Websockets
- res_websocket_client: Create common utilities for websocket clients.
- asterisk.c: Add option to restrict shell access from remote consoles.
- frame.c: validate frame data length is less than samples when adjusting volume
- res_audiosocket.c: Add retry mechanism for reading data from AudioSocket
- res_audiosocket.c: Set the TCP_NODELAY socket option
- menuselect: Fix GTK menu callbacks for Fedora 42 compatibility
- jansson: Upgrade version to jansson 2.14.1
- pjproject: Increase maximum SDP formats and attribute limits
- manager.c: Invalid ref-counting when purging events
- res_pjsip_nat.c: Do not overwrite transfer host
- chan_pjsip: Serialize INVITE creation on DTMF attended transfer
- sig_analog: Add Call Waiting Deluxe support.
- app_sms: Ignore false positive vectorization warning.
- lock.h: Add include for string.h when DEBUG_THREADS is defined.
- Alternate Channel Storage Backends
### Commit Details:
#### channelstorage: Rename callbacks that conflict with DEBUG_FD_LEAKS.
Author: George Joseph
Date: 2025-07-08
DEBUG_FD_LEAKS replaces calls to "open" and "close" with functions that keep
track of file descriptors, even when those calls are actually callbacks
defined in structures like ast_channelstorage_instance->open and don't touch
file descriptors. This causes compilation failures. Those callbacks
have been renamed to "open_instance" and "close_instance" respectively.
Resolves: #1287
#### channelstorage_cpp_map_name_id: Fix callback returning non-matching channels.
Author: George Joseph
Date: 2025-07-09
When the callback() API was invoked but no channel passed the test, callback
would return the last channel tested instead of NULL. It now correctly
returns NULL when no channel matches.
Resolves: #1288
#### audiohook.c: Improve frame pairing logic to avoid MixMonitor breakage with mix..
Author: Michal Hajek
Date: 2025-05-21
This patch adjusts the read/write synchronization logic in audiohook_read_frame_both()
to better handle calls where participants use different codecs or sample sizes
(e.g., alaw vs G.722). The previous hard threshold of 2 * samples caused MixMonitor
recordings to break or stutter when frames were not aligned between both directions.
The new logic uses a more tolerant limit (1.5 * samples), which prevents audio tearing
without causing excessive buffer overruns. This fix specifically addresses issues
with MixMonitor when recording directly on a channel in a bridge using mixed codecs.
Reported-by: Michal Hajek <michal.hajek@daktela.com>
Resolves: #1276
Resolves: #1279
#### channelstorage_makeopts.xml: Remove errant XML character.
Author: Sean Bright
Date: 2025-06-30
Resolves: #1282
#### res_stir_shaken.so: Handle X5U certificate chains.
Author: George Joseph
Date: 2025-06-18
The verification process will now load a full certificate chain retrieved
via the X5U URL instead of loading only the end user cert.
* Renamed crypto_load_cert_from_file() and crypto_load_cert_from_memory()
to crypto_load_cert_chain_from_file() and crypto_load_cert_chain_from_memory()
respectively.
* The two load functions now continue to load certs from the file or memory
PEMs and store them in a separate stack of untrusted certs specific to the
current verification context.
* crypto_is_cert_trusted() now uses the stack of untrusted certs that were
extracted from the PEM in addition to any untrusted certs that were passed
in from the configuration (and any CA certs passed in from the config of
course).
Resolves: #1272
UserNote: The STIR/SHAKEN verification process will now load a full
certificate chain retrieved via the X5U URL instead of loading only
the end user cert.
#### res_stir_shaken: Add "ignore_sip_date_header" config option.
Author: George Joseph
Date: 2025-06-15
UserNote: A new STIR/SHAKEN verification option "ignore_sip_date_header" has
been added that when set to true, will cause the verification process to
not consider a missing or invalid SIP "Date" header to be a failure. This
will make the IAT the sole "truth" for Date in the verification process.
The option can be set in the "verification" and "profile" sections of
stir_shaken.conf.
Also fixed a bug in the port match logic.
Resolves: #1251
Resolves: #1271
#### app_record: Add RECORDING_INFO function.
Author: Naveen Albert
Date: 2024-01-22
Add a function that can be used to retrieve info
about a previous recording, such as its duration.
This is being added as a function to avoid possibly
trampling on dialplan variables, and could be extended
to provide other information in the future.
Resolves: #548
UserNote: The RECORDING_INFO function can now be used
to retrieve the duration of a recording.
#### app_sms.c: Fix sending and receiving SMS messages in protocol 2
Author: Itzanh
Date: 2025-04-06
This fixes bugs in SMS messaging to SMS-capable analog phones that prevented app_sms.c from talking to phones using SMS protocol 2.
- Fix MORX message reception (from phone to Asterisk) in SMS protocol 2
- Fix MTTX message transmission (from Asterisk to phone) in SMS protocol 2
One of the bugs caused messages to have random characters and junk appended at the end up to the character limit. Another bug prevented Asterisk from sending messages from Asterisk to the phone at all. A final bug caused the transmission from Asterisk to the phone to take a long time because app_sms.c did not hang up after correctly sending the message, causing the phone to have to time out and hang up in order to complete the message transmission.
This was tested with a Linksys PAP2T and with a GrandStream HT814, sending and receiving messages with Telefónica DOMO Mensajes phones from Telefónica Spain. I had to play with both the network jitter buffer and the dB gain to get it to work. One of my phones required the gain to be set to +3dB for it to work, while another required it to be set to +6dB.
Only MORX and MTTX were tested, I did not test sending and receiving messages to a TelCo SMSC.
#### app_queue: queue rules Add support for QUEUE_RAISE_PENALTY=rN to raise penal..
Author: phoneben
Date: 2025-05-26
This update adds support for a new QUEUE_RAISE_PENALTY format: rN
When QUEUE_RAISE_PENALTY is set to rN (e.g., r4), only members whose current penalty
is greater than or equal to the defined min_penalty and less than or equal to max_penalty
will have their penalty raised to N.
Members with penalties outside the min/max range remain unchanged.
Example behaviors:
QUEUE_RAISE_PENALTY=4 → Raise all members with penalty < 4 (existing behavior)
QUEUE_RAISE_PENALTY=r4 → Raise only members with penalty in [min_penalty, max_penalty] to 4
Implementation details:
Adds parsing logic to detect the r prefix and sets the raise_respect_min flag
Modifies the raise logic to skip members outside the defined penalty range when the flag is active
UserNote: This change introduces QUEUE_RAISE_PENALTY=rN, allowing selective penalty raises
only for members whose current penalty is within the [min_penalty, max_penalty] range.
Members with lower or higher penalties are unaffected.
This behavior is backward-compatible with existing queue rule configurations.
#### res_websocket_client: Add more info to the XML documentation.
Author: George Joseph
Date: 2025-06-05
Added "see-also" links to chan_websocket and ARI Outbound WebSocket and
added an example configuration for each.
#### res_odbc: cache_size option to limit the cached connections.
Author: Jaco Kroon
Date: 2024-12-13
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
UserNote: New cache_size option for res_odbc to on a per class basis limit the
number of cached connections. Please reference the sample configuration
for details.
#### res_odbc: cache_type option for res_odbc.
Author: Jaco Kroon
Date: 2024-12-10
This enables setting cache_type classes to a round-robin queueing system
rather than the historic stack mechanism.
This should result in lower risk of connection drops due to shorter idle
times (the first connection to go onto the stack could in theory never
be used again, ever, but sit there consuming resources, there could be
multiple of these).
And with a queue rather than a stack, dead connections are guaranteed to
be detected and purged eventually.
This should end up better balancing connection_cnt with actual load
over time, assuming the database doesn't keep connections open
excessively long from it's side.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
UserNote: When using res_odbc it should be noted that back-end
connections to the underlying database can now be configured to re-use
the cached connections in a round-robin manner rather than repeatedly
re-using the same connection. This helps to keep connections alive, and
to purge dead connections from the system, thus more dynamically
adjusting to actual load. The downside is that one could keep too many
connections active for a longer time resulting in resource also begin
consumed on the database side.
#### res_pjsip: Fix empty `ActiveChannels` property in AMI responses.
Author: Sean Bright
Date: 2025-05-27
The logic appears to have been reversed since it was introduced in
05cbf8df.
Resolves: #1254
#### ARI Outbound Websockets
Author: George Joseph
Date: 2025-03-28
Asterisk can now establish websocket sessions _to_ your ARI applications
as well as accepting websocket sessions _from_ them.
Full details: http://s.asterisk.net/ari-outbound-ws
Code change summary:
* Added an ast_vector_string_join() function,
* Added ApplicationRegistered and ApplicationUnregistered ARI events.
* Converted res/ari/config.c to use sorcery to process ari.conf.
* Added the "outbound-websocket" ARI config object.
* Refactored res/ari/ari_websockets.c to handle outbound websockets.
* Refactored res/ari/cli.c for the sorcery changeover.
* Updated res/res_stasis.c for the sorcery changeover.
* Updated apps/app_stasis.c to allow initiating per-call outbound websockets.
* Added CLI commands to manage ARI websockets.
* Added the new "outbound-websocket" object to ari.conf.sample.
* Moved the ARI XML documentation out of res_ari.c into res/ari/ari_doc.xml
UserNote: Asterisk can now establish websocket sessions _to_ your ARI applications
as well as accepting websocket sessions _from_ them.
Full details: http://s.asterisk.net/ari-outbound-ws
#### res_websocket_client: Create common utilities for websocket clients.
Author: George Joseph
Date: 2025-05-02
Since multiple Asterisk capabilities now need to create websocket clients
it makes sense to create a common set of utilities rather than making
each of those capabilities implement their own.
* A new configuration file "websocket_client.conf" is used to store common
client parameters in named configuration sections.
* APIs are provided to list and retrieve ast_websocket_client objects created
from the named configurations.
* An API is provided that accepts an ast_websocket_client object, connects
to the remote server with retries and returns an ast_websocket object. TLS is
supported as is basic authentication.
* An observer can be registered to receive notification of loaded or reloaded
client objects.
* An API is provided to compare an existing client object to one just
reloaded and return the fields that were changed. The caller can then decide
what action to take based on which fields changed.
Also as part of thie commit, several sorcery convenience macros were created
to make registering common object fields easier.
UserNote: A new module "res_websocket_client" and config file
"websocket_client.conf" have been added to support several upcoming new
capabilities that need common websocket client configuration.
#### asterisk.c: Add option to restrict shell access from remote consoles.
Author: George Joseph
Date: 2025-05-19
UserNote: A new asterisk.conf option 'disable_remote_console_shell' has
been added that, when set, will prevent remote consoles from executing
shell commands using the '!' prefix.
Resolves: #GHSA-c7p6-7mvq-8jq2
#### frame.c: validate frame data length is less than samples when adjusting volume
Author: mkmer
Date: 2025-05-12
Resolves: #1230
#### res_audiosocket.c: Add retry mechanism for reading data from AudioSocket
Author: Sven Kube
Date: 2025-05-13
The added retry mechanism addresses an issue that arises when fragmented TCP
packets are received, each containing only a portion of an AudioSocket packet.
This situation can occur if the external service sending the AudioSocket data
has Nagle's algorithm enabled.
#### res_audiosocket.c: Set the TCP_NODELAY socket option
Author: Sven Kube
Date: 2025-05-13
Disable Nagle's algorithm by setting the TCP_NODELAY socket option.
This reduces latency by preventing delays caused by packet buffering.
#### menuselect: Fix GTK menu callbacks for Fedora 42 compatibility
Author: Thomas B. Clark
Date: 2025-05-12
This patch resolves a build failure in `menuselect_gtk.c` when running
`make menuconfig` on Fedora 42. The new version of GTK introduced stricter
type checking for callback signatures.
Changes include:
- Add wrapper functions to match the expected `void (*)(void)` signature.
- Update `menu_items` array to use these wrappers.
Fixes: #1243
#### jansson: Upgrade version to jansson 2.14.1
Author: Stanislav Abramenkov
Date: 2025-03-24
UpgradeNote: jansson has been upgraded to 2.14.1. For more
information visit jansson Github page: https://github.com/akheron/jansson/releases/tag/v2.14.1
Resolves: #1178
#### pjproject: Increase maximum SDP formats and attribute limits
Author: Joe Searle
Date: 2025-05-15
Since Chrome 136, using Windows, when initiating a video call the INVITE SDP exceeds the maximum number of allowed attributes, resulting in the INVITE being rejected. This increases the attribute limit and the number of formats allowed when using bundled pjproject.
Fixes: #1240
#### manager.c: Invalid ref-counting when purging events
Author: Nathan Monfils
Date: 2025-05-05
We have a use-case where we generate a *lot* of events on the AMI, and
then when doing `manager show eventq` we would see some events which
would linger for hours or days in there. Obviously something was leaking.
Testing allowed us to track down this logic bug in the ref-counting on
the event purge.
Reproducing the bug was not super trivial, we managed to do it in a
production-like load testing environment with multiple AMI consumers.
The race condition itself:
1. something allocates and links `session`
2. `purge_sessions` iterates over that `session` (takes ref)
3. `purge_session` correctly de-referencess that session
4. `purge_session` re-evaluates the while() loop, taking a reference
5. `purge_session` exits (`n_max > 0` is false)
6. whatever allocated the `session` deallocates it, but a reference is
now lost since we exited the `while` loop before de-referencing.
7. since the destructor is never called, the session->last_ev->usecount
is never decremented, leading to events lingering in the queue
The impact of this bug does not seem major. The events are small and do
not seem, from our testing, to be causing meaningful additional CPU
usage. Mainly we wanted to fix this issue because we are internally
adding prometheus metrics to the eventq and those leaked events were
causing the metrics to show garbage data.
#### res_pjsip_nat.c: Do not overwrite transfer host
Author: Mike Bradeen
Date: 2025-05-08
When a call is transfered via dialplan behind a NAT, the
host portion of the Contact header in the 302 will no longer
be over-written with the external NAT IP and will retain the
hostname.
Fixes: #1141
#### chan_pjsip: Serialize INVITE creation on DTMF attended transfer
Author: Mike Bradeen
Date: 2025-05-05
When a call is transfered via DTMF feature code, the Transfer Target and
Transferer are bridged immediately. This opens the possibilty of a race
condition between the creation of an INVITE and the bridge induced colp
update that can result in the set caller ID being over-written with the
transferer's default info.
Fixes: #1234
#### sig_analog: Add Call Waiting Deluxe support.
Author: Naveen Albert
Date: 2023-08-24
Adds support for Call Waiting Deluxe options to enhance
the current call waiting feature.
As part of this change, a mechanism is also added that
allows a channel driver to queue an audio file for Dial()
to play, which is necessary for the announcement function.
ASTERISK-30373 #close
Resolves: #271
UserNote: Call Waiting Deluxe can now be enabled for FXS channels
by enabling its corresponding option.
#### app_sms: Ignore false positive vectorization warning.
Author: Naveen Albert
Date: 2025-01-24
Ignore gcc warning about writing 32 bytes into a region of size 6,
since we check that we don't go out of bounds for each byte.
This is due to a vectorization bug in gcc 15, stemming from
gcc commit 68326d5d1a593dc0bf098c03aac25916168bc5a9.
Resolves: #1088
#### lock.h: Add include for string.h when DEBUG_THREADS is defined.
Author: George Joseph
Date: 2025-05-02
When DEBUG_THREADS is defined, lock.h uses strerror(), which is defined
in the libc string.h file, to print warning messages. If the including
source file doesn't include string.h then strerror() won't be found and
and compile errors will be thrown. Since lock.h depends on this, string.h
is now included from there if DEBUG_THREADS is defined. This way, including
source files don't have to worry about it.
#### Alternate Channel Storage Backends
Author: George Joseph
Date: 2024-12-31
Full details: http://s.asterisk.net/dc679ec3
The previous proof-of-concept showed that the cpp_map_name_id alternate
storage backed performed better than all the others so this final PR
adds only that option. You still need to enable it in menuselect under
the "Alternate Channel Storage Backends" category.
To select which one is used at runtime, set the "channel_storage_backend"
option in asterisk.conf to one of the values described in
asterisk.conf.sample. The default remains "ao2_legacy".
UpgradeNote: With this release, you can now select an alternate channel
storage backend based on C++ Maps. Using the new backend may increase
performance and reduce the chances of deadlocks on heavily loaded systems.
For more information, see http://s.asterisk.net/dc679ec3

View File

@@ -1,78 +0,0 @@
<html><head><title>ChangeLog for asterisk-20.15.1</title></head><body>
<h2>Change Log for Release asterisk-20.15.1</h2>
<h3>Links:</h3>
<ul>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.15.1.html">Full ChangeLog</a> </li>
<li><a href="https://github.com/asterisk/asterisk/compare/20.15.0...20.15.1">GitHub Diff</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.15.1.tar.gz">Tarball</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk">Downloads</a> </li>
</ul>
<h3>Summary:</h3>
<ul>
<li>Commits: 2</li>
<li>Commit Authors: 2</li>
<li>Issues Resolved: 0</li>
<li>Security Advisories Resolved: 2</li>
<li><a href="https://github.com/asterisk/asterisk/security/advisories/GHSA-mrq5-74j5-f5cr">GHSA-mrq5-74j5-f5cr</a>: Remote DoS and possible RCE in asterisk/res/res_stir_shaken/verification.c</li>
<li><a href="https://github.com/asterisk/asterisk/security/advisories/GHSA-v9q8-9j8m-5xwp">GHSA-v9q8-9j8m-5xwp</a>: Uncontrolled Search-Path Element in safe_asterisk script may allow local privilege escalation.</li>
</ul>
<h3>User Notes:</h3>
<h3>Upgrade Notes:</h3>
<ul>
<li>
<h4>safe_asterisk: Add ownership checks for /etc/asterisk/startup.d and its files.</h4>
The safe_asterisk script now checks that, if it was run by the
root user, the /etc/asterisk/startup.d directory and all the files it contains
are owned by root. If the checks fail, safe_asterisk will exit with an error
and Asterisk will not be started. Additionally, the default logging
destination is now stderr instead of tty "9" which probably won't exist
in modern systems.</li>
</ul>
<h3>Developer Notes:</h3>
<h3>Commit Authors:</h3>
<ul>
<li>George Joseph: (1)</li>
<li>ThatTotallyRealMyth: (1)</li>
</ul>
<h2>Issue and Commit Detail:</h2>
<h3>Closed Issues:</h3>
<ul>
<li>!GHSA-mrq5-74j5-f5cr: Remote DoS and possible RCE in asterisk/res/res_stir_shaken/verification.c</li>
<li>!GHSA-v9q8-9j8m-5xwp: Uncontrolled Search-Path Element in safe_asterisk script may allow local privilege escalation.</li>
</ul>
<h3>Commits By Author:</h3>
<ul>
<li>
<h4>George Joseph (1):</h4>
</li>
<li>
<p>res_stir_shaken: Test for missing semicolon in Identity header.</p>
</li>
<li>
<h4>ThatTotallyRealMyth (1):</h4>
</li>
<li>safe_asterisk: Add ownership checks for /etc/asterisk/startup.d and its files.</li>
</ul>
<h3>Commit List:</h3>
<ul>
<li>safe_asterisk: Add ownership checks for /etc/asterisk/startup.d and its files.</li>
<li>res_stir_shaken: Test for missing semicolon in Identity header.</li>
</ul>
<h3>Commit Details:</h3>
<h4>safe_asterisk: Add ownership checks for /etc/asterisk/startup.d and its files.</h4>
<p>Author: ThatTotallyRealMyth
Date: 2025-06-10</p>
<p>UpgradeNote: The safe_asterisk script now checks that, if it was run by the
root user, the /etc/asterisk/startup.d directory and all the files it contains
are owned by root. If the checks fail, safe_asterisk will exit with an error
and Asterisk will not be started. Additionally, the default logging
destination is now stderr instead of tty "9" which probably won't exist
in modern systems.</p>
<p>Resolves: #GHSA-v9q8-9j8m-5xwp</p>
<h4>res_stir_shaken: Test for missing semicolon in Identity header.</h4>
<p>Author: George Joseph
Date: 2025-07-31</p>
<p>ast_stir_shaken_vs_verify() now makes sure there's a semicolon in
the Identity header to prevent a possible segfault.</p>
<p>Resolves: #GHSA-mrq5-74j5-f5cr</p>
</body></html>

View File

@@ -1,86 +0,0 @@
## Change Log for Release asterisk-20.15.1
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.15.1.html)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.15.0...20.15.1)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.15.1.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 2
- Commit Authors: 2
- Issues Resolved: 0
- Security Advisories Resolved: 2
- [GHSA-mrq5-74j5-f5cr](https://github.com/asterisk/asterisk/security/advisories/GHSA-mrq5-74j5-f5cr): Remote DoS and possible RCE in asterisk/res/res_stir_shaken/verification.c
- [GHSA-v9q8-9j8m-5xwp](https://github.com/asterisk/asterisk/security/advisories/GHSA-v9q8-9j8m-5xwp): Uncontrolled Search-Path Element in safe_asterisk script may allow local privilege escalation.
### User Notes:
### Upgrade Notes:
- #### safe_asterisk: Add ownership checks for /etc/asterisk/startup.d and its files.
The safe_asterisk script now checks that, if it was run by the
root user, the /etc/asterisk/startup.d directory and all the files it contains
are owned by root. If the checks fail, safe_asterisk will exit with an error
and Asterisk will not be started. Additionally, the default logging
destination is now stderr instead of tty "9" which probably won't exist
in modern systems.
### Developer Notes:
### Commit Authors:
- George Joseph: (1)
- ThatTotallyRealMyth: (1)
## Issue and Commit Detail:
### Closed Issues:
- !GHSA-mrq5-74j5-f5cr: Remote DoS and possible RCE in asterisk/res/res_stir_shaken/verification.c
- !GHSA-v9q8-9j8m-5xwp: Uncontrolled Search-Path Element in safe_asterisk script may allow local privilege escalation.
### Commits By Author:
- #### George Joseph (1):
- res_stir_shaken: Test for missing semicolon in Identity header.
- #### ThatTotallyRealMyth (1):
- safe_asterisk: Add ownership checks for /etc/asterisk/startup.d and its files.
### Commit List:
- safe_asterisk: Add ownership checks for /etc/asterisk/startup.d and its files.
- res_stir_shaken: Test for missing semicolon in Identity header.
### Commit Details:
#### safe_asterisk: Add ownership checks for /etc/asterisk/startup.d and its files.
Author: ThatTotallyRealMyth
Date: 2025-06-10
UpgradeNote: The safe_asterisk script now checks that, if it was run by the
root user, the /etc/asterisk/startup.d directory and all the files it contains
are owned by root. If the checks fail, safe_asterisk will exit with an error
and Asterisk will not be started. Additionally, the default logging
destination is now stderr instead of tty "9" which probably won't exist
in modern systems.
Resolves: #GHSA-v9q8-9j8m-5xwp
#### res_stir_shaken: Test for missing semicolon in Identity header.
Author: George Joseph
Date: 2025-07-31
ast_stir_shaken_vs_verify() now makes sure there's a semicolon in
the Identity header to prevent a possible segfault.
Resolves: #GHSA-mrq5-74j5-f5cr

View File

@@ -1,50 +0,0 @@
<html><head><title>ChangeLog for asterisk-20.15.2</title></head><body>
<h2>Change Log for Release asterisk-20.15.2</h2>
<h3>Links:</h3>
<ul>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.15.2.html">Full ChangeLog</a> </li>
<li><a href="https://github.com/asterisk/asterisk/compare/20.15.1...20.15.2">GitHub Diff</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.15.2.tar.gz">Tarball</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk">Downloads</a> </li>
</ul>
<h3>Summary:</h3>
<ul>
<li>Commits: 1</li>
<li>Commit Authors: 1</li>
<li>Issues Resolved: 0</li>
<li>Security Advisories Resolved: 1</li>
<li><a href="https://github.com/asterisk/asterisk/security/advisories/GHSA-64qc-9x89-rx5j">GHSA-64qc-9x89-rx5j</a>: A specifically malformed Authorization header in an incoming SIP request can cause Asterisk to crash</li>
</ul>
<h3>User Notes:</h3>
<h3>Upgrade Notes:</h3>
<h3>Developer Notes:</h3>
<h3>Commit Authors:</h3>
<ul>
<li>George Joseph: (1)</li>
</ul>
<h2>Issue and Commit Detail:</h2>
<h3>Closed Issues:</h3>
<ul>
<li>!GHSA-64qc-9x89-rx5j: A specifically malformed Authorization header in an incoming SIP request can cause Asterisk to crash</li>
</ul>
<h3>Commits By Author:</h3>
<ul>
<li>
<h4>George Joseph (1):</h4>
</li>
<li>res_pjsip_authenticator_digest: Fix SEGV if get_authorization_hdr returns NULL.</li>
</ul>
<h3>Commit List:</h3>
<ul>
<li>res_pjsip_authenticator_digest: Fix SEGV if get_authorization_hdr returns NULL.</li>
</ul>
<h3>Commit Details:</h3>
<h4>res_pjsip_authenticator_digest: Fix SEGV if get_authorization_hdr returns NULL.</h4>
<p>Author: George Joseph
Date: 2025-08-28</p>
<p>In the highly-unlikely event that get_authorization_hdr() couldn't find an
Authorization header in a request, trying to get the digest algorithm
would cauase a SEGV. We now check that we have an auth header that matches
the realm before trying to get the algorithm from it.</p>
<p>Resolves: #GHSA-64qc-9x89-rx5j</p>
</body></html>

View File

@@ -1,60 +0,0 @@
## Change Log for Release asterisk-20.15.2
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.15.2.html)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.15.1...20.15.2)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.15.2.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 1
- Commit Authors: 1
- Issues Resolved: 0
- Security Advisories Resolved: 1
- [GHSA-64qc-9x89-rx5j](https://github.com/asterisk/asterisk/security/advisories/GHSA-64qc-9x89-rx5j): A specifically malformed Authorization header in an incoming SIP request can cause Asterisk to crash
### User Notes:
### Upgrade Notes:
### Developer Notes:
### Commit Authors:
- George Joseph: (1)
## Issue and Commit Detail:
### Closed Issues:
- !GHSA-64qc-9x89-rx5j: A specifically malformed Authorization header in an incoming SIP request can cause Asterisk to crash
### Commits By Author:
- #### George Joseph (1):
- res_pjsip_authenticator_digest: Fix SEGV if get_authorization_hdr returns NULL.
### Commit List:
- res_pjsip_authenticator_digest: Fix SEGV if get_authorization_hdr returns NULL.
### Commit Details:
#### res_pjsip_authenticator_digest: Fix SEGV if get_authorization_hdr returns NULL.
Author: George Joseph
Date: 2025-08-28
In the highly-unlikely event that get_authorization_hdr() couldn't find an
Authorization header in a request, trying to get the digest algorithm
would cauase a SEGV. We now check that we have an auth header that matches
the realm before trying to get the algorithm from it.
Resolves: #GHSA-64qc-9x89-rx5j

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,775 +0,0 @@
<html><head><title>ChangeLog for asterisk-20.17.0</title></head><body>
<h2>Change Log for Release asterisk-20.17.0</h2>
<h3>Links:</h3>
<ul>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.17.0.html">Full ChangeLog</a> </li>
<li><a href="https://github.com/asterisk/asterisk/compare/20.16.0...20.17.0">GitHub Diff</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.17.0.tar.gz">Tarball</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk">Downloads</a> </li>
</ul>
<h3>Summary:</h3>
<ul>
<li>Commits: 50</li>
<li>Commit Authors: 16</li>
<li>Issues Resolved: 34</li>
<li>Security Advisories Resolved: 0</li>
</ul>
<h3>User Notes:</h3>
<ul>
<li>
<h4>res_stir_shaken: Add STIR_SHAKEN_ATTESTATION dialplan function.</h4>
<p>The STIR_SHAKEN_ATTESTATION dialplan function has been added
which will allow suppressing attestation on a call-by-call basis
regardless of the profile attached to the outgoing endpoint.</p>
</li>
<li>
<h4>func_channel: Allow R/W of ADSI CPE capability setting.</h4>
<p>CHANNEL(adsicpe) can now be read or written to change
the channels' ADSI CPE capability setting.</p>
</li>
<li>
<h4>func_hangupcause.c: Add access to Reason headers via HANGUPCAUSE()</h4>
<p>Added a new option to HANGUPCAUSE to access additional
information about hangup reason. Reason headers from pjsip
could be read using 'tech_extended' cause type.</p>
</li>
<li>
<h4>func_math: Add DIGIT_SUM function.</h4>
<p>The DIGIT_SUM function can be used to return the digit sum of
a number.</p>
</li>
<li>
<h4>app_sf: Add post-digit timer option to ReceiveSF.</h4>
<p>The 't' option for ReceiveSF now allows for a timer since
the last digit received, in addition to the number-wide timeout.</p>
</li>
<li>
<h4>app_dial: Allow fractional seconds for dial timeouts.</h4>
<p>The answer and progress dial timeouts now have millisecond
precision, instead of having to be whole numbers.</p>
</li>
<li>
<h4>chan_dahdi: Add DAHDI_CHANNEL function.</h4>
<p>The DAHDI_CHANNEL function allows for getting/setting
certain properties about DAHDI channels from the dialplan.</p>
</li>
</ul>
<h3>Upgrade Notes:</h3>
<ul>
<li>
<h4>res_audiosocket: add message types for all slin sample rates</h4>
<p>New audiosocket message types 0x11 - 0x18 has been added
for slin12, slin16, slin24, slin32, slin44, slin48, slin96, and
slin192 audio. External applications using audiosocket may need to be
updated to support these message types if the audiosocket channel is
created with one of these audio formats.</p>
</li>
<li>
<h4>taskpool: Add taskpool API, switch Stasis to using it.</h4>
<p>The threadpool_* options in stasis.conf have now been deprecated
though they continue to be read and used. They have been replaced with taskpool
options that give greater control over the underlying taskpool used for stasis.</p>
</li>
</ul>
<h3>Developer Notes:</h3>
<ul>
<li>
<h4>chan_pjsip: Add technology-specific off-nominal hangup cause to events.</h4>
<p>A "tech_cause" parameter has been added to the
ChannelHangupRequest and ChannelDestroyed ARI event messages and a "TechCause"
parameter has been added to the HangupRequest, SoftHangupRequest and Hangup
AMI event messages. For chan_pjsip, these will be set to the last SIP
response status code for off-nominally terminated calls. The parameter is
suppressed for nominal termination.</p>
</li>
<li>
<h4>ARI: The bridges play and record APIs now handle sample rates &gt; 8K correctly.</h4>
<p>The ARI /bridges/play and /bridges/record REST APIs have new
parameters that allow the caller to specify the format to be used on the
"Announcer" and "Recorder" channels respecitvely.</p>
</li>
<li>
<h4>taskpool: Add taskpool API, switch Stasis to using it.</h4>
<p>The taskpool API has been added for common usage of a
pool of taskprocessors. It is suggested to use this API instead of the
threadpool+taskprocessor approach.</p>
</li>
</ul>
<h3>Commit Authors:</h3>
<ul>
<li>Anthony Minessale: (1)</li>
<li>Bastian Triller: (1)</li>
<li>Ben Ford: (1)</li>
<li>Christoph Moench-Tegeder: (1)</li>
<li>George Joseph: (9)</li>
<li>Igor Goncharovsky: (1)</li>
<li>Joshua C. Colp: (6)</li>
<li>Max Grobecker: (1)</li>
<li>Nathan Monfils: (1)</li>
<li>Naveen Albert: (17)</li>
<li>Roman Pertsev: (1)</li>
<li>Sean Bright: (3)</li>
<li>Sven Kube: (3)</li>
<li>Tinet-mucw: (1)</li>
<li>gauravs456: (1)</li>
<li>phoneben: (2)</li>
</ul>
<h2>Issue and Commit Detail:</h2>
<h3>Closed Issues:</h3>
<ul>
<li>781: [improvement]: Allow call by call disabling Stir/Shaken header inclusion </li>
<li>1340: [bug]: comfort noise packet corrupted</li>
<li>1419: [bug]: static code analysis issues in app_adsiprog.c</li>
<li>1422: [bug]: static code analysis issues in apps/app_externalivr.c</li>
<li>1425: [bug]: static code analysis issues in apps/app_queue.c</li>
<li>1434: [improvement]: pbx_variables: Create real channel for dialplan eval CLI command</li>
<li>1436: [improvement]: res_cliexec: Avoid unnecessary cast to char*</li>
<li>1455: [new-feature]: chan_dahdi: Add DAHDI_CHANNEL function</li>
<li>1467: [bug]: Crash in res_pjsip_refer during REFER progress teardown with PJSIP_TRANSFER_HANDLING(ari-only)</li>
<li>1478: [improvement]: Stasis threadpool -&gt; taskpool</li>
<li>1479: [bug]: The ARI bridge play and record APIs limit audio bandwidth by forcing the slin8 format.</li>
<li>1483: [improvement]: sig_analog: Eliminate possible timeout for Last Number Redial</li>
<li>1485: [improvement]: func_scramble: Add example to XML documentation.</li>
<li>1487: [improvement]: app_dial: Allow partial seconds to be used for dial timeouts</li>
<li>1489: [improvement]: config_options.c: Improve misleading error message</li>
<li>1491: [bug]: Segfault: <code>channelstorage_cpp</code> fast lookup without lock (<code>get_by_name_exact</code>/<code>get_by_uniqueid</code>) leads to UAF during hangup</li>
<li>1493: [new-feature]: app_sf: Add post-digit timer option</li>
<li>1496: [improvement]: dsp.c: Minor fixes to debug log messages</li>
<li>1499: [new-feature]: func_math: Add function to return the digit sum</li>
<li>1505: [improvement]: res_fax: Add XML documentation for channel variables</li>
<li>1507: [improvement]: res_tonedetect: Minor formatting issue in documentation</li>
<li>1509: [improvement]: res_fax.c — log debug error as debug, not regular log</li>
<li>1510: [new-feature]: sig_analog: Allow '#' to end the inter-digit timeout when dialing.</li>
<li>1514: [improvement]: func_channel: Allow R/W of ADSI CPE capability setting.</li>
<li>1517: [improvement]: core_unreal: Preserve ADSI capability when dialing Local channels</li>
<li>1519: [improvement]: app_dial / func_callerid: DNIS information is not propagated by Dial</li>
<li>1525: [bug]: chan_websocket: fix use of raw payload variable for string comparison in process_text_message</li>
<li>1535: [bug]: chan_pjsip changes SSRC on WebRTC channels, which is unsupported by some browsers</li>
<li>1536: [bug]: asterisk -rx connects to console instead of executing a command</li>
<li>1539: [bug]: safe_asterisk without TTY doesn't log to file</li>
<li>1544: [improvement]: While Receiving the MediaConnect Message Using External Media Over websocket ChannelID is Details are missing</li>
<li>1554: [bug]: safe_asterisk recurses into subdirectories of startup.d after f97361</li>
<li>1559: [improvement]: Handle TLS handshake attacks in order to resolve the issue of exceeding the maximum number of HTTPS sessions.</li>
<li>1578: [bug]: Deadlock with externalMedia custom channel id and cpp map channel backend</li>
</ul>
<h3>Commits By Author:</h3>
<ul>
<li>
<h4>Anthony Minessale (1):</h4>
</li>
<li>
<h4>Bastian Triller (1):</h4>
</li>
<li>
<h4>Ben Ford (1):</h4>
</li>
<li>
<h4>Christoph Moench-Tegeder (1):</h4>
</li>
<li>
<h4>George Joseph (9):</h4>
</li>
<li>
<h4>Igor Goncharovsky (1):</h4>
</li>
<li>
<h4>Joshua C. Colp (6):</h4>
</li>
<li>
<h4>Max Grobecker (1):</h4>
</li>
<li>
<h4>Nathan Monfils (1):</h4>
</li>
<li>
<h4>Naveen Albert (17):</h4>
</li>
<li>
<h4>Roman Pertsev (1):</h4>
</li>
<li>
<h4>Sean Bright (3):</h4>
</li>
<li>
<h4>Sven Kube (3):</h4>
</li>
<li>
<h4>Tinet-mucw (1):</h4>
</li>
<li>
<h4>gauravs456 (1):</h4>
</li>
<li>
<h4>phoneben (2):</h4>
</li>
</ul>
<h3>Commit List:</h3>
<ul>
<li>channelstorage: Allow storage driver read locking to be skipped.</li>
<li>res_audiosocket: fix temporarily unavailable</li>
<li>safe_asterisk: Resolve a POSIX sh problem and restore globbing behavior.</li>
<li>res_stir_shaken: Add STIR_SHAKEN_ATTESTATION dialplan function.</li>
<li>iostream.c: Handle TLS handshake attacks in order to resolve the issue of exceeding the maximum number of HTTPS sessions.</li>
<li>chan_pjsip: Disable SSRC change for WebRTC endpoints.</li>
<li>chan_websocket: Add channel_id to MEDIA_START, DRIVER_STATUS and DTMF_END events.</li>
<li>safe_asterisk: Fix logging and sorting issue.</li>
<li>Fix Endianness detection in utils.h for non-Linux</li>
<li>devicestate: Don't publish redundant device state messages.</li>
<li>chan_pjsip: Add technology-specific off-nominal hangup cause to events.</li>
<li>res_audiosocket: add message types for all slin sample rates</li>
<li>res_fax.c: lower FAXOPT read warning to debug level</li>
<li>endpoints: Remove need for stasis subscription.</li>
<li>app_queue: Allow stasis message filtering to work.</li>
<li>taskpool: Fix some references to threadpool that should be taskpool.</li>
<li>Update contact information for anthm</li>
<li>chan_websocket.c: Change payload references to command instead.</li>
<li>func_callerid: Document limitation of DNID fields.</li>
<li>func_channel: Allow R/W of ADSI CPE capability setting.</li>
<li>core_unreal: Preserve ADSI capability when dialing Local channels.</li>
<li>func_hangupcause.c: Add access to Reason headers via HANGUPCAUSE()</li>
<li>sig_analog: Allow '#' to end the inter-digit timeout when dialing.</li>
<li>func_math: Add DIGIT_SUM function.</li>
<li>app_sf: Add post-digit timer option to ReceiveSF.</li>
<li>res_tonedetect: Fix formatting of XML documentation.</li>
<li>res_fax: Add XML documentation for channel variables.</li>
<li>channelstorage_cpp_map_name_id: Add read locking around retrievals.</li>
<li>app_dial: Allow fractional seconds for dial timeouts.</li>
<li>dsp.c: Make minor fixes to debug log messages.</li>
<li>config_options.c: Improve misleading warning.</li>
<li>func_scramble: Add example to XML documentation.</li>
<li>sig_analog: Eliminate potential timeout with Last Number Redial.</li>
<li>ARI: The bridges play and record APIs now handle sample rates &gt; 8K correctly.</li>
<li>res_pjsip_geolocation: Add support for Geolocation loc-src parameter</li>
<li>sorcery: Move from threadpool to taskpool.</li>
<li>stasis_channels.c: Make protocol_id optional to enable blind transfer via ari</li>
<li>Fix some doxygen, typos and whitespace</li>
<li>stasis_channels.c: Add null check for referred_by in ast_ari_transfer_message_create</li>
<li>app_queue: Add NULL pointer checks in app_queue</li>
<li>app_externalivr: Prevent out-of-bounds read during argument processing.</li>
<li>chan_dahdi: Add DAHDI_CHANNEL function.</li>
<li>taskpool: Update versions for taskpool stasis options.</li>
<li>taskpool: Add taskpool API, switch Stasis to using it.</li>
<li>app_adsiprog: Fix possible NULL dereference.</li>
<li>manager.c: Fix presencestate object leak</li>
<li>audiohook.c: Ensure correct AO2 reference is dereffed.</li>
<li>res_cliexec: Remove unnecessary casts to char*.</li>
<li>rtp_engine.c: Add exception for comfort noise payload.</li>
<li>pbx_variables.c: Create real channel for "dialplan eval function".</li>
</ul>
<h3>Commit Details:</h3>
<h4>channelstorage: Allow storage driver read locking to be skipped.</h4>
<p>Author: George Joseph
Date: 2025-11-06</p>
<p>After PR #1498 added read locking to channelstorage_cpp_map_name_id, if ARI
channels/externalMedia was called with a custom channel id AND the
cpp_map_name_id channel storage backend is in use, a deadlock can occur when
hanging up the channel. It's actually triggered in
channel.c:__ast_channel_alloc_ap() when it gets a write lock on the
channelstorage driver then subsequently does a lookup for channel uniqueid
which now does a read lock. This is an invalid operation and causes the lock
state to get "bad". When the channels try to hang up, a write lock is
attempted again which hangs and causes the deadlock.</p>
<p>Now instead of the cpp_map_name_id channelstorage driver "get" APIs
automatically performing a read lock, they take a "lock" parameter which
allows a caller who already has a write lock to indicate that the "get" API
must not attempt its own lock. This prevents the state from getting mesed up.</p>
<p>The ao2_legacy driver uses the ao2 container's recursive mutex so doesn't
have this issue but since it also implements the common channelstorage API,
it needed its "get" implementations updated to take the lock parameter. They
just don't use it.</p>
<p>Resolves: #1578</p>
<h4>res_audiosocket: fix temporarily unavailable</h4>
<p>Author: Roman Pertsev
Date: 2025-10-07</p>
<p>Operations on non-blocking sockets may return a resource temporarily unavailable error (EAGAIN or EWOULDBLOCK). This is not a fatal error but a normal condition indicating that the operation would block.</p>
<p>This patch corrects the handling of this case. Instead of incorrectly treating it as a reason to terminate the connection, the code now waits for data to arrive on the socket.</p>
<h4>safe_asterisk: Resolve a POSIX sh problem and restore globbing behavior.</h4>
<p>Author: Sean Bright
Date: 2025-10-22</p>
<ul>
<li>Using <code>==</code> with the POSIX sh <code>test</code> utility is UB.</li>
<li>Switch back to using globs instead of using <code>$(find … | sort)</code>.</li>
<li>Fix a missing redirect when checking for the OS type.</li>
</ul>
<p>Resolves: #1554</p>
<h4>res_stir_shaken: Add STIR_SHAKEN_ATTESTATION dialplan function.</h4>
<p>Author: George Joseph
Date: 2025-10-24</p>
<p>Also...</p>
<ul>
<li>
<p>Refactored the verification datastore process so instead of having
a separate channel datastore for each verification result, there's only
one channel datastore with a vector of results.</p>
</li>
<li>
<p>Refactored some log messages to include channel name and removed
some that would be redundant if a memory allocation failed.</p>
</li>
</ul>
<p>Resolves: #781</p>
<p>UserNote: The STIR_SHAKEN_ATTESTATION dialplan function has been added
which will allow suppressing attestation on a call-by-call basis
regardless of the profile attached to the outgoing endpoint.</p>
<h4>iostream.c: Handle TLS handshake attacks in order to resolve the issue of exceeding the maximum number of HTTPS sessions.</h4>
<p>Author: Tinet-mucw
Date: 2025-10-26</p>
<p>The TCP three-way handshake completes, but if the server is under a TLS handshake attack, asterisk will get stuck at SSL_do_handshake().
In this case, a timeout mechanism should be set for the SSL/TLS handshake process to prevent indefinite waiting during the SSL handshake.</p>
<p>Resolves: #1559</p>
<h4>chan_pjsip: Disable SSRC change for WebRTC endpoints.</h4>
<p>Author: George Joseph
Date: 2025-10-21</p>
<p>Commit b333ee3b introduced a fix to chan_pjsip that addressed RTP issues with
blind transfers and some SBCs. Unfortunately, the fix broke some WebRTC
clients that are sensitive to SSRC changes and non-monotonic timestamps so
the fix is now disabled for endpoints with the "bundle" parameter set to true.</p>
<p>Resolves: #1535</p>
<h4>chan_websocket: Add channel_id to MEDIA_START, DRIVER_STATUS and DTMF_END events.</h4>
<p>Author: gauravs456
Date: 2025-10-21</p>
<p>Resolves: #1544</p>
<h4>safe_asterisk: Fix logging and sorting issue.</h4>
<p>Author: George Joseph
Date: 2025-10-17</p>
<p>Re-enabled "TTY=9" which was erroneously disabled as part of a recent
security fix and removed another logging "fix" that was added.</p>
<p>Also added a sort to the "find" that enumerates the scripts to be sourced so
they're sourced in the correct order.</p>
<p>Resolves: #1539</p>
<h4>Fix Endianness detection in utils.h for non-Linux</h4>
<p>Author: Christoph Moench-Tegeder
Date: 2025-10-19</p>
<p>Commit 43bf8a4ded7a65203b766b91eaf8331a600e9d8d introduced endian
dependend byte-swapping code in include/asterisk/utils.h, where the
endianness was detected using the __BYTE_ORDER macro. This macro
lives in endian.h, which on Linux is included implicitely (by the
network-related headers, I think), but on FreeBSD the headers are
laid out differently and we do not get __BYTE_ORDER the implicit way.</p>
<p>Instead, this makes the usage of endian.h explicit by including it
where we need it, and switches the BYTE_ORDER/*ENDIAN macros to the
POSIX-defined ones (see
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/endian.h.html
for standard compliance). Additionally, this adds a compile-time check
for the endianness-logic: compilation will fail if neither big nor
little endian can be detected.</p>
<p>Fixes: #1536</p>
<h4>devicestate: Don't publish redundant device state messages.</h4>
<p>Author: Joshua C. Colp
Date: 2025-10-17</p>
<p>When publishing device state check the local cache for the
existing device state. If the new device state is unchanged
from the prior one, don't bother publishing the update. This
can reduce the work done by consumers of device state, such
as hints and app_queue, by not publishing a message to them.</p>
<p>These messages would most often occur with devices that are
seeing numerous simultaneous channels. The underlying device
state would remain as in use throughout, but an update would
be published as channels are created and hung up.</p>
<h4>chan_pjsip: Add technology-specific off-nominal hangup cause to events.</h4>
<p>Author: George Joseph
Date: 2025-10-14</p>
<p>Although the ISDN/Q.850/Q.931 hangup cause code is already part of the ARI
and AMI hangup and channel destroyed events, it can be helpful to know what
the actual channel technology code was if the call was unsuccessful.
For PJSIP, it's the SIP response code.</p>
<ul>
<li>
<p>A new "tech_hangupcause" field was added to the ast_channel structure along
with ast_channel_tech_hangupcause() and ast_channel_tech_hangupcause_set()
functions. It should only be set for off-nominal terminations.</p>
</li>
<li>
<p>chan_pjsip was modified to set the tech hangup cause in the
chan_pjsip_hangup() and chan_pjsip_session_end() functions. This is a bit
tricky because these two functions aren't always called in the same order.
The channel that hangs up first will get chan_pjsip_session_end() called
first which will trigger the core to call chan_pjsip_hangup() on itself,
then call chan_pjsip_hangup() on the other channel. The other channel's
chan_pjsip_session_end() function will get called last. Unfortunately,
the other channel's HangupRequest events are sent before chan_pjsip has had a
chance to set the tech hangupcause code so the HangupRequest events for that
channel won't have the cause code set. The ChannelDestroyed and Hangup
events however will have the code set for both channels.</p>
</li>
<li>
<p>A new "tech_cause" field was added to the ast_channel_snapshot_hangup
structure. This is a public structure so a bit of refactoring was needed to
preserve ABI compatibility.</p>
</li>
<li>
<p>The ARI ChannelHangupRequest and ChannelDestroyed events were modified to
include the "tech_cause" parameter in the JSON for off-nominal terminations.
The parameter is suppressed for nominal termination.</p>
</li>
<li>
<p>The AMI SoftHangupRequest, HangupRequest and Hangup events were modified to
include the "TechCause" parameter for off-nominal terminations. Like their ARI
counterparts, the parameter is suppressed for nominal termination.</p>
</li>
</ul>
<p>DeveloperNote: A "tech_cause" parameter has been added to the
ChannelHangupRequest and ChannelDestroyed ARI event messages and a "TechCause"
parameter has been added to the HangupRequest, SoftHangupRequest and Hangup
AMI event messages. For chan_pjsip, these will be set to the last SIP
response status code for off-nominally terminated calls. The parameter is
suppressed for nominal termination.</p>
<h4>res_audiosocket: add message types for all slin sample rates</h4>
<p>Author: Sven Kube
Date: 2025-10-10</p>
<p>Extend audiosocket messages with types 0x11 - 0x18 to create asterisk
frames in slin12, slin16, slin24, slin32, slin44, slin48, slin96, and
slin192 format, enabling the transmission of audio at a higher sample
rates. For audiosocket messages sent by Asterisk, the message kind is
determined by the format of the originating asterisk frame.</p>
<p>UpgradeNote: New audiosocket message types 0x11 - 0x18 has been added
for slin12, slin16, slin24, slin32, slin44, slin48, slin96, and
slin192 audio. External applications using audiosocket may need to be
updated to support these message types if the audiosocket channel is
created with one of these audio formats.</p>
<h4>res_fax.c: lower FAXOPT read warning to debug level</h4>
<p>Author: phoneben
Date: 2025-10-03</p>
<p>Reading ${FAXOPT()} before a fax session is common in dialplans to check fax state.
Currently this logs an error even when no fax datastore exists, creating excessive noise.
Change these messages to ast_debug(3, …) so they appear only with debug enabled.</p>
<p>Resolves: #1509</p>
<h4>endpoints: Remove need for stasis subscription.</h4>
<p>Author: Joshua C. Colp
Date: 2025-10-10</p>
<p>When an endpoint is created in the core of Asterisk a subscription
was previously created alongside it to monitor any channels being
destroyed that were related to it. This was done by receiving all
channel snapshot updates for every channel and only reacting when
it was indicated that the channel was dead.</p>
<p>This change removes this logic and instead provides an API call
for directly removing a channel from an endpoint. This is called
when channels are destroyed. This operation is fast, so blocking
the calling thread for a short period of time doesn't have any
noticeable impact.</p>
<h4>app_queue: Allow stasis message filtering to work.</h4>
<p>Author: Joshua C. Colp
Date: 2025-10-10</p>
<p>The app_queue module subscribes on a per-dialed agent basis to both
the bridge all and channel all topics to keep apprised of things going
on involving them. This subscription has associated state that must
be cleaned up when the subscription ends. This was done by setting
a default router callback that only had logic to handle the case
where the subscription ends. By using the default router callback
all filtering for the subscription was disabled, causing unrelated
messages to get published and handled by it.</p>
<p>This change makes it so that an explicit route is added for the
message type used for the message indicating the subscription has
ended and removes the default router callback. This allows message
filtering to occur on publishing reducing the messages to app_queue
to only those it is interested in.</p>
<h4>taskpool: Fix some references to threadpool that should be taskpool.</h4>
<p>Author: George Joseph
Date: 2025-10-10</p>
<p>Resolves: #1478</p>
<h4>Update contact information for anthm</h4>
<p>Author: Anthony Minessale
Date: 2025-10-10</p>
<h4>chan_websocket.c: Change payload references to command instead.</h4>
<p>Author: George Joseph
Date: 2025-10-08</p>
<p>Some of the tests in process_text_message() were still comparing to the
websocket message payload instead of the "command" string.</p>
<p>Resolves: #1525</p>
<h4>func_callerid: Document limitation of DNID fields.</h4>
<p>Author: Naveen Albert
Date: 2025-10-06</p>
<p>The Dial() application does not propagate DNID fields, which is counter
to the behavior of the other Caller ID fields. This behavior is likely
intentional since the use of Dial theoretically suggests a new dialed
number, but document this caveat to inform users of it.</p>
<p>Resolves: #1519</p>
<h4>func_channel: Allow R/W of ADSI CPE capability setting.</h4>
<p>Author: Naveen Albert
Date: 2025-10-06</p>
<p>Allow retrieving and setting the channel's ADSI capability from the
dialplan.</p>
<p>Resolves: #1514</p>
<p>UserNote: CHANNEL(adsicpe) can now be read or written to change
the channels' ADSI CPE capability setting.</p>
<h4>core_unreal: Preserve ADSI capability when dialing Local channels.</h4>
<p>Author: Naveen Albert
Date: 2025-10-06</p>
<p>Dial() already preserves the ADSI capability by copying it to the new
channel, but since Local channel pairs consist of two channels, we
also need to copy the capability to the second channel.</p>
<p>Resolves: #1517</p>
<h4>func_hangupcause.c: Add access to Reason headers via HANGUPCAUSE()</h4>
<p>Author: Igor Goncharovsky
Date: 2025-09-04</p>
<p>As soon as SIP call may end with several Reason headers, we
want to make all of them available through the HAGUPCAUSE() function.
This implementation uses the same ao2 hash for cause codes storage
and adds a flag to make difference between last processed sip
message and content of reason headers.</p>
<p>UserNote: Added a new option to HANGUPCAUSE to access additional
information about hangup reason. Reason headers from pjsip
could be read using 'tech_extended' cause type.</p>
<h4>sig_analog: Allow '#' to end the inter-digit timeout when dialing.</h4>
<p>Author: Naveen Albert
Date: 2025-10-03</p>
<p>It is customary to allow # to terminate digit collection immediately
when there would normally be a timeout. However, currently, users are
forced to wait for the timeout to expire when dialing numbers that
are prefixes of other valid matches, and there is no way to end the
timeout early. Customarily, # terminates the timeout, but at the moment,
this is just rejected unless there happens to be a matching extension
ending in #.</p>
<p>Allow # to terminate the timeout in cases where there is no dialplan
match. This ensures that the dialplan is always respected, but if a
valid extension has been dialed that happens to prefix other valid
matches, # can be used to dial it immediately.</p>
<p>Resolves: #1510</p>
<h4>func_math: Add DIGIT_SUM function.</h4>
<p>Author: Naveen Albert
Date: 2025-10-01</p>
<p>Add a function (DIGIT_SUM) which returns the digit sum of a number.</p>
<p>Resolves: #1499</p>
<p>UserNote: The DIGIT_SUM function can be used to return the digit sum of
a number.</p>
<h4>app_sf: Add post-digit timer option to ReceiveSF.</h4>
<p>Author: Naveen Albert
Date: 2025-10-01</p>
<p>Add a sorely needed option to set a timeout between digits, rather than
for receiving the entire number. This is needed if the number of digits
being sent is unknown by the receiver in advance. Previously, we had
to wait for the entire timer to expire.</p>
<p>Resolves: #1493</p>
<p>UserNote: The 't' option for ReceiveSF now allows for a timer since
the last digit received, in addition to the number-wide timeout.</p>
<h4>res_tonedetect: Fix formatting of XML documentation.</h4>
<p>Author: Naveen Albert
Date: 2025-10-02</p>
<p>Fix the indentation in the documentation for the variable list.</p>
<p>Resolves: #1507</p>
<h4>res_fax: Add XML documentation for channel variables.</h4>
<p>Author: Naveen Albert
Date: 2025-10-02</p>
<p>Document the channel variables currently set by SendFAX and ReceiveFAX.</p>
<p>Resolves: #1505</p>
<h4>channelstorage_cpp_map_name_id: Add read locking around retrievals.</h4>
<p>Author: George Joseph
Date: 2025-10-01</p>
<p>When we retrieve a channel from a C++ map, we actually get back a wrapper
object that points to the channel then right after we retrieve it, we bump its
reference count. There's a tiny chance however that between those two
statements a delete and/or unref might happen which would cause the wrapper
object or the channel itself to become invalid resulting in a SEGV. To avoid
this we now perform a read lock on the driver around those statements.</p>
<p>Resolves: #1491</p>
<h4>app_dial: Allow fractional seconds for dial timeouts.</h4>
<p>Author: Naveen Albert
Date: 2025-09-30</p>
<p>Even though Dial() internally uses milliseconds for its dial timeouts,
this capability has been mostly obscured from users as the argument is
only parsed as an integer, thus forcing the use of whole seconds for
timeouts.</p>
<p>Parse it as a decimal instead so that timeouts can now truly have
millisecond precision.</p>
<p>Resolves: #1487</p>
<p>UserNote: The answer and progress dial timeouts now have millisecond
precision, instead of having to be whole numbers.</p>
<h4>dsp.c: Make minor fixes to debug log messages.</h4>
<p>Author: Naveen Albert
Date: 2025-10-01</p>
<p>Commit dc8e3eeaaf094a3d16991289934093d5e7127680 improved the debug log
messages in dsp.c. This makes two minor corrections to it:</p>
<ul>
<li>Properly guard an added log statement in a conditional.</li>
<li>Don't add one to the hit count if there was no hit (however, we do
still want to do this for the case where this is one).</li>
</ul>
<p>Resolves: #1496</p>
<h4>config_options.c: Improve misleading warning.</h4>
<p>Author: Naveen Albert
Date: 2025-09-30</p>
<p>When running "config show help <module>", if no XML documentation exists
for the specified module, "Module <module> not found." is returned,
which is misleading if the module is loaded but simply has no XML
documentation for its config. Improve the message to clarify that the
module may simply have no config documentation.</p>
<p>Resolves: #1489</p>
<h4>func_scramble: Add example to XML documentation.</h4>
<p>Author: Naveen Albert
Date: 2025-09-29</p>
<p>The previous lack of an example made it ambiguous if the arguments went
inside the function arguments or were part of the right-hand value.</p>
<p>Resolves: #1485</p>
<h4>sig_analog: Eliminate potential timeout with Last Number Redial.</h4>
<p>Author: Naveen Albert
Date: 2025-09-29</p>
<p>If Last Number Redial is used to redial, ensure that we do not wait
for further digits. This was possible if the number that was last
dialed is a prefix of another possible dialplan match. Since all we
did is copy the number into the extension buffer, if other matches
are now possible, there would thus be a timeout before the call went
through. We now complete redialed calls immediaetly in all cases.</p>
<p>Resolves: #1483</p>
<h4>ARI: The bridges play and record APIs now handle sample rates &gt; 8K correctly.</h4>
<p>Author: George Joseph
Date: 2025-09-25</p>
<p>The bridge play and record APIs were forcing the Announcer/Recorder channel
to slin8 which meant that if you played or recorded audio with a sample
rate &gt; 8K, it was downsampled to 8K limiting the bandwidth.</p>
<ul>
<li>
<p>The /bridges/play REST APIs have a new "announcer_format" parameter that
allows the caller to explicitly set the format on the "Announcer" channel
through which the audio is played into the bridge. If not specified, the
default depends on how many channels are currently in the bridge. If
a single channel is in the bridge, then the Announcer channel's format
will be set to the same as that channel's. If multiple channels are in the
bridge, the channels will be scanned to find the one with the highest
sample rate and the Announcer channel's format will be set to the slin
format that has an equal to or greater than sample rate.</p>
</li>
<li>
<p>The /bridges/record REST API has a new "recorder_format" parameter that
allows the caller to explicitly set the format on the "Recorder" channel
from which audio is retrieved to write to the file. If not specified,
the Recorder channel's format will be set to the format that was requested
to save the audio in.</p>
</li>
</ul>
<p>Resolves: #1479</p>
<p>DeveloperNote: The ARI /bridges/play and /bridges/record REST APIs have new
parameters that allow the caller to specify the format to be used on the
"Announcer" and "Recorder" channels respecitvely.</p>
<h4>res_pjsip_geolocation: Add support for Geolocation loc-src parameter</h4>
<p>Author: Max Grobecker
Date: 2025-09-21</p>
<p>This adds support for the Geolocation 'loc-src' parameter to res_pjsip_geolocation.
The already existing config option 'location_source` in res_geolocation is documented to add a 'loc-src' parameter containing a user-defined FQDN to the 'Geolocation:' header,
but that option had no effect as it was not implemented by res_pjsip_geolocation.</p>
<p>If the <code>location_source</code> configuration option is not set or invalid, that parameter will not be added (this is already checked by res_geolocation).</p>
<p>This commits adds already documented functionality.</p>
<h4>sorcery: Move from threadpool to taskpool.</h4>
<p>Author: Joshua C. Colp
Date: 2025-09-23</p>
<p>This change moves observer invocation from the use of
a threadpool to a taskpool. The taskpool options have also
been adjusted to ensure that at least one taskprocessor
remains available at all times.</p>
<h4>stasis_channels.c: Make protocol_id optional to enable blind transfer via ari</h4>
<p>Author: Sven Kube
Date: 2025-09-22</p>
<p>When handling SIP transfers via ARI, there is no protocol_id in case of
a blind transfer.</p>
<p>Resolves: #1467</p>
<h4>Fix some doxygen, typos and whitespace</h4>
<p>Author: Bastian Triller
Date: 2025-09-22</p>
<h4>stasis_channels.c: Add null check for referred_by in ast_ari_transfer_message_create</h4>
<p>Author: Sven Kube
Date: 2025-09-18</p>
<p>When handling SIP transfers via ARI, the <code>referred_by</code> field in
<code>transfer_ari_state</code> may be null, since SIP REFER requests are not
required to include a <code>Referred-By</code> header. Without this check, a null
value caused the transfer to fail and triggered a NOTIFY with a 500
Internal Server Error.</p>
<h4>app_queue: Add NULL pointer checks in app_queue</h4>
<p>Author: phoneben
Date: 2025-09-11</p>
<p>Add NULL check for word_list before calling word_in_list()
Add NULL checks for channel snapshots from ast_multi_channel_blob_get_channel()</p>
<p>Resolves: #1425</p>
<h4>app_externalivr: Prevent out-of-bounds read during argument processing.</h4>
<p>Author: Sean Bright
Date: 2025-09-17</p>
<p>Resolves: #1422</p>
<h4>chan_dahdi: Add DAHDI_CHANNEL function.</h4>
<p>Author: Naveen Albert
Date: 2025-09-11</p>
<p>Add a dialplan function that can be used to get/set properties of
DAHDI channels (as opposed to Asterisk channels). This exposes
properties that were not previously available, allowing for certain
operations to now be performed in the dialplan.</p>
<p>Resolves: #1455</p>
<p>UserNote: The DAHDI_CHANNEL function allows for getting/setting
certain properties about DAHDI channels from the dialplan.</p>
<h4>taskpool: Update versions for taskpool stasis options.</h4>
<p>Author: Joshua C. Colp
Date: 2025-09-16</p>
<h4>taskpool: Add taskpool API, switch Stasis to using it.</h4>
<p>Author: Joshua C. Colp
Date: 2025-08-06</p>
<p>This change introduces a new API called taskpool. This is a pool
of taskprocessors. It provides the following functionality:</p>
<ol>
<li>Task pushing to a pool of taskprocessors</li>
<li>Synchronous tasks</li>
<li>Serializers for execution ordering of tasks</li>
<li>Growing/shrinking of number of taskprocessors in pool</li>
</ol>
<p>This functionality already exists through the combination of
threadpool+taskprocessors but through investigating I determined
that this carries substantial overhead for short to medium duration
tasks. The threadpool uses a single queue of work, and for management
of threads it involves additional tasks.</p>
<p>I wrote taskpool to eliminate the extra overhead and management
as much as possible. Instead of a single queue of work each
taskprocessor has its own queue and at push time a selector chooses
the taskprocessor to queue the task to. Each taskprocessor also
has its own thread like normal. This spreads out the tasks immediately
and reduces contention on shared resources.</p>
<p>Using the included efficiency tests the number of tasks that can be
executed per second in a taskpool is 6-12 times more than an equivalent
threadpool+taskprocessor setup.</p>
<p>Stasis has been moved over to using this new API as it is a heavy consumer
of threadpool+taskprocessors and produces a lot of tasks.</p>
<p>UpgradeNote: The threadpool_* options in stasis.conf have now been deprecated
though they continue to be read and used. They have been replaced with taskpool
options that give greater control over the underlying taskpool used for stasis.</p>
<p>DeveloperNote: The taskpool API has been added for common usage of a
pool of taskprocessors. It is suggested to use this API instead of the
threadpool+taskprocessor approach.</p>
<h4>app_adsiprog: Fix possible NULL dereference.</h4>
<p>Author: Naveen Albert
Date: 2025-09-10</p>
<p>get_token can return NULL, but process_token uses this result without
checking for NULL; as elsewhere, check for a NULL result to avoid
possible NULL dereference.</p>
<p>Resolves: #1419</p>
<h4>manager.c: Fix presencestate object leak</h4>
<p>Author: Nathan Monfils
Date: 2025-09-08</p>
<p>ast_presence_state allocates subtype and message. We straightforwardly
need to clean those up.</p>
<h4>audiohook.c: Ensure correct AO2 reference is dereffed.</h4>
<p>Author: Sean Bright
Date: 2025-09-10</p>
<p>Part of #1440.</p>
<h4>res_cliexec: Remove unnecessary casts to char*.</h4>
<p>Author: Naveen Albert
Date: 2025-09-09</p>
<p>Resolves: #1436</p>
<h4>rtp_engine.c: Add exception for comfort noise payload.</h4>
<p>Author: Ben Ford
Date: 2025-09-09</p>
<p>In a previous commit, a change was made to
ast_rtp_codecs_payload_code_tx_sample_rate to check for differing sample
rates. This ended up returning an invalid payload int for comfort noise.
A check has been added that returns early if the payload is in fact
supposed to be comfort noise.</p>
<p>Fixes: #1340</p>
<h4>pbx_variables.c: Create real channel for "dialplan eval function".</h4>
<p>Author: Naveen Albert
Date: 2025-09-09</p>
<p>"dialplan eval function" has been using a dummy channel for function
evaluation, much like many of the unit tests. However, sometimes, this
can cause issues for functions that are not expecting dummy channels.
As an example, ast_channel_tech(chan) is NULL on such channels, and
ast_channel_tech(chan)-&gt;type consequently results in a NULL dereference.
Normally, functions do not worry about this since channels executing
dialplan aren't dummy channels.</p>
<p>While some functions are better about checking for these sorts of edge
cases, use a real channel with a dummy technology to make this CLI
command inherently safe for any dialplan function that could be evaluated
from the CLI.</p>
<p>Resolves: #1434</p>
</body></html>

View File

@@ -1,888 +0,0 @@
## Change Log for Release asterisk-20.17.0
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.17.0.html)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.16.0...20.17.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.17.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 50
- Commit Authors: 16
- Issues Resolved: 34
- Security Advisories Resolved: 0
### User Notes:
- #### res_stir_shaken: Add STIR_SHAKEN_ATTESTATION dialplan function.
The STIR_SHAKEN_ATTESTATION dialplan function has been added
which will allow suppressing attestation on a call-by-call basis
regardless of the profile attached to the outgoing endpoint.
- #### func_channel: Allow R/W of ADSI CPE capability setting.
CHANNEL(adsicpe) can now be read or written to change
the channels' ADSI CPE capability setting.
- #### func_hangupcause.c: Add access to Reason headers via HANGUPCAUSE()
Added a new option to HANGUPCAUSE to access additional
information about hangup reason. Reason headers from pjsip
could be read using 'tech_extended' cause type.
- #### func_math: Add DIGIT_SUM function.
The DIGIT_SUM function can be used to return the digit sum of
a number.
- #### app_sf: Add post-digit timer option to ReceiveSF.
The 't' option for ReceiveSF now allows for a timer since
the last digit received, in addition to the number-wide timeout.
- #### app_dial: Allow fractional seconds for dial timeouts.
The answer and progress dial timeouts now have millisecond
precision, instead of having to be whole numbers.
- #### chan_dahdi: Add DAHDI_CHANNEL function.
The DAHDI_CHANNEL function allows for getting/setting
certain properties about DAHDI channels from the dialplan.
### Upgrade Notes:
- #### res_audiosocket: add message types for all slin sample rates
New audiosocket message types 0x11 - 0x18 has been added
for slin12, slin16, slin24, slin32, slin44, slin48, slin96, and
slin192 audio. External applications using audiosocket may need to be
updated to support these message types if the audiosocket channel is
created with one of these audio formats.
- #### taskpool: Add taskpool API, switch Stasis to using it.
The threadpool_* options in stasis.conf have now been deprecated
though they continue to be read and used. They have been replaced with taskpool
options that give greater control over the underlying taskpool used for stasis.
### Developer Notes:
- #### chan_pjsip: Add technology-specific off-nominal hangup cause to events.
A "tech_cause" parameter has been added to the
ChannelHangupRequest and ChannelDestroyed ARI event messages and a "TechCause"
parameter has been added to the HangupRequest, SoftHangupRequest and Hangup
AMI event messages. For chan_pjsip, these will be set to the last SIP
response status code for off-nominally terminated calls. The parameter is
suppressed for nominal termination.
- #### ARI: The bridges play and record APIs now handle sample rates > 8K correctly.
The ARI /bridges/play and /bridges/record REST APIs have new
parameters that allow the caller to specify the format to be used on the
"Announcer" and "Recorder" channels respecitvely.
- #### taskpool: Add taskpool API, switch Stasis to using it.
The taskpool API has been added for common usage of a
pool of taskprocessors. It is suggested to use this API instead of the
threadpool+taskprocessor approach.
### Commit Authors:
- Anthony Minessale: (1)
- Bastian Triller: (1)
- Ben Ford: (1)
- Christoph Moench-Tegeder: (1)
- George Joseph: (9)
- Igor Goncharovsky: (1)
- Joshua C. Colp: (6)
- Max Grobecker: (1)
- Nathan Monfils: (1)
- Naveen Albert: (17)
- Roman Pertsev: (1)
- Sean Bright: (3)
- Sven Kube: (3)
- Tinet-mucw: (1)
- gauravs456: (1)
- phoneben: (2)
## Issue and Commit Detail:
### Closed Issues:
- 781: [improvement]: Allow call by call disabling Stir/Shaken header inclusion
- 1340: [bug]: comfort noise packet corrupted
- 1419: [bug]: static code analysis issues in app_adsiprog.c
- 1422: [bug]: static code analysis issues in apps/app_externalivr.c
- 1425: [bug]: static code analysis issues in apps/app_queue.c
- 1434: [improvement]: pbx_variables: Create real channel for dialplan eval CLI command
- 1436: [improvement]: res_cliexec: Avoid unnecessary cast to char*
- 1455: [new-feature]: chan_dahdi: Add DAHDI_CHANNEL function
- 1467: [bug]: Crash in res_pjsip_refer during REFER progress teardown with PJSIP_TRANSFER_HANDLING(ari-only)
- 1478: [improvement]: Stasis threadpool -> taskpool
- 1479: [bug]: The ARI bridge play and record APIs limit audio bandwidth by forcing the slin8 format.
- 1483: [improvement]: sig_analog: Eliminate possible timeout for Last Number Redial
- 1485: [improvement]: func_scramble: Add example to XML documentation.
- 1487: [improvement]: app_dial: Allow partial seconds to be used for dial timeouts
- 1489: [improvement]: config_options.c: Improve misleading error message
- 1491: [bug]: Segfault: `channelstorage_cpp` fast lookup without lock (`get_by_name_exact`/`get_by_uniqueid`) leads to UAF during hangup
- 1493: [new-feature]: app_sf: Add post-digit timer option
- 1496: [improvement]: dsp.c: Minor fixes to debug log messages
- 1499: [new-feature]: func_math: Add function to return the digit sum
- 1505: [improvement]: res_fax: Add XML documentation for channel variables
- 1507: [improvement]: res_tonedetect: Minor formatting issue in documentation
- 1509: [improvement]: res_fax.c — log debug error as debug, not regular log
- 1510: [new-feature]: sig_analog: Allow '#' to end the inter-digit timeout when dialing.
- 1514: [improvement]: func_channel: Allow R/W of ADSI CPE capability setting.
- 1517: [improvement]: core_unreal: Preserve ADSI capability when dialing Local channels
- 1519: [improvement]: app_dial / func_callerid: DNIS information is not propagated by Dial
- 1525: [bug]: chan_websocket: fix use of raw payload variable for string comparison in process_text_message
- 1535: [bug]: chan_pjsip changes SSRC on WebRTC channels, which is unsupported by some browsers
- 1536: [bug]: asterisk -rx connects to console instead of executing a command
- 1539: [bug]: safe_asterisk without TTY doesn't log to file
- 1544: [improvement]: While Receiving the MediaConnect Message Using External Media Over websocket ChannelID is Details are missing
- 1554: [bug]: safe_asterisk recurses into subdirectories of startup.d after f97361
- 1559: [improvement]: Handle TLS handshake attacks in order to resolve the issue of exceeding the maximum number of HTTPS sessions.
- 1578: [bug]: Deadlock with externalMedia custom channel id and cpp map channel backend
### Commits By Author:
- #### Anthony Minessale (1):
- #### Bastian Triller (1):
- #### Ben Ford (1):
- #### Christoph Moench-Tegeder (1):
- #### George Joseph (9):
- #### Igor Goncharovsky (1):
- #### Joshua C. Colp (6):
- #### Max Grobecker (1):
- #### Nathan Monfils (1):
- #### Naveen Albert (17):
- #### Roman Pertsev (1):
- #### Sean Bright (3):
- #### Sven Kube (3):
- #### Tinet-mucw (1):
- #### gauravs456 (1):
- #### phoneben (2):
### Commit List:
- channelstorage: Allow storage driver read locking to be skipped.
- res_audiosocket: fix temporarily unavailable
- safe_asterisk: Resolve a POSIX sh problem and restore globbing behavior.
- res_stir_shaken: Add STIR_SHAKEN_ATTESTATION dialplan function.
- iostream.c: Handle TLS handshake attacks in order to resolve the issue of exceeding the maximum number of HTTPS sessions.
- chan_pjsip: Disable SSRC change for WebRTC endpoints.
- chan_websocket: Add channel_id to MEDIA_START, DRIVER_STATUS and DTMF_END events.
- safe_asterisk: Fix logging and sorting issue.
- Fix Endianness detection in utils.h for non-Linux
- devicestate: Don't publish redundant device state messages.
- chan_pjsip: Add technology-specific off-nominal hangup cause to events.
- res_audiosocket: add message types for all slin sample rates
- res_fax.c: lower FAXOPT read warning to debug level
- endpoints: Remove need for stasis subscription.
- app_queue: Allow stasis message filtering to work.
- taskpool: Fix some references to threadpool that should be taskpool.
- Update contact information for anthm
- chan_websocket.c: Change payload references to command instead.
- func_callerid: Document limitation of DNID fields.
- func_channel: Allow R/W of ADSI CPE capability setting.
- core_unreal: Preserve ADSI capability when dialing Local channels.
- func_hangupcause.c: Add access to Reason headers via HANGUPCAUSE()
- sig_analog: Allow '#' to end the inter-digit timeout when dialing.
- func_math: Add DIGIT_SUM function.
- app_sf: Add post-digit timer option to ReceiveSF.
- res_tonedetect: Fix formatting of XML documentation.
- res_fax: Add XML documentation for channel variables.
- channelstorage_cpp_map_name_id: Add read locking around retrievals.
- app_dial: Allow fractional seconds for dial timeouts.
- dsp.c: Make minor fixes to debug log messages.
- config_options.c: Improve misleading warning.
- func_scramble: Add example to XML documentation.
- sig_analog: Eliminate potential timeout with Last Number Redial.
- ARI: The bridges play and record APIs now handle sample rates > 8K correctly.
- res_pjsip_geolocation: Add support for Geolocation loc-src parameter
- sorcery: Move from threadpool to taskpool.
- stasis_channels.c: Make protocol_id optional to enable blind transfer via ari
- Fix some doxygen, typos and whitespace
- stasis_channels.c: Add null check for referred_by in ast_ari_transfer_message_create
- app_queue: Add NULL pointer checks in app_queue
- app_externalivr: Prevent out-of-bounds read during argument processing.
- chan_dahdi: Add DAHDI_CHANNEL function.
- taskpool: Update versions for taskpool stasis options.
- taskpool: Add taskpool API, switch Stasis to using it.
- app_adsiprog: Fix possible NULL dereference.
- manager.c: Fix presencestate object leak
- audiohook.c: Ensure correct AO2 reference is dereffed.
- res_cliexec: Remove unnecessary casts to char*.
- rtp_engine.c: Add exception for comfort noise payload.
- pbx_variables.c: Create real channel for "dialplan eval function".
### Commit Details:
#### channelstorage: Allow storage driver read locking to be skipped.
Author: George Joseph
Date: 2025-11-06
After PR #1498 added read locking to channelstorage_cpp_map_name_id, if ARI
channels/externalMedia was called with a custom channel id AND the
cpp_map_name_id channel storage backend is in use, a deadlock can occur when
hanging up the channel. It's actually triggered in
channel.c:__ast_channel_alloc_ap() when it gets a write lock on the
channelstorage driver then subsequently does a lookup for channel uniqueid
which now does a read lock. This is an invalid operation and causes the lock
state to get "bad". When the channels try to hang up, a write lock is
attempted again which hangs and causes the deadlock.
Now instead of the cpp_map_name_id channelstorage driver "get" APIs
automatically performing a read lock, they take a "lock" parameter which
allows a caller who already has a write lock to indicate that the "get" API
must not attempt its own lock. This prevents the state from getting mesed up.
The ao2_legacy driver uses the ao2 container's recursive mutex so doesn't
have this issue but since it also implements the common channelstorage API,
it needed its "get" implementations updated to take the lock parameter. They
just don't use it.
Resolves: #1578
#### res_audiosocket: fix temporarily unavailable
Author: Roman Pertsev
Date: 2025-10-07
Operations on non-blocking sockets may return a resource temporarily unavailable error (EAGAIN or EWOULDBLOCK). This is not a fatal error but a normal condition indicating that the operation would block.
This patch corrects the handling of this case. Instead of incorrectly treating it as a reason to terminate the connection, the code now waits for data to arrive on the socket.
#### safe_asterisk: Resolve a POSIX sh problem and restore globbing behavior.
Author: Sean Bright
Date: 2025-10-22
* Using `==` with the POSIX sh `test` utility is UB.
* Switch back to using globs instead of using `$(find … | sort)`.
* Fix a missing redirect when checking for the OS type.
Resolves: #1554
#### res_stir_shaken: Add STIR_SHAKEN_ATTESTATION dialplan function.
Author: George Joseph
Date: 2025-10-24
Also...
* Refactored the verification datastore process so instead of having
a separate channel datastore for each verification result, there's only
one channel datastore with a vector of results.
* Refactored some log messages to include channel name and removed
some that would be redundant if a memory allocation failed.
Resolves: #781
UserNote: The STIR_SHAKEN_ATTESTATION dialplan function has been added
which will allow suppressing attestation on a call-by-call basis
regardless of the profile attached to the outgoing endpoint.
#### iostream.c: Handle TLS handshake attacks in order to resolve the issue of exceeding the maximum number of HTTPS sessions.
Author: Tinet-mucw
Date: 2025-10-26
The TCP three-way handshake completes, but if the server is under a TLS handshake attack, asterisk will get stuck at SSL_do_handshake().
In this case, a timeout mechanism should be set for the SSL/TLS handshake process to prevent indefinite waiting during the SSL handshake.
Resolves: #1559
#### chan_pjsip: Disable SSRC change for WebRTC endpoints.
Author: George Joseph
Date: 2025-10-21
Commit b333ee3b introduced a fix to chan_pjsip that addressed RTP issues with
blind transfers and some SBCs. Unfortunately, the fix broke some WebRTC
clients that are sensitive to SSRC changes and non-monotonic timestamps so
the fix is now disabled for endpoints with the "bundle" parameter set to true.
Resolves: #1535
#### chan_websocket: Add channel_id to MEDIA_START, DRIVER_STATUS and DTMF_END events.
Author: gauravs456
Date: 2025-10-21
Resolves: #1544
#### safe_asterisk: Fix logging and sorting issue.
Author: George Joseph
Date: 2025-10-17
Re-enabled "TTY=9" which was erroneously disabled as part of a recent
security fix and removed another logging "fix" that was added.
Also added a sort to the "find" that enumerates the scripts to be sourced so
they're sourced in the correct order.
Resolves: #1539
#### Fix Endianness detection in utils.h for non-Linux
Author: Christoph Moench-Tegeder
Date: 2025-10-19
Commit 43bf8a4ded7a65203b766b91eaf8331a600e9d8d introduced endian
dependend byte-swapping code in include/asterisk/utils.h, where the
endianness was detected using the __BYTE_ORDER macro. This macro
lives in endian.h, which on Linux is included implicitely (by the
network-related headers, I think), but on FreeBSD the headers are
laid out differently and we do not get __BYTE_ORDER the implicit way.
Instead, this makes the usage of endian.h explicit by including it
where we need it, and switches the BYTE_ORDER/*ENDIAN macros to the
POSIX-defined ones (see
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/endian.h.html
for standard compliance). Additionally, this adds a compile-time check
for the endianness-logic: compilation will fail if neither big nor
little endian can be detected.
Fixes: #1536
#### devicestate: Don't publish redundant device state messages.
Author: Joshua C. Colp
Date: 2025-10-17
When publishing device state check the local cache for the
existing device state. If the new device state is unchanged
from the prior one, don't bother publishing the update. This
can reduce the work done by consumers of device state, such
as hints and app_queue, by not publishing a message to them.
These messages would most often occur with devices that are
seeing numerous simultaneous channels. The underlying device
state would remain as in use throughout, but an update would
be published as channels are created and hung up.
#### chan_pjsip: Add technology-specific off-nominal hangup cause to events.
Author: George Joseph
Date: 2025-10-14
Although the ISDN/Q.850/Q.931 hangup cause code is already part of the ARI
and AMI hangup and channel destroyed events, it can be helpful to know what
the actual channel technology code was if the call was unsuccessful.
For PJSIP, it's the SIP response code.
* A new "tech_hangupcause" field was added to the ast_channel structure along
with ast_channel_tech_hangupcause() and ast_channel_tech_hangupcause_set()
functions. It should only be set for off-nominal terminations.
* chan_pjsip was modified to set the tech hangup cause in the
chan_pjsip_hangup() and chan_pjsip_session_end() functions. This is a bit
tricky because these two functions aren't always called in the same order.
The channel that hangs up first will get chan_pjsip_session_end() called
first which will trigger the core to call chan_pjsip_hangup() on itself,
then call chan_pjsip_hangup() on the other channel. The other channel's
chan_pjsip_session_end() function will get called last. Unfortunately,
the other channel's HangupRequest events are sent before chan_pjsip has had a
chance to set the tech hangupcause code so the HangupRequest events for that
channel won't have the cause code set. The ChannelDestroyed and Hangup
events however will have the code set for both channels.
* A new "tech_cause" field was added to the ast_channel_snapshot_hangup
structure. This is a public structure so a bit of refactoring was needed to
preserve ABI compatibility.
* The ARI ChannelHangupRequest and ChannelDestroyed events were modified to
include the "tech_cause" parameter in the JSON for off-nominal terminations.
The parameter is suppressed for nominal termination.
* The AMI SoftHangupRequest, HangupRequest and Hangup events were modified to
include the "TechCause" parameter for off-nominal terminations. Like their ARI
counterparts, the parameter is suppressed for nominal termination.
DeveloperNote: A "tech_cause" parameter has been added to the
ChannelHangupRequest and ChannelDestroyed ARI event messages and a "TechCause"
parameter has been added to the HangupRequest, SoftHangupRequest and Hangup
AMI event messages. For chan_pjsip, these will be set to the last SIP
response status code for off-nominally terminated calls. The parameter is
suppressed for nominal termination.
#### res_audiosocket: add message types for all slin sample rates
Author: Sven Kube
Date: 2025-10-10
Extend audiosocket messages with types 0x11 - 0x18 to create asterisk
frames in slin12, slin16, slin24, slin32, slin44, slin48, slin96, and
slin192 format, enabling the transmission of audio at a higher sample
rates. For audiosocket messages sent by Asterisk, the message kind is
determined by the format of the originating asterisk frame.
UpgradeNote: New audiosocket message types 0x11 - 0x18 has been added
for slin12, slin16, slin24, slin32, slin44, slin48, slin96, and
slin192 audio. External applications using audiosocket may need to be
updated to support these message types if the audiosocket channel is
created with one of these audio formats.
#### res_fax.c: lower FAXOPT read warning to debug level
Author: phoneben
Date: 2025-10-03
Reading ${FAXOPT()} before a fax session is common in dialplans to check fax state.
Currently this logs an error even when no fax datastore exists, creating excessive noise.
Change these messages to ast_debug(3, …) so they appear only with debug enabled.
Resolves: #1509
#### endpoints: Remove need for stasis subscription.
Author: Joshua C. Colp
Date: 2025-10-10
When an endpoint is created in the core of Asterisk a subscription
was previously created alongside it to monitor any channels being
destroyed that were related to it. This was done by receiving all
channel snapshot updates for every channel and only reacting when
it was indicated that the channel was dead.
This change removes this logic and instead provides an API call
for directly removing a channel from an endpoint. This is called
when channels are destroyed. This operation is fast, so blocking
the calling thread for a short period of time doesn't have any
noticeable impact.
#### app_queue: Allow stasis message filtering to work.
Author: Joshua C. Colp
Date: 2025-10-10
The app_queue module subscribes on a per-dialed agent basis to both
the bridge all and channel all topics to keep apprised of things going
on involving them. This subscription has associated state that must
be cleaned up when the subscription ends. This was done by setting
a default router callback that only had logic to handle the case
where the subscription ends. By using the default router callback
all filtering for the subscription was disabled, causing unrelated
messages to get published and handled by it.
This change makes it so that an explicit route is added for the
message type used for the message indicating the subscription has
ended and removes the default router callback. This allows message
filtering to occur on publishing reducing the messages to app_queue
to only those it is interested in.
#### taskpool: Fix some references to threadpool that should be taskpool.
Author: George Joseph
Date: 2025-10-10
Resolves: #1478
#### Update contact information for anthm
Author: Anthony Minessale
Date: 2025-10-10
#### chan_websocket.c: Change payload references to command instead.
Author: George Joseph
Date: 2025-10-08
Some of the tests in process_text_message() were still comparing to the
websocket message payload instead of the "command" string.
Resolves: #1525
#### func_callerid: Document limitation of DNID fields.
Author: Naveen Albert
Date: 2025-10-06
The Dial() application does not propagate DNID fields, which is counter
to the behavior of the other Caller ID fields. This behavior is likely
intentional since the use of Dial theoretically suggests a new dialed
number, but document this caveat to inform users of it.
Resolves: #1519
#### func_channel: Allow R/W of ADSI CPE capability setting.
Author: Naveen Albert
Date: 2025-10-06
Allow retrieving and setting the channel's ADSI capability from the
dialplan.
Resolves: #1514
UserNote: CHANNEL(adsicpe) can now be read or written to change
the channels' ADSI CPE capability setting.
#### core_unreal: Preserve ADSI capability when dialing Local channels.
Author: Naveen Albert
Date: 2025-10-06
Dial() already preserves the ADSI capability by copying it to the new
channel, but since Local channel pairs consist of two channels, we
also need to copy the capability to the second channel.
Resolves: #1517
#### func_hangupcause.c: Add access to Reason headers via HANGUPCAUSE()
Author: Igor Goncharovsky
Date: 2025-09-04
As soon as SIP call may end with several Reason headers, we
want to make all of them available through the HAGUPCAUSE() function.
This implementation uses the same ao2 hash for cause codes storage
and adds a flag to make difference between last processed sip
message and content of reason headers.
UserNote: Added a new option to HANGUPCAUSE to access additional
information about hangup reason. Reason headers from pjsip
could be read using 'tech_extended' cause type.
#### sig_analog: Allow '#' to end the inter-digit timeout when dialing.
Author: Naveen Albert
Date: 2025-10-03
It is customary to allow # to terminate digit collection immediately
when there would normally be a timeout. However, currently, users are
forced to wait for the timeout to expire when dialing numbers that
are prefixes of other valid matches, and there is no way to end the
timeout early. Customarily, # terminates the timeout, but at the moment,
this is just rejected unless there happens to be a matching extension
ending in #.
Allow # to terminate the timeout in cases where there is no dialplan
match. This ensures that the dialplan is always respected, but if a
valid extension has been dialed that happens to prefix other valid
matches, # can be used to dial it immediately.
Resolves: #1510
#### func_math: Add DIGIT_SUM function.
Author: Naveen Albert
Date: 2025-10-01
Add a function (DIGIT_SUM) which returns the digit sum of a number.
Resolves: #1499
UserNote: The DIGIT_SUM function can be used to return the digit sum of
a number.
#### app_sf: Add post-digit timer option to ReceiveSF.
Author: Naveen Albert
Date: 2025-10-01
Add a sorely needed option to set a timeout between digits, rather than
for receiving the entire number. This is needed if the number of digits
being sent is unknown by the receiver in advance. Previously, we had
to wait for the entire timer to expire.
Resolves: #1493
UserNote: The 't' option for ReceiveSF now allows for a timer since
the last digit received, in addition to the number-wide timeout.
#### res_tonedetect: Fix formatting of XML documentation.
Author: Naveen Albert
Date: 2025-10-02
Fix the indentation in the documentation for the variable list.
Resolves: #1507
#### res_fax: Add XML documentation for channel variables.
Author: Naveen Albert
Date: 2025-10-02
Document the channel variables currently set by SendFAX and ReceiveFAX.
Resolves: #1505
#### channelstorage_cpp_map_name_id: Add read locking around retrievals.
Author: George Joseph
Date: 2025-10-01
When we retrieve a channel from a C++ map, we actually get back a wrapper
object that points to the channel then right after we retrieve it, we bump its
reference count. There's a tiny chance however that between those two
statements a delete and/or unref might happen which would cause the wrapper
object or the channel itself to become invalid resulting in a SEGV. To avoid
this we now perform a read lock on the driver around those statements.
Resolves: #1491
#### app_dial: Allow fractional seconds for dial timeouts.
Author: Naveen Albert
Date: 2025-09-30
Even though Dial() internally uses milliseconds for its dial timeouts,
this capability has been mostly obscured from users as the argument is
only parsed as an integer, thus forcing the use of whole seconds for
timeouts.
Parse it as a decimal instead so that timeouts can now truly have
millisecond precision.
Resolves: #1487
UserNote: The answer and progress dial timeouts now have millisecond
precision, instead of having to be whole numbers.
#### dsp.c: Make minor fixes to debug log messages.
Author: Naveen Albert
Date: 2025-10-01
Commit dc8e3eeaaf094a3d16991289934093d5e7127680 improved the debug log
messages in dsp.c. This makes two minor corrections to it:
* Properly guard an added log statement in a conditional.
* Don't add one to the hit count if there was no hit (however, we do
still want to do this for the case where this is one).
Resolves: #1496
#### config_options.c: Improve misleading warning.
Author: Naveen Albert
Date: 2025-09-30
When running "config show help <module>", if no XML documentation exists
for the specified module, "Module <module> not found." is returned,
which is misleading if the module is loaded but simply has no XML
documentation for its config. Improve the message to clarify that the
module may simply have no config documentation.
Resolves: #1489
#### func_scramble: Add example to XML documentation.
Author: Naveen Albert
Date: 2025-09-29
The previous lack of an example made it ambiguous if the arguments went
inside the function arguments or were part of the right-hand value.
Resolves: #1485
#### sig_analog: Eliminate potential timeout with Last Number Redial.
Author: Naveen Albert
Date: 2025-09-29
If Last Number Redial is used to redial, ensure that we do not wait
for further digits. This was possible if the number that was last
dialed is a prefix of another possible dialplan match. Since all we
did is copy the number into the extension buffer, if other matches
are now possible, there would thus be a timeout before the call went
through. We now complete redialed calls immediaetly in all cases.
Resolves: #1483
#### ARI: The bridges play and record APIs now handle sample rates > 8K correctly.
Author: George Joseph
Date: 2025-09-25
The bridge play and record APIs were forcing the Announcer/Recorder channel
to slin8 which meant that if you played or recorded audio with a sample
rate > 8K, it was downsampled to 8K limiting the bandwidth.
* The /bridges/play REST APIs have a new "announcer_format" parameter that
allows the caller to explicitly set the format on the "Announcer" channel
through which the audio is played into the bridge. If not specified, the
default depends on how many channels are currently in the bridge. If
a single channel is in the bridge, then the Announcer channel's format
will be set to the same as that channel's. If multiple channels are in the
bridge, the channels will be scanned to find the one with the highest
sample rate and the Announcer channel's format will be set to the slin
format that has an equal to or greater than sample rate.
* The /bridges/record REST API has a new "recorder_format" parameter that
allows the caller to explicitly set the format on the "Recorder" channel
from which audio is retrieved to write to the file. If not specified,
the Recorder channel's format will be set to the format that was requested
to save the audio in.
Resolves: #1479
DeveloperNote: The ARI /bridges/play and /bridges/record REST APIs have new
parameters that allow the caller to specify the format to be used on the
"Announcer" and "Recorder" channels respecitvely.
#### res_pjsip_geolocation: Add support for Geolocation loc-src parameter
Author: Max Grobecker
Date: 2025-09-21
This adds support for the Geolocation 'loc-src' parameter to res_pjsip_geolocation.
The already existing config option 'location_source` in res_geolocation is documented to add a 'loc-src' parameter containing a user-defined FQDN to the 'Geolocation:' header,
but that option had no effect as it was not implemented by res_pjsip_geolocation.
If the `location_source` configuration option is not set or invalid, that parameter will not be added (this is already checked by res_geolocation).
This commits adds already documented functionality.
#### sorcery: Move from threadpool to taskpool.
Author: Joshua C. Colp
Date: 2025-09-23
This change moves observer invocation from the use of
a threadpool to a taskpool. The taskpool options have also
been adjusted to ensure that at least one taskprocessor
remains available at all times.
#### stasis_channels.c: Make protocol_id optional to enable blind transfer via ari
Author: Sven Kube
Date: 2025-09-22
When handling SIP transfers via ARI, there is no protocol_id in case of
a blind transfer.
Resolves: #1467
#### Fix some doxygen, typos and whitespace
Author: Bastian Triller
Date: 2025-09-22
#### stasis_channels.c: Add null check for referred_by in ast_ari_transfer_message_create
Author: Sven Kube
Date: 2025-09-18
When handling SIP transfers via ARI, the `referred_by` field in
`transfer_ari_state` may be null, since SIP REFER requests are not
required to include a `Referred-By` header. Without this check, a null
value caused the transfer to fail and triggered a NOTIFY with a 500
Internal Server Error.
#### app_queue: Add NULL pointer checks in app_queue
Author: phoneben
Date: 2025-09-11
Add NULL check for word_list before calling word_in_list()
Add NULL checks for channel snapshots from ast_multi_channel_blob_get_channel()
Resolves: #1425
#### app_externalivr: Prevent out-of-bounds read during argument processing.
Author: Sean Bright
Date: 2025-09-17
Resolves: #1422
#### chan_dahdi: Add DAHDI_CHANNEL function.
Author: Naveen Albert
Date: 2025-09-11
Add a dialplan function that can be used to get/set properties of
DAHDI channels (as opposed to Asterisk channels). This exposes
properties that were not previously available, allowing for certain
operations to now be performed in the dialplan.
Resolves: #1455
UserNote: The DAHDI_CHANNEL function allows for getting/setting
certain properties about DAHDI channels from the dialplan.
#### taskpool: Update versions for taskpool stasis options.
Author: Joshua C. Colp
Date: 2025-09-16
#### taskpool: Add taskpool API, switch Stasis to using it.
Author: Joshua C. Colp
Date: 2025-08-06
This change introduces a new API called taskpool. This is a pool
of taskprocessors. It provides the following functionality:
1. Task pushing to a pool of taskprocessors
2. Synchronous tasks
3. Serializers for execution ordering of tasks
4. Growing/shrinking of number of taskprocessors in pool
This functionality already exists through the combination of
threadpool+taskprocessors but through investigating I determined
that this carries substantial overhead for short to medium duration
tasks. The threadpool uses a single queue of work, and for management
of threads it involves additional tasks.
I wrote taskpool to eliminate the extra overhead and management
as much as possible. Instead of a single queue of work each
taskprocessor has its own queue and at push time a selector chooses
the taskprocessor to queue the task to. Each taskprocessor also
has its own thread like normal. This spreads out the tasks immediately
and reduces contention on shared resources.
Using the included efficiency tests the number of tasks that can be
executed per second in a taskpool is 6-12 times more than an equivalent
threadpool+taskprocessor setup.
Stasis has been moved over to using this new API as it is a heavy consumer
of threadpool+taskprocessors and produces a lot of tasks.
UpgradeNote: The threadpool_* options in stasis.conf have now been deprecated
though they continue to be read and used. They have been replaced with taskpool
options that give greater control over the underlying taskpool used for stasis.
DeveloperNote: The taskpool API has been added for common usage of a
pool of taskprocessors. It is suggested to use this API instead of the
threadpool+taskprocessor approach.
#### app_adsiprog: Fix possible NULL dereference.
Author: Naveen Albert
Date: 2025-09-10
get_token can return NULL, but process_token uses this result without
checking for NULL; as elsewhere, check for a NULL result to avoid
possible NULL dereference.
Resolves: #1419
#### manager.c: Fix presencestate object leak
Author: Nathan Monfils
Date: 2025-09-08
ast_presence_state allocates subtype and message. We straightforwardly
need to clean those up.
#### audiohook.c: Ensure correct AO2 reference is dereffed.
Author: Sean Bright
Date: 2025-09-10
Part of #1440.
#### res_cliexec: Remove unnecessary casts to char*.
Author: Naveen Albert
Date: 2025-09-09
Resolves: #1436
#### rtp_engine.c: Add exception for comfort noise payload.
Author: Ben Ford
Date: 2025-09-09
In a previous commit, a change was made to
ast_rtp_codecs_payload_code_tx_sample_rate to check for differing sample
rates. This ended up returning an invalid payload int for comfort noise.
A check has been added that returns early if the payload is in fact
supposed to be comfort noise.
Fixes: #1340
#### pbx_variables.c: Create real channel for "dialplan eval function".
Author: Naveen Albert
Date: 2025-09-09
"dialplan eval function" has been using a dummy channel for function
evaluation, much like many of the unit tests. However, sometimes, this
can cause issues for functions that are not expecting dummy channels.
As an example, ast_channel_tech(chan) is NULL on such channels, and
ast_channel_tech(chan)->type consequently results in a NULL dereference.
Normally, functions do not worry about this since channels executing
dialplan aren't dummy channels.
While some functions are better about checking for these sorts of edge
cases, use a real channel with a dummy technology to make this CLI
command inherently safe for any dialplan function that could be evaluated
from the CLI.
Resolves: #1434

View File

@@ -1,963 +0,0 @@
<html><head><title>ChangeLog for asterisk-20.18.0</title></head><body>
<h2>Change Log for Release asterisk-20.18.0</h2>
<h3>Links:</h3>
<ul>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.18.0.html">Full ChangeLog</a> </li>
<li><a href="https://github.com/asterisk/asterisk/compare/20.17.0...20.18.0">GitHub Diff</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.18.0.tar.gz">Tarball</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk">Downloads</a> </li>
</ul>
<h3>Summary:</h3>
<ul>
<li>Commits: 57</li>
<li>Commit Authors: 20</li>
<li>Issues Resolved: 40</li>
<li>Security Advisories Resolved: 0</li>
</ul>
<h3>User Notes:</h3>
<ul>
<li>
<h4>chan_websocket.conf.sample: Fix category name.</h4>
<p>The category name in the chan_websocket.conf.sample file was
incorrect. It should be "global" instead of "general".</p>
</li>
<li>
<h4>cli.c: Allow 'channel request hangup' to accept patterns.</h4>
<p>The 'channel request hangup' CLI command now accepts
multiple channel names, POSIX Extended Regular Expressions, glob-like
patterns, or a combination of all of them. See the CLI command 'core
show help channel request hangup' for full details.</p>
</li>
<li>
<h4>res_sorcery_memory_cache: Reduce cache lock time for sorcery memory cache populate command</h4>
<p>The AMI command sorcery memory cache populate will now
return an error if there is an internal error performing the populate.
The CLI command will display an error in this case as well.</p>
</li>
<li>
<h4>res_geolocation: Fix multiple issues with XML generation.</h4>
<p>Geolocation: Two new optional profile parameters have been added.</p>
</li>
<li><code>pidf_element_id</code> which sets the value of the <code>id</code> attribute on the top-level
PIDF-LO <code>device</code>, <code>person</code> or <code>tuple</code> elements.</li>
<li>
<p><code>device_id</code> which sets the content of the <code>&lt;deviceID&gt;</code> element.
Both parameters can include channel variables.</p>
</li>
<li>
<h4>res_pjsip_messaging: Add support for following 3xx redirects</h4>
<p>A new pjsip endpoint option follow_redirect_methods was added.
This option is a comma-delimited, case-insensitive list of SIP methods
for which SIP 3XX redirect responses are followed. An alembic upgrade
script has been added for adding this new option to the Asterisk
database.</p>
</li>
<li>
<h4>taskprocessors: Improve logging and add new cli options</h4>
<p>New CLI command has been added -
core show taskprocessor name <taskprocessor-name></p>
</li>
<li>
<h4>ccss: Add option to ccss.conf to globally disable it.</h4>
<p>A new "enabled" parameter has been added to ccss.conf. It defaults
to "yes" to preserve backwards compatibility but CCSS is rarely used so
setting "enabled = no" in the "general" section can save some unneeded channel
locking operations and log message spam. Disabling ccss will also prevent
the func_callcompletion and chan_dahdi modules from loading.</p>
</li>
<li>
<h4>Makefile: Add module-list-* targets.</h4>
<p>Try "make module-list-deprecated" to see what modules
are on their way out the door.</p>
</li>
<li>
<h4>app_mixmonitor: Add 's' (skip) option to delay recording.</h4>
<p>This change introduces a new 's(<seconds>)' (skip) option to the MixMonitor
application. Example:
MixMonitor(${UNIQUEID}.wav,s(3))
This skips recording for the first 3 seconds before writing audio to the file.
Existing MixMonitor behavior remains unchanged when the 's' option is not used.</p>
</li>
<li>
<h4>app_queue.c: Only announce to head caller if announce_to_first_user</h4>
<p>When announce_to_first_user is false, no announcements are played to the head caller</p>
</li>
</ul>
<h3>Upgrade Notes:</h3>
<ul>
<li>
<h4>res_geolocation: Fix multiple issues with XML generation.</h4>
Geolocation: In order to correct bugs in both code and
documentation, the following changes to the parameters for GML geolocation
locations are now in effect:</li>
<li>The documented but unimplemented <code>crs</code> (coordinate reference system) element
has been added to the location_info parameter that indicates whether the <code>2d</code>
or <code>3d</code> reference system is to be used. If the crs isn't valid for the shape
specified, an error will be generated. The default depends on the shape
specified.</li>
<li>The Circle, Ellipse and ArcBand shapes MUST use a <code>2d</code> crs. If crs isn't
specified, it will default to <code>2d</code> for these shapes.
The Sphere, Ellipsoid and Prism shapes MUST use a <code>3d</code> crs. If crs isn't
specified, it will default to <code>3d</code> for these shapes.
The Point and Polygon shapes may use either crs. The default crs is <code>2d</code>
however so if <code>3d</code> positions are used, the crs must be explicitly set to <code>3d</code>.</li>
<li>The <code>geoloc show gml_shape_defs</code> CLI command has been updated to show which
coordinate reference systems are valid for each shape.</li>
<li>The <code>pos3d</code> element has been removed in favor of allowing the <code>pos</code> element
to include altitude if the crs is <code>3d</code>. The number of values in the <code>pos</code>
element MUST be 2 if the crs is <code>2d</code> and 3 if the crs is <code>3d</code>. An error
will be generated for any other combination.</li>
<li>
<p>The angle unit-of-measure for shapes that use angles should now be included
in the respective parameter. The default is <code>degrees</code>. There were some
inconsistent references to <code>orientation_uom</code> in some documentation but that
parameter never worked and is now removed. See examples below.
Examples...
<code>location_info = shape="Sphere", pos="39.0 -105.0 1620", radius="20"
location_info = shape="Point", crs="3d", pos="39.0 -105.0 1620"
location_info = shape="Point", pos="39.0 -105.0"
location_info = shape=Ellipsoid, pos="39.0 -105.0 1620", semiMajorAxis="20"
semiMinorAxis="10", verticalAxis="0", orientation="25 degrees"
pidf_element_id = ${CHANNEL(name)}-${EXTEN}
device_id = mac:001122334455
Set(GEOLOC_PROFILE(pidf_element_id)=${CHANNEL(name)}/${EXTEN})</code></p>
</li>
<li>
<h4>pjsip: Move from threadpool to taskpool</h4>
<p>The threadpool_* options in pjsip.conf have now
been deprecated though they continue to be read and used.
They have been replaced with taskpool options that give greater
control over the underlying taskpool used for PJSIP. An alembic
upgrade script has been added to add these options to realtime
as well.</p>
</li>
<li>
<h4>app_directed_pickup.c: Change some log messages from NOTICE to VERBOSE.</h4>
<p>In an effort to reduce log spam, two normal progress
"pickup attempted" log messages from app_directed_pickup have been changed
from NOTICE to VERBOSE(3). This puts them on par with other normal
dialplan progress messages.</p>
</li>
</ul>
<h3>Developer Notes:</h3>
<ul>
<li>
<h4>ccss: Add option to ccss.conf to globally disable it.</h4>
<p>A new API ast_is_cc_enabled() has been added. It should be
used to ensure that CCSS is enabled before making any other ast_cc_* calls.</p>
</li>
<li>
<h4>chan_websocket: Add ability to place a MARK in the media stream.</h4>
<p>Apps can now send a <code>MARK_MEDIA</code> command with an optional
<code>correlation_id</code> parameter to chan_websocket which will be placed in the
media frame queue. When that frame is dequeued after all intervening media
has been played to the core, chan_websocket will send a
<code>MEDIA_MARK_PROCESSED</code> event to the app with the same correlation_id
(if any).</p>
</li>
<li>
<h4>chan_websocket: Add capability for JSON control messages and events.</h4>
<p>The chan_websocket plain-text control and event messages are now
deprecated (but remain the default) in favor of JSON formatted messages.
See https://docs.asterisk.org/Configuration/Channel-Drivers/WebSocket for
more information.
A "transport_data" parameter has been added to the</p>
</li>
</ul>
<h3>Commit Authors:</h3>
<ul>
<li>Alexei Gradinari: (1)</li>
<li>C. Maj: (1)</li>
<li>Daouda Taha: (1)</li>
<li>Etienne Lessard: (1)</li>
<li>George Joseph: (12)</li>
<li>Joe Garlick: (2)</li>
<li>Joshua C. Colp: (1)</li>
<li>Justin T. Gibbs: (1)</li>
<li>Kristian F. Høgh: (1)</li>
<li>Maximilian Fridrich: (2)</li>
<li>Michal Hajek: (1)</li>
<li>Mike Bradeen: (2)</li>
<li>Nathaniel Wesley Filardo: (1)</li>
<li>Naveen Albert: (3)</li>
<li>Peter Krall: (1)</li>
<li>Sean Bright: (17)</li>
<li>Sven Kube: (1)</li>
<li>Tinet-mucw: (2)</li>
<li>phoneben: (5)</li>
<li>sarangr7: (1)</li>
</ul>
<h2>Issue and Commit Detail:</h2>
<h3>Closed Issues:</h3>
<ul>
<li>60: [bug]: Can't enter any of UTF-8 character in the CLI prompt</li>
<li>1417: [bug]: static code analysis issues in abstract_jb</li>
<li>1421: [bug]: static code analysis issues in apps/app_dtmfstore.c</li>
<li>1427: [bug]: static code analysis issues in apps/app_stream_echo.c</li>
<li>1430: [bug]: static code analysis issues in res/stasis/app.c</li>
<li>1442: [bug]: static code analysis issues in main/bridge_basic.c</li>
<li>1444: [bug]: static code analysis issues in bridges/bridge_simple.c</li>
<li>1446: [bug]: static code analysis issues in bridges/bridge_softmix.c</li>
<li>1531: [bug]: Memory corruption in manager.c due to double free of criteria variable.</li>
<li>1546: [improvement]: Not able to pass the custom variables over the websockets using external Media with ari client library nodejs</li>
<li>1552: [improvement]: chan_dahdi.conf.sample: Warnings for callgroup/pickupgroup in stock config</li>
<li>1563: [bug]: chan_websocket.c: Wrong variable used in ast_strings_equal() (payload instead of command)</li>
<li>1566: [improvement]: Improve Taskprocessor logging</li>
<li>1568: [improvement]: Queue is playing announcements when announce_to_first_user is false</li>
<li>1572: [improvement]: List modules at various support levels</li>
<li>1574: [improvement]: Add playback progress acknowledgment for WebSocket media (per-chunk or byte-level acknowledgment)</li>
<li>1576: [improvement]: res_pjsip_messaging: Follow 3xx redirect messages if redirect_method=uri_pjsip</li>
<li>1585: [bug]: cli 'stasis show topics' calls a read lock which freezes asterisk till the process is done</li>
<li>1587: [bug]: chan_websocket terminates websocket on CNG/non-audio</li>
<li>1590: [bug]: Fix: Use ast instead of p-&gt;chan to get the DIALSTATUS variable</li>
<li>1597: [bug]: app_reload: Reload() without arguments doesn't work.</li>
<li>1599: [bug]: pbx.c: Running "dialplan reload" shows wrong number of contexts</li>
<li>1604: [bug]: asterisk crashes during dtmf input thru websocket -- fixed</li>
<li>1609: [bug]: Crash: Double free in ast_channel_destructor leading to SIGABRT (Asterisk 20.17.0) with C++ channel storage</li>
<li>1635: [bug]: Regression: Fix endpoint memory leak</li>
<li>1638: [bug]: Channel drivers creating ephemeral channels create per-endpoint topics and cache when they shouldn't</li>
<li>1643: [bug]: chan_websocket crash when channel hung up before read thread is started</li>
<li>1645: [bug]: chan_websocket stuck channels</li>
<li>1647: [bug]: "presencestate change" CLI command doesn't accept NOT_SET</li>
<li>1648: [bug]: ARI announcer channel can cause crash in specific scenario due to unreffing of borrowed format</li>
<li>1660: [bug]: missing hangup cause for ARI ChannelDestroyed when Originated channel times out</li>
<li>1662: [improvement]: Include remote IP address in http.c “Requested URI has no handler” log entries</li>
<li>1667: [bug]: Multiple geolocation issues with rendering XML</li>
<li>1673: [bug]: A crash occurs during the call to mixmonitor_ds_remove_and_free</li>
<li>1675: [bug]: res_pjsip_mwi: off-nominal endpoint ao2 reference leak in mwi_get_notify_data()</li>
<li>1681: [bug]: stasis/control.c: Memory leak of hangup_time in set-timeout</li>
<li>1683: [improvement]: chan_websocket: Use channel FD polling to read data from websocket instead of dedicated thread.</li>
<li>1692: [improvement]: Add comment to asterisk.conf.sample clarifying that template sections are ignored</li>
<li>1700: [improvement]: Improve sorcery cache populate</li>
<li>1711: [bug]: Missing Contact: header in 200 OK</li>
</ul>
<h3>Commits By Author:</h3>
<ul>
<li>
<h4>Alexei Gradinari (1):</h4>
</li>
<li>
<h4>C. Maj (1):</h4>
</li>
<li>
<h4>Daouda Taha (1):</h4>
</li>
<li>
<h4>Etienne Lessard (1):</h4>
</li>
<li>
<h4>George Joseph (12):</h4>
</li>
<li>
<h4>Joe Garlick (2):</h4>
</li>
<li>
<h4>Joshua C. Colp (1):</h4>
</li>
<li>
<h4>Justin T. Gibbs (1):</h4>
</li>
<li>
<h4>Kristian F. Høgh (1):</h4>
</li>
<li>
<h4>Maximilian Fridrich (2):</h4>
</li>
<li>
<h4>Michal Hajek (1):</h4>
</li>
<li>
<h4>Mike Bradeen (2):</h4>
</li>
<li>
<h4>Nathaniel Wesley Filardo (1):</h4>
</li>
<li>
<h4>Naveen Albert (3):</h4>
</li>
<li>
<h4>Peter Krall (1):</h4>
</li>
<li>
<h4>Sean Bright (17):</h4>
</li>
<li>
<h4>Sven Kube (1):</h4>
</li>
<li>
<h4>Tinet-mucw (2):</h4>
</li>
<li>
<h4>phoneben (5):</h4>
</li>
<li>
<h4>sarangr7 (1):</h4>
</li>
</ul>
<h3>Commit List:</h3>
<ul>
<li>chan_websocket.conf.sample: Fix category name.</li>
<li>chan_websocket: Fixed Ping/Pong messages hanging up the websocket channel</li>
<li>cli.c: Allow 'channel request hangup' to accept patterns.</li>
<li>chan_sip.c: Ensure Contact header is set on responses to INVITE.</li>
<li>res_sorcery_memory_cache: Reduce cache lock time for sorcery memory cache populate command</li>
<li>Add comment to asterisk.conf.sample clarifying that template sections are ignored</li>
<li>chan_websocket: Use the channel's ability to poll fds for the websocket read.</li>
<li>asterisk.c: Allow multi-byte characters on the Asterisk CLI.</li>
<li>func_presencestate.c: Allow <code>NOT_SET</code> to be set from CLI.</li>
<li>res/ari/resource_bridges.c: Normalize channel_format ref handling for bridge media</li>
<li>res_geolocation: Fix multiple issues with XML generation.</li>
<li>stasis/control.c: Add destructor to timeout_datastore.</li>
<li>func_talkdetect.c: Remove reference to non-existent variables.</li>
<li>configure.ac: use AC_PATH_TOOL for nm</li>
<li>res_pjsip_mwi: Fix off-nominal endpoint ao2 ref leak in mwi_get_notify_data</li>
<li>res_pjsip_messaging: Add support for following 3xx redirects</li>
<li>res_pjsip: Introduce redirect module for handling 3xx responses</li>
<li>app_mixmonitor.c: Fix crash in mixmonitor_ds_remove_and_free when datastore is NULL</li>
<li>res_pjsip_refer: don't defer session termination for ari transfer</li>
<li>chan_dahdi.conf.sample: Avoid warnings with default configs.</li>
<li>main/dial.c: Set channel hangup cause on timeout in handle_timeout_trip</li>
<li>cel: Add missing manager documentation.</li>
<li>res_odbc: Use SQL_SUCCEEDED() macro where applicable.</li>
<li>rtp/rtcp: Configure dual-stack behavior via IPV6_V6ONLY</li>
<li>http.c: Include remote address in URI handler message.</li>
<li>pjsip: Move from threadpool to taskpool</li>
<li>Disable device state caching for ephemeral channels</li>
<li>chan_websocket: Add locking in send_event and check for NULL websocket handle.</li>
<li>Fix false null-deref warning in channel_state</li>
<li>endpoint.c: Plug a memory leak in ast_endpoint_shutdown().</li>
<li>Revert "func_hangupcause.c: Add access to Reason headers via HANGUPCAUSE()"</li>
<li>cel_manager.c: Correct manager event mask for CEL events.</li>
<li>app_queue.c: Update docs to correct QueueMemberPause event name.</li>
<li>taskprocessors: Improve logging and add new cli options</li>
<li>manager: fix double free of criteria variable when adding filter</li>
<li>app_stream_echo.c: Check that stream is non-NULL before dereferencing.</li>
<li>abstract_jb.c: Remove redundant timer check per static analysis.</li>
<li>channelstorage_cpp: Fix fallback return value in channelstorage callback</li>
<li>ccss: Add option to ccss.conf to globally disable it.</li>
<li>app_directed_pickup.c: Change some log messages from NOTICE to VERBOSE.</li>
<li>chan_websocket: Fix crash on DTMF_END event.</li>
<li>chan_websocket.c: Tolerate other frame types</li>
<li>app_reload: Fix Reload() without arguments.</li>
<li>pbx.c: Print new context count when reloading dialplan.</li>
<li>Makefile: Add module-list-* targets.</li>
<li>core_unreal.c: Use ast instead of p-&gt;chan to get the DIALSTATUS variable</li>
<li>ast_coredumper: Fix multiple issues</li>
<li>app_mixmonitor: Add 's' (skip) option to delay recording.</li>
<li>stasis: switch stasis show topics temporary container from list - RBtree</li>
<li>app_dtmfstore: Avoid a potential buffer overflow.</li>
<li>main: Explicitly mark case statement fallthrough as such.</li>
<li>bridge_softmix: Return early on topology allocation failure.</li>
<li>bridge_simple: Increase code verbosity for clarity.</li>
<li>app_queue.c: Only announce to head caller if announce_to_first_user</li>
<li>chan_websocket: Add ability to place a MARK in the media stream.</li>
<li>chan_websocket: Add capability for JSON control messages and events.</li>
<li>build: Add menuselect options to facilitate code tracing and coverage</li>
</ul>
<h3>Commit Details:</h3>
<h4>chan_websocket.conf.sample: Fix category name.</h4>
<p>Author: George Joseph
Date: 2026-01-21</p>
<p>UserNote: The category name in the chan_websocket.conf.sample file was
incorrect. It should be "global" instead of "general".</p>
<h4>chan_websocket: Fixed Ping/Pong messages hanging up the websocket channel</h4>
<p>Author: Joe Garlick
Date: 2026-01-15</p>
<p>When chan_websocket received a Ping or a Pong opcode it would cause the channel to hangup. This change allows Ping/Pong opcodes and allows them to silently pass</p>
<h4>cli.c: Allow 'channel request hangup' to accept patterns.</h4>
<p>Author: Sean Bright
Date: 2026-01-05</p>
<p>This extends 'channel request hangup' to accept multiple channel
names, a POSIX Extended Regular Expression, a glob-like pattern, or a
combination of all of them.</p>
<p>UserNote: The 'channel request hangup' CLI command now accepts
multiple channel names, POSIX Extended Regular Expressions, glob-like
patterns, or a combination of all of them. See the CLI command 'core
show help channel request hangup' for full details.</p>
<h4>chan_sip.c: Ensure Contact header is set on responses to INVITE.</h4>
<p>Author: Etienne Lessard
Date: 2026-01-09</p>
<p>From the original report* on ASTERISK-24915:</p>
<pre><code>&gt; The problem occurs because the handle_incoming function updates
p-&gt;method to req-&gt;method (p being a struct sip_pvt *) before
checking if the CSeq makes sense, and if the CSeq is unexpected, it
does not reset p-&gt;method to its old value before returning. Then,
when asterisk sends the 200 OK response for the original INVITE,
since p-&gt;method is now equal to SIP_ACK (instead of SIP_INVITE), the
resp_need_contact function (called from respprep) says "its a SIP
ACK, no need to add a Contact header for the response", which is
wrong, since it's not a SIP ACK but a SIP INVITE dialog.
</code></pre>
<p>I have confirmed that the analysis is correct and that the patch fixes
the behavior.</p>
<p>*: https://issues-archive.asterisk.org/ASTERISK-24915</p>
<p>Resolves: #1711</p>
<h4>res_sorcery_memory_cache: Reduce cache lock time for sorcery memory cache populate command</h4>
<p>Author: Mike Bradeen
Date: 2026-01-06</p>
<p>Reduce cache lock time for AMI and CLI sorcery memory cache populate
commands by adding a new populate_lock to the sorcery_memory_cache
struct which is locked separately from the existing cache lock so that
the cache lock can be maintained for a reduced time, locking only when
the cache objects are removed and re-populated.</p>
<p>Resolves: #1700</p>
<p>UserNote: The AMI command sorcery memory cache populate will now
return an error if there is an internal error performing the populate.
The CLI command will display an error in this case as well.</p>
<h4>Add comment to asterisk.conf.sample clarifying that template sections are ignored</h4>
<p>Author: phoneben
Date: 2026-01-05</p>
<p>Add comment to asterisk.conf.sample clarifying that template sections are ignored.</p>
<p>Resolves: #1692</p>
<h4>chan_websocket: Use the channel's ability to poll fds for the websocket read.</h4>
<p>Author: George Joseph
Date: 2025-12-30</p>
<p>We now add the websocket's file descriptor to the channel's fd array and let
it poll for data availability instead if having a dedicated thread that
does the polling. This eliminates the thread and allows removal of most
explicit locking since the core channel code will lock the channel to prevent
simultaneous calls to webchan_read, webchan_hangup, etc.</p>
<p>While we were here, the hangup code was refactored to use ast_hangup_with_cause
instead of directly queueing an AST_CONTROL_HANGUP frame. This allows us
to set hangup causes and generate snapshots.</p>
<p>For a bit of extra debugging, a table of websocket close codes was added
to http_websocket.h with an accompanying "to string" function added to
res_http_websocket.c</p>
<p>Resolves: #1683</p>
<h4>asterisk.c: Allow multi-byte characters on the Asterisk CLI.</h4>
<p>Author: Sean Bright
Date: 2025-12-13</p>
<p>Versions of libedit that support Unicode expect that the
EL_GETCFN (the function that does character I/O) will fill in a
<code>wchar_t</code> with a character, which may be multi-byte. The built-in
function that libedit provides, but does not expose with a public API,
does properly handle multi-byte sequences.</p>
<p>Due to the design of Asterisk's console processing loop, Asterisk
provides its own implementation which does not handle multi-byte
characters. Changing Asterisk to use libedit's built-in function would
be ideal, but would also require changing some fundamental things
about console processing which could be fairly disruptive.</p>
<p>Instead, we bring in libedit's <code>read_char</code> implementation and modify
it to suit our specific needs.</p>
<p>Resolves: #60</p>
<h4>func_presencestate.c: Allow <code>NOT_SET</code> to be set from CLI.</h4>
<p>Author: Sean Bright
Date: 2026-01-01</p>
<p>Resolves: #1647</p>
<h4>res/ari/resource_bridges.c: Normalize channel_format ref handling for bridge media</h4>
<p>Author: Peter Krall
Date: 2025-12-17</p>
<p>Always take an explicit reference on the format used for bridge playback
and recording channels, regardless of where it was sourced, and release
it after prepare_bridge_media_channel. This aligns the code paths and
avoids mixing borrowed and owned references while preserving behavior.</p>
<p>Fixes: #1648</p>
<h4>res_geolocation: Fix multiple issues with XML generation.</h4>
<p>Author: George Joseph
Date: 2025-12-17</p>
<ul>
<li>3d positions were being rendered without an enclosing <code>&lt;gml:pos&gt;</code>
element resulting in invalid XML.</li>
<li>There was no way to set the <code>id</code> attribute on the enclosing <code>tuple</code>, <code>device</code>
and <code>person</code> elements.</li>
<li>There was no way to set the value of the <code>deviceID</code> element.</li>
<li>Parsing of degree and radian UOMs was broken resulting in them appearing
outside an XML element.</li>
<li>The UOM schemas for degrees and radians were reversed.</li>
<li>The Ellipsoid shape was missing and the Ellipse shape was defined multiple
times.</li>
<li>The <code>crs</code> location_info parameter, although documented, didn't work.</li>
<li>The <code>pos3d</code> location_info parameter appears in some documentation but
wasn't being parsed correctly.</li>
<li>The retransmission-allowed and retention-expiry sub-elements of usage-rules
were using the <code>gp</code> namespace instead of the <code>gbp</code> namespace.</li>
</ul>
<p>In addition to fixing the above, several other code refactorings were
performed and the unit test enhanced to include a round trip
XML -&gt; eprofile -&gt; XML validation.</p>
<p>Resolves: #1667</p>
<p>UserNote: Geolocation: Two new optional profile parameters have been added.
* <code>pidf_element_id</code> which sets the value of the <code>id</code> attribute on the top-level
PIDF-LO <code>device</code>, <code>person</code> or <code>tuple</code> elements.
* <code>device_id</code> which sets the content of the <code>&lt;deviceID&gt;</code> element.
Both parameters can include channel variables.</p>
<p>UpgradeNote: Geolocation: In order to correct bugs in both code and
documentation, the following changes to the parameters for GML geolocation
locations are now in effect:
* The documented but unimplemented <code>crs</code> (coordinate reference system) element
has been added to the location_info parameter that indicates whether the <code>2d</code>
or <code>3d</code> reference system is to be used. If the crs isn't valid for the shape
specified, an error will be generated. The default depends on the shape
specified.
* The Circle, Ellipse and ArcBand shapes MUST use a <code>2d</code> crs. If crs isn't
specified, it will default to <code>2d</code> for these shapes.
The Sphere, Ellipsoid and Prism shapes MUST use a <code>3d</code> crs. If crs isn't
specified, it will default to <code>3d</code> for these shapes.
The Point and Polygon shapes may use either crs. The default crs is <code>2d</code>
however so if <code>3d</code> positions are used, the crs must be explicitly set to <code>3d</code>.
* The <code>geoloc show gml_shape_defs</code> CLI command has been updated to show which
coordinate reference systems are valid for each shape.
* The <code>pos3d</code> element has been removed in favor of allowing the <code>pos</code> element
to include altitude if the crs is <code>3d</code>. The number of values in the <code>pos</code>
element MUST be 2 if the crs is <code>2d</code> and 3 if the crs is <code>3d</code>. An error
will be generated for any other combination.
* The angle unit-of-measure for shapes that use angles should now be included
in the respective parameter. The default is <code>degrees</code>. There were some
inconsistent references to <code>orientation_uom</code> in some documentation but that
parameter never worked and is now removed. See examples below.
Examples...
<code>location_info = shape="Sphere", pos="39.0 -105.0 1620", radius="20"
location_info = shape="Point", crs="3d", pos="39.0 -105.0 1620"
location_info = shape="Point", pos="39.0 -105.0"
location_info = shape=Ellipsoid, pos="39.0 -105.0 1620", semiMajorAxis="20"
semiMinorAxis="10", verticalAxis="0", orientation="25 degrees"
pidf_element_id = ${CHANNEL(name)}-${EXTEN}
device_id = mac:001122334455
Set(GEOLOC_PROFILE(pidf_element_id)=${CHANNEL(name)}/${EXTEN})</code></p>
<h4>stasis/control.c: Add destructor to timeout_datastore.</h4>
<p>Author: George Joseph
Date: 2025-12-31</p>
<p>The timeout_datastore was missing a destructor resulting in a leak
of 16 bytes for every outgoing ARI call.</p>
<p>Resolves: #1681</p>
<h4>func_talkdetect.c: Remove reference to non-existent variables.</h4>
<p>Author: Sean Bright
Date: 2025-12-30</p>
<h4>configure.ac: use AC_PATH_TOOL for nm</h4>
<p>Author: Nathaniel Wesley Filardo
Date: 2025-11-27</p>
<p><code>nm</code> might, especially in cross-compilation scenarios, be available but prefixed with the target triple. So: use <code>AC_PATH_TOOL</code> rather than <code>AC_PATH_PROG</code> to find it. (See https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Generic-Programs.html .)</p>
<p>Found and proposed fix tested by cross-compiling Asterisk using Nixpkgs on x86_64 targeting aarch64. :)</p>
<h4>res_pjsip_mwi: Fix off-nominal endpoint ao2 ref leak in mwi_get_notify_data</h4>
<p>Author: Alexei Gradinari
Date: 2025-12-29</p>
<p>Delay acquisition of the ast_sip_endpoint reference in mwi_get_notify_data()
to avoid an ao2 ref leak on early-return error paths.</p>
<p>Move ast_sip_subscription_get_endpoint() to just before first use so all
acquired references are properly cleaned up.</p>
<p>Fixes: #1675</p>
<h4>res_pjsip_messaging: Add support for following 3xx redirects</h4>
<p>Author: Maximilian Fridrich
Date: 2025-11-07</p>
<p>This commit integrates the redirect module into res_pjsip_messaging
to enable following 3xx redirect responses for outgoing SIP MESSAGEs.</p>
<p>When follow_redirect_methods contains 'message' on an endpoint, Asterisk
will now follow 3xx redirect responses for MESSAGEs, similar to how
it behaves for INVITE responses.</p>
<p>Resolves: #1576</p>
<p>UserNote: A new pjsip endpoint option follow_redirect_methods was added.
This option is a comma-delimited, case-insensitive list of SIP methods
for which SIP 3XX redirect responses are followed. An alembic upgrade
script has been added for adding this new option to the Asterisk
database.</p>
<h4>res_pjsip: Introduce redirect module for handling 3xx responses</h4>
<p>Author: Maximilian Fridrich
Date: 2025-11-07</p>
<p>This commit introduces a new redirect handling module that provides
infrastructure for following SIP 3xx redirect responses. The redirect
functionality respects the endpoint's redirect_method setting and only
follows redirects when set to 'uri_pjsip'. This infrastructure can be
used by any PJSIP module that needs to handle 3xx redirect responses.</p>
<h4>app_mixmonitor.c: Fix crash in mixmonitor_ds_remove_and_free when datastore is NULL</h4>
<p>Author: Tinet-mucw
Date: 2025-12-25</p>
<p>The datastore may be NULL, so a null pointer check needs to be added.</p>
<p>Resolves: #1673</p>
<h4>res_pjsip_refer: don't defer session termination for ari transfer</h4>
<p>Author: Sven Kube
Date: 2025-10-23</p>
<p>Allow session termination during an in progress ari handled transfer.</p>
<h4>chan_dahdi.conf.sample: Avoid warnings with default configs.</h4>
<p>Author: Naveen Albert
Date: 2025-10-23</p>
<p>callgroup and pickupgroup may only be specified for FXO-signaled channels;
however, the chan_dahdi sample config had these options uncommented in
the [channels] section, thus applying these settings to all channels,
resulting in warnings. Comment these out so there are no warnings with
an unmodified sample config.</p>
<p>Resolves: #1552</p>
<h4>main/dial.c: Set channel hangup cause on timeout in handle_timeout_trip</h4>
<p>Author: sarangr7
Date: 2025-12-18</p>
<p>When dial attempts timeout in the core dialing API, the channel's hangup
cause was not being set before hanging up. Only the ast_dial_channel
structure's internal cause field was updated, but the actual ast_channel
hangup cause remained unset.</p>
<p>This resulted in incorrect or missing hangup cause information being
reported through CDRs, AMI events, and other mechanisms that read the
channel's hangup cause when dial timeouts occurred via applications
using the dialing API (FollowMe, Page, etc.).</p>
<p>The fix adds proper channel locking and sets AST_CAUSE_NO_ANSWER on
the channel before calling ast_hangup(), ensuring consistent hangup
cause reporting across all interfaces.</p>
<p>Resolves: #1660</p>
<h4>cel: Add missing manager documentation.</h4>
<p>Author: Sean Bright
Date: 2025-12-12</p>
<p>The LOCAL_OPTIMIZE_BEGIN, STREAM_BEGIN, STREAM_END, and DTMF CEL
events were not all documented in the CEL configuration file or the
manager documentation for the CEL event.</p>
<h4>res_odbc: Use SQL_SUCCEEDED() macro where applicable.</h4>
<p>Author: Sean Bright
Date: 2025-12-17</p>
<p>This is just a cleanup of some repetitive code.</p>
<h4>rtp/rtcp: Configure dual-stack behavior via IPV6_V6ONLY</h4>
<p>Author: Justin T. Gibbs
Date: 2025-12-21</p>
<p>Dual-stack behavior (simultaneous listening for IPV4 and IPV6
connections on a single socket) is required by Asterisk's ICE
implementation. On systems with the IPV6_V6ONLY sockopt, set
the option to 0 (dual-stack enabled) when binding to the IPV6
any address. This ensures correct behavior regardless of the
system's default dual-stack configuration.</p>
<h4>http.c: Include remote address in URI handler message.</h4>
<p>Author: Sean Bright
Date: 2025-12-22</p>
<p>Resolves: #1662</p>
<h4>pjsip: Move from threadpool to taskpool</h4>
<p>Author: Joshua C. Colp
Date: 2025-12-04</p>
<p>This change moves the PJSIP module from the threadpool API
to the taskpool API. PJSIP-specific implementations for
task usage have been removed and replaced with calls to
the optimized taskpool implementations instead. The need
for a pool of serializers has also been removed as
taskpool inherently provides this. The default settings
have also been changed to be more realistic for common
usage.</p>
<p>UpgradeNote: The threadpool_* options in pjsip.conf have now
been deprecated though they continue to be read and used.
They have been replaced with taskpool options that give greater
control over the underlying taskpool used for PJSIP. An alembic
upgrade script has been added to add these options to realtime
as well.</p>
<h4>Disable device state caching for ephemeral channels</h4>
<p>Author: phoneben
Date: 2025-12-09</p>
<p>chan_audiosocket/chan_rtp/res_stasis_snoop: Disable device state caching for ephemeral channels</p>
<p>Resolves: #1638</p>
<h4>chan_websocket: Add locking in send_event and check for NULL websocket handle.</h4>
<p>Author: George Joseph
Date: 2025-12-10</p>
<p>On an outbound websocket connection, when the triggering caller hangs up,
webchan_hangup() closes the outbound websocket session and sets the websocket
session handle to NULL. If the hangup happened in the tiny window between
opening the outbound websocket connection and before read_thread_handler()
was able to send the MEDIA_START message, it could segfault because the
websocket session handle was NULL. If it didn't actually segfault, there was
also the possibility that the websocket instance wouldn't get cleaned up which
could also cause the channel snapshot to not get cleaned up. That could
cause memory leaks and <code>core show channels</code> to list phantom WebSocket
channels.</p>
<p>To prevent the race, the send_event() macro now locks the websocket_pvt
instance and checks the websocket session handle before attempting to send
the MEDIA_START message.</p>
<p>Resolves: #1643
Resolves: #1645</p>
<h4>Fix false null-deref warning in channel_state</h4>
<p>Author: phoneben
Date: 2025-12-08</p>
<p>Resolve analyzer warning in channel_state by checking AST_FLAG_DEAD on snapshot, which is guaranteed non-NULL.</p>
<p>Resolves: #1430</p>
<h4>endpoint.c: Plug a memory leak in ast_endpoint_shutdown().</h4>
<p>Author: George Joseph
Date: 2025-12-08</p>
<p>Commit 26795be introduced a memory leak of ast_endpoint when
ast_endpoint_shutdown() was called. The leak occurs only if a configuration
change removes an endpoint and isn't related to call volume or the length of
time asterisk has been running. An ao2_ref(-1) has been added to
ast_endpoint_shutdown() to plug the leak.</p>
<p>Resolves: #1635</p>
<h4>Revert "func_hangupcause.c: Add access to Reason headers via HANGUPCAUSE()"</h4>
<p>Author: Sean Bright
Date: 2025-12-03</p>
<p>This reverts commit 517766299093d7a9798af68b39951ed8b2469836.</p>
<p>For rationale, see #1621 and #1606</p>
<h4>cel_manager.c: Correct manager event mask for CEL events.</h4>
<p>Author: Sean Bright
Date: 2025-12-05</p>
<p>There is no EVENT_FLAG_CEL and these events are raised with as
EVENT_FLAG_CALL.</p>
<h4>app_queue.c: Update docs to correct QueueMemberPause event name.</h4>
<p>Author: Sean Bright
Date: 2025-12-04</p>
<h4>taskprocessors: Improve logging and add new cli options</h4>
<p>Author: Mike Bradeen
Date: 2025-10-28</p>
<p>This change makes some small changes to improve log readability in
addition to the following changes:</p>
<p>Modified 'core show taskprocessors' to now show Low time and High time
for task execution.</p>
<p>New command 'core show taskprocessor name <taskprocessor-name>' to dump
taskprocessor info and current queue.</p>
<p>Addionally, a new test was added to demonstrate the 'show taskprocessor
name' functionality:
test execute category /main/taskprocessor/ name taskprocessor_cli_show</p>
<p>Setting 'core set debug 3 taskprocessor.c' will now log pushed tasks.
(Warning this is will cause extremely high levels of logging at even
low traffic levels.)</p>
<p>Resolves: #1566</p>
<p>UserNote: New CLI command has been added -
core show taskprocessor name <taskprocessor-name></p>
<h4>manager: fix double free of criteria variable when adding filter</h4>
<p>Author: Michal Hajek
Date: 2025-10-13</p>
<p>Signed-off-by: Michal Hajek <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#109;&#105;&#99;&#104;&#97;&#108;&#46;&#104;&#97;&#106;&#101;&#107;&#64;&#100;&#97;&#107;&#116;&#101;&#108;&#97;&#46;&#99;&#111;&#109;">&#109;&#105;&#99;&#104;&#97;&#108;&#46;&#104;&#97;&#106;&#101;&#107;&#64;&#100;&#97;&#107;&#116;&#101;&#108;&#97;&#46;&#99;&#111;&#109;</a></p>
<p>Fixes: #1531</p>
<h4>app_stream_echo.c: Check that stream is non-NULL before dereferencing.</h4>
<p>Author: Sean Bright
Date: 2025-12-01</p>
<p>Also re-order and rename the arguments of <code>stream_echo_write_error</code> to
match those of <code>ast_write_stream</code> for consistency.</p>
<p>Resolves: #1427</p>
<h4>abstract_jb.c: Remove redundant timer check per static analysis.</h4>
<p>Author: Sean Bright
Date: 2025-12-01</p>
<p>While this check is technically unnecessary, it also was not harmful.</p>
<p>The 2 other items mentioned in the linked issue are false positives
and require no action.</p>
<p>Resolves: #1417</p>
<h4>channelstorage_cpp: Fix fallback return value in channelstorage callback</h4>
<p>Author: phoneben
Date: 2025-11-26</p>
<p>callback returned the last iterated channel when no match existed, causing invalid channel references and potential double frees. Updated to correctly return NULL when there is no match.</p>
<p>Resolves: #1609</p>
<h4>ccss: Add option to ccss.conf to globally disable it.</h4>
<p>Author: George Joseph
Date: 2025-11-19</p>
<p>The Call Completion Supplementary Service feature is rarely used but many of
it's functions are called by app_dial and channel.c "just in case". These
functions lock and unlock the channel just to see if CCSS is enabled on it,
which it isn't 99.99% of the time.</p>
<p>UserNote: A new "enabled" parameter has been added to ccss.conf. It defaults
to "yes" to preserve backwards compatibility but CCSS is rarely used so
setting "enabled = no" in the "general" section can save some unneeded channel
locking operations and log message spam. Disabling ccss will also prevent
the func_callcompletion and chan_dahdi modules from loading.</p>
<p>DeveloperNote: A new API ast_is_cc_enabled() has been added. It should be
used to ensure that CCSS is enabled before making any other ast_cc_* calls.</p>
<h4>app_directed_pickup.c: Change some log messages from NOTICE to VERBOSE.</h4>
<p>Author: George Joseph
Date: 2025-11-20</p>
<p>UpgradeNote: In an effort to reduce log spam, two normal progress
"pickup attempted" log messages from app_directed_pickup have been changed
from NOTICE to VERBOSE(3). This puts them on par with other normal
dialplan progress messages.</p>
<h4>chan_websocket: Fix crash on DTMF_END event.</h4>
<p>Author: Sean Bright
Date: 2025-11-20</p>
<p>Resolves: #1604</p>
<h4>chan_websocket.c: Tolerate other frame types</h4>
<p>Author: Joe Garlick
Date: 2025-11-12</p>
<p>Currently, if chan_websocket receives an un supported frame like comfort noise it will exit the websocket. The proposed change is to tolerate the other frames by not sending them down the websocket but instead just ignoring them.</p>
<p>Resolves: #1587</p>
<h4>app_reload: Fix Reload() without arguments.</h4>
<p>Author: Naveen Albert
Date: 2025-11-17</p>
<p>Calling Reload() without any arguments is supposed to reload
everything (equivalent to a 'core reload'), but actually does
nothing. This is because it was calling ast_module_reload with
an empty string, and the argument needs to explicitly be NULL.</p>
<p>Resolves: #1597</p>
<h4>pbx.c: Print new context count when reloading dialplan.</h4>
<p>Author: Naveen Albert
Date: 2025-11-17</p>
<p>When running "dialplan reload", the number of contexts reported
is initially wrong, as it is the old context count. Running
"dialplan reload" a second time returns the correct number of
contexts that are loaded. This can confuse users into thinking
that the reload didn't work successfully the first time.</p>
<p>This counter is currently only incremented when iterating the
old contexts prior to the context merge; at the very end, get
the current number of elements in the context hash table and
report that instead. This way, the count is correct immediately
whenever a reload occurs.</p>
<p>Resolves: #1599</p>
<h4>Makefile: Add module-list-* targets.</h4>
<p>Author: C. Maj
Date: 2025-11-17</p>
<p>Convenience wrappers for showing modules at various support levels.</p>
<ul>
<li>module-list-core</li>
<li>module-list-extended</li>
<li>module-list-deprecated</li>
</ul>
<p>Resolves: #1572</p>
<p>UserNote: Try "make module-list-deprecated" to see what modules
are on their way out the door.</p>
<h4>core_unreal.c: Use ast instead of p-&gt;chan to get the DIALSTATUS variable</h4>
<p>Author: Tinet-mucw
Date: 2025-11-13</p>
<p>After p-&gt;chan = NULL, ast still points to the valid channel object,
using ast safely accesses the channel's DIALSTATUS variable before it's fully destroyed</p>
<p>Resolves: #1590</p>
<h4>ast_coredumper: Fix multiple issues</h4>
<p>Author: George Joseph
Date: 2025-11-07</p>
<ul>
<li>
<p>Fixed an issue with tarball-coredumps when asterisk was invoked without an
absolute path.</p>
</li>
<li>
<p>Fixed an issue with gdb itself segfaulting when trying to get symbols from
separate debuginfo files. The command line arguments needed to be altered
such that the gdbinit files is loaded before anything else but the
<code>dump-asterisk</code> command is run after full initialization.</p>
</li>
</ul>
<p>In the embedded gdbinit script:</p>
<ul>
<li>
<p>The extract_string_symbol function needed a <code>char *</code> cast to work properly.</p>
</li>
<li>
<p>The s_strip function needed to be updated to continue to work with the
cpp_map_name_id channel storage backend.</p>
</li>
<li>
<p>A new function was added to dump the channels when cpp_map_name_id was
used.</p>
</li>
<li>
<p>The Channel object was updated to account for the new channel storage
backends</p>
</li>
<li>
<p>The show_locks function was refactored to work correctly.</p>
</li>
</ul>
<h4>app_mixmonitor: Add 's' (skip) option to delay recording.</h4>
<p>Author: Daouda Taha
Date: 2025-10-28</p>
<p>The 's' (skip) option delays MixMonitor recording until the specified number of seconds
(can be fractional) have elapsed since MixMonitor was invoked.</p>
<p>No audio is written to the recording file during this time. If the call ends before this
period, no audio will be saved. This is useful for avoiding early audio such as
announcements, ringback tones, or other non-essential sounds.</p>
<p>UserNote: This change introduces a new 's(<seconds>)' (skip) option to the MixMonitor
application. Example:
MixMonitor(${UNIQUEID}.wav,s(3))</p>
<p>This skips recording for the first 3 seconds before writing audio to the file.
Existing MixMonitor behavior remains unchanged when the 's' option is not used.</p>
<h4>stasis: switch stasis show topics temporary container from list - RBtree</h4>
<p>Author: phoneben
Date: 2025-11-11</p>
<p>switch stasis show topics temporary container from list to RB-tree
minimizing lock time</p>
<p>Resolves: #1585</p>
<h4>app_dtmfstore: Avoid a potential buffer overflow.</h4>
<p>Author: Sean Bright
Date: 2025-11-07</p>
<p>Prefer snprintf() so we can readily detect if our output was
truncated.</p>
<p>Resolves: #1421</p>
<h4>main: Explicitly mark case statement fallthrough as such.</h4>
<p>Author: Sean Bright
Date: 2025-11-07</p>
<p>Resolves: #1442</p>
<h4>bridge_softmix: Return early on topology allocation failure.</h4>
<p>Author: Sean Bright
Date: 2025-11-07</p>
<p>Resolves: #1446</p>
<h4>bridge_simple: Increase code verbosity for clarity.</h4>
<p>Author: Sean Bright
Date: 2025-11-07</p>
<p>There's no actual problem here, but I can see how it might by
confusing.</p>
<p>Resolves: #1444</p>
<h4>app_queue.c: Only announce to head caller if announce_to_first_user</h4>
<p>Author: Kristian F. Høgh
Date: 2025-10-30</p>
<p>Only make announcements to head caller if announce_to_first_user is true</p>
<p>Fixes: #1568</p>
<p>UserNote: When announce_to_first_user is false, no announcements are played to the head caller</p>
<h4>chan_websocket: Add ability to place a MARK in the media stream.</h4>
<p>Author: George Joseph
Date: 2025-11-05</p>
<p>Also cleaned up a few unused #if blocks, and started sending a few ERROR
events back to the apps.</p>
<p>Resolves: #1574</p>
<p>DeveloperNote: Apps can now send a <code>MARK_MEDIA</code> command with an optional
<code>correlation_id</code> parameter to chan_websocket which will be placed in the
media frame queue. When that frame is dequeued after all intervening media
has been played to the core, chan_websocket will send a
<code>MEDIA_MARK_PROCESSED</code> event to the app with the same correlation_id
(if any).</p>
<h4>chan_websocket: Add capability for JSON control messages and events.</h4>
<p>Author: George Joseph
Date: 2025-10-22</p>
<p>With recent enhancements to chan_websocket, the original plain-text
implementation of control messages and events is now too limiting. We
probably should have used JSON initially but better late than never. Going
forward, enhancements that require control message or event changes will
only be done to the JSON variants and the plain-text variants are now
deprecated but not yet removed.</p>
<ul>
<li>
<p>Added the chan_websocket.conf config file that allows setting which control
message format to use globally: "json" or "plain-text". "plain-text" is the
default for now to preserve existing behavior.</p>
</li>
<li>
<p>Added a dialstring option <code>f(json|plain-text)</code> to allow the format to be
overridden on a call-by-call basis. Again, 'plain-text' is the default for
now to preserve existing behavior.</p>
</li>
</ul>
<p>The JSON for commands sent by the app to Asterisk must be...
<code>{ "command": "&lt;command&gt;" ... }</code> where <code>&lt;command&gt;</code> is one of <code>ANSWER</code>, <code>HANGUP</code>,
<code>START_MEDIA_BUFFERING</code>, etc. The <code>STOP_MEDIA_BUFFERING</code> command takes an
additional, optional parameter to be returned in the corresponding
<code>MEDIA_BUFFERING_COMPLETED</code> event:
<code>{ "command": "STOP_MEDIA_BUFFERING", "correlation_id": "&lt;correlation id&gt;" }</code>.</p>
<p>The JSON for events sent from Asterisk to the app will be...
<code>{ "event": "&lt;event&gt;", "channel_id": "&lt;channel_id&gt;" ... }</code>.
The <code>MEDIA_START</code> event will now look like...</p>
<p><code>{
"event": "MEDIA_START",
"connection_id": "media_connection1",
"channel": "WebSocket/media_connection1/0x5140001a0040",
"channel_id": "1761245643.1",
"format": "ulaw",
"optimal_frame_size": 160,
"ptime": 20,
"channel_variables": {
"DIALEDPEERNUMBER": "media_connection1/c(ulaw)",
"MEDIA_WEBSOCKET_CONNECTION_ID": "media_connection1",
"MEDIA_WEBSOCKET_OPTIMAL_FRAME_SIZE": "160"
}
}</code></p>
<p>Note the addition of the channel variables which can't be supported
with the plain-text formatting.</p>
<p>The documentation will be updated with the exact formats for all commands
and events.</p>
<p>Resolves: #1546
Resolves: #1563</p>
<p>DeveloperNote: The chan_websocket plain-text control and event messages are now
deprecated (but remain the default) in favor of JSON formatted messages.
See https://docs.asterisk.org/Configuration/Channel-Drivers/WebSocket for
more information.</p>
<p>DeveloperNote: A "transport_data" parameter has been added to the
channels/externalMedia ARI endpoint which, for websocket, allows the caller
to specify parameters to be added to the dialstring for the channel. For
instance, <code>"transport_data": "f(json)"</code>.</p>
<h4>build: Add menuselect options to facilitate code tracing and coverage</h4>
<p>Author: George Joseph
Date: 2025-10-30</p>
<p>The following options have been added to the menuselect "Compiler Flags"
section...</p>
<p>CODE_COVERAGE: The ability to enable code coverage via the <code>--enable-coverage</code>
configure flag has existed for many years but changing it requires
re-running ./configure which is painfully slow. With this commit, you can
now enable and disable it via menuselect. Setting this option adds the
<code>-ftest-coverage</code> and <code>-fprofile-arcs</code> flags on the gcc and ld command lines.
It also sets DONT_OPTIMIZE. Note: If you use the <code>--enable-coverage</code> configure
flag, you can't turn it off via menuselect so choose one method and stick to
it.</p>
<p>KEEP_FRAME_POINTERS: This option sets <code>-fno-omit-frame-pointers</code> on the gcc
command line which can facilitate debugging with 'gdb' and tracing with 'perf'.
Unlike CODE_COVERAGE, this option doesn't depend on optimization being
disabled. It does however conflict with COMPILE_DOUBLE.</p>
</body></html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,44 +0,0 @@
<html><head><title>ChangeLog for asterisk-20.18.1</title></head><body>
<h2>Change Log for Release asterisk-20.18.1</h2>
<h3>Links:</h3>
<ul>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.18.1.html">Full ChangeLog</a> </li>
<li><a href="https://github.com/asterisk/asterisk/compare/20.18.0...20.18.1">GitHub Diff</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.18.1.tar.gz">Tarball</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk">Downloads</a> </li>
</ul>
<h3>Summary:</h3>
<ul>
<li>Commits: 1</li>
<li>Commit Authors: 1</li>
<li>Issues Resolved: 1</li>
<li>Security Advisories Resolved: 0</li>
</ul>
<h3>User Notes:</h3>
<h3>Upgrade Notes:</h3>
<h3>Developer Notes:</h3>
<h3>Commit Authors:</h3>
<ul>
<li>Sean Bright: (1)</li>
</ul>
<h2>Issue and Commit Detail:</h2>
<h3>Closed Issues:</h3>
<ul>
<li>1739: [bug]: Regression in 23.2.0 with regard to parsing fractional numbers when system locale is non-standard</li>
</ul>
<h3>Commits By Author:</h3>
<ul>
<li>
<h4>Sean Bright (1):</h4>
</li>
</ul>
<h3>Commit List:</h3>
<ul>
<li>asterisk.c: Use C.UTF-8 locale instead of relying on user's environment.</li>
</ul>
<h3>Commit Details:</h3>
<h4>asterisk.c: Use C.UTF-8 locale instead of relying on user's environment.</h4>
<p>Author: Sean Bright
Date: 2026-01-23</p>
<p>Resolves: #1739</p>
</body></html>

View File

@@ -1,52 +0,0 @@
## Change Log for Release asterisk-20.18.1
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.18.1.html)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.18.0...20.18.1)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.18.1.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 1
- Commit Authors: 1
- Issues Resolved: 1
- Security Advisories Resolved: 0
### User Notes:
### Upgrade Notes:
### Developer Notes:
### Commit Authors:
- Sean Bright: (1)
## Issue and Commit Detail:
### Closed Issues:
- 1739: [bug]: Regression in 23.2.0 with regard to parsing fractional numbers when system locale is non-standard
### Commits By Author:
- #### Sean Bright (1):
### Commit List:
- asterisk.c: Use C.UTF-8 locale instead of relying on user's environment.
### Commit Details:
#### asterisk.c: Use C.UTF-8 locale instead of relying on user's environment.
Author: Sean Bright
Date: 2026-01-23
Resolves: #1739

View File

@@ -1,103 +0,0 @@
<html><head><title>ChangeLog for asterisk-20.18.2</title></head><body>
<h2>Change Log for Release asterisk-20.18.2</h2>
<h3>Links:</h3>
<ul>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.18.2.html">Full ChangeLog</a> </li>
<li><a href="https://github.com/asterisk/asterisk/compare/20.18.1...20.18.2">GitHub Diff</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.18.2.tar.gz">Tarball</a> </li>
<li><a href="https://downloads.asterisk.org/pub/telephony/asterisk">Downloads</a> </li>
</ul>
<h3>Summary:</h3>
<ul>
<li>Commits: 4</li>
<li>Commit Authors: 2</li>
<li>Issues Resolved: 0</li>
<li>Security Advisories Resolved: 4</li>
<li><a href="https://github.com/asterisk/asterisk/security/advisories/GHSA-85x7-54wr-vh42">GHSA-85x7-54wr-vh42</a>: Asterisk xml.c uses unsafe XML_PARSE_NOENT leading to potential XXE Injection</li>
<li><a href="https://github.com/asterisk/asterisk/security/advisories/GHSA-rvch-3jmx-3jf3">GHSA-rvch-3jmx-3jf3</a>: ast_coredumper running as root sources ast_debug_tools.conf from /etc/asterisk; potentially leading to privilege escalation</li>
<li><a href="https://github.com/asterisk/asterisk/security/advisories/GHSA-v6hp-wh3r-cwxh">GHSA-v6hp-wh3r-cwxh</a>: The Asterisk embedded web server's /httpstatus page echos user supplied values(cookie and query string) without sanitization</li>
<li><a href="https://github.com/asterisk/asterisk/security/advisories/GHSA-xpc6-x892-v83c">GHSA-xpc6-x892-v83c</a>: ast_coredumper runs as root, and writes gdb init file to world writeable folder; leading to potential privilege escalation </li>
</ul>
<h3>User Notes:</h3>
<ul>
<li>
<h4>ast_coredumper: check ast_debug_tools.conf permissions</h4>
ast_debug_tools.conf must be owned by root and not be
writable by other users or groups to be used by ast_coredumper or
by ast_logescalator or ast_loggrabber when run as root.</li>
</ul>
<h3>Upgrade Notes:</h3>
<ul>
<li>
<h4>http.c: Change httpstatus to default disabled and sanitize output.</h4>
To prevent possible security issues, the <code>/httpstatus</code> page
served by the internal web server is now disabled by default. To explicitly
enable it, set <code>enable_status=yes</code> in http.conf.</li>
</ul>
<h3>Developer Notes:</h3>
<h3>Commit Authors:</h3>
<ul>
<li>George Joseph: (2)</li>
<li>Mike Bradeen: (2)</li>
</ul>
<h2>Issue and Commit Detail:</h2>
<h3>Closed Issues:</h3>
<ul>
<li>!GHSA-85x7-54wr-vh42: Asterisk xml.c uses unsafe XML_PARSE_NOENT leading to potential XXE Injection</li>
<li>!GHSA-rvch-3jmx-3jf3: ast_coredumper running as root sources ast_debug_tools.conf from /etc/asterisk; potentially leading to privilege escalation</li>
<li>!GHSA-v6hp-wh3r-cwxh: The Asterisk embedded web server's /httpstatus page echos user supplied values(cookie and query string) without sanitization</li>
<li>!GHSA-xpc6-x892-v83c: ast_coredumper runs as root, and writes gdb init file to world writeable folder; leading to potential privilege escalation </li>
</ul>
<h3>Commits By Author:</h3>
<ul>
<li>
<h4>George Joseph (2):</h4>
</li>
<li>
<h4>Mike Bradeen (2):</h4>
</li>
</ul>
<h3>Commit List:</h3>
<ul>
<li>xml.c: Replace XML_PARSE_NOENT with XML_PARSE_NONET for xmlReadFile.</li>
<li>ast_coredumper: check ast_debug_tools.conf permissions</li>
<li>http.c: Change httpstatus to default disabled and sanitize output.</li>
<li>ast_coredumper: create gdbinit file with restrictive permissions</li>
</ul>
<h3>Commit Details:</h3>
<h4>xml.c: Replace XML_PARSE_NOENT with XML_PARSE_NONET for xmlReadFile.</h4>
<p>Author: George Joseph
Date: 2026-01-15</p>
<p>The xmlReadFile XML_PARSE_NOENT flag, which allows parsing of external
entities, could allow a potential XXE injection attack. Replacing it with
XML_PARSE_NONET, which prevents network access, is safer.</p>
<p>Resolves: #GHSA-85x7-54wr-vh42</p>
<h4>ast_coredumper: check ast_debug_tools.conf permissions</h4>
<p>Author: Mike Bradeen
Date: 2026-01-15</p>
<p>Prevent ast_coredumper from using ast_debug_tools.conf files that are
not owned by root or are writable by other users or groups.</p>
<p>Prevent ast_logescalator and ast_loggrabber from doing the same if
they are run as root.</p>
<p>Resolves: #GHSA-rvch-3jmx-3jf3</p>
<p>UserNote: ast_debug_tools.conf must be owned by root and not be
writable by other users or groups to be used by ast_coredumper or
by ast_logescalator or ast_loggrabber when run as root.</p>
<h4>http.c: Change httpstatus to default disabled and sanitize output.</h4>
<p>Author: George Joseph
Date: 2026-01-15</p>
<p>To address potential security issues, the httpstatus page is now disabled
by default and the echoed query string and cookie output is html-escaped.</p>
<p>Resolves: #GHSA-v6hp-wh3r-cwxh</p>
<p>UpgradeNote: To prevent possible security issues, the <code>/httpstatus</code> page
served by the internal web server is now disabled by default. To explicitly
enable it, set <code>enable_status=yes</code> in http.conf.</p>
<h4>ast_coredumper: create gdbinit file with restrictive permissions</h4>
<p>Author: Mike Bradeen
Date: 2026-01-15</p>
<p>Modify gdbinit to use the install command with explicit permissions (-m 600)
when creating the .ast_coredumper.gdbinit file. This ensures the file is
created with restricted permissions (readable/writable only by the owner)
to avoid potential privilege escalation.</p>
<p>Resolves: #GHSA-xpc6-x892-v83c</p>
</body></html>

View File

@@ -1,119 +0,0 @@
## Change Log for Release asterisk-20.18.2
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.18.2.html)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.18.1...20.18.2)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.18.2.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 4
- Commit Authors: 2
- Issues Resolved: 0
- Security Advisories Resolved: 4
- [GHSA-85x7-54wr-vh42](https://github.com/asterisk/asterisk/security/advisories/GHSA-85x7-54wr-vh42): Asterisk xml.c uses unsafe XML_PARSE_NOENT leading to potential XXE Injection
- [GHSA-rvch-3jmx-3jf3](https://github.com/asterisk/asterisk/security/advisories/GHSA-rvch-3jmx-3jf3): ast_coredumper running as root sources ast_debug_tools.conf from /etc/asterisk; potentially leading to privilege escalation
- [GHSA-v6hp-wh3r-cwxh](https://github.com/asterisk/asterisk/security/advisories/GHSA-v6hp-wh3r-cwxh): The Asterisk embedded web server's /httpstatus page echos user supplied values(cookie and query string) without sanitization
- [GHSA-xpc6-x892-v83c](https://github.com/asterisk/asterisk/security/advisories/GHSA-xpc6-x892-v83c): ast_coredumper runs as root, and writes gdb init file to world writeable folder; leading to potential privilege escalation
### User Notes:
- #### ast_coredumper: check ast_debug_tools.conf permissions
ast_debug_tools.conf must be owned by root and not be
writable by other users or groups to be used by ast_coredumper or
by ast_logescalator or ast_loggrabber when run as root.
### Upgrade Notes:
- #### http.c: Change httpstatus to default disabled and sanitize output.
To prevent possible security issues, the `/httpstatus` page
served by the internal web server is now disabled by default. To explicitly
enable it, set `enable_status=yes` in http.conf.
### Developer Notes:
### Commit Authors:
- George Joseph: (2)
- Mike Bradeen: (2)
## Issue and Commit Detail:
### Closed Issues:
- !GHSA-85x7-54wr-vh42: Asterisk xml.c uses unsafe XML_PARSE_NOENT leading to potential XXE Injection
- !GHSA-rvch-3jmx-3jf3: ast_coredumper running as root sources ast_debug_tools.conf from /etc/asterisk; potentially leading to privilege escalation
- !GHSA-v6hp-wh3r-cwxh: The Asterisk embedded web server's /httpstatus page echos user supplied values(cookie and query string) without sanitization
- !GHSA-xpc6-x892-v83c: ast_coredumper runs as root, and writes gdb init file to world writeable folder; leading to potential privilege escalation
### Commits By Author:
- #### George Joseph (2):
- #### Mike Bradeen (2):
### Commit List:
- xml.c: Replace XML_PARSE_NOENT with XML_PARSE_NONET for xmlReadFile.
- ast_coredumper: check ast_debug_tools.conf permissions
- http.c: Change httpstatus to default disabled and sanitize output.
- ast_coredumper: create gdbinit file with restrictive permissions
### Commit Details:
#### xml.c: Replace XML_PARSE_NOENT with XML_PARSE_NONET for xmlReadFile.
Author: George Joseph
Date: 2026-01-15
The xmlReadFile XML_PARSE_NOENT flag, which allows parsing of external
entities, could allow a potential XXE injection attack. Replacing it with
XML_PARSE_NONET, which prevents network access, is safer.
Resolves: #GHSA-85x7-54wr-vh42
#### ast_coredumper: check ast_debug_tools.conf permissions
Author: Mike Bradeen
Date: 2026-01-15
Prevent ast_coredumper from using ast_debug_tools.conf files that are
not owned by root or are writable by other users or groups.
Prevent ast_logescalator and ast_loggrabber from doing the same if
they are run as root.
Resolves: #GHSA-rvch-3jmx-3jf3
UserNote: ast_debug_tools.conf must be owned by root and not be
writable by other users or groups to be used by ast_coredumper or
by ast_logescalator or ast_loggrabber when run as root.
#### http.c: Change httpstatus to default disabled and sanitize output.
Author: George Joseph
Date: 2026-01-15
To address potential security issues, the httpstatus page is now disabled
by default and the echoed query string and cookie output is html-escaped.
Resolves: #GHSA-v6hp-wh3r-cwxh
UpgradeNote: To prevent possible security issues, the `/httpstatus` page
served by the internal web server is now disabled by default. To explicitly
enable it, set `enable_status=yes` in http.conf.
#### ast_coredumper: create gdbinit file with restrictive permissions
Author: Mike Bradeen
Date: 2026-01-15
Modify gdbinit to use the install command with explicit permissions (-m 600)
when creating the .ast_coredumper.gdbinit file. This ensures the file is
created with restricted permissions (readable/writable only by the owner)
to avoid potential privilege escalation.
Resolves: #GHSA-xpc6-x892-v83c

View File

@@ -1,741 +0,0 @@
Change Log for Release 20.3.0
========================================
Summary:
----------------------------------------
- Set up new ChangeLogs directory
- .github: Add AsteriskReleaser
- chan_pjsip: also return all codecs on empty re-INVITE for late offers
- cel: add local optimization begin event
- core: Cleanup gerrit and JIRA references. (#57)
- .github: Fix CherryPickTest to only run when it should
- .github: Fix reference to CHERRY_PICK_TESTING_IN_PROGRESS
- .github: Remove separate set labels step from new PR
- .github: Refactor CP progress and add new PR test progress
- res_pjsip: mediasec: Add Security-Client headers after 401
- .github: Add cherry-pick test progress labels
- LICENSE: Update link to trademark policy.
- chan_dahdi: Add dialmode option for FXS lines.
- .github: Update issue templates
- .github: Remove unnecessary parameter in CherryPickTest
- Initial GitHub PRs
- Initial GitHub Issue Templates
- pbx_dundi: Fix PJSIP endpoint configuration check.
- Revert "app_queue: periodic announcement configurable start time."
- res_pjsip_stir_shaken: Fix JSON field ordering and disallowed TN characters.
- pbx_dundi: Add PJSIP support.
- install_prereq: Add Linux Mint support.
- chan_pjsip: fix music on hold continues after INVITE with replaces
- voicemail.conf: Fix incorrect comment about #include.
- app_queue: Fix minor xmldoc duplication and vagueness.
- test.c: Fix counting of tests and add 2 new tests
- res_calendar: output busy state as part of show calendar.
- loader.c: Minor module key check simplification.
- ael: Regenerate lexers and parsers.
- bridge_builtin_features: add beep via touch variable
- res_mixmonitor: MixMonitorMute by MixMonitor ID
- format_sln: add .slin as supported file extension
- res_agi: RECORD FILE plays 2 beeps.
- func_json: Fix JSON parsing issues.
- app_senddtmf: Add SendFlash AMI action.
- app_dial: Fix DTMF not relayed to caller on unanswered calls.
- configure: fix detection of re-entrant resolver functions
- cli: increase channel column width
- app_queue: periodic announcement configurable start time.
- make_version: Strip svn stuff and suppress ref HEAD errors
- res_http_media_cache: Introduce options and customize
- main/iostream.c: fix build with libressl
- contrib: rc.archlinux.asterisk uses invalid redirect.
User Notes:
----------------------------------------
- ### cel: add local optimization begin event
The new AST_CEL_LOCAL_OPTIMIZE_BEGIN can be used
by itself or in conert with the existing
AST_CEL_LOCAL_OPTIMIZE to book-end local channel optimizaion.
- ### chan_dahdi: Add dialmode option for FXS lines.
A "dialmode" option has been added which allows
specifying, on a per-channel basis, what methods of
subscriber dialing (pulse and/or tone) are permitted.
Additionally, this can be changed on a channel
at any point during a call using the CHANNEL
function.
- ### pbx_dundi: Add PJSIP support.
DUNDi now supports chan_pjsip. Outgoing calls using
PJSIP require the pjsip_outgoing_endpoint option
to be set in dundi.conf.
- ### cli: increase channel column width
This change increases the display width on 'core show channels'
amd 'core show channels verbose'
For 'core show channels', the Channel name field is increased to
64 characters and the Location name field is increased to 32
characters.
For 'core show channels verbose', the Channel name field is
increased to 80 characters, the Context is increased to 24
characters and the Extension is increased to 24 characters.
- ### app_senddtmf: Add SendFlash AMI action.
The SendFlash AMI action now allows sending
a hook flash event on a channel.
- ### res_http_media_cache: Introduce options and customize
The res_http_media_cache module now attempts to load
configuration from the res_http_media_cache.conf file.
The following options were added:
* timeout_secs
* user_agent
* follow_location
* max_redirects
* protocols
* redirect_protocols
* dns_cache_timeout_secs
- ### test.c: Fix counting of tests and add 2 new tests
The "tests" attribute of the "testsuite" element in the
output XML now reflects only the tests actually requested
to be executed instead of all the tests registered.
The "failures" attribute was added to the "testsuite"
element.
Also added two new unit tests that just pass and fail
to be used for testing CI itself.
- ### res_mixmonitor: MixMonitorMute by MixMonitor ID
It is now possible to specify the MixMonitorID when calling
the manager action: MixMonitorMute. This will allow an
individual MixMonitor instance to be muted via ID.
The MixMonitorID can be stored as a channel variable using
the 'i' MixMonitor option and is returned upon creation if
this option is used.
As part of this change, if no MixMonitorID is specified in
the manager action MixMonitorMute, Asterisk will set the mute
flag on all MixMonitor audiohooks on the channel. Previous
behavior would set the flag on the first MixMonitor audiohook
found.
- ### bridge_builtin_features: add beep via touch variable
Add optional touch variable : TOUCH_MIXMONITOR_BEEP(interval)
Setting TOUCH_MIXMONITOR_BEEP/TOUCH_MONITOR_BEEP to a valid
interval in seconds will result in a periodic beep being
played to the monitored channel upon MixMontior/Monitor
feature start.
If an interval less than 5 seconds is specified, the interval
will default to 5 seconds. If the value is set to an invalid
interval, the default of 15 seconds will be used.
- ### format_sln: add .slin as supported file extension
format_sln now recognizes '.slin' as a valid
file extension in addition to the existing
'.sln' and '.raw'.
Upgrade Notes:
----------------------------------------
- ### cel: add local optimization begin event
The existing AST_CEL_LOCAL_OPTIMIZE can continue
to be used as-is and the AST_CEL_LOCAL_OPTIMIZE_BEGIN event
can be ignored if desired.
Closed Issues:
----------------------------------------
- #35: [New Feature]: chan_dahdi: Allow disabling pulse or tone dialing
- #39: [Bug]: Remove .gitreview from repository.
- #43: [Bug]: Link to trademark policy is no longer correct
- #48: [bug]: res_pjsip: Mediasec requires different headers on 401 response
- #52: [improvement]: Add local optimization begin cel event
Commits By Author:
----------------------------------------
- ### Asterisk Development Team (1):
- Update for 20.3.0-rc1
- ### Fabrice Fontaine (2):
- main/iostream.c: fix build with libressl
- configure: fix detection of re-entrant resolver functions
- ### George Joseph (13):
- make_version: Strip svn stuff and suppress ref HEAD errors
- test.c: Fix counting of tests and add 2 new tests
- Initial GitHub Issue Templates
- Initial GitHub PRs
- .github: Remove unnecessary parameter in CherryPickTest
- .github: Update issue templates
- .github: Add cherry-pick test progress labels
- .github: Refactor CP progress and add new PR test progress
- .github: Remove separate set labels step from new PR
- .github: Fix reference to CHERRY_PICK_TESTING_IN_PROGRESS
- .github: Fix CherryPickTest to only run when it should
- .github: Add AsteriskReleaser
- Set up new ChangeLogs directory
- ### Henning Westerholt (2):
- chan_pjsip: fix music on hold continues after INVITE with replaces
- chan_pjsip: also return all codecs on empty re-INVITE for late offers
- ### Holger Hans Peter Freyther (1):
- res_http_media_cache: Introduce options and customize
- ### Jaco Kroon (2):
- app_queue: periodic announcement configurable start time.
- res_calendar: output busy state as part of show calendar.
- ### Joshua C. Colp (2):
- pbx_dundi: Fix PJSIP endpoint configuration check.
- LICENSE: Update link to trademark policy.
- ### Joshua Colp (1):
- Revert "app_queue: periodic announcement configurable start time."
- ### Maximilian Fridrich (1):
- res_pjsip: mediasec: Add Security-Client headers after 401
- ### Mike Bradeen (5):
- cli: increase channel column width
- format_sln: add .slin as supported file extension
- res_mixmonitor: MixMonitorMute by MixMonitor ID
- bridge_builtin_features: add beep via touch variable
- cel: add local optimization begin event
- ### Naveen Albert (8):
- app_dial: Fix DTMF not relayed to caller on unanswered calls.
- app_senddtmf: Add SendFlash AMI action.
- func_json: Fix JSON parsing issues.
- app_queue: Fix minor xmldoc duplication and vagueness.
- voicemail.conf: Fix incorrect comment about #include.
- pbx_dundi: Add PJSIP support.
- res_pjsip_stir_shaken: Fix JSON field ordering and disallowed TN characters.
- chan_dahdi: Add dialmode option for FXS lines.
- ### Sean Bright (5):
- contrib: rc.archlinux.asterisk uses invalid redirect.
- res_agi: RECORD FILE plays 2 beeps.
- ael: Regenerate lexers and parsers.
- loader.c: Minor module key check simplification.
- core: Cleanup gerrit and JIRA references. (#57)
- ### The_Blode (1):
- install_prereq: Add Linux Mint support.
Detail:
----------------------------------------
- ### Set up new ChangeLogs directory
Author: George Joseph
Date: 2023-05-09
- ### .github: Add AsteriskReleaser
Author: George Joseph
Date: 2023-05-05
- ### chan_pjsip: also return all codecs on empty re-INVITE for late offers
Author: Henning Westerholt
Date: 2023-05-03
We should also return all codecs on an re-INVITE without SDP for a
call that used late offer (e.g. no SDP in the initial INVITE, SDP
in the ACK). Bugfix for feature introduced in ASTERISK-30193
(https://issues.asterisk.org/jira/browse/ASTERISK-30193)
Migration from previous gerrit change that was not merged.
- ### cel: add local optimization begin event
Author: Mike Bradeen
Date: 2023-05-02
The current AST_CEL_LOCAL_OPTIMIZE event is and has been
triggered on a local optimization end to serve as a flag
indicating the event occurred. This change adds a second
AST_CEL_LOCAL_OPTIMIZE_BEGIN event for further detail.
Resolves: #52
UpgradeNote: The existing AST_CEL_LOCAL_OPTIMIZE can continue
to be used as-is and the AST_CEL_LOCAL_OPTIMIZE_BEGIN event
can be ignored if desired.
UserNote: The new AST_CEL_LOCAL_OPTIMIZE_BEGIN can be used
by itself or in conert with the existing
AST_CEL_LOCAL_OPTIMIZE to book-end local channel optimizaion.
- ### core: Cleanup gerrit and JIRA references. (#57)
Author: Sean Bright
Date: 2023-05-03
* Remove .gitreview and switch to pulling the main asterisk branch
version from configure.ac instead.
* Replace references to JIRA with GitHub.
* Other minor cleanup found along the way.
Resolves: #39
- ### .github: Fix CherryPickTest to only run when it should
Author: George Joseph
Date: 2023-05-03
Fixed CherryPickTest so it triggers only on the
"cherry-pick-test" label instead of all labels.
- ### .github: Fix reference to CHERRY_PICK_TESTING_IN_PROGRESS
Author: George Joseph
Date: 2023-05-02
- ### .github: Remove separate set labels step from new PR
Author: George Joseph
Date: 2023-05-02
- ### .github: Refactor CP progress and add new PR test progress
Author: George Joseph
Date: 2023-05-02
- ### res_pjsip: mediasec: Add Security-Client headers after 401
Author: Maximilian Fridrich
Date: 2023-05-02
When using mediasec, requests sent after a 401 must still contain the
Security-Client header according to
draft-dawes-sipcore-mediasec-parameter.
Resolves: #48
- ### .github: Add cherry-pick test progress labels
Author: George Joseph
Date: 2023-05-02
- ### LICENSE: Update link to trademark policy.
Author: Joshua C. Colp
Date: 2023-05-01
Resolves: #43
- ### chan_dahdi: Add dialmode option for FXS lines.
Author: Naveen Albert
Date: 2023-04-28
Currently, both pulse and tone dialing are always enabled
on all FXS lines, with no way of disabling one or the other.
In some circumstances, it is desirable or necessary to
disable one of these, and this behavior can be problematic.
A new "dialmode" option is added which allows setting the
methods to support on a per channel basis for FXS (FXO
signalled lines). The four options are "both", "pulse",
"dtmf"/"tone", and "none".
Additionally, integration with the CHANNEL function is
added so that this setting can be updated for a channel
during a call.
Resolves: #35
ASTERISK-29992
UserNote: A "dialmode" option has been added which allows
specifying, on a per-channel basis, what methods of
subscriber dialing (pulse and/or tone) are permitted.
Additionally, this can be changed on a channel
at any point during a call using the CHANNEL
function.
- ### .github: Update issue templates
Author: George Joseph
Date: 2023-05-01
- ### .github: Remove unnecessary parameter in CherryPickTest
Author: George Joseph
Date: 2023-05-01
- ### Initial GitHub PRs
Author: George Joseph
Date: 2023-04-28
- ### Initial GitHub Issue Templates
Author: George Joseph
Date: 2023-04-28
- ### pbx_dundi: Fix PJSIP endpoint configuration check.
Author: Joshua C. Colp
Date: 2023-04-13
ASTERISK-28233
- ### Revert "app_queue: periodic announcement configurable start time."
Author: Joshua Colp
Date: 2023-04-11
This reverts commit 3fd0b65bae4b1b14434737ffcf0da4aa9ff717f6.
Reason for revert: Causes segmentation fault.
- ### res_pjsip_stir_shaken: Fix JSON field ordering and disallowed TN characters.
Author: Naveen Albert
Date: 2023-02-17
The current STIR/SHAKEN signing process is inconsistent with the
RFCs in a couple ways that can cause interoperability issues.
RFC8225 specifies that the keys must be ordered lexicographically, but
currently the fields are simply ordered according to the order
in which they were added to the JSON object, which is not
compliant with the RFC and can cause issues with some carriers.
To fix this, we now leverage libjansson's ability to dump a JSON
object sorted by key value, yielding the correct field ordering.
Additionally, telephone numbers must have any leading + prefix removed
and must not contain characters outside of 0-9, *, and # in order
to comply with the RFCs. Numbers are now properly formatted as such.
ASTERISK-30407 #close
- ### pbx_dundi: Add PJSIP support.
Author: Naveen Albert
Date: 2022-12-09
Adds PJSIP as a supported technology to DUNDi.
To facilitate this, we now allow an endpoint to be specified
for outgoing PJSIP calls. We also allow users to force a specific
channel technology for outgoing SIP-protocol calls.
ASTERISK-28109 #close
ASTERISK-28233 #close
- ### install_prereq: Add Linux Mint support.
Author: The_Blode
Date: 2023-03-17
ASTERISK-30359 #close
- ### chan_pjsip: fix music on hold continues after INVITE with replaces
Author: Henning Westerholt
Date: 2023-03-21
In a three party scenario with INVITE with replaces, we need to
unhold the call, otherwise one party continues to get music on
hold, and the call is not properly bridged between them.
ASTERISK-30428
- ### voicemail.conf: Fix incorrect comment about #include.
Author: Naveen Albert
Date: 2023-03-28
A comment at the top of voicemail.conf says that #include
cannot be used in voicemail.conf because this breaks
the ability for app_voicemail to auto-update passwords.
This is factually incorrect, since Asterisk has no problem
updating files that are #include'd in the main configuration
file, and this does work in voicemail.conf as well.
ASTERISK-30479 #close
- ### app_queue: Fix minor xmldoc duplication and vagueness.
Author: Naveen Albert
Date: 2023-04-03
The F option in the xmldocs for the Queue application
was erroneously duplicated, causing it to display
twice on the wiki. The two sections are now merged into one.
Additionally, the description for the d option was quite
vague. Some more details are added to provide context
as to what this actually does.
ASTERISK-30486 #close
- ### test.c: Fix counting of tests and add 2 new tests
Author: George Joseph
Date: 2023-03-28
The unit test XML output was counting all registered tests as "run"
even when only a subset were actually requested to be run and
the "failures" attribute was missing.
* The "tests" attribute of the "testsuite" element in the
output XML now reflects only the tests actually requested
to be executed instead of all the tests registered.
* The "failures" attribute was added to the "testsuite"
element.
Also added 2 new unit tests that just pass and fail to be
used for CI testing.
- ### res_calendar: output busy state as part of show calendar.
Author: Jaco Kroon
Date: 2023-03-23
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
- ### loader.c: Minor module key check simplification.
Author: Sean Bright
Date: 2023-03-23
- ### ael: Regenerate lexers and parsers.
Author: Sean Bright
Date: 2023-03-21
Various changes to ensure that the lexers and parsers can be correctly
generated when REBUILD_PARSERS is enabled.
Some notes:
* Because of the version of flex we are using to generate the lexers
(2.5.35) some post-processing in the Makefile is still required.
* The generated lexers do not contain the problematic C99 check that
was being replaced by the call to sed in the respective Makefiles so
it was removed.
* Since these files are generated, they will include trailing
whitespace in some places. This does not need to be corrected.
- ### bridge_builtin_features: add beep via touch variable
Author: Mike Bradeen
Date: 2023-03-01
Add periodic beep option to one-touch recording by setting
the touch variable TOUCH_MONITOR_BEEP or
TOUCH_MIXMONITOR_BEEP to the desired interval in seconds.
If the interval is less than 5 seconds, a minimum of 5
seconds will be imposed. If the interval is set to an
invalid value, it will default to 15 seconds.
A new test event PERIODIC_HOOK_ENABLED was added to the
func_periodic_hook hook_on function to indicate when
a hook is started. This is so we can test that the touch
variable starts the hook as expected.
ASTERISK-30446
- ### res_mixmonitor: MixMonitorMute by MixMonitor ID
Author: Mike Bradeen
Date: 2023-03-13
While it is possible to create multiple mixmonitor instances
on a channel, it was not previously possible to mute individual
instances.
This change includes the ability to specify the MixMonitorID
when calling the manager action: MixMonitorMute. This will
allow an individual MixMonitor instance to be muted via id.
This id can be stored as a channel variable using the 'i'
MixMonitor option.
As part of this change, if no MixMonitorID is specified in
the manager action MixMonitorMute, Asterisk will set the mute
flag on all MixMonitor spy-type audiohooks on the channel.
This is done via the new audiohook function:
ast_audiohook_set_mute_all.
ASTERISK-30464
- ### format_sln: add .slin as supported file extension
Author: Mike Bradeen
Date: 2023-03-14
Adds '.slin' to existing supported file extensions:
.sln and .raw
ASTERISK-30465
- ### res_agi: RECORD FILE plays 2 beeps.
Author: Sean Bright
Date: 2023-03-08
Sending the "RECORD FILE" command without the optional
`offset_samples` argument can result in two beeps playing on the
channel.
This bug has been present since Asterisk 0.3.0 (2003-02-06).
ASTERISK-30457 #close
- ### func_json: Fix JSON parsing issues.
Author: Naveen Albert
Date: 2023-02-26
Fix issue with returning empty instead of dumping
the JSON string when recursing.
Also adds a unit test to capture this fix.
ASTERISK-30441 #close
- ### app_senddtmf: Add SendFlash AMI action.
Author: Naveen Albert
Date: 2023-02-26
Adds an AMI action to send a flash event
on a channel.
ASTERISK-30440 #close
- ### app_dial: Fix DTMF not relayed to caller on unanswered calls.
Author: Naveen Albert
Date: 2023-03-04
DTMF frames are not handled in app_dial when sent towards the
caller. This means that if DTMF is sent to the calling party
and the call has not yet been answered, the DTMF is not audible.
This is now fixed by relaying DTMF frames if only a single
destination is being dialed.
ASTERISK-29516 #close
- ### configure: fix detection of re-entrant resolver functions
Author: Fabrice Fontaine
Date: 2023-03-08
uClibc does not provide res_nsearch:
asterisk-16.0.0/main/dns.c:506: undefined reference to `res_nsearch'
Patch coded by Yann E. MORIN:
http://lists.busybox.net/pipermail/buildroot/2018-October/232630.html
ASTERISK-21795 #close
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Retrieved from:
https: //git.buildroot.net/buildroot/tree/package/asterisk/0005-configure-fix-detection-of-re-entrant-resolver-funct.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
- ### cli: increase channel column width
Author: Mike Bradeen
Date: 2023-03-06
For 'core show channels', the Channel name field is increased
to 64 characters and the Location name field is increased to
32 characters.
For 'core show channels verbose', the Channel name field is
increased to 80 characters, the Context is increased to 24
characters and the Extension is increased to 24 characters.
ASTERISK-30455
- ### app_queue: periodic announcement configurable start time.
Author: Jaco Kroon
Date: 2023-02-21
This newly introduced periodic-announce-startdelay makes it possible to
configure the initial start delay of the first periodic announcement
after which periodic-announce-frequency takes over.
ASTERISK-30437 #close
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
- ### make_version: Strip svn stuff and suppress ref HEAD errors
Author: George Joseph
Date: 2023-03-13
* All of the code that used subversion has been removed.
* When Asterisk is checked out from a tag or commit instead
of one of the regular branches, git would emit messages like
"fatal: ref HEAD is not a symbolic ref" which weren't fatal
at all. Those are now suppressed.
- ### res_http_media_cache: Introduce options and customize
Author: Holger Hans Peter Freyther
Date: 2022-10-16
Make the existing CURL parameters configurable and allow
to specify the usable protocols, proxy and DNS timeout.
ASTERISK-30340
- ### main/iostream.c: fix build with libressl
Author: Fabrice Fontaine
Date: 2023-02-25
Fix the following build failure with libressl by using SSL_is_server
which is available since version 2.7.0 and
https://github.com/libressl-portable/openbsd/commit/d7ec516916c5eaac29b02d7a8ac6570f63b458f7:
iostream.c: In function 'ast_iostream_close':
iostream.c:559:41: error: invalid use of incomplete typedef 'SSL' {aka 'struct ssl_st'}
559 | if (!stream->ssl->server) {
| ^~
ASTERISK-30107 #close
Fixes: - http://autobuild.buildroot.org/results/ce4d62d00bb77ba5b303cacf6be7e350581a62f9
- ### contrib: rc.archlinux.asterisk uses invalid redirect.
Author: Sean Bright
Date: 2023-03-02
`rc.archlinux.asterisk`, which explicitly requests bash in its
shebang, uses the following command syntax:
${DAEMON} -rx "core stop now" > /dev/null 2&>1
The intent of which is to execute:
${DAEMON} -rx "core stop now"
While sending both stdout and stderr to `/dev/null`. Unfortunately,
because the `&` is in the wrong place, bash is interpreting the `2` as
just an additional argument to the `$DAEMON` command and not as a file
descriptor and proceeds to use the bashism `&>` to send stderr and
stdout to a file named `1`.
So we clean it up and just use bash's shortcut syntax.
Issue raised and a fix suggested (but not used) by peutch on GitHub¹.
ASTERISK-30449 #close
1. https://github.com/asterisk/asterisk/pull/31

View File

@@ -1,146 +0,0 @@
Change Log for Release 20.3.1
========================================
Links:
----------------------------------------
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.3.1.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.3.0...20.3.1)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.3.1.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
Summary:
----------------------------------------
- apply_patches: Use globbing instead of file/sort.
- apply_patches: Sort patch list before applying
- pjsip: Upgrade bundled version to pjproject 2.13.1
User Notes:
----------------------------------------
- ### res_http_media_cache: Introduce options and customize
The res_http_media_cache module now attempts to load
configuration from the res_http_media_cache.conf file.
The following options were added:
* timeout_secs
* user_agent
* follow_location
* max_redirects
* protocols
* redirect_protocols
* dns_cache_timeout_secs
- ### format_sln: add .slin as supported file extension
format_sln now recognizes '.slin' as a valid
file extension in addition to the existing
'.sln' and '.raw'.
- ### bridge_builtin_features: add beep via touch variable
Add optional touch variable : TOUCH_MIXMONITOR_BEEP(interval)
Setting TOUCH_MIXMONITOR_BEEP/TOUCH_MONITOR_BEEP to a valid
interval in seconds will result in a periodic beep being
played to the monitored channel upon MixMontior/Monitor
feature start.
If an interval less than 5 seconds is specified, the interval
will default to 5 seconds. If the value is set to an invalid
interval, the default of 15 seconds will be used.
- ### app_senddtmf: Add SendFlash AMI action.
The SendFlash AMI action now allows sending
a hook flash event on a channel.
- ### res_mixmonitor: MixMonitorMute by MixMonitor ID
It is now possible to specify the MixMonitorID when calling
the manager action: MixMonitorMute. This will allow an
individual MixMonitor instance to be muted via ID.
The MixMonitorID can be stored as a channel variable using
the 'i' MixMonitor option and is returned upon creation if
this option is used.
As part of this change, if no MixMonitorID is specified in
the manager action MixMonitorMute, Asterisk will set the mute
flag on all MixMonitor audiohooks on the channel. Previous
behavior would set the flag on the first MixMonitor audiohook
found.
- ### pbx_dundi: Add PJSIP support.
DUNDi now supports chan_pjsip. Outgoing calls using
PJSIP require the pjsip_outgoing_endpoint option
to be set in dundi.conf.
- ### test.c: Fix counting of tests and add 2 new tests
The "tests" attribute of the "testsuite" element in the
output XML now reflects only the tests actually requested
to be executed instead of all the tests registered.
The "failures" attribute was added to the "testsuite"
element.
Also added two new unit tests that just pass and fail
to be used for testing CI itself.
- ### cli: increase channel column width
This change increases the display width on 'core show channels'
amd 'core show channels verbose'
For 'core show channels', the Channel name field is increased to
64 characters and the Location name field is increased to 32
characters.
For 'core show channels verbose', the Channel name field is
increased to 80 characters, the Context is increased to 24
characters and the Extension is increased to 24 characters.
Upgrade Notes:
----------------------------------------
Closed Issues:
----------------------------------------
- #193: [bug]: third-party/apply-patches doesn't sort the patch file list before applying
Commits By Author:
----------------------------------------
- ### George Joseph (1):
- apply_patches: Sort patch list before applying
- ### Sean Bright (1):
- apply_patches: Use globbing instead of file/sort.
- ### Stanislav Abramenkov (1):
- pjsip: Upgrade bundled version to pjproject 2.13.1
Detail:
----------------------------------------
- ### apply_patches: Use globbing instead of file/sort.
Author: Sean Bright
Date: 2023-07-06
This accomplishes the same thing as a `find ... | sort` but with the
added benefit of clarity and avoiding a call to a subshell.
Additionally drop the -s option from call to patch as it is not POSIX.
- ### apply_patches: Sort patch list before applying
Author: George Joseph
Date: 2023-07-06
The apply_patches script wasn't sorting the list of patches in
the "patches" directory before applying them. This left the list
in an indeterminate order. In most cases, the list is actually
sorted but rarely, they can be out of order and cause dependent
patches to fail to apply.
We now sort the list but the "sort" program wasn't in the
configure scripts so we needed to add that and regenerate
the scripts as well.
Resolves: #193
- ### pjsip: Upgrade bundled version to pjproject 2.13.1
Author: Stanislav Abramenkov
Date: 2023-07-05

View File

@@ -1,854 +0,0 @@
Change Log for Release 20.4.0
========================================
Links:
----------------------------------------
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.4.0.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.3.1...20.4.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.4.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
Summary:
----------------------------------------
- app.h: Move declaration of ast_getdata_result before its first use
- doc: Remove obsolete CHANGES-staging and UPGRADE-staging
- .github: Updates for AsteriskReleaser
- app_voicemail: fix imap compilation errors
- res_musiconhold: avoid moh state access on unlocked chan
- utils: add lock timestamps for DEBUG_THREADS
- .github: Back out triggering PROpenedOrUpdated by label
- .github: Move publish docs to new file CreateDocs.yml
- rest-api: Updates for new documentation site
- .github: Remove result check from PROpenUpdateGateTests
- .github: Fix use of 'contains'
- .github: Add recheck label test to additional jobs
- .github: Fix recheck label typos
- .github: Fix recheck label manipulation
- .github: Allow PR submit checks to be re-run by label
- app_voicemail_imap: Fix message count when IMAP server is unavailable
- res_pjsip_rfc3326: Prefer Q.850 cause code over SIP.
- res_pjsip_session: Added new function calls to avoid ABI issues.
- app_queue: Add force_longest_waiting_caller option.
- pjsip_transport_events.c: Use %zu printf specifier for size_t.
- res_crypto.c: Gracefully handle potential key filename truncation.
- configure: Remove obsolete and deprecated constructs.
- res_fax_spandsp.c: Clean up a spaces/tabs issue
- ast-db-manage: Synchronize revisions between comments and code.
- test_statis_endpoints: Fix channel_messages test again
- res_crypto.c: Avoid using the non-portable ALLPERMS macro.
- tcptls: when disabling a server port, we should set the accept_fd to -1.
- AMI: Add parking position parameter to Park action
- test_stasis_endpoints.c: Make channel_messages more stable
- build: Fix a few gcc 13 issues
- .github: Rework for merge approval
- ast-db-manage: Fix alembic branching error caused by #122.
- app_followme: fix issue with enable_callee_prompt=no (#88)
- sounds: Update download URL to use HTTPS.
- configure: Makefile downloader enable follow redirects.
- res_musiconhold: Add option to loop last file.
- chan_dahdi: Fix Caller ID presentation for FXO ports.
- AMI: Add CoreShowChannelMap action.
- sig_analog: Add fuller Caller ID support.
- res_stasis.c: Add new type 'sdp_label' for bridge creation.
- app_queue: Preserve reason for realtime queues
- .github: Fix issues with cherry-pick-reminder
- indications: logging changes
- .github Ignore error when adding reviewrs to PR
- .github: Update field descriptions for AsteriskReleaser
- callerid: Allow specifying timezone for date/time.
- logrotate: Fix duplicate log entries.
- chan_pjsip: Allow topology/session refreshes in early media state
- chan_dahdi: Fix broken hidecallerid setting.
- .github: Change title of AsteriskReleaser job
- asterisk.c: Fix option warning for remote console.
- .github: Don't add cherry-pick reminder if it's already present
- .github: Fix quoting in PROpenedOrUpdated
- .github: Add cherry-pick reminder to new PRs
- configure: fix test code to match gethostbyname_r prototype.
- res_pjsip_pubsub.c: Use pjsip version for pending NOTIFY check. (#77)
- res_sorcery_memory_cache.c: Fix memory leak
- xml.c: Process XML Inclusions recursively.
- .github: Tweak improvement issue type language.
- .github: Tweak new feature language, and move feature requests elsewhere.
- .github: Fix staleness check to only run on certain labels.
User Notes:
----------------------------------------
- ### AMI: Add parking position parameter to Park action
New ParkingSpace parameter has been added to AMI action Park.
- ### res_musiconhold: Add option to loop last file.
The loop_last option in musiconhold.conf now
allows the last file in the directory to be looped once reached.
- ### AMI: Add CoreShowChannelMap action.
New AMI action CoreShowChannelMap has been added.
- ### sig_analog: Add fuller Caller ID support.
Additional Caller ID properties are now supported on
incoming calls to FXS stations, namely the
redirecting reason and call qualifier.
- ### res_stasis.c: Add new type 'sdp_label' for bridge creation.
When creating a bridge using the ARI the 'type' argument now
accepts a new value 'sdp_label' which will configure the bridge to add
labels for each stream in the SDP with the corresponding channel id.
- ### app_queue: Preserve reason for realtime queues
Make paused reason in realtime queues persist an
Asterisk restart. This was fixed for non-realtime
queues in ASTERISK_25732.
Upgrade Notes:
----------------------------------------
- ### app_queue: Preserve reason for realtime queues
Add a new column to the queue_member table:
reason_paused VARCHAR(80) so the reason can be preserved.
Closed Issues:
----------------------------------------
- #45: [bug]: Non-bundled PJSIP check for evsub pending NOTIFY check is insufficient/ineffective
- #55: [bug]: res_sorcery_memory_cache: Memory leak when calling sorcery_memory_cache_open
- #64: [bug]: app_voicemail_imap wrong behavior when losing IMAP connection
- #65: [bug]: heap overflow by default at startup
- #66: [improvement]: Fix preserve reason of pause when Asterisk is restared for realtime queues
- #73: [new-feature]: pjsip: Allow topology/session refreshes in early media state
- #87: [bug]: app_followme: Setting enable_callee_prompt=no breaks timeout
- #89: [improvement]: indications: logging changes
- #91: [improvement]: Add parameter on ARI bridge create to allow it to send SDP labels
- #94: [new-feature]: sig_analog: Add full Caller ID support for incoming calls
- #96: [bug]: make install-logrotate causes logrotate to fail on service restart
- #98: [new-feature]: callerid: Allow timezone to be specified at runtime
- #100: [bug]: sig_analog: hidecallerid setting is broken
- #102: [bug]: Strange warning - 'T' option is not compatible with remote console mode and has no effect.
- #104: [improvement]: Add AMI action to get a list of connected channels
- #108: [new-feature]: fair handling of calls in multi-queue scenarios
- #110: [improvement]: utils - add lock timing information with DEBUG_THREADS
- #116: [bug]: SIP Reason: "Call completed elsewhere" no longer propagating
- #120: [bug]: chan_dahdi: Fix broken presentation for FXO caller ID
- #122: [new-feature]: res_musiconhold: Add looplast option
- #133: [bug]: unlock channel after moh state access
- #136: [bug]: Makefile downloader does not follow redirects.
- #145: [bug]: ABI issue with pjproject and pjsip_inv_session
- #155: [bug]: GCC 13 is catching a few new trivial issues
- #158: [bug]: test_stasis_endpoints.c: Unit test channel_messages is unstable
- #174: [bug]: app_voicemail imap compile errors
- #200: [bug]: Regression: In app.h an enum is used before its declaration.
Commits By Author:
----------------------------------------
- ### Asterisk Development Team (2):
- Update for 20.4.0-rc1
- Update for 20.4.0-rc2
- ### Ben Ford (2):
- AMI: Add CoreShowChannelMap action.
- res_pjsip_session: Added new function calls to avoid ABI issues.
- ### George Joseph (23):
- .github: Add cherry-pick reminder to new PRs
- .github: Fix quoting in PROpenedOrUpdated
- .github: Don't add cherry-pick reminder if it's already present
- .github: Change title of AsteriskReleaser job
- .github: Update field descriptions for AsteriskReleaser
- .github Ignore error when adding reviewrs to PR
- .github: Fix issues with cherry-pick-reminder
- .github: Rework for merge approval
- build: Fix a few gcc 13 issues
- test_stasis_endpoints.c: Make channel_messages more stable
- test_statis_endpoints: Fix channel_messages test again
- .github: Allow PR submit checks to be re-run by label
- .github: Fix recheck label manipulation
- .github: Fix recheck label typos
- .github: Add recheck label test to additional jobs
- .github: Fix use of 'contains'
- .github: Remove result check from PROpenUpdateGateTests
- rest-api: Updates for new documentation site
- .github: Move publish docs to new file CreateDocs.yml
- .github: Back out triggering PROpenedOrUpdated by label
- .github: Updates for AsteriskReleaser
- doc: Remove obsolete CHANGES-staging and UPGRADE-staging
- app.h: Move declaration of ast_getdata_result before its first use
- ### Gitea (1):
- .github: Tweak new feature language, and move feature requests elsewhere.
- ### Jaco Kroon (2):
- configure: fix test code to match gethostbyname_r prototype.
- tcptls: when disabling a server port, we should set the accept_fd to -1.
- ### Jiajian Zhou (1):
- AMI: Add parking position parameter to Park action
- ### Joe Searle (1):
- res_stasis.c: Add new type 'sdp_label' for bridge creation.
- ### Joshua C. Colp (2):
- .github: Fix staleness check to only run on certain labels.
- .github: Tweak improvement issue type language.
- ### Maximilian Fridrich (1):
- chan_pjsip: Allow topology/session refreshes in early media state
- ### Miguel Angel Nubla (1):
- configure: Makefile downloader enable follow redirects.
- ### Mike Bradeen (4):
- indications: logging changes
- utils: add lock timestamps for DEBUG_THREADS
- res_musiconhold: avoid moh state access on unlocked chan
- app_voicemail: fix imap compilation errors
- ### Nathan Bruning (1):
- app_queue: Add force_longest_waiting_caller option.
- ### Naveen Albert (7):
- asterisk.c: Fix option warning for remote console.
- chan_dahdi: Fix broken hidecallerid setting.
- logrotate: Fix duplicate log entries.
- callerid: Allow specifying timezone for date/time.
- sig_analog: Add fuller Caller ID support.
- chan_dahdi: Fix Caller ID presentation for FXO ports.
- res_musiconhold: Add option to loop last file.
- ### Niklas Larsson (1):
- app_queue: Preserve reason for realtime queues
- ### Olaf Titz (1):
- app_voicemail_imap: Fix message count when IMAP server is unavailable
- ### Sean Bright (10):
- xml.c: Process XML Inclusions recursively.
- res_pjsip_pubsub.c: Use pjsip version for pending NOTIFY check. (#77)
- sounds: Update download URL to use HTTPS.
- ast-db-manage: Fix alembic branching error caused by #122.
- res_crypto.c: Avoid using the non-portable ALLPERMS macro.
- ast-db-manage: Synchronize revisions between comments and code.
- configure: Remove obsolete and deprecated constructs.
- res_crypto.c: Gracefully handle potential key filename truncation.
- pjsip_transport_events.c: Use %zu printf specifier for size_t.
- res_pjsip_rfc3326: Prefer Q.850 cause code over SIP.
- ### alex2grad (1):
- app_followme: fix issue with enable_callee_prompt=no (#88)
- ### zhengsh (1):
- res_sorcery_memory_cache.c: Fix memory leak
- ### zhou_jiajian (1):
- res_fax_spandsp.c: Clean up a spaces/tabs issue
Detail:
----------------------------------------
- ### app.h: Move declaration of ast_getdata_result before its first use
Author: George Joseph
Date: 2023-07-10
The ast_app_getdata() and ast_app_getdata_terminator() declarations
in app.h were changed recently to return enum ast_getdata_result
(which is how they were defined in app.c). The existing
declaration of ast_getdata_result in app.h was about 1000 lines
after those functions however so under certain circumstances,
a "use before declaration" error was thrown by the compiler.
The declaration of the enum was therefore moved to before those
functions.
Resolves: #200
- ### doc: Remove obsolete CHANGES-staging and UPGRADE-staging
Author: George Joseph
Date: 2023-07-10
- ### .github: Updates for AsteriskReleaser
Author: George Joseph
Date: 2023-06-30
- ### app_voicemail: fix imap compilation errors
Author: Mike Bradeen
Date: 2023-06-26
Fixes two compilation errors in app_voicemail_imap, one due to an unsed
variable and one due to a new variable added in the incorrect location
in _163.
Resolves: #174
- ### res_musiconhold: avoid moh state access on unlocked chan
Author: Mike Bradeen
Date: 2023-05-31
Move channel unlock to after moh state access to avoid
potential unlocked access to state.
Resolves: #133
- ### utils: add lock timestamps for DEBUG_THREADS
Author: Mike Bradeen
Date: 2023-05-23
Adds last locked and unlocked timestamps as well as a
counter for the number of times the lock has been
attempted (vs locked/unlocked) to debug output printed
using the DEBUG_THREADS option.
Resolves: #110
- ### .github: Back out triggering PROpenedOrUpdated by label
Author: George Joseph
Date: 2023-06-29
- ### .github: Move publish docs to new file CreateDocs.yml
Author: George Joseph
Date: 2023-06-27
- ### rest-api: Updates for new documentation site
Author: George Joseph
Date: 2023-06-26
The new documentation site uses traditional markdown instead
of the Confluence flavored version. This required changes in
the mustache templates and the python that generates the files.
- ### .github: Remove result check from PROpenUpdateGateTests
Author: George Joseph
Date: 2023-06-27
- ### .github: Fix use of 'contains'
Author: George Joseph
Date: 2023-06-26
- ### .github: Add recheck label test to additional jobs
Author: George Joseph
Date: 2023-06-26
- ### .github: Fix recheck label typos
Author: George Joseph
Date: 2023-06-26
- ### .github: Fix recheck label manipulation
Author: George Joseph
Date: 2023-06-26
- ### .github: Allow PR submit checks to be re-run by label
Author: George Joseph
Date: 2023-06-26
- ### app_voicemail_imap: Fix message count when IMAP server is unavailable
Author: Olaf Titz
Date: 2023-06-15
Some callers of __messagecount did not correctly handle error return,
instead returning a -1 message count.
This caused a notification with "Messages-Waiting: yes" and
"Voice-Message: -1/0 (0/0)" if the IMAP server was unavailable.
Fixes: #64
- ### res_pjsip_rfc3326: Prefer Q.850 cause code over SIP.
Author: Sean Bright
Date: 2023-06-12
Resolves: #116
- ### res_pjsip_session: Added new function calls to avoid ABI issues.
Author: Ben Ford
Date: 2023-06-05
Added two new functions (ast_sip_session_get_dialog and
ast_sip_session_get_pjsip_inv_state) that retrieve the dialog and the
pjsip_inv_state respectively from the pjsip_inv_session on the
ast_sip_session struct. This is due to pjproject adding a new field to
the pjsip_inv_session struct that caused crashes when trying to access
fields that were no longer where they were expected to be if a module
was compiled against a different version of pjproject.
Resolves: #145
- ### app_queue: Add force_longest_waiting_caller option.
Author: Nathan Bruning
Date: 2023-01-24
This adds an option 'force_longest_waiting_caller' which changes the
global behavior of the queue engine to prevent queue callers from
'jumping ahead' when an agent is in multiple queues.
Resolves: #108
Also closes old asterisk issues:
- ASTERISK-17732
- ASTERISK-17570
- ### pjsip_transport_events.c: Use %zu printf specifier for size_t.
Author: Sean Bright
Date: 2023-06-05
Partially resolves #143.
- ### res_crypto.c: Gracefully handle potential key filename truncation.
Author: Sean Bright
Date: 2023-06-05
Partially resolves #143.
- ### configure: Remove obsolete and deprecated constructs.
Author: Sean Bright
Date: 2023-06-01
These were uncovered when trying to run `bootstrap.sh` with Autoconf
2.71:
* AC_CONFIG_HEADER() is deprecated in favor of AC_CONFIG_HEADERS().
* AC_HEADER_TIME is obsolete.
* $as_echo is deprecated in favor of AS_ECHO() which requires an update
to ax_pthread.m4.
Note that the generated artifacts in this commit are from Autoconf 2.69.
Resolves #139
- ### res_fax_spandsp.c: Clean up a spaces/tabs issue
Author: zhou_jiajian
Date: 2023-05-26
- ### ast-db-manage: Synchronize revisions between comments and code.
Author: Sean Bright
Date: 2023-06-06
In a handful of migrations, the comment header that indicates the
current and previous revisions has drifted from the identifiers
revision and down_revision variables. This updates the comment headers
to match the code.
- ### test_statis_endpoints: Fix channel_messages test again
Author: George Joseph
Date: 2023-06-12
- ### res_crypto.c: Avoid using the non-portable ALLPERMS macro.
Author: Sean Bright
Date: 2023-06-05
ALLPERMS is not POSIX and it's trivial enough to not jump through
autoconf hoops to check for it.
Fixes #149.
- ### tcptls: when disabling a server port, we should set the accept_fd to -1.
Author: Jaco Kroon
Date: 2023-06-02
If we don't set this to -1 if the structure can be potentially re-used
later then it's possible that we'll issue a close() on an unrelated file
descriptor, breaking asterisk in other interesting ways.
I believe this to be an unlikely scenario, but it costs nothing to be
safe.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
- ### AMI: Add parking position parameter to Park action
Author: Jiajian Zhou
Date: 2023-05-19
Add a parking space extension parameter (ParkingSpace) to the Park action.
Park action will attempt to park the call to that extension.
If the extension is already in use, then execution will continue at the next priority.
UserNote: New ParkingSpace parameter has been added to AMI action Park.
- ### test_stasis_endpoints.c: Make channel_messages more stable
Author: George Joseph
Date: 2023-06-09
The channel_messages test was assuming that stasis would return
messages in a specific order. This is an incorrect assumption as
message ordering was never guaranteed. This was causing the test
to fail occasionally. We now test all the messages for the
required message types instead of testing one by one.
Resolves: #158
- ### build: Fix a few gcc 13 issues
Author: George Joseph
Date: 2023-06-09
* gcc 13 is now catching when a function is declared as returning
an enum but defined as returning an int or vice versa. Fixed
a few in app.h, loader.c, stasis_message.c.
* gcc 13 is also now (incorrectly) complaining of dangling pointers
when assigning a pointer to a local char array to a char *. Had
to change that to an ast_alloca.
Resolves: #155
- ### .github: Rework for merge approval
Author: George Joseph
Date: 2023-06-06
- ### ast-db-manage: Fix alembic branching error caused by #122.
Author: Sean Bright
Date: 2023-06-05
Fixes #147.
- ### app_followme: fix issue with enable_callee_prompt=no (#88)
Author: alex2grad
Date: 2023-06-05
* app_followme: fix issue with enable_callee_prompt=no
If the FollowMe option 'enable_callee_prompt' is set to 'no' then Asterisk
incorrectly sets a winner channel to the channel from which any control frame was read.
This fix sets the winner channel only to the answered channel.
Resolves: #87
ASTERISK-30326
- ### sounds: Update download URL to use HTTPS.
Author: Sean Bright
Date: 2023-06-01
Related to #136
- ### configure: Makefile downloader enable follow redirects.
Author: Miguel Angel Nubla
Date: 2023-06-01
If curl is used for building, any download such as a sounds package
will fail to follow HTTP redirects and will download wrong data.
Resolves: #136
- ### res_musiconhold: Add option to loop last file.
Author: Naveen Albert
Date: 2023-05-25
Adds the loop_last option to res_musiconhold,
which allows the last audio file in the directory
to be looped perpetually once reached, rather than
circling back to the beginning again.
Resolves: #122
ASTERISK-30462
UserNote: The loop_last option in musiconhold.conf now
allows the last file in the directory to be looped once reached.
- ### chan_dahdi: Fix Caller ID presentation for FXO ports.
Author: Naveen Albert
Date: 2023-05-25
Currently, the presentation for incoming channels is
always available, because it is never actually set,
meaning the channel presentation can be nonsensical.
If the presentation from the incoming Caller ID spill
is private or unavailable, we now update the channel
presentation to reflect this.
Resolves: #120
ASTERISK-30333
ASTERISK-21741
- ### AMI: Add CoreShowChannelMap action.
Author: Ben Ford
Date: 2023-05-18
Adds a new AMI action (CoreShowChannelMap) that takes in a channel name
and provides a list of all channels that are connected to that channel,
following local channel connections as well.
Resolves: #104
UserNote: New AMI action CoreShowChannelMap has been added.
- ### sig_analog: Add fuller Caller ID support.
Author: Naveen Albert
Date: 2023-05-18
A previous change, ASTERISK_29991, made it possible
to send additional Caller ID parameters that were
not previously supported.
This change adds support for analog DAHDI channels
to now be able to receive these parameters for
on-hook Caller ID, in order to enhance the usability
of CPE that support these parameters.
Resolves: #94
ASTERISK-30331
UserNote: Additional Caller ID properties are now supported on
incoming calls to FXS stations, namely the
redirecting reason and call qualifier.
- ### res_stasis.c: Add new type 'sdp_label' for bridge creation.
Author: Joe Searle
Date: 2023-05-25
Add new type 'sdp_label' when creating a bridge using the ARI. This will
add labels to the SDP for each stream, the label is set to the
corresponding channel id.
Resolves: #91
UserNote: When creating a bridge using the ARI the 'type' argument now
accepts a new value 'sdp_label' which will configure the bridge to add
labels for each stream in the SDP with the corresponding channel id.
- ### app_queue: Preserve reason for realtime queues
Author: Niklas Larsson
Date: 2023-05-05
When Asterisk is restarted it does not preserve paused reason for
members of realtime queues. This was fixed for non-realtime queues in
ASTERISK_25732
Resolves: #66
UpgradeNote: Add a new column to the queue_member table:
reason_paused VARCHAR(80) so the reason can be preserved.
UserNote: Make paused reason in realtime queues persist an
Asterisk restart. This was fixed for non-realtime
queues in ASTERISK_25732.
- ### .github: Fix issues with cherry-pick-reminder
Author: George Joseph
Date: 2023-06-05
- ### indications: logging changes
Author: Mike Bradeen
Date: 2023-05-16
Increase verbosity to indicate failure due to missing country
and to specify default on CLI dump
Resolves: #89
- ### .github Ignore error when adding reviewrs to PR
Author: George Joseph
Date: 2023-06-05
- ### .github: Update field descriptions for AsteriskReleaser
Author: George Joseph
Date: 2023-05-26
- ### callerid: Allow specifying timezone for date/time.
Author: Naveen Albert
Date: 2023-05-18
The Caller ID generation routine currently is hardcoded
to always use the system time zone. This makes it possible
to optionally specify any TZ-format time zone.
Resolves: #98
ASTERISK-30330
- ### logrotate: Fix duplicate log entries.
Author: Naveen Albert
Date: 2023-05-18
The Asterisk logrotate script contains explicit
references to files with the .log extension,
which are also included when *log is expanded.
This causes issues with newer versions of logrotate.
This fixes this by ensuring that a log file cannot
be referenced multiple times after expansion occurs.
Resolves: #96
ASTERISK-30442
Reported by: EN Barnett
Tested by: EN Barnett
- ### chan_pjsip: Allow topology/session refreshes in early media state
Author: Maximilian Fridrich
Date: 2023-05-10
With this change, session modifications in the early media state are
possible if the SDP was sent reliably and confirmed by a PRACK. For
details, see RFC 6337, escpecially section 3.2.
Resolves: #73
- ### chan_dahdi: Fix broken hidecallerid setting.
Author: Naveen Albert
Date: 2023-05-18
The hidecallerid setting in chan_dahdi.conf currently
is broken for a couple reasons.
First, the actual code in sig_analog to "allow" or "block"
Caller ID depending on this setting improperly used
ast_set_callerid instead of updating the presentation.
This issue was mostly fixed in ASTERISK_29991, and that
fix is carried forward to this code as well.
Secondly, the hidecallerid setting is set on the DAHDI
pvt but not carried forward to the analog pvt properly.
This is because the chan_dahdi config loading code improperly
set permhidecallerid to permhidecallerid from the config file,
even though hidecallerid is what is actually set from the config
file. (This is done correctly for call waiting, a few lines above.)
This is fixed to read the proper value.
Thirdly, in sig_analog, hidecallerid is set to permhidecallerid
only on hangup. This can lead to potential security vulnerabilities
as an allowed Caller ID from an initial call can "leak" into subsequent
calls if no hangup occurs between them. This is fixed by setting
hidecallerid to permcallerid when calls begin, rather than when they end.
This also means we don't need to also set hidecallerid in chan_dahdi.c
when copying from the config, as we would have to otherwise.
Fourthly, sig_analog currently only allows dialing *67 or *82 if
that would actually toggle the presentation. A comment is added
clarifying that this behavior is okay.
Finally, a couple log messages are updated to be more accurate.
Resolves: #100
ASTERISK-30349 #close
- ### .github: Change title of AsteriskReleaser job
Author: George Joseph
Date: 2023-05-23
- ### asterisk.c: Fix option warning for remote console.
Author: Naveen Albert
Date: 2023-05-18
Commit 09e989f972e2583df4e9bf585c246c37322d8d2f
categorized the T option as not being compatible
with remote consoles, but they do affect verbose
messages with remote console. This fixes this.
Resolves: #102
- ### .github: Don't add cherry-pick reminder if it's already present
Author: George Joseph
Date: 2023-05-22
- ### .github: Fix quoting in PROpenedOrUpdated
Author: George Joseph
Date: 2023-05-16
- ### .github: Add cherry-pick reminder to new PRs
Author: George Joseph
Date: 2023-05-15
- ### configure: fix test code to match gethostbyname_r prototype.
Author: Jaco Kroon
Date: 2023-05-10
This enables the test to work with CC=clang.
Without this the test for 6 args would fail with:
utils.c:99:12: error: static declaration of 'gethostbyname_r' follows non-static declaration
static int gethostbyname_r (const char *name, struct hostent *ret, char *buf,
^
/usr/include/netdb.h:177:12: note: previous declaration is here
extern int gethostbyname_r (const char *__restrict __name,
^
Fixing the expected return type to int sorts this out.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
- ### res_pjsip_pubsub.c: Use pjsip version for pending NOTIFY check. (#77)
Author: Sean Bright
Date: 2023-05-11
The functionality we are interested in is present only in pjsip 2.13
and newer.
Resolves: #45
- ### res_sorcery_memory_cache.c: Fix memory leak
Author: zhengsh
Date: 2023-05-03
Replace the original call to ast_strdup with a call to ast_strdupa to fix the leak issue.
Resolves: #55
ASTERISK-30429
- ### xml.c: Process XML Inclusions recursively.
Author: Sean Bright
Date: 2023-05-09
If processing an XInclude results in new <xi:include> elements, we
need to run XInclude processing again. This continues until no
replacement occurs or an error is encountered.
There is a separate issue with dynamic strings (ast_str) that will be
addressed separately.
Resolves: #65
- ### .github: Tweak improvement issue type language.
Author: Joshua C. Colp
Date: 2023-05-09
- ### .github: Tweak new feature language, and move feature requests elsewhere.
Author: Gitea
Date: 2023-05-09
- ### .github: Fix staleness check to only run on certain labels.
Author: Joshua C. Colp
Date: 2023-05-09

View File

@@ -1,748 +0,0 @@
Change Log for Release asterisk-20.5.0
========================================
Links:
----------------------------------------
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.5.0.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.4.0...20.5.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.5.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
Summary:
----------------------------------------
- ari-stubs: Fix more local anchor references
- ari-stubs: Fix more local anchor references
- ari-stubs: Fix broken documentation anchors
- res_pjsip_session: Send Session Interval too small response
- .github: Update workflow-application-token-action to v2
- app_dial: Fix infinite loop when sending digits.
- app_voicemail: Fix for loop declarations
- alembic: Fix quoting of the 100rel column
- pbx.c: Fix gcc 12 compiler warning.
- app_audiosocket: Fixed timeout with -1 to avoid busy loop.
- download_externals: Fix a few version related issues
- main/refer.c: Fix double free in refer_data_destructor + potential leak
- sig_analog: Add Called Subscriber Held capability.
- app_macro: Fix locking around datastore access
- Revert "app_stack: Print proper exit location for PBXless channels."
- .github: Use generic releaser
- install_prereq: Fix dependency install on aarch64.
- res_pjsip.c: Set contact_user on incoming call local Contact header
- extconfig: Allow explicit DB result set ordering to be disabled.
- rest-api: Run make ari-stubs
- res_pjsip_header_funcs: Make prefix argument optional.
- pjproject_bundled: Increase PJSIP_MAX_MODULE to 38
- manager: Tolerate stasis messages with no channel snapshot.
- core/ari/pjsip: Add refer mechanism
- chan_dahdi: Allow autoreoriginating after hangup.
- audiohook: Unlock channel in mute if no audiohooks present.
- sig_analog: Allow three-way flash to time out to silence.
- res_prometheus: Do not generate broken metrics
- res_pjsip: Enable TLS v1.3 if present.
- func_cut: Add example to documentation.
- extensions.conf.sample: Remove reference to missing context.
- func_export: Use correct function argument as variable name.
- app_queue: Add support for applying caller priority change immediately.
- .github: Fix cherry-pick reminder issues
- chan_iax2.c: Avoid crash with IAX2 switch support.
- res_geolocation: Ensure required 'location_info' is present.
- Adds manager actions to allow move/remove/forward individual messages in a particular mailbox folder. The forward command can be used to copy a message within a mailbox or to another mailbox. Also adds a VoicemailBoxSummarry, required to retrieve message ID's.
- app_voicemail: add CLI commands for message manipulation
- res_rtp_asterisk: Move ast_rtp_rtcp_report_alloc using `rtp->themssrc_valid` into the scope of the rtp_instance lock.
- .github: Minor tweak to Asterisk Releaser
- .github: Suppress cherry-pick reminder for some situations
- sig_analog: Allow immediate fake ring to be suppressed.
User Notes:
----------------------------------------
- ### sig_analog: Add Called Subscriber Held capability.
Called Subscriber Held is now supported for analog
FXS channels, using the calledsubscriberheld option. This allows
a station user to go on hook when receiving an incoming call
and resume from another phone on the same line by going on hook,
without disconnecting the call.
- ### res_pjsip_header_funcs: Make prefix argument optional.
The prefix argument to PJSIP_HEADERS is now
optional. If not specified, all header names will be
returned.
- ### core/ari/pjsip: Add refer mechanism
There is a new ARI endpoint `/endpoints/refer` for referring
an endpoint to some URI or endpoint.
- ### chan_dahdi: Allow autoreoriginating after hangup.
The autoreoriginate setting now allows for kewlstart FXS
channels to automatically reoriginate and provide dial tone to the
user again after all calls on the line have cleared. This saves users
from having to manually hang up and pick up the receiver again before
making another call.
- ### sig_analog: Allow three-way flash to time out to silence.
The threewaysilenthold option now allows the three-way
dial tone to time out to silence, rather than continuing forever.
- ### res_pjsip: Enable TLS v1.3 if present.
res_pjsip now allows TLS v1.3 to be enabled if supported by
the underlying PJSIP library. The bundled version of PJSIP supports
TLS v1.3.
- ### app_queue: Add support for applying caller priority change immediately.
The 'queue priority caller' CLI command and
'QueueChangePriorityCaller' AMI action now have an 'immediate'
argument which allows the caller priority change to be reflected
immediately, causing the position of a caller to move within the
queue depending on the priorities of the other callers.
- ### Adds manager actions to allow move/remove/forward individual messages in a particular mailbox folder. The forward command can be used to copy a message within a mailbox or to another mailbox. Also adds a VoicemailBoxSummarry, required to retrieve message ID's.
The following manager actions have been added
VoicemailBoxSummary - Generate message list for a given mailbox
VoicemailRemove - Remove a message from a mailbox folder
VoicemailMove - Move a message from one folder to another within a mailbox
VoicemailForward - Copy a message from one folder in one mailbox
to another folder in another or the same mailbox.
- ### app_voicemail: add CLI commands for message manipulation
The following CLI commands have been added to app_voicemail
voicemail show mailbox <mailbox> <context>
Show contents of mailbox <mailbox>@<context>
voicemail remove <mailbox> <context> <from_folder> <messageid>
Remove message <messageid> from <from_folder> in mailbox <mailbox>@<context>
voicemail move <mailbox> <context> <from_folder> <messageid> <to_folder>
Move message <messageid> in mailbox <mailbox>&<context> from <from_folder> to <to_folder>
voicemail forward <from_mailbox> <from_context> <from_folder> <messageid> <to_mailbox> <to_context> <to_folder>
Forward message <messageid> in mailbox <mailbox>@<context> <from_folder> to
mailbox <mailbox>@<context> <to_folder>
- ### sig_analog: Allow immediate fake ring to be suppressed.
The immediatering option can now be set to no to suppress
the fake audible ringback provided when immediate=yes on FXS channels.
Upgrade Notes:
----------------------------------------
Closed Issues:
----------------------------------------
- #37: [Bug]: contrib/scripts/install_prereq tries to install armhf packages on aarch64 Debian platforms
- #71: [new-feature]: core/ari/pjsip: Add refer mechanism to refer endpoints to some resource
- #118: [new-feature]: chan_dahdi: Allow fake ringing to be inhibited when immediate=yes
- #170: [improvement]: app_voicemail - add CLI commands to manipulate messages
- #179: [bug]: Queue strategy “Linear” with Asterisk 20 on Realtime
- #181: [improvement]: app_voicemail - add manager actions to display and manipulate messages
- #202: [improvement]: app_queue: Add support for immediately applying queue caller priority change
- #205: [new-feature]: sig_analog: Allow flash to time out to silent hold
- #224: [new-feature]: chan_dahdi: Allow automatic reorigination on hangup
- #226: [improvement]: Apply contact_user to incoming calls
- #230: [bug]: PJSIP_RESPONSE_HEADERS function documentation is misleading
- #233: [bug]: Deadlock with MixMonitorMute AMI action
- #240: [new-feature]: sig_analog: Add Called Subscriber Held capability
- #253: app_gosub patch appear to have broken predial handlers that utilize macros that call gosubs
- #255: [bug]: pjsip_endpt_register_module: Assertion "Too many modules registered"
- #263: [bug]: download_externals doesn't always handle versions correctly
- #265: [bug]: app_macro isn't locking around channel datastore access
- #267: [bug]: ari: refer with display_name key in request body leads to crash
- #274: [bug]: Syntax Error in SQL Code
- #275: [bug]:Asterisk make now requires ASTCFLAGS='-std=gnu99 -Wdeclaration-after-statement'
- #277: [bug]: pbx.c: Compiler error with gcc 12.2
- #281: [bug]: app_dial: Infinite loop if called channel hangs up while receiving digits
Commits By Author:
----------------------------------------
- ### Asterisk Development Team (1):
- Update for 20.5.0-rc1
- ### Bastian Triller (1):
- res_pjsip_session: Send Session Interval too small response
- ### George Joseph (12):
- .github: Suppress cherry-pick reminder for some situations
- .github: Minor tweak to Asterisk Releaser
- .github: Fix cherry-pick reminder issues
- pjproject_bundled: Increase PJSIP_MAX_MODULE to 38
- rest-api: Run make ari-stubs
- .github: Use generic releaser
- download_externals: Fix a few version related issues
- alembic: Fix quoting of the 100rel column
- .github: Update workflow-application-token-action to v2
- ari-stubs: Fix broken documentation anchors
- ari-stubs: Fix more local anchor references
- ari-stubs: Fix more local anchor references
- ### Holger Hans Peter Freyther (1):
- res_prometheus: Do not generate broken metrics
- ### Jason D. McCormick (1):
- install_prereq: Fix dependency install on aarch64.
- ### Joshua C. Colp (3):
- app_queue: Add support for applying caller priority change immediately.
- audiohook: Unlock channel in mute if no audiohooks present.
- manager: Tolerate stasis messages with no channel snapshot.
- ### Matthew Fredrickson (2):
- Revert "app_stack: Print proper exit location for PBXless channels."
- app_macro: Fix locking around datastore access
- ### Maximilian Fridrich (2):
- core/ari/pjsip: Add refer mechanism
- main/refer.c: Fix double free in refer_data_destructor + potential leak
- ### Mike Bradeen (3):
- app_voicemail: add CLI commands for message manipulation
- Adds manager actions to allow move/remove/forward individual messages in a particular mailbox folder. The forward command can be used to copy a message within a mailbox or to another mailbox. Also adds a VoicemailBoxSummarry, required to retrieve message ID's.
- app_voicemail: Fix for loop declarations
- ### MikeNaso (1):
- res_pjsip.c: Set contact_user on incoming call local Contact header
- ### Naveen Albert (7):
- sig_analog: Allow immediate fake ring to be suppressed.
- sig_analog: Allow three-way flash to time out to silence.
- chan_dahdi: Allow autoreoriginating after hangup.
- res_pjsip_header_funcs: Make prefix argument optional.
- sig_analog: Add Called Subscriber Held capability.
- pbx.c: Fix gcc 12 compiler warning.
- app_dial: Fix infinite loop when sending digits.
- ### Sean Bright (6):
- res_geolocation: Ensure required 'location_info' is present.
- chan_iax2.c: Avoid crash with IAX2 switch support.
- func_export: Use correct function argument as variable name.
- extensions.conf.sample: Remove reference to missing context.
- res_pjsip: Enable TLS v1.3 if present.
- extconfig: Allow explicit DB result set ordering to be disabled.
- ### phoneben (1):
- func_cut: Add example to documentation.
- ### zhengsh (2):
- res_rtp_asterisk: Move ast_rtp_rtcp_report_alloc using `rtp->themssrc_valid` into the scope of the rtp_instance lock.
- app_audiosocket: Fixed timeout with -1 to avoid busy loop.
Detail:
----------------------------------------
- ### ari-stubs: Fix more local anchor references
Author: George Joseph
Date: 2023-09-05
Also allow CreateDocs job to be run manually with default branches.
- ### ari-stubs: Fix more local anchor references
Author: George Joseph
Date: 2023-09-05
Also allow CreateDocs job to be run manually with default branches.
- ### ari-stubs: Fix broken documentation anchors
Author: George Joseph
Date: 2023-09-05
All of the links that reference page anchors with capital letters in
the ids (#Something) have been changed to lower case to match the
anchors that are generated by mkdocs.
- ### res_pjsip_session: Send Session Interval too small response
Author: Bastian Triller
Date: 2023-08-28
Handle session interval lower than endpoint's configured minimum timer
when sending first answer. Timer setting is checked during this step and
needs to handled appropriately.
Before this change, no response was sent at all. After this change a
response with 422 Session Interval too small is sent to UAC.
- ### .github: Update workflow-application-token-action to v2
Author: George Joseph
Date: 2023-08-31
- ### app_dial: Fix infinite loop when sending digits.
Author: Naveen Albert
Date: 2023-08-28
If the called party hangs up while digits are being
sent, -1 is returned to indicate so, but app_dial
was not checking the return value, resulting in
the hangup being lost and looping forever until
the caller manually hangs up the channel. We now
abort if digit sending fails.
ASTERISK-29428 #close
Resolves: #281
- ### app_voicemail: Fix for loop declarations
Author: Mike Bradeen
Date: 2023-08-29
Resolve for loop initial declarations added in cli changes.
Resolves: #275
- ### alembic: Fix quoting of the 100rel column
Author: George Joseph
Date: 2023-08-28
Add quoting around the ps_endpoints 100rel column in the ALTER
statements. Although alembic doesn't complain when generating
sql statements, postgresql does (rightly so).
Resolves: #274
- ### pbx.c: Fix gcc 12 compiler warning.
Author: Naveen Albert
Date: 2023-08-27
Resolves: #277
- ### app_audiosocket: Fixed timeout with -1 to avoid busy loop.
Author: zhengsh
Date: 2023-08-24
Resolves: asterisk#234
- ### download_externals: Fix a few version related issues
Author: George Joseph
Date: 2023-08-18
* Fixed issue with the script not parsing the new tag format for
certified releases. The format changed from certified/18.9-cert5
to certified-18.9-cert5.
* Fixed issue where the asterisk version wasn't being considered
when looking for cached versions.
Resolves: #263
- ### main/refer.c: Fix double free in refer_data_destructor + potential leak
Author: Maximilian Fridrich
Date: 2023-08-21
Resolves: #267
- ### sig_analog: Add Called Subscriber Held capability.
Author: Naveen Albert
Date: 2023-08-09
This adds support for Called Subscriber Held for FXS
lines, which allows users to go on hook when receiving
a call and resume the call later from another phone on
the same line, without disconnecting the call. This is
a convenience mechanism that most real PSTN telephone
switches support.
ASTERISK-30372 #close
Resolves: #240
UserNote: Called Subscriber Held is now supported for analog
FXS channels, using the calledsubscriberheld option. This allows
a station user to go on hook when receiving an incoming call
and resume from another phone on the same line by going on hook,
without disconnecting the call.
- ### app_macro: Fix locking around datastore access
Author: Matthew Fredrickson
Date: 2023-08-21
app_macro sometimes would crash due to datastore list corruption on the
channel because of lack of locking around find and create process for
the macro datastore. This patch locks the channel lock prior to protect
against this problem.
Resolves: #265
- ### Revert "app_stack: Print proper exit location for PBXless channels."
Author: Matthew Fredrickson
Date: 2023-08-10
This reverts commit 617dad4cba1513dddce87b8e95a61415fb587cf1.
apps/app_stack.c: Revert buggy gosub patch
This seems to break the case when a predial macro calls a gosub.
When the gosub calls return, the Return function outputs:
app_stack.c:423 return_exec: Return without Gosub: stack is empty
This returns -1 to the calling macro, which returns to app_dial
and causes the call to hangup instead of proceeding with the macro
that invoked the gosub.
Resolves: #253
- ### .github: Use generic releaser
Author: George Joseph
Date: 2023-08-15
- ### install_prereq: Fix dependency install on aarch64.
Author: Jason D. McCormick
Date: 2023-04-28
Fixes dependency solutions in install_prereq for Debian aarch64
platforms. install_prereq was attempting to forcibly install 32-bit
armhf packages due to the aptitude search for dependencies.
Resolves: #37
- ### res_pjsip.c: Set contact_user on incoming call local Contact header
Author: MikeNaso
Date: 2023-08-08
If the contact_user is configured on the endpoint it will now be set on the local Contact header URI for incoming calls. The contact_user has already been set on the local Contact header URI for outgoing calls.
Resolves: #226
- ### extconfig: Allow explicit DB result set ordering to be disabled.
Author: Sean Bright
Date: 2023-07-12
Added a new boolean configuration flag -
`order_multi_row_results_by_initial_column` - to both res_pgsql.conf
and res_config_odbc.conf that allows the administrator to disable the
explicit `ORDER BY` that was previously being added to all generated
SQL statements that returned multiple rows.
Fixes: #179
- ### rest-api: Run make ari-stubs
Author: George Joseph
Date: 2023-08-09
An earlier cherry-pick that involved rest-api somehow didn't include
a comment change in res/ari/resource_endpoints.h. This commit
corrects that. No changes other than the comment.
- ### res_pjsip_header_funcs: Make prefix argument optional.
Author: Naveen Albert
Date: 2023-08-09
The documentation for PJSIP_HEADERS claims that
prefix is optional, but in the code it is actually not.
However, there is no inherent reason for this, as users
may want to retrieve all header names, not just those
beginning with a certain prefix.
This makes the prefix optional for this function,
simply fetching all header names if not specified.
As a result, the documentation is now correct.
Resolves: #230
UserNote: The prefix argument to PJSIP_HEADERS is now
optional. If not specified, all header names will be
returned.
- ### pjproject_bundled: Increase PJSIP_MAX_MODULE to 38
Author: George Joseph
Date: 2023-08-11
The default is 32 with 8 being used by pjproject itself. Recent
commits have put us over the limit resulting in assertions in
pjproject. Since this value is used in invites, dialogs,
transports and subscriptions as well as the global pjproject
endpoint, we don't want to increase it too much.
Resolves: #255
- ### manager: Tolerate stasis messages with no channel snapshot.
Author: Joshua C. Colp
Date: 2023-08-09
In some cases I have yet to determine some stasis messages may
be created without a channel snapshot. This change adds some
tolerance to this scenario, preventing a crash from occurring.
- ### core/ari/pjsip: Add refer mechanism
Author: Maximilian Fridrich
Date: 2023-05-10
This change adds support for refers that are not session based. It
includes a refer implementation for the PJSIP technology which results
in out-of-dialog REFERs being sent to a PJSIP endpoint. These can be
triggered using the new ARI endpoint `/endpoints/refer`.
Resolves: #71
UserNote: There is a new ARI endpoint `/endpoints/refer` for referring
an endpoint to some URI or endpoint.
- ### chan_dahdi: Allow autoreoriginating after hangup.
Author: Naveen Albert
Date: 2023-08-04
Currently, if an FXS channel is still off hook when
all calls on the line have hung up, the user is provided
reorder tone until going back on hook again.
In addition to not reflecting what most commercial switches
actually do, it's very common for switches to automatically
reoriginate for the user so that dial tone is provided without
the user having to depress and release the hookswitch manually.
This can increase convenience for users.
This behavior is now supported for kewlstart FXS channels.
It's supported only for kewlstart (FXOKS) mainly because the
behavior doesn't make any sense for ground start channels,
and loop start signalling doesn't provide the necessary DAHDI
event that makes this easy to implement. Likely almost everyone
is using FXOKS over FXOLS anyways since FXOLS is pretty useless
these days.
ASTERISK-30357 #close
Resolves: #224
UserNote: The autoreoriginate setting now allows for kewlstart FXS
channels to automatically reoriginate and provide dial tone to the
user again after all calls on the line have cleared. This saves users
from having to manually hang up and pick up the receiver again before
making another call.
- ### audiohook: Unlock channel in mute if no audiohooks present.
Author: Joshua C. Colp
Date: 2023-08-09
In the case where mute was called on a channel that had no
audiohooks the code was not unlocking the channel, resulting
in a deadlock.
Resolves: #233
- ### sig_analog: Allow three-way flash to time out to silence.
Author: Naveen Albert
Date: 2023-07-10
sig_analog allows users to flash and use the three-way dial
tone as a primitive hold function, simply by never timing
it out.
Some systems allow this dial tone to time out to silence,
so the user is not annoyed by a persistent dial tone.
This option allows the dial tone to time out normally to
silence.
ASTERISK-30004 #close
Resolves: #205
UserNote: The threewaysilenthold option now allows the three-way
dial tone to time out to silence, rather than continuing forever.
- ### res_prometheus: Do not generate broken metrics
Author: Holger Hans Peter Freyther
Date: 2023-04-07
In 8d6fdf9c3adede201f0ef026dab201b3a37b26b6 invisible bridges were
skipped but that lead to producing metrics with no name and no help.
Keep track of the number of metrics configured and then only emit these.
Add a basic testcase that verifies that there is no '(NULL)' in the
output.
ASTERISK-30474
- ### res_pjsip: Enable TLS v1.3 if present.
Author: Sean Bright
Date: 2023-08-02
Fixes #221
UserNote: res_pjsip now allows TLS v1.3 to be enabled if supported by
the underlying PJSIP library. The bundled version of PJSIP supports
TLS v1.3.
- ### func_cut: Add example to documentation.
Author: phoneben
Date: 2023-07-19
This adds an example to the XML documentation clarifying usage
of the CUT function to address a common misusage.
- ### extensions.conf.sample: Remove reference to missing context.
Author: Sean Bright
Date: 2023-07-16
c3ff4648 removed the [iaxtel700] context but neglected to remove
references to it.
This commit addresses that and also removes iaxtel and freeworlddialup
references from other config files.
- ### func_export: Use correct function argument as variable name.
Author: Sean Bright
Date: 2023-07-12
Fixes #208
- ### app_queue: Add support for applying caller priority change immediately.
Author: Joshua C. Colp
Date: 2023-07-07
The app_queue module provides both an AMI action and a CLI command
to change the priority of a caller in a queue. Up to now this change
of priority has only been reflected to new callers into the queue.
This change adds an "immediate" option to both the AMI action and
CLI command which immediately applies the priority change respective
to the other callers already in the queue. This can allow, for example,
a caller to be placed at the head of the queue immediately if their
priority is sufficient.
Resolves: #202
UserNote: The 'queue priority caller' CLI command and
'QueueChangePriorityCaller' AMI action now have an 'immediate'
argument which allows the caller priority change to be reflected
immediately, causing the position of a caller to move within the
queue depending on the priorities of the other callers.
- ### .github: Fix cherry-pick reminder issues
Author: George Joseph
Date: 2023-07-17
- ### chan_iax2.c: Avoid crash with IAX2 switch support.
Author: Sean Bright
Date: 2023-07-07
A change made in 82cebaa0 did not properly handle the case when a
channel was not provided, triggering a crash. ast_check_hangup(...)
does not protect against NULL pointers.
Fixes #180
- ### res_geolocation: Ensure required 'location_info' is present.
Author: Sean Bright
Date: 2023-07-07
Fixes #189
- ### Adds manager actions to allow move/remove/forward individual messages in a particular mailbox folder. The forward command can be used to copy a message within a mailbox or to another mailbox. Also adds a VoicemailBoxSummarry, required to retrieve message ID's.
Author: Mike Bradeen
Date: 2023-06-29
Resolves: #181
UserNote: The following manager actions have been added
VoicemailBoxSummary - Generate message list for a given mailbox
VoicemailRemove - Remove a message from a mailbox folder
VoicemailMove - Move a message from one folder to another within a mailbox
VoicemailForward - Copy a message from one folder in one mailbox
to another folder in another or the same mailbox.
- ### app_voicemail: add CLI commands for message manipulation
Author: Mike Bradeen
Date: 2023-06-20
Adds CLI commands to allow move/remove/forward individual messages
from a particular mailbox folder. The forward command can be used
to copy a message within a mailbox or to another mailbox. Also adds
a show mailbox, required to retrieve message ID's.
Resolves: #170
UserNote: The following CLI commands have been added to app_voicemail
voicemail show mailbox <mailbox> <context>
Show contents of mailbox <mailbox>@<context>
voicemail remove <mailbox> <context> <from_folder> <messageid>
Remove message <messageid> from <from_folder> in mailbox <mailbox>@<context>
voicemail move <mailbox> <context> <from_folder> <messageid> <to_folder>
Move message <messageid> in mailbox <mailbox>&<context> from <from_folder> to <to_folder>
voicemail forward <from_mailbox> <from_context> <from_folder> <messageid> <to_mailbox> <to_context> <to_folder>
Forward message <messageid> in mailbox <mailbox>@<context> <from_folder> to
mailbox <mailbox>@<context> <to_folder>
- ### res_rtp_asterisk: Move ast_rtp_rtcp_report_alloc using `rtp->themssrc_valid` into the scope of the rtp_instance lock.
Author: zhengsh
Date: 2023-06-30
From the gdb information, it was found that when calling __ast_free, the size of the
allocated space pointed to by the pointer matches the size created when rtp->themssrc_valid
is equal to 0. However, in reality, when reading the value of rtp->themssrc_valid in gdb,
it is found to be 1.
Within ast_rtcp_write(), the call to ast_rtp_rtcp_report_alloc() uses rtp->themssrc_valid,
which is outside the protection of the rtp_instance lock. However,
ast_rtcp_generate_report(), which is called by ast_rtcp_generate_compound_prefix(), uses
rtp->themssrc_valid within the protection of the rtp_instance lock.
This can lead to the possibility that the value of rtp->themssrc_valid used in the call to
ast_rtp_rtcp_report_alloc() may be different from the value of rtp->themssrc_valid used
within ast_rtcp_generate_report().
Resolves: asterisk#63
- ### .github: Minor tweak to Asterisk Releaser
Author: George Joseph
Date: 2023-07-12
- ### .github: Suppress cherry-pick reminder for some situations
Author: George Joseph
Date: 2023-07-11
In PROpenedOrUpdated, the cherry-pick reminder will now be
suppressed if there are already valid 'cherry-pick-to' comments
in the PR or the PR contained a 'cherry-pick-to: none' comment.
- ### sig_analog: Allow immediate fake ring to be suppressed.
Author: Naveen Albert
Date: 2023-06-08
When immediate=yes on an FXS channel, sig_analog will
start fake audible ringback that continues until the
channel is answered. Even if it answers immediately,
the ringback is still audible for a brief moment.
This can be disruptive and unwanted behavior.
This adds an option to disable this behavior, though
the default behavior remains unchanged.
ASTERISK-30003 #close
Resolves: #118
UserNote: The immediatering option can now be set to no to suppress
the fake audible ringback provided when immediate=yes on FXS channels.

View File

@@ -1,95 +0,0 @@
Change Log for Release asterisk-20.5.1
========================================
Links:
----------------------------------------
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.5.1.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.5.0...20.5.1)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.5.1.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
Summary:
----------------------------------------
- res_pjsip_header_funcs: Duplicate new header value, don't copy.
- res_pjsip: disable raw bad packet logging
- res_rtp_asterisk.c: Check DTLS packets against ICE candidate list
- manager.c: Prevent path traversal with GetConfig.
User Notes:
----------------------------------------
Upgrade Notes:
----------------------------------------
Closed Issues:
----------------------------------------
None
Commits By Author:
----------------------------------------
- ### Ben Ford (1):
- manager.c: Prevent path traversal with GetConfig.
- ### George Joseph (1):
- res_rtp_asterisk.c: Check DTLS packets against ICE candidate list
- ### Gitea (1):
- res_pjsip_header_funcs: Duplicate new header value, don't copy.
- ### Mike Bradeen (1):
- res_pjsip: disable raw bad packet logging
Detail:
----------------------------------------
- ### res_pjsip_header_funcs: Duplicate new header value, don't copy.
Author: Gitea
Date: 2023-07-10
When updating an existing header the 'update' code incorrectly
just copied the new value into the existing buffer. If the
new value exceeded the available buffer size memory outside
of the buffer would be written into, potentially causing
a crash.
This change makes it so that the 'update' now duplicates
the new header value instead of copying it into the existing
buffer.
- ### res_pjsip: disable raw bad packet logging
Author: Mike Bradeen
Date: 2023-07-25
Add patch to split the log level for invalid packets received on the
signaling port. The warning regarding the packet will move to level 2
so that it can still be displayed, while the raw packet will be at level
4.
- ### res_rtp_asterisk.c: Check DTLS packets against ICE candidate list
Author: George Joseph
Date: 2023-11-09
When ICE is in use, we can prevent a possible DOS attack by allowing
DTLS protocol messages (client hello, etc) only from sources that
are in the active remote candidates list.
Resolves: GHSA-hxj9-xwr8-w8pq
- ### manager.c: Prevent path traversal with GetConfig.
Author: Ben Ford
Date: 2023-11-13
When using AMI GetConfig, it was possible to access files outside of the
Asterisk configuration directory by using filenames with ".." and "./"
even while live_dangerously was not enabled. This change resolves the
full path and ensures we are still in the configuration directory before
attempting to access the file.

View File

@@ -1,68 +0,0 @@
Change Log for Release asterisk-20.5.2
========================================
Links:
----------------------------------------
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.5.2.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.5.1...20.5.2)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.5.2.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
Summary:
----------------------------------------
- res_rtp_asterisk: Fix regression issues with DTLS client check
User Notes:
----------------------------------------
Upgrade Notes:
----------------------------------------
Closed Issues:
----------------------------------------
- #500: [bug regression]: res_rtp_asterisk doesn't build if pjproject isn't used
- #503: [bug]: The res_rtp_asterisk DTLS check against ICE candidates fails when it shouldn't
- #505: [bug]: res_pjproject: ast_sockaddr_cmp() always fails on sockaddrs created by ast_sockaddr_from_pj_sockaddr()
Commits By Author:
----------------------------------------
- ### George Joseph (1):
- res_rtp_asterisk: Fix regression issues with DTLS client check
Detail:
----------------------------------------
- ### res_rtp_asterisk: Fix regression issues with DTLS client check
Author: George Joseph
Date: 2023-12-15
* Since ICE candidates are used for the check and pjproject is
required to use ICE, res_rtp_asterisk was failing to compile
when pjproject wasn't available. The check is now wrapped
with an #ifdef HAVE_PJPROJECT.
* The rtp->ice_active_remote_candidates container was being
used to check the address on incoming packets but that
container doesn't contain peer reflexive candidates discovered
during negotiation. This was causing the check to fail
where it shouldn't. We now check against pjproject's
real_ice->rcand array which will contain those candidates.
* Also fixed a bug in ast_sockaddr_from_pj_sockaddr() where
we weren't zeroing out sin->sin_zero before returning. This
was causing ast_sockaddr_cmp() to always return false when
one of the inputs was converted from a pj_sockaddr, even
if both inputs had the same address and port.
Resolves: #500
Resolves: #503
Resolves: #505

File diff suppressed because it is too large Load Diff

View File

@@ -1,736 +0,0 @@
Change Log for Release asterisk-20.7.0
========================================
Links:
----------------------------------------
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.7.0.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.6.0...20.7.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.7.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
Summary:
----------------------------------------
- res_pjsip_stir_shaken.c: Add checks for missing parameters
- app_dial: Add dial time for progress/ringing.
- app_voicemail: Properly reinitialize config after unit tests.
- app_queue.c : fix "queue add member" usage string
- app_voicemail: Allow preventing mark messages as urgent.
- res_pjsip: Use consistent type for boolean columns.
- attestation_config.c: Use ast_free instead of ast_std_free
- Makefile: Add stir_shaken/cache to directories created on install
- Stir/Shaken Refactor
- alembic: Synchronize alembic heads between supported branches.
- translate.c: implement new direct comp table mode
- README.md: Removed outdated link
- strings.h: Ensure ast_str_buffer(…) returns a 0 terminated string.
- res_rtp_asterisk.c: Correct coefficient in MOS calculation.
- dsp.c: Fix and improve potentially inaccurate log message.
- pjsip show channelstats: Prevent possible segfault when faxing
- Reduce startup/shutdown verbose logging
- configure: Rerun bootstrap on modern platform.
- Upgrade bundled pjproject to 2.14.
- app_speech_utils.c: Allow partial speech results.
- utils: Make behavior of ast_strsep* match strsep.
- app_chanspy: Add 'D' option for dual-channel audio
- app_if: Fix next priority calculation.
- res_pjsip_t38.c: Permit IPv6 SDP connection addresses.
- BuildSystem: Bump autotools versions on OpenBSD.
- main/utils: Simplify the FreeBSD ast_get_tid() handling
- res_pjsip_session.c: Correctly format SDP connection addresses.
- rtp_engine.c: Correct sample rate typo for L16/44100.
- manager.c: Fix erroneous reloads in UpdateConfig.
- res_calendar_icalendar: Print iCalendar error on parsing failure.
- app_confbridge: Don't emit warnings on valid configurations.
- app_voicemail: add NoOp alembic script to maintain sync
- chan_dahdi: Allow MWI to be manually toggled on channels.
- chan_rtp.c: MulticastRTP missing refcount without codec option
- chan_rtp.c: Change MulticastRTP nameing to avoid memory leak
- func_frame_trace: Add CLI command to dump frame queue.
User Notes:
----------------------------------------
- ### app_dial: Add dial time for progress/ringing.
The timeout argument to Dial now allows
specifying the maximum amount of time to dial if
early media is not received.
- ### app_voicemail: Allow preventing mark messages as urgent.
The leaveurgent mailbox option can now be used to
control whether callers may leave messages marked as 'Urgent'.
- ### Stir/Shaken Refactor
Asterisk's stir-shaken feature has been refactored to
correct interoperability, RFC compliance, and performance issues.
See https://docs.asterisk.org/Deployment/STIR-SHAKEN for more
information.
- ### Upgrade bundled pjproject to 2.14.
Bundled pjproject has been upgraded to 2.14. For more
information on what all is included in this change, check out the
pjproject Github page: https://github.com/pjsip/pjproject/releases
- ### app_speech_utils.c: Allow partial speech results.
The SpeechBackground dialplan application now supports a 'p'
option that will return partial results from speech engines that
provide them when a timeout occurs.
- ### app_chanspy: Add 'D' option for dual-channel audio
The ChanSpy application now accepts the 'D' option which
will interleave the spied audio within the outgoing frames. The
purpose of this is to allow the audio to be read as a Dual channel
stream with separate incoming and outgoing audio. Setting both the
'o' option and the 'D' option and results in the 'D' option being
ignored.
- ### chan_dahdi: Allow MWI to be manually toggled on channels.
The 'dahdi set mwi' now allows MWI on channels
to be manually toggled if needed for troubleshooting.
Resolves: #440
Upgrade Notes:
----------------------------------------
- ### Stir/Shaken Refactor
The stir-shaken refactor is a breaking change but since
it's not working now we don't think it matters. The
stir_shaken.conf file has changed significantly which means that
existing ones WILL need to be changed. The stir_shaken.conf.sample
file in configs/samples/ has quite a bit more information. This is
also an ABI breaking change since some of the existing objects
needed to be changed or removed, and new ones added. Additionally,
if res_stir_shaken is enabled in menuselect, you'll need to either
have the development package for libjwt v1.15.3 installed or use
the --with-libjwt-bundled option with ./configure.
Closed Issues:
----------------------------------------
- #46: [bug]: Stir/Shaken: Wrong CID used when looking up certificates
- #351: [improvement]: Refactor res_stir_shaken to use libjwt
- #406: [improvement]: pjsip: Upgrade bundled version to pjproject 2.14
- #440: [new-feature]: chan_dahdi: Allow manually toggling MWI on channels
- #492: [improvement]: res_calendar_icalendar: Print icalendar error if available on parsing failure
- #527: [bug]: app_voicemail_odbc no longer working after removal of macrocontext.
- #529: [bug]: MulticastRTP without selected codec leeds to "FRACK!, Failed assertion bad magic number 0x0 for object" after ~30 calls
- #533: [improvement]: channel.c, func_frame_trace.c: Improve debuggability of channel frame queue
- #551: [bug]: manager: UpdateConfig triggers reload with "Reload: no"
- #560: [bug]: EndIf() causes next priority to be skipped
- #565: [bug]: Application Read() returns immediately
- #569: [improvement]: Add option to interleave input and output frames on spied channel
- #572: [improvement]: Copy partial speech results when Asterisk is ready to move on but the speech backend is not
- #582: [improvement]: Reduce unneeded logging during startup and shutdown
- #586: [bug]: The "restrict" keyword used in chan_iax2.c isn't supported in older gcc versions
- #588: [new-feature]: app_dial: Allow Dial to be aborted if early media is not received
- #592: [bug]: In certain circumstances, "pjsip show channelstats" can segfault when a fax session is active
- #595: [improvement]: dsp.c: Fix and improve confusing warning message.
- #597: [bug]: wrong MOS calculation
- #601: [new-feature]: translate.c: implement new direct comp table mode (PR #585)
- #619: [new-feature]: app_voicemail: Allow preventing callers from marking messages as urgent
- #629: [bug]: app_voicemail: Multiple executions of unit tests cause segfault
- #634: [bug]: make install doesn't create the stir_shaken cache directory
- #636: [bug]: Possible SEGV in res_stir_shaken due to wrong free function
- #645: [bug]: Occasional SEGV in res_pjsip_stir_shaken.c
Commits By Author:
----------------------------------------
- ### Ben Ford (1):
- Upgrade bundled pjproject to 2.14.
- ### Brad Smith (2):
- main/utils: Simplify the FreeBSD ast_get_tid() handling
- BuildSystem: Bump autotools versions on OpenBSD.
- ### George Joseph (6):
- Reduce startup/shutdown verbose logging
- pjsip show channelstats: Prevent possible segfault when faxing
- Stir/Shaken Refactor
- Makefile: Add stir_shaken/cache to directories created on install
- attestation_config.c: Use ast_free instead of ast_std_free
- res_pjsip_stir_shaken.c: Add checks for missing parameters
- ### Joshua C. Colp (1):
- utils: Make behavior of ast_strsep* match strsep.
- ### Mike Bradeen (2):
- app_voicemail: add NoOp alembic script to maintain sync
- app_chanspy: Add 'D' option for dual-channel audio
- ### Naveen Albert (10):
- func_frame_trace: Add CLI command to dump frame queue.
- chan_dahdi: Allow MWI to be manually toggled on channels.
- res_calendar_icalendar: Print iCalendar error on parsing failure.
- manager.c: Fix erroneous reloads in UpdateConfig.
- app_if: Fix next priority calculation.
- configure: Rerun bootstrap on modern platform.
- dsp.c: Fix and improve potentially inaccurate log message.
- app_voicemail: Allow preventing mark messages as urgent.
- app_voicemail: Properly reinitialize config after unit tests.
- app_dial: Add dial time for progress/ringing.
- ### PeterHolik (2):
- chan_rtp.c: Change MulticastRTP nameing to avoid memory leak
- chan_rtp.c: MulticastRTP missing refcount without codec option
- ### Sean Bright (7):
- app_confbridge: Don't emit warnings on valid configurations.
- rtp_engine.c: Correct sample rate typo for L16/44100.
- res_pjsip_session.c: Correctly format SDP connection addresses.
- res_pjsip_t38.c: Permit IPv6 SDP connection addresses.
- strings.h: Ensure ast_str_buffer(…) returns a 0 terminated string.
- alembic: Synchronize alembic heads between supported branches.
- res_pjsip: Use consistent type for boolean columns.
- ### Sebastian Jennen (1):
- translate.c: implement new direct comp table mode
- ### Shaaah (1):
- app_queue.c : fix "queue add member" usage string
- ### Shyju Kanaprath (1):
- README.md: Removed outdated link
- ### cmaj (1):
- app_speech_utils.c: Allow partial speech results.
- ### romryz (1):
- res_rtp_asterisk.c: Correct coefficient in MOS calculation.
Detail:
----------------------------------------
- ### res_pjsip_stir_shaken.c: Add checks for missing parameters
Author: George Joseph
Date: 2024-03-11
* Added checks for missing session, session->channel and rdata
in stir_shaken_incoming_request.
* Added checks for missing session, session->channel and tdata
in stir_shaken_outgoing_request.
Resolves: #645
- ### app_dial: Add dial time for progress/ringing.
Author: Naveen Albert
Date: 2024-02-08
Add a timeout option to control the amount of time
to wait if no early media is received before giving
up. This allows aborting early if the destination
is not being responsive.
Resolves: #588
UserNote: The timeout argument to Dial now allows
specifying the maximum amount of time to dial if
early media is not received.
- ### app_voicemail: Properly reinitialize config after unit tests.
Author: Naveen Albert
Date: 2024-02-29
Most app_voicemail unit tests were not properly cleaning up
after themselves after running. This led to test mailboxes
lingering around in the system. It also meant that if any
unit tests in app_voicemail that create mailboxes were executed
and the module was not unloaded/loaded again prior to running
the test_voicemail_vm_info unit test, Asterisk would segfault
due to an attempt to copy a NULL string.
The load_config test did actually have logic to reinitialize
the config after the test. However, this did not work in practice
since load_config() would not reload the config since voicemail.conf
had not changed during the test; thus, additional logic has been
added to ensure that voicemail.conf is truly reloaded, after any
unit tests which modify the users list.
This prevents the SEGV due to invalid mailboxes lingering around,
and also ensures that the system state is restored to what it was
prior to the tests running.
Resolves: #629
- ### app_queue.c : fix "queue add member" usage string
Author: Shaaah
Date: 2024-01-23
Fixing bracket placement in the "queue add member" cli usage string.
- ### app_voicemail: Allow preventing mark messages as urgent.
Author: Naveen Albert
Date: 2024-02-24
This adds an option to allow preventing callers from leaving
messages marked as 'urgent'.
Resolves: #619
UserNote: The leaveurgent mailbox option can now be used to
control whether callers may leave messages marked as 'Urgent'.
- ### res_pjsip: Use consistent type for boolean columns.
Author: Sean Bright
Date: 2024-02-27
This migrates the relevant schema objects from the `('yes', 'no')`
definition to the `('0', '1', 'off', 'on', 'false', 'true', 'yes', 'no')`
one.
Fixes #617
- ### attestation_config.c: Use ast_free instead of ast_std_free
Author: George Joseph
Date: 2024-03-05
In as_check_common_config, we were calling ast_std_free on
raw_key but raw_key was allocated with ast_malloc so it
should be freed with ast_free.
Resolves: #636
- ### Makefile: Add stir_shaken/cache to directories created on install
Author: George Joseph
Date: 2024-03-04
The default location for the stir_shaken cache is
/var/lib/asterisk/keys/stir_shaken/cache but we were only creating
/var/lib/asterisk/keys/stir_shaken on istall. We now create
the cache sub-directory.
Resolves: #634
- ### Stir/Shaken Refactor
Author: George Joseph
Date: 2023-10-26
Why do we need a refactor?
The original stir/shaken implementation was started over 3 years ago
when little was understood about practical implementation. The
result was an implementation that wouldn't actually interoperate
with any other stir-shaken implementations.
There were also a number of stir-shaken features and RFC
requirements that were never implemented such as TNAuthList
certificate validation, sending Reason headers in SIP responses
when verification failed but we wished to continue the call, and
the ability to send Media Key(mky) grants in the Identity header
when the call involved DTLS.
Finally, there were some performance concerns around outgoing
calls and selection of the correct certificate and private key.
The configuration was keyed by an arbitrary name which meant that
for every outgoing call, we had to scan the entire list of
configured TNs to find the correct cert to use. With only a few
TNs configured, this wasn't an issue but if you have a thousand,
it could be.
What's changed?
* Configuration objects have been refactored to be clearer about
their uses and to fix issues.
* The "general" object was renamed to "verification" since it
contains parameters specific to the incoming verification
process. It also never handled ca_path and crl_path
correctly.
* A new "attestation" object was added that controls the
outgoing attestation process. It sets default certificates,
keys, etc.
* The "certificate" object was renamed to "tn" and had it's key
change to telephone number since outgoing call attestation
needs to look up certificates by telephone number.
* The "profile" object had more parameters added to it that can
override default parameters specified in the "attestation"
and "verification" objects.
* The "store" object was removed altogther as it was never
implemented.
* We now use libjwt to create outgoing Identity headers and to
parse and validate signatures on incoming Identiy headers. Our
previous custom implementation was much of the source of the
interoperability issues.
* General code cleanup and refactor.
* Moved things to better places.
* Separated some of the complex functions to smaller ones.
* Using context objects rather than passing tons of parameters
in function calls.
* Removed some complexity and unneeded encapsuation from the
config objects.
Resolves: #351
Resolves: #46
UserNote: Asterisk's stir-shaken feature has been refactored to
correct interoperability, RFC compliance, and performance issues.
See https://docs.asterisk.org/Deployment/STIR-SHAKEN for more
information.
UpgradeNote: The stir-shaken refactor is a breaking change but since
it's not working now we don't think it matters. The
stir_shaken.conf file has changed significantly which means that
existing ones WILL need to be changed. The stir_shaken.conf.sample
file in configs/samples/ has quite a bit more information. This is
also an ABI breaking change since some of the existing objects
needed to be changed or removed, and new ones added. Additionally,
if res_stir_shaken is enabled in menuselect, you'll need to either
have the development package for libjwt v1.15.3 installed or use
the --with-libjwt-bundled option with ./configure.
- ### alembic: Synchronize alembic heads between supported branches.
Author: Sean Bright
Date: 2024-02-28
This adds a dummy migration to 18 and 20 so that our alembic heads are
synchronized across all supported branches.
In this case the migration we are stubbing (24c12d8e9014) is:
https://github.com/asterisk/asterisk/commit/775352ee6c2a5bcd4f0e3df51aee5d1b0abf4cbe
- ### translate.c: implement new direct comp table mode
Author: Sebastian Jennen
Date: 2024-02-25
The new mode lists for each codec translation the actual real cost in cpu microseconds per second translated audio.
This allows to compare the real cpu usage of translations and helps in evaluation of codec implementation changes regarding performance (regression testing).
- add new table mode
- hide the 999999 comp values, as these only indicate an issue with transcoding
- hide the 0 values, as these also do not contain any information (only indicate a multistep transcoding)
Resolves: #601
- ### README.md: Removed outdated link
Author: Shyju Kanaprath
Date: 2024-02-23
Removed outdated link http://www.quicknet.net from README.md
cherry-pick-to: 18
cherry-pick-to: 20
cherry-pick-to: 21
- ### strings.h: Ensure ast_str_buffer(…) returns a 0 terminated string.
Author: Sean Bright
Date: 2024-02-17
If a dynamic string is created with an initial length of 0,
`ast_str_buffer(…)` will return an invalid pointer.
This was a secondary discovery when fixing #65.
- ### res_rtp_asterisk.c: Correct coefficient in MOS calculation.
Author: romryz
Date: 2024-02-06
Media Experience Score relies on incorrect pseudo_mos variable
calculation. According to forming an opinion section of the
documentation, calculation relies on ITU-T G.107 standard:
https://docs.asterisk.org/Deployment/Media-Experience-Score/#forming-an-opinion
ITU-T G.107 Annex B suggests to calculate MOS with a coefficient
"seven times ten to the power of negative six", 7 * 10^(-6). which
would mean 6 digits after the decimal point. Current implementation
has 7 digits after the decimal point, which downrates the calls.
Fixes: #597
- ### dsp.c: Fix and improve potentially inaccurate log message.
Author: Naveen Albert
Date: 2024-02-09
If ast_dsp_process is called with a codec besides slin, ulaw,
or alaw, a warning is logged that in-band DTMF is not supported,
but this message is not always appropriate or correct, because
ast_dsp_process is much more generic than just DTMF detection.
This logs a more generic message in those cases, and also improves
codec-mismatch logging throughout dsp.c by ensuring incompatible
codecs are printed out.
Resolves: #595
- ### pjsip show channelstats: Prevent possible segfault when faxing
Author: George Joseph
Date: 2024-02-09
Under rare circumstances, it's possible for the original audio
session in the active_media_state default_session to be corrupted
instead of removed when switching to the t38/image media session
during fax negotiation. This can cause a segfault when a "pjsip
show channelstats" attempts to print that audio media session's
rtp statistics. In these cases, the active_media_state
topology is correctly showing only a single t38/image stream
so we now check that there's an audio stream in the topology
before attempting to use the audio media session to get the rtp
statistics.
Resolves: #592
- ### Reduce startup/shutdown verbose logging
Author: George Joseph
Date: 2024-01-31
When started with a verbose level of 3, asterisk can emit over 1500
verbose message that serve no real purpose other than to fill up
logs. When asterisk shuts down, it emits another 1100 that are of
even less use. Since the testsuite runs asterisk with a verbose
level of 3, and asterisk starts and stops for every one of the 700+
tests, the number of log messages is staggering. Besides taking up
resources, it also makes it hard to debug failing tests.
This commit changes the log level for those verbose messages to 5
instead of 3 which reduces the number of log messages to only a
handful. Of course, NOTICE, WARNING and ERROR message are
unaffected.
There's also one other minor change...
ast_context_remove_extension_callerid2() logs a DEBUG message
instead of an ERROR if the extension you're deleting doesn't exist.
The pjsip_config_wizard calls that function to clean up the config
and has been triggering that annoying error message for years.
Resolves: #582
- ### configure: Rerun bootstrap on modern platform.
Author: Naveen Albert
Date: 2024-02-12
The last time configure was run, it was run on a system that
did not enable -std=gnu11 by default, which meant that the
restrict qualifier would not be recognized on certain platforms.
This regenerates the configure files from running bootstrap.sh,
so that these should be recognized on all supported platforms.
Resolves: #586
- ### Upgrade bundled pjproject to 2.14.
Author: Ben Ford
Date: 2024-02-05
Fixes: #406
UserNote: Bundled pjproject has been upgraded to 2.14. For more
information on what all is included in this change, check out the
pjproject Github page: https://github.com/pjsip/pjproject/releases
- ### app_speech_utils.c: Allow partial speech results.
Author: cmaj
Date: 2024-02-02
Adds 'p' option to SpeechBackground() application.
With this option, when the app timeout is reached,
whatever the backend speech engine collected will
be returned as if it were the final, full result.
(This works for engines that make partial results.)
Resolves: #572
UserNote: The SpeechBackground dialplan application now supports a 'p'
option that will return partial results from speech engines that
provide them when a timeout occurs.
- ### utils: Make behavior of ast_strsep* match strsep.
Author: Joshua C. Colp
Date: 2024-01-31
Given the scenario of passing an empty string to the
ast_strsep functions the functions would return NULL
instead of an empty string. This is counter to how
strsep itself works.
This change alters the behavior of the functions to
match that of strsep.
Fixes: #565
- ### app_chanspy: Add 'D' option for dual-channel audio
Author: Mike Bradeen
Date: 2024-01-31
Adds the 'D' option to app chanspy that causes the input and output
frames of the spied channel to be interleaved in the spy output frame.
This allows the input and output of the spied channel to be decoded
separately by the receiver.
If the 'o' option is also set, the 'D' option is ignored as the
audio being spied is inherently one direction.
Fixes: #569
UserNote: The ChanSpy application now accepts the 'D' option which
will interleave the spied audio within the outgoing frames. The
purpose of this is to allow the audio to be read as a Dual channel
stream with separate incoming and outgoing audio. Setting both the
'o' option and the 'D' option and results in the 'D' option being
ignored.
- ### app_if: Fix next priority calculation.
Author: Naveen Albert
Date: 2024-01-28
Commit fa3922a4d28860d415614347d9f06c233d2beb07 fixed
a branching issue but "overshoots" when calculating
the next priority. This fixes that; accompanying
test suite tests have also been extended.
Resolves: #560
- ### res_pjsip_t38.c: Permit IPv6 SDP connection addresses.
Author: Sean Bright
Date: 2024-01-29
The existing code prevented IPv6 addresses from being properly parsed.
Fixes #558
- ### BuildSystem: Bump autotools versions on OpenBSD.
Author: Brad Smith
Date: 2024-01-27
Bump up to the more commonly used and modern versions of
autoconf and automake.
- ### main/utils: Simplify the FreeBSD ast_get_tid() handling
Author: Brad Smith
Date: 2024-01-27
FreeBSD has had kernel threads for 20+ years.
- ### res_pjsip_session.c: Correctly format SDP connection addresses.
Author: Sean Bright
Date: 2024-01-27
Resolves a regression identified by @justinludwig involving the
rendering of IPv6 addresses in outgoing SDP.
Also updates `media_address` on PJSIP endpoints so that if we are able
to parse the configured value as an IP we store it in a format that we
can directly use later. Based on my reading of the code it appeared
that one could configure `media_address` as:
```
[foo]
type = endpoint
...
media_address = [2001:db8::]
```
And that value would be blindly copied into the outgoing SDP without
regard to its format.
Fixes #541
- ### rtp_engine.c: Correct sample rate typo for L16/44100.
Author: Sean Bright
Date: 2024-01-28
Fixes #555
- ### manager.c: Fix erroneous reloads in UpdateConfig.
Author: Naveen Albert
Date: 2024-01-25
Currently, a reload will always occur if the
Reload header is provided for the UpdateConfig
action. However, we should not be doing a reload
if the header value has a falsy value, per the
documentation, so this makes the reload behavior
consistent with the existing documentation.
Resolves: #551
- ### res_calendar_icalendar: Print iCalendar error on parsing failure.
Author: Naveen Albert
Date: 2023-12-14
If libical fails to parse a calendar, print the error message it provdes.
Resolves: #492
- ### app_confbridge: Don't emit warnings on valid configurations.
Author: Sean Bright
Date: 2024-01-21
The numeric bridge profile options `internal_sample_rate` and
`maximum_sample_rate` are documented to accept the special values
`auto` and `none`, respectively. While these values currently work,
they also emit warnings when used which could be confusing for users.
In passing, also ensure that we only accept the documented range of
sample rate values between 8000 and 192000.
Fixes #546
- ### app_voicemail: add NoOp alembic script to maintain sync
Author: Mike Bradeen
Date: 2024-01-17
Adding a NoOp alembic script for the voicemail database to maintain
version sync with other branches.
Fixes: #527
- ### chan_dahdi: Allow MWI to be manually toggled on channels.
Author: Naveen Albert
Date: 2023-11-10
This adds a CLI command to manually toggle the MWI status
of a channel, useful for troubleshooting or resetting
MWI devices, similar to the capabilities offered with
SIP messaging to manually control MWI status.
UserNote: The 'dahdi set mwi' now allows MWI on channels
to be manually toggled if needed for troubleshooting.
Resolves: #440
- ### chan_rtp.c: MulticastRTP missing refcount without codec option
Author: PeterHolik
Date: 2024-01-15
Fixes: #529
- ### chan_rtp.c: Change MulticastRTP nameing to avoid memory leak
Author: PeterHolik
Date: 2024-01-16
Fixes: asterisk#536
- ### func_frame_trace: Add CLI command to dump frame queue.
Author: Naveen Albert
Date: 2024-01-12
This adds a simple CLI command that can be used for
analyzing all frames currently queued to a channel.
A couple log messages are also adjusted to be more
useful in tracing bridging problems.
Resolves: #533

View File

@@ -1,845 +0,0 @@
## Change Log for Release asterisk-20.8.0
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.8.0.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.7.0...20.8.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.8.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 44
- Commit Authors: 15
- Issues Resolved: 26
- Security Advisories Resolved: 0
### User Notes:
- #### res_pjsip_logger: Preserve logging state on reloads.
Issuing "pjsip reload" will no longer disable
logging if it was previously enabled from the CLI.
- #### loader.c: Allow dependent modules to be unloaded recursively.
In certain circumstances, modules with dependency relations
can have their dependents automatically recursively unloaded and loaded
again using the "module refresh" CLI command or the ModuleLoad AMI command.
- #### tcptls/iostream: Add support for setting SNI on client TLS connections
Secure websocket client connections now send SNI in
the TLS client hello.
- #### res_pjsip_endpoint_identifier_ip: Add endpoint identifier transport address.
set identify_by=transport for the pjsip endpoint. Then
use the existing 'match' option and the new 'transport' option of
the identify.
Fixes: #672
- #### res_pjsip_endpoint_identifier_ip: Endpoint identifier request URI
this new feature let users match endpoints based on the
indound SIP requests' URI. To do so, add 'request_uri' to the
endpoint's 'identify_by' option. The 'match_request_uri' option of
the identify can be an exact match for the entire request uri, or a
regular expression (between slashes). It's quite similar to the
header identifer.
Fixes: #599
- #### res_pjsip_refer.c: Allow GET_TRANSFERRER_DATA
the GET_TRANSFERRER_DATA dialplan variable can now be used also in pjsip.
- #### manager.c: Add new parameter 'PreDialGoSub' to Originate AMI action
When using the Originate AMI Action, we now can pass the PreDialGoSub parameter, instructing the asterisk to perform an subrouting at channel before call start. With this parameter an call initiated by AMI can request the channel to start the call automaticaly, adding a SIP header to using GoSUB, instructing to autoanswer the channel, and proceeding the outbuound extension executing. Exemple of an context to perform the previus indication:
[addautoanswer]
exten => _s,1,Set(PJSIP_HEADER(add,Call-Info)=answer-after=0)
exten => _s,n,Set(PJSIP_HEADER(add,Alert-Info)=answer-after=0)
exten => _s,n,Return()
- #### manager.c: Add CLI command to kick AMI sessions.
The "manager kick session" CLI command now
allows kicking a specified AMI session.
- #### chan_dahdi: Allow specifying waitfordialtone per call.
"waitfordialtone" may now be specified for DAHDI
trunk channels on a per-call basis using the CHANNEL function.
- #### Upgrade bundled pjproject to 2.14.1
Bundled pjproject has been upgraded to 2.14.1. For more
information visit pjproject Github page: https://github.com/pjsip/pjproject/releases/tag/2.14.1
### Upgrade Notes:
- #### pbx_variables.c: Prevent SEGV due to stack overflow.
The maximum amount of dialplan recursion
using variable substitution (such as by using EVAL_EXTEN)
is capped at 15.
### Commit Authors:
- Fabrice Fontaine: (1)
- George Joseph: (8)
- Henrik Liljedahl: (1)
- Holger Hans Peter Freyther: (1)
- Ivan Poddubny: (2)
- Jonatascalebe: (1)
- Joshua Elson: (1)
- Martin Nystroem: (1)
- Martin Tomec: (1)
- Maximilian Fridrich: (1)
- Naveen Albert: (14)
- Sean Bright: (8)
- Sperl Viktor: (2)
- Spiridonov Dmitry: (1)
- Stanislav Abramenkov: (1)
## Issue and Commit Detail:
### Closed Issues:
- 246: [bug]: res_pjsip_logger: Reload disables logging
- 472: [new-feature]: chan_dahdi: Allow waitfordialtone to be specified per call
- 474: [new-feature]: loader.c: Allow dependent modules to be unloaded automatically
- 480: [improvement]: pbx_variables.c: Prevent infinite recursion and stack overflow with variable expansion
- 485: [new-feature]: manager.c: Allow kicking specific manager sessions
- 525: [bug]: say.c: Money announcements off by one cent due to floating point rounding
- 579: [improvement]: Allow GET_TRANSFERRER_DATA for pjsip
- 599: [improvement]: Endpoint identifier request line
- 611: [bug]: res_pjsip_session: Polling on non-existing file descriptors when stream is removed
- 624: [bug]: Park() application does not continue execution if lot is full
- 642: [bug]: Prometheus bridge metrics contains duplicate entries and help
- 666: [improvement]: ARI debug should contain endpoint and method
- 669: [bug]: chan_dahdi: Tens or hundreds of thousands of channel opens attempted during restart
- 672: [improvement]: Endpoint identifier transport
- 673: [new-feature]: chan_dahdi: Add AMI action to show spans
- 676: [bug]: res_stir_shaken implicit declaration of function errors/warnings
- 681: [new-feature]: callerid.c: Parse all received parameters
- 683: [improvement]: func_callerid: Warn if invalid redirecting reason is set
- 689: [bug] Document the `Events` argument of the `Login` AMI action
- 696: [bug]: Unexpected control subclass '14'
- 713: [bug]: SNI isn't being set on websocket client connections
- 716: [bug]: Memory leak in res_stir_shaken tn_config, plus a few other issues
- 719: [bug]: segfault on start if compiled with DETECT_DEADLOCKS
- 721: [improvement]: logger: Add unique verbose prefixes for higher verbose levels
- 729: [bug]: Build failure with uclibc-ng
- ASTERISK-29912: res_pjsip: module reload disables logging
### Commits By Author:
- ### Fabrice Fontaine (1):
- res/stasis/control.c: include signal.h
- ### George Joseph (8):
- Fix incorrect application and function documentation references
- res_stir_shaken: Fix compilation for CentOS7 (openssl 1.0.2)
- manager.c: Add missing parameters to Login documentation
- rtp_engine and stun: call ast_register_atexit instead of ast_register_cleanup
- logger.h: Add SCOPE_CALL and SCOPE_CALL_WITH_RESULT
- make_buildopts_h: Always include DETECT_DEADLOCKS
- stir_shaken: Fix memory leak, typo in config, tn canonicalization
- tcptls/iostream: Add support for setting SNI on client TLS connections
- ### Henrik Liljedahl (1):
- res_pjsip_sdp_rtp.c: Initial RTP inactivity check must consider the rtp_timeou..
- ### Holger Hans Peter Freyther (1):
- res_prometheus: Fix duplicate output of metric and help text
- ### Ivan Poddubny (2):
- asterisk.c: Fix sending incorrect messages to systemd notify
- configs: Fix a misleading IPv6 ACL example in Named ACLs
- ### Joshua Elson (1):
- Implement Configurable TCP Keepalive Settings in PJSIP Transports
- ### Martin Nystroem (1):
- res_ari.c: Add additional output to ARI requests when debug is enabled
- ### Martin Tomec (1):
- res_pjsip_refer.c: Allow GET_TRANSFERRER_DATA
- ### Maximilian Fridrich (1):
- res_pjsip_session: Reset pending_media_state->read_callbacks
- ### Naveen Albert (14):
- res_parking: Fail gracefully if parking lot is full.
- chan_dahdi: Allow specifying waitfordialtone per call.
- manager.c: Add CLI command to kick AMI sessions.
- pbx_variables.c: Prevent SEGV due to stack overflow.
- menuselect: Minor cosmetic fixes.
- chan_dahdi: Don't retry opening nonexistent channels on restart.
- chan_dahdi: Add DAHDIShowStatus AMI action.
- func_callerid: Emit warning if invalid redirecting reason set.
- file.c, channel.c: Don't emit warnings if progress received.
- callerid.c: Parse previously ignored Caller ID parameters.
- loader.c: Allow dependent modules to be unloaded recursively.
- say.c: Fix cents off-by-one due to floating point rounding.
- logger: Add unique verbose prefixes for levels 5-10.
- res_pjsip_logger: Preserve logging state on reloads.
- ### Sean Bright (8):
- res_monitor.c: Don't emit a warning about 'X' being unrecognized.
- alembic: Quote new MySQL keyword 'qualify.'
- res_pjsip: Fix alembic downgrade for boolean columns.
- res_config_mysql.c: Support hostnames up to 255 bytes.
- alembic: Fix compatibility with SQLAlchemy 2.0+.
- cli.c: `core show channels concise` is not really deprecated.
- alembic: Correct NULLability of PJSIP id columns.
- app_queue.c: Properly handle invalid strategies from realtime.
- ### Sperl Viktor (2):
- res_pjsip_endpoint_identifier_ip: Endpoint identifier request URI
- res_pjsip_endpoint_identifier_ip: Add endpoint identifier transport address.
- ### Spiridonov Dmitry (1):
- sorcery.c: Fixed crash error when executing "module reload"
- ### Stanislav Abramenkov (1):
- Upgrade bundled pjproject to 2.14.1
- ### jonatascalebe (1):
- manager.c: Add new parameter 'PreDialGoSub' to Originate AMI action
### Commit List:
- configs: Fix a misleading IPv6 ACL example in Named ACLs
- asterisk.c: Fix sending incorrect messages to systemd notify
- res/stasis/control.c: include signal.h
- res_pjsip_logger: Preserve logging state on reloads.
- logger: Add unique verbose prefixes for levels 5-10.
- say.c: Fix cents off-by-one due to floating point rounding.
- loader.c: Allow dependent modules to be unloaded recursively.
- tcptls/iostream: Add support for setting SNI on client TLS connections
- stir_shaken: Fix memory leak, typo in config, tn canonicalization
- make_buildopts_h: Always include DETECT_DEADLOCKS
- sorcery.c: Fixed crash error when executing "module reload"
- callerid.c: Parse previously ignored Caller ID parameters.
- logger.h: Add SCOPE_CALL and SCOPE_CALL_WITH_RESULT
- app_queue.c: Properly handle invalid strategies from realtime.
- file.c, channel.c: Don't emit warnings if progress received.
- alembic: Correct NULLability of PJSIP id columns.
- rtp_engine and stun: call ast_register_atexit instead of ast_register_cleanup
- manager.c: Add missing parameters to Login documentation
- func_callerid: Emit warning if invalid redirecting reason set.
- chan_dahdi: Add DAHDIShowStatus AMI action.
- res_pjsip_endpoint_identifier_ip: Add endpoint identifier transport address.
- res_stir_shaken: Fix compilation for CentOS7 (openssl 1.0.2)
- Fix incorrect application and function documentation references
- cli.c: `core show channels concise` is not really deprecated.
- res_pjsip_endpoint_identifier_ip: Endpoint identifier request URI
- chan_dahdi: Don't retry opening nonexistent channels on restart.
- Implement Configurable TCP Keepalive Settings in PJSIP Transports
- res_pjsip_refer.c: Allow GET_TRANSFERRER_DATA
- res_ari.c: Add additional output to ARI requests when debug is enabled
- alembic: Fix compatibility with SQLAlchemy 2.0+.
- manager.c: Add new parameter 'PreDialGoSub' to Originate AMI action
- menuselect: Minor cosmetic fixes.
- pbx_variables.c: Prevent SEGV due to stack overflow.
- res_prometheus: Fix duplicate output of metric and help text
- manager.c: Add CLI command to kick AMI sessions.
- chan_dahdi: Allow specifying waitfordialtone per call.
- res_parking: Fail gracefully if parking lot is full.
- res_config_mysql.c: Support hostnames up to 255 bytes.
- res_pjsip: Fix alembic downgrade for boolean columns.
- Upgrade bundled pjproject to 2.14.1
- alembic: Quote new MySQL keyword 'qualify.'
- res_pjsip_session: Reset pending_media_state->read_callbacks
- res_monitor.c: Don't emit a warning about 'X' being unrecognized.
### Commit Details:
#### configs: Fix a misleading IPv6 ACL example in Named ACLs
Author: Ivan Poddubny
Date: 2024-05-05
"deny=::" is equivalent to "::/128".
In order to mean "deny everything by default" it must be "::/0".
#### asterisk.c: Fix sending incorrect messages to systemd notify
Author: Ivan Poddubny
Date: 2024-05-05
Send "RELOADING=1" instead of "RELOAD=1" to follow the format
expected by systemd (see sd_notify(3) man page).
Do not send STOPPING=1 in remote console mode:
attempting to execute "asterisk -rx" by the main process leads to
a warning if NotifyAccess=main (the default) or to a forced termination
if NotifyAccess=all.
#### res/stasis/control.c: include signal.h
Author: Fabrice Fontaine
Date: 2024-05-01
Include signal.h to avoid the following build failure with uclibc-ng
raised since
https://github.com/asterisk/asterisk/commit/2694792e13c7f3ab1911c4a69fba0df32c544177:
stasis/control.c: In function 'exec_command_on_condition':
stasis/control.c:313:3: warning: implicit declaration of function 'pthread_kill'; did you mean 'pthread_yield'? [-Wimplicit-function-declaration]
313 | pthread_kill(control->control_thread, SIGURG);
| ^~~~~~~~~~~~
| pthread_yield
stasis/control.c:313:41: error: 'SIGURG' undeclared (first use in this function)
313 | pthread_kill(control->control_thread, SIGURG);
| ^~~~~~
cherry-pick-to: 18
cherry-pick-to: 20
cherry-pick-to: 21
Fixes: #729
#### res_pjsip_logger: Preserve logging state on reloads.
Author: Naveen Albert
Date: 2023-08-09
Currently, reloading res_pjsip will cause logging
to be disabled. This is because logging can also
be controlled via the debug option in pjsip.conf
and this defaults to "no".
To improve this, logging is no longer disabled on
reloads if logging had not been previously
enabled using the debug option from the config.
This ensures that logging enabled from the CLI
will persist through a reload.
ASTERISK-29912 #close
Resolves: #246
UserNote: Issuing "pjsip reload" will no longer disable
logging if it was previously enabled from the CLI.
#### logger: Add unique verbose prefixes for levels 5-10.
Author: Naveen Albert
Date: 2024-04-27
Add unique verbose prefixes for levels higher than 4, so
that these can be visually differentiated from each other.
Resolves: #721
#### say.c: Fix cents off-by-one due to floating point rounding.
Author: Naveen Albert
Date: 2024-01-10
Some of the money announcements can be off by one cent,
due to the use of floating point in the money calculations,
which is bad for obvious reasons.
This replaces floating point with simple string parsing
to ensure the cents value is converted accurately.
Resolves: #525
#### loader.c: Allow dependent modules to be unloaded recursively.
Author: Naveen Albert
Date: 2023-12-02
Because of the (often recursive) nature of module dependencies in
Asterisk, hot swapping a module on the fly is cumbersome if a module
is depended on by other modules. Currently, dependencies must be
popped manually by unloading dependents, unloading the module of
interest, and then loading modules again in reverse order.
To make this easier, the ability to do this recursively in certain
circumstances has been added, as an optional extension to the
"module refresh" command. If requested, Asterisk will check if a module
that has a positive usecount could be unloaded safely if anything
recursively dependent on it were unloaded. If so, it will go ahead
and unload all these modules and load them back again. This makes
hot swapping modules that provide dependencies much easier.
Resolves: #474
UserNote: In certain circumstances, modules with dependency relations
can have their dependents automatically recursively unloaded and loaded
again using the "module refresh" CLI command or the ModuleLoad AMI command.
#### res_pjsip_sdp_rtp.c: Initial RTP inactivity check must consider the rtp_timeou..
Author: Henrik Liljedahl
Date: 2024-04-11
First rtp activity check was performed after 500ms regardless of the rtp_timeout setting. Having a call in ringing state for more than rtp_timeout and the first rtp package is received more than 500ms after sdp negotiation and before the rtp_timeout, erronously caused the call to be hungup. Changed to perform the first rtp inactivity check after the timeout setting preventing calls to be disconnected before the rtp_timeout has elapsed since sdp negotiation.
Fixes #710
#### tcptls/iostream: Add support for setting SNI on client TLS connections
Author: George Joseph
Date: 2024-04-23
If the hostname field of the ast_tcptls_session_args structure is
set (which it is for websocket client connections), that hostname
will now automatically be used in an SNI TLS extension in the client
hello.
Resolves: #713
UserNote: Secure websocket client connections now send SNI in
the TLS client hello.
#### stir_shaken: Fix memory leak, typo in config, tn canonicalization
Author: George Joseph
Date: 2024-04-25
* Fixed possible memory leak in tn_config:tn_get_etn() where we
weren't releasing etn if tn or eprofile were null.
* We now canonicalize TNs before using them for lookups or adding
them to Identity headers.
* Fixed a typo in stir_shaken.conf.sample.
Resolves: #716
#### make_buildopts_h: Always include DETECT_DEADLOCKS
Author: George Joseph
Date: 2024-04-27
Since DETECT_DEADLOCKS is now split from DEBUG_THREADS, it must
always be included in buildopts.h instead of only when
ADD_CFLAGS_TO_BUILDOPTS_H is defined. A SEGV will result otherwise.
Resolves: #719
#### sorcery.c: Fixed crash error when executing "module reload"
Author: Spiridonov Dmitry
Date: 2024-04-14
Fixed crash error when cli "module reload". The error appears when
compiling with res_prometheus and using the sorcery memory cache for
registrations
#### callerid.c: Parse previously ignored Caller ID parameters.
Author: Naveen Albert
Date: 2024-04-01
Commit f2f397c1a8cc48913434ebb297f0ff50d96993db previously
made it possible to send Caller ID parameters to FXS stations
which, prior to that, could not be sent.
This change is complementary in that we now handle receiving
all these parameters on FXO lines and provide these up to
the dialplan, via chan_dahdi. In particular:
* If a redirecting reason is provided, the channel's redirecting
reason is set. No redirecting number is set, since there is
no parameter for this in the Caller ID protocol, but the reason
can be checked to determine if and why a call was forwarded.
* If the Call Qualifier parameter is received, the Call Qualifier
variable is set.
* Some comments have been added to explain why some of the code
is the way it is, to assist other people looking at it.
With this change, Asterisk's Caller ID implementation is now
reasonably complete for both FXS and FXO operation.
Resolves: #681
#### logger.h: Add SCOPE_CALL and SCOPE_CALL_WITH_RESULT
Author: George Joseph
Date: 2024-04-09
If you're tracing a large function that may call another function
multiple times in different circumstances, it can be difficult to
see from the trace output exactly which location that function
was called from. There's no good way to automatically determine
the calling location. SCOPE_CALL and SCOPE_CALL_WITH_RESULT
simply print out a trace line before and after the call.
The difference between SCOPE_CALL and SCOPE_CALL_WITH_RESULT is
that SCOPE_CALL ignores the function's return value (if any) where
SCOPE_CALL_WITH_RESULT allows you to specify the type of the
function's return value so it can be assigned to a variable.
SCOPE_CALL_WITH_INT_RESULT is just a wrapper for SCOPE_CALL_WITH_RESULT
and the "int" return type.
#### app_queue.c: Properly handle invalid strategies from realtime.
Author: Sean Bright
Date: 2024-04-13
The existing code sets the queue strategy to `ringall` but it is then
immediately overwritten with an invalid one.
Fixes #707
#### file.c, channel.c: Don't emit warnings if progress received.
Author: Naveen Albert
Date: 2024-04-09
Silently ignore AST_CONTROL_PROGRESS where appropriate,
as most control frames already are.
Resolves: #696
#### alembic: Correct NULLability of PJSIP id columns.
Author: Sean Bright
Date: 2024-04-06
Fixes #695
#### rtp_engine and stun: call ast_register_atexit instead of ast_register_cleanup
Author: George Joseph
Date: 2024-04-02
rtp_engine.c and stun.c were calling ast_register_cleanup which
is skipped if any loadable module can't be cleanly unloaded
when asterisk shuts down. Since this will always be the case,
their cleanup functions never get run. In a practical sense
this makes no difference since asterisk is shutting down but if
you're in development mode and trying to use the leak sanitizer,
the leaks from both of those modules clutter up the output.
#### manager.c: Add missing parameters to Login documentation
Author: George Joseph
Date: 2024-04-03
* Added the AuthType and Key parameters for MD5 authentication.
* Added the Events parameter.
Resolves: #689
#### func_callerid: Emit warning if invalid redirecting reason set.
Author: Naveen Albert
Date: 2024-04-01
Emit a warning if REDIRECTING(reason) is set to an invalid
reason, consistent with what happens when
REDIRECTING(orig-reason) is set to an invalid reason.
Resolves: #683
#### chan_dahdi: Add DAHDIShowStatus AMI action.
Author: Naveen Albert
Date: 2024-03-29
* Add an AMI action to correspond to the "dahdi show status"
command, allowing span information to be retrieved via AMI.
* Show span number and sig type in "dahdi show channels".
Resolves: #673
#### res_pjsip_endpoint_identifier_ip: Add endpoint identifier transport address.
Author: Sperl Viktor
Date: 2024-03-28
Add a new identify_by option to res_pjsip_endpoint_identifier_ip
called 'transport' this matches endpoints based on the bound
ip address (local) instead of the 'ip' option, which matches on
the source ip address (remote).
UserNote: set identify_by=transport for the pjsip endpoint. Then
use the existing 'match' option and the new 'transport' option of
the identify.
Fixes: #672
#### res_stir_shaken: Fix compilation for CentOS7 (openssl 1.0.2)
Author: George Joseph
Date: 2024-04-01
* OpenSSL 1.0.2 doesn't support X509_get0_pubkey so we now use
X509_get_pubkey. The difference is that X509_get_pubkey requires
the caller to free the EVP_PKEY themselves so we now let
RAII_VAR do that.
* OpenSSL 1.0.2 doesn't support upreffing an X509_STORE so we now
wrap it in an ao2 object.
* OpenSSL 1.0.2 doesn't support X509_STORE_get0_objects to get all
the certs from an X509_STORE and there's no easy way to polyfill
it so the CLI commands that list profiles will show a "not
supported" message instead of listing the certs in a store.
Resolves: #676
#### Fix incorrect application and function documentation references
Author: George Joseph
Date: 2024-04-01
There were a few references in the embedded documentation XML
where the case didn't match or where the referenced app or function
simply didn't exist any more. These were causing 404 responses
in docs.asterisk.org.
#### cli.c: `core show channels concise` is not really deprecated.
Author: Sean Bright
Date: 2024-04-01
Fixes #675
#### res_pjsip_endpoint_identifier_ip: Endpoint identifier request URI
Author: Sperl Viktor
Date: 2024-03-28
Add ability to match against PJSIP request URI.
UserNote: this new feature let users match endpoints based on the
indound SIP requests' URI. To do so, add 'request_uri' to the
endpoint's 'identify_by' option. The 'match_request_uri' option of
the identify can be an exact match for the entire request uri, or a
regular expression (between slashes). It's quite similar to the
header identifer.
Fixes: #599
#### chan_dahdi: Don't retry opening nonexistent channels on restart.
Author: Naveen Albert
Date: 2024-03-26
Commit 729cb1d390b136ccc696430aa5c68d60ea4028be added logic to retry
opening DAHDI channels on "dahdi restart" if they failed initially,
up to 1,000 times in a loop, to address cases where the channel was
still in use. However, this retry loop does not use the actual error,
which means chan_dahdi will also retry opening nonexistent channels
1,000 times per channel, causing a flood of unnecessary warning logs
for an operation that will never succeed, with tens or hundreds of
thousands of open attempts being made.
The original patch would have been more targeted if it only retried
on the specific relevant error (likely EBUSY, although it's hard to
say since the original issue is no longer available).
To avoid the problem above while avoiding the possibility of breakage,
this skips the retry logic if the error is ENXIO (No such device or
address), since this will never succeed.
Resolves: #669
#### Implement Configurable TCP Keepalive Settings in PJSIP Transports
Author: Joshua Elson
Date: 2024-03-18
This commit introduces configurable TCP keepalive settings for both TCP and TLS transports. The changes allow for finer control over TCP connection keepalives, enhancing stability and reliability in environments prone to connection timeouts or where intermediate devices may prematurely close idle connections. This has proven necessary and has already been tested in production in several specialized environments where access to the underlying transport is unreliable in ways invisible to the operating system directly, so these keepalive and timeout mechanisms are necessary.
Fixes #657
#### res_pjsip_refer.c: Allow GET_TRANSFERRER_DATA
Author: Martin Tomec
Date: 2024-02-06
There was functionality in chan_sip to get REFER headers, with GET_TRANSFERRER_DATA variable. This commit implements the same functionality in pjsip, to ease transfer from chan_sip to pjsip.
Fixes: #579
UserNote: the GET_TRANSFERRER_DATA dialplan variable can now be used also in pjsip.
#### res_ari.c: Add additional output to ARI requests when debug is enabled
Author: Martin Nystroem
Date: 2024-03-22
When ARI debug is enabled the logs will now output http method and the uri.
Fixes: #666
#### alembic: Fix compatibility with SQLAlchemy 2.0+.
Author: Sean Bright
Date: 2024-03-20
SQLAlchemy 2.0 changed the way that commits/rollbacks are handled
causing the final `UPDATE` to our `alembic_version_<whatever>` tables
to be rolled back instead of committed.
We now use one connection to determine which
`alembic_version_<whatever>` table to use and another to run the
actual migrations. This prevents the erroneous rollback.
This change is compatible with both SQLAlchemy 1.4 and 2.0.
#### manager.c: Add new parameter 'PreDialGoSub' to Originate AMI action
Author: jonatascalebe
Date: 2024-03-14
manager.c: Add new parameter 'PreDialGoSub' to Originate AMI action
The action originate does not has the ability to run an subroutine at initial channel, like the Aplication Originate. This update give this ability for de action originate too.
For example, we can run a routine via Gosub on the channel to request an automatic answer, so the caller does not need to accept the call when using the originate command via manager, making the operation more efficient.
UserNote: When using the Originate AMI Action, we now can pass the PreDialGoSub parameter, instructing the asterisk to perform an subrouting at channel before call start. With this parameter an call initiated by AMI can request the channel to start the call automaticaly, adding a SIP header to using GoSUB, instructing to autoanswer the channel, and proceeding the outbuound extension executing. Exemple of an context to perform the previus indication:
[addautoanswer]
exten => _s,1,Set(PJSIP_HEADER(add,Call-Info)=answer-after=0)
exten => _s,n,Set(PJSIP_HEADER(add,Alert-Info)=answer-after=0)
exten => _s,n,Return()
#### menuselect: Minor cosmetic fixes.
Author: Naveen Albert
Date: 2024-03-21
Improve some of the formatting from
dd3f17c699e320d6d30c94298d8db49573ba28da
(#521).
#### pbx_variables.c: Prevent SEGV due to stack overflow.
Author: Naveen Albert
Date: 2023-12-04
It is possible for dialplan to result in an infinite
recursion of variable substitution, which eventually
leads to stack overflow. If we detect this, abort
substitution and log an error for the user to fix
the broken dialplan.
Resolves: #480
UpgradeNote: The maximum amount of dialplan recursion
using variable substitution (such as by using EVAL_EXTEN)
is capped at 15.
#### res_prometheus: Fix duplicate output of metric and help text
Author: Holger Hans Peter Freyther
Date: 2024-02-24
The prometheus exposition format requires each line to be unique[1].
This is handled by struct prometheus_metric having a list of children
that is managed when registering a metric. In case the scrape callback
is used, it is the responsibility of the implementation to handle this
correctly.
Originally the bridge callback didn't handle NULL snapshots, the crash
fix lead to NULL metrics, and fixing that lead to duplicates.
The original code assumed that snapshots are not NULL and then relied on
"if (i > 0)" to establish the parent/children relationship between
metrics of the same class. This is not workerable as the first bridge
might be invisible/lacks a snapshot.
Fix this by keeping a separate array of the first metric by class.
Instead of relying on the index of the bridge, check whether the array
has an entry. Use that array for the output.
Add a test case that verifies that the help text is not duplicated.
Resolves: #642
[1] https://prometheus.io/docs/instrumenting/exposition_formats/#grouping-and-sorting
#### manager.c: Add CLI command to kick AMI sessions.
Author: Naveen Albert
Date: 2023-12-06
This adds a CLI command that can be used to manually
kick specific AMI sessions.
Resolves: #485
UserNote: The "manager kick session" CLI command now
allows kicking a specified AMI session.
#### chan_dahdi: Allow specifying waitfordialtone per call.
Author: Naveen Albert
Date: 2023-12-02
The existing "waitfordialtone" setting in chan_dahdi.conf
applies permanently to a specific channel, regardless of
how it is being used. This rather restrictively prevents
a system from simultaneously being able to pick free lines
for outgoing calls while also allowing barge-in to a trunk
by some other arrangement.
This allows specifying "waitfordialtone" using the CHANNEL
function for only the next call that will be placed, allowing
significantly more flexibility in the use of trunk interfaces.
Resolves: #472
UserNote: "waitfordialtone" may now be specified for DAHDI
trunk channels on a per-call basis using the CHANNEL function.
#### res_parking: Fail gracefully if parking lot is full.
Author: Naveen Albert
Date: 2024-03-03
Currently, if a parking lot is full, bridge setup returns -1,
causing dialplan execution to terminate without TryExec.
However, such failures should be handled more gracefully,
the same way they are on other paths, as indicated by the
module's author, here:
http://lists.digium.com/pipermail/asterisk-dev/2018-December/077144.html
Now, callers will hear the parking failure announcement, and dialplan
will continue, which is consistent with existing failure modes.
Resolves: #624
#### res_config_mysql.c: Support hostnames up to 255 bytes.
Author: Sean Bright
Date: 2024-03-18
Fixes #654
#### res_pjsip: Fix alembic downgrade for boolean columns.
Author: Sean Bright
Date: 2024-03-18
When downgrading, ensure that we don't touch columns that didn't
actually change during upgrade.
#### Upgrade bundled pjproject to 2.14.1
Author: Stanislav Abramenkov
Date: 2024-03-12
Fixes: asterisk#648
UserNote: Bundled pjproject has been upgraded to 2.14.1. For more
information visit pjproject Github page: https://github.com/pjsip/pjproject/releases/tag/2.14.1
#### alembic: Quote new MySQL keyword 'qualify.'
Author: Sean Bright
Date: 2024-03-15
Fixes #651
#### res_pjsip_session: Reset pending_media_state->read_callbacks
Author: Maximilian Fridrich
Date: 2024-02-15
In handle_negotiated_sdp the pending_media_state->read_callbacks must be
reset before they are added in the SDP handlers in
handle_negotiated_sdp_session_media. Otherwise, old callbacks for
removed streams and file descriptors could be added to the channel and
Asterisk would poll on non-existing file descriptors.
Resolves: #611
#### res_monitor.c: Don't emit a warning about 'X' being unrecognized.
Author: Sean Bright
Date: 2024-03-07
Code was added in 030f7d41 to warn if an unrecognized option was
passed to an application, but code in Monitor was taking advantage of
the fact that the application would silently accept an invalid option.
We now recognize the invalid option but we don't do anything if it's
set.
Fixes #639

View File

@@ -1,53 +0,0 @@
## Change Log for Release asterisk-20.8.1
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.8.1.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.8.0...20.8.1)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.8.1.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 1
- Commit Authors: 1
- Issues Resolved: 0
- Security Advisories Resolved: 1
- [GHSA-qqxj-v78h-hrf9](https://github.com/asterisk/asterisk/security/advisories/GHSA-qqxj-v78h-hrf9): res_pjsip_endpoint_identifier_ip: wrongly matches ALL unauthorized SIP requests
### User Notes:
### Upgrade Notes:
### Commit Authors:
- George Joseph: (1)
## Issue and Commit Detail:
### Closed Issues:
- !GHSA-qqxj-v78h-hrf9: res_pjsip_endpoint_identifier_ip: wrongly matches ALL unauthorized SIP requests
### Commits By Author:
- ### George Joseph (1):
- Revert "res_pjsip_endpoint_identifier_ip: Add endpoint identifier transport ad..
### Commit List:
### Commit Details:
#### Revert "res_pjsip_endpoint_identifier_ip: Add endpoint identifier transport ad..
Author: George Joseph
Date: 2024-05-17
This reverts PR #602
Resolves: #GHSA-qqxj-v78h-hrf9

View File

@@ -1,461 +0,0 @@
## Change Log for Release asterisk-20.9.0
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.9.0.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.8.1...20.9.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.9.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 20
- Commit Authors: 9
- Issues Resolved: 8
- Security Advisories Resolved: 0
### User Notes:
- #### app_voicemail_odbc: Allow audio to be kept on disk
This commit adds a new voicemail.conf option
'odbc_audio_on_disk' which when set causes the ODBC variant of
app_voicemail_odbc to leave the message and greeting audio files
on disk and only store the message metadata in the database.
Much more information can be found in the voicemail.conf.sample
file.
- #### app_queue: Add option to not log Restricted Caller ID to queue_log
Add a Queue option log-restricted-caller-id to control whether the Restricted Caller ID
will be stored in the queue log.
If log-restricted-caller-id=no then the Caller ID will be stripped if the Caller ID is restricted.
- #### pbx.c: expand fields width of "core show hints"
The fields width of "core show hints" were increased.
The width of "extension" field to 30 characters and
the width of the "device state id" field to 60 characters.
- #### rtp_engine: add support for multirate RFC2833 digits
No change in configuration is required in order to enable this
feature. Endpoints configured to use RFC2833 will automatically have this
enabled. If the endpoint does not support this, it should not include it in
the SDP offer/response.
Resolves: #699
### Upgrade Notes:
- #### app_queue: Add option to not log Restricted Caller ID to queue_log
Add a new column to the queues table:
queue_log_option_log_restricted ENUM('0','1','off','on','false','true','no','yes')
to control whether the Restricted Caller ID will be stored in the queue log.
### Commit Authors:
- Alexei Gradinari: (2)
- Bastian Triller: (1)
- Chrsmj: (1)
- George Joseph: (4)
- Igor Goncharovsky: (1)
- Mike Bradeen: (2)
- Sean Bright: (7)
- Tinet-Mucw: (1)
- Walter Doekes: (1)
## Issue and Commit Detail:
### Closed Issues:
- 699: [improvement]: Add support for multi-rate DTMF
- 736: [bug]: Seg fault on CLI after PostgreSQL CDR module fails to load for a second time
- 765: [improvement]: Add option to not log Restricted Caller ID to queue_log
- 770: [improvement]: pbx.c: expand fields width of "core show hints"
- 776: [bug] DTMF broken after rtp_engine: add support for multirate RFC2833 digits commit
- 783: [bug]: Under certain circumstances a channel snapshot can get orphaned in the cache
- 789: [bug]: Mediasec headers aren't sent on outgoing INVITEs
- 797: [bug]:
### Commits By Author:
- ### Alexei Gradinari (2):
- pbx.c: expand fields width of "core show hints"
- app_queue: Add option to not log Restricted Caller ID to queue_log
- ### Bastian Triller (1):
- cli: Show configured cache dir
- ### George Joseph (4):
- app_voicemail_odbc: Allow audio to be kept on disk
- stasis_channels: Use uniqueid and name to delete old snapshots
- security_agreement.c: Always add the Require and Proxy-Require headers
- ast-db-manage: Remove duplicate enum creation
- ### Igor Goncharovsky (1):
- res_pjsip_path.c: Fix path when dialing using PJSIP_DIAL_CONTACTS()
- ### Mike Bradeen (2):
- rtp_engine: add support for multirate RFC2833 digits
- res_pjsip_sdp_rtp: Add support for default/mismatched 8K RFC 4733/2833 digits
- ### Sean Bright (7):
- file.h: Rename function argument to avoid C++ keyword clash.
- bundled_pjproject: Disable UPnP support.
- asterisk.c: Don't log an error if .asterisk_history does not exist.
- xml.c: Update deprecated libxml2 API usage.
- manager.c: Properly terminate `CoreShowChannelMap` event.
- pjsip: Add PJSIP_PARSE_URI_FROM dialplan function.
- logger.h: Include SCOPE_CALL_WITH_INT_RESULT() in non-dev-mode builds.
- ### Tinet-mucw (1):
- bridge_basic.c: Make sure that ast_bridge_channel is not destroyed while itera..
- ### Walter Doekes (1):
- chan_ooh323: Fix R/0 typo in docs
- ### chrsmj (1):
- cdr_pgsql: Fix crash when the module fails to load multiple times.
### Commit List:
- res_pjsip_path.c: Fix path when dialing using PJSIP_DIAL_CONTACTS()
- res_pjsip_sdp_rtp: Add support for default/mismatched 8K RFC 4733/2833 digits
- ast-db-manage: Remove duplicate enum creation
- security_agreement.c: Always add the Require and Proxy-Require headers
- logger.h: Include SCOPE_CALL_WITH_INT_RESULT() in non-dev-mode builds.
- stasis_channels: Use uniqueid and name to delete old snapshots
- app_voicemail_odbc: Allow audio to be kept on disk
- app_queue: Add option to not log Restricted Caller ID to queue_log
- pbx.c: expand fields width of "core show hints"
- pjsip: Add PJSIP_PARSE_URI_FROM dialplan function.
- manager.c: Properly terminate `CoreShowChannelMap` event.
- cli: Show configured cache dir
- xml.c: Update deprecated libxml2 API usage.
- cdr_pgsql: Fix crash when the module fails to load multiple times.
- asterisk.c: Don't log an error if .asterisk_history does not exist.
- chan_ooh323: Fix R/0 typo in docs
- bundled_pjproject: Disable UPnP support.
- file.h: Rename function argument to avoid C++ keyword clash.
- rtp_engine: add support for multirate RFC2833 digits
### Commit Details:
#### res_pjsip_path.c: Fix path when dialing using PJSIP_DIAL_CONTACTS()
Author: Igor Goncharovsky
Date: 2024-05-12
When using the PJSIP_DIAL_CONTACTS() function for use in the Dial()
command, the contacts are returned in text form, so the input to
the path_outgoing_request() function is a contact value of NULL.
The issue was reported in ASTERISK-28211, but was not actually fixed
in ASTERISK-30100. This fix brings back the code that was previously
removed and adds code to search for a contact to extract the path
value from it.
#### res_pjsip_sdp_rtp: Add support for default/mismatched 8K RFC 4733/2833 digits
Author: Mike Bradeen
Date: 2024-06-21
After change made in 624f509 to add support for non 8K RFC 4733/2833 digits,
Asterisk would only accept RFC 4733/2833 offers that matched the sample rate of
the negotiated codec(s).
This change allows Asterisk to accept 8K RFC 4733/2833 offers if the UAC
offfers 8K RFC 4733/2833 but negotiates for a non 8K bitrate codec.
A number of corresponding tests in tests/channels/pjsip/dtmf_sdp also needed to
be re-written to allow for these scenarios.
Fixes: #776
#### ast-db-manage: Remove duplicate enum creation
Author: George Joseph
Date: 2024-07-08
Remove duplicate creation of ast_bool_values from
2b7c507d7d12_add_queue_log_option_log_restricted_.py. This was
causing alembic upgrades to fail since the enum was already created
in fe6592859b85_fix_mwi_subscribe_replaces_.py back in 2018.
Resolves: #797
#### security_agreement.c: Always add the Require and Proxy-Require headers
Author: George Joseph
Date: 2024-07-03
The `Require: mediasec` and `Proxy-Require: mediasec` headers need
to be sent whenever we send `Security-Client` or `Security-Verify`
headers but the logic to do that was only in add_security_headers()
in res_pjsip_outbound_register. So while we were sending them on
REGISTER requests, we weren't sending them on INVITE requests.
This commit moves the logic to send the two headers out of
res_pjsip_outbound_register:add_security_headers() and into
security_agreement:ast_sip_add_security_headers(). This way
they're always sent when we send `Security-Client` or
`Security-Verify`.
Resolves: #789
#### logger.h: Include SCOPE_CALL_WITH_INT_RESULT() in non-dev-mode builds.
Author: Sean Bright
Date: 2024-06-29
Fixes #785
#### stasis_channels: Use uniqueid and name to delete old snapshots
Author: George Joseph
Date: 2024-05-08
Whenver a new channel snapshot is created or when a channel is
destroyed, we need to delete any existing channel snapshot from
the snapshot cache. Historically, we used the channel->snapshot
pointer to delete any existing snapshots but this has two issues.
First, if something (possibly ast_channel_internal_swap_snapshots)
sets channel->snapshot to NULL while there's still a snapshot in
the cache, we wouldn't be able to delete it and it would be orphaned
when the channel is destroyed. Since we use the cache to list
channels from the CLI, AMI and ARI, it would appear as though the
channel was still there when it wasn't.
Second, since there are actually two caches, one indexed by the
channel's uniqueid, and another indexed by the channel's name,
deleting from the caches by pointer requires a sequential search of
all of the hash table buckets in BOTH caches to find the matching
snapshots. Not very efficient.
So, we now delete from the caches using the channel's uniqueid
and name. This solves both issues.
This doesn't address how channel->snapshot might have been set
to NULL in the first place because although we have concrete
evidence that it's happening, we haven't been able to reproduce it.
Resolves: #783
#### app_voicemail_odbc: Allow audio to be kept on disk
Author: George Joseph
Date: 2024-04-09
This commit adds a new voicemail.conf option 'odbc_audio_on_disk'
which when set causes the ODBC variant of app_voicemail to leave
the message and greeting audio files on disk and only store the
message metadata in the database. This option came from a concern
that the database could grow to large and cause remote access
and/or replication to become slow. In a clustering situation
with this option, all asterisk instances would share the same
database for the metadata and either use a shared filesystem
or other filesystem replication service much more suitable
for synchronizing files.
The changes to app_voicemail to implement this feature were actually
quite small but due to the complexity of the module, the actual
source code changes were greater. They fall into the following
categories:
* Tracing. The module is so complex that it was impossible to
figure out the path taken for various scenarios without the addition
of many SCOPE_ENTER, SCOPE_EXIT and ast_trace statements, even in
code that's not related to the functional change. Making this worse
was the fact that many "if" statements in this module didn't use
braces. Since the tracing macros add multiple statements, many "if"
statements had to be converted to use braces.
* Excessive use of PATH_MAX. Previous maintainers of this module
used PATH_MAX to allocate character arrays for filesystem paths
and SQL statements as though they cost nothing. In fact, PATH_MAX
is defined as 4096 bytes! Some functions had (and still have)
multiples of these. One function has 7. Given that the vast
majority of installations use the default spool directory path
`/var/spool/asterisk/voicemail`, the actual path length is usually
less than 80 bytes. That's over 4000 bytes wasted. It was the
same for SQL statement buffers. A 4K buffer for statement that
only needed 60 bytes. All of these PATH_MAX allocations in the
ODBC related code were changed to dynamically allocated buffers.
The rest will have to be addressed separately.
* Bug fixes. During the development of this feature, several
pre-existing ODBC related bugs were discovered and fixed. They
had to do with leaving orphaned files on disk, not preserving
original message ids when moving messages between folders,
not honoring the "formats" config parameter in certain circumstances,
etc.
UserNote: This commit adds a new voicemail.conf option
'odbc_audio_on_disk' which when set causes the ODBC variant of
app_voicemail_odbc to leave the message and greeting audio files
on disk and only store the message metadata in the database.
Much more information can be found in the voicemail.conf.sample
file.
#### bridge_basic.c: Make sure that ast_bridge_channel is not destroyed while itera..
Author: Tinet-mucw
Date: 2024-06-13
Resolves: https://github.com/asterisk/asterisk/issues/768
#### app_queue: Add option to not log Restricted Caller ID to queue_log
Author: Alexei Gradinari
Date: 2024-06-12
Add a queue option log-restricted-caller-id to strip the Caller ID when storing the ENTERQUEUE event
in the queue log if the Caller ID is restricted.
Resolves: #765
UpgradeNote: Add a new column to the queues table:
queue_log_option_log_restricted ENUM('0','1','off','on','false','true','no','yes')
to control whether the Restricted Caller ID will be stored in the queue log.
UserNote: Add a Queue option log-restricted-caller-id to control whether the Restricted Caller ID
will be stored in the queue log.
If log-restricted-caller-id=no then the Caller ID will be stripped if the Caller ID is restricted.
#### pbx.c: expand fields width of "core show hints"
Author: Alexei Gradinari
Date: 2024-06-13
The current width for "extension" is 20 and "device state id" is 20, which is too small.
The "extension" field contains "ext"@"context", so 20 characters is not enough.
The "device state id" field, for example for Queue pause state contains Queue:"queue_name"_pause_PSJIP/"endpoint", so the 20 characters is not enough.
Increase the width of "extension" field to 30 characters and the width of the "device state id" field to 60 characters.
Resolves: #770
UserNote: The fields width of "core show hints" were increased.
The width of "extension" field to 30 characters and
the width of the "device state id" field to 60 characters.
#### pjsip: Add PJSIP_PARSE_URI_FROM dialplan function.
Author: Sean Bright
Date: 2024-06-02
Various SIP headers permit a URI to be prefaced with a `display-name`
production that can include characters (like commas and parentheses)
that are problematic for Asterisk's dialplan parser and, specifically
in the case of this patch, the PJSIP_PARSE_URI function.
This patch introduces a new function - `PJSIP_PARSE_URI_FROM` - that
behaves identically to `PJSIP_PARSE_URI` except that the first
argument is now a variable name and not a literal URI.
Fixes #756
#### manager.c: Properly terminate `CoreShowChannelMap` event.
Author: Sean Bright
Date: 2024-06-10
Fixes #761
#### cli: Show configured cache dir
Author: Bastian Triller
Date: 2024-06-07
Since Asterisk 19 it is possible to cache recorded files into another
directory [1] [2].
Show configured location of cache dir in CLI's core show settings.
[1] ASTERISK-29143
[2] b08427134fd51bb549f198e9f60685f2680c68d7
#### xml.c: Update deprecated libxml2 API usage.
Author: Sean Bright
Date: 2024-05-23
Two functions are deprecated as of libxml2 2.12:
* xmlSubstituteEntitiesDefault
* xmlParseMemory
So we update those with supported API.
Additionally, `res_calendar_caldav` has been updated to use libxml2's
xmlreader API instead of the SAX2 API which has always felt a little
hacky (see deleted comment block in `res_calendar_caldav.c`).
The xmlreader API has been around since libxml2 2.5.0 which was
released in 2003.
Fixes #725
#### cdr_pgsql: Fix crash when the module fails to load multiple times.
Author: chrsmj
Date: 2024-05-16
Missing or corrupt cdr_pgsql.conf configuration file can cause the
second attempt to load the PostgreSQL CDR module to crash Asterisk via
the Command Line Interface because a null CLI command is registered on
the first failed attempt to load the module.
Resolves: #736
#### asterisk.c: Don't log an error if .asterisk_history does not exist.
Author: Sean Bright
Date: 2024-05-27
Fixes #751
#### chan_ooh323: Fix R/0 typo in docs
Author: Walter Doekes
Date: 2024-05-27
#### bundled_pjproject: Disable UPnP support.
Author: Sean Bright
Date: 2024-05-24
Fixes #747
#### file.h: Rename function argument to avoid C++ keyword clash.
Author: Sean Bright
Date: 2024-05-24
Fixes #744
#### rtp_engine: add support for multirate RFC2833 digits
Author: Mike Bradeen
Date: 2024-04-08
Add RFC2833 DTMF support for 16K, 24K, and 32K bitrate codecs.
Asterisk currently treats RFC2833 Digits as a single rtp payload type
with a fixed bitrate of 8K. This change would expand that to 8, 16,
24 and 32K.
This requires checking the offered rtp types for any of these bitrates
and then adding an offer for each (if configured for RFC2833.) DTMF
generation must also be changed in order to look at the current outbound
codec in order to generate appropriately timed rtp.
For cases where no outgoing audio has yet been sent prior to digit
generation, Asterisk now has a concept of a 'preferred' codec based on
offer order.
On inbound calls Asterisk will mimic the payload types of the RFC2833
digits.
On outbound calls Asterisk will choose the next free payload types starting
with 101.
UserNote: No change in configuration is required in order to enable this
feature. Endpoints configured to use RFC2833 will automatically have this
enabled. If the endpoint does not support this, it should not include it in
the SDP offer/response.
Resolves: #699

View File

@@ -1,69 +0,0 @@
## Change Log for Release asterisk-20.9.1
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.9.1.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.9.0...20.9.1)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.9.1.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 2
- Commit Authors: 1
- Issues Resolved: 2
- Security Advisories Resolved: 0
### User Notes:
### Upgrade Notes:
### Commit Authors:
- George Joseph: (2)
## Issue and Commit Detail:
### Closed Issues:
- 819: [bug]: Typo in voicemail.conf.sample that stops it from loading when using "make samples"
- 822: [bug]: segfault in main/rtp_engine.c:1489 after updating 20.8.1 -> 20.9.0
### Commits By Author:
- #### George Joseph (2):
- voicemail.conf.sample: Fix ':' comment typo
- rtp_engine.c: Prevent segfault in ast_rtp_codecs_payloads_unset()
### Commit List:
- rtp_engine.c: Prevent segfault in ast_rtp_codecs_payloads_unset()
- voicemail.conf.sample: Fix ':' comment typo
### Commit Details:
#### rtp_engine.c: Prevent segfault in ast_rtp_codecs_payloads_unset()
Author: George Joseph
Date: 2024-07-25
There can be empty slots in payload_mapping_tx corresponding to
dynamic payload types that haven't been seen before so we now
check for NULL before attempting to use 'type' in the call to
ast_format_cmp.
Note: Currently only chan_sip calls ast_rtp_codecs_payloads_unset()
Resolves: #822
#### voicemail.conf.sample: Fix ':' comment typo
Author: George Joseph
Date: 2024-07-24
...and removed an errant trailing space.
Resolves: #819

View File

@@ -1,65 +0,0 @@
## Change Log for Release asterisk-20.9.2
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.9.2.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.9.1...20.9.2)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.9.2.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 1
- Commit Authors: 1
- Issues Resolved: 0
- Security Advisories Resolved: 1
- [GHSA-c4cg-9275-6w44](https://github.com/asterisk/asterisk/security/advisories/GHSA-c4cg-9275-6w44): Write=originate, is sufficient permissions for code execution / System() dialplan
### User Notes:
### Upgrade Notes:
### Commit Authors:
- George Joseph: (1)
## Issue and Commit Detail:
### Closed Issues:
- !GHSA-c4cg-9275-6w44: Write=originate, is sufficient permissions for code execution / System() dialplan
### Commits By Author:
- #### George Joseph (1):
- manager.c: Add entries to Originate blacklist
### Commit List:
- manager.c: Add entries to Originate blacklist
### Commit Details:
#### manager.c: Add entries to Originate blacklist
Author: George Joseph
Date: 2024-07-22
Added Reload and DBdeltree to the list of dialplan application that
can't be executed via the Originate manager action without also
having write SYSTEM permissions.
Added CURL, DB*, FILE, ODBC and REALTIME* to the list of dialplan
functions that can't be executed via the Originate manager action
without also having write SYSTEM permissions.
If the Queue application is attempted to be run by the Originate
manager action and an AGI parameter is specified in the app data,
it'll be rejected unless the manager user has either the AGI or
SYSTEM permissions.
Resolves: #GHSA-c4cg-9275-6w44

View File

@@ -1,63 +0,0 @@
## Change Log for Release asterisk-20.9.3
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-20.9.3.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/20.9.2...20.9.3)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.9.3.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 1
- Commit Authors: 1
- Issues Resolved: 0
- Security Advisories Resolved: 1
- [GHSA-v428-g3cw-7hv9](https://github.com/asterisk/asterisk/security/advisories/GHSA-v428-g3cw-7hv9): A malformed Contact or Record-Route URI in an incoming SIP request can cause Asterisk to crash when res_resolver_unbound is used
### User Notes:
### Upgrade Notes:
### Commit Authors:
- George Joseph: (1)
## Issue and Commit Detail:
### Closed Issues:
- !GHSA-v428-g3cw-7hv9: A malformed Contact or Record-Route URI in an incoming SIP request can cause Asterisk to crash when res_resolver_unbound is used
### Commits By Author:
- #### George Joseph (1):
- res_resolver_unbound: Test for NULL ub_result in unbound_resolver_callback
### Commit List:
- res_resolver_unbound: Test for NULL ub_result in unbound_resolver_callback
### Commit Details:
#### res_resolver_unbound: Test for NULL ub_result in unbound_resolver_callback
Author: George Joseph
Date: 2024-08-12
The ub_result pointer passed to unbound_resolver_callback by
libunbound can be NULL if the query was for something malformed
like `.1` or `[.1]`. If it is, we now set a 'ns_r_formerr' result
and return instead of crashing with a SEGV. This causes pjproject
to simply cancel the transaction with a "No answer record in the DNS
response" error. The existing "off nominal" unit test was also
updated to check this condition.
Although not necessary for this fix, we also made
ast_dns_resolver_completed() tolerant of a NULL result.
Resolves: GHSA-v428-g3cw-7hv9

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

52
LICENSE
View File

@@ -1,6 +1,6 @@
Asterisk is distributed under the GNU General Public License version 2
and is also available under alternative licenses negotiated directly
with Sangoma US Inc. If you obtained Asterisk under the GPL, then the GPL
with Digium, Inc. If you obtained Asterisk under the GPL, then the GPL
applies to all loadable Asterisk modules used on your system as well,
except as defined below. The GPL (version 2) is included in this
source tree in the file COPYING.
@@ -10,13 +10,14 @@ Asterisk itself; these components are in the 'contrib' directory
and its subdirectories. These components are also distributed under the
GPL version 2 as well.
Sangoma US Inc. holds copyright and/or sufficient licenses to all
components of the Asterisk package, and therefore can grant, at its
sole discretion, the ability for companies, individuals, or
organizations to create proprietary or Open Source (even if not GPL)
modules which may be dynamically linked at runtime with the portions
of Asterisk which fall under our copyright/license umbrella, or are
distributed under more flexible licenses than GPL.
Digium, Inc. (formerly Linux Support Services) holds copyright
and/or sufficient licenses to all components of the Asterisk
package, and therefore can grant, at its sole discretion, the ability
for companies, individuals, or organizations to create proprietary or
Open Source (even if not GPL) modules which may be dynamically linked at
runtime with the portions of Asterisk which fall under our
copyright/license umbrella, or are distributed under more flexible
licenses than GPL.
If you wish to use our code in other GPL programs, don't worry --
there is no requirement that you provide the same exception in your
@@ -24,27 +25,27 @@ GPL'd products (although if you've written a module for Asterisk we
would strongly encourage you to make the same exception that we do).
Specific permission is also granted to link Asterisk with OpenSSL, OpenH323
UniMRCP, and/or the UW IMAP Toolkit and distribute the resulting binary files.
and/or the UW IMAP Toolkit and distribute the resulting binary files.
In addition, Asterisk implements several management/control protocols.
This includes the Asterisk Manager Interface (AMI), the Asterisk Gateway
Interface (AGI), and the Asterisk REST Interface (ARI). It is our belief
that applications using these protocols to manage or control an Asterisk
instance do not have to be licensed under the GPL or a compatible license,
as we believe these protocols do not create a 'derivative work' as referred
to in the GPL. However, should any court or other judiciary body find that
these protocols do fall under the terms of the GPL, then we hereby grant you a
license to use these protocols in combination with Asterisk in external
In addition, Asterisk implements two management/control protocols: the
Asterisk Manager Interface (AMI) and the Asterisk Gateway Interface
(AGI). It is our belief that applications using these protocols to
manage or control an Asterisk instance do not have to be licensed
under the GPL or a compatible license, as we believe these protocols
do not create a 'derivative work' as referred to in the GPL. However,
should any court or other judiciary body find that these protocols do
fall under the terms of the GPL, then we hereby grant you a license to
use these protocols in combination with Asterisk in external
applications licensed under any license you wish.
The 'Asterisk' name and logos are trademarks owned by Sangoma US Inc,
The 'Asterisk' name and logos are trademarks owned by Digium, Inc.,
and use of them is subject to our trademark licensing policies. If you
wish to use these trademarks for purposes other than simple
redistribution of Asterisk source code obtained from Sangoma, you
redistribution of Asterisk source code obtained from Digium, you
should contact our licensing department to determine the necessary
steps you must take. For more information on this policy, please read:
https://www.sangoma.com/wp-content/uploads/Sangoma-Trademark-Policy-1.pdf
http://www.digium.com/en/company/profile/trademarkpolicy.php
If you have any questions regarding our licensing policy, please
contact us:
@@ -52,9 +53,10 @@ contact us:
+1.877.344.4861 (via telephone in the USA)
+1.256.428.6000 (via telephone outside the USA)
+1.256.864.0464 (via FAX inside or outside the USA)
legal@sangoma.com (via email)
IAX2/pbx.digium.com (via IAX2)
licensing@digium.com (via email)
Sangoma US Inc.
301 N. Cattlemen Road, Suite 300
Sarasota, FL 34232
Digium, Inc.
445 Jan Davis Drive
Huntsville, AL 35806
USA

672
Makefile

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
#
# Asterisk -- An open source telephony toolkit.
# Asterisk -- A telephony toolkit for Linux.
#
# Makefile rules for subdirectories containing modules
#
@@ -18,10 +18,18 @@
# Also note that we can only set one variable per rule, so we have to
# repeat the left hand side to set multiple variables.
ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
_ASTCFLAGS+=${GC_CFLAGS}
endif
ifneq ($(findstring STATIC_BUILD,$(MENUSELECT_CFLAGS)),)
STATIC_BUILD=-static
endif
include $(ASTTOPDIR)/Makefile.rules
# If MODULE_PREFIX is defined, use it to run the standard functions to set
# C_MODS, CC_MODS and LOADABLE_MODS
# C_MODS, CC_MODS, LOADABLE_MODS and EMBEDDED_MODS.
# Each word of MODULE_PREFIX is a prefix for filenames that we consider
# valid C or CC modules (eg. app, func ...). Note that the underscore
# is added here, and does not need to be in MODULE_PREFIX
@@ -34,11 +42,15 @@ ifneq ($(MODULE_PREFIX),)
ALL_C_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.c,%,$(wildcard $(p)_*.c)))
ALL_CC_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.cc,%,$(wildcard $(p)_*.cc)))
endif
C_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_C_MODS))
CC_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_CC_MODS))
LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
ifneq ($(findstring EMBED_$(MENUSELECT_CATEGORY),$(MENUSELECT_EMBED)),)
EMBEDDED_MODS:=$(C_MODS) $(CC_MODS)
else
LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
endif
# Both C++ and C++ sources need their module name in AST_MODULE
# We also pass whatever _INCLUDE list is generated by menuselect
@@ -48,29 +60,7 @@ LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
# is used to collect the required flags for a module... which can
# then be used any place they are required.
MOD_ASTCFLAGS=\
-DAST_MODULE=\"$(1)\" \
-DAST_MODULE_SELF_SYM=__internal_$(1)_self \
$(MENUSELECT_OPTS_$(1):%=-D%) \
$(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$(value $(dep)_INCLUDE))
define MOD_ADD_SOURCE
$(1).so: $$(subst $(3),$(5),$(2))
$$(subst $(3),$(5),$(2)): _ASTCFLAGS+=$$(call MOD_ASTCFLAGS,$(1))
.$(1).moduleinfo: MODULEINFO_EXTRA_OUTPUT=" $$(addprefix $$(SUBDIR)/,$$(subst $(3),$(5),$(2)) $$(subst $(3),$(4),$(2)))"
# The use of wildcard ensures that 'make menuselect' will not fail for modules that
# require additional source downloads.
.$(1).moduleinfo: $(wildcard $(2))
clean:: clean-$(1)$(3)
clean-$(1)$(3):
rm -f $$(subst $(3),$(4),$(2)) $$(subst $(3),$(5),$(2)) $$(subst $(3),$(6),$(2)) $$(subst $(3),$(7),$(2))
endef
MOD_ADD_C=$(eval $(call MOD_ADD_SOURCE,$(1),$(2),.c,.i,.o,.gcda,.gcno))
MOD_ADD_CC=$(eval $(call MOD_ADD_SOURCE,$(1),$(2),.cc,.ii,.oo,.gcda,.gcno))
MOD_ASTCFLAGS=-DAST_MODULE=\"$(1)\" $(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$(value $(dep)_INCLUDE))
$(addsuffix .oo,$(CC_MODS)) $(addsuffix .o,$(C_MODS)): \
_ASTCFLAGS+=$(call MOD_ASTCFLAGS,$*)
@@ -84,11 +74,16 @@ endif
$(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
$(LOADABLE_MODS:%=%.so): _ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
$(EMBEDDED_MODS:%=%.o): _ASTCFLAGS+=-DEMBEDDED_MODULE=$*
$(addsuffix .so,$(filter $(LOADABLE_MODS),$(C_MODS))): %.so: %.o
$(addsuffix .so,$(filter $(LOADABLE_MODS),$(CC_MODS))): %.so: %.oo
modules.link: $(addsuffix .eo,$(filter $(EMBEDDED_MODS),$(C_MODS)))
.PHONY: clean uninstall _all moduleinfo makeopts
ifneq ($(LOADABLE_MODS),)
_all: $(LOADABLE_MODS:%=%.so)
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
# linker options and extra libraries for cygwin
@@ -96,29 +91,38 @@ ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
LIBS+=-L$(ASTTOPDIR)/main -lasterisk -L$(ASTTOPDIR)/res $($@_LIBS)
# additional libraries in res/
endif
endif
ifneq ($(EMBEDDED_MODS),)
_all: modules.link
__embed_ldscript:
@echo "../$(SUBDIR)/modules.link"
__embed_ldflags:
@echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(C_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LDFLAGS))"
@echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(CC_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LDFLAGS))"
__embed_libs:
@echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(C_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LIB))"
@echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(CC_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LIB))"
else
__embed_ldscript:
__embed_ldflags:
__embed_libs:
endif
modules.link:
@rm -f $@
@for file in $(patsubst %,$(SUBDIR)/%,$(filter %.eo,$^)); do echo "INPUT (../$${file})" >> $@; done
@for file in $(patsubst %,$(SUBDIR)/%,$(filter-out %.eo,$^)); do echo "INPUT (../$${file})" >> $@; done
clean::
rm -f *.so *.o *.oo *.eo *.i *.ii
rm -f .*.d
rm -f *.s *.i
rm -f *.gcda *.gcno
rm -f modules.link
install:: all
@echo "Installing modules from `basename $(CURDIR)`..."
@for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x "$(DESTDIR)$(ASTMODDIR)" ; done
ifneq ($(findstring :,$(XMLSTARLET)$(BASH)),:)
@if [ -f .moduleinfo ] ; then \
declare -A DISABLED_MODS ;\
for x in $(MENUSELECT_$(MENUSELECT_CATEGORY)) ; do DISABLED_MODS[$${x}]=1 ; done ;\
EXTERNAL_MODS=$$($(XMLSTARLET) sel -t -m "/category/member[support_level = 'external']" -v "@name" -n .moduleinfo) ;\
for x in $${EXTERNAL_MODS} ; do \
if [ -z "$${DISABLED_MODS[$${x}]}" ] ; then \
PJPROJECT_BUNDLED=${PJPROJECT_BUNDLED} $(ASTTOPDIR)/build_tools/download_externals $${x} ;\
fi ;\
done ;\
fi
endif
uninstall::
@@ -128,17 +132,17 @@ dist-clean::
rm -f *.exports
.%.moduleinfo: %.c
@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.i $(SUBDIR)/$*.so$(MODULEINFO_EXTRA_OUTPUT)\">" > $@
$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $^ >> $@
@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.so\">" > $@
$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $< >> $@
echo "</member>" >> $@
.%.moduleinfo: %.cc
@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.oo $(SUBDIR)/$*.ii $(SUBDIR)/$*.so$(MODULEINFO_EXTRA_OUTPUT)\">" > $@
$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $^ >> $@
@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.oo $(SUBDIR)/$*.so\">" > $@
$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $< >> $@
echo "</member>" >> $@
.moduleinfo:: $(addsuffix .moduleinfo,$(addprefix .,$(sort $(ALL_C_MODS) $(ALL_CC_MODS)))) $(wildcard $(call tolower,$(MENUSELECT_CATEGORY)).xml)
@echo "<category name=\"MENUSELECT_$(MENUSELECT_CATEGORY)\" displayname=\"$(MENUSELECT_DESCRIPTION)\">" > $@
.moduleinfo:: $(addsuffix .moduleinfo,$(addprefix .,$(sort $(ALL_C_MODS) $(ALL_CC_MODS))))
@echo "<category name=\"MENUSELECT_$(MENUSELECT_CATEGORY)\" displayname=\"$(MENUSELECT_DESCRIPTION)\" remove_on_change=\"$(SUBDIR)/modules.link\">" > $@
@cat $^ >> $@
@echo "</category>" >> $@

View File

@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
#
# Asterisk -- A telephony toolkit for Linux.
#
# Makefile rules
#
# Copyright (C) 2006-2010, Digium, Inc.
@@ -17,13 +17,6 @@
-include $(ASTTOPDIR)/makeopts
# Helpful functions
# call with $(call function,...)
tolower = $(shell echo $(1) | tr '[:upper:]' '[:lower:]')
# Takes a list of MENUSELECT_CFLAG Id and returns CFLAGS to declare
# the ones which are enabled.
get_menuselect_cflags=$(patsubst %,-D%,$(filter $1,$(MENUSELECT_CFLAGS)))
.PHONY: dist-clean
# If 'make' decides to create intermediate files to satisfy a build requirement
@@ -34,36 +27,15 @@ get_menuselect_cflags=$(patsubst %,-D%,$(filter $1,$(MENUSELECT_CFLAGS)))
# extra cflags to build dependencies. Recursively expanded.
MAKE_DEPS=-MD -MT $@ -MF .$(subst /,_,$@).d -MP
ifeq ($(findstring ADDRESS_SANITIZER,$(MENUSELECT_CFLAGS)),ADDRESS_SANITIZER)
_ASTLDFLAGS+=-fsanitize=address
_ASTCFLAGS+=-fno-omit-frame-pointer -fsanitize=address
endif
ifeq ($(findstring THREAD_SANITIZER,$(MENUSELECT_CFLAGS)),THREAD_SANITIZER)
_ASTLDFLAGS+=-fsanitize=thread -pie -fPIE
_ASTCFLAGS+=-fno-omit-frame-pointer -pie -fPIE -fsanitize=thread
endif
ifeq ($(findstring LEAK_SANITIZER,$(MENUSELECT_CFLAGS)),LEAK_SANITIZER)
_ASTLDFLAGS+=-fsanitize=leak
_ASTCFLAGS+=-fno-omit-frame-pointer -fsanitize=leak
endif
ifeq ($(findstring UNDEFINED_SANITIZER,$(MENUSELECT_CFLAGS)),UNDEFINED_SANITIZER)
_ASTLDFLAGS+=-fsanitize=undefined
_ASTCFLAGS+=-fno-omit-frame-pointer -fsanitize=undefined
endif
ifeq ($(NOISY_BUILD),)
ECHO_PREFIX=@
CMD_PREFIX=@
else
ECHO_PREFIX=@\#
ECHO_PREFIX=@\#
CMD_PREFIX=
endif
OPTIMIZE?=-O3
ifneq ($(findstring darwin,$(OSARCH)),)
ifeq ($(shell if test `/usr/bin/sw_vers -productVersion | cut -c4` -gt 5; then echo 6; else echo 0; fi),6)
# Snow Leopard/Lion has an issue with this optimization flag on large files (like chan_sip)
@@ -71,34 +43,17 @@ ifneq ($(findstring darwin,$(OSARCH)),)
endif
endif
ifeq ($(CC),gcc)
# gcc version 8.2.1 and above must have partial-inlining disabled in order
# to avoid a documented bug. Sort to make the lowest version number come
# first. If it's the specified version then the current gcc version is equal
# to or greater, so add the custom optimization rule.
gcc_versions=$(shell printf "%s\n" $$(gcc -dumpversion) 8.2.1 | sort -n)
ifeq ($(firstword $(gcc_versions)),8.2.1)
OPTIMIZE+=-fno-partial-inlining
endif
endif
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(findstring CODE_COVERAGE,$(MENUSELECT_CFLAGS))$(findstring CODE_PROFILE,$(MENUSELECT_CFLAGS))$(AST_CODE_COVERAGE),no)
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_CODE_COVERAGE),no)
_ASTCFLAGS+=$(OPTIMIZE)
else
_ASTCFLAGS+=-O0
endif
ifeq ($(findstring CODE_COVERAGE,$(MENUSELECT_CFLAGS))$(AST_CODE_COVERAGE),no)
_ASTCFLAGS_COVERAGE=
else
_ASTCFLAGS_COVERAGE=-ftest-coverage -fprofile-arcs
ifeq ($(AST_CODE_COVERAGE),yes)
_ASTCFLAGS+=-ftest-coverage -fprofile-arcs
_ASTLDFLAGS+=-ftest-coverage -fprofile-arcs
endif
ifneq ($(findstring KEEP_FRAME_POINTERS,$(MENUSELECT_CFLAGS)),)
_ASTCFLAGS+=-fno-omit-frame-pointer
endif
ifeq ($(findstring $(CONFIG_CFLAGS),$(_ASTCFLAGS)),)
_ASTCFLAGS+=$(CONFIG_CFLAGS)
endif
@@ -108,11 +63,6 @@ endif
CC_CFLAGS=$(PTHREAD_CFLAGS) $(_ASTCFLAGS) $(ASTCFLAGS)
CXX_CFLAGS=$(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(_ASTCFLAGS) $(ASTCFLAGS))
# Clang -Werror warning suppressions
ifeq ($(C_COMPILER_FAMILY),clang)
CC_CFLAGS+=-Wno-unused-value -Wno-parentheses-equality
endif
ifeq ($(GNU_LD),1)
SO_SUPPRESS_SYMBOLS=-Wl,--version-script,$(subst .so,.exports,$@),--warn-common
ifneq ($(wildcard $(subst .so,.dynamics,$@)),)
@@ -126,15 +76,13 @@ CC_LIBS=$(PTHREAD_LIBS) $(LIBS)
CXX_LIBS=$(PTHREAD_LIBS) $(LIBS)
# determine whether to double-compile so that the optimizer can report code path problems
# In this case, we run the preprocessor to produce a .i or .ii file from the source
# this is only done when developer mode and DONT_OPTIMIZE are both enabled
# in that case, we run the preprocessor to produce a .i or .ii file from the source
# code, then compile once with optimizer enabled (and the output to /dev/null),
# and if that doesn't fail then compile again with optimizer disabled
ifeq ($(findstring COMPILE_DOUBLE,$(MENUSELECT_CFLAGS)),COMPILE_DOUBLE)
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_DEVMODE),DONT_OPTIMIZEyes)
COMPILE_DOUBLE=yes
endif
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_DEVMODE),)
else
_ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
endif
@@ -147,80 +95,70 @@ endif
ifeq ($(COMPILE_DOUBLE),yes)
$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
endif
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(_ASTCFLAGS_COVERAGE)
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
%.o: %.i
$(ECHO_PREFIX) echo " [CCi] $< -> $@"
ifneq ($(AST_CLANG_BLOCKS),)
ifeq ($(COMPILE_DOUBLE),yes)
$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE) -Wno-unused-command-line-argument
endif
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(_ASTCFLAGS_COVERAGE) -Wno-unused-command-line-argument
else
ifeq ($(COMPILE_DOUBLE),yes)
$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
endif
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(_ASTCFLAGS_COVERAGE)
endif
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
ifneq ($(COMPILE_DOUBLE),yes)
%.o: %.c
$(ECHO_PREFIX) echo " [CC] $< -> $@"
$(CMD_PREFIX) $(CC) -o $@ -c $< $(MAKE_DEPS) $(CC_CFLAGS) $(_ASTCFLAGS_COVERAGE)
$(CMD_PREFIX) $(CC) -o $@ -c $< $(MAKE_DEPS) $(CC_CFLAGS)
endif
%.i: %.c
$(ECHO_PREFIX) echo " [CPP] $< -> $@"
$(CMD_PREFIX) $(CC) -o $@ -E $< $(MAKE_DEPS) $(CC_CFLAGS) $(_ASTCFLAGS_COVERAGE)
$(CMD_PREFIX) $(CC) -o $@ -E $< $(MAKE_DEPS) $(CC_CFLAGS)
%.oo: %.ii
$(ECHO_PREFIX) echo " [CXXi] $< -> $@"
ifeq ($(COMPILE_DOUBLE),yes)
$(CMD_PREFIX) $(CXX) -o /dev/null -c $< $(CXX_CFLAGS) $(OPTIMIZE)
endif
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(_ASTCFLAGS_COVERAGE)
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS)
ifneq ($(COMPILE_DOUBLE),yes)
%.oo: %.cc
$(ECHO_PREFIX) echo " [CXX] $< -> $@"
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(MAKE_DEPS) $(CXX_CFLAGS) $(_ASTCFLAGS_COVERAGE)
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(MAKE_DEPS) $(CXX_CFLAGS)
endif
%.ii: %.cc
$(ECHO_PREFIX) echo " [CPP] $< -> $@"
$(CMD_PREFIX) $(CXX) -o $@ -E $< $(MAKE_DEPS) $(CXX_CFLAGS) $(_ASTCFLAGS_COVERAGE)
$(CMD_PREFIX) $(CXX) -o $@ -E $< $(MAKE_DEPS) $(CXX_CFLAGS)
%.so: %.o
ifeq ($(GNU_LD),1)
$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_version_script $* "$(LINKER_SYMBOL_PREFIX)" "$(ASTTOPDIR)"
endif
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
$(CMD_PREFIX) $(CC) -o $@ $(CC_LDFLAGS_SO) $^ $(CC_LIBS)
$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(CC_LDFLAGS_SO) $^ $(CC_LIBS)
%.so: %.oo
ifeq ($(GNU_LD),1)
$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_version_script $* "$(LINKER_SYMBOL_PREFIX)" "$(ASTTOPDIR)"
endif
$(ECHO_PREFIX) echo " [LDXX] $^ -> $@"
$(CMD_PREFIX) $(CXX) -o $@ $(CXX_LDFLAGS_SO) $^ $(CXX_LIBS)
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(CXX_LDFLAGS_SO) $^ $(CXX_LIBS)
%.eo: %.o
$(ECHO_PREFIX) echo " [EMBED] $< -> $@"
$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_eo_script $* > .$@.ld
$(CMD_PREFIX) $(LD) -r -T .$@.ld -o $@ $<
$(CMD_PREFIX) rm -f .$@.ld
%.eo: %.oo
$(ECHO_PREFIX) echo " [EMBED] $< -> $@"
$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_eo_script $* > .$@.ld
$(CMD_PREFIX) $(LD) -r -T .$@.ld -o $@ $<
$(CMD_PREFIX) rm -f .$@.ld
%: %.o
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
$(CMD_PREFIX) $(CXX) -o $@ $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $^ $(CXX_LIBS) $(ASTLDFLAGS)
# These CC commands just create an object file with the input file embedded in it.
# It can be access from code as follows:
# If your input file is named abc_def.xml...
#
# extern const uint8_t _binary_abc_def_xml_start[];
# extern const uint8_t _binary_abc_def_xml_end[];
# extern const size_t _binary_abc_def_xml_size;
%.o: %.xml
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
$(CMD_PREFIX) $(CC) -g -Wl,-znoexecstack -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o $@ $^
%.o: %.xslt
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
$(CMD_PREFIX) $(CC) -g -Wl,-znoexecstack -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o $@ $^
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $^ $(CXX_LIBS) $(ASTLDFLAGS)
dist-clean:: clean

292
README Normal file
View File

@@ -0,0 +1,292 @@
===============================================================================
=== The Asterisk(R) Open Source PBX
===
=== by Mark Spencer <markster@digium.com>
=== and the Asterisk.org developer community
===
=== Copyright (C) 2001-2009 Digium, Inc.
=== and other copyright holders.
===============================================================================
-------------------------------------------------------------------------------
--- SECURITY ------------------------------------------------------------------
It is imperative that you read and fully understand the contents of
the security information document before you attempt to configure and run
an Asterisk server.
If you downloaded Asterisk as a tarball, see the security section in the PDF
version of the documentation in doc/tex/asterisk.pdf. Alternatively, pull up
the HTML version of the documentation in doc/tex/asterisk/index.html. The
source for the security document is available in doc/tex/security.tex.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--- WHAT IS ASTERISK ? --------------------------------------------------------
Asterisk is an Open Source PBX and telephony toolkit. It is, in a
sense, middleware between Internet and telephony channels on the bottom,
and Internet and telephony applications at the top. However, Asterisk supports
more telephony interfaces than just Internet telephony. Asterisk also has a
vast amount of support for traditional PSTN telephony, as well. For more
information on the project itself, please visit the Asterisk home page at:
http://www.asterisk.org
In addition you'll find lots of information compiled by the Asterisk
community on this Wiki:
https://wiki.asterisk.org
There is a book on Asterisk published by O'Reilly under the Creative Commons
License. It is available in book stores as well as in a downloadable version on
the http://www.asteriskdocs.org web site.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--- SUPPORTED OPERATING SYSTEMS -----------------------------------------------
--- Linux
The Asterisk Open Source PBX is developed and tested primarily on the
GNU/Linux operating system, and is supported on every major GNU/Linux
distribution.
--- Others
Asterisk has also been 'ported' and reportedly runs properly on other
operating systems as well, including Sun Solaris, Apple's Mac OS X, Cygwin,
and the BSD variants.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--- GETTING STARTED -----------------------------------------------------------
First, be sure you've got supported hardware (but note that you don't need
ANY special hardware, not even a sound card) to install and run Asterisk.
Supported telephony hardware includes:
* All Analog and Digital Interface cards from Digium (www.digium.com)
* QuickNet Internet PhoneJack and LineJack (http://www.quicknet.net)
* any full duplex sound card supported by ALSA, OSS, or PortAudio
* any ISDN card supported by mISDN on Linux
* The Xorcom Astribank channel bank
* VoiceTronix OpenLine products
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--- UPGRADING FROM AN EARLIER VERSION -----------------------------------------
If you are updating from a previous version of Asterisk, make sure you
read the UPGRADE.txt file in the source directory. There are some files
and configuration options that you will have to change, even though we
made every effort possible to maintain backwards compatibility.
In order to discover new features to use, please check the configuration
examples in the /configs directory of the source code distribution. For a
list of new features in this version of Asterisk, see the CHANGES file.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--- NEW INSTALLATIONS ---------------------------------------------------------
Ensure that your system contains a compatible compiler and development
libraries. Asterisk requires either the GNU Compiler Collection (GCC) version
3.0 or higher, or a compiler that supports the C99 specification and some of
the gcc language extensions. In addition, your system needs to have the C
library headers available, and the headers and libraries for ncurses.
There are many modules that have additional dependencies. To see what
libraries are being looked for, see ./configure --help, or run
"make menuselect" to view the dependencies for specific modules.
On many distributions, these dependencies are installed by packages with names
like 'glibc-devel', 'ncurses-devel', 'openssl-devel' and 'zlib-devel'
or similar.
So, let's proceed:
1) Read this README file.
There are more documents than this one in the doc/ directory. You may also
want to check the configuration files that contain examples and reference
guides. They are all in the configs/ directory.
2) Run "./configure"
Execute the configure script to guess values for system-dependent
variables used during compilation.
3) Run "make menuselect" [optional]
This is needed if you want to select the modules that will be compiled and to
check dependencies for various optional modules.
4) Run "make"
Assuming the build completes successfully:
5) Run "make install"
If this is your first time working with Asterisk, you may wish to install
the sample PBX, with demonstration extensions, etc. If so, run:
6) "make samples"
Doing so will overwrite any existing configuration files you have installed.
Finally, you can launch Asterisk in the foreground mode (not a daemon) with:
# asterisk -vvvc
You'll see a bunch of verbose messages fly by your screen as Asterisk
initializes (that's the "very very verbose" mode). When it's ready, if
you specified the "c" then you'll get a command line console, that looks
like this:
*CLI>
You can type "core show help" at any time to get help with the system. For help
with a specific command, type "core show help <command>". To start the PBX using
your sound card, you can type "console dial" to dial the PBX. Then you can use
"console answer", "console hangup", and "console dial" to simulate the actions
of a telephone. Remember that if you don't have a full duplex sound card
(and Asterisk will tell you somewhere in its verbose messages if you do/don't)
then it won't work right (not yet).
"man asterisk" at the Unix/Linux command prompt will give you detailed
information on how to start and stop Asterisk, as well as all the command
line options for starting Asterisk.
Feel free to look over the configuration files in /etc/asterisk, where you
will find a lot of information about what you can do with Asterisk.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--- ABOUT CONFIGURATION FILES -------------------------------------------------
All Asterisk configuration files share a common format. Comments are
delimited by ';' (since '#' of course, being a DTMF digit, may occur in
many places). A configuration file is divided into sections whose names
appear in []'s. Each section typically contains two types of statements,
those of the form 'variable = value', and those of the form 'object =>
parameters'. Internally the use of '=' and '=>' is exactly the same, so
they're used only to help make the configuration file easier to
understand, and do not affect how it is actually parsed.
Entries of the form 'variable=value' set the value of some parameter in
asterisk. For example, in dahdi.conf, one might specify:
switchtype=national
In order to indicate to Asterisk that the switch they are connecting to is
of the type "national". In general, the parameter will apply to
instantiations which occur below its specification. For example, if the
configuration file read:
switchtype = national
channel => 1-4
channel => 10-12
switchtype = dms100
channel => 25-47
The "national" switchtype would be applied to channels one through
four and channels 10 through 12, whereas the "dms100" switchtype would
apply to channels 25 through 47.
The "object => parameters" instantiates an object with the given
parameters. For example, the line "channel => 25-47" creates objects for
the channels 25 through 47 of the card, obtaining the settings
from the variables specified above.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--- SPECIAL NOTE ON TIME ------------------------------------------------------
Those using SIP phones should be aware that Asterisk is sensitive to
large jumps in time. Manually changing the system time using date(1)
(or other similar commands) may cause SIP registrations and other
internal processes to fail. If your system cannot keep accurate time
by itself use NTP (http://www.ntp.org/) to keep the system clock
synchronized to "real time". NTP is designed to keep the system clock
synchronized by speeding up or slowing down the system clock until it
is synchronized to "real time" rather than by jumping the time and
causing discontinuities. Most Linux distributions include precompiled
versions of NTP. Beware of some time synchronization methods that get
the correct real time periodically and then manually set the system
clock.
Apparent time changes due to daylight savings time are just that,
apparent. The use of daylight savings time in a Linux system is
purely a user interface issue and does not affect the operation of the
Linux kernel or Asterisk. The system clock on Linux kernels operates
on UTC. UTC does not use daylight savings time.
Also note that this issue is separate from the clocking of TDM
channels, and is known to at least affect SIP registrations.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--- FILE DESCRIPTORS ----------------------------------------------------------
Depending on the size of your system and your configuration,
Asterisk can consume a large number of file descriptors. In UNIX,
file descriptors are used for more than just files on disk. File
descriptors are also used for handling network communication
(e.g. SIP, IAX2, or H.323 calls) and hardware access (e.g. analog and
digital trunk hardware). Asterisk accesses many on-disk files for
everything from configuration information to voicemail storage.
Most systems limit the number of file descriptors that Asterisk can
have open at one time. This can limit the number of simultaneous
calls that your system can handle. For example, if the limit is set
at 1024 (a common default value) Asterisk can handle approximately 150
SIP calls simultaneously. To change the number of file descriptors
follow the instructions for your system below:
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--- PAM-based Linux System ----------------------------------------------------
If your system uses PAM (Pluggable Authentication Modules) edit
/etc/security/limits.conf. Add these lines to the bottom of the file:
root soft nofile 4096
root hard nofile 8196
asterisk soft nofile 4096
asterisk hard nofile 8196
(adjust the numbers to taste). You may need to reboot the system for
these changes to take effect.
== Generic UNIX System ==
If there are no instructions specifically adapted to your system
above you can try adding the command "ulimit -n 8192" to the script
that starts Asterisk.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--- MORE INFORMATION ----------------------------------------------------------
See the doc directory for more documentation on various features. Again,
please read all the configuration samples that include documentation on
the configuration options.
If this release of Asterisk was downloaded from a tarball, then some
additional documentation should have been included.
* doc/tex/asterisk.pdf --- PDF version of the documentation
* doc/tex/asterisk/index.html --- HTML version of the documentation
Finally, you may wish to visit the web site and join the mailing list if
you're interested in getting more information.
http://www.asterisk.org/support
Welcome to the growing worldwide community of Asterisk users!
-------------------------------------------------------------------------------
--- Mark Spencer, and the Asterisk.org development community
-------------------------------------------------------------------------------
Asterisk is a trademark of Digium, Inc.

View File

@@ -1,389 +0,0 @@
# Best Practices
The purpose of this document is to define best practices when working with
Asterisk in order to minimize possible security breaches and to provide tried
examples in field deployments. This is a living document and is subject to
change over time as best practices are defined.
* [Filtering Data]:
How to protect yourself from redial attacks
* [Proper Device Naming]:
Why to not use numbered extensions for devices
* [Secure Passwords]:
Secure passwords limit your risk to brute force attacks
* [Reducing Pattern Match Typos]:
Using the 'same' prefix, or using Goto()
* [Manager Class Authorizations]:
Recognizing potential issues with certain classes of authorization
* [Avoid Privilege Escalations]:
Disable the ability to execute functions that may escalate privileges
* [Important Security Considerations]:
More information on the Asterisk Wiki
## Additional Links
Additional links that contain useful information about best practices or
security are listed below.
* [Seven Steps to Better SIP Security][blog-sip-security]
* [Asterisk VoIP Security (webinar)][voip-security-webinar]
## Filtering Data
In the Asterisk dialplan, several channel variables contain data potentially
supplied by outside sources. This could lead to a potential security concern
where those outside sources may send cleverly crafted strings of data which
could be utilized, e.g. to place calls to unexpected locations.
An example of this can be found in the use of pattern matching and the ${EXTEN}
channel variable. Note that ${EXTEN} is not the only system created channel
variable, so it is important to be aware of where the data you're using is
coming from.
For example, this common dialplan takes 2 or more characters of data, starting
with a number 0-9, and then accepts any additional information supplied by the
request.
**NOTE**:
> We use SIP in this example, but is not limited to SIP only; protocols such as
> Jabber/XMPP or IAX2 are also susceptible to the same sort of injection problem.
```INI
[incoming]
exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _X.,n,Dial(SIP/${EXTEN})
exten => _X.,n,Hangup()
```
This dialplan may be utilized to accept calls to extensions, which then dial a
numbered device name configured in one of the channel configuration files (such
as sip.conf, iax.conf, etc...) (see [Proper Device Naming] for more information
on why this approach is flawed).
The example we've given above looks harmless enough until you take into
consideration that several channel technologies accept characters that could
be utilized in a clever attack. For example, instead of just sending a request
to dial extension 500 (which in our example above would create the string
SIP/500 and is then used by the Dial() application to place a call), someone
could potentially send a string like "500&SIP/itsp/14165551212".
The string "500&SIP/itsp/14165551212" would then be contained within the
${EXTEN} channel variable, which is then utilized by the Dial() application in
our example, thereby giving you the dialplan line of:
```INI
exten => _X.,n,Dial(SIP/500&SIP/itsp/14165551212)
```
Our example above has now provided someone with a method to place calls out of
your ITSP in a place where you didn't expect to allow it. There are a couple of
ways in which you can mitigate this impact: stricter pattern matching, or using
the FILTER() dialplan function.
The CALLERID(num) and CALLERID(name) values are other commonly used values that
are sources of data potentially supplied by outside sources. If you use these
values as parameters to the System(), MixMonitor(), or Monitor() applications
or the SHELL() dialplan function, you can allow injection of arbitrary operating
system command execution. The FILTER() dialplan function is available to remove
dangerous characters from untrusted strings to block the command injection.
### Strict Pattern Matching
The simple way to mitigate this problem is with a strict pattern match that does
not utilize the period (.) or bang (!) characters to match on one-or-more
characters or zero-or-more characters (respectively). To fine tune our example
to only accept three digit extensions, we could change our pattern match to
be:
```INI
exten => _XXX,n,Dial(SIP/${EXTEN})
```
In this way, we have minimized our impact because we're not allowing anything
other than the numbers zero through nine. But in some cases we really do need to
handle variable pattern matches, such as when dialing international numbers
or when we want to handle something like a SIP URI. In this case, we'll need to
utilize the FILTER() dialplan function.
### Using FILTER()
The FILTER() dialplan function is used to filter strings by only allowing
characters that you have specified. This is a perfect candidate for controlling
which characters you want to pass to the Dial() application, or any other
application which will contain dynamic information passed to Asterisk from an
external source. Lets take a look at how we can use FILTER() to control what
data we allow.
Using our previous example to accept any string length of 2 or more characters,
starting with a number of zero through nine, we can use FILTER() to limit what
we will accept to just numbers. Our example would then change to something like:
```INI
[incoming]
exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _X.,n,Dial(SIP/${FILTER(0-9,${EXTEN})})
exten => _X.,n,Hangup()
```
Note how we've wrapped the ${EXTEN} channel variable with the FILTER() function
which will then only pass back characters that fit into the numerical range that
we've defined.
Alternatively, if we didn't want to utilize the FILTER() function within the
Dial() application directly, we could save the value to a channel variable,
which has a side effect of being usable in other locations of your dialplan if
necessary, and to handle error checking in a separate location.
```INI
[incoming]
exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _X.,n,Set(SAFE_EXTEN=${FILTER(0-9,${EXTEN})})
exten => _X.,n,Dial(SIP/${SAFE_EXTEN})
exten => _X.,n,Hangup()
```
Now we can use the ${SAFE_EXTEN} channel variable anywhere throughout the rest
of our dialplan, knowing we've already filtered it. We could also perform an
error check to verify that what we've received in ${EXTEN} also matches the data
passed back by FILTER(), and to fail the call if things do not match.
```INI
[incoming]
exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _X.,n,Set(SAFE_EXTEN=${FILTER(0-9,${EXTEN})})
exten => _X.,n,GotoIf($[${EXTEN} != ${SAFE_EXTEN}]?error,1)
exten => _X.,n,Dial(SIP/${SAFE_EXTEN})
exten => _X.,n,Hangup()
exten => error,1,Verbose(2,Values of EXTEN and SAFE_EXTEN did not match.)
exten => error,n,Verbose(2,EXTEN: "${EXTEN}" -- SAFE_EXTEN: "${SAFE_EXTEN}")
exten => error,n,Playback(silence/1&invalid)
exten => error,n,Hangup()
```
Another example would be using FILTER() to control the characters we accept when
we're expecting to get a SIP URI for dialing.
```INI
[incoming]
exten => _[0-9a-zA-Z].,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _[0-9a-zA-Z].,n,Dial(SIP/${FILTER(.@0-9a-zA-Z,${EXTEN})
exten => _[0-9a-zA-Z].,n,Hangup()
```
Of course the FILTER() function doesn't check the formatting of the incoming
request. There is also the REGEX() dialplan function which can be used to
determine if the string passed to it matches the regular expression you've
created, and to take proper action on whether it matches or not. The creation of
regular expressions is left as an exercise for the reader.
More information about the FILTER() and REGEX() dialplan functions can be found
by typing "core show function FILTER" and "core show function REGEX" from your
Asterisk console.
## Proper Device Naming
In Asterisk, the concept of an extension number being tied to a specific device
does not exist. Asterisk is aware of devices it can call or receive calls from,
and how you define in your dialplan how to reach those devices is up to you.
Because it has become common practice to think of a specific device as having an
extension number associated with it, it only becomes natural to think about
naming your devices the same as the extension number you're providing it. But
by doing this, you're limiting the powerful concept of separating user from
extensions, and extensions from devices.
It can also be a security hazard to name your devices with a number, as this can
open you up to brute force attacks. Many of the current exploits deal with
device configurations which utilize a number, and even worse, a password that
matches the devices name. For example, take a look at this poorly created device
in sip.conf:
```INI
[1000]
type=friend
context=international_dialing
secret=1000
```
As implied by the context, we've permitted a device named 1000 with a password
of 1000 to place calls internationally. If your PBX system is accessible via
the internet, then your system will be vulnerable to expensive international
calls. Even if your system is not accessible via the internet, people within
your organization could get access to dialing rules you'd prefer to reserve only
for certain people.
A more secure example for the device would be to use something like the MAC
address of the device, along with a strong password (see the section Secure
Passwords). The following example would be more secure:
```INI
[0004f2040001]
type=friend
context=international_dialing
secret=aE3%B8*$jk^G
```
Then in your dialplan, you would reference the device via the MAC address of the
device (or if using the softphone, a MAC address of a network interface on the
computer).
Also note that you should NOT use this password, as it will likely be one of the
first ones added to the dictionary for brute force attacks.
## Secure Passwords
Secure passwords are necessary in many (if not all) environments, and Asterisk
is certainly no exception, especially when it comes to expensive long distance
calls that could potentially cost your company hundreds or thousands of dollars
on an expensive monthly phone bill, with little to no recourse to fight the
charges.
Whenever you are positioned to add a password to your system, whether that is
for a device configuration, a database connection, or any other secure
connection, be sure to use a secure password. A good example of a secure
password would be something like:
```
aE3%B8*$jk^G
```
Our password also contains 12 characters with a mixture of upper and
lower case characters, numbers, and symbols. Because these passwords are likely
to only be entered once, or loaded via a configuration file, there is
no need to create simple passwords, even in testing. Some of the holes found in
production systems used for exploitations involve finding the one test extension
that contains a weak password that was forgotten prior to putting a system into
production.
Using a web search you can find several online password generators such as
[Strong Password Generator] or there are several scripts that can be
used to generate a strong password.
## Reducing Pattern Match Typos
As of Asterisk 1.6.2, a new method for reducing the number of complex pattern
matches you need to enter, which can reduce typos in your dialplan, has been
implemented. Traditionally, a dialplan with a complex pattern match would look
something like:
```INI
exten => _[3-5]XXX,1,Verbose(Incoming call to ${EXTEN})
exten => _[3-5]XXX,n,Set(DEVICE=${DB(device/mac_address/${EXTEN})})
exten => _[3-5]XXX,n,Set(TECHNOLOGY=${DB(device/technology/${EXTEN})})
exten => _[3-5]XXX,n,GotoIf($[${ISNULL(${TECHNOLOGY})} | ${ISNULL(${DEVICE})}]?error,1)
exten => _[3-5]XXX,n,Dial(${TECHNOLOGY}/${DEVICE},${GLOBAL(TIMEOUT)})
exten => _[3-5]XXX,n,Set(vmFlag=${IF($[${DIALSTATUS} = BUSY]?b:u)})
exten => _[3-5]XXX,n,Voicemail(${EXTEN}@${GLOBAL(VOICEMAIL_CONTEXT)},${vmFlag})
exten => _[3-5]XXX,n,Hangup()
exten => error,1,Verbose(2,Unable to lookup technology or device for extension)
exten => error,n,Playback(silence/1&num-not-in-db)
exten => error,n,Hangup()
```
Of course there exists the possibility for a typo when retyping the pattern
match _\[3-5\]XXX which will match on extensions 3000 through 5999. We can
minimize this error by utilizing the same => prefix on all lines beyond the
first one. Our same dialplan with using same => would look like the following:
```INI
exten => _[3-5]XXX,1,Verbose(Incoming call to ${EXTEN})
same => n,Set(DEVICE=${DB(device/mac_address/${EXTEN})})
same => n,Set(TECHNOLOGY=${DB(device/technology/${EXTEN})})
same => n,GotoIf($[${ISNULL(${TECHNOLOGY})} | ${ISNULL(${DEVICE})}]?error,1)
same => n,Dial(${TECHNOLOGY}/${DEVICE},${GLOBAL(TIMEOUT)})
same => n,Set(vmFlag=${IF($[${DIALSTATUS} = BUSY]?b:u)})
same => n,Voicemail(${EXTEN}@${GLOBAL(VOICEMAIL_CONTEXT)},${vmFlag})
same => n,Hangup()
exten => error,1,Verbose(2,Unable to lookup technology or device for extension)
same => n,Playback(silence/1&num-not-in-db)
same => n,Hangup()
```
## Manager Class Authorizations
Manager accounts have associated class authorizations that define what actions
and events that account can execute/receive. In order to run Asterisk commands
or dialplan applications that affect the system Asterisk executes on, the
"system" class authorization should be set on the account.
However, Manager commands that originate new calls into the Asterisk dialplan
have the potential to alter or affect the system as well, even though the
class authorization for origination commands is "originate". Take, for example,
the Originate manager command:
```
Action: Originate
Channel: SIP/foo
Exten: s
Context: default
Priority: 1
Application: System
Data: echo hello world!
```
This manager command will attempt to execute an Asterisk application, System,
which is normally associated with the "system" class authorization. While some
checks have been put into Asterisk to take this into account, certain dialplan
configurations and/or clever manipulation of the Originate manager action can
circumvent these checks. For example, take the following dialplan:
```INI
exten => s,1,Verbose(Incoming call)
same => n,MixMonitor(foo.wav,,${EXEC_COMMAND})
same => n,Dial(SIP/bar)
same => n,Hangup()
```
Whatever has been defined in the variable EXEC_COMMAND will be executed after
MixMonitor has finished recording the call. The dialplan writer may have
intended that this variable to be set by some other location in the dialplan;
however, the Manager action Originate allows for channel variables to be set by
the account initiating the new call. This could allow the Originate action to
execute some command on the system by setting the EXEC_COMMAND dialplan variable
in the Variable: header.
In general, you should treat the Manager class authorization "originate" the
same as the class authorization "system". Good system configuration, such as
not running Asterisk as root, can prevent serious problems from arising when
allowing external connections to originate calls into Asterisk.
## Avoid Privilege Escalations
External control protocols, such as Manager, often have the ability to get and
set channel variables; which allows the execution of dialplan functions.
Dialplan functions within Asterisk are incredibly powerful, which is wonderful
for building applications using Asterisk. But during the read or write
execution, certain dialplan functions do much more. For example, reading the
SHELL() function can execute arbitrary commands on the system Asterisk is
running on. Writing to the FILE() function can change any file that Asterisk has
write access to.
When these functions are executed from an external protocol, that execution
could result in a privilege escalation. Asterisk can inhibit the execution of
these functions, if live_dangerously in the \[options\] section of asterisk.conf
is set to no.
In Asterisk 12 and later, live_dangerously defaults to no.
[voip-security-webinar]: https://docs.asterisk.org/Deployment/Important-Security-Considerations/Asterisk-Security-Webinars/
[blog-sip-security]: https://web.archive.org/web/20171030134647/http://blogs.digium.com/2009/03/28/sip-security/
[Strong Password Generator]: https://www.strongpasswordgenerator.com
[Filtering Data]: #filtering-data
[Proper Device Naming]: #proper-device-naming
[Secure Passwords]: #secure-passwords
[Reducing Pattern Match Typos]: #reducing-pattern-match-typos
[Manager Class Authorizations]: #manager-class-authorizations
[Avoid Privilege Escalations]: #avoid-privilege-escalations
[Important Security Considerations]: https://docs.asterisk.org/Deployment/Important-Security-Considerations/

View File

@@ -0,0 +1,370 @@
==================
| Best Practices |
==================
The purpose of this document is to define best practices when working with
Asterisk in order to minimize possible security breaches and to provide tried
examples in field deployments. This is a living document and is subject to
change over time as best practices are defined.
--------
Sections
--------
* Filtering Data:
How to protect yourself from redial attacks
* Proper Device Naming:
Why to not use numbered extensions for devices
* Secure Passwords:
Secure passwords limit your risk to brute force attacks
* Reducing Pattern Match Typos:
Using the 'same' prefix, or using Goto()
* Manager Class Authorizations:
Recognizing potential issues with certain classes of authorization
* Avoid Privilege Escalations:
Disable the ability to execute functions that may escalate privileges
----------------
Additional Links
----------------
Additional links that contain useful information about best practices or
security are listed below.
* Seven Steps to Better SIP Security:
http://blogs.digium.com/2009/03/28/sip-security/
* Asterisk VoIP Security (webinar):
http://www.asterisk.org/security/webinar/
==============
Filtering Data
==============
In the Asterisk dialplan, several channel variables contain data potentially
supplied by outside sources. This could lead to a potential security concern
where those outside sources may send cleverly crafted strings of data which
could be utilized, e.g. to place calls to unexpected locations.
An example of this can be found in the use of pattern matching and the ${EXTEN}
channel variable. Note that ${EXTEN} is not the only system created channel
variable, so it is important to be aware of where the data you're using is
coming from.
For example, this common dialplan takes 2 or more characters of data, starting
with a number 0-9, and then accepts any additional information supplied by the
request.
[NOTE: We use SIP in this example, but is not limited to SIP only; protocols
such as Jabber/XMPP or IAX2 are also susceptible to the same sort of
injection problem.]
[incoming]
exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _X.,n,Dial(SIP/${EXTEN})
exten => _X.,n,Hangup()
This dialplan may be utilized to accept calls to extensions, which then dial a
numbered device name configured in one of the channel configuration files (such
as sip.conf, iax.conf, etc...) (see the section Proper Device Naming for more
information on why this approach is flawed).
The example we've given above looks harmless enough until you take into
consideration that several channel technologies accept characters that could
be utilized in a clever attack. For example, instead of just sending a request
to dial extension 500 (which in our example above would create the string
SIP/500 and is then used by the Dial() application to place a call), someone
could potentially send a string like "500&SIP/itsp/14165551212".
The string "500&SIP/itsp/14165551212" would then be contained within the
${EXTEN} channel variable, which is then utilized by the Dial() application in
our example, thereby giving you the dialplan line of:
exten => _X.,n,Dial(SIP/500&SIP/itsp/14165551212)
Our example above has now provided someone with a method to place calls out of
your ITSP in a place where you didn't expect to allow it. There are a couple of
ways in which you can mitigate this impact: stricter pattern matching, or using
the FILTER() dialplan function.
Strict Pattern Matching
-----------------------
The simple way to mitigate this problem is with a strict pattern match that does
not utilize the period (.) or bang (!) characters to match on one-or-more
characters or zero-or-more characters (respectively). To fine tune our example
to only accept three digit extensions, we could change our pattern match to
be:
exten => _XXX,n,Dial(SIP/${EXTEN})
In this way, we have minimized our impact because we're not allowing anything
other than the numbers zero through nine. But in some cases we really do need to
handle variable pattern matches, such as when dialing international numbers
or when we want to handle something like a SIP URI. In this case, we'll need to
utilize the FILTER() dialplan function.
Using FILTER()
--------------
The FILTER() dialplan function is used to filter strings by only allowing
characters that you have specified. This is a perfect candidate for controlling
which characters you want to pass to the Dial() application, or any other
application which will contain dynamic information passed to Asterisk from an
external source. Lets take a look at how we can use FILTER() to control what
data we allow.
Using our previous example to accept any string length of 2 or more characters,
starting with a number of zero through nine, we can use FILTER() to limit what
we will accept to just numbers. Our example would then change to something like:
[incoming]
exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _X.,n,Dial(SIP/${FILTER(0-9,${EXTEN})})
exten => _X.,n,Hangup()
Note how we've wrapped the ${EXTEN} channel variable with the FILTER() function
which will then only pass back characters that fit into the numerical range that
we've defined.
Alternatively, if we didn't want to utilize the FILTER() function within the
Dial() application directly, we could save the value to a channel variable,
which has a side effect of being usable in other locations of your dialplan if
necessary, and to handle error checking in a separate location.
[incoming]
exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _X.,n,Set(SAFE_EXTEN=${FILTER(0-9,${EXTEN})})
exten => _X.,n,Dial(SIP/${SAFE_EXTEN})
exten => _X.,n,Hangup()
Now we can use the ${SAFE_EXTEN} channel variable anywhere throughout the rest
of our dialplan, knowing we've already filtered it. We could also perform an
error check to verify that what we've received in ${EXTEN} also matches the data
passed back by FILTER(), and to fail the call if things do not match.
[incoming]
exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _X.,n,Set(SAFE_EXTEN=${FILTER(0-9,${EXTEN})})
exten => _X.,n,GotoIf($[${EXTEN} != ${SAFE_EXTEN}]?error,1)
exten => _X.,n,Dial(SIP/${SAFE_EXTEN})
exten => _X.,n,Hangup()
exten => error,1,Verbose(2,Values of EXTEN and SAFE_EXTEN did not match.)
exten => error,n,Verbose(2,EXTEN: "${EXTEN}" -- SAFE_EXTEN: "${SAFE_EXTEN}")
exten => error,n,Playback(silence/1&invalid)
exten => error,n,Hangup()
Another example would be using FILTER() to control the characters we accept when
we're expecting to get a SIP URI for dialing.
[incoming]
exten => _[0-9a-zA-Z].,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _[0-9a-zA-Z].,n,Dial(SIP/${FILTER(.@0-9a-zA-Z,${EXTEN})
exten => _[0-9a-zA-Z].,n,Hangup()
Of course the FILTER() function doesn't check the formatting of the incoming
request. There is also the REGEX() dialplan function which can be used to
determine if the string passed to it matches the regular expression you've
created, and to take proper action on whether it matches or not. The creation of
regular expressions is left as an exercise for the reader.
More information about the FILTER() and REGEX() dialplan functions can be found
by typing "core show function FILTER" and "core show function REGEX" from your
Asterisk console.
====================
Proper Device Naming
====================
In Asterisk, the concept of an extension number being tied to a specific device
does not exist. Asterisk is aware of devices it can call or receive calls from,
and how you define in your dialplan how to reach those devices is up to you.
Because it has become common practice to think of a specific device as having an
extension number associated with it, it only becomes natural to think about
naming your devices the same as the extension number you're providing it. But
by doing this, you're limiting the powerful concept of separating user from
extensions, and extensions from devices.
It can also be a security hazard to name your devices with a number, as this can
open you up to brute force attacks. Many of the current exploits deal with
device configurations which utilize a number, and even worse, a password that
matches the devices name. For example, take a look at this poorly created device
in sip.conf:
[1000]
type=friend
context=international_dialing
secret=1000
As implied by the context, we've permitted a device named 1000 with a password
of 1000 to place calls internationally. If your PBX system is accessible via
the internet, then your system will be vulnerable to expensive international
calls. Even if your system is not accessible via the internet, people within
your organization could get access to dialing rules you'd prefer to reserve only
for certain people.
A more secure example for the device would be to use something like the MAC
address of the device, along with a strong password (see the section Secure
Passwords). The following example would be more secure:
[0004f2040001]
type=friend
context=international_dialing
secret=aE3%B8*$jk^G
Then in your dialplan, you would reference the device via the MAC address of the
device (or if using the softphone, a MAC address of a network interface on the
computer).
Also note that you should NOT use this password, as it will likely be one of the
first ones added to the dictionary for brute force attacks.
================
Secure Passwords
================
Secure passwords are necessary in many (if not all) environments, and Asterisk
is certainly no exception, especially when it comes to expensive long distance
calls that could potentially cost your company hundreds or thousands of dollars
on an expensive monthly phone bill, with little to no recourse to fight the
charges.
Whenever you are positioned to add a password to your system, whether that is
for a device configuration, a database connection, or any other secure
connection, be sure to use a secure password. A good example of a secure
password would be something like:
aE3%B8*$jk^G
Our password also contains 12 characters with a mixture of upper and
lower case characters, numbers, and symbols. Because these passwords are likely
to only be entered once, or loaded via a configuration file, there is
no need to create simple passwords, even in testing. Some of the holes found in
production systems used for exploitations involve finding the one test extension
that contains a weak password that was forgotten prior to putting a system into
production.
Using a web search you can find several online password generators such as
http://www.strongpasswordgenerator.com or there are several scripts that can be
used to generate a strong password.
============================
Reducing Pattern Match Typos
============================
As of Asterisk 1.6.2, a new method for reducing the number of complex pattern
matches you need to enter, which can reduce typos in your dialplan, has been
implemented. Traditionally, a dialplan with a complex pattern match would look
something like:
exten => _[3-5]XXX,1,Verbose(Incoming call to ${EXTEN})
exten => _[3-5]XXX,n,Set(DEVICE=${DB(device/mac_address/${EXTEN})})
exten => _[3-5]XXX,n,Set(TECHNOLOGY=${DB(device/technology/${EXTEN})})
exten => _[3-5]XXX,n,GotoIf($[${ISNULL(${TECHNOLOGY})} | ${ISNULL(${DEVICE})}]?error,1)
exten => _[3-5]XXX,n,Dial(${TECHNOLOGY}/${DEVICE},${GLOBAL(TIMEOUT)})
exten => _[3-5]XXX,n,Set(vmFlag=${IF($[${DIALSTATUS} = BUSY]?b:u)})
exten => _[3-5]XXX,n,Voicemail(${EXTEN}@${GLOBAL(VOICEMAIL_CONTEXT)},${vmFlag})
exten => _[3-5]XXX,n,Hangup()
exten => error,1,Verbose(2,Unable to lookup technology or device for extension)
exten => error,n,Playback(silence/1&num-not-in-db)
exten => error,n,Hangup()
Of course there exists the possibility for a typo when retyping the pattern
match _[3-5]XXX which will match on extensions 3000 through 5999. We can
minimize this error by utilizing the same => prefix on all lines beyond the
first one. Our same dialplan with using same => would look like the following:
exten => _[3-5]XXX,1,Verbose(Incoming call to ${EXTEN})
same => n,Set(DEVICE=${DB(device/mac_address/${EXTEN})})
same => n,Set(TECHNOLOGY=${DB(device/technology/${EXTEN})})
same => n,GotoIf($[${ISNULL(${TECHNOLOGY})} | ${ISNULL(${DEVICE})}]?error,1)
same => n,Dial(${TECHNOLOGY}/${DEVICE},${GLOBAL(TIMEOUT)})
same => n,Set(vmFlag=${IF($[${DIALSTATUS} = BUSY]?b:u)})
same => n,Voicemail(${EXTEN}@${GLOBAL(VOICEMAIL_CONTEXT)},${vmFlag})
same => n,Hangup()
exten => error,1,Verbose(2,Unable to lookup technology or device for extension)
same => n,Playback(silence/1&num-not-in-db)
same => n,Hangup()
============================
Manager Class Authorizations
============================
Manager accounts have associated class authorizations that define what actions
and events that account can execute/receive. In order to run Asterisk commands
or dialplan applications that affect the system Asterisk executes on, the
"system" class authorization should be set on the account.
However, Manager commands that originate new calls into the Asterisk dialplan
have the potential to alter or affect the system as well, even though the
class authorization for origination commands is "originate". Take, for example,
the Originate manager command:
Action: Originate
Channel: SIP/foo
Exten: s
Context: default
Priority: 1
Application: System
Data: echo hello world!
This manager command will attempt to execute an Asterisk application, System,
which is normally associated with the "system" class authorication. While some
checks have been put into Asterisk to take this into account, certain dialplan
configurations and/or clever manipulation of the Originate manager action can
circumvent these checks. For example, take the following dialplan:
exten => s,1,Verbose(Incoming call)
same => n,MixMonitor(foo.wav,,${EXEC_COMMAND})
same => n,Dial(SIP/bar)
same => n,Hangup()
Whatever has been defined in the variable EXEC_COMMAND will be executed after
MixMonitor has finished recording the call. The dialplan writer may have
intended that this variable to be set by some other location in the dialplan;
however, the Manager action Originate allows for channel variables to be set by
the account initiating the new call. This could allow the Originate action to
execute some command on the system by setting the EXEC_COMMAND dialplan variable
in the Variable: header.
In general, you should treat the Manager class authorization "originate" the
same as the class authorization "system". Good system configuration, such as
not running Asterisk as root, can prevent serious problems from arising when
allowing external connections to originate calls into Asterisk.
===========================
Avoid Privilege Escalations
===========================
External control protocols, such as Manager, often have the ability to get and
set channel variables; which allows the execution of dialplan functions.
Dialplan functions within Asterisk are incredibly powerful, which is wonderful
for building applications using Asterisk. But during the read or write
execution, certain diaplan functions do much more. For example, reading the
SHELL() function can execute arbitrary commands on the system Asterisk is
running on. Writing to the FILE() function can change any file that Asterisk has
write access to.
When these functions are executed from an external protocol, that execution
could result in a privilege escalation. Asterisk can inhibit the execution of
these functions, if live_dangerously in the [options] section of asterisk.conf
is set to no.
For backwards compatibility, live_dangerously defaults to yes, and must be
explicitly set to no to enable this privilege escalation protection.

View File

@@ -9,18 +9,18 @@ potential licensing and/or patent implications that has on your usage and
distribution of Asterisk.
Even though Asterisk is released as open source under the terms of the
GPLv2 (see LICENSE for details), no core functionality in Asterisk has any
GPLv2 (see LICENSE for details), no core functionality in Asterisk has any
dependencies on libraries that are licensed under the GPL. One reason a module
may be in the add-ons category is that it may have a GPL dependency. Since
these dependencies are not compatible with dual licensing of Asterisk, the
dependant modules are set aside to make it clear that they may not be used
with commercial versions of Asterisk, unless other licensing arrangements are
dependant modules are set aside to make it clear that they may not be used
with commercial versions of Asterisk, unless other licensing arrangements are
made with the copyright holders of those dependencies.
Another reason that modules may be set aside is that there may be
additional restrictions on the usage of the code imposed by the license or
related patents. The MySQL and MP3 modules are examples of this.
If you have any questions, contact your lawyer.
===============================================================================

View File

@@ -1,174 +0,0 @@
<html><head><title>Readme for asterisk-20.18.2</title></head><body>
<h1>The Asterisk(R) Open Source PBX</h1>
<pre><code>By Mark Spencer &lt;markster@digium.com&gt; and the Asterisk.org developer community.
Copyright (C) 2001-2025 Sangoma Technologies Corporation and other copyright holders.
</code></pre>
<h2>SECURITY</h2>
<p>It is imperative that you read and fully understand the contents of
the security information document before you attempt to configure and run
an Asterisk server.</p>
<p>See <a href="https://docs.asterisk.org/Deployment/Important-Security-Considerations">Important Security Considerations</a> for more information.</p>
<h2>WHAT IS ASTERISK ?</h2>
<p>Asterisk is an Open Source PBX and telephony toolkit. It is, in a
sense, middleware between Internet and telephony channels on the bottom,
and Internet and telephony applications at the top. However, Asterisk supports
more telephony interfaces than just Internet telephony. Asterisk also has a
vast amount of support for traditional PSTN telephony, as well.</p>
<p>For more information on the project itself, please visit the <a href="https://www.asterisk.org">Asterisk
Home Page</a> and the official
<a href="https://docs.asterisk.org">Asterisk Documentation</a>.</p>
<h2>SUPPORTED OPERATING SYSTEMS</h2>
<h3>Linux</h3>
<p>The Asterisk Open Source PBX is developed and tested primarily on the
GNU/Linux operating system, and is supported on every major GNU/Linux
distribution.</p>
<h3>Others</h3>
<p>Asterisk has also been 'ported' and reportedly runs properly on other
operating systems as well, Apple's Mac OS X, and the BSD variants.</p>
<h2>GETTING STARTED</h2>
<p>Most users are using VoIP/SIP exclusively these days but if you need to
interface to TDM or analog services or devices, be sure you've got supported
hardware.</p>
<p>Supported telephony hardware includes:
* All Analog and Digital Interface cards from Sangoma
* Any full duplex sound card supported by PortAudio
* The Xorcom Astribank channel bank</p>
<h3>UPGRADING FROM AN EARLIER VERSION</h3>
<p>If you are updating from a previous version of Asterisk, make sure you
read the Change Logs.</p>
<!-- CHANGELOGS (the URL will change based on the location of this README) -->
<p><a href="ChangeLogs/ChangeLog-20.18.2.html">Change Logs</a></p>
<!-- END-CHANGELOGS -->
<h3>NEW INSTALLATIONS</h3>
<p>Ensure that your system contains a compatible compiler and development
libraries. Asterisk requires either the GNU Compiler Collection (GCC) version
4.1 or higher, or a compiler that supports the C99 specification and some of
the gcc language extensions. In addition, your system needs to have the C
library headers available, and the headers and libraries for ncurses.</p>
<p>There are many modules that have additional dependencies. To see what
libraries are being looked for, see <code>./configure --help</code>, or run
<code>make menuselect</code> to view the dependencies for specific modules.</p>
<p>On many distributions, these dependencies are installed by packages with names
like 'glibc-devel', 'ncurses-devel', 'openssl-devel' and 'zlib-devel'
or similar. The <code>contrib/scripts/install_prereq</code> script can be used to install
the dependencies for most Debian and Redhat based Linux distributions.
The script also handles SUSE, Arch, Gentoo, FreeBSD, NetBSD and OpenBSD but
those distributions mightnoit have complete support or they might be out of date.</p>
<p>So, let's proceed:</p>
<ol>
<li>
<p>Read the documentation.<br>
The <a href="https://docs.asterisk.org">Asterisk Documentation</a> website has full
information for building, installing, configuring and running Asterisk.</p>
</li>
<li>
<p>Run <code>./configure</code><br>
Execute the configure script to guess values for system-dependent
variables used during compilation. If the script indicates that some required
components are missing, you can run <code>./contrib/scripts/install_prereq install</code>
to install the necessary components. Note that this will install all dependencies
for every functionality of Asterisk. After running the script, you will need
to rerun <code>./configure</code>.</p>
</li>
<li>
<p>Run <code>make menuselect</code><br>
This is needed if you want to select the modules that will be compiled and to
check dependencies for various optional modules.</p>
</li>
<li>
<p>Run <code>make</code><br>
Assuming the build completes successfully:</p>
</li>
<li>
<p>Run <code>make install</code><br>
If this is your first time working with Asterisk, you may wish to install
the sample PBX, with demonstration extensions, etc. If so, run:</p>
</li>
<li>
<p>Run <code>make samples</code><br>
Doing so will overwrite any existing configuration files you have installed.</p>
</li>
<li>
<p>Finally, you can launch Asterisk in the foreground mode (not a daemon) with
<code>asterisk -vvvc</code><br>
You'll see a bunch of verbose messages fly by your screen as Asterisk
initializes (that's the "very very verbose" mode). When it's ready, if
you specified the "c" then you'll get a command line console, that looks
like this:<br>
<code>*CLI&gt;</code><br>
You can type <code>core show help</code> at any time to get help with the system. For help
with a specific command, type <code>core show help &lt;command&gt;</code>.</p>
</li>
</ol>
<p><code>man asterisk</code> at the Unix/Linux command prompt will give you detailed
information on how to start and stop Asterisk, as well as all the command
line options for starting Asterisk.</p>
<h3>ABOUT CONFIGURATION FILES</h3>
<p>All Asterisk configuration files share a common format. Comments are
delimited by <code>;</code> (since <code>#</code> of course, being a DTMF digit, may occur in
many places). A configuration file is divided into sections whose names
appear in <code>[]</code>'s. Each section typically contains statements in the form
<code>variable = value</code> although you may see <code>variable =&gt; value</code> in older samples.</p>
<h3>SPECIAL NOTE ON TIME</h3>
<p>Those using SIP phones should be aware that Asterisk is sensitive to
large jumps in time. Manually changing the system time using date(1)
(or other similar commands) may cause SIP registrations and other
internal processes to fail. For this reason, you should always use
a time synchronization package to keep your system time accurate.
All OS/distributions make one or more of the following packages
available:</p>
<ul>
<li>ntpd/ntpsec</li>
<li>chronyd</li>
<li>systemd-timesyncd</li>
</ul>
<p>Be sure to install and configure one (and only one) of them.</p>
<h3>FILE DESCRIPTORS</h3>
<p>Depending on the size of your system and your configuration,
Asterisk can consume a large number of file descriptors. In UNIX,
file descriptors are used for more than just files on disk. File
descriptors are also used for handling network communication
(e.g. SIP, IAX2, or H.323 calls) and hardware access (e.g. analog and
digital trunk hardware). Asterisk accesses many on-disk files for
everything from configuration information to voicemail storage.</p>
<p>Most systems limit the number of file descriptors that Asterisk can
have open at one time. This can limit the number of simultaneous
calls that your system can handle. For example, if the limit is set
at 1024 (a common default value) Asterisk can handle approximately 150
SIP calls simultaneously. To change the number of file descriptors
follow the instructions for your system below:</p>
<h4>PAM-BASED LINUX SYSTEM</h4>
<p>If your system uses PAM (Pluggable Authentication Modules) edit
<code>/etc/security/limits.conf</code>. Add these lines to the bottom of the file:</p>
<pre><code class="language-text">root soft nofile 4096
root hard nofile 8196
asterisk soft nofile 4096
asterisk hard nofile 8196
</code></pre>
<p>(adjust the numbers to taste). You may need to reboot the system for
these changes to take effect.</p>
<h4>GENERIC UNIX SYSTEM</h4>
<p>If there are no instructions specifically adapted to your system
above you can try adding the command <code>ulimit -n 8192</code> to the script
that starts Asterisk.</p>
<h2>MORE INFORMATION</h2>
<p>Visit the <a href="https://docs.asterisk.org">Asterisk Documentation</a> website
for more documentation on various features and please read all the
configuration samples that include documentation on the configuration options.</p>
<p>Finally, you may wish to join the
<a href="https://community.asterisk.org">Asterisk Community Forums</a></p>
<p>Welcome to the growing worldwide community of Asterisk users!</p>
<pre><code> Mark Spencer, and the Asterisk.org development community
</code></pre>
<hr>
<p>Asterisk is a trademark of Sangoma Technologies Corporation</p>
<p>[<a href="https://www.sangoma.com/">Sangoma</a>]
[<a href="https://www.asterisk.org">Home Page</a>]
[<a href="https://www.asterisk.org/support">Support</a>]
[<a href="https://docs.asterisk.org">Documentation</a>]
[<a href="https://community.asterisk.org">Community Forums</a>]
[<a href="https://github.com/asterisk/asterisk/releases">Release Notes</a>]
[<a href="https://docs.asterisk.org/Deployment/Important-Security-Considerations/">Security</a>]
[<a href="https://lists.digium.com">Mailing List Archive</a>] </p>
</body></html>

212
README.md
View File

@@ -1,212 +0,0 @@
# The Asterisk(R) Open Source PBX
```
By Mark Spencer <markster@digium.com> and the Asterisk.org developer community.
Copyright (C) 2001-2025 Sangoma Technologies Corporation and other copyright holders.
```
## SECURITY
It is imperative that you read and fully understand the contents of
the security information document before you attempt to configure and run
an Asterisk server.
See [Important Security Considerations](https://docs.asterisk.org/Deployment/Important-Security-Considerations) for more information.
## WHAT IS ASTERISK ?
Asterisk is an Open Source PBX and telephony toolkit. It is, in a
sense, middleware between Internet and telephony channels on the bottom,
and Internet and telephony applications at the top. However, Asterisk supports
more telephony interfaces than just Internet telephony. Asterisk also has a
vast amount of support for traditional PSTN telephony, as well.
For more information on the project itself, please visit the [Asterisk
Home Page](https://www.asterisk.org) and the official
[Asterisk Documentation](https://docs.asterisk.org).
## SUPPORTED OPERATING SYSTEMS
### Linux
The Asterisk Open Source PBX is developed and tested primarily on the
GNU/Linux operating system, and is supported on every major GNU/Linux
distribution.
### Others
Asterisk has also been 'ported' and reportedly runs properly on other
operating systems as well, Apple's Mac OS X, and the BSD variants.
## GETTING STARTED
Most users are using VoIP/SIP exclusively these days but if you need to
interface to TDM or analog services or devices, be sure you've got supported
hardware.
Supported telephony hardware includes:
* All Analog and Digital Interface cards from Sangoma
* Any full duplex sound card supported by PortAudio
* The Xorcom Astribank channel bank
### UPGRADING FROM AN EARLIER VERSION
If you are updating from a previous version of Asterisk, make sure you
read the Change Logs.
<!-- CHANGELOGS (the URL will change based on the location of this README) -->
[Change Logs](ChangeLogs/ChangeLog-20.18.2.html)
<!-- END-CHANGELOGS -->
### NEW INSTALLATIONS
Ensure that your system contains a compatible compiler and development
libraries. Asterisk requires either the GNU Compiler Collection (GCC) version
4.1 or higher, or a compiler that supports the C99 specification and some of
the gcc language extensions. In addition, your system needs to have the C
library headers available, and the headers and libraries for ncurses.
There are many modules that have additional dependencies. To see what
libraries are being looked for, see `./configure --help`, or run
`make menuselect` to view the dependencies for specific modules.
On many distributions, these dependencies are installed by packages with names
like 'glibc-devel', 'ncurses-devel', 'openssl-devel' and 'zlib-devel'
or similar. The `contrib/scripts/install_prereq` script can be used to install
the dependencies for most Debian and Redhat based Linux distributions.
The script also handles SUSE, Arch, Gentoo, FreeBSD, NetBSD and OpenBSD but
those distributions mightnoit have complete support or they might be out of date.
So, let's proceed:
1. Read the documentation.<br>
The [Asterisk Documentation](https://docs.asterisk.org) website has full
information for building, installing, configuring and running Asterisk.
2. Run `./configure`<br>
Execute the configure script to guess values for system-dependent
variables used during compilation. If the script indicates that some required
components are missing, you can run `./contrib/scripts/install_prereq install`
to install the necessary components. Note that this will install all dependencies
for every functionality of Asterisk. After running the script, you will need
to rerun `./configure`.
3. Run `make menuselect`<br>
This is needed if you want to select the modules that will be compiled and to
check dependencies for various optional modules.
4. Run `make`<br>
Assuming the build completes successfully:
5. Run `make install`<br>
If this is your first time working with Asterisk, you may wish to install
the sample PBX, with demonstration extensions, etc. If so, run:
6. Run `make samples`<br>
Doing so will overwrite any existing configuration files you have installed.
7. Finally, you can launch Asterisk in the foreground mode (not a daemon) with
`asterisk -vvvc`<br>
You'll see a bunch of verbose messages fly by your screen as Asterisk
initializes (that's the "very very verbose" mode). When it's ready, if
you specified the "c" then you'll get a command line console, that looks
like this:<br>
`*CLI>`<br>
You can type `core show help` at any time to get help with the system. For help
with a specific command, type `core show help <command>`.
`man asterisk` at the Unix/Linux command prompt will give you detailed
information on how to start and stop Asterisk, as well as all the command
line options for starting Asterisk.
### ABOUT CONFIGURATION FILES
All Asterisk configuration files share a common format. Comments are
delimited by `;` (since `#` of course, being a DTMF digit, may occur in
many places). A configuration file is divided into sections whose names
appear in `[]`'s. Each section typically contains statements in the form
`variable = value` although you may see `variable => value` in older samples.
### SPECIAL NOTE ON TIME
Those using SIP phones should be aware that Asterisk is sensitive to
large jumps in time. Manually changing the system time using date(1)
(or other similar commands) may cause SIP registrations and other
internal processes to fail. For this reason, you should always use
a time synchronization package to keep your system time accurate.
All OS/distributions make one or more of the following packages
available:
* ntpd/ntpsec
* chronyd
* systemd-timesyncd
Be sure to install and configure one (and only one) of them.
### FILE DESCRIPTORS
Depending on the size of your system and your configuration,
Asterisk can consume a large number of file descriptors. In UNIX,
file descriptors are used for more than just files on disk. File
descriptors are also used for handling network communication
(e.g. SIP, IAX2, or H.323 calls) and hardware access (e.g. analog and
digital trunk hardware). Asterisk accesses many on-disk files for
everything from configuration information to voicemail storage.
Most systems limit the number of file descriptors that Asterisk can
have open at one time. This can limit the number of simultaneous
calls that your system can handle. For example, if the limit is set
at 1024 (a common default value) Asterisk can handle approximately 150
SIP calls simultaneously. To change the number of file descriptors
follow the instructions for your system below:
#### PAM-BASED LINUX SYSTEM
If your system uses PAM (Pluggable Authentication Modules) edit
`/etc/security/limits.conf`. Add these lines to the bottom of the file:
```text
root soft nofile 4096
root hard nofile 8196
asterisk soft nofile 4096
asterisk hard nofile 8196
```
(adjust the numbers to taste). You may need to reboot the system for
these changes to take effect.
#### GENERIC UNIX SYSTEM
If there are no instructions specifically adapted to your system
above you can try adding the command `ulimit -n 8192` to the script
that starts Asterisk.
## MORE INFORMATION
Visit the [Asterisk Documentation](https://docs.asterisk.org) website
for more documentation on various features and please read all the
configuration samples that include documentation on the configuration options.
Finally, you may wish to join the
[Asterisk Community Forums](https://community.asterisk.org)
Welcome to the growing worldwide community of Asterisk users!
```
Mark Spencer, and the Asterisk.org development community
```
---
Asterisk is a trademark of Sangoma Technologies Corporation
\[[Sangoma](https://www.sangoma.com/)\]
\[[Home Page](https://www.asterisk.org)\]
\[[Support](https://www.asterisk.org/support)\]
\[[Documentation](https://docs.asterisk.org)\]
\[[Community Forums](https://community.asterisk.org)\]
\[[Release Notes](https://github.com/asterisk/asterisk/releases)\]
\[[Security](https://docs.asterisk.org/Deployment/Important-Security-Considerations/)\]
\[[Mailing List Archive](https://lists.digium.com)\]

View File

@@ -1,9 +0,0 @@
# Security Policy
## Supported Versions
The Asterisk project maintains a [documentation page](https://docs.asterisk.org/About-the-Project/Asterisk-Versions/) of releases. Each version is listed with its release date, security fix only date, and end of life date. Consult this wiki page to see if the version of Asterisk you are reporting a security vulnerability against is still supported.
## Reporting a Vulnerability
To report a vulnerability use the "Report a vulnerability" button under the "Security" tab of this project.

218
UPGRADE-1.2.txt Normal file
View File

@@ -0,0 +1,218 @@
=========================================================
===
=== Information for upgrading from Asterisk 1.0 to 1.2
===
=== This file documents all the changes that MUST be taken
=== into account when upgrading between the Asterisk
=== versions listed below. These changes may require that
=== you modify your configuration files, dialplan or (in
=== some cases) source code if you have your own Asterisk
=== modules or patches. These files also includes advance
=== notice of any functionality that has been marked as
=== 'deprecated' and may be removed in a future release,
=== along with the suggested replacement functionality.
===
=========================================================
Compiling:
* The Asterisk 1.2 source code now uses C language features
supported only by 'modern' C compilers. Generally, this means GCC
version 3.0 or higher, although some GCC 2.96 releases will also
work. Some non-GCC compilers that support C99 and the common GCC
extensions (including anonymous structures and unions) will also
work. All releases of GCC 2.95 do _not_ have the requisite feature
support; systems using that compiler will need to be upgraded to
a more recent compiler release.
Dialplan Expressions:
* The dialplan expression parser (which handles $[ ... ] constructs)
has gone through a major upgrade, but has one incompatible change:
spaces are no longer required around expression operators, including
string comparisons. However, you can now use quoting to keep strings
together for comparison. For more details, please read the
doc/README.variables file, and check over your dialplan for possible
problems.
Agents:
* The default for ackcall has been changed to "no" instead of "yes"
because of a bug which caused the "yes" behavior to generally act like
"no". You may need to adjust the value if your agents behave
differently than you expect with respect to acknowledgement.
* The AgentCallBackLogin application now requires a second '|' before
specifying an extension@context. This is to distinguish the options
string from the extension, so that they do not conflict. See
'show application AgentCallbackLogin' for more details.
Parking:
* Parking behavior has changed slightly; when a parked call times out,
Asterisk will attempt to deliver the call back to the extension that
parked it, rather than the 's' extension. If that extension is busy
or unavailable, the parked call will be lost.
Dialing:
* The Caller*ID of the outbound leg is now the extension that was
called, rather than the Caller*ID of the inbound leg of the call. The
"o" flag for Dial can be used to restore the original behavior if
desired. Note that if you are looking for the originating callerid
from the manager event, there is a new manager event "Dial" which
provides the source and destination channels and callerid.
IAX:
* The naming convention for IAX channels has changed in two ways:
1. The call number follows a "-" rather than a "/" character.
2. The name of the channel has been simplified to IAX2/peer-callno,
rather than IAX2/peer@peer-callno or even IAX2/peer@peer/callno.
SIP:
* The global option "port" in 1.0.X that is used to set which port to
bind to has been changed to "bindport" to be more consistent with
the other channel drivers and to avoid confusion with the "port"
option for users/peers.
* The "Registry" event now uses "Username" rather than "User" for
consistency with IAX.
Applications:
* With the addition of dialplan functions (which operate similarly
to variables), the SetVar application has been renamed to Set.
* The CallerPres application has been removed. Use SetCallerPres
instead. It accepts both numeric and symbolic names.
* The applications GetGroupCount, GetGroupMatchCount, SetGroup, and
CheckGroup have been deprecated in favor of functions. Here is a
table of their replacements:
GetGroupCount([groupname][@category] GROUP_COUNT([groupname][@category]) Set(GROUPCOUNT=${GROUP_COUNT()})
GroupMatchCount(groupmatch[@category]) GROUP_MATCH_COUNT(groupmatch[@category]) Set(GROUPCOUNT=${GROUP_MATCH_COUNT(SIP/.*)})
SetGroup(groupname[@category]) GROUP([category])=groupname Set(GROUP()=test)
CheckGroup(max[@category]) N/A GotoIf($[ ${GROUP_COUNT()} > 5 ]?103)
Note that CheckGroup does not have a direct replacement. There is
also a new function called GROUP_LIST() which will return a space
separated list of all of the groups set on a channel. The GROUP()
function can also return the name of the group set on a channel when
used in a read environment.
* The applications DBGet and DBPut have been deprecated in favor of
functions. Here is a table of their replacements:
DBGet(foo=family/key) Set(foo=${DB(family/key)})
DBPut(family/key=${foo}) Set(DB(family/key)=${foo})
* The application SetLanguage has been deprecated in favor of the
function LANGUAGE().
SetLanguage(fr) Set(LANGUAGE()=fr)
The LANGUAGE function can also return the currently set language:
Set(MYLANG=${LANGUAGE()})
* The applications AbsoluteTimeout, DigitTimeout, and ResponseTimeout
have been deprecated in favor of the function TIMEOUT(timeouttype):
AbsoluteTimeout(300) Set(TIMEOUT(absolute)=300)
DigitTimeout(15) Set(TIMEOUT(digit)=15)
ResponseTimeout(15) Set(TIMEOUT(response)=15)
The TIMEOUT() function can also return the currently set timeouts:
Set(DTIMEOUT=${TIMEOUT(digit)})
* The applications SetCIDName, SetCIDNum, and SetRDNIS have been
deprecated in favor of the CALLERID(datatype) function:
SetCIDName(Joe Cool) Set(CALLERID(name)=Joe Cool)
SetCIDNum(2025551212) Set(CALLERID(number)=2025551212)
SetRDNIS(2024561414) Set(CALLERID(RDNIS)=2024561414)
* The application Record now uses the period to separate the filename
from the format, rather than the colon.
* The application VoiceMail now supports a 'temporary' greeting for each
mailbox. This greeting can be recorded by using option 4 in the
'mailbox options' menu, and 'change your password' option has been
moved to option 5.
* The application VoiceMailMain now only matches the 'default' context if
none is specified in the arguments. (This was the previously
documented behavior, however, we didn't follow that behavior.) The old
behavior can be restored by setting searchcontexts=yes in voicemail.conf.
Queues:
* A queue is now considered empty not only if there are no members but if
none of the members are available (e.g. agents not logged on). To
restore the original behavior, use "leavewhenempty=strict" or
"joinwhenempty=strict" instead of "=yes" for those options.
* It is now possible to use multi-digit extensions in the exit context
for a queue (although you should not have overlapping extensions,
as there is no digit timeout). This means that the EXITWITHKEY event
in queue_log can now contain a key field with more than a single
character in it.
Extensions:
* By default, there is a new option called "autofallthrough" in
extensions.conf that is set to yes. Asterisk 1.0 (and earlier)
behavior was to wait for an extension to be dialed after there were no
more extensions to execute. "autofallthrough" changes this behavior
so that the call will immediately be terminated with BUSY,
CONGESTION, or HANGUP based on Asterisk's best guess. If you are
writing an extension for IVR, you must use the WaitExten application
if "autofallthrough" is set to yes.
AGI:
* AGI scripts did not always get SIGHUP at the end, previously. That
behavior has been fixed. If you do not want your script to terminate
at the end of AGI being called (e.g. on a hangup) then set SIGHUP to
be ignored within your application.
* CallerID is reported with agi_callerid and agi_calleridname instead
of a single parameter holding both.
Music On Hold:
* The preferred format for musiconhold.conf has changed; please see the
sample configuration file for the new format. The existing format
is still supported but will generate warnings when the module is loaded.
chan_modem:
* All the chan_modem channel drivers (aopen, bestdata and i4l) are deprecated
in this release, and will be removed in the next major Asterisk release.
Please migrate to chan_misdn for ISDN interfaces; there is no upgrade
path for aopen and bestdata modem users.
MeetMe:
* The conference application now allows users to increase/decrease their
speaking volume and listening volume (independently of each other and
other users); the 'admin' and 'user' menus have changed, and new sound
files are included with this release. However, if a user calling in
over a Zaptel channel that does NOT have hardware DTMF detection
increases their speaking volume, it is likely they will no longer be
able to enter/exit the menu or make any further adjustments, as the
software DTMF detector will not be able to recognize the DTMF coming
from their device.
GetVar Manager Action:
* Previously, the behavior of the GetVar manager action reported the value
of a variable in the following manner:
> name: value
This has been changed to a manner similar to the SetVar action and is now
> Variable: name
> Value: value

498
UPGRADE-1.4.txt Normal file
View File

@@ -0,0 +1,498 @@
=========================================================
===
=== Information for upgrading from Asterisk 1.2 to 1.4
===
=== These files document all the changes that MUST be taken
=== into account when upgrading between the Asterisk
=== versions listed below. These changes may require that
=== you modify your configuration files, dialplan or (in
=== some cases) source code if you have your own Asterisk
=== modules or patches. These files also includes advance
=== notice of any functionality that has been marked as
=== 'deprecated' and may be removed in a future release,
=== along with the suggested replacement functionality.
===
=== UPGRADE-1.2.txt -- Upgrade info for 1.0 to 1.2
===
=========================================================
Build Process (configure script):
Asterisk now uses an autoconf-generated configuration script to learn how it
should build itself for your system. As it is a standard script, running:
$ ./configure --help
will show you all the options available. This script can be used to tell the
build process what libraries you have on your system (if it cannot find them
automatically), which libraries you wish to have ignored even though they may
be present, etc.
You must run the configure script before Asterisk will build, although it will
attempt to automatically run it for you with no options specified; for most
users, that will result in a similar build to what they would have had before
the configure script was added to the build process (except for having to run
'make' again after the configure script is run). Note that the configure script
does NOT need to be re-run just to rebuild Asterisk; you only need to re-run it
when your system configuration changes or you wish to build Asterisk with
different options.
Build Process (module selection):
The Asterisk source tree now includes a basic module selection and build option
selection tool called 'menuselect'. Run 'make menuselect' to make your choices.
In this tool, you can disable building of modules that you don't care about,
turn on/off global options for the build and see which modules will not
(and cannot) be built because your system does not have the required external
dependencies installed.
The resulting file from menuselect is called 'menuselect.makeopts'. Note that
the resulting menuselect.makeopts file generally contains which modules *not*
to build. The modules listed in this file indicate which modules have unmet
dependencies, a present conflict, or have been disabled by the user in the
menuselect interface. Compiler Flags can also be set in the menuselect
interface. In this case, the resulting file contains which CFLAGS are in use,
not which ones are not in use.
If you would like to save your choices and have them applied against all
builds, the file can be copied to '~/.asterisk.makeopts' or
'/etc/asterisk.makeopts'.
Build Process (Makefile targets):
The 'valgrind' and 'dont-optimize' targets have been removed; their functionality
is available by enabling the DONT_OPTIMIZE setting in the 'Compiler Flags' menu
in the menuselect tool.
It is now possible to run most make targets against a single subdirectory; from
the top level directory, for example, 'make channels' will run 'make all' in the
'channels' subdirectory. This also is true for 'clean', 'distclean' and 'depend'.
Sound (prompt) and Music On Hold files:
Beginning with Asterisk 1.4, the sound files and music on hold files supplied for
use with Asterisk have been replaced with new versions produced from high quality
master recordings, and are available in three languages (English, French and
Spanish) and in five formats (WAV (uncompressed), mu-Law, a-Law, GSM and G.729).
In addition, the music on hold files provided by opsound.org Music are now available
in the same five formats, but no longer available in MP3 format.
The Asterisk 1.4 tarball packages will only include English prompts in GSM format,
(as were supplied with previous releases) and the opsound.org MOH files in WAV format.
All of the other variations can be installed by running 'make menuselect' and
selecting the packages you wish to install; when you run 'make install', those
packages will be downloaded and installed along with the standard files included
in the tarball.
If for some reason you expect to not have Internet access at the time you will be
running 'make install', you can make your package selections using menuselect and
then run 'make sounds' to download (only) the sound packages; this will leave the
sound packages in the 'sounds' subdirectory to be used later during installation.
WARNING: Asterisk 1.4 supports a new layout for sound files in multiple languages;
instead of the alternate-language files being stored in subdirectories underneath
the existing files (for French, that would be digits/fr, letters/fr, phonetic/fr,
etc.) the new layout creates one directory under /var/lib/asterisk/sounds for the
language itself, then places all the sound files for that language under that
directory and its subdirectories. This is the layout that will be created if you
select non-English languages to be installed via menuselect, HOWEVER Asterisk does
not default to this layout and will not find the files in the places it expects them
to be. If you wish to use this layout, make sure you put 'languageprefix=yes' in your
/etc/asterisk/asterisk.conf file, so that Asterisk will know how the files were
installed.
PBX Core:
* The (very old and undocumented) ability to use BYEXTENSION for dialing
instead of ${EXTEN} has been removed.
* Builtin (res_features) transfer functionality attempts to use the context
defined in TRANSFER_CONTEXT variable of the transferer channel first. If
not set, it uses the transferee variable. If not set in any channel, it will
attempt to use the last non macro context. If not possible, it will default
to the current context.
* The autofallthrough setting introduced in Asterisk 1.2 now defaults to 'yes';
if your dialplan relies on the ability to 'run off the end' of an extension
and wait for a new extension without using WaitExten() to accomplish that,
you will need set autofallthrough to 'no' in your extensions.conf file.
Command Line Interface:
* 'show channels concise', designed to be used by applications that will parse
its output, previously used ':' characters to separate fields. However, some
of those fields can easily contain that character, making the output not
parseable. The delimiter has been changed to '!'.
Applications:
* In previous Asterisk releases, many applications would jump to priority n+101
to indicate some kind of status or error condition. This functionality was
marked deprecated in Asterisk 1.2. An option to disable it was provided with
the default value set to 'on'. The default value for the global priority
jumping option is now 'off'.
* The applications Cut, Sort, DBGet, DBPut, SetCIDNum, SetCIDName, SetRDNIS,
AbsoluteTimeout, DigitTimeout, ResponseTimeout, SetLanguage, GetGroupCount,
and GetGroupMatchCount were all deprecated in version 1.2, and therefore have
been removed in this version. You should use the equivalent dialplan
function in places where you have previously used one of these applications.
* The application SetGlobalVar has been deprecated. You should replace uses
of this application with the following combination of Set and GLOBAL():
Set(GLOBAL(name)=value). You may also access global variables exclusively by
using the GLOBAL() dialplan function, instead of relying on variable
interpolation falling back to globals when no channel variable is set.
* The application SetVar has been renamed to Set. The syntax SetVar was marked
deprecated in version 1.2 and is no longer recognized in this version. The
use of Set with multiple argument pairs has also been deprecated. Please
separate each name/value pair into its own dialplan line.
* app_read has been updated to use the newer options codes, using "skip" or
"noanswer" will not work. Use s or n. Also there is a new feature i, for
using indication tones, so typing in skip would give you unexpected results.
* OSPAuth is added to authenticate OSP tokens in in_bound call setup messages.
* The CONNECT event in the queue_log from app_queue now has a second field
in addition to the holdtime field. It contains the unique ID of the
queue member channel that is taking the call. This is useful when trying
to link recording filenames back to a particular call from the queue.
* The old/current behavior of app_queue has a serial type behavior
in that the queue will make all waiting callers wait in the queue
even if there is more than one available member ready to take
calls until the head caller is connected with the member they
were trying to get to. The next waiting caller in line then
becomes the head caller, and they are then connected with the
next available member and all available members and waiting callers
waits while this happens. This cycle continues until there are
no more available members or waiting callers, whichever comes first.
The new behavior, enabled by setting autofill=yes in queues.conf
either at the [general] level to default for all queues or
to set on a per-queue level, makes sure that when the waiting
callers are connecting with available members in a parallel fashion
until there are no more available members or no more waiting callers,
whichever comes first. This is probably more along the lines of how
one would expect a queue should work and in most cases, you will want
to enable this new behavior. If you do not specify or comment out this
option, it will default to "no" to keep backward compatability with the old
behavior.
* Queues depend on the channel driver reporting the proper state
for each member of the queue. To get proper signalling on
queue members that use the SIP channel driver, you need to
enable a call limit (could be set to a high value so it
is not put into action) and also make sure that both inbound
and outbound calls are accounted for.
Example:
[general]
limitonpeer = yes
[peername]
type=friend
call-limit=10
* The app_queue application now has the ability to use MixMonitor to
record conversations queue members are having with queue callers. Please
see configs/queues.conf.sample for more information on this option.
* The app_queue application strategy called 'roundrobin' has been deprecated
for this release. Users are encouraged to use 'rrmemory' instead, since it
provides more 'true' round-robin call delivery. For the Asterisk 1.6 release,
'rrmemory' will be renamed 'roundrobin'.
* The app_queue application option called 'monitor-join' has been deprecated
for this release. Users are encouraged to use 'monitor-type=mixmonitor' instead,
since it provides the same functionality but is not dependent on soxmix or some
other external program in order to mix the audio.
* app_meetme: The 'm' option (monitor) is renamed to 'l' (listen only), and
the 'm' option now provides the functionality of "initially muted".
In practice, most existing dialplans using the 'm' flag should not notice
any difference, unless the keypad menu is enabled, allowing the user
to unmute themsleves.
* ast_play_and_record would attempt to cancel the recording if a DTMF
'0' was received. This behavior was not documented in most of the
applications that used ast_play_and_record and the return codes from
ast_play_and_record weren't checked for properly.
ast_play_and_record has been changed so that '0' no longer cancels a
recording. If you want to allow DTMF digits to cancel an
in-progress recording use ast_play_and_record_full which allows you
to specify which DTMF digits can be used to accept a recording and
which digits can be used to cancel a recording.
* ast_app_messagecount has been renamed to ast_app_inboxcount. There is now a
new ast_app_messagecount function which takes a single context/mailbox/folder
mailbox specification and returns the message count for that folder only.
This addresses the deficiency of not being able to count the number of
messages in folders other than INBOX and Old.
* The exit behavior of the AGI applications has changed. Previously, when
a connection to an AGI server failed, the application would cause the channel
to immediately stop dialplan execution and hangup. Now, the only time that
the AGI applications will cause the channel to stop dialplan execution is
when the channel itself requests hangup. The AGI applications now set an
AGISTATUS variable which will allow you to find out whether running the AGI
was successful or not.
Previously, there was no way to handle the case where Asterisk was unable to
locally execute an AGI script for some reason. In this case, dialplan
execution will continue as it did before, but the AGISTATUS variable will be
set to "FAILURE".
A locally executed AGI script can now exit with a non-zero exit code and this
failure will be detected by Asterisk. If an AGI script exits with a non-zero
exit code, the AGISTATUS variable will be set to "FAILURE" as opposed to
"SUCCESS".
* app_voicemail: The ODBC_STORAGE capability now requires the extended table format
previously used only by EXTENDED_ODBC_STORAGE. This means that you will need to update
your table format using the schema provided in doc/odbcstorage.txt
* app_waitforsilence: Fixes have been made to this application which changes the
default behavior with how quickly it returns. You can maintain "old-style" behavior
with the addition/use of a third "timeout" parameter.
Please consult the application documentation and make changes to your dialplan
if appropriate.
Manager:
* After executing the 'status' manager action, the "Status" manager events
included the header "CallerID:" which was actually only the CallerID number,
and not the full CallerID string. This header has been renamed to
"CallerIDNum". For compatibility purposes, the CallerID parameter will remain
until after the release of 1.4, when it will be removed. Please use the time
during the 1.4 release to make this transition.
* The AgentConnect event now has an additional field called "BridgedChannel"
which contains the unique ID of the queue member channel that is taking the
call. This is useful when trying to link recording filenames back to
a particular call from the queue.
* app_userevent has been modified to always send Event: UserEvent with the
additional header UserEvent: <userspec>. Also, the Channel and UniqueID
headers are not automatically sent, unless you specify them as separate
arguments. Please see the application help for the new syntax.
* app_meetme: Mute and Unmute events are now reported via the Manager API.
Native Manager API commands MeetMeMute and MeetMeUnmute are provided, which
are easier to use than "Action Command:". The MeetMeStopTalking event has
also been deprecated in favor of the already existing MeetmeTalking event
with a "Status" of "on" or "off" added.
* OriginateFailure and OriginateSuccess events were replaced by event
OriginateResponse with a header named "Response" to indicate success or
failure
Variables:
* The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
${CALLERANI}, ${DNID}, ${RDNIS}, ${DATETIME}, ${TIMESTAMP}, ${ACCOUNTCODE},
and ${LANGUAGE} have all been deprecated in favor of their related dialplan
functions. You are encouraged to move towards the associated dialplan
function, as these variables will be removed in a future release.
* The CDR-CSV variables uniqueid, userfield, and basing time on GMT are now
adjustable from cdr.conf, instead of recompiling.
* OSP applications exports several new variables, ${OSPINHANDLE},
${OSPOUTHANDLE}, ${OSPINTOKEN}, ${OSPOUTTOKEN}, ${OSPCALLING},
${OSPINTIMELIMIT}, and ${OSPOUTTIMELIMIT}
* Builtin transfer functionality sets the variable ${TRANSFERERNAME} in the new
created channel. This variables holds the channel name of the transferer.
* The dial plan variable PRI_CAUSE will be removed from future versions
of Asterisk.
It is replaced by adding a cause value to the hangup() application.
Functions:
* The function ${CHECK_MD5()} has been deprecated in favor of using an
expression: $[${MD5(<string>)} = ${saved_md5}].
* The 'builtin' functions that used to be combined in pbx_functions.so are
now built as separate modules. If you are not using 'autoload=yes' in your
modules.conf file then you will need to explicitly load the modules that
contain the functions you want to use.
* The ENUMLOOKUP() function with the 'c' option (for counting the number of
records), but the lookup fails to match any records, the returned value will
now be "0" instead of blank.
* The REALTIME() function is now available in version 1.4 and app_realtime has
been deprecated in favor of the new function. app_realtime will be removed
completely with the version 1.6 release so please take the time between
releases to make any necessary changes
* The QUEUEAGENTCOUNT() function has been deprecated in favor of
QUEUE_MEMBER_COUNT().
The IAX2 channel:
* It is possible that previous configurations depended on the order in which
peers and users were specified in iax.conf for forcing the order in which
chan_iax2 matched against them. This behavior is going away and is considered
deprecated in this version. Avoid having ambiguous peer and user entries and
to make things easy on yourself, always set the "username" option for users
so that the remote end can match on that exactly instead of trying to infer
which user you want based on host.
If you would like to go ahead and use the new behavior which doesn't use the
order in the config file to influence matching order, then change the
MAX_PEER_BUCKETS define in chan_iax2.c to a value greater than one. An
example is provided there. By changing this, you will get *much* better
performance on systems that do a lot of peer and user lookups as they will be
stored in memory in a much more efficient manner.
* The "mailboxdetail" option has been deprecated. Previously, if this option
was not enabled, the 2 byte MSGCOUNT information element would be set to all
1's to indicate there there is some number of messages waiting. With this
option enabled, the number of new messages were placed in one byte and the
number of old messages are placed in the other. This is now the default
(and the only) behavior.
The SIP channel:
* The "incominglimit" setting is replaced by the "call-limit" setting in
sip.conf.
* OSP support code is removed from SIP channel to OSP applications. ospauth
option in sip.conf is removed to osp.conf as authpolicy. allowguest option
in sip.conf cannot be set as osp anymore.
* The Asterisk RTP stack has been changed in regards to RFC2833 reception
and transmission. Packets will now be sent with proper duration instead of all
at once. If you are receiving calls from a pre-1.4 Asterisk installation you
will want to turn on the rfc2833compensate option. Without this option your
DTMF reception may act poorly.
* The $SIPUSERAGENT dialplan variable is deprecated and will be removed
in coming versions of Asterisk. Please use the dialplan function
SIPCHANINFO(useragent) instead.
* The ALERT_INFO dialplan variable is deprecated and will be removed
in coming versions of Asterisk. Please use the dialplan application
sipaddheader() to add the "Alert-Info" header to the outbound invite.
* The "canreinvite" option has changed. canreinvite=yes used to disable
re-invites if you had NAT=yes. In 1.4, you need to set canreinvite=nonat
to disable re-invites when NAT=yes. This is propably what you want.
The settings are now: "yes", "no", "nonat", "update". Please consult
sip.conf.sample for detailed information.
The Zap channel:
* Support for MFC/R2 has been removed, as it has not been functional for some
time and it has no maintainer.
The Agent channel:
* Callback mode (AgentCallbackLogin) is now deprecated, since the entire function
it provided can be done using dialplan logic, without requiring additional
channel and module locks (which frequently caused deadlocks). An example of
how to do this using AEL dialplan is in doc/queues-with-callback-members.txt.
The G726-32 codec:
* It has been determined that previous versions of Asterisk used the wrong codeword
packing order for G726-32 data. This version supports both available packing orders,
and can transcode between them. It also now selects the proper order when
negotiating with a SIP peer based on the codec name supplied in the SDP. However,
there are existing devices that improperly request one order and then use another;
Sipura and Grandstream ATAs are known to do this, and there may be others. To
be able to continue to use these devices with this version of Asterisk and the
G726-32 codec, a configuration parameter called 'g726nonstandard' has been added
to sip.conf, so that Asterisk can use the packing order expected by the device (even
though it requested a different order). In addition, the internal format number for
G726-32 has been changed, and the old number is now assigned to AAL2-G726-32. The
result of this is that this version of Asterisk will be able to interoperate over
IAX2 with older versions of Asterisk, as long as this version is told to allow
'g726aal2' instead of 'g726' as the codec for the call.
Installation:
* On BSD systems, the installation directories have changed to more "FreeBSDish"
directories. On startup, Asterisk will look for the main configuration in
/usr/local/etc/asterisk/asterisk.conf
If you have an old installation, you might want to remove the binaries and
move the configuration files to the new locations. The following directories
are now default:
ASTLIBDIR /usr/local/lib/asterisk
ASTVARLIBDIR /usr/local/share/asterisk
ASTETCDIR /usr/local/etc/asterisk
ASTBINDIR /usr/local/bin/asterisk
ASTSBINDIR /usr/local/sbin/asterisk
Music on Hold:
* The music on hold handling has been changed in some significant ways in hopes
to make it work in a way that is much less confusing to users. Behavior will
not change if the same configuration is used from older versions of Asterisk.
However, there are some new configuration options that will make things work
in a way that makes more sense.
Previously, many of the channel drivers had an option called "musicclass" or
something similar. This option set what music on hold class this channel
would *hear* when put on hold. Some people expected (with good reason) that
this option was to configure what music on hold class to play when putting
the bridged channel on hold. This option has now been deprecated.
Two new music on hold related configuration options for channel drivers have
been introduced. Some channel drivers support both options, some just one,
and some support neither of them. Check the sample configuration files to see
which options apply to which channel driver.
The "mohsuggest" option specifies which music on hold class to suggest to the
bridged channel when putting them on hold. The only way that this class can
be overridden is if the bridged channel has a specific music class set that
was done in the dialplan using Set(CHANNEL(musicclass)=something).
The "mohinterpret" option is similar to the old "musicclass" option. It
specifies which music on hold class this channel would like to listen to when
put on hold. This music class is only effective if this channel has no music
class set on it from the dialplan and the bridged channel putting this one on
hold had no "mohsuggest" setting.
The IAX2 and Zap channel drivers have an additional feature for the
"mohinterpret" option. If this option is set to "passthrough", then these
channel drivers will pass through the HOLD message in signalling instead of
starting music on hold on the channel. An example for how this would be
useful is in an enterprise network of Asterisk servers. When one phone on one
server puts a phone on a different server on hold, the remote server will be
responsible for playing the hold music to its local phone that was put on
hold instead of the far end server across the network playing the music.
CDR Records:
* The behavior of the "clid" field of the CDR has always been that it will
contain the callerid ANI if it is set, or the callerid number if ANI was not
set. When using the "callerid" option for various channel drivers, some
would set ANI and some would not. This has been cleared up so that all
channel drivers set ANI. If you would like to change the callerid number
on the channel from the dialplan and have that change also show up in the
CDR, then you *must* set CALLERID(ANI) as well as CALLERID(num).
API:
* There are some API functions that were not previously prefixed with the 'ast_'
prefix but now are; these include the ADSI, ODBC and AGI interfaces. If you
have a module that uses the services provided by res_adsi, res_odbc, or
res_agi, you will need to add ast_ prefixes to the functions that you call
from those modules.
Formats:
* format_wav: The GAIN preprocessor definition has been changed from 2 to 0
in Asterisk 1.4. This change was made in response to user complaints of
choppiness or the clipping of loud signal peaks. The GAIN preprocessor
definition will be retained in Asterisk 1.4, but will be removed in a
future release. The use of GAIN for the increasing of voicemail message
volume should use the 'volgain' option in voicemail.conf

277
UPGRADE-1.6.txt Normal file
View File

@@ -0,0 +1,277 @@
=========================================================
===
=== Information for upgrading from Asterisk 1.4 to 1.6
===
=== These files document all the changes that MUST be taken
=== into account when upgrading between the Asterisk
=== versions listed below. These changes may require that
=== you modify your configuration files, dialplan or (in
=== some cases) source code if you have your own Asterisk
=== modules or patches. These files also includes advance
=== notice of any functionality that has been marked as
=== 'deprecated' and may be removed in a future release,
=== along with the suggested replacement functionality.
===
=== UPGRADE-1.2.txt -- Upgrade info for 1.0 to 1.2
=== UPGRADE-1.4.txt -- Upgrade info for 1.2 to 1.4
===
=========================================================
AEL:
* Macros are now implemented underneath with the Gosub() application.
Heaven Help You if you wrote code depending on any aspect of this!
Previous to 1.6, macros were implemented with the Macro() app, which
provided a nice feature of auto-returning. The compiler will do its
best to insert a Return() app call at the end of your macro if you did
not include it, but really, you should make sure that all execution
paths within your macros end in "return;".
* The conf2ael program is 'introduced' in this release; it is in a rather
crude state, but deemed useful for making a first pass at converting
extensions.conf code into AEL. More intelligence will come with time.
Core:
* The 'languageprefix' option in asterisk.conf is now deprecated, and
the default sound file layout for non-English sounds is the 'new
style' layout introduced in Asterisk 1.4 (and used by the automatic
sound file installer in the Makefile).
* The ast_expr2 stuff has been modified to handle floating-point numbers.
Numbers of the format D.D are now acceptable input for the expr parser,
Where D is a string of base-10 digits. All math is now done in "long double",
if it is available on your compiler/architecture. This was half-way between
a bug-fix (because the MATH func returns fp by default), and an enhancement.
Also, for those counting on, or needing, integer operations, a series of
'functions' were also added to the expr language, to allow several styles
of rounding/truncation, along with a set of common floating point operations,
like sin, cos, tan, log, pow, etc. The ability to call external functions
like CDR(), etc. was also added, without having to use the ${...} notation.
* The delimiter passed to applications has been changed to the comma (','), as
that is what people are used to using within extensions.conf. If you are
using realtime extensions, you will need to translate your existing dialplan
to use this separator. To use a literal comma, you need merely to escape it
with a backslash ('\'). Another possible side effect is that you may need to
remove the obscene level of backslashing that was necessary for the dialplan
to work correctly in 1.4 and previous versions. This should make writing
dialplans less painful in the future, albeit with the pain of a one-time
conversion. If you would like to avoid this conversion immediately, set
pbx_realtime=1.4 in the [compat] section of asterisk.conf. After
transitioning, set pbx_realtime=1.6 in the same section.
* For the same purpose as above, you may set res_agi=1.4 in the [compat]
section of asterisk.conf to continue to use the '|' delimiter in the EXEC
arguments of AGI applications. After converting to use the ',' delimiter,
change this option to res_agi=1.6.
* As a side effect of the application delimiter change, many places that used
to need quotes in order to get the proper meaning are no longer required.
You now only need to quote strings in configuration files if you literally
want quotation marks within a string.
* Any applications run that contain the pipe symbol but not a comma symbol will
get a warning printed to the effect that the application delimiter has changed.
However, there are legitimate reasons why this might be useful in certain
situations, so this warning can be turned off with the dontwarn option in
asterisk.conf.
* The logger.conf option 'rotatetimestamp' has been deprecated in favor of
'rotatestrategy'. This new option supports a 'rotate' strategy that more
closely mimics the system logger in terms of file rotation.
* The concise versions of various CLI commands are now deprecated. We recommend
using the manager interface (AMI) for application integration with Asterisk.
Voicemail:
* The voicemail configuration values 'maxmessage' and 'minmessage' have
been changed to 'maxsecs' and 'minsecs' to clarify their purpose and
to make them more distinguishable from 'maxmsgs', which sets folder
size. The old variables will continue to work in this version, albeit
with a deprecation warning.
* If you use any interface for modifying voicemail aside from the built in
dialplan applications, then the option "pollmailboxes" *must* be set in
voicemail.conf for message waiting indication (MWI) to work properly. This
is because Voicemail notification is now event based instead of polling
based. The channel drivers are no longer responsible for constantly manually
checking mailboxes for changes so that they can send MWI information to users.
Examples of situations that would require this option are web interfaces to
voicemail or an email client in the case of using IMAP storage.
Applications:
* ChanIsAvail() now has a 't' option, which allows the specified device
to be queried for state without consulting the channel drivers. This
performs mostly a 'ChanExists' sort of function.
* ChannelRedirect() will not terminate the channel that fails to do a
channelredirect as it has done previously. Instead CHANNELREDIRECT_STATUS
will reflect if the attempt was successful of not.
* SetCallerPres() has been replaced with the CALLERPRES() dialplan function
and is now deprecated.
* DISA()'s fifth argument is now an options argument. If you have previously
used 'NOANSWER' in this argument, you'll need to convert that to the new
option 'n'.
* Macro() is now deprecated. If you need subroutines, you should use the
Gosub()/Return() applications. To replace MacroExclusive(), we have
introduced dialplan functions LOCK(), TRYLOCK(), and UNLOCK(). You may use
these functions in any location where you desire to ensure that only one
channel is executing that path at any one time. The Macro() applications
are deprecated for performance reasons. However, since Macro() has been
around for a long time and so many dialplans depend heavily on it, for the
sake of backwards compatibility it will not be removed . It is also worth
noting that using both Macro() and GoSub() at the same time is _heavily_
discouraged.
* Read() now sets a READSTATUS variable on exit. It does NOT automatically
return -1 (and hangup) anymore on error. If you want to hangup on error,
you need to do so explicitly in your dialplan.
* Privacy() no longer uses privacy.conf, so any options must be specified
directly in the application arguments.
* MusicOnHold application now has duration parameter which allows specifying
timeout in seconds.
* WaitMusicOnHold application is now deprecated in favor of extended MusicOnHold.
* SetMusicOnHold is now deprecated. You should use Set(CHANNEL(musicclass)=...)
instead.
* The arguments in ExecIf changed a bit, to be more like other applications.
The syntax is now ExecIf(<cond>?appiftrue(args):appiffalse(args)).
* The behavior of the Set application now depends upon a compatibility option,
set in asterisk.conf. To use the old 1.4 behavior, which allowed Set to take
multiple key/value pairs, set app_set=1.4 in [compat] in asterisk.conf. To
use the new behavior, which permits variables to be set with embedded commas,
set app_set=1.6 in [compat] in asterisk.conf. Note that you can have both
behaviors at the same time, if you switch to using MSet if you want the old
behavior.
Dialplan Functions:
* QUEUE_MEMBER_COUNT() has been deprecated in favor of the QUEUE_MEMBER() function. For
more information, issue a "show function QUEUE_MEMBER" from the CLI.
CDR:
* The cdr_sqlite module has been marked as deprecated in favor of
cdr_sqlite3_custom. It will potentially be removed from the tree
after Asterisk 1.6 is released.
* The cdr_odbc module now uses res_odbc to manage its connections. The
username and password parameters in cdr_odbc.conf, therefore, are no
longer used. The dsn parameter now points to an entry in res_odbc.conf.
* The uniqueid field in the core Asterisk structure has been changed from a
maximum 31 character field to a 149 character field, to account for all
possible values the systemname prefix could be. In the past, if the
systemname was too long, the uniqueid would have been truncated.
* The cdr_tds module now supports all versions of FreeTDS that contain
the db-lib frontend. It will also now log the userfield variable if
the target database table contains a column for it.
Formats:
* format_wav: The GAIN preprocessor definition and source code that used it
is removed. This change was made in response to user complaints of
choppiness or the clipping of loud signal peaks. To increase the volume
of voicemail messages, use the 'volgain' option in voicemail.conf
Channel Drivers:
* SIP: a small upgrade to support the "Record" button on the SNOM360,
which sends a sip INFO message with a "Record: on" or "Record: off"
header. If Asterisk is set up (via features.conf) to accept "One Touch Monitor"
requests (by default, via '*1'), then the user-configured dialpad sequence
is generated, and recording can be started and stopped via this button. The
file names and formats are all controlled via the normal mechanisms. If the
user has not configured the automon feature, the normal "415 Unsupported media type"
is returned, and nothing is done.
* SIP: The "call-limit" option is marked as deprecated. It still works in this version of
Asterisk, but will be removed in the following version. Please use the groupcount functions
in the dialplan to enforce call limits. The "limitonpeer" configuration option is
now renamed to "counteronpeer".
* SIP: The "username" option is now renamed to "defaultuser" to match "defaultip".
These are used only before registration to call a peer with the uri
sip:defaultuser@defaultip
The "username" setting still work, but is deprecated and will not work in
the next version of Asterisk.
* SIP: The old "insecure" options, deprecated in 1.4, have been removed.
"insecure=very" should be changed to "insecure=port,invite"
"insecure=yes" should be changed to "insecure=port"
Be aware that some telephony providers show the invalid syntax in their
sample configurations.
* chan_local.c: the comma delimiter inside the channel name has been changed to a
semicolon, in order to make the Local channel driver compatible with the comma
delimiter change in applications.
* H323: The "tos" setting has changed name to "tos_audio" and "cos" to "cos_audio"
to be compatible with settings in sip.conf. The "tos" and "cos" configuration
is deprecated and will stop working in the next release of Asterisk.
* Console: A new console channel driver, chan_console, has been added to Asterisk.
This new module can not be loaded at the same time as chan_alsa or chan_oss. The
default modules.conf only loads one of them (chan_oss by default). So, unless you
have modified your modules.conf to not use the autoload option, then you will need
to modify modules.conf to add another "noload" line to ensure that only one of
these three modules gets loaded.
* DAHDI: The chan_zap module that supported PSTN interfaces using
Zaptel has been renamed to chan_dahdi, and only supports the DAHDI
telephony driver package for PSTN interfaces. See the
Zaptel-to-DAHDI.txt file for more details on this transition.
* DAHDI: The "msdstrip" option has been deprecated, as it provides no value over
the method of stripping digits in the dialplan using variable substring syntax.
Configuration:
* pbx_dundi.c: tos parameter changed to use new values. Old values like lowdelay,
lowcost and other is not acceptable now. Look into qos.tex for description of
this parameter.
* queues.conf: the queue-lessthan sound file option is no longer available, and the
queue-round-seconds option no longer takes '1' as a valid parameter.
Manager:
* Manager has been upgraded to version 1.1 with a lot of changes.
Please check doc/manager_1_1.txt for information
* The IAXpeers command output has been changed to more closely resemble the
output of the SIPpeers command.
* cdr_manager now reports at the "cdr" level, not at "call" You may need to
change your manager.conf to add the level to existing AMI users, if they
want to see the CDR events generated.
* The Originate command now requires the Originate write permission. For
Originate with the Application parameter, you need the additional System
privilege if you want to do anything that calls out to a subshell.
iLBC Codec:
* Previously, the Asterisk source code distribution included the iLBC
encoder/decoder source code, from Global IP Solutions
(http://www.gipscorp.com). This code is not licensed for
distribution, and thus has been removed from the Asterisk source
code distribution. If you wish to use codec_ilbc to support iLBC
channels in Asterisk, you can run the contrib/scripts/get_ilbc_source.sh
script to download the source and put it in the proper place in
the Asterisk build tree. Once that is done you can follow your normal
steps of building Asterisk. You will need to run 'menuselect' and enable
the iLBC codec in the 'Codec Translators' category.

344
UPGRADE-1.8.txt Normal file
View File

@@ -0,0 +1,344 @@
===========================================================
===
=== Information for upgrading between Asterisk versions
===
=== These files document all the changes that MUST be taken
=== into account when upgrading between the Asterisk
=== versions listed below. These changes may require that
=== you modify your configuration files, dialplan or (in
=== some cases) source code if you have your own Asterisk
=== modules or patches. These files also includes advance
=== notice of any functionality that has been marked as
=== 'deprecated' and may be removed in a future release,
=== along with the suggested replacement functionality.
===
=== UPGRADE-1.2.txt -- Upgrade info for 1.0 to 1.2
=== UPGRADE-1.4.txt -- Upgrade info for 1.2 to 1.4
=== UPGRADE-1.6.txt -- Upgrade info for 1.4 to 1.6
===
===========================================================
From 1.8.13 to 1.8.14:
* permitdirectmedia/denydirectmedia now controls whether peers can be
bridged via directmedia by comparing the ACL to the bridging peer's
address rather than its own address.
From 1.8.12 to 1.8.13:
* The complex processor detection and optimization has been removed from
the makefile in favor of using native optimization suppport when available.
BUILD_NATIVE can be disabled via menuselect under "Compiler Flags".
From 1.8.10 to 1.8.11:
* If no transport is specified in sip.conf, transport will default to UDP.
Also, if multiple transport= lines are used, only the last will be used.
From 1.6.2 to 1.8:
* chan_sip no longer sets HASH(SIP_CAUSE,<chan name>) on channels by default.
This must now be enabled by setting 'sipstorecause' to 'yes' in sip.conf.
This carries a performance penalty.
* Asterisk now requires libpri 1.4.11+ for PRI support.
* A couple of CLI commands in res_ais were changed back to their original form:
"ais show clm members" --> "ais clm show members"
"ais show evt event channels" --> "ais evt show event channels"
* The default value for 'autofill' and 'shared_lastcall' in queues.conf has
been changed to 'yes'.
* The default value for the alwaysauthreject option in sip.conf has been changed
from "no" to "yes".
* The behavior of the 'parkedcallstimeout' has changed slightly. The formulation
of the extension name that a timed out parked call is delivered to when this
option is set to 'no' was modified such that instead of converting '/' to '0',
the '/' is converted to an underscore '_'. See the updated documentation in
features.conf.sample for more information on the behavior of the
'parkedcallstimeout' option.
* Asterisk-addons no longer exists as an independent package. Those modules
now live in the addons directory of the main Asterisk source tree. They
are not enabled by default. For more information about why modules live in
addons, see README-addons.txt.
* The rarely used 'event_log' and LOG_EVENT channel have been removed; the few
users of this channel in the tree have been converted to LOG_NOTICE or removed
(in cases where the same message was already generated to another channel).
* The usage of RTP inside of Asterisk has now become modularized. This means
the Asterisk RTP stack now exists as a loadable module, res_rtp_asterisk.
If you are not using autoload=yes in modules.conf you will need to ensure
it is set to load. If not, then any module which uses RTP (such as chan_sip)
will not be able to send or receive calls.
* The app_dahdiscan.c file has been removed, but the dialplan app DAHDIScan still
remains. It now exists within app_chanspy.c and retains the exact same
functionality as before.
* The default behavior for Set, AGI, and pbx_realtime has been changed to implement
1.6 behavior by default, if there is no [compat] section in asterisk.conf. In
prior versions, the behavior defaulted to 1.4 behavior, to assist in upgrades.
Specifically, that means that pbx_realtime and res_agi expect you to use commas
to separate arguments in applications, and Set only takes a single pair of
a variable name/value. The old 1.4 behavior may still be obtained by setting
app_set, pbx_realtime, and res_agi each to 1.4 in the [compat] section of
asterisk.conf.
* The PRI channels in chan_dahdi can no longer change the channel name if a
different B channel is selected during call negotiation. To prevent using
the channel name to infer what B channel a call is using and to avoid name
collisions, the channel name format is changed.
The new channel naming for PRI channels is:
DAHDI/i<span>/<number>[:<subaddress>]-<sequence-number>
* Added CHANNEL(dahdi_span), CHANNEL(dahdi_channel), and CHANNEL(dahdi_type)
so the dialplan can determine the B channel currently in use by the channel.
Use CHANNEL(no_media_path) to determine if the channel even has a B channel.
* Added AMI event DAHDIChannel to associate a DAHDI channel with an Asterisk
channel so AMI applications can passively determine the B channel currently
in use. Calls with "no-media" as the DAHDIChannel do not have an associated
B channel. No-media calls are either on hold or call-waiting.
* The ChanIsAvail application has been changed so the AVAILSTATUS variable
no longer contains both the device state and cause code. The cause code
is now available in the AVAILCAUSECODE variable. If existing dialplan logic
is written to expect AVAILSTATUS to contain the cause code it needs to be
changed to use AVAILCAUSECODE.
* ExternalIVR will now send Z events for invalid or missing files, T events
now include the interrupted file and bugs in argument parsing have been
fixed so there may be arguments specified in incorrect ways that were
working that will no longer work. Please see
https://wiki.asterisk.org/wiki/display/AST/External+IVR+Interface for details.
* OSP lookup application changes following variable names:
OSPPEERIP to OSPINPEERIP
OSPTECH to OSPOUTTECH
OSPDEST to OSPDESTINATION
OSPCALLING to OSPOUTCALLING
OSPCALLED to OSPOUTCALLED
OSPRESULTS to OSPDESTREMAILS
* The Manager event 'iax2 show peers' output has been updated. It now has a
similar output of 'sip show peers'.
* VoiceMailMain and VMAuthenticate, if a '*' is entered in the first position
of a Mailbox or Password, will, if it exists, jump to the 'a' extension in
the current dialplan context.
* The CALLERPRES() dialplan function is deprecated in favor of
CALLERID(num-pres) and CALLERID(name-pres).
* Environment variables that start with "AST_" are reserved to the system and
may no longer be set from the dialplan.
* When a call is redirected inside of a Dial, the app and appdata fields of the
CDR will now be set to "AppDial" and "(Outgoing Line)" instead of being blank.
* The CDR handling of billsec and duration field has changed. If your table
definition specifies those fields as float,double or similar they will now
be logged with microsecond accuracy instead of a whole integer.
* chan_sip will no longer set up a local call forward when receiving a
482 Loop Detected response. The dialplan will just continue from where it
left off.
* The 'stunaddr' option has been removed from chan_sip. This feature did not
behave as expected, had no correct use case, and was not RFC compliant. The
removal of this feature will hopefully be followed by a correct RFC compliant
STUN implementation in chan_sip in the future.
* The default value for the pedantic option in sip.conf has been changed
from "no" to "yes".
* The ConnectedLineNum and ConnectedLineName headers were added to many AMI
events/responses if the CallerIDNum/CallerIDName headers were also present.
The addition of connected line support changes the behavior of the channel
caller ID somewhat. The channel caller ID value no longer time shares with
the connected line ID on outgoing call legs. The timing of some AMI
events/responses output the connected line ID as caller ID. These party ID's
are now separate.
* The Dial application d and H options do not automatically answer the call
anymore. It broke DTMF attended transfers. Since many SIP and ISDN phones
cannot send DTMF before a call is connected, you need to answer the call
leg to those phones before using Dial with these options for them to have
any effect before the dialed party answers.
* The outgoing directory (where .call files are read) now uses inotify to
detect file changes instead of polling the directory on a regular basis.
If your outgoing folder is on a NFS mount or another network file system,
changes to the files will not be detected. You can revert to polling the
directory by specifying --without-inotify to configure before compiling.
* The 'sipusers' realtime table has been removed completely. Use the 'sippeers'
table with type 'user' for user type objects.
* The sip.conf allowoverlap option now accepts 'dtmf' as a value. If you
are using the early media DTMF overlap dialing method you now need to set
allowoverlap=dtmf.
From 1.6.1 to 1.6.2:
* SIP no longer sends the 183 progress message for early media by
default. Applications requiring early media should use the
progress() dialplan app to generate the progress message.
* The firmware for the IAXy has been removed from Asterisk. It can be
downloaded from http://downloads.digium.com/pub/iaxy/. To have Asterisk
install the firmware into its proper location, place the firmware in the
contrib/firmware/iax/ directory in the Asterisk source tree before running
"make install".
* T.38 FAX error correction mode can no longer be configured in udptl.conf;
instead, it is configured on a per-peer (or global) basis in sip.conf, with
the same default as was present in udptl.conf.sample.
* T.38 FAX maximum datagram size can no longer be configured in updtl.conf;
instead, it is either supplied by the application servicing the T.38 channel
(for a FAX send or receive) or calculated from the bridged endpoint's
maximum datagram size (for a T.38 FAX passthrough call). In addition, sip.conf
allows for overriding the value supplied by a remote endpoint, which is useful
when T.38 connections are made to gateways that supply incorrectly-calculated
maximum datagram sizes.
* There have been some changes to the IAX2 protocol to address the security
concerns documented in the security advisory AST-2009-006. Please see the
IAX2 security document, doc/IAX2-security.pdf, for information regarding
backwards compatibility with versions of Asterisk that do not contain these
changes to IAX2.
* The 'canreinvite' option support by the SIP, MGCP and Skinny channel drivers
has been renamed to 'directmedia', to better reflect what it actually does.
In the case of SIP, there are still re-INVITEs issued for T.38 negotiation,
starting and stopping music-on-hold, and other reasons, and the 'canreinvite'
option never had any effect on these cases, it only affected the re-INVITEs
used for direct media path setup. For MGCP and Skinny, the option was poorly
named because those protocols don't even use INVITE messages at all. For
backwards compatibility, the old option is still supported in both normal
and Realtime configuration files, but all of the sample configuration files,
Realtime/LDAP schemas, and other documentation refer to it using the new name.
* The default console now will use colors according to the default background
color, instead of forcing the background color to black. If you are using a
light colored background for your console, you may wish to use the option
flag '-W' to present better color choices for the various messages. However,
if you'd prefer the old method of forcing colors to white text on a black
background, the compatibility option -B is provided for this purpose.
* SendImage() no longer hangs up the channel on transmission error or on
any other error; in those cases, a FAILURE status is stored in
SENDIMAGESTATUS and dialplan execution continues. The possible
return values stored in SENDIMAGESTATUS are: SUCCESS, FAILURE, and
UNSUPPORTED. ('OK' has been replaced with 'SUCCESS', and 'NOSUPPORT'
has been replaced with 'UNSUPPORTED'). This change makes the
SendImage application more consistent with other applications.
* skinny.conf now has separate sections for lines and devices.
Please have a look at configs/skinny.conf.sample and update
your skinny.conf.
* Queue names previously were treated in a case-sensitive manner,
meaning that queues with names like "sales" and "sALeS" would be
seen as unique queues. The parsing logic has changed to use
case-insensitive comparisons now when originally hashing based on
queue names, meaning that now the two queues mentioned as examples
earlier will be seen as having the same name.
* The SPRINTF() dialplan function has been moved into its own module,
func_sprintf, and is no longer included in func_strings. If you use this
function and do not use 'autoload=yes' in modules.conf, you will need
to explicitly load func_sprintf for it to be available.
* The res_indications module has been removed. Its functionality was important
enough that most of it has been moved into the Asterisk core.
Two applications previously provided by res_indications, PlayTones and
StopPlayTones, have been moved into a new module, app_playtones.
* Support for Taiwanese was incorrectly supported with the "tw" language code.
In reality, the "tw" language code is reserved for the Twi language, native
to Ghana. If you were previously using the "tw" language code, you should
switch to using either "zh" (for Mandarin Chinese) or "zh_TW" for Taiwan
specific localizations. Additionally, "mx" should be changed to "es_MX",
Georgian was incorrectly specified as "ge" but should be "ka", and Czech is
"cs", not "cz".
* DAHDISendCallreroutingFacility() parameters are now comma-separated,
instead of the old pipe.
* res_jabber: autoprune has been disabled by default, to avoid misconfiguration
that would end up being interpreted as a bug once Asterisk started removing
the contacts from a user list.
* The cdr.conf file must exist and be configured correctly in order for CDR
records to be written.
* cdr_pgsql now assumes the encoding of strings it is handed are in LATIN9,
which should cover most uses of the extended ASCII set. If your strings
use a different encoding in Asterisk, the "encoding" parameter may be set
to specify the correct character set.
From 1.6.0.1 to 1.6.1:
* The ast_agi_register_multiple() and ast_agi_unregister_multiple()
API calls were added in 1.6.0, so that modules that provide multiple
AGI commands could register/unregister them all with a single
step. However, these API calls were not implemented properly, and did
not allow the caller to know whether registration or unregistration
succeeded or failed. They have been redefined to now return success
or failure, but this means any code using these functions will need
be recompiled after upgrading to a version of Asterisk containing
these changes. In addition, the source code using these functions
should be reviewed to ensure it can properly react to failure
of registration or unregistration of its API commands.
* The ast_agi_fdprintf() API call has been renamed to ast_agi_send()
to better match what it really does, and the argument order has been
changed to be consistent with other API calls that perform similar
operations.
From 1.6.0.x to 1.6.1:
* In previous versions of Asterisk, due to the way objects were arranged in
memory by chan_sip, the order of entries in sip.conf could be adjusted to
control the behavior of matching against peers and users. The way objects
are managed has been significantly changed for reasons involving performance
and stability. A side effect of these changes is that the order of entries
in sip.conf can no longer be relied upon to control behavior.
* The following core commands dealing with dialplan have been deprecated: 'core
show globals', 'core set global' and 'core set chanvar'. Use the equivalent
'dialplan show globals', 'dialplan set global' and 'dialplan set chanvar'
instead.
* In the dialplan expression parser, the logical value of spaces
immediately preceding a standalone 0 previously evaluated to
true. It now evaluates to false. This has confused a good many
people in the past (typically because they failed to realize the
space had any significance). Since this violates the Principle of
Least Surprise, it has been changed.
* While app_directory has always relied on having a voicemail.conf or users.conf file
correctly set up, it now is dependent on app_voicemail being compiled as well.
* SIP: All of the functionality in SIPCHANINFO() has been implemented in CHANNEL(),
and you should start using that function instead for retrieving information about
the channel in a technology-agnostic way.
* If you have any third party modules which use a config file variable whose
name ends in a '+', please note that the append capability added to this
version may now conflict with that variable naming scheme. An easy
workaround is to ensure that a space occurs between the '+' and the '=',
to differentiate your variable from the append operator. This potential
conflict is unlikely, but is documented here to be thorough.
* The "Join" event from app_queue now uses the CallerIDNum header instead of
the CallerID header to indicate the CallerID number.
* If you use ODBC storage for voicemail, there is a new field called "flag"
which should be a char(8) or larger. This field specifies whether or not a
message has been designated to be "Urgent", "PRIORITY", or not.

92
UPGRADE-10.txt Normal file
View File

@@ -0,0 +1,92 @@
===========================================================
===
=== Information for upgrading between Asterisk versions
===
=== These files document all the changes that MUST be taken
=== into account when upgrading between the Asterisk
=== versions listed below. These changes may require that
=== you modify your configuration files, dialplan or (in
=== some cases) source code if you have your own Asterisk
=== modules or patches. These files also include advance
=== notice of any functionality that has been marked as
=== 'deprecated' and may be removed in a future release,
=== along with the suggested replacement functionality.
===
=== UPGRADE-1.2.txt -- Upgrade info for 1.0 to 1.2
=== UPGRADE-1.4.txt -- Upgrade info for 1.2 to 1.4
=== UPGRADE-1.6.txt -- Upgrade info for 1.4 to 1.6
=== UPGRADE-1.8.txt -- Upgrade info for 1.6 to 1.8
===
===========================================================
From 10.4 to 10.5:
* The complex processor detection and optimization has been removed from
the makefile in favor of using native optimization suppport when available.
BUILD_NATIVE can be disabled via menuselect under "Compiler Flags".
From 10.2 to 10.3:
* If no transport is specified in sip.conf, transport will default to UDP.
Also, if multiple transport= lines are used, only the last will be used.
From 1.8 to 10:
cel_pgsql:
- This module now expects an 'extra' column in the database for data added
using the CELGenUserEvent() application.
ConfBridge
- ConfBridge's dialplan arguments have changed and are not
backwards compatible.
File Interpreters
- The format interpreter formats/format_sln16.c for the file extension
'.sln16' has been removed. The '.sln16' file interpreter now exists
in the formats/format_sln.c module along with new support for sln12,
sln24, sln32, sln44, sln48, sln96, and sln192 file extensions.
HTTP:
- A bindaddr must be specified in order for the HTTP server
to run. Previous versions would default to 0.0.0.0 if no
bindaddr was specified.
Gtalk:
- The default value for 'context' and 'parkinglots' in gtalk.conf has
been changed to 'default', previously they were empty.
chan_dahdi:
- The mohinterpret=passthrough setting is deprecated in favor of
moh_signaling=notify.
pbx_lua:
- Execution no longer continues after applications that do dialplan jumps
(such as app.goto). Now when an application such as app.goto() is called,
control is returned back to the pbx engine and the current extension
function stops executing.
- the autoservice now defaults to being on by default
- autoservice_start() and autoservice_start() no longer return a value.
Queue:
- Mark QUEUE_MEMBER_PENALTY Deprecated it never worked for realtime members
- QUEUE_MEMBER is now R/W supporting setting paused, ignorebusy and penalty.
Asterisk Database:
- The internal Asterisk database has been switched from Berkeley DB 1.86 to
SQLite 3. An existing Berkeley astdb file can be converted with the astdb2sqlite3
utility in the UTILS section of menuselect. If an existing astdb is found and no
astdb.sqlite3 exists, astdb2sqlite3 will be compiled automatically. Asterisk will
convert an existing astdb to the SQLite3 version automatically at runtime.
Module Support Level
- All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
formats, funcs, pbx, and res have been updated to include MODULEINFO data
that includes <support_level> tags with a value of core, extended, or deprecated.
More information is available on the Asterisk wiki at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
Deprecated modules are now marked to not build by default and must be explicitly
enabled in menuselect.
===========================================================
===========================================================

431
UPGRADE.txt Normal file
View File

@@ -0,0 +1,431 @@
===========================================================
===
=== Information for upgrading between Asterisk versions
===
=== These files document all the changes that MUST be taken
=== into account when upgrading between the Asterisk
=== versions listed below. These changes may require that
=== you modify your configuration files, dialplan or (in
=== some cases) source code if you have your own Asterisk
=== modules or patches. These files also include advance
=== notice of any functionality that has been marked as
=== 'deprecated' and may be removed in a future release,
=== along with the suggested replacement functionality.
===
=== UPGRADE-1.2.txt -- Upgrade info for 1.0 to 1.2
=== UPGRADE-1.4.txt -- Upgrade info for 1.2 to 1.4
=== UPGRADE-1.6.txt -- Upgrade info for 1.4 to 1.6
=== UPGRADE-1.8.txt -- Upgrade info for 1.6 to 1.8
=== UPGRADE-10.txt -- Upgrade info for 1.8 to 10
===
===========================================================
from 11.10.2 to 11.11.0
- Added a compatibility option for chan_sip, 'websocket_write_timeout'.
When a websocket connection exists where Asterisk writes a substantial
amount of data to the connected client, and the connected client is slow
to process the received data, the socket may be disconnected. In such
cases, it may be necessary to adjust this value. Default is 100 ms.
- Added a 'force_avp' option for chan_sip. When enabled this option will
cause the media transport in the offer or answer SDP to be 'RTP/AVP',
'RTP/AVPF', 'RTP/SAVP', or 'RTP/SAVPF' even if a DTLS stream has been
configured. This option can be set to improve interoperability with WebRTC
clients that don't use the RFC defined transport for DTLS.
- The 'dtlsverify' option in chan_sip now has additional values besides
'yes' and 'no'. If 'yes' is specified both the certificate and fingerprint
will be verified. If 'no' is specified then neither the certificate or
fingerprint is verified. If 'certificate' is specified then only the
certificate is verified. If 'fingerprint' is specified then only the
fingerprint is verified.
- A 'dtlsfingerprint' option has been added to chan_sip which allows the
hash to be specified for the DTLS fingerprint placed in SDP. Supported
values are 'sha-1' and 'sha-256' with 'sha-256' being the default.
- Added the inband_on_setup_ack compatibility option to chan_dahdi.conf to
deal with switches that don't send an inband progress indication in the
SETUP ACKNOWLEDGE message.
from 11.10.0 to 11.10.1
- MixMonitor AMI actions now require users to have authorization classes.
* MixMonitor - system
* MixMonitorMute - call or system
* StopMixMonitor - call or system
- Added http.conf session_inactivity timer option to close HTTP connections
that aren't doing anything.
- Removed the undocumented manager.conf block-sockets option. It interferes with
TCP/TLS inactivity timeouts.
from 11.9 to 11.10
- The asterisk command line -I option and the asterisk.conf internal_timing
option are removed and always enabled if any timing module is loaded.
- Added a new Compiler Flag, REF_DEBUG. When enabled, reference counted
objects will emit additional debug information to the refs log file located
in the standard Asterisk log file directory. This log file is useful in
tracking down object leaks and other reference counting issues. Prior to
this version, this option was only available by modifying the source code
directly. This change also includes a new script, refcounter.py, in the
contrib folder that will process the refs log file.
from 11.8 to 11.9
- res_fax now returns the correct rates for V.27ter (4800 or 9600 bit/s).
Because of this the default settings would not load, so the minrate (minimum
transmission rate) option was changed to default to 4800 since that is the
minimum rate for v.27 which is included in the default modem options.
- The sound_place_into_conference sound used in Confbridge is now deprecated
and is no longer functional since it has been broken since its inception
and the fix involved using a different method to achieve the same goal. The
new method to achieve this functionality is by using sound_begin to play
a sound to the conference when waitmarked users are moved into the conference.
- When communicating with a peer on an Asterisk 1.4 or earlier system, the
chan_iax2 parameter 'connectedline' must be set to "no" in iax.conf. This
prevents an incompatible connected line frame from an Astersik 1.8 or later
system from causing a hangup in an Asterisk 1.4 or earlier system. Note that
this particular incompatibility has always existed between 1.4 and 1.8 and
later versions; this upgrade note is simply informing users of its existance.
- A compatibility setting, allow_empty_string_in_nontext, has been added to
res_odbc.conf. When enabled (default behavior), empty column values are
stored as empty strings during realtime updates. Disabling this option
causes empty column values to be stored as NULLs for non-text columns.
Disable it for PostgreSQL backends in order to avoid errors caused by
updating integer columns with an empty string instead of NULL
(sippeers, sipregs, ..).
From 11.7 to 11.8:
- The per console verbose level feature as previously implemented caused a
large performance penalty. The fix required some minor incompatibilities
if the new rasterisk is used to connect to an earlier version. If the new
rasterisk connects to an older Asterisk version then the root console verbose
level is always affected by the "core set verbose" command of the remote
console even though it may appear to only affect the current console. If
an older version of rasterisk connects to the new version then the
"core set verbose" command will have no effect.
CLI commands:
- "core show settings" now lists the current console verbosity in addition
to the root console verbosity.
- "core set verbose" has not been able to support the by module verbose
logging levels since verbose logging levels were made per console. That
syntax is now removed and a silence option added in its place.
Configuration Files:
- The 'verbose' setting in logger.conf still takes an optional argument,
specifying the verbosity level for each logging destination. However,
the default is now to once again follow the current root console level.
As a result, using the AMI Command action with "core set verbose" could
again set the root console verbose level and affect the verbose level
logged.
From 11.6 to 11.7:
ConfBridge
- ConfBridge now has the ability to set the language of announcements to the
conference. The language can be set on a bridge profile in confbridge.conf
or by the dialplan function CONFBRIDGE(bridge,language)=en.
chan_sip - Clarify The "sip show peers" Forcerport Column And Add Comedia
- Under the "Forcerport" column, the "N" used to mean NAT (i.e. Yes). With
the additon of auto_* NAT settings, the meaning changed and there was a
certain combination of letters added to indicate the current setting. The
combination of using "Y", "N", "A" or "a", can be confusing. Therefore, we
now display clearly what the current Forcerport setting is: "Yes", "No",
"Auto (Yes)", "Auto (No)".
- Since we are clarifying the Forcerport column, we have added a column to
display the Comedia setting since this is useful information as well. We
no longer have a simple "NAT" setting like other versions before 11.
* Certain dialplan functions have been marked as 'dangerous', and may only be
executed from the dialplan. Execution from extenal sources (AMI's GetVar and
SetVar actions; etc.) may be inhibited by setting live_dangerously in the
[options] section of asterisk.conf to no. SHELL(), channel locking, and direct
file read/write functions are marked as dangerous. DB_DELETE() and
REALTIME_DESTROY() are marked as dangerous for reads, but can now safely
accept writes (which ignore the provided value).
From 11.5 to 11.6:
* res_agi will now properly indicate if there was an error in streaming an
audio file. The result code will be -1 and the result returned from the
the function will be RESULT_FAILURE instead of the prior behavior of always
returning RESULT_SUCCESS even if there was an error.
* The libuuid development library is now optional for res_rtp_asterisk. If the
library is not present when building ICE and TURN support will not be present.
* The option "register_retry_403" has been added to chan_sip to work around
servers that are known to erroneously send 403 in response to valid
REGISTER requests and allows Asterisk to continue attepmting to connect.
Due to a failed merge, this option is present, but non-functional until 11.8.0.
From 11.4 to 11.5:
* The default settings for chan_sip are now overriden properly by the general
settings in sip.conf. Please look over your settings upon upgrading.
* It is now possible to play the Queue prompts to the first user waiting in a call queue.
Note that this may impact the ability for agents to talk with users, as a prompt may
still be playing when an agent connects to the user. This ability is disabled by
default but can be enabled on an individual queue using the 'announce-to-first-user'
option.
* The libuuid development library is now required for res_rtp_asterisk. Consult
your distribution for the appropriate development library name.
From 11.3 to 11.4:
* Added the 'n' option to MeetMe to prevent application of the DENOISE function
to a channel joining a conference. Some channel drivers that vary the number
of audio samples in a voice frame will experience significant quality problems
if a denoiser is attached to the channel; this option gives them the ability
to remove the denoiser without having to unload func_speex.
* The Registry AMI event for SIP registrations will now always include the
Username field. A previous bug fix missed an instance where it was not
included; that has been corrected in this release.
From 11.2.0 to 11.2.1:
* Asterisk would previously not output certain error messages when a remote
console attempted to connect to Asterisk and no instance of Asterisk was
running. This error message is displayed on stderr; as a result, some
initialization scripts that used remote consoles to test for the presence
of a running Asterisk instance started to display erroneous error messages.
The init.d scripts and the safe_asterisk have been updated in the contrib
folder to account for this.
From 11.2 to 11.3:
* Now by default, when Asterisk is installed in a path other than /usr, the
Asterisk binary will search for shared libraries in ${libdir} in addition to
searching system libraries. This allows Asterisk to find its shared
libraries without having to specify LD_LIBRARY_PATH. This can be disabled by
passing --disable-rpath to configure.
From 11.1 to 11.2:
* Asterisk has always had code to ignore dash '-' characters that are not
part of a character set in the dialplan extensions. The code now
consistently ignores these characters when matching dialplan extensions.
* Removed the queues.conf check_state_unknown option. It is no longer
necessary.
From 11.0 to 11.1:
Queues:
- Queue strategy rrmemory now has a predictable order similar to strategy
rrordered. Members will be called in the order that they are added to the
queue.
From 10 to 11:
Voicemail:
- All voicemails now have a "msg_id" which uniquely identifies a message. For
users of filesystem and IMAP storage of voicemail, this should be transparent.
For users of ODBC, you will need to add a "msg_id" column to your voice mail
messages table. This should be a string capable of holding at least 32 characters.
All messages created in old Asterisk installations will have a msg_id added to
them when required. This operation should be transparent as well.
Parking:
- The comebacktoorigin setting must now be set per parking lot. The setting in
the general section will not be applied automatically to each parking lot.
- The BLINDTRANSFER channel variable is deleted from a channel when it is
bridged to prevent subtle bugs in the parking feature. The channel
variable is used by Asterisk internally for the Park application to work
properly. If you were using it for your own purposes, copy it to your
own channel variable before the channel is bridged.
res_ais:
- Users of res_ais in versions of Asterisk prior to Asterisk 11 must change
to use the res_corosync module, instead. OpenAIS is deprecated, but
Corosync is still actively developed and maintained. Corosync came out of
the OpenAIS project.
Dialplan Functions:
- MAILBOX_EXISTS has been deprecated. Use VM_INFO with the 'exists' parameter
instead.
- Macro has been deprecated in favor of GoSub. For redirecting and connected
line purposes use the following variables instead of their macro equivalents:
REDIRECTING_SEND_SUB, REDIRECTING_SEND_SUB_ARGS,
CONNECTED_LINE_SEND_SUB, CONNECTED_LINE_SEND_SUB_ARGS.
- The REDIRECTING function now supports the redirecting original party id
and reason.
- The HANGUPCAUSE and HANGUPCAUSE_KEYS functions have been introduced to
provide a replacement for the SIP_CAUSE hash. The HangupCauseClear
application has also been introduced to remove this data from the channel
when necessary.
func_enum:
- ENUM query functions now return a count of -1 on lookup error to
differentiate between a failed query and a successful query with 0 results
matching the specified type.
CDR:
- cdr_adaptive_odbc now supports specifying a schema so that Asterisk can
connect to databases that use schemas.
Configuration Files:
- Files listed below have been updated to be more consistent with how Asterisk
parses configuration files. This makes configuration files more consistent
with what is expected across modules.
- cdr.conf: [general] and [csv] sections
- dnsmgr.conf
- dsp.conf
- The 'verbose' setting in logger.conf now takes an optional argument,
specifying the verbosity level for each logging destination. The default,
if not otherwise specified, is a verbosity of 3.
AMI:
- DBDelTree now correctly returns an error when 0 rows are deleted just as
the DBDel action does.
- The IAX2 PeerStatus event now sends a 'Port' header. In Asterisk 10, this was
erroneously being sent as a 'Post' header.
CCSS:
- Macro is deprecated. Use cc_callback_sub instead of cc_callback_macro
in channel configurations.
app_meetme:
- The 'c' option (announce user count) will now work even if the 'q' (quiet)
option is enabled.
app_followme:
- Answered outgoing calls no longer get cut off when the next step is started.
You now have until the last step times out to decide if you want to accept
the call or not before being disconnected.
chan_gtalk:
- chan_gtalk has been deprecated in favor of the chan_motif channel driver. It is recommended
that users switch to using it as it is a core supported module.
chan_jingle:
- chan_jingle has been deprecated in favor of the chan_motif channel driver. It is recommended
that users switch to using it as it is a core supported module.
SIP
===
- A new option "tonezone" for setting default tonezone for the channel driver
or individual devices
- A new manager event, "SessionTimeout" has been added and is triggered when
a call is terminated due to RTP stream inactivity or SIP session timer
expiration.
- SIP_CAUSE is now deprecated. It has been modified to use the same
mechanism as the HANGUPCAUSE function. Behavior should not change, but
performance should be vastly improved. The HANGUPCAUSE function should now
be used instead of SIP_CAUSE. Because of this, the storesipcause option in
sip.conf is also deprecated.
- The sip paramater for Originating Line Information (oli, isup-oli, and
ss7-oli) is now parsed out of the From header and copied into the channel's
ANI2 information field. This is readable from the CALLERID(ani2) dialplan
function.
- ICE support has been added and is enabled by default. Some endpoints may have
problems with the ICE candidates within the SDP. If this is the case ICE support
can be disabled globally or on a per-endpoint basis using the icesupport
configuration option. Symptoms of this include one way media or no media flow.
chan_unistim
- Due to massive update in chan_unistim phone keys functions and on-screen
information changed.
users.conf:
- A defined user with hasvoicemail=yes now finally uses a Gosub to stdexten
as documented in extensions.conf.sample since v1.6.0 instead of a Macro as
documented in v1.4. Set the asterisk.conf stdexten=macro parameter to
invoke the stdexten the old way.
res_jabber
- This module has been deprecated in favor of the res_xmpp module. The res_xmpp
module is backwards compatible with the res_jabber configuration file, dialplan
functions, and AMI actions. The old CLI commands can also be made available using
the res_clialiases template for Asterisk 11.
From 1.8 to 10:
cel_pgsql:
- This module now expects an 'extra' column in the database for data added
using the CELGenUserEvent() application.
ConfBridge
- ConfBridge's dialplan arguments have changed and are not
backwards compatible.
File Interpreters
- The format interpreter formats/format_sln16.c for the file extension
'.sln16' has been removed. The '.sln16' file interpreter now exists
in the formats/format_sln.c module along with new support for sln12,
sln24, sln32, sln44, sln48, sln96, and sln192 file extensions.
HTTP:
- A bindaddr must be specified in order for the HTTP server
to run. Previous versions would default to 0.0.0.0 if no
bindaddr was specified.
Gtalk:
- The default value for 'context' and 'parkinglots' in gtalk.conf has
been changed to 'default', previously they were empty.
chan_dahdi:
- The mohinterpret=passthrough setting is deprecated in favor of
moh_signaling=notify.
pbx_lua:
- Execution no longer continues after applications that do dialplan jumps
(such as app.goto). Now when an application such as app.goto() is called,
control is returned back to the pbx engine and the current extension
function stops executing.
- the autoservice now defaults to being on by default
- autoservice_start() and autoservice_start() no longer return a value.
Queue:
- Mark QUEUE_MEMBER_PENALTY Deprecated it never worked for realtime members
- QUEUE_MEMBER is now R/W supporting setting paused, ignorebusy and penalty.
Asterisk Database:
- The internal Asterisk database has been switched from Berkeley DB 1.86 to
SQLite 3. An existing Berkeley astdb file can be converted with the astdb2sqlite3
utility in the UTILS section of menuselect. If an existing astdb is found and no
astdb.sqlite3 exists, astdb2sqlite3 will be compiled automatically. Asterisk will
convert an existing astdb to the SQLite3 version automatically at runtime. If
moving back from Asterisk 10 to Asterisk 1.8, the astdb2bdb utility can be used
to create a Berkeley DB copy of the SQLite3 astdb that Asterisk 10 uses.
Manager:
- The AMI protocol version was incremented to 1.2 as a result of changing two
instances of the Unlink event to Bridge events. This change was documented
as part of the AMI 1.1 update, but two Unlink events were inadvertently left
unchanged.
Module Support Level
- All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
formats, funcs, pbx, and res have been updated to include MODULEINFO data
that includes <support_level> tags with a value of core, extended, or deprecated.
More information is available on the Asterisk wiki at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
Deprecated modules are now marked to not build by default and must be explicitly
enabled in menuselect.
chan_sip:
- Setting of HASH(SIP_CAUSE,<slave-channel-name>) on channels is now disabled
by default. It can be enabled using the 'storesipcause' option. This feature
has a significant performance penalty.
- In order to improve compliance with RFC 3261, SIP usernames are now properly
escaped when encoding reserved characters. Prior to this change, the use of
these characters in certain SIP settings affecting usernames could cause
injections of these characters in their raw form into SIP headers which could
in turn cause all sorts of nasty behaviors. All characters that are not
alphanumeric or are not contained in the the following lists specified by
RFC 3261 section 25.1 will be escaped as %XX when encoding a SIP username:
* mark: "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")"
* user-unreserved: "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
UDPTL:
- The default UDPTL port range in udptl.conf.sample differed from the defaults
in the source. If you didn't have a config file, you got 4500 to 4599. Now the
default is 4000 to 4999.
===========================================================
===========================================================

View File

@@ -16,12 +16,10 @@ renamed; the new names are:
chan_zap.so -> chan_dahdi.so
app_zapbarge.so -> app_dahdibarge.so
app_zapras.so -> app_dahdiras.so
app_zapscan.so -> app_dahdiscan.so
codec_zap.so -> codec_dahdi.so
The following modules have been removed:
app_zapras.so -> app_dahdiras.so
Second, the behavior of many modules has changed due to the switch to
DAHDI; the changes are listed below.
@@ -48,8 +46,7 @@ app_dahdibarge.so:
app_dahdiras.so:
The ZapRAS application was renamed to DAHDIRAS. This application has
since been removed.
The ZapRAS application has been renamed to DAHDIRAS.
app_dahdiscan.so:

1
addons/.gitignore vendored
View File

@@ -1 +0,0 @@
mp3

View File

@@ -1,5 +1,5 @@
#
# Asterisk -- An open source telephony toolkit.
# Asterisk -- A telephony toolkit for Linux.
#
# Makefile for Add-on Modules
#
@@ -14,21 +14,22 @@
MENUSELECT_CATEGORY=ADDONS
MENUSELECT_DESCRIPTION=Add-ons (See README-addons.txt)
OOH323C:=ooCmdChannel.c ooLogChan.c ooUtils.c ooGkClient.c context.c \
ooDateTime.c decode.c dlist.c encode.c errmgmt.c \
memheap.c ootrace.c oochannels.c ooh245.c ooports.c \
ooq931.c ooCapability.c ooSocket.c perutil.c eventHandler.c \
ooCalls.c ooStackCmds.c ooh323.c ooh323ep.c printHandler.c \
rtctype.c ooTimer.c h323/H235-SECURITY-MESSAGESDec.c \
h323/H235-SECURITY-MESSAGESEnc.c h323/H323-MESSAGES.c h323/H323-MESSAGESDec.c \
h323/H323-MESSAGESEnc.c h323/MULTIMEDIA-SYSTEM-CONTROL.c \
h323/MULTIMEDIA-SYSTEM-CONTROLDec.c h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
H323SOURCE:=$(addprefix ooh323c/src/,$(OOH323C)) ooh323cDriver.c
H323OBJS:=ooCmdChannel.o ooLogChan.o ooUtils.o ooGkClient.o context.o \
ooDateTime.o decode.o dlist.o encode.o errmgmt.o \
memheap.o ootrace.o oochannels.o ooh245.o ooports.o \
ooq931.o ooCapability.o ooSocket.o perutil.o eventHandler.o \
ooCalls.o ooStackCmds.o ooh323.o ooh323ep.o printHandler.o \
rtctype.o ooTimer.o h323/H235-SECURITY-MESSAGESDec.o \
h323/H235-SECURITY-MESSAGESEnc.o h323/H323-MESSAGES.o h323/H323-MESSAGESDec.o \
h323/H323-MESSAGESEnc.o h323/MULTIMEDIA-SYSTEM-CONTROL.o \
h323/MULTIMEDIA-SYSTEM-CONTROLDec.o h323/MULTIMEDIA-SYSTEM-CONTROLEnc.o
H323CFLAGS:=-Iooh323c/src -Iooh323c/src/h323
ALL_C_MODS:=chan_mobile \
ALL_C_MODS:=app_mysql \
app_saycountpl \
cdr_mysql \
chan_mobile \
chan_ooh323 \
format_mp3 \
res_config_mysql
@@ -41,10 +42,10 @@ ifeq ($(filter format_mp3,$(MENUSELECT_ADDONS)),)
echo ; \
echo "**************************************************************" ; \
echo "*** ***" ; \
echo "*** ---> IMPORTANT INFORMATION ABOUT format_mp3 <--- ***" ; \
echo "*** ---> READ THIS OR YOUR BUILD WILL FAIL <--- ***" ; \
echo "*** ***" ; \
echo "*** format_mp3 has been selected to be installed, but the ***" ; \
echo "*** MP3 decoder library has not yet been downloaded into ***" ; \
echo "*** mp3 decoder library has not yet been downloaded into ***" ; \
echo "*** the source tree. To do so, please run the following ***" ; \
echo "*** command: ***" ; \
echo "*** ***" ; \
@@ -57,18 +58,16 @@ endif
include $(ASTTOPDIR)/Makefile.moddir_rules
chan_mobile.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
chan_ooh323.so: _ASTCFLAGS+=$(H323CFLAGS)
$(call MOD_ADD_C,chan_ooh323,$(H323SOURCE))
clean::
if [ -f mp3/Makefile ] ; then $(MAKE) -C mp3 clean ; fi
rm -f $(addprefix ooh323c/src/,$(H323OBJS))
ifneq ($(wildcard mp3/Makefile),)
# At the current time, the fate of mp3 is in flux so it didn't make sense to
# add configure/makeopts processing for array-bounds since this is the only
# source file that needs that warning suppressed.
mp3/layer3.o: _ASTCFLAGS+=-Wno-array-bounds
$(call MOD_ADD_C,format_mp3,mp3/common.c mp3/dct64_i386.c mp3/decode_ntom.c mp3/layer3.c mp3/tabinit.c mp3/interface.c)
$(if $(filter format_mp3,$(EMBEDDED_MODS)),modules.link,format_mp3.so): mp3/common.o mp3/dct64_i386.o mp3/decode_ntom.o mp3/layer3.o mp3/tabinit.o mp3/interface.o
chan_ooh323.o: _ASTCFLAGS+=$(H323CFLAGS)
$(if $(filter chan_ooh323,$(EMBEDDED_MODS)),modules.link,chan_ooh323.so): _ASTCFLAGS+=$(H323CFLAGS)
$(if $(filter chan_ooh323,$(EMBEDDED_MODS)),modules.link,chan_ooh323.so): $(addprefix ooh323c/src/,$(H323OBJS)) chan_ooh323.o ooh323cDriver.o
$(addprefix ooh323c/src/,$(H323OBJS)) chan_ooh323.o ooh323cDriver.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,chan_ooh323)
.PHONY: check_mp3
else
.PHONY: check_mp3 format_mp3.o format_mp3.so
endif

642
addons/app_mysql.c Normal file
View File

@@ -0,0 +1,642 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2004, Constantine Filin and Christos Ricudis
*
* Christos Ricudis <ricudis@itc.auth.gr>
* Constantine Filin <cf@intermedia.net>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*!
* \file
* \brief MYSQL dialplan application
* \ingroup applications
*/
/*** MODULEINFO
<depend>mysqlclient</depend>
<defaultenabled>no</defaultenabled>
<support_level>deprecated</support_level>
<replacement>func_odbc</replacement>
***/
#include "asterisk.h"
#include <mysql/mysql.h>
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/linkedlists.h"
#include "asterisk/chanvars.h"
#include "asterisk/lock.h"
#include "asterisk/options.h"
#include "asterisk/app.h"
#include "asterisk/config.h"
#define EXTRA_LOG 0
enum { NULLSTRING, NULLVALUE, EMPTYSTRING } nullvalue = NULLSTRING;
static const char app[] = "MYSQL";
static const char synopsis[] = "Do several mySQLy things";
static const char descrip[] =
"MYSQL(): Do several mySQLy things\n"
"Syntax:\n"
" MYSQL(Set timeout <num>)\n"
" Set the connection timeout, in seconds.\n"
" MYSQL(Connect connid dhhost[:dbport] dbuser dbpass dbname [dbcharset])\n"
" Connects to a database. Arguments contain standard MySQL parameters\n"
" passed to function mysql_real_connect. Optional parameter dbcharset\n"
" defaults to 'latin1'. Connection identifer returned in ${connid}\n"
" MYSQL(Query resultid ${connid} query-string)\n"
" Executes standard MySQL query contained in query-string using established\n"
" connection identified by ${connid}. Result of query is stored in ${resultid}.\n"
" MYSQL(Nextresult resultid ${connid}\n"
" If last query returned more than one result set, it stores the next\n"
" result set in ${resultid}. It's useful with stored procedures\n"
" MYSQL(Fetch fetchid ${resultid} var1 var2 ... varN)\n"
" Fetches a single row from a result set contained in ${result_identifier}.\n"
" Assigns returned fields to ${var1} ... ${varn}. ${fetchid} is set TRUE\n"
" if additional rows exist in result set.\n"
" MYSQL(Clear ${resultid})\n"
" Frees memory and datastructures associated with result set.\n"
" MYSQL(Disconnect ${connid})\n"
" Disconnects from named connection to MySQL.\n"
" On exit, always returns 0. Sets MYSQL_STATUS to 0 on success and -1 on error.\n";
/*
EXAMPLES OF USE :
exten => s,2,MYSQL(Connect connid localhost asterisk mypass credit utf8)
exten => s,3,MYSQL(Query resultid ${connid} SELECT username,credit FROM credit WHERE callerid=${CALLERIDNUM})
exten => s,4,MYSQL(Fetch fetchid ${resultid} datavar1 datavar2)
exten => s,5,GotoIf(${fetchid}?6:8)
exten => s,6,Festival("User ${datavar1} currently has credit balance of ${datavar2} dollars.")
exten => s,7,Goto(s,4)
exten => s,8,MYSQL(Clear ${resultid})
exten => s,9,MYSQL(Disconnect ${connid})
*/
AST_MUTEX_DEFINE_STATIC(_mysql_mutex);
#define MYSQL_CONFIG "app_mysql.conf"
#define MYSQL_CONFIG_OLD "mysql.conf"
#define AST_MYSQL_ID_DUMMY 0
#define AST_MYSQL_ID_CONNID 1
#define AST_MYSQL_ID_RESID 2
#define AST_MYSQL_ID_FETCHID 3
static int autoclear = 0;
static void mysql_ds_destroy(void *data);
static void mysql_ds_fixup(void *data, struct ast_channel *oldchan, struct ast_channel *newchan);
static const struct ast_datastore_info mysql_ds_info = {
.type = "APP_ADDON_SQL_MYSQL",
.destroy = mysql_ds_destroy,
.chan_fixup = mysql_ds_fixup,
};
struct ast_MYSQL_id {
struct ast_channel *owner;
int identifier_type; /* 0=dummy, 1=connid, 2=resultid */
int identifier;
void *data;
AST_LIST_ENTRY(ast_MYSQL_id) entries;
} *ast_MYSQL_id;
AST_LIST_HEAD(MYSQLidshead,ast_MYSQL_id) _mysql_ids_head;
static void mysql_ds_destroy(void *data)
{
/* Destroy any IDs owned by the channel */
struct ast_MYSQL_id *i;
if (AST_LIST_LOCK(&_mysql_ids_head)) {
ast_log(LOG_WARNING, "Unable to lock identifiers list\n");
} else {
AST_LIST_TRAVERSE_SAFE_BEGIN(&_mysql_ids_head, i, entries) {
if (i->owner == data) {
AST_LIST_REMOVE_CURRENT(entries);
if (i->identifier_type == AST_MYSQL_ID_CONNID) {
/* Drop connection */
mysql_close(i->data);
} else if (i->identifier_type == AST_MYSQL_ID_RESID) {
/* Drop result */
mysql_free_result(i->data);
}
ast_free(i);
}
}
AST_LIST_TRAVERSE_SAFE_END
AST_LIST_UNLOCK(&_mysql_ids_head);
}
}
static void mysql_ds_fixup(void *data, struct ast_channel *oldchan, struct ast_channel *newchan)
{
/* Destroy any IDs owned by the channel */
struct ast_MYSQL_id *i;
if (AST_LIST_LOCK(&_mysql_ids_head)) {
ast_log(LOG_WARNING, "Unable to lock identifiers list\n");
} else {
AST_LIST_TRAVERSE_SAFE_BEGIN(&_mysql_ids_head, i, entries) {
if (i->owner == data) {
AST_LIST_REMOVE_CURRENT(entries);
if (i->identifier_type == AST_MYSQL_ID_CONNID) {
/* Drop connection */
mysql_close(i->data);
} else if (i->identifier_type == AST_MYSQL_ID_RESID) {
/* Drop result */
mysql_free_result(i->data);
}
ast_free(i);
}
}
AST_LIST_TRAVERSE_SAFE_END
AST_LIST_UNLOCK(&_mysql_ids_head);
}
}
/* helpful procs */
static void *find_identifier(int identifier, int identifier_type)
{
struct MYSQLidshead *headp = &_mysql_ids_head;
struct ast_MYSQL_id *i;
void *res=NULL;
int found=0;
if (AST_LIST_LOCK(headp)) {
ast_log(LOG_WARNING, "Unable to lock identifiers list\n");
} else {
AST_LIST_TRAVERSE(headp, i, entries) {
if ((i->identifier == identifier) && (i->identifier_type == identifier_type)) {
found = 1;
res = i->data;
break;
}
}
if (!found) {
ast_log(LOG_WARNING, "Identifier %d, identifier_type %d not found in identifier list\n", identifier, identifier_type);
}
AST_LIST_UNLOCK(headp);
}
return res;
}
static int add_identifier(struct ast_channel *chan, int identifier_type, void *data)
{
struct ast_MYSQL_id *i = NULL, *j = NULL;
struct MYSQLidshead *headp = &_mysql_ids_head;
int maxidentifier = 0;
if (AST_LIST_LOCK(headp)) {
ast_log(LOG_WARNING, "Unable to lock identifiers list\n");
return -1;
} else {
i = malloc(sizeof(*i));
AST_LIST_TRAVERSE(headp, j, entries) {
if (j->identifier > maxidentifier) {
maxidentifier = j->identifier;
}
}
i->identifier = maxidentifier + 1;
i->identifier_type = identifier_type;
i->data = data;
i->owner = chan;
AST_LIST_INSERT_HEAD(headp, i, entries);
AST_LIST_UNLOCK(headp);
}
return i->identifier;
}
static int del_identifier(int identifier, int identifier_type)
{
struct ast_MYSQL_id *i;
struct MYSQLidshead *headp = &_mysql_ids_head;
int found = 0;
if (AST_LIST_LOCK(headp)) {
ast_log(LOG_WARNING, "Unable to lock identifiers list\n");
} else {
AST_LIST_TRAVERSE(headp, i, entries) {
if ((i->identifier == identifier) &&
(i->identifier_type == identifier_type)) {
AST_LIST_REMOVE(headp, i, entries);
free(i);
found = 1;
break;
}
}
AST_LIST_UNLOCK(headp);
}
if (found == 0) {
ast_log(LOG_WARNING, "Could not find identifier %d, identifier_type %d in list to delete\n", identifier, identifier_type);
return -1;
} else {
return 0;
}
}
static int set_asterisk_int(struct ast_channel *chan, char *varname, int id)
{
if (id >= 0) {
char s[12] = "";
snprintf(s, sizeof(s), "%d", id);
ast_debug(5, "MYSQL: setting var '%s' to value '%s'\n", varname, s);
pbx_builtin_setvar_helper(chan, varname, s);
}
return id;
}
static int add_identifier_and_set_asterisk_int(struct ast_channel *chan, char *varname, int identifier_type, void *data)
{
return set_asterisk_int(chan, varname, add_identifier(chan, identifier_type, data));
}
static int safe_scan_int(char **data, char *delim, int def)
{
char *end;
int res = def;
char *s = strsep(data, delim);
if (s) {
res = strtol(s, &end, 10);
if (*end)
res = def; /* not an integer */
}
return res;
}
static int aMYSQL_set(struct ast_channel *chan, char *data)
{
char *var, *tmp;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(set);
AST_APP_ARG(variable);
AST_APP_ARG(value);
);
AST_NONSTANDARD_APP_ARGS(args, data, ' ');
if (args.argc == 3) {
var = ast_alloca(6 + strlen(args.variable) + 1);
sprintf(var, "MYSQL_%s", args.variable);
/* Make the parameter case-insensitive */
for (tmp = var + 6; *tmp; tmp++)
*tmp = toupper(*tmp);
pbx_builtin_setvar_helper(chan, var, args.value);
}
return 0;
}
/* MYSQL operations */
static int aMYSQL_connect(struct ast_channel *chan, char *data)
{
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(connect);
AST_APP_ARG(connid);
AST_APP_ARG(dbhost);
AST_APP_ARG(dbuser);
AST_APP_ARG(dbpass);
AST_APP_ARG(dbname);
AST_APP_ARG(dbcharset);
);
MYSQL *mysql;
int timeout;
const char *ctimeout;
unsigned int port = 0;
char *port_str;
AST_NONSTANDARD_APP_ARGS(args, data, ' ');
if (args.argc < 6) {
ast_log(LOG_WARNING, "MYSQL_connect is missing some arguments\n");
return -1;
}
if (!(mysql = mysql_init(NULL))) {
ast_log(LOG_WARNING, "mysql_init returned NULL\n");
return -1;
}
ctimeout = pbx_builtin_getvar_helper(chan, "MYSQL_TIMEOUT");
if (ctimeout && sscanf(ctimeout, "%30d", &timeout) == 1) {
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (void *)&timeout);
}
if(args.dbcharset && strlen(args.dbcharset) > 2){
char set_names[255];
char statement[512];
snprintf(set_names, sizeof(set_names), "SET NAMES %s", args.dbcharset);
mysql_real_escape_string(mysql, statement, set_names, sizeof(set_names));
mysql_options(mysql, MYSQL_INIT_COMMAND, set_names);
mysql_options(mysql, MYSQL_SET_CHARSET_NAME, args.dbcharset);
}
if ((port_str = strchr(args.dbhost, ':'))) {
*port_str++ = '\0';
if (sscanf(port_str, "%u", &port) != 1) {
ast_log(LOG_WARNING, "Invalid port: '%s'\n", port_str);
port = 0;
}
}
if (!mysql_real_connect(mysql, args.dbhost, args.dbuser, args.dbpass, args.dbname, port, NULL,
#ifdef CLIENT_MULTI_STATEMENTS
CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS
#elif defined(CLIENT_MULTI_QUERIES)
CLIENT_MULTI_QUERIES
#else
0
#endif
)) {
ast_log(LOG_WARNING, "mysql_real_connect(mysql,%s,%s,dbpass,%s,...) failed(%d): %s\n",
args.dbhost, args.dbuser, args.dbname, mysql_errno(mysql), mysql_error(mysql));
return -1;
}
add_identifier_and_set_asterisk_int(chan, args.connid, AST_MYSQL_ID_CONNID, mysql);
return 0;
}
static int aMYSQL_query(struct ast_channel *chan, char *data)
{
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(query);
AST_APP_ARG(resultid);
AST_APP_ARG(connid);
AST_APP_ARG(sql);
);
MYSQL *mysql;
MYSQL_RES *mysqlres;
int connid;
int mysql_query_res;
AST_NONSTANDARD_APP_ARGS(args, data, ' ');
if (args.argc != 4 || (connid = atoi(args.connid)) == 0) {
ast_log(LOG_WARNING, "missing some arguments\n");
return -1;
}
if (!(mysql = find_identifier(connid, AST_MYSQL_ID_CONNID))) {
ast_log(LOG_WARNING, "Invalid connection identifier %s passed in aMYSQL_query\n", args.connid);
return -1;
}
if ((mysql_query_res = mysql_query(mysql, args.sql)) != 0) {
ast_log(LOG_WARNING, "aMYSQL_query: mysql_query failed. Error: %s\n", mysql_error(mysql));
return -1;
}
if ((mysqlres = mysql_store_result(mysql))) {
add_identifier_and_set_asterisk_int(chan, args.resultid, AST_MYSQL_ID_RESID, mysqlres);
return 0;
} else if (!mysql_field_count(mysql)) {
return 0;
} else
ast_log(LOG_WARNING, "mysql_store_result() failed on query %s\n", args.sql);
return -1;
}
static int aMYSQL_nextresult(struct ast_channel *chan, char *data)
{
MYSQL *mysql;
MYSQL_RES *mysqlres;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(nextresult);
AST_APP_ARG(resultid);
AST_APP_ARG(connid);
);
int connid = -1;
AST_NONSTANDARD_APP_ARGS(args, data, ' ');
sscanf(args.connid, "%30d", &connid);
if (args.argc != 3 || connid <= 0) {
ast_log(LOG_WARNING, "missing some arguments\n");
return -1;
}
if (!(mysql = find_identifier(connid, AST_MYSQL_ID_CONNID))) {
ast_log(LOG_WARNING, "Invalid connection identifier %d passed in aMYSQL_query\n", connid);
return -1;
}
if (mysql_more_results(mysql)) {
mysql_next_result(mysql);
if ((mysqlres = mysql_store_result(mysql))) {
add_identifier_and_set_asterisk_int(chan, args.resultid, AST_MYSQL_ID_RESID, mysqlres);
return 0;
} else if (!mysql_field_count(mysql)) {
return 0;
} else
ast_log(LOG_WARNING, "mysql_store_result() failed on storing next_result\n");
} else
ast_log(LOG_WARNING, "mysql_more_results() result set has no more results\n");
return 0;
}
static int aMYSQL_fetch(struct ast_channel *chan, char *data)
{
MYSQL_RES *mysqlres;
MYSQL_ROW mysqlrow;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(fetch);
AST_APP_ARG(resultvar);
AST_APP_ARG(fetchid);
AST_APP_ARG(vars);
);
char *s5, *parse;
int resultid = -1, numFields, j;
parse = ast_strdupa(data);
AST_NONSTANDARD_APP_ARGS(args, parse, ' ');
sscanf(args.fetchid, "%30d", &resultid);
if (args.resultvar && (resultid >= 0) ) {
if ((mysqlres = find_identifier(resultid, AST_MYSQL_ID_RESID)) != NULL) {
/* Grab the next row */
if ((mysqlrow = mysql_fetch_row(mysqlres)) != NULL) {
numFields = mysql_num_fields(mysqlres);
for (j = 0; j < numFields; j++) {
s5 = strsep(&args.vars, " ");
if (s5 == NULL) {
ast_log(LOG_WARNING, "ast_MYSQL_fetch: More fields (%d) than variables (%d)\n", numFields, j);
break;
}
pbx_builtin_setvar_helper(chan, s5, mysqlrow[j] ? mysqlrow[j] :
nullvalue == NULLSTRING ? "NULL" :
nullvalue == EMPTYSTRING ? "" :
NULL);
}
ast_debug(5, "ast_MYSQL_fetch: numFields=%d\n", numFields);
set_asterisk_int(chan, args.resultvar, 1); /* try more rows */
} else {
ast_debug(5, "ast_MYSQL_fetch : EOF\n");
set_asterisk_int(chan, args.resultvar, 0); /* no more rows */
}
return 0;
} else {
set_asterisk_int(chan, args.resultvar, 0);
ast_log(LOG_WARNING, "aMYSQL_fetch: Invalid result identifier %d passed\n", resultid);
}
} else {
ast_log(LOG_WARNING, "aMYSQL_fetch: missing some arguments\n");
}
return -1;
}
static int aMYSQL_clear(struct ast_channel *chan, char *data)
{
MYSQL_RES *mysqlres;
int id;
strsep(&data, " "); /* eat the first token, we already know it :P */
id = safe_scan_int(&data, " \n", -1);
if ((mysqlres = find_identifier(id, AST_MYSQL_ID_RESID)) == NULL) {
ast_log(LOG_WARNING, "Invalid result identifier %d passed in aMYSQL_clear\n", id);
} else {
mysql_free_result(mysqlres);
del_identifier(id, AST_MYSQL_ID_RESID);
}
return 0;
}
static int aMYSQL_disconnect(struct ast_channel *chan, char *data)
{
MYSQL *mysql;
int id;
strsep(&data, " "); /* eat the first token, we already know it :P */
id = safe_scan_int(&data, " \n", -1);
if ((mysql = find_identifier(id, AST_MYSQL_ID_CONNID)) == NULL) {
ast_log(LOG_WARNING, "Invalid connection identifier %d passed in aMYSQL_disconnect\n", id);
} else {
mysql_close(mysql);
del_identifier(id, AST_MYSQL_ID_CONNID);
}
return 0;
}
static int MYSQL_exec(struct ast_channel *chan, const char *data)
{
int result;
char sresult[10];
ast_debug(5, "MYSQL: data=%s\n", data);
if (!data) {
ast_log(LOG_WARNING, "MYSQL requires an argument (see manual)\n");
return -1;
}
result = 0;
if (autoclear) {
struct ast_datastore *mysql_store = NULL;
ast_channel_lock(chan);
mysql_store = ast_channel_datastore_find(chan, &mysql_ds_info, NULL);
if (!mysql_store) {
if (!(mysql_store = ast_datastore_alloc(&mysql_ds_info, NULL))) {
ast_log(LOG_WARNING, "Unable to allocate new datastore.\n");
} else {
mysql_store->data = chan;
ast_channel_datastore_add(chan, mysql_store);
}
}
ast_channel_unlock(chan);
}
ast_mutex_lock(&_mysql_mutex);
if (strncasecmp("connect", data, strlen("connect")) == 0) {
result = aMYSQL_connect(chan, ast_strdupa(data));
} else if (strncasecmp("query", data, strlen("query")) == 0) {
result = aMYSQL_query(chan, ast_strdupa(data));
} else if (strncasecmp("nextresult", data, strlen("nextresult")) == 0) {
result = aMYSQL_nextresult(chan, ast_strdupa(data));
} else if (strncasecmp("fetch", data, strlen("fetch")) == 0) {
result = aMYSQL_fetch(chan, ast_strdupa(data));
} else if (strncasecmp("clear", data, strlen("clear")) == 0) {
result = aMYSQL_clear(chan, ast_strdupa(data));
} else if (strncasecmp("disconnect", data, strlen("disconnect")) == 0) {
result = aMYSQL_disconnect(chan, ast_strdupa(data));
} else if (strncasecmp("set", data, 3) == 0) {
result = aMYSQL_set(chan, ast_strdupa(data));
} else {
ast_log(LOG_WARNING, "Unknown argument to MYSQL application : %s\n", data);
result = -1;
}
ast_mutex_unlock(&_mysql_mutex);
snprintf(sresult, sizeof(sresult), "%d", result);
pbx_builtin_setvar_helper(chan, "MYSQL_STATUS", sresult);
return 0;
}
static int unload_module(void)
{
return ast_unregister_application(app);
}
static int load_module(void)
{
struct MYSQLidshead *headp = &_mysql_ids_head;
struct ast_flags config_flags = { 0 };
struct ast_config *cfg = ast_config_load(MYSQL_CONFIG, config_flags);
const char *temp;
if (!cfg) {
/* Backwards compatibility ftw */
cfg = ast_config_load(MYSQL_CONFIG_OLD, config_flags);
}
if (cfg) {
if ((temp = ast_variable_retrieve(cfg, "general", "nullvalue"))) {
if (!strcasecmp(temp, "nullstring")) {
nullvalue = NULLSTRING;
} else if (!strcasecmp(temp, "emptystring")) {
nullvalue = EMPTYSTRING;
} else if (!strcasecmp(temp, "null")) {
nullvalue = NULLVALUE;
} else {
ast_log(LOG_WARNING, "Illegal value for 'nullvalue': '%s' (must be 'nullstring', 'null', or 'emptystring')\n", temp);
}
}
if ((temp = ast_variable_retrieve(cfg, "general", "autoclear")) && ast_true(temp)) {
autoclear = 1;
}
ast_config_destroy(cfg);
}
AST_LIST_HEAD_INIT(headp);
return ast_register_application(app, MYSQL_exec, synopsis, descrip);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Simple Mysql Interface");

138
addons/app_saycountpl.c Normal file
View File

@@ -0,0 +1,138 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2004, Andy Powell & TAAN Softworks Corp.
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*!
* \file
* \brief Say Polish counting words
* \author Andy Powell
*/
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
<support_level>deprecated</support_level>
<replacement>say.conf</replacement>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/app.h"
/*** DOCUMENTATION
<application name="SayCountPL" language="en_US">
<synopsis>
Say Polish counting words.
</synopsis>
<syntax>
<parameter name="word1" required="true" />
<parameter name="word2" required="true" />
<parameter name="word5" required="true" />
<parameter name="number" required="true" />
</syntax>
<description>
<para>Polish grammar has some funny rules for counting words. for example 1 zloty,
2 zlote, 5 zlotych. This application will take the words for 1, 2-4 and 5 and
decide based on grammar rules which one to use with the number you pass to it.</para>
<para>Example: SayCountPL(zloty,zlote,zlotych,122) will give: zlote</para>
</description>
</application>
***/
static const char app[] = "SayCountPL";
static int saywords(struct ast_channel *chan, char *word1, char *word2, char *word5, int num)
{
/* Put this in a separate proc because it's bound to change */
int d = 0;
if (num > 0) {
if (num % 1000 == 1) {
ast_streamfile(chan, word1, ast_channel_language(chan));
d = ast_waitstream(chan,"");
} else if (((num % 10) >= 2) && ((num % 10) <= 4 ) && ((num % 100) < 10 || (num % 100) > 20)) {
ast_streamfile(chan, word2, ast_channel_language(chan));
d = ast_waitstream(chan, "");
} else {
ast_streamfile(chan, word5, ast_channel_language(chan));
d = ast_waitstream(chan, "");
}
}
return d;
}
static int sayword_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *s;
int inum;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(word1);
AST_APP_ARG(word2);
AST_APP_ARG(word5);
AST_APP_ARG(num);
);
if (!data) {
ast_log(LOG_WARNING, "SayCountPL requires 4 arguments: word-1,word-2,word-5,number\n");
return -1;
}
s = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, s);
/* Check to see if params passed */
if (!args.word1 || !args.word2 || !args.word5 || !args.num) {
ast_log(LOG_WARNING, "SayCountPL requires 4 arguments: word-1,word-2,word-3,number\n");
return -1;
}
if (sscanf(args.num, "%30d", &inum) != 1) {
ast_log(LOG_WARNING, "'%s' is not a valid number\n", args.num);
return -1;
}
/* do the saying part (after a bit of maths) */
res = saywords(chan, args.word1, args.word2, args.word5, inum);
return res;
}
static int unload_module(void)
{
return ast_unregister_application(app);
}
static int load_module(void)
{
int res;
res = ast_register_application_xml(app, sayword_exec);
return res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Say polish counting words");

697
addons/cdr_mysql.c Normal file
View File

@@ -0,0 +1,697 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* James Sharp <jsharp@psychoses.org>
*
* Modified August 2003
* Tilghman Lesher <asterisk__cdr__cdr_mysql__200308@the-tilghman.com>
*
* Modified August 6, 2005
* Joseph Benden <joe@thrallingpenguin.com>
* Added mysql connection timeout parameter
* Added an automatic reconnect as to not lose a cdr record
* Cleaned up the original code to match the coding guidelines
*
* Modified Juli 2006
* Martin Portmann <map@infinitum.ch>
* Added mysql ssl support
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*!
* \file
* \brief MySQL CDR backend
* \ingroup cdr_drivers
*/
/*** MODULEINFO
<depend>mysqlclient</depend>
<defaultenabled>no</defaultenabled>
<support_level>deprecated</support_level>
<replacement>cdr_adaptive_odbc</replacement>
***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
#include "asterisk/config.h"
#include "asterisk/options.h"
#include "asterisk/channel.h"
#include "asterisk/cdr.h"
#include "asterisk/module.h"
#include "asterisk/logger.h"
#include "asterisk/cli.h"
#include "asterisk/strings.h"
#include "asterisk/linkedlists.h"
#include "asterisk/threadstorage.h"
#define DATE_FORMAT "%Y-%m-%d %T"
AST_THREADSTORAGE(sql1_buf);
AST_THREADSTORAGE(sql2_buf);
AST_THREADSTORAGE(escape_buf);
static const char desc[] = "MySQL CDR Backend";
static const char name[] = "mysql";
static const char config[] = "cdr_mysql.conf";
static struct ast_str *hostname = NULL, *dbname = NULL, *dbuser = NULL, *password = NULL, *dbsock = NULL, *dbtable = NULL, *dbcharset = NULL, *cdrzone = NULL;
static struct ast_str *ssl_ca = NULL, *ssl_cert = NULL, *ssl_key = NULL;
static int dbport = 0;
static int connected = 0;
static time_t connect_time = 0;
static int records = 0;
static int totalrecords = 0;
static int timeout = 0;
static int calldate_compat = 0;
AST_MUTEX_DEFINE_STATIC(mysql_lock);
struct unload_string {
AST_LIST_ENTRY(unload_string) entry;
struct ast_str *str;
};
static AST_LIST_HEAD_STATIC(unload_strings, unload_string);
struct column {
char *name;
char *cdrname;
char *staticvalue;
char *type;
AST_LIST_ENTRY(column) list;
};
/* Protected with mysql_lock */
static AST_RWLIST_HEAD_STATIC(columns, column);
static MYSQL mysql = { { NULL }, };
static char *handle_cli_cdr_mysql_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
switch (cmd) {
case CLI_INIT:
e->command = "cdr mysql status";
e->usage =
"Usage: cdr mysql status\n"
" Shows current connection status for cdr_mysql\n";
return NULL;
case CLI_GENERATE:
return NULL;
}
if (a->argc != 3)
return CLI_SHOWUSAGE;
if (connected) {
char status[256], status2[100] = "";
int ctime = time(NULL) - connect_time;
if (dbport)
snprintf(status, 255, "Connected to %s@%s, port %d", ast_str_buffer(dbname), ast_str_buffer(hostname), dbport);
else if (dbsock)
snprintf(status, 255, "Connected to %s on socket file %s", ast_str_buffer(dbname), S_OR(ast_str_buffer(dbsock), "default"));
else
snprintf(status, 255, "Connected to %s@%s", ast_str_buffer(dbname), ast_str_buffer(hostname));
if (!ast_strlen_zero(ast_str_buffer(dbuser)))
snprintf(status2, 99, " with username %s", ast_str_buffer(dbuser));
if (ast_str_strlen(dbtable))
snprintf(status2, 99, " using table %s", ast_str_buffer(dbtable));
if (ctime > 31536000) {
ast_cli(a->fd, "%s%s for %d years, %d days, %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 31536000, (ctime % 31536000) / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60);
} else if (ctime > 86400) {
ast_cli(a->fd, "%s%s for %d days, %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60);
} else if (ctime > 3600) {
ast_cli(a->fd, "%s%s for %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 3600, (ctime % 3600) / 60, ctime % 60);
} else if (ctime > 60) {
ast_cli(a->fd, "%s%s for %d minutes, %d seconds.\n", status, status2, ctime / 60, ctime % 60);
} else {
ast_cli(a->fd, "%s%s for %d seconds.\n", status, status2, ctime);
}
if (records == totalrecords)
ast_cli(a->fd, " Wrote %d records since last restart.\n", totalrecords);
else
ast_cli(a->fd, " Wrote %d records since last restart and %d records since last reconnect.\n", totalrecords, records);
} else {
ast_cli(a->fd, "Not currently connected to a MySQL server.\n");
}
return CLI_SUCCESS;
}
static struct ast_cli_entry cdr_mysql_status_cli[] = {
AST_CLI_DEFINE(handle_cli_cdr_mysql_status, "Show connection status of cdr_mysql"),
};
static int mysql_log(struct ast_cdr *cdr)
{
struct ast_str *sql1 = ast_str_thread_get(&sql1_buf, 1024), *sql2 = ast_str_thread_get(&sql2_buf, 1024);
int retries = 5;
#if MYSQL_VERSION_ID >= 50013
my_bool my_bool_true = 1;
#endif
if (!sql1 || !sql2) {
ast_log(LOG_ERROR, "Memory error\n");
return -1;
}
ast_mutex_lock(&mysql_lock);
db_reconnect:
if ((!connected) && (hostname || dbsock) && dbuser && password && dbname && dbtable ) {
/* Attempt to connect */
mysql_init(&mysql);
/* Add option to quickly timeout the connection */
if (timeout && mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *)&timeout) != 0) {
ast_log(LOG_ERROR, "mysql_options returned (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql));
}
#if MYSQL_VERSION_ID >= 50013
/* Add option for automatic reconnection */
if (mysql_options(&mysql, MYSQL_OPT_RECONNECT, &my_bool_true) != 0) {
ast_log(LOG_ERROR, "mysql_options returned (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql));
}
#endif
if (ssl_ca || ssl_cert || ssl_key) {
mysql_ssl_set(&mysql, ssl_key ? ast_str_buffer(ssl_key) : NULL, ssl_cert ? ast_str_buffer(ssl_cert) : NULL, ssl_ca ? ast_str_buffer(ssl_ca) : NULL, NULL, NULL);
}
if (mysql_real_connect(&mysql, ast_str_buffer(hostname), ast_str_buffer(dbuser), ast_str_buffer(password), ast_str_buffer(dbname), dbport, dbsock && ast_str_strlen(dbsock) ? ast_str_buffer(dbsock) : NULL, ssl_ca ? CLIENT_SSL : 0)) {
connected = 1;
connect_time = time(NULL);
records = 0;
if (dbcharset) {
ast_str_set(&sql1, 0, "SET NAMES '%s'", ast_str_buffer(dbcharset));
mysql_real_query(&mysql, ast_str_buffer(sql1), ast_str_strlen(sql1));
ast_debug(1, "SQL command as follows: %s\n", ast_str_buffer(sql1));
}
} else {
ast_log(LOG_ERROR, "Cannot connect to database server %s: (%d) %s\n", ast_str_buffer(hostname), mysql_errno(&mysql), mysql_error(&mysql));
connected = 0;
}
} else {
/* Long connection - ping the server */
int error;
if ((error = mysql_ping(&mysql))) {
connected = 0;
records = 0;
switch (mysql_errno(&mysql)) {
case CR_SERVER_GONE_ERROR:
case CR_SERVER_LOST:
ast_log(LOG_ERROR, "Server has gone away. Attempting to reconnect.\n");
break;
default:
ast_log(LOG_ERROR, "Unknown connection error: (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql));
}
retries--;
if (retries) {
goto db_reconnect;
} else {
ast_log(LOG_ERROR, "Retried to connect five times, giving up.\n");
}
}
}
if (connected) {
int column_count = 0;
char *cdrname;
char workspace[2048], *value = NULL;
struct column *entry;
struct ast_str *escape = ast_str_thread_get(&escape_buf, 16);
ast_str_set(&sql1, 0, "INSERT INTO %s (", AS_OR(dbtable, "cdr"));
ast_str_set(&sql2, 0, ") VALUES (");
AST_RWLIST_RDLOCK(&columns);
AST_RWLIST_TRAVERSE(&columns, entry, list) {
if (!strcmp(entry->name, "calldate")) {
/*!\note
* For some dumb reason, "calldate" used to be formulated using
* the datetime the record was posted, rather than the start
* time of the call. If someone really wants the old compatible
* behavior, it's provided here.
*/
if (calldate_compat) {
struct timeval tv = ast_tvnow();
struct ast_tm tm;
char timestr[128];
ast_localtime(&tv, &tm, ast_str_strlen(cdrzone) ? ast_str_buffer(cdrzone) : NULL);
ast_strftime(timestr, sizeof(timestr), "%Y-%m-%d %T", &tm);
ast_cdr_setvar(cdr, "calldate", timestr, 0);
cdrname = "calldate";
} else {
cdrname = "start";
}
} else {
cdrname = entry->cdrname;
}
/* Construct SQL */
/* Need the type and value to determine if we want the raw value or not */
if (entry->staticvalue) {
value = ast_strdupa(entry->staticvalue);
} else if ((!strcmp(cdrname, "start") ||
!strcmp(cdrname, "answer") ||
!strcmp(cdrname, "end") ||
!strcmp(cdrname, "disposition") ||
!strcmp(cdrname, "amaflags")) &&
(strstr(entry->type, "int") ||
strstr(entry->type, "dec") ||
strstr(entry->type, "float") ||
strstr(entry->type, "double") ||
strstr(entry->type, "real") ||
strstr(entry->type, "numeric") ||
strstr(entry->type, "fixed"))) {
ast_cdr_getvar(cdr, cdrname, &value, workspace, sizeof(workspace), 0, 1);
} else {
ast_cdr_getvar(cdr, cdrname, &value, workspace, sizeof(workspace), 0, 0);
}
if (value) {
size_t valsz;
if (column_count++) {
ast_str_append(&sql1, 0, ",");
ast_str_append(&sql2, 0, ",");
}
if (!strcasecmp(cdrname, "billsec") &&
(strstr(entry->type, "float") ||
strstr(entry->type, "double") ||
strstr(entry->type, "decimal") ||
strstr(entry->type, "numeric") ||
strstr(entry->type, "real"))) {
if (!ast_tvzero(cdr->answer)) {
snprintf(workspace, sizeof(workspace), "%lf",
(double) (ast_tvdiff_us(cdr->end, cdr->answer) / 1000000.0));
} else {
ast_copy_string(workspace, "0", sizeof(workspace));
}
if (!ast_strlen_zero(workspace)) {
value = workspace;
}
}
if (!strcasecmp(cdrname, "duration") &&
(strstr(entry->type, "float") ||
strstr(entry->type, "double") ||
strstr(entry->type, "decimal") ||
strstr(entry->type, "numeric") ||
strstr(entry->type, "real"))) {
snprintf(workspace, sizeof(workspace), "%lf",
(double) (ast_tvdiff_us(cdr->end, cdr->start) / 1000000.0));
if (!ast_strlen_zero(workspace)) {
value = workspace;
}
}
ast_str_make_space(&escape, (valsz = strlen(value)) * 2 + 1);
mysql_real_escape_string(&mysql, ast_str_buffer(escape), value, valsz);
ast_str_append(&sql1, 0, "`%s`", entry->name);
ast_str_append(&sql2, 0, "'%s'", ast_str_buffer(escape));
}
}
AST_RWLIST_UNLOCK(&columns);
ast_debug(1, "Inserting a CDR record.\n");
ast_str_append(&sql1, 0, "%s)", ast_str_buffer(sql2));
ast_debug(1, "SQL command as follows: %s\n", ast_str_buffer(sql1));
if (mysql_real_query(&mysql, ast_str_buffer(sql1), ast_str_strlen(sql1))) {
ast_log(LOG_ERROR, "Failed to insert into database: (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql));
mysql_close(&mysql);
connected = 0;
} else {
records++;
totalrecords++;
}
}
ast_mutex_unlock(&mysql_lock);
return 0;
}
static int my_unload_module(int reload)
{
struct unload_string *us;
struct column *entry;
ast_cli_unregister_multiple(cdr_mysql_status_cli, sizeof(cdr_mysql_status_cli) / sizeof(struct ast_cli_entry));
if (connected) {
mysql_close(&mysql);
connected = 0;
records = 0;
}
AST_LIST_LOCK(&unload_strings);
while ((us = AST_LIST_REMOVE_HEAD(&unload_strings, entry))) {
ast_free(us->str);
ast_free(us);
}
AST_LIST_UNLOCK(&unload_strings);
if (!reload) {
AST_RWLIST_WRLOCK(&columns);
}
while ((entry = AST_RWLIST_REMOVE_HEAD(&columns, list))) {
ast_free(entry);
}
if (!reload) {
AST_RWLIST_UNLOCK(&columns);
}
dbport = 0;
ast_cdr_unregister(name);
return 0;
}
static int my_load_config_string(struct ast_config *cfg, const char *category, const char *variable, struct ast_str **field, const char *def)
{
struct unload_string *us;
const char *tmp;
if (!(us = ast_calloc(1, sizeof(*us))))
return -1;
if (!(*field = ast_str_create(16))) {
ast_free(us);
return -1;
}
tmp = ast_variable_retrieve(cfg, category, variable);
ast_str_set(field, 0, "%s", tmp ? tmp : def);
us->str = *field;
AST_LIST_LOCK(&unload_strings);
AST_LIST_INSERT_HEAD(&unload_strings, us, entry);
AST_LIST_UNLOCK(&unload_strings);
return 0;
}
static int my_load_config_number(struct ast_config *cfg, const char *category, const char *variable, int *field, int def)
{
const char *tmp;
tmp = ast_variable_retrieve(cfg, category, variable);
if (!tmp || sscanf(tmp, "%30d", field) < 1)
*field = def;
return 0;
}
static int my_load_module(int reload)
{
int res;
struct ast_config *cfg;
struct ast_variable *var;
/* CONFIG_STATUS_FILEUNCHANGED is impossible when config_flags is always 0,
* and it has to be zero, so a reload can be sent to tell the driver to
* rescan the table layout. */
struct ast_flags config_flags = { 0 };
struct column *entry;
char *temp;
struct ast_str *compat;
MYSQL_ROW row;
MYSQL_RES *result;
char sqldesc[128];
#if MYSQL_VERSION_ID >= 50013
my_bool my_bool_true = 1;
#endif
/* Cannot use a conditionally different flag, because the table layout may
* have changed, which is not detectable by config file change detection,
* but should still cause the configuration to be re-parsed. */
cfg = ast_config_load(config, config_flags);
if (cfg == CONFIG_STATUS_FILEMISSING) {
ast_log(LOG_WARNING, "Unable to load config for mysql CDR's: %s\n", config);
return AST_MODULE_LOAD_SUCCESS;
} else if (cfg == CONFIG_STATUS_FILEINVALID) {
ast_log(LOG_ERROR, "Unable to load configuration file '%s'\n", config);
return AST_MODULE_LOAD_DECLINE;
}
if (reload) {
AST_RWLIST_WRLOCK(&columns);
my_unload_module(1);
}
var = ast_variable_browse(cfg, "global");
if (!var) {
/* nothing configured */
if (reload) {
AST_RWLIST_UNLOCK(&columns);
}
ast_config_destroy(cfg);
return AST_MODULE_LOAD_SUCCESS;
}
res = 0;
res |= my_load_config_string(cfg, "global", "hostname", &hostname, "localhost");
res |= my_load_config_string(cfg, "global", "dbname", &dbname, "astriskcdrdb");
res |= my_load_config_string(cfg, "global", "user", &dbuser, "root");
res |= my_load_config_string(cfg, "global", "sock", &dbsock, "");
res |= my_load_config_string(cfg, "global", "table", &dbtable, "cdr");
res |= my_load_config_string(cfg, "global", "password", &password, "");
res |= my_load_config_string(cfg, "global", "charset", &dbcharset, "");
res |= my_load_config_string(cfg, "global", "ssl_ca", &ssl_ca, "");
res |= my_load_config_string(cfg, "global", "ssl_cert", &ssl_cert, "");
res |= my_load_config_string(cfg, "global", "ssl_key", &ssl_key, "");
res |= my_load_config_number(cfg, "global", "port", &dbport, 0);
res |= my_load_config_number(cfg, "global", "timeout", &timeout, 0);
res |= my_load_config_string(cfg, "global", "compat", &compat, "no");
res |= my_load_config_string(cfg, "global", "cdrzone", &cdrzone, "");
if (ast_str_strlen(cdrzone) == 0) {
for (; var; var = var->next) {
if (!strcasecmp(var->name, "usegmtime") && ast_true(var->value)) {
ast_str_set(&cdrzone, 0, "UTC");
}
}
}
if (ast_true(ast_str_buffer(compat))) {
calldate_compat = 1;
} else {
calldate_compat = 0;
}
if (res < 0) {
if (reload) {
AST_RWLIST_UNLOCK(&columns);
}
ast_config_destroy(cfg);
return AST_MODULE_LOAD_FAILURE;
}
/* Check for any aliases */
if (!reload) {
/* Lock, if not already */
AST_RWLIST_WRLOCK(&columns);
}
while ((entry = AST_LIST_REMOVE_HEAD(&columns, list))) {
ast_free(entry);
}
ast_debug(1, "Got hostname of %s\n", ast_str_buffer(hostname));
ast_debug(1, "Got port of %d\n", dbport);
ast_debug(1, "Got a timeout of %d\n", timeout);
if (dbsock)
ast_debug(1, "Got sock file of %s\n", ast_str_buffer(dbsock));
ast_debug(1, "Got user of %s\n", ast_str_buffer(dbuser));
ast_debug(1, "Got dbname of %s\n", ast_str_buffer(dbname));
ast_debug(1, "Got password of %s\n", ast_str_buffer(password));
ast_debug(1, "%sunning in calldate compatibility mode\n", calldate_compat ? "R" : "Not r");
ast_debug(1, "Dates and times are localized to %s\n", S_OR(ast_str_buffer(cdrzone), "local timezone"));
if (dbcharset) {
ast_debug(1, "Got DB charset of %s\n", ast_str_buffer(dbcharset));
}
mysql_init(&mysql);
if (timeout && mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *)&timeout) != 0) {
ast_log(LOG_ERROR, "cdr_mysql: mysql_options returned (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql));
}
#if MYSQL_VERSION_ID >= 50013
/* Add option for automatic reconnection */
if (mysql_options(&mysql, MYSQL_OPT_RECONNECT, &my_bool_true) != 0) {
ast_log(LOG_ERROR, "cdr_mysql: mysql_options returned (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql));
}
#endif
if ((ssl_ca && ast_str_strlen(ssl_ca)) || (ssl_cert && ast_str_strlen(ssl_cert)) || (ssl_key && ast_str_strlen(ssl_key))) {
mysql_ssl_set(&mysql,
ssl_key ? ast_str_buffer(ssl_key) : NULL,
ssl_cert ? ast_str_buffer(ssl_cert) : NULL,
ssl_ca ? ast_str_buffer(ssl_ca) : NULL,
NULL, NULL);
}
temp = dbsock && ast_str_strlen(dbsock) ? ast_str_buffer(dbsock) : NULL;
if (!mysql_real_connect(&mysql, ast_str_buffer(hostname), ast_str_buffer(dbuser), ast_str_buffer(password), ast_str_buffer(dbname), dbport, temp, ssl_ca && ast_str_strlen(ssl_ca) ? CLIENT_SSL : 0)) {
ast_log(LOG_ERROR, "Failed to connect to mysql database %s on %s.\n", ast_str_buffer(dbname), ast_str_buffer(hostname));
connected = 0;
records = 0;
} else {
ast_debug(1, "Successfully connected to MySQL database.\n");
connected = 1;
records = 0;
connect_time = time(NULL);
if (dbcharset) {
snprintf(sqldesc, sizeof(sqldesc), "SET NAMES '%s'", ast_str_buffer(dbcharset));
mysql_real_query(&mysql, sqldesc, strlen(sqldesc));
ast_debug(1, "SQL command as follows: %s\n", sqldesc);
}
/* Get table description */
snprintf(sqldesc, sizeof(sqldesc), "DESC %s", dbtable ? ast_str_buffer(dbtable) : "cdr");
if (mysql_query(&mysql, sqldesc)) {
ast_log(LOG_ERROR, "Unable to query table description!! Logging disabled.\n");
mysql_close(&mysql);
connected = 0;
AST_RWLIST_UNLOCK(&columns);
ast_config_destroy(cfg);
return AST_MODULE_LOAD_FAILURE;
}
if (!(result = mysql_store_result(&mysql))) {
ast_log(LOG_ERROR, "Unable to query table description!! Logging disabled.\n");
mysql_close(&mysql);
connected = 0;
AST_RWLIST_UNLOCK(&columns);
ast_config_destroy(cfg);
return AST_MODULE_LOAD_FAILURE;
}
while ((row = mysql_fetch_row(result))) {
struct column *entry;
char *cdrvar = "", *staticvalue = "";
ast_debug(1, "Got a field '%s' of type '%s'\n", row[0], row[1]);
/* Check for an alias or a static value */
for (var = ast_variable_browse(cfg, "columns"); var; var = var->next) {
if (strncmp(var->name, "alias", 5) == 0 && strcasecmp(var->value, row[0]) == 0 ) {
char *alias = ast_strdupa(var->name + 5);
cdrvar = ast_strip(alias);
ast_verb(3, "Found alias %s for column %s\n", cdrvar, row[0]);
break;
} else if (strncmp(var->name, "static", 6) == 0 && strcasecmp(var->value, row[0]) == 0) {
char *item = ast_strdupa(var->name + 6);
item = ast_strip(item);
if (item[0] == '"' && item[strlen(item) - 1] == '"') {
/* Remove surrounding quotes */
item[strlen(item) - 1] = '\0';
item++;
}
staticvalue = item;
}
}
entry = ast_calloc(sizeof(char), sizeof(*entry) + strlen(row[0]) + 1 + strlen(cdrvar) + 1 + strlen(staticvalue) + 1 + strlen(row[1]) + 1);
if (!entry) {
ast_log(LOG_ERROR, "Out of memory creating entry for column '%s'\n", row[0]);
res = -1;
break;
}
entry->name = (char *)entry + sizeof(*entry);
strcpy(entry->name, row[0]);
if (!ast_strlen_zero(cdrvar)) {
entry->cdrname = entry->name + strlen(row[0]) + 1;
strcpy(entry->cdrname, cdrvar);
} else { /* Point to same place as the column name */
entry->cdrname = (char *)entry + sizeof(*entry);
}
if (!ast_strlen_zero(staticvalue)) {
entry->staticvalue = entry->cdrname + strlen(entry->cdrname) + 1;
strcpy(entry->staticvalue, staticvalue);
ast_debug(1, "staticvalue length: %d\n", (int) strlen(staticvalue) );
entry->type = entry->staticvalue + strlen(entry->staticvalue) + 1;
} else {
entry->type = entry->cdrname + strlen(entry->cdrname) + 1;
}
strcpy(entry->type, row[1]);
ast_debug(1, "Entry name '%s'\n", entry->name);
ast_debug(1, " cdrname '%s'\n", entry->cdrname);
ast_debug(1, " static '%s'\n", entry->staticvalue);
ast_debug(1, " type '%s'\n", entry->type);
AST_LIST_INSERT_TAIL(&columns, entry, list);
}
mysql_free_result(result);
}
AST_RWLIST_UNLOCK(&columns);
ast_config_destroy(cfg);
if (res < 0) {
return AST_MODULE_LOAD_FAILURE;
}
res = ast_cdr_register(name, desc, mysql_log);
if (res) {
ast_log(LOG_ERROR, "Unable to register MySQL CDR handling\n");
} else {
res = ast_cli_register_multiple(cdr_mysql_status_cli, sizeof(cdr_mysql_status_cli) / sizeof(struct ast_cli_entry));
}
return res;
}
static int load_module(void)
{
return my_load_module(0);
}
static int unload_module(void)
{
return my_unload_module(0);
}
static int reload(void)
{
int ret;
ast_mutex_lock(&mysql_lock);
ret = my_load_module(1);
ast_mutex_unlock(&mysql_lock);
return ret;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "MySQL CDR Backend",
.load = load_module,
.unload = unload_module,
.reload = reload,
);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
* Any redistributions of this file including modified versions must
* Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -38,6 +38,7 @@
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/signal.h>
#include "asterisk/lock.h"
#include "asterisk/channel.h"
@@ -63,9 +64,6 @@
#include "asterisk/format.h"
#include "asterisk/format_cap.h"
#include "asterisk/udptl.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/format_cache.h"
#include "asterisk/paths.h"
#include "ootypes.h"
#include "ooUtils.h"
@@ -86,7 +84,7 @@ struct ooh323_peer;
/* Helper functions */
struct ooh323_user *find_user(const char * name, const char *ip);
struct ooh323_peer *find_peer(const char * name, int port);
void ooh323_delete_peer(struct ooh323_peer *peer);
void ooh323_delete_peer(struct ooh323_peer *peer);
int delete_users(void);
int delete_peers(void);
@@ -96,7 +94,7 @@ int reload_config(int reload);
int restart_monitor(void);
int configure_local_rtp(struct ooh323_pvt *p, ooCallData* call);
void setup_rtp_connection(ooCallData *call, const char *remoteIp,
void setup_rtp_connection(ooCallData *call, const char *remoteIp,
int remotePort);
void close_rtp_connection(ooCallData *call);
struct ast_frame *ooh323_rtp_read
@@ -105,6 +103,9 @@ struct ast_frame *ooh323_rtp_read
void ooh323_set_write_format(ooCallData *call, struct ast_format *fmt, int txframes);
void ooh323_set_read_format(ooCallData *call, struct ast_format *fmt);
int ooh323_update_capPrefsOrderForCall
(ooCallData *call, struct ast_codec_pref *prefs);
int ooh323_convertAsteriskCapToH323Cap(struct ast_format *format);
int ooh323_convert_hangupcause_asteriskToH323(int cause);

View File

@@ -34,13 +34,14 @@
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "mp3/mpg123.h"
#include "mp3/mpglib.h"
#include "asterisk/module.h"
#include "asterisk/mod_format.h"
#include "asterisk/logger.h"
#include "asterisk/format_cache.h"
#define MP3_BUFLEN 320
#define MP3_SCACHE 16384
@@ -118,11 +119,9 @@ static int mp3_squeue(struct ast_filestream *s)
res = ftell(s->f);
p->sbuflen = fread(p->sbuf, 1, MP3_SCACHE, s->f);
if (p->sbuflen < MP3_SCACHE) {
if (ferror(s->f)) {
ast_log(LOG_WARNING, "Error while reading MP3 file: %s\n", strerror(errno));
return -1;
}
if(p->sbuflen < 0) {
ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", p->sbuflen, strerror(errno));
return -1;
}
res = decodeMP3(&p->mp,p->sbuf,p->sbuflen,p->dbuf,MP3_DCACHE,&p->dbuflen);
if(res != MP3_OK)
@@ -230,7 +229,10 @@ static struct ast_frame *mp3_read(struct ast_filestream *s, int *whennext)
p->offset += p->buflen;
delay = p->buflen / 2;
s->fr.frametype = AST_FRAME_VOICE;
ast_format_set(&s->fr.subclass.format, AST_FORMAT_SLINEAR, 0);
AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, p->buflen);
s->fr.mallocd = 0;
s->fr.samples = delay;
*whennext = delay;
return &s->fr;
@@ -316,7 +318,7 @@ static struct ast_format_def mp3_f = {
static int load_module(void)
{
mp3_f.format = ast_format_slin;
ast_format_set(&mp3_f.format, AST_FORMAT_SLINEAR, 0);
InitMP3Constants();
return ast_format_def_register(&mp3_f);
}
@@ -326,4 +328,4 @@ static int unload_module(void)
return ast_format_def_unregister(name);
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "MP3 format [Any rate but 8000hz mono is optimal]");
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "MP3 format [Any rate but 8000hz mono is optimal]");

View File

@@ -6,22 +6,22 @@ Introduction
Objective Open H.323 stack is a simple H.323 implementation in C. This
package contains the core stack code. For complete H.323 stack package with
examples or for more information visit www.obj-sys.com/open
The ASN.1 messaging code was developed using the Objective Systems ASN1C
compiler to implement the core H.323 specifications (H.225, H.235,
and H.245). Additional code was then developed which makes use of
the compiler generated code for presenting a comparatively high level
The ASN.1 messaging code was developed using the Objective Systems ASN1C
compiler to implement the core H.323 specifications (H.225, H.235,
and H.245). Additional code was then developed which makes use of
the compiler generated code for presenting a comparatively high level
stack API.
Features
Features supported in this package include the following:
* H.225/Q.931 - the following message types are supported (including
support for FastStart and H.245 tunneling):
- Setup
* H.225/Q.931 - the following message types are supported (including
support for FastStart and H.245 tunneling):
- Setup
- Connect
- Call Proceeding
- Alerting
- Alerting
- Facility
- ReleaseComplete
@@ -54,8 +54,8 @@ Features supported in this package include the following:
To run the stack test application chansetup
chansetup - This is a sample program developed for testing multiple calls.
This program allows stack testing by placing multiple calls. The number of
calls, duration of each call and interval between successive calls are
configurable.
calls, duration of each call and interval between successive calls are
configurable.
1. Two instances of this program have to be run. Can be run on same machine or
different machines.
@@ -64,19 +64,19 @@ To run the stack test application chansetup
cd tests/chansetup
2. For running listener instance,
2. For running listener instance,
./h323peer [--use-ip ip] [--use-port port]
where local ip address and port can be specified for listening to incoming
where local ip address and port can be specified for listening to incoming
calls. By default, application determines ip address and uses default H323
port number 1720.
3. For running calling instance
./h323peer [--use-ip ip] -n <number of calls> -duration <call duration>
-interval <interval between successive calls> destination
-interval <inetrval between successive calls> destination
where all times are in seconds. Interval of 0 means next call will be placed
after current call finishes. "destination" is the dotted ip address of the
endpoint running listener instance.
@@ -86,9 +86,10 @@ To run the stack test application chansetup
Reporting Problems:
Report problems you encounter by sending E-mail to support@obj-sys.com.
Report problems you encounter by sending E-mail to support@obj-sys.com.
If you have any further questions or comments on what you would like to
see in the product or what is difficult to use or understand, please
see in the product or what is difficult to use or understand, please
communicate them to us. Your feedback is important to us. Please let us
know how it works out for you - either good or bad.
know how it works out for you - either good or bad.

View File

@@ -96,7 +96,7 @@ libooh323c_a_SOURCES = ooLogChan.h ooLogChan.c ooUtils.c ooUtils.h ooGkClient.h
INCLUDES = -Ih323
#include_HEADERS = ooUtils.h memheap.h ooCommon.h ooDateTime.h ooGkClient.h ooasn1.h oochannels.h ootrace.h ooh245.h ooports.h ooq931.h oohdr.h ooper.h ooSocket.h ooTimer.h ootypes.h eventHandler.h ooCapability.h ooCalls.h ooStackCmds.h ooh323.h ooh323ep.h printHandler.h rtctype.h h323/H235-SECURITY-MESSAGES.h h323/H323-MESSAGES.h h323/MULTIMEDIA-SYSTEM-CONTROL.h
#include_HEADERS = ooUtils.h memheap.h ooCommon.h ooDateTime.h ooGkClient.h ooasn1.h oochannels.h ootrace.h ooh245.h ooports.h ooq931.h oohdr.h ooper.h ooSocket.h ooTimer.h ootypes.h eventHandler.h ooCapability.h ooCalls.h ooStackCmds.h ooh323.h ooh323ep.h printHandler.h rtctype.h h323/H235-SECURITY-MESSAGES.h h323/H323-MESSAGES.h h323/MULTIMEDIA-SYSTEM-CONTROL.h
EXTRA_DIST = oostk.dsp
subdir = ooh323c/src
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -104,7 +104,7 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
libooh323c_a_AR = $(AR) cr
libooh323c_a_AR = $(AR) cru
libooh323c_a_LIBADD =
am_libooh323c_a_OBJECTS = ooLogChan.$(OBJEXT) ooUtils.$(OBJEXT) \
ooGkClient.$(OBJEXT) context.$(OBJEXT) ooDateTime.$(OBJEXT) \
@@ -187,7 +187,7 @@ MULTIMEDIA-SYSTEM-CONTROLDec.$(OBJEXT): \
h323/MULTIMEDIA-SYSTEM-CONTROLDec.c
MULTIMEDIA-SYSTEM-CONTROLEnc.$(OBJEXT): \
h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
libooh323c.a: $(libooh323c_a_OBJECTS) $(libooh323c_a_DEPENDENCIES)
libooh323c.a: $(libooh323c_a_OBJECTS) $(libooh323c_a_DEPENDENCIES)
-rm -f libooh323c.a
$(libooh323c_a_AR) libooh323c.a $(libooh323c_a_OBJECTS) $(libooh323c_a_LIBADD)
$(RANLIB) libooh323c.a

View File

@@ -1,21 +1,20 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
* Any redistributions of this file including modified versions must
* Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
#include "asterisk.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
#include "ooasn1.h"
#include <stdlib.h>
@@ -35,13 +34,13 @@ int initContext (OOCTXT* pctxt)
return ASN_OK;
}
int initContextBuffer
int initContextBuffer
(OOCTXT* pctxt, const ASN1OCTET* bufaddr, ASN1UINT bufsiz)
{
if (bufaddr == 0) {
/* dynamic buffer */
if (bufsiz == 0) bufsiz = ASN_K_ENCBUFSIZ;
pctxt->buffer.data = (ASN1OCTET*)
pctxt->buffer.data = (ASN1OCTET*)
memHeapAlloc (&pctxt->pMsgMemHeap, bufsiz);
if (!pctxt->buffer.data) return ASN_E_NOMEM;
pctxt->buffer.size = bufsiz;
@@ -60,7 +59,7 @@ int initContextBuffer
return ASN_OK;
}
int initSubContext (OOCTXT* pctxt, OOCTXT* psrc)
int initSubContext (OOCTXT* pctxt, OOCTXT* psrc)
{
/* ast_mutex_lock(&pctxt->pLock); */
int stat = ASN_OK;
@@ -85,7 +84,7 @@ void freeContext (OOCTXT* pctxt)
ASN1BOOL saveBuf;
ast_mutex_lock(&pctxt->pLock);
saveBuf = (pctxt->flags & ASN1SAVEBUF) != 0;
if (pctxt->buffer.dynamic && pctxt->buffer.data) {
if (saveBuf) {
memHeapMarkSaved (&pctxt->pMsgMemHeap, pctxt->buffer.data, TRUE);
@@ -130,7 +129,7 @@ int setPERBufferUsingCtxt (OOCTXT* pTarget, OOCTXT* pSource)
{
int stat;
ast_mutex_lock(&pTarget->pLock); ast_mutex_lock(&pSource->pLock);
stat = initContextBuffer
stat = initContextBuffer
(pTarget, pSource->buffer.data, pSource->buffer.size);
if (ASN_OK == stat) {
@@ -151,20 +150,19 @@ int setPERBuffer (OOCTXT* pctxt,
ast_mutex_unlock(&pctxt->pLock);
if(stat != ASN_OK) return stat;
return ASN_OK;
}
OOCTXT* newContext ()
OOCTXT* newContext ()
{
/* OOCTXT* pctxt = (OOCTXT*) ASN1CRTMALLOC0 (sizeof(OOCTXT)); */
OOCTXT* pctxt = ast_malloc(sizeof(OOCTXT));
OOCTXT* pctxt = (OOCTXT*) malloc (sizeof(OOCTXT));
if (pctxt) {
if (initContext(pctxt) != ASN_OK) {
/* ASN1CRTFREE0 (pctxt); */
ast_free(pctxt);
free(pctxt);
pctxt = 0;
return (pctxt);
}
pctxt->flags |= ASN1DYNCTXT;
}

View File

@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
* Any redistributions of this file including modified versions must
* Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -19,16 +19,16 @@
#include "ooasn1.h"
static int decode16BitConstrainedString
static int decode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet);
static int decodeOctets
static int decodeOctets
(OOCTXT* pctxt, ASN1OCTET* pbuffer, ASN1UINT bufsiz, ASN1UINT nbits);
static int getComponentLength (OOCTXT* pctxt, ASN1UINT itemBits);
int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
{
{
unsigned char mask;
if (nbits == 0) {
@@ -47,7 +47,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
pctxt->buffer.bitOffset -= nbits;
*pvalue = ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
*pvalue = ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
pctxt->buffer.bitOffset) & ((1 << nbits) - 1);
return ASN_OK;
@@ -62,7 +62,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
/* Check if buffer contains number of bits requested */
int nbytes = (((nbits - pctxt->buffer.bitOffset) + 7) / 8);
if ((pctxt->buffer.byteIndex + nbytes) >= pctxt->buffer.size) {
return LOG_ASN1ERR (pctxt, ASN_E_ENDOFBUF);
}
@@ -78,7 +78,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
/* second read bytes from next byteIndex */
while (nbits >= 8) {
*pvalue = (*pvalue << 8) |
*pvalue = (*pvalue << 8) |
(pctxt->buffer.data[pctxt->buffer.byteIndex]);
pctxt->buffer.byteIndex++;
nbits -= 8;
@@ -87,8 +87,8 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
/* third read bits & set bitoffset of the byteIndex */
if (nbits > 0) {
pctxt->buffer.bitOffset = 8 - nbits;
*pvalue = (*pvalue << nbits) |
((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
*pvalue = (*pvalue << nbits) |
((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
pctxt->buffer.bitOffset);
}
@@ -96,7 +96,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
}
}
int decodeBitString
int decodeBitString
(OOCTXT* pctxt, ASN1UINT* numbits_p, ASN1OCTET* buffer, ASN1UINT bufsiz)
{
ASN1UINT bitcnt;
@@ -111,7 +111,7 @@ int decodeBitString
if (bitcnt > 0) {
*numbits_p += bitcnt;
stat = bitAndOctetStringAlignmentTest
stat = bitAndOctetStringAlignmentTest
(pSizeList, bitcnt, TRUE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -133,7 +133,7 @@ int decodeBitString
return ASN_OK;
}
int decodeBMPString
int decodeBMPString
(OOCTXT* pctxt, ASN1BMPString* pvalue, Asn116BitCharSet* permCharSet)
{
Asn116BitCharSet charSet;
@@ -164,7 +164,7 @@ int decodeByteAlign (OOCTXT* pctxt)
return ASN_OK;
}
int decodeConstrainedStringEx
int decodeConstrainedStringEx
(OOCTXT* pctxt, const char** string, const char* charSet,
ASN1UINT abits, ASN1UINT ubits, ASN1UINT canSetBits)
{
@@ -227,9 +227,9 @@ int decodeConstrainedStringEx
return ASN_OK;
}
int decodeConsInteger
int decodeConsInteger
(OOCTXT* pctxt, ASN1INT* pvalue, ASN1INT lower, ASN1INT upper)
{
{
ASN1UINT range_value = upper - lower;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -254,9 +254,9 @@ int decodeConsInteger
return stat;
}
int decodeConsUInt8
int decodeConsUInt8
(OOCTXT* pctxt, ASN1UINT8* pvalue, ASN1UINT lower, ASN1UINT upper)
{
{
ASN1UINT range_value, value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -299,9 +299,9 @@ int decodeConsUInt8
return stat;
}
int decodeConsUInt16
int decodeConsUInt16
(OOCTXT* pctxt, ASN1USINT* pvalue, ASN1UINT lower, ASN1UINT upper)
{
{
ASN1UINT range_value, value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -328,9 +328,9 @@ int decodeConsUInt16
return stat;
}
int decodeConsUnsigned
int decodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower, ASN1UINT upper)
{
{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -354,9 +354,9 @@ int decodeConsUnsigned
return stat;
}
int decodeConsWholeNumber
int decodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT* padjusted_value, ASN1UINT range_value)
{
{
ASN1UINT nocts, range_bitcnt;
int stat;
@@ -417,11 +417,11 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
ASN1OCTET* ptmp;
int nbits, stat = ASN_OK;
/* If "fast copy" option is not set (ASN1FASTCOPY) or if constructed,
/* If "fast copy" option is not set (ASN1FATSCOPY) or if constructed,
* copy the bit string value into a dynamic memory buffer;
* otherwise, store the pointer to the value in the decode
* otherwise, store the pointer to the value in the decode
* buffer in the data pointer argument. */
if (pctxt->flags & ASN1FASTCOPY) {
/* check is it possible to do optimized decoding */
@@ -433,7 +433,7 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
stat = DECODEBIT (pctxt, &bit); /* read first bit of length determinant */
if (bit == 1 && stat == ASN_OK)
if (bit == 1 && stat == ASN_OK)
stat = DECODEBIT (pctxt, &bit); /* read second bit */
pctxt->buffer.byteIndex = byteIndex; /* restore byte index */
@@ -441,9 +441,9 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
/* if either first or second bit != 0 - not fragmented */
if (bit == 0 && stat == ASN_OK) {
if (bit == 0 && stat == ASN_OK) {
ASN1UINT bitcnt;
stat = decodeLength (pctxt, &bitcnt);
if (stat != 0) return LOG_ASN1ERR (pctxt, stat);
@@ -454,9 +454,9 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
stat = moveBitCursor (pctxt, bitcnt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
else
else
pBitStr->data = 0;
return stat;
}
}
@@ -470,13 +470,13 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
}
nocts = (nbits + 7) / 8;
/* Allocate memory for the target string */
if (nocts > 0) {
ptmp = (ASN1OCTET*) ASN1MALLOC (pctxt, nocts);
if (0 == ptmp) return LOG_ASN1ERR (pctxt, ASN_E_NOMEM);
/* Call static bit string decode function */
stat = decodeBitString (pctxt, &pBitStr->numbits, ptmp, nocts);
@@ -493,7 +493,7 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
/* If "fast copy" option is not set (ASN1FASTCOPY) or if constructed,
* copy the octet string value into a dynamic memory buffer;
* otherwise, store the pointer to the value in the decode
* otherwise, store the pointer to the value in the decode
* buffer in the data pointer argument. */
if (pctxt->flags & ASN1FASTCOPY) {
@@ -507,7 +507,7 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
stat = DECODEBIT (pctxt, &bit); /* read first bit of length determinant */
if (bit == 1 && stat == ASN_OK)
if (bit == 1 && stat == ASN_OK)
stat = DECODEBIT (pctxt, &bit); /* read second bit */
pctxt->buffer.byteIndex = byteIndex; /* restore byte index */
@@ -515,9 +515,9 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
/* if either first or second bit != 0 - not fragmented */
if (bit == 0 && stat == ASN_OK) {
if (bit == 0 && stat == ASN_OK) {
ASN1UINT octcnt;
stat = decodeLength (pctxt, &octcnt);
if (stat != 0) return LOG_ASN1ERR (pctxt, stat);
@@ -528,13 +528,13 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
stat = moveBitCursor (pctxt, octcnt * 8);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
else
else
pOctStr->data = 0;
return stat;
}
}
nocts = getComponentLength (pctxt, 8);
if (nocts < 0) return LOG_ASN1ERR (pctxt, nocts);
@@ -671,14 +671,14 @@ int decodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
if (j == 0) {
subid = pvalue->subid[0];
pvalue->subid[0] = ((subid / 40) >= 2) ? 2 : subid / 40;
pvalue->subid[1] = (pvalue->subid[0] == 2) ?
pvalue->subid[1] = (pvalue->subid[0] == 2) ?
subid - 80 : subid % 40;
j = 2;
}
else j++;
}
else
stat = ASN_E_INVOBJID;
stat = ASN_E_INVOBJID;
}
pvalue->numids = j;
@@ -687,9 +687,9 @@ int decodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
return (stat);
}
static int decodeOctets
static int decodeOctets
(OOCTXT* pctxt, ASN1OCTET* pbuffer, ASN1UINT bufsiz, ASN1UINT nbits)
{
{
ASN1UINT nbytes = (nbits + 7) / 8 ;
ASN1UINT i = 0, j;
ASN1UINT rshift = pctxt->buffer.bitOffset;
@@ -737,27 +737,23 @@ static int decodeOctets
nbits -= 8;
}
if (nbits <= 0) {
return ASN_OK;
}
/* Copy last partial byte */
if (nbits >= rshift) {
pbuffer[i] =
pbuffer[i] =
pctxt->buffer.data[pctxt->buffer.byteIndex++] << lshift;
nbitsInLastOctet = nbits - rshift;
if (nbitsInLastOctet > 0) {
pbuffer[i] |=
pbuffer[i] |=
pctxt->buffer.data[pctxt->buffer.byteIndex] >> rshift;
}
pctxt->buffer.bitOffset = 8 - nbitsInLastOctet;
}
else { /* nbits > 0 && nbits < rshift */
pbuffer[i] =
else if (nbits > 0) { /* nbits < rshift */
pbuffer[i] =
pctxt->buffer.data[pctxt->buffer.byteIndex] << lshift;
pctxt->buffer.bitOffset = rshift - nbits;
}
@@ -777,7 +773,7 @@ static int decodeOctets
return ASN_OK;
}
int decodeOctetString
int decodeOctetString
(OOCTXT* pctxt, ASN1UINT* numocts_p, ASN1OCTET* buffer, ASN1UINT bufsiz)
{
ASN1UINT octcnt;
@@ -794,7 +790,7 @@ int decodeOctetString
if (TRUE) {
ASN1BOOL doAlign;
stat = bitAndOctetStringAlignmentTest
stat = bitAndOctetStringAlignmentTest
(pSizeList, octcnt, FALSE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -804,7 +800,7 @@ int decodeOctetString
}
}
stat = decodeOctets (pctxt, &buffer[octidx],
stat = decodeOctets (pctxt, &buffer[octidx],
bufsiz - octidx, (octcnt * 8));
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -819,7 +815,7 @@ int decodeOctetString
return ASN_OK;
}
int decodeOpenType
int decodeOpenType
(OOCTXT* pctxt, const ASN1OCTET** object_p2, ASN1UINT* numocts_p)
{
ASN1DynOctStr octStr;
@@ -836,8 +832,8 @@ int decodeOpenType
int decodeSemiConsInteger (OOCTXT* pctxt, ASN1INT* pvalue, ASN1INT lower)
{
signed char b = 0;
unsigned char ub = 0;
signed char b;
unsigned char ub;
ASN1UINT nbytes;
int stat;
@@ -887,7 +883,7 @@ int decodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower)
stat = decodeLength (pctxt, &nbytes);
if (stat < 0) return LOG_ASN1ERR (pctxt, stat);
if (nbytes > 0) {
stat = decodeByteAlign (pctxt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -902,7 +898,7 @@ int decodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower)
}
int decodeSmallNonNegWholeNumber (OOCTXT* pctxt, ASN1UINT* pvalue)
{
{
ASN1BOOL bitValue;
ASN1UINT len;
int ret;
@@ -963,7 +959,7 @@ int decodeVarWidthCharString (OOCTXT* pctxt, const char** pvalue)
return ASN_OK;
}
static int decode16BitConstrainedString
static int decode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet)
{
ASN1UINT i, idx, nbits = pCharSet->alignedBits;
@@ -989,7 +985,7 @@ static int decode16BitConstrainedString
stat = decodeBits (pctxt, &idx, nbits);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
pString->data[i] = (pCharSet->charSet.data == 0) ?
pString->data[i] = (pCharSet->charSet.data == 0) ?
idx + pCharSet->firstChar : pCharSet->charSet.data[idx];
}
}
@@ -1052,6 +1048,6 @@ int moveBitCursor (OOCTXT* pctxt, int bitOffset)
if (pctxt->buffer.byteIndex > pctxt->buffer.size) {
return (ASN_E_ENDOFBUF);
}
return ASN_OK;
}

View File

@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
* Any redistributions of this file including modified versions must
* Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -30,7 +30,7 @@ void dListInit (DList* pList)
DListNode* dListAppend (OOCTXT* pctxt, DList* pList, void* pData)
{
DListNode* pListNode = (DListNode*)
DListNode* pListNode = (DListNode*)
memAlloc (pctxt, sizeof(DListNode));
if (0 != pListNode) {
@@ -53,7 +53,7 @@ DListNode* dListAppend (OOCTXT* pctxt, DList* pList, void* pData)
DListNode* dListAppendNode (OOCTXT* pctxt, DList* pList, void* pData)
{
DListNode* pListNode =
DListNode* pListNode =
(DListNode*) (((char*)pData) - sizeof(DListNode));
if (0 != pListNode) {
@@ -109,7 +109,7 @@ void dListFreeAll (OOCTXT* pctxt, DList* pList)
for (pNode = pList->head; pNode != 0; pNode = pNextNode) {
pNextNode = pNode->next;
memFreePtr (pctxt, pNode->data);
memFreePtr (pctxt, pNode);
}
@@ -148,8 +148,8 @@ void dListFindAndRemove(struct OOCTXT* pctxt, DList* pList, void *data)
memFreePtr(pctxt, pNode);
}
}
DListNode* dListFindByIndex (DList* pList, int index)
DListNode* dListFindByIndex (DList* pList, int index)
{
DListNode* curNode;
int i;
@@ -163,11 +163,11 @@ DListNode* dListFindByIndex (DList* pList, int index)
/* Insert item before given node */
DListNode* dListInsertBefore
DListNode* dListInsertBefore
(OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData)
{
DListNode* pListNode = (DListNode*) memAlloc (pctxt, sizeof(DListNode));
if (0 != pListNode) {
pListNode->data = (void*)pData;
@@ -212,7 +212,7 @@ DListNode* dListInsertBefore
/* Insert item after given node */
DListNode* dListInsertAfter
DListNode* dListInsertAfter
(OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData)
{
DListNode* pListNode = (DListNode*) memAlloc (pctxt, sizeof(DListNode));
@@ -258,3 +258,4 @@ DListNode* dListInsertAfter
return pListNode;
}

View File

@@ -1,20 +1,20 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
* Any redistributions of this file including modified versions must
* Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
* @file dlist.h
/**
* @file dlist.h
* Doubly-linked list structures and utility functions.
*/
#ifndef _OODLIST_H_
@@ -74,26 +74,26 @@ extern "C" {
* @param pData A pointer to a data item to be appended to the list.
* @return A pointer to an allocated node structure used to link
* the given data value into the list.
*/
EXTERN DListNode* dListAppend
*/
EXTERN DListNode* dListAppend
(struct OOCTXT* pctxt, DList* pList, void* pData);
EXTERN DListNode* dListAppendNode
EXTERN DListNode* dListAppendNode
(struct OOCTXT* pctxt, DList* pList, void* pData);
/**
* This function delete the head item from the list and returns a pointer
* the data item stored in that node. The memory for the node structure
* This function delete the head item from the list and returns a pointer
* the data item stored in that node. The memory for the node structure
* is released.
*
* @param pctxt A pointer to a context structure. This provides a
* storage area for the function to store all working
* variables that must be maintained between function
* calls.
* @param pList A pointer to the linked list structure from which
* @param pList A pointer to the linked list structure from which
* the node will be deleted.
* @return A pointer to the data item stored in the deleted node.
*/
*/
EXTERN void* dListDeleteHead (struct OOCTXT* pctxt, DList* pList);
EXTERN DListNode* dListFindByIndex (DList* pList, int index);
@@ -101,7 +101,7 @@ EXTERN DListNode* dListFindByIndex (DList* pList, int index);
/**
* This function initializes a doubly linked list structure. It sets the number
* of elements to zero and sets all internal pointer values to NULL. A doubly
* linked-list structure is described by the DList type. Nodes of the list
* linked-list structure is described by the DList type. Nodes of the list
* are of type DListNode.
*
* Memory for the structures is allocated using the memAlloc run-time
@@ -130,7 +130,7 @@ EXTERN void dListInit (DList* pList);
*/
EXTERN void dListFreeNodes (struct OOCTXT* pctxt, DList* pList);
/**
/**
* This function removes all nodes from the linked list structure and releases
* the memory that was allocated for storing the node structures
* (DListNode) and for data. The memory for data in each node must have
@@ -146,37 +146,37 @@ EXTERN void dListFreeNodes (struct OOCTXT* pctxt, DList* pList);
EXTERN void dListFreeAll (struct OOCTXT* pctxt, DList* pList);
/**
* This function inserts an item into the linked list structure before the
* This function inserts an item into the linked list structure before the
* specified element.
*
*
* @param pctxt Pointer to a context structure.
* @param pList A pointer to a linked list structure into which the
* @param pList A pointer to a linked list structure into which the
* data item is to be inserted.
* @param node The position in the list where the item is to be
* inserted. The item will be inserted before this
* @param node The position in the list where the item is to be
* inserted. The item will be inserted before this
* node or appended to the list if node is null.
* @param pData A pointer to the data item to be inserted to the list.
* @return A pointer to an allocated node structure used to
* @return A pointer to an allocated node structure used to
* link the given data value into the list.
*/
EXTERN DListNode* dListInsertBefore
EXTERN DListNode* dListInsertBefore
(struct OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData);
/**
* This function inserts an item into the linked list structure after the
* This function inserts an item into the linked list structure after the
* specified element.
*
*
* @param pctxt Pointer to a context structure.
* @param pList A pointer to a linked list structure into which the
* @param pList A pointer to a linked list structure into which the
* data item is to be inserted.
* @param node The position in the list where the item is to be
* inserted. The item will be inserted after this
* @param node The position in the list where the item is to be
* inserted. The item will be inserted after this
* node or added as the head element if node is null.
* @param pData A pointer to the data item to be inserted to the list.
* @return A pointer to an allocated node structure used to
* @return A pointer to an allocated node structure used to
* link the given data value into the list.
*/
EXTERN DListNode* dListInsertAfter
EXTERN DListNode* dListInsertAfter
(struct OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData);
/**
@@ -194,7 +194,7 @@ EXTERN DListNode* dListInsertAfter
EXTERN void dListRemove (DList* pList, DListNode* node);
EXTERN void dListFindAndRemove(struct OOCTXT* pctxt, DList* pList, void* data);
/**
/**
* @}
*/
#ifdef __cplusplus

View File

@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
* Any redistributions of this file including modified versions must
* Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -20,7 +20,7 @@
#include "ooasn1.h"
static int encode16BitConstrainedString
static int encode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet);
static int encode2sCompBinInt (OOCTXT* pctxt, ASN1INT value);
@@ -34,7 +34,7 @@ int encodeIdent (OOCTXT* pctxt, ASN1UINT ident);
int encodeBit (OOCTXT* pctxt, ASN1BOOL value)
{
{
int stat = ASN_OK;
/* If start of new byte, init to zero */
@@ -58,7 +58,7 @@ int encodeBit (OOCTXT* pctxt, ASN1BOOL value)
/* Set single-bit value */
if (value) {
pctxt->buffer.data[pctxt->buffer.byteIndex] |=
pctxt->buffer.data[pctxt->buffer.byteIndex] |=
( 1 << pctxt->buffer.bitOffset );
}
@@ -74,7 +74,7 @@ int encodeBit (OOCTXT* pctxt, ASN1BOOL value)
}
int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
{
{
int nbytes = (nbits + 7)/ 8, stat = ASN_OK;
if (nbits == 0) return stat;
@@ -94,7 +94,7 @@ int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
if (nbits < (unsigned)pctxt->buffer.bitOffset) {
pctxt->buffer.bitOffset -= nbits;
pctxt->buffer.data[pctxt->buffer.byteIndex] |=
pctxt->buffer.data[pctxt->buffer.byteIndex] |=
( value << pctxt->buffer.bitOffset );
return stat;
}
@@ -108,22 +108,22 @@ int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
/* to set bits in subsequent bytes.. */
nbits -= pctxt->buffer.bitOffset;
pctxt->buffer.data[pctxt->buffer.byteIndex++] |=
pctxt->buffer.data[pctxt->buffer.byteIndex++] |=
(ASN1OCTET)( value >> nbits );
pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
while (nbits >= 8) {
nbits -= 8;
pctxt->buffer.data[pctxt->buffer.byteIndex++] =
pctxt->buffer.data[pctxt->buffer.byteIndex++] =
(ASN1OCTET)( value >> nbits );
pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
}
/* copy final partial byte */
pctxt->buffer.bitOffset = 8 - nbits;
if (nbits > 0) {
pctxt->buffer.data[pctxt->buffer.byteIndex] =
pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)((value & ((1 << nbits)-1)) << pctxt->buffer.bitOffset);
}
else
@@ -133,11 +133,11 @@ int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
}
int encodeBitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
{
{
int lshift = pctxt->buffer.bitOffset;
int rshift = 8 - pctxt->buffer.bitOffset;
int stat = ASN_OK;
ASN1OCTET mask = 0x0;
ASN1OCTET mask = 0x0;
if (nbits == 0) return ASN_OK;
@@ -173,14 +173,14 @@ int encodeBitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
/* possibly some bits in the following octet.. */
else {
pctxt->buffer.data[pctxt->buffer.byteIndex] |=
pctxt->buffer.data[pctxt->buffer.byteIndex] |=
(ASN1OCTET)(value >> rshift);
pctxt->buffer.bitOffset -= nbits;
if (pctxt->buffer.bitOffset < 0) {
pctxt->buffer.byteIndex++;
pctxt->buffer.data[pctxt->buffer.byteIndex] =
pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)(value << lshift);
pctxt->buffer.bitOffset += 8;
}
@@ -202,7 +202,7 @@ int encodeBitString (OOCTXT* pctxt, ASN1UINT numbits, const ASN1OCTET* data)
if (enclen > 0) {
ASN1BOOL doAlign;
stat = bitAndOctetStringAlignmentTest
stat = bitAndOctetStringAlignmentTest
(pSizeList, numbits, TRUE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -225,7 +225,7 @@ int encodeBitString (OOCTXT* pctxt, ASN1UINT numbits, const ASN1OCTET* data)
return ASN_OK;
}
int encodeBMPString
int encodeBMPString
(OOCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet)
{
Asn116BitCharSet charSet;
@@ -278,9 +278,9 @@ int encodeCheckBuffer (OOCTXT* pctxt, ASN1UINT nbytes)
return (stat);
}
int encodeConsInteger
int encodeConsInteger
(OOCTXT* pctxt, ASN1INT value, ASN1INT lower, ASN1INT upper)
{
{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat;
@@ -301,7 +301,7 @@ int encodeConsInteger
else {
range_value = upper + abs(lower);
adjusted_value = value + abs(lower);
}
}
if (range_value != ASN1UINT_MAX) { range_value += 1; }
@@ -316,9 +316,9 @@ int encodeConsInteger
return stat;
}
int encodeConsUnsigned
int encodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower, ASN1UINT upper)
{
{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat;
@@ -340,9 +340,9 @@ int encodeConsUnsigned
return stat;
}
int encodeConsWholeNumber
int encodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT adjusted_value, ASN1UINT range_value)
{
{
ASN1UINT nocts, range_bitcnt = getUIntBitCount (range_value - 1);
int stat;
@@ -396,8 +396,8 @@ int encodeConsWholeNumber
}
}
int encodeConstrainedStringEx (OOCTXT* pctxt,
const char* string,
int encodeConstrainedStringEx (OOCTXT* pctxt,
const char* string,
const char* charSet,
ASN1UINT abits, /* aligned char bits */
ASN1UINT ubits, /* unaligned char bits */
@@ -460,7 +460,7 @@ int encodeExpandBuffer (OOCTXT* pctxt, ASN1UINT nbytes)
pctxt->buffer.data = (ASN1OCTET*) memHeapRealloc
(&pctxt->pMsgMemHeap, pctxt->buffer.data, pctxt->buffer.size);
if (!pctxt->buffer.data) return (ASN_E_NOMEM);
return (ASN_OK);
@@ -481,7 +481,7 @@ ASN1OCTET* encodeGetMsgPtr (OOCTXT* pctxt, int* pLength)
return pctxt->buffer.data;
}
int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
{
ASN1UINT mask;
int nshifts = 0, stat;
@@ -508,9 +508,9 @@ int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
}
int encodeLength (OOCTXT* pctxt, ASN1UINT value)
{
{
ASN1BOOL extendable;
Asn1SizeCnst* pSize =
Asn1SizeCnst* pSize =
checkSize (pctxt->pSizeConstraint, value, &extendable);
ASN1UINT lower = (pSize) ? pSize->lower : 0;
ASN1UINT upper = (pSize) ? pSize->upper : ASN1UINT_MAX;
@@ -520,7 +520,7 @@ int encodeLength (OOCTXT* pctxt, ASN1UINT value)
/* within the range of any of them, signal constraint violation */
/* error.. */
if (pctxt->pSizeConstraint && !pSize)
if (pctxt->pSizeConstraint && !pSize)
return LOG_ASN1ERR (pctxt, ASN_E_CONSVIO);
/* Reset the size constraint in the context block structure */
@@ -578,11 +578,11 @@ int encodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
if (0 == pvalue) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
if (numids < 2) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
if (pvalue->subid[0] > 2) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
if (pvalue->subid[0] != 2 && pvalue->subid[1] > 39)
if (pvalue->subid[0] != 2 && pvalue->subid[1] > 39)
return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
/* Passed checks, encode object identifier */
/* Munge first two sub ID's and encode */
temp = ((pvalue->subid[0] * 40) + pvalue->subid[1]);
@@ -600,7 +600,7 @@ int encodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
}
int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
{
{
int lshift = pctxt->buffer.bitOffset;
int rshift = 8 - pctxt->buffer.bitOffset;
int stat = ASN_OK;
@@ -640,14 +640,14 @@ int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
/* possibly some bits in the following octet.. */
else {
pctxt->buffer.data[pctxt->buffer.byteIndex] |=
pctxt->buffer.data[pctxt->buffer.byteIndex] |=
(ASN1OCTET)(value >> rshift);
pctxt->buffer.bitOffset -= nbits;
if (pctxt->buffer.bitOffset < 0) {
pctxt->buffer.byteIndex++;
pctxt->buffer.data[pctxt->buffer.byteIndex] =
pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)(value << lshift);
pctxt->buffer.bitOffset += 8;
}
@@ -657,7 +657,7 @@ int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
}
int encodeOctets (OOCTXT* pctxt, const ASN1OCTET* pvalue, ASN1UINT nbits)
{
{
int i = 0, stat;
int numFullOcts = nbits / 8;
@@ -675,7 +675,7 @@ int encodeOctets (OOCTXT* pctxt, const ASN1OCTET* pvalue, ASN1UINT nbits)
/* encode buffer.. */
if (pctxt->buffer.bitOffset == 8) {
memcpy (&pctxt->buffer.data[pctxt->buffer.byteIndex], pvalue,
memcpy (&pctxt->buffer.data[pctxt->buffer.byteIndex], pvalue,
numFullOcts);
pctxt->buffer.byteIndex += numFullOcts;
pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
@@ -714,7 +714,7 @@ int encodeOctetString (OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data)
if (enclen > 0) {
ASN1BOOL doAlign;
stat = bitAndOctetStringAlignmentTest
stat = bitAndOctetStringAlignmentTest
(pSizeList, numocts, FALSE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -793,7 +793,7 @@ int encodeOpenTypeExt (OOCTXT* pctxt, DList* pElemList)
stat = encodeByteAlign (pctxt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
stat = encodeOpenType
stat = encodeOpenType
(pctxt, pOpenType->numocts, pOpenType->data);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -833,7 +833,7 @@ int encodeSemiConsInteger (OOCTXT* pctxt, ASN1INT value, ASN1INT lower)
if (lower > ASN1INT_MIN)
value -= lower;
/* Calculate signed number value length */
for ( ; shift > 0; shift -= 8) {
@@ -889,10 +889,10 @@ int encodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower)
if ((stat = encodeLength (pctxt, nbytes)) < 0) {
return stat;
}
if ((stat = encodeByteAlign (pctxt)) != ASN_OK)
return stat;
/* Encode additional zero byte if necessary */
if (nbytes > sizeof(value)) {
@@ -908,7 +908,7 @@ int encodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower)
}
int encodeSmallNonNegWholeNumber (OOCTXT* pctxt, ASN1UINT value)
{
{
int stat;
if (value < 64) {
@@ -964,7 +964,7 @@ int encodeVarWidthCharString (OOCTXT* pctxt, const char* value)
return ASN_OK;
}
static int encode16BitConstrainedString
static int encode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet)
{
ASN1UINT i, pos;
@@ -985,7 +985,7 @@ static int encode16BitConstrainedString
for (i = 0; i < value.nchars; i++) {
if (pCharSet->charSet.data == 0) {
stat = encodeBits
stat = encodeBits
(pctxt, value.data[i] - pCharSet->firstChar, nbits);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
@@ -1007,7 +1007,7 @@ int encode2sCompBinInt (OOCTXT* pctxt, ASN1INT value)
{
/* 10.4.6 A minimum octet 2's-complement-binary-integer encoding */
/* of the whole number has a field width that is a multiple of 8 */
/* bits and also satisfies the condition that the leading 9 bits */
/* bits and also satisifies the condition that the leading 9 bits */
/* field shall not be all zeros and shall not be all ones. */
/* first encode integer value into a local buffer */
@@ -1048,10 +1048,10 @@ static int encodeNonNegBinInt (OOCTXT* pctxt, ASN1UINT value)
/* 10.3.6 A minimum octet non-negative binary integer encoding of */
/* the whole number (which does not predetermine the number of */
/* octets to be used for the encoding) has a field which is a */
/* multiple of 8 bits and also satisfies the condition that the */
/* multiple of 8 bits and also satisifies the condition that the */
/* leading eight bits of the field shall not be zero unless the */
/* field is precisely 8 bits long. */
ASN1UINT bitcnt = (value == 0) ? 1 : getUIntBitCount (value);
/* round-up to nearest 8-bit boundary */
@@ -1093,7 +1093,7 @@ static int encodeUnconsLength (OOCTXT* pctxt, ASN1UINT value)
return enclen;
}
static int getIdentByteCount (ASN1UINT ident)
static int getIdentByteCount (ASN1UINT ident)
{
if (ident < (1u << 7)) { /* 7 */
return 1;

View File

@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
* Any redistributions of this file including modified versions must
* Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -18,7 +18,6 @@
#include "asterisk.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
#include <stdlib.h>
#include "ooasn1.h"
@@ -49,21 +48,21 @@ static const char* g_status_text[] = {
"Value constraint violation: field %s, value %s",
"Value range error: lower bound is greater than upper",
"Unexpected end of file detected",
"Invalid UTF-8 character at index %d",
"List error: concurrent modification attempt while iterating",
"Invalid UTF-8 character at index %d",
"List error: concurrent modification attempt while iterating",
"List error: illegal state for attempted operation",
"Array index out of bounds",
"Invalid parameter passed to function or method",
"Invalid time string format",
"Context is not initialized",
"ASN.1 value will not fit in target variable",
"Character is not within the defined character set",
"Invalid XML state for attempted operation",
"Error condition returned from XML parser:\n%s",
"Context is not initialized",
"ASN.1 value will not fit in target variable",
"Character is not within the defined character set",
"Invalid XML state for attempted operation",
"Error condition returned from XML parser:\n%s",
"SEQUENCE elements not in correct order",
"Invalid index for table constraint identifier",
"Invalid value for relational table constraint fixed type field",
"File not found",
"Invalid value for relational table constraint fixed type field",
"File not found",
"File read error",
"File write error",
"Invalid Base64 string",
@@ -90,7 +89,7 @@ int errAddStrParm (ASN1ErrInfo* pErrInfo, const char* errprm_p)
#if defined(_NO_THREADS) || !defined(_NO_MALLOC)
if (pErrInfo->parmcnt < ASN_K_MAXERRP) {
/* char* tmpstr = (char*) ASN1CRTMALLOC0 (strlen(errprm_p)+1); */
char* tmpstr = ast_malloc(strlen(errprm_p) + 1);
char* tmpstr = (char*) malloc (strlen(errprm_p)+1);
strcpy (tmpstr, errprm_p);
pErrInfo->parms[pErrInfo->parmcnt] = tmpstr;
pErrInfo->parmcnt++;
@@ -119,7 +118,7 @@ void errFreeParms (ASN1ErrInfo* pErrInfo)
for (i = 0; i < pErrInfo->parmcnt; i++)
/* ASN1CRTFREE0 ((char*)pErrInfo->parms[i]); */
ast_free((char*)pErrInfo->parms[i]);
free ((char*)pErrInfo->parms[i]);
#endif
pErrInfo->parmcnt = 0;
@@ -153,7 +152,7 @@ char* errFmtMsg (ASN1ErrInfo* pErrInfo, char* bufp)
j = pcnt = 0;
tp = g_status_text[i];
while (*tp)
while (*tp)
{
if (*tp == '%' && *(tp+1) == 's')
{
@@ -177,14 +176,14 @@ char* errFmtMsg (ASN1ErrInfo* pErrInfo, char* bufp)
}
else
strcpy (bufp, "unrecognized completion status");
}
}
else strcpy (bufp, "normal completion status");
return (bufp);
}
/* Get error text in a dynamic memory buffer. This allocates memory */
/* using the 'memAlloc' function. This memory is automatically freed */
/* using the 'memAlloc' function. This memory is automatically freed */
/* at the time the 'memFree' function is called. */
char* errGetText (OOCTXT* pctxt)
@@ -199,7 +198,7 @@ char* errGetText (OOCTXT* pctxt)
while (pctxt->errInfo.stkx > 0) {
pctxt->errInfo.stkx--;
sprintf (lbuf, " Module: %s, Line %d\n",
sprintf (lbuf, " Module: %s, Line %d\n",
pctxt->errInfo.stack[pctxt->errInfo.stkx].module,
pctxt->errInfo.stack[pctxt->errInfo.stkx].lineno);
strcat(pBuf, lbuf);
@@ -220,7 +219,7 @@ void errPrint (ASN1ErrInfo* pErrInfo)
printf ("Stack trace:");
while (pErrInfo->stkx > 0) {
pErrInfo->stkx--;
printf (" Module: %s, Line %d\n",
printf (" Module: %s, Line %d\n",
pErrInfo->stack[pErrInfo->stkx].module,
pErrInfo->stack[pErrInfo->stkx].lineno);
}
@@ -244,9 +243,9 @@ int errCopyData (ASN1ErrInfo* pSrcErrInfo, ASN1ErrInfo* pDestErrInfo)
for (i = 0; i < pSrcErrInfo->stkx; i++) {
if (pDestErrInfo->stkx < ASN_K_MAXERRSTK) {
pDestErrInfo->stack[pDestErrInfo->stkx].module =
pDestErrInfo->stack[pDestErrInfo->stkx].module =
pSrcErrInfo->stack[i].module;
pDestErrInfo->stack[pDestErrInfo->stkx++].lineno =
pDestErrInfo->stack[pDestErrInfo->stkx++].lineno =
pSrcErrInfo->stack[i].lineno;
}
}
@@ -255,12 +254,12 @@ int errCopyData (ASN1ErrInfo* pSrcErrInfo, ASN1ErrInfo* pDestErrInfo)
}
int errSetData (ASN1ErrInfo* pErrInfo, int status,
const char* module, int lno)
{
int errSetData (ASN1ErrInfo* pErrInfo, int status,
const char* module, int lno)
{
if (pErrInfo->status == 0) {
pErrInfo->status = status;
}
ooLogAsn1Error(status, module, lno);
return status;
return status;
}

View File

@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
* Any redistributions of this file including modified versions must
* Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -64,7 +64,7 @@ void invokeUIntValue (OOCTXT* pctxt, ASN1UINT value)
}
}
void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
@@ -72,7 +72,7 @@ void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
}
}
void invokeOctStrValue (OOCTXT* pctxt, ASN1UINT numocts,
void invokeOctStrValue (OOCTXT* pctxt, ASN1UINT numocts,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
@@ -87,7 +87,7 @@ void invokeCharStrValue (OOCTXT* pctxt, const char* value)
}
}
void invokeCharStr16BitValue (OOCTXT* pctxt, ASN1UINT nchars,
void invokeCharStr16BitValue (OOCTXT* pctxt, ASN1UINT nchars,
ASN116BITCHAR* data)
{
if (0 != pctxt->pEventHandler) {
@@ -116,7 +116,7 @@ void invokeEnumValue (OOCTXT* pctxt, ASN1UINT value)
}
}
void invokeOpenTypeValue (OOCTXT* pctxt, ASN1UINT numocts,
void invokeOpenTypeValue (OOCTXT* pctxt, ASN1UINT numocts,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {

View File

@@ -1,21 +1,21 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
* Any redistributions of this file including modified versions must
* Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
* @file eventHandler.h
* C event handler structure. This structure holds event handler function
* @file eventHandler.h
* C event handler structure. This structure holds event handler function
* callbacks for use by the generated code.
*/
/**
@@ -44,12 +44,12 @@ extern "C" {
/**
* This is a function pointer for a callback function which is invoked
* from within a decode function when an element of a SEQUENCE, SET,
* This is a function pointer for a callback function which is invoked
* from within a decode function when an element of a SEQUENCE, SET,
* SEQUENCE OF, SET OF, or CHOICE construct is parsed.
*
* @param name For SEQUENCE, SET, or CHOICE, this is the name of the
* element as defined in the ASN.1 definition. For
* element as defined in the ASN.1 defination. For
* SEQUENCE OF or SET OF, this is set to the name
* "element".
* @param index For SEQUENCE, SET, or CHOICE, this is not used and is
@@ -63,12 +63,12 @@ typedef void (*StartElement) (const char* name, int index) ;
/**
* This is a function pointer for a callback function which is invoked from
* within a decode function when parsing is complete on an element of a
* This is a function pointer for a callback function which is invoked from
* within a decode function when parsing is complete on an element of a
* SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE construct.
*
* @param name For SEQUENCE, SET, or CHOICE, this is the name of the
* element as defined in the ASN.1 definition. For
* element as defined in the ASN.1 defination. For
* SEQUENCE OF or SET OF, this is set to the name
* "element".
* @param index For SEQUENCE, SET, or CHOICE, this is not used and is
@@ -82,7 +82,7 @@ typedef void (*EndElement) (const char* name, int index) ;
/**
* This is a function pointer for a callback function which is invoked from
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the BOOLEAN ASN.1 type is parsed.
*
* @param value Parsed value.
@@ -91,7 +91,7 @@ typedef void (*EndElement) (const char* name, int index) ;
typedef void (*BoolValue) (ASN1BOOL value);
/**
* This is a function pointer for a callback function which is invoked from
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the INTERGER ASN.1 type is parsed.
*
* @param value Parsed value.
@@ -100,9 +100,9 @@ typedef void (*BoolValue) (ASN1BOOL value);
typedef void (*IntValue) (ASN1INT value);
/**
* This is a function pointer for a callback function which is invoked
* from within a decode function when a value of the INTEGER ASN.1 type
* is parsed. In this case, constraints on the integer value forced the
* This is a function pointer for a callback function which is invoked
* from within a decode function when a value of the INTEGER ASN.1 type
* is parsed. In this case, constraints on the integer value forced the
* use of unsigned integer C type to represent the value.
*
* @param value Parsed value.
@@ -111,19 +111,19 @@ typedef void (*IntValue) (ASN1INT value);
typedef void (*UIntValue) (ASN1UINT value);
/**
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the BIT STRING ASN.1 type is
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the BIT STRING ASN.1 type is
* parsed.
*
* @param numbits - Number of bits in the parsed value.
* @param data - Pointer to a byte array that contains the bit
* @param numbits - Number of bits in the parsed value.
* @param data - Pointer to a byte array that contains the bit
* string data.
* @return - none
*/
*/
typedef void (*BitStrValue) (ASN1UINT numbits, const ASN1OCTET* data);
/**
* This is a function pointer for a callback function which is invoked from
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of one of the OCTET STRING ASN.1 type
* is parsed.
*
@@ -135,8 +135,8 @@ typedef void (*BitStrValue) (ASN1UINT numbits, const ASN1OCTET* data);
typedef void (*OctStrValue) (ASN1UINT numocts, const ASN1OCTET* data) ;
/**
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of one of the 8-bit ASN.1 character
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of one of the 8-bit ASN.1 character
* string types is parsed.
*
* @param value Null terminated character string value.
@@ -145,8 +145,8 @@ typedef void (*OctStrValue) (ASN1UINT numocts, const ASN1OCTET* data) ;
typedef void (*CharStrValue) (const char* value) ;
/**
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of one of the 16-bit ASN.1 character
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of one of the 16-bit ASN.1 character
* string types is parsed.
*
* This is used for the ASN.1 BmpString type.
@@ -160,7 +160,7 @@ typedef void (*CharStrValue) (const char* value) ;
typedef void (*CharStrValue16Bit) (ASN1UINT nchars, ASN116BITCHAR* data) ;
/**
* This is a function pointer for a callback function which is invoked from
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the NULL ASN.1 type is parsed.
*
* @param - none
@@ -169,8 +169,8 @@ typedef void (*CharStrValue16Bit) (ASN1UINT nchars, ASN116BITCHAR* data) ;
typedef void (*NullValue) (void) ;
/**
* This is a function pointer for a callback function which is invoked from
* within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is
* This is a function pointer for a callback function which is invoked from
* within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is
* parsed.
*
* @param numSubIds Number of subidentifiers in the object identifier.
@@ -180,8 +180,8 @@ typedef void (*NullValue) (void) ;
typedef void (*OidValue) (ASN1UINT numSubIds, ASN1UINT* pSubIds) ;
/**
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the ENUMERATED ASN.1 type is
* This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the ENUMERATED ASN.1 type is
* parsed.
*
* @param value - Parsed enumerated value
@@ -190,11 +190,11 @@ typedef void (*OidValue) (ASN1UINT numSubIds, ASN1UINT* pSubIds) ;
typedef void (*EnumValue) (ASN1UINT value) ;
/**
* This is a function pointer for a callback function which is invoked from
* This is a function pointer for a callback function which is invoked from
* within a decode function when an ASN.1 open type is parsed.
*
* @param numocts Number of octets in the parsed value.
* @param data Pointer to byte array contain in tencoded ASN.1
* @param data Pointer to byet array contain in tencoded ASN.1
* value.
* @return - none
*/
@@ -223,7 +223,7 @@ typedef struct EventHandler {
/**
* This function sets the event handler object within the context. It
* This function sets the event handler object within the context. It
* will overwrite the definition of any handler that was set previously.
*
* @param pctxt Context to which event handler has to be added.
@@ -233,8 +233,8 @@ typedef struct EventHandler {
EXTERN void setEventHandler (OOCTXT* pctxt, EventHandler* pHandler);
/**
* This function is called to remove the event handler current defined
* in the context. This is done by setting the event handler object
* This function is called to remove the event handler current defined
* in the context. This is done by setting the event handler object
* pointer to NULL.
*
* @param pctxt Context from which event handler has to be removed.
@@ -243,7 +243,7 @@ EXTERN void setEventHandler (OOCTXT* pctxt, EventHandler* pHandler);
EXTERN void removeEventHandler (OOCTXT* pctxt);
/**
* The following functions are invoked from within the generated
* The following functions are invoked from within the generated
* code to call the various user-defined event handler methods ..
*/
EXTERN void invokeStartElement (OOCTXT* pctxt, const char* name, int index);
@@ -252,33 +252,33 @@ EXTERN void invokeBoolValue (OOCTXT* pctxt, ASN1BOOL value);
EXTERN void invokeIntValue (OOCTXT* pctxt, ASN1INT value);
EXTERN void invokeUIntValue (OOCTXT* pctxt, ASN1UINT value);
EXTERN void invokeBitStrValue
EXTERN void invokeBitStrValue
(OOCTXT* pctxt, ASN1UINT numbits, const ASN1OCTET* data);
EXTERN void invokeOctStrValue
EXTERN void invokeOctStrValue
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
EXTERN void invokeCharStrValue (OOCTXT* pctxt, const char* value);
EXTERN void invokeCharStr16BitValue
EXTERN void invokeCharStr16BitValue
(OOCTXT* pctxt, ASN1UINT nchars, ASN116BITCHAR* data);
EXTERN void invokeNullValue (OOCTXT* pctxt);
EXTERN void invokeOidValue
EXTERN void invokeOidValue
(OOCTXT* pctxt, ASN1UINT numSubIds, ASN1UINT* pSubIds);
EXTERN void invokeEnumValue (OOCTXT* pctxt, ASN1UINT value);
EXTERN void invokeOpenTypeValue
EXTERN void invokeOpenTypeValue
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
/**
* @}
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif
#endif

View File

@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* This software is furnished under an open source license and may be
* used and copied only in accordance with the terms of this license.
* The text of the license may generally be found in the root
* directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
* Any redistributions of this file including modified versions must
* Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/

Some files were not shown because too many files have changed in this diff Show More