[-]
[+]
|
Changed |
asterisk.changes
|
|
[-]
[+]
|
Changed |
asterisk.spec
^
|
|
[-]
[+]
|
Deleted |
asterisk-1.8.19.0.tar.xz/asterisk-1.8.19.0-summary.html
^
|
@@ -1,273 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-1.8.19.0</title></head>
-<body>
-<h1 align="center"><a name="top">Release Summary</a></h1>
-<h3 align="center">asterisk-1.8.19.0</h3>
-<h3 align="center">Date: 2012-12-09</h3>
-<h3 align="center"><asteriskteam@digium.com></h3>
-<hr/>
-<h2 align="center">Table of Contents</h2>
-<ol>
- <li><a href="#summary">Summary</a></li>
- <li><a href="#contributors">Contributors</a></li>
- <li><a href="#issues">Closed Issues</a></li>
- <li><a href="#commits">Other Changes</a></li>
- <li><a href="#diffstat">Diffstat</a></li>
-</ol>
-<hr/>
-<a name="summary"><h2 align="center">Summary</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
-<p>The data in this summary reflects changes that have been made since the previous release, asterisk-1.8.18.0.</p>
-<hr/>
-<a name="contributors"><h2 align="center">Contributors</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
-<table width="100%" border="0">
-<tr>
-<td width="33%"><h3>Coders</h3></td>
-<td width="33%"><h3>Testers</h3></td>
-<td width="33%"><h3>Reporters</h3></td>
-</tr>
-<tr valign="top">
-<td>
-6 bebuild<br/>
-6 rmudgett<br/>
-5 mjordan<br/>
-4 jrose<br/>
-2 JoshE<br/>
-2 mmichelson<br/>
-2 Richard Miller<br/>
-2 sruffell<br/>
-2 tzafrir<br/>
-2 wdoekes<br/>
-1 Bryan Walters<br/>
-1 Corey Farrell<br/>
-1 Daniel O'Connor<br/>
-1 David Chappell<br/>
-1 elguero<br/>
-1 Guenther Kelleter<br/>
-1 jbigelow<br/>
-1 kmoore<br/>
-1 lathama<br/>
-1 twilson<br/>
-</td>
-<td>
-1 Dmitry Burilov<br/>
-1 rmudgett<br/>
-1 Thomas Arimont<br/>
-</td>
-<td>
-2 tomaso<br/>
-2 ulogic<br/>
-1 chappell<br/>
-1 coreyfarrell<br/>
-1 daren<br/>
-1 darius<br/>
-1 gamegamer43<br/>
-1 gkelleter<br/>
-1 jbigelow<br/>
-1 kmoore<br/>
-1 n8ideas<br/>
-1 netaskd<br/>
-1 pciccone<br/>
-1 sruffell<br/>
-1 stocksy<br/>
-1 tblancher<br/>
-1 tzafrir<br/>
-</td>
-</tr>
-</table>
-<hr/>
-<a name="issues"><h2 align="center">Closed Issues</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p>
-<h3>Category: Applications/app_queue</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20623">ASTERISK-20623</a>: App_queue doesn't increment number of busy agent in certain situations<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375450">375450</a><br/>
-Reporter: gamegamer43<br/>
-Coders: Bryan Walters<br/>
-<br/>
-<h3>Category: Channels/chan_sip/General</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-18203">ASTERISK-18203</a>: Problems with NAT on realtime peers (and maybe static ones)<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375415">375415</a><br/>
-Reporter: daren<br/>
-Coders: JoshE<br/>
-<br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20572">ASTERISK-20572</a>: Realtime Peers behind NAT are Set to RFC1918 private address after sip reload<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375415">375415</a><br/>
-Reporter: n8ideas<br/>
-Coders: JoshE<br/>
-<br/>
-<h3>Category: Channels/chan_sip/TCP-TLS</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20212">ASTERISK-20212</a>: Deadlock / TCP SIP Stack<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=374905">374905</a><br/>
-Reporter: pciccone<br/>
-Coders: mmichelson<br/>
-<br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20559">ASTERISK-20559</a>: SIP TCP/TLS: When checking the CA certificate fails, the call still goes through<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375146">375146</a><br/>
-Reporter: kmoore<br/>
-Coders: kmoore<br/>
-<br/>
-<h3>Category: Codecs/codec_gsm</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20457">ASTERISK-20457</a>: GSM encoding is not thread safe<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375272">375272</a><br/>
-Reporter: ulogic<br/>
-Coders: Richard Miller<br/>
-<br/>
-<h3>Category: Contrib/General</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20260">ASTERISK-20260</a>: Increase robustness of ast_tls_cert<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375325">375325</a><br/>
-Reporter: darius<br/>
-Coders: Daniel O'Connor<br/>
-<br/>
-<h3>Category: Core/BuildSystem</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20483">ASTERISK-20483</a>: Allow Asterisk to report git SHAs in version string.<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375189">375189</a><br/>
-Reporter: sruffell<br/>
-Coders: sruffell<br/>
-<br/>
-<h3>Category: Core/ManagerInterface</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20646">ASTERISK-20646</a>: [patch] - manager_shutdown fails to completely shutdown AMI and leaks memory<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375793">375793</a><br/>
-Reporter: coreyfarrell<br/>
-Coders: Corey Farrell<br/>
-<br/>
-<h3>Category: Core/PBX</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20455">ASTERISK-20455</a>: dialplan fails to run the invalid "i" extension due to an uninitialized variable dat_exten in main/pbx.c<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=374758">374758</a><br/>
-Reporter: ulogic<br/>
-Coders: Richard Miller<br/>
-<br/>
-<h3>Category: Documentation</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-14435">ASTERISK-14435</a>: [patch] Add option and description to chan_dahdi.conf.sample<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=374727">374727</a><br/>
-Reporter: jbigelow<br/>
-Coders: jbigelow, sruffell<br/>
-<br/>
-<h3>Category: Features/Parking</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-19382">ASTERISK-19382</a>: Park() ignores 'r' option, plays default MOH instead.<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375388">375388</a><br/>
-Reporter: stocksy<br/>
-Coders: rmudgett<br/>
-<br/>
-<h3>Category: General</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20567">ASTERISK-20567</a>: bashism in autosupport<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375059">375059</a><br/>
-Reporter: tzafrir<br/>
-Coders: tzafrir<br/>
-<br/>
-<h3>Category: PBX/pbx_realtime</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-18203">ASTERISK-18203</a>: Problems with NAT on realtime peers (and maybe static ones)<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375415">375415</a><br/>
-Reporter: daren<br/>
-Coders: JoshE<br/>
-<br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20572">ASTERISK-20572</a>: Realtime Peers behind NAT are Set to RFC1918 private address after sip reload<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375415">375415</a><br/>
-Reporter: n8ideas<br/>
-Coders: JoshE<br/>
-<br/>
-<h3>Category: PBX/pbx_spool</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17231">ASTERISK-17231</a>: [patch] unopenable spool files not deleted<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=374686">374686</a><br/>
-Reporter: chappell<br/>
-Coders: David Chappell<br/>
-<br/>
-<h3>Category: Resources/res_calendar_ews</h3><br/>
-<a href="https://issues.asterisk.org/jira/browse/ASTERISK-19738">ASTERISK-19738</a>: Calendar EWS does not attempt to extract the Body element in a CalendarItem and populate the description event field<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375528">375528</a><br/>
-Reporter: netaskd<br/>
-Testers: Dmitry Burilov<br/>
-Coders: twilson<br/>
-<br/>
-<hr/>
-<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
-<table width="100%" border="1">
-<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=374977">374977</a></td><td>tzafrir</td><td>Update config.guess and config.sub: 2012-10-10</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375025">375025</a></td><td>mmichelson</td><td>Fix some potential misuses of ast_str in the code.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375074">375074</a></td><td>wdoekes</td><td>Update sip_request_call SIP dial string documentation.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375111">375111</a></td><td>wdoekes</td><td>Fixes to the fd-oriented SIP TCP reads.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375216">375216</a></td><td>jrose</td><td>app_queue: Make ordering of rrmemory/rrordered persist over add/remove members</td>
-<td><a href="https://issues.asterisk.org/jira/browse/AST-989">AST-989</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375242">375242</a></td><td>jrose</td><td>app_queue: add upgrade notes for 375216</td>
-<td><a href="https://issues.asterisk.org/jira/browse/AST-989">AST-989</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375244">375244</a></td><td>jrose</td><td>Correct version number in Upgrade.txt release notes pertaining to queue order</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375484">375484</a></td><td>jrose</td><td>mixmonitor: Add a test event</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375594">375594</a></td><td>elguero</td><td>Fix Wrong Result In Debug Message For SDP Origin Processing</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375625">375625</a></td><td>rmudgett</td><td>Multiple revisions 375519-375524</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375658">375658</a></td><td>rmudgett</td><td>Things don't need to be that const.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375698">375698</a></td><td>lathama</td><td>Doxygen Updates</td>
-<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-20259">ASTERISK-20259</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375727">375727</a></td><td>mjordan</td><td>Prevent multiple CDR batches from conflicting when scheduling the CDR write</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375758">375758</a></td><td>mjordan</td><td>Fix memory leak when unloading XML documentation</td>
-<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-20648">ASTERISK-20648</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375800">375800</a></td><td>mjordan</td><td>Don't attempt to purge sessions when no sessions exist</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375862">375862</a></td><td>rmudgett</td><td>Add safety NULL pointer check in module user references.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=375893">375893</a></td><td>mjordan</td><td>Refactor ast_timer_ack to return an error and handle the error in timer users</td>
-<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-20032">ASTERISK-20032</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=377290">377290</a></td><td>bebuild</td><td>Create 1.8.19.0-rc2</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=377294">377294</a></td><td>bebuild</td><td>Merge 377257 for 1.8.19.0-rc2</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=377298">377298</a></td><td>bebuild</td><td>Importing release summary for 1.8.19.0-rc2 release.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=377315">377315</a></td><td>bebuild</td><td>Create 1.8.19.0-rc3</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=377321">377321</a></td><td>bebuild</td><td>Merge r376868 for 1.8.19.0-rc3</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=377325">377325</a></td><td>bebuild</td><td>Importing release summary for 1.8.19.0-rc3 release.</td>
-<td></td></tr></table>
-<hr/>
-<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
-<pre>
-.version | 2
-ChangeLog | 11
-Makefile | 2
-README | 2
-UPGRADE.txt | 4
-apps/app_dial.c | 12
-apps/app_mixmonitor.c | 8
-apps/app_queue.c | 157 +++++
-asterisk-1.8.19.0-rc1-summary.html | 257 ---------
-asterisk-1.8.19.0-rc1-summary.txt | 337 ------------
-asterisk-1.8.19.0-rc2-summary.html | 58 --
-asterisk-1.8.19.0-rc2-summary.txt | 86 ---
-asterisk-1.8.19.0-rc3-summary.html | 65 ++
-asterisk-1.8.19.0-rc3-summary.txt | 98 +++
-bridges/bridge_softmix.c | 8
-build_tools/make_version | 106 +++
-channels/chan_dahdi.c | 17
-channels/chan_iax2.c | 35 -
-channels/chan_local.c | 21
-channels/chan_misdn.c | 2
-channels/chan_sip.c | 985 ++++++++++++++++++++++++++++++++-----
-channels/misdn/isdn_lib.c | 218 +++-----
-channels/misdn/isdn_lib.h | 3
-codecs/gsm/src/code.c | 3
-config.guess | 279 +++++-----
-config.sub | 236 ++++++--
-configs/chan_dahdi.conf.sample | 27 +
-configure.ac | 1
-contrib/scripts/ast_tls_cert | 41 +
-contrib/scripts/autosupport | 12
-include/asterisk/doxyref.h | 71 +-
-include/asterisk/strings.h | 22
-include/asterisk/tcptls.h | 6
-include/asterisk/timing.h | 9
-main/app.c | 1
-main/ccss.c | 20
-main/cdr.c | 12
-main/channel.c | 16
-main/features.c | 13
-main/loader.c | 12
-main/manager.c | 57 +-
-main/pbx.c | 3
-main/tcptls.c | 26
-main/timing.c | 16
-main/xmldoc.c | 1
-makeopts.in | 1
-pbx/pbx_spool.c | 284 +++++-----
-res/res_calendar_ews.c | 18
-res/res_fax_spandsp.c | 7
-res/res_musiconhold.c | 5
-res/res_timing_dahdi.c | 6
-res/res_timing_kqueue.c | 11
-res/res_timing_pthread.c | 32 -
-res/res_timing_timerfd.c | 45 +
-54 files changed, 2300 insertions(+), 1487 deletions(-)
-</pre><br/>
-<hr/>
-</body>
-</html>
|
[-]
[+]
|
Deleted |
asterisk-1.8.19.0.tar.xz/asterisk-1.8.19.0-summary.txt
^
|
@@ -1,363 +0,0 @@
- Release Summary
-
- asterisk-1.8.19.0
-
- Date: 2012-12-09
-
- <asteriskteam@digium.com>
-
- ----------------------------------------------------------------------
-
- Table of Contents
-
- 1. Summary
- 2. Contributors
- 3. Closed Issues
- 4. Other Changes
- 5. Diffstat
-
- ----------------------------------------------------------------------
-
- Summary
-
- [Back to Top]
-
- This release includes only bug fixes. The changes included were made only
- to address problems that have been identified in this release series.
- Users should be able to safely upgrade to this version if this release
- series is already in use. Users considering upgrading from a previous
- release series are strongly encouraged to review the UPGRADE.txt document
- as well as the CHANGES document for information about upgrading to this
- release series.
-
- The data in this summary reflects changes that have been made since the
- previous release, asterisk-1.8.18.0.
-
- ----------------------------------------------------------------------
-
- Contributors
-
- [Back to Top]
-
- This table lists the people who have submitted code, those that have
- tested patches, as well as those that reported issues on the issue tracker
- that were resolved in this release. For coders, the number is how many of
- their patches (of any size) were committed into this release. For testers,
- the number is the number of times their name was listed as assisting with
- testing a patch. Finally, for reporters, the number is the number of
- issues that they reported that were closed by commits that went into this
- release.
-
- Coders Testers Reporters
- 6 bebuild 1 Dmitry Burilov 2 tomaso
- 6 rmudgett 1 rmudgett 2 ulogic
- 5 mjordan 1 Thomas Arimont 1 chappell
- 4 jrose 1 coreyfarrell
- 2 JoshE 1 daren
- 2 mmichelson 1 darius
- 2 Richard Miller 1 gamegamer43
- 2 sruffell 1 gkelleter
- 2 tzafrir 1 jbigelow
- 2 wdoekes 1 kmoore
- 1 Bryan Walters 1 n8ideas
- 1 Corey Farrell 1 netaskd
- 1 Daniel O'Connor 1 pciccone
- 1 David Chappell 1 sruffell
- 1 elguero 1 stocksy
- 1 Guenther Kelleter 1 tblancher
- 1 jbigelow 1 tzafrir
- 1 kmoore
- 1 lathama
- 1 twilson
-
- ----------------------------------------------------------------------
-
- Closed Issues
-
- [Back to Top]
-
- This is a list of all issues from the issue tracker that were closed by
- changes that went into this release.
-
- Category: Applications/app_queue
-
- ASTERISK-20623: App_queue doesn't increment number of busy agent in
- certain situations
- Revision: 375450
- Reporter: gamegamer43
- Coders: Bryan Walters
-
- Category: Channels/chan_sip/General
-
- ASTERISK-18203: Problems with NAT on realtime peers (and maybe static
- ones)
- Revision: 375415
- Reporter: daren
- Coders: JoshE
-
- ASTERISK-20572: Realtime Peers behind NAT are Set to RFC1918 private
- address after sip reload
- Revision: 375415
- Reporter: n8ideas
- Coders: JoshE
-
- Category: Channels/chan_sip/TCP-TLS
-
- ASTERISK-20212: Deadlock / TCP SIP Stack
- Revision: 374905
- Reporter: pciccone
- Coders: mmichelson
-
- ASTERISK-20559: SIP TCP/TLS: When checking the CA certificate fails, the
- call still goes through
- Revision: 375146
- Reporter: kmoore
- Coders: kmoore
-
- Category: Codecs/codec_gsm
-
- ASTERISK-20457: GSM encoding is not thread safe
- Revision: 375272
- Reporter: ulogic
- Coders: Richard Miller
-
- Category: Contrib/General
-
- ASTERISK-20260: Increase robustness of ast_tls_cert
- Revision: 375325
- Reporter: darius
- Coders: Daniel O'Connor
-
- Category: Core/BuildSystem
-
- ASTERISK-20483: Allow Asterisk to report git SHAs in version string.
- Revision: 375189
- Reporter: sruffell
- Coders: sruffell
-
- Category: Core/ManagerInterface
-
- ASTERISK-20646: [patch] - manager_shutdown fails to completely shutdown
- AMI and leaks memory
- Revision: 375793
- Reporter: coreyfarrell
- Coders: Corey Farrell
-
- Category: Core/PBX
-
- ASTERISK-20455: dialplan fails to run the invalid "i" extension due to an
- uninitialized variable dat_exten in main/pbx.c
- Revision: 374758
- Reporter: ulogic
- Coders: Richard Miller
-
- Category: Documentation
-
- ASTERISK-14435: [patch] Add option and description to
- chan_dahdi.conf.sample
- Revision: 374727
- Reporter: jbigelow
- Coders: jbigelow, sruffell
-
- Category: Features/Parking
-
- ASTERISK-19382: Park() ignores 'r' option, plays default MOH instead.
- Revision: 375388
- Reporter: stocksy
- Coders: rmudgett
-
- Category: General
-
- ASTERISK-20567: bashism in autosupport
- Revision: 375059
- Reporter: tzafrir
- Coders: tzafrir
-
- Category: PBX/pbx_realtime
-
- ASTERISK-18203: Problems with NAT on realtime peers (and maybe static
- ones)
- Revision: 375415
- Reporter: daren
- Coders: JoshE
-
- ASTERISK-20572: Realtime Peers behind NAT are Set to RFC1918 private
- address after sip reload
- Revision: 375415
- Reporter: n8ideas
- Coders: JoshE
-
- Category: PBX/pbx_spool
-
- ASTERISK-17231: [patch] unopenable spool files not deleted
- Revision: 374686
- Reporter: chappell
- Coders: David Chappell
-
- Category: Resources/res_calendar_ews
-
- ASTERISK-19738: Calendar EWS does not attempt to extract the Body element
- in a CalendarItem and populate the description event field
- Revision: 375528
- Reporter: netaskd
- Testers: Dmitry Burilov
- Coders: twilson
-
- ----------------------------------------------------------------------
-
- Commits Not Associated with an Issue
-
- [Back to Top]
-
- This is a list of all changes that went into this release that did not
- directly close an issue from the issue tracker. The commits may have been
- marked as being related to an issue. If that is the case, the issue
- numbers are listed here, as well.
-
- +------------------------------------------------------------------------+
- | Revision | Author | Summary | Issues Referenced |
- |----------+------------+----------------------------+-------------------|
- | 374977 | tzafrir | Update config.guess and | |
- | | | config.sub: 2012-10-10 | |
- |----------+------------+----------------------------+-------------------|
- | 375025 | mmichelson | Fix some potential misuses | |
- | | | of ast_str in the code. | |
- |----------+------------+----------------------------+-------------------|
- | | | Update sip_request_call | |
- | 375074 | wdoekes | SIP dial string | |
- | | | documentation. | |
- |----------+------------+----------------------------+-------------------|
- | 375111 | wdoekes | Fixes to the fd-oriented | |
- | | | SIP TCP reads. | |
- |----------+------------+----------------------------+-------------------|
- | | | app_queue: Make ordering | |
- | 375216 | jrose | of rrmemory/rrordered | AST-989 |
- | | | persist over add/remove | |
- | | | members | |
- |----------+------------+----------------------------+-------------------|
- | 375242 | jrose | app_queue: add upgrade | AST-989 |
- | | | notes for 375216 | |
- |----------+------------+----------------------------+-------------------|
- | | | Correct version number in | |
- | 375244 | jrose | Upgrade.txt release notes | |
- | | | pertaining to queue order | |
- |----------+------------+----------------------------+-------------------|
- | 375484 | jrose | mixmonitor: Add a test | |
- | | | event | |
- |----------+------------+----------------------------+-------------------|
- | | | Fix Wrong Result In Debug | |
- | 375594 | elguero | Message For SDP Origin | |
- | | | Processing | |
- |----------+------------+----------------------------+-------------------|
- | 375625 | rmudgett | Multiple revisions | |
- | | | 375519-375524 | |
- |----------+------------+----------------------------+-------------------|
- | 375658 | rmudgett | Things don't need to be | |
- | | | that const. | |
- |----------+------------+----------------------------+-------------------|
- | 375698 | lathama | Doxygen Updates | ASTERISK-20259 |
- |----------+------------+----------------------------+-------------------|
- | | | Prevent multiple CDR | |
- | 375727 | mjordan | batches from conflicting | |
- | | | when scheduling the CDR | |
- | | | write | |
- |----------+------------+----------------------------+-------------------|
- | | | Fix memory leak when | |
- | 375758 | mjordan | unloading XML | ASTERISK-20648 |
- | | | documentation | |
- |----------+------------+----------------------------+-------------------|
- | | | Don't attempt to purge | |
- | 375800 | mjordan | sessions when no sessions | |
- | | | exist | |
- |----------+------------+----------------------------+-------------------|
- | | | Add safety NULL pointer | |
- | 375862 | rmudgett | check in module user | |
- | | | references. | |
- |----------+------------+----------------------------+-------------------|
- | | | Refactor ast_timer_ack to | |
- | 375893 | mjordan | return an error and handle | ASTERISK-20032 |
- | | | the error in timer users | |
- |----------+------------+----------------------------+-------------------|
- | 377290 | bebuild | Create 1.8.19.0-rc2 | |
- |----------+------------+----------------------------+-------------------|
- | 377294 | bebuild | Merge 377257 for | |
- | | | 1.8.19.0-rc2 | |
- |----------+------------+----------------------------+-------------------|
- | 377298 | bebuild | Importing release summary | |
- | | | for 1.8.19.0-rc2 release. | |
- |----------+------------+----------------------------+-------------------|
- | 377315 | bebuild | Create 1.8.19.0-rc3 | |
- |----------+------------+----------------------------+-------------------|
- | 377321 | bebuild | Merge r376868 for | |
- | | | 1.8.19.0-rc3 | |
- |----------+------------+----------------------------+-------------------|
- | 377325 | bebuild | Importing release summary | |
- | | | for 1.8.19.0-rc3 release. | |
- +------------------------------------------------------------------------+
-
- ----------------------------------------------------------------------
-
- Diffstat Results
-
- [Back to Top]
-
- This is a summary of the changes to the source code that went into this
- release that was generated using the diffstat utility.
-
- .version | 2
- ChangeLog | 11
- Makefile | 2
- README | 2
- UPGRADE.txt | 4
- apps/app_dial.c | 12
- apps/app_mixmonitor.c | 8
- apps/app_queue.c | 157 +++++
- asterisk-1.8.19.0-rc1-summary.html | 257 ---------
- asterisk-1.8.19.0-rc1-summary.txt | 337 ------------
- asterisk-1.8.19.0-rc2-summary.html | 58 --
- asterisk-1.8.19.0-rc2-summary.txt | 86 ---
- asterisk-1.8.19.0-rc3-summary.html | 65 ++
- asterisk-1.8.19.0-rc3-summary.txt | 98 +++
- bridges/bridge_softmix.c | 8
- build_tools/make_version | 106 +++
- channels/chan_dahdi.c | 17
- channels/chan_iax2.c | 35 -
- channels/chan_local.c | 21
- channels/chan_misdn.c | 2
- channels/chan_sip.c | 985 ++++++++++++++++++++++++++++++++-----
- channels/misdn/isdn_lib.c | 218 +++-----
- channels/misdn/isdn_lib.h | 3
- codecs/gsm/src/code.c | 3
- config.guess | 279 +++++-----
- config.sub | 236 ++++++--
- configs/chan_dahdi.conf.sample | 27 +
- configure.ac | 1
- contrib/scripts/ast_tls_cert | 41 +
- contrib/scripts/autosupport | 12
- include/asterisk/doxyref.h | 71 +-
- include/asterisk/strings.h | 22
- include/asterisk/tcptls.h | 6
- include/asterisk/timing.h | 9
- main/app.c | 1
- main/ccss.c | 20
- main/cdr.c | 12
- main/channel.c | 16
- main/features.c | 13
- main/loader.c | 12
- main/manager.c | 57 +-
- main/pbx.c | 3
- main/tcptls.c | 26
- main/timing.c | 16
- main/xmldoc.c | 1
- makeopts.in | 1
- pbx/pbx_spool.c | 284 +++++-----
- res/res_calendar_ews.c | 18
- res/res_fax_spandsp.c | 7
- res/res_musiconhold.c | 5
- res/res_timing_dahdi.c | 6
- res/res_timing_kqueue.c | 11
- res/res_timing_pthread.c | 32 -
- res/res_timing_timerfd.c | 45 +
- 54 files changed, 2300 insertions(+), 1487 deletions(-)
-
- ----------------------------------------------------------------------
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/.version
^
|
@@ -1 +1 @@
-1.8.19.0
+1.8.19.1
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/ChangeLog
^
|
@@ -1,3 +1,46 @@
+2013-01-02 Asterisk Development Team <asteriskteam@digium.com>
+
+ * Asterisk 1.8.19.1 Released.
+
+ * AST-2012-015: 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.
+
+ * AST-2012-014: 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.
+
2012-12-10 Asterisk Development Team <asteriskteam@digium.com>
* Asterisk 1.8.19.0 Released.
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/apps/app_confbridge.c
^
|
@@ -32,7 +32,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 364786 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include <stdio.h>
#include <stdlib.h>
@@ -486,7 +486,7 @@
/* Set the device state for this conference */
if (conference_bridge->users == 1) {
- ast_devstate_changed(AST_DEVICE_INUSE, "confbridge:%s", conference_bridge->name);
+ ast_devstate_changed(AST_DEVICE_INUSE, AST_DEVSTATE_CACHABLE, "confbridge:%s", conference_bridge->name);
}
/* If the caller is a marked user or is waiting for a marked user to enter pass 'em off, otherwise pass them off to do regular joining stuff */
@@ -568,7 +568,7 @@
}
} else {
/* Set device state to "not in use" */
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "confbridge:%s", conference_bridge->name);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "confbridge:%s", conference_bridge->name);
ao2_unlink(conference_bridges, conference_bridge);
}
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/apps/app_meetme.c
^
|
@@ -36,7 +36,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 373815 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include <dahdi/user.h>
@@ -2576,7 +2576,7 @@
/* This device changed state now - if this is the first user */
if (conf->users == 1)
- ast_devstate_changed(AST_DEVICE_INUSE, "meetme:%s", conf->confno);
+ ast_devstate_changed(AST_DEVICE_INUSE, (conf->isdynamic ? AST_DEVSTATE_NOT_CACHABLE : AST_DEVSTATE_CACHABLE), "meetme:%s", conf->confno);
ast_mutex_unlock(&conf->playlock);
@@ -3879,7 +3879,7 @@
/* Change any states */
if (!conf->users) {
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "meetme:%s", conf->confno);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, (conf->isdynamic ? AST_DEVSTATE_NOT_CACHABLE : AST_DEVSTATE_CACHABLE), "meetme:%s", conf->confno);
}
/* Return the number of seconds the user was in the conf */
@@ -5298,8 +5298,8 @@
|| trunk_ref == exclude)
continue;
trunk_ref->state = state;
- ast_devstate_changed(sla_state_to_devstate(state),
- "SLA:%s_%s", station->name, trunk->name);
+ ast_devstate_changed(sla_state_to_devstate(state), AST_DEVSTATE_CACHABLE,
+ "SLA:%s_%s", station->name, trunk->name);
break;
}
}
@@ -5797,8 +5797,8 @@
{
ast_atomic_fetchadd_int((int *) &event->trunk_ref->trunk->hold_stations, 1);
event->trunk_ref->state = SLA_TRUNK_STATE_ONHOLD_BYME;
- ast_devstate_changed(AST_DEVICE_ONHOLD, "SLA:%s_%s",
- event->station->name, event->trunk_ref->trunk->name);
+ ast_devstate_changed(AST_DEVICE_ONHOLD, AST_DEVSTATE_CACHABLE, "SLA:%s_%s",
+ event->station->name, event->trunk_ref->trunk->name);
sla_change_trunk_state(event->trunk_ref->trunk, SLA_TRUNK_STATE_ONHOLD,
INACTIVE_TRUNK_REFS, event->trunk_ref);
@@ -6307,8 +6307,8 @@
sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_UP, ALL_TRUNK_REFS, NULL);
else {
trunk_ref->state = SLA_TRUNK_STATE_UP;
- ast_devstate_changed(AST_DEVICE_INUSE,
- "SLA:%s_%s", station->name, trunk_ref->trunk->name);
+ ast_devstate_changed(AST_DEVICE_INUSE, AST_DEVSTATE_CACHABLE,
+ "SLA:%s_%s", station->name, trunk_ref->trunk->name);
}
} else if (trunk_ref->state == SLA_TRUNK_STATE_RINGING) {
struct sla_ringing_trunk *ringing_trunk;
|
[-]
[+]
|
Added |
asterisk-1.8.19.1.tar.xz/asterisk-1.8.19.1-summary.html
^
|
@@ -0,0 +1,80 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-1.8.19.1</title></head>
+<body>
+<h1 align="center"><a name="top">Release Summary</a></h1>
+<h3 align="center">asterisk-1.8.19.1</h3>
+<h3 align="center">Date: 2013-01-02</h3>
+<h3 align="center"><asteriskteam@digium.com></h3>
+<hr/>
+<h2 align="center">Table of Contents</h2>
+<ol>
+ <li><a href="#summary">Summary</a></li>
+ <li><a href="#contributors">Contributors</a></li>
+ <li><a href="#commits">Other Changes</a></li>
+ <li><a href="#diffstat">Diffstat</a></li>
+</ol>
+<hr/>
+<a name="summary"><h2 align="center">Summary</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This release has been made to address one or more security vulnerabilities that have been identified. A security advisory document has been published for each vulnerability that includes additional information. Users of versions of Asterisk that are affected are strongly encouraged to review the advisories and determine what action they should take to protect their systems from these issues.</p>
+<p>Security Advisories: <a href="http://downloads.asterisk.org/pub/security/AST-2012-014.html">AST-2012-014</a>, <a href="http://downloads.asterisk.org/pub/security/AST-2012-015.html">AST-2012-015</a></p>
+<p>The data in this summary reflects changes that have been made since the previous release, asterisk-1.8.19.0.</p>
+<hr/>
+<a name="contributors"><h2 align="center">Contributors</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
+<table width="100%" border="0">
+<tr>
+<td width="33%"><h3>Coders</h3></td>
+<td width="33%"><h3>Testers</h3></td>
+<td width="33%"><h3>Reporters</h3></td>
+</tr>
+<tr valign="top">
+<td>
+2 bebuild<br/>
+</td>
+<td>
+</td>
+<td>
+</td>
+</tr>
+</table>
+<hr/>
+<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
+<table width="100%" border="1">
+<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/tags/1.8.19.1?view=revision&revision=378336">378336</a></td><td>bebuild</td><td>Create 1.8.19.1</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/tags/1.8.19.1?view=revision&revision=378341">378341</a></td><td>bebuild</td><td>Merge 378269, 378303 for 1.8.19.1</td>
+<td></td></tr></table>
+<hr/>
+<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
+<pre>
+.version | 2
+ChangeLog | 43 ++++
+apps/app_confbridge.c | 4
+apps/app_meetme.c | 16 -
+asterisk-1.8.19.0-summary.html | 273 ------------------------------
+asterisk-1.8.19.0-summary.txt | 363 -----------------------------------------
+channels/chan_agent.c | 12 -
+channels/chan_dahdi.c | 7
+channels/chan_iax2.c | 31 ++-
+channels/chan_local.c | 3
+channels/chan_sip.c | 76 +++++---
+channels/chan_skinny.c | 16 -
+channels/sip/include/sip.h | 1
+funcs/func_devstate.c | 6
+include/asterisk/channel.h | 6
+include/asterisk/devicestate.h | 16 +
+include/asterisk/event_defs.h | 8
+main/channel.c | 5
+main/devicestate.c | 51 +++--
+main/event.c | 1
+main/features.c | 2
+main/http.c | 20 +-
+res/res_calendar.c | 8
+res/res_jabber.c | 66 +++++--
+24 files changed, 281 insertions(+), 755 deletions(-)
+</pre><br/>
+<hr/>
+</body>
+</html>
|
[-]
[+]
|
Added |
asterisk-1.8.19.1.tar.xz/asterisk-1.8.19.1-summary.txt
^
|
@@ -0,0 +1,109 @@
+ Release Summary
+
+ asterisk-1.8.19.1
+
+ Date: 2013-01-02
+
+ <asteriskteam@digium.com>
+
+ ----------------------------------------------------------------------
+
+ Table of Contents
+
+ 1. Summary
+ 2. Contributors
+ 3. Other Changes
+ 4. Diffstat
+
+ ----------------------------------------------------------------------
+
+ Summary
+
+ [Back to Top]
+
+ This release has been made to address one or more security vulnerabilities
+ that have been identified. A security advisory document has been published
+ for each vulnerability that includes additional information. Users of
+ versions of Asterisk that are affected are strongly encouraged to review
+ the advisories and determine what action they should take to protect their
+ systems from these issues.
+
+ Security Advisories: AST-2012-014, AST-2012-015
+
+ The data in this summary reflects changes that have been made since the
+ previous release, asterisk-1.8.19.0.
+
+ ----------------------------------------------------------------------
+
+ Contributors
+
+ [Back to Top]
+
+ This table lists the people who have submitted code, those that have
+ tested patches, as well as those that reported issues on the issue tracker
+ that were resolved in this release. For coders, the number is how many of
+ their patches (of any size) were committed into this release. For testers,
+ the number is the number of times their name was listed as assisting with
+ testing a patch. Finally, for reporters, the number is the number of
+ issues that they reported that were closed by commits that went into this
+ release.
+
+ Coders Testers Reporters
+ 2 bebuild
+
+ ----------------------------------------------------------------------
+
+ Commits Not Associated with an Issue
+
+ [Back to Top]
+
+ This is a list of all changes that went into this release that did not
+ directly close an issue from the issue tracker. The commits may have been
+ marked as being related to an issue. If that is the case, the issue
+ numbers are listed here, as well.
+
+ +------------------------------------------------------------------------+
+ | Revision | Author | Summary | Issues Referenced |
+ |----------+---------+-------------------------------+-------------------|
+ | 378336 | bebuild | Create 1.8.19.1 | |
+ |----------+---------+-------------------------------+-------------------|
+ | 378341 | bebuild | Merge 378269, 378303 for | |
+ | | | 1.8.19.1 | |
+ +------------------------------------------------------------------------+
+
+ ----------------------------------------------------------------------
+
+ Diffstat Results
+
+ [Back to Top]
+
+ This is a summary of the changes to the source code that went into this
+ release that was generated using the diffstat utility.
+
+ .version | 2
+ ChangeLog | 43 ++++
+ apps/app_confbridge.c | 4
+ apps/app_meetme.c | 16 -
+ asterisk-1.8.19.0-summary.html | 273 ------------------------------
+ asterisk-1.8.19.0-summary.txt | 363 -----------------------------------------
+ channels/chan_agent.c | 12 -
+ channels/chan_dahdi.c | 7
+ channels/chan_iax2.c | 31 ++-
+ channels/chan_local.c | 3
+ channels/chan_sip.c | 76 +++++---
+ channels/chan_skinny.c | 16 -
+ channels/sip/include/sip.h | 1
+ funcs/func_devstate.c | 6
+ include/asterisk/channel.h | 6
+ include/asterisk/devicestate.h | 16 +
+ include/asterisk/event_defs.h | 8
+ main/channel.c | 5
+ main/devicestate.c | 51 +++--
+ main/event.c | 1
+ main/features.c | 2
+ main/http.c | 20 +-
+ res/res_calendar.c | 8
+ res/res_jabber.c | 66 +++++--
+ 24 files changed, 281 insertions(+), 755 deletions(-)
+
+ ----------------------------------------------------------------------
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/channels/chan_agent.c
^
|
@@ -38,7 +38,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 373768 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include <sys/socket.h>
#include <fcntl.h>
@@ -618,7 +618,7 @@
if (p->chan) {
p->chan->_bridge = NULL;
p->chan = NULL;
- ast_devstate_changed(AST_DEVICE_UNAVAILABLE, "Agent/%s", p->agent);
+ ast_devstate_changed(AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, "Agent/%s", p->agent);
p->acknowledged = 0;
}
} else {
@@ -875,7 +875,7 @@
} else {
/* Agent hung-up */
p->chan = NULL;
- ast_devstate_changed(AST_DEVICE_UNAVAILABLE, "Agent/%s", p->agent);
+ ast_devstate_changed(AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, "Agent/%s", p->agent);
}
if (!res) {
@@ -994,7 +994,7 @@
if (!p->loginstart) {
p->logincallerid[0] = '\0';
} else {
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Agent/%s", p->agent);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "Agent/%s", p->agent);
}
if (p->abouttograb) {
@@ -2134,7 +2134,7 @@
}
ast_mutex_unlock(&p->lock);
AST_LIST_UNLOCK(&agents);
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Agent/%s", p->agent);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "Agent/%s", p->agent);
while (res >= 0) {
ast_mutex_lock(&p->lock);
if (p->deferlogoff && p->chan) {
@@ -2155,7 +2155,7 @@
if (ast_tvdiff_ms(ast_tvnow(), p->lastdisc) > 0) {
ast_debug(1, "Wrapup time for %s expired!\n", p->agent);
p->lastdisc = ast_tv(0, 0);
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Agent/%s", p->agent);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "Agent/%s", p->agent);
if (p->ackcall) {
check_beep(p, 0);
} else {
@@ -2215,7 +2215,7 @@
ast_queue_log("NONE", chan->uniqueid, agent, "AGENTLOGOFF", "%s|%ld", chan->name, logintime);
ast_verb(2, "Agent '%s' logged out\n", p->agent);
/* If there is no owner, go ahead and kill it now */
- ast_devstate_changed(AST_DEVICE_UNAVAILABLE, "Agent/%s", p->agent);
+ ast_devstate_changed(AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, "Agent/%s", p->agent);
if (p->dead && !p->owner) {
ast_mutex_destroy(&p->lock);
ast_cond_destroy(&p->app_complete_cond);
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/channels/chan_dahdi.c
^
|
@@ -49,7 +49,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 375361 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#if defined(__NetBSD__) || defined(__FreeBSD__)
#include <pthread.h>
@@ -3364,7 +3364,7 @@
}
if (pri->congestion_devstate != new_state) {
pri->congestion_devstate = new_state;
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "DAHDI/I%d/congestion", pri->span);
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_NOT_CACHABLE, "DAHDI/I%d/congestion", pri->span);
}
#if defined(THRESHOLD_DEVSTATE_PLACEHOLDER)
/* Update the span threshold device state and report any change. */
@@ -3380,7 +3380,7 @@
}
if (pri->threshold_devstate != new_state) {
pri->threshold_devstate = new_state;
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "DAHDI/I%d/threshold", pri->span);
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_NOT_CACHABLE, "DAHDI/I%d/threshold", pri->span);
}
#endif /* defined(THRESHOLD_DEVSTATE_PLACEHOLDER) */
}
@@ -9801,7 +9801,8 @@
if (dashptr) {
*dashptr = '\0';
}
- ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, device_name);
+ tmp->flags |= AST_FLAG_DISABLE_DEVSTATE_CACHE;
+ ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, AST_DEVSTATE_NOT_CACHABLE, device_name);
for (v = i->vars ; v ; v = v->next)
pbx_builtin_setvar_helper(tmp, v->name, v->value);
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/channels/chan_iax2.c
^
|
@@ -38,7 +38,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 375893 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include <sys/mman.h>
#include <dirent.h>
@@ -5724,7 +5724,7 @@
}
/*! \brief Create new call, interface with the PBX core */
-static struct ast_channel *ast_iax2_new(int callno, int state, format_t capability, const char *linkedid)
+static struct ast_channel *ast_iax2_new(int callno, int state, format_t capability, const char *linkedid, unsigned int cachable)
{
struct ast_channel *tmp;
struct chan_iax2_pvt *i;
@@ -5793,6 +5793,10 @@
i->owner = tmp;
i->capability = capability;
+ if (!cachable) {
+ tmp->flags |= AST_FLAG_DISABLE_DEVSTATE_CACHE;
+ }
+
/* Set inherited variables */
if (i->vars) {
for (v = i->vars ; v ; v = v->next)
@@ -8079,7 +8083,7 @@
/* if challenge has been sent, but no challenge response if given, reject. */
goto return_unref;
}
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "IAX2/%s", p->name); /* Activate notification */
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "IAX2/%s", p->name); /* Activate notification */
/* either Authentication has taken place, or a REGAUTH must be sent before verifying registration */
res = 0;
@@ -8633,7 +8637,7 @@
if (!ast_test_flag64(peer, IAX_TEMPONLY))
ast_db_del("IAX/Registry", peer->name);
register_peer_exten(peer, 0);
- ast_devstate_changed(AST_DEVICE_UNAVAILABLE, "IAX2/%s", peer->name); /* Activate notification */
+ ast_devstate_changed(AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, "IAX2/%s", peer->name); /* Activate notification */
if (iax2_regfunk)
iax2_regfunk(peer->name, 0);
@@ -8688,7 +8692,7 @@
}
}
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "IAX2/%s", p->name); /* Activate notification */
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "IAX2/%s", p->name); /* Activate notification */
p->expire = iax2_sched_add(sched, (p->expiry + 10) * 1000, expire_registry, peer_ref(p));
if (p->expire == -1) {
@@ -8765,14 +8769,14 @@
ast_test_flag(&iaxs[callno]->state, IAX_STATE_AUTHENTICATED) ? "AUTHENTICATED" : "UNAUTHENTICATED", ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Registered\r\n", p->name);
register_peer_exten(p, 1);
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "IAX2/%s", p->name); /* Activate notification */
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "IAX2/%s", p->name); /* Activate notification */
} else if (!ast_test_flag64(p, IAX_TEMPONLY)) {
ast_verb(3, "Unregistered IAX2 '%s' (%s)\n", p->name,
ast_test_flag(&iaxs[callno]->state, IAX_STATE_AUTHENTICATED) ? "AUTHENTICATED" : "UNAUTHENTICATED");
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Unregistered\r\n", p->name);
register_peer_exten(p, 0);
ast_db_del("IAX/Registry", p->name);
- ast_devstate_changed(AST_DEVICE_UNAVAILABLE, "IAX2/%s", p->name); /* Activate notification */
+ ast_devstate_changed(AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, "IAX2/%s", p->name); /* Activate notification */
}
/* Update the host */
/* Verify that the host is really there */
@@ -10286,7 +10290,8 @@
(f.frametype == AST_FRAME_IAX)) {
if (ast_test_flag64(iaxs[fr->callno], IAX_DELAYPBXSTART)) {
ast_clear_flag64(iaxs[fr->callno], IAX_DELAYPBXSTART);
- if (!ast_iax2_new(fr->callno, AST_STATE_RING, iaxs[fr->callno]->chosenformat, NULL)) {
+ if (!ast_iax2_new(fr->callno, AST_STATE_RING, iaxs[fr->callno]->chosenformat, NULL,
+ ast_test_flag(&iaxs[fr->callno]->state, IAX_STATE_AUTHENTICATED))) {
ast_variables_destroy(ies.vars);
ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
@@ -10919,13 +10924,13 @@
if (iaxs[fr->callno]->pingtime <= peer->maxms) {
ast_log(LOG_NOTICE, "Peer '%s' is now REACHABLE! Time: %d\n", peer->name, iaxs[fr->callno]->pingtime);
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Reachable\r\nTime: %d\r\n", peer->name, iaxs[fr->callno]->pingtime);
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "IAX2/%s", peer->name); /* Activate notification */
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "IAX2/%s", peer->name); /* Activate notification */
}
} else if ((peer->historicms > 0) && (peer->historicms <= peer->maxms)) {
if (iaxs[fr->callno]->pingtime > peer->maxms) {
ast_log(LOG_NOTICE, "Peer '%s' is now TOO LAGGED (%d ms)!\n", peer->name, iaxs[fr->callno]->pingtime);
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Lagged\r\nTime: %d\r\n", peer->name, iaxs[fr->callno]->pingtime);
- ast_devstate_changed(AST_DEVICE_UNAVAILABLE, "IAX2/%s", peer->name); /* Activate notification */
+ ast_devstate_changed(AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, "IAX2/%s", peer->name); /* Activate notification */
}
}
peer->lastms = iaxs[fr->callno]->pingtime;
@@ -11167,7 +11172,7 @@
using_prefs);
ast_set_flag(&iaxs[fr->callno]->state, IAX_STATE_STARTED);
- if (!(c = ast_iax2_new(fr->callno, AST_STATE_RING, format, NULL)))
+ if (!(c = ast_iax2_new(fr->callno, AST_STATE_RING, format, NULL, 1)))
iax2_destroy(fr->callno);
else if (ies.vars) {
struct ast_datastore *variablestore;
@@ -11238,7 +11243,7 @@
ast_getformatname_multiple(tmp, sizeof(tmp), iaxs[fr->callno]->peerformat));
ast_set_flag(&iaxs[fr->callno]->state, IAX_STATE_STARTED);
send_command(iaxs[fr->callno], AST_FRAME_CONTROL, AST_CONTROL_PROGRESS, 0, NULL, 0, -1);
- if (!(c = ast_iax2_new(fr->callno, AST_STATE_RING, iaxs[fr->callno]->peerformat, NULL)))
+ if (!(c = ast_iax2_new(fr->callno, AST_STATE_RING, iaxs[fr->callno]->peerformat, NULL, 1)))
iax2_destroy(fr->callno);
else if (ies.vars) {
struct ast_datastore *variablestore;
@@ -11991,7 +11996,7 @@
if (peer->lastms > -1) {
ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE! Time: %d\n", peer->name, peer->lastms);
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name, peer->lastms);
- ast_devstate_changed(AST_DEVICE_UNAVAILABLE, "IAX2/%s", peer->name); /* Activate notification */
+ ast_devstate_changed(AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, "IAX2/%s", peer->name); /* Activate notification */
}
if ((callno = peer->callno) > 0) {
ast_mutex_lock(&iaxsl[callno]);
@@ -12159,7 +12164,7 @@
if (cai.found)
ast_string_field_set(iaxs[callno], host, pds.peer);
- c = ast_iax2_new(callno, AST_STATE_DOWN, cai.capability, requestor ? requestor->linkedid : NULL);
+ c = ast_iax2_new(callno, AST_STATE_DOWN, cai.capability, requestor ? requestor->linkedid : NULL, cai.found);
ast_mutex_unlock(&iaxsl[callno]);
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/channels/chan_local.c
^
|
@@ -31,7 +31,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 377321 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include <fcntl.h>
#include <sys/signal.h>
@@ -1215,6 +1215,9 @@
tmp->tech_pvt = p;
tmp2->tech_pvt = p;
+ tmp->flags |= AST_FLAG_DISABLE_DEVSTATE_CACHE;
+ tmp2->flags |= AST_FLAG_DISABLE_DEVSTATE_CACHE;
+
p->owner = tmp;
p->chan = tmp2;
p->u_owner = ast_module_user_add(p->owner);
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/channels/chan_sip.c
^
|
@@ -209,7 +209,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 377294 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include <signal.h>
#include <sys/signal.h>
@@ -2524,19 +2524,20 @@
int authenticated, time_t start, struct sip_threadinfo *me)
{
int res, content_length, after_poll = 1, need_poll = 1;
+ size_t datalen = ast_str_strlen(req->data);
char buf[1024] = "";
int timeout = -1;
-
- /* Read in headers one line at a time */
- while (ast_str_strlen(req->data) < 4 || strncmp(REQ_OFFSET_TO_STR(req, data->used - 4), "\r\n\r\n", 4)) {
- if (!tcptls_session->client && !authenticated) {
- if ((timeout = sip_check_authtimeout(start)) < 0) {
- ast_debug(2, "SIP SSL server failed to determine authentication timeout\n");
+
+ /* Read in headers one line at a time */
+ while (datalen < 4 || strncmp(REQ_OFFSET_TO_STR(req, data->used - 4), "\r\n\r\n", 4)) {
+ if (!tcptls_session->client && !authenticated) {
+ if ((timeout = sip_check_authtimeout(start)) < 0) {
+ ast_debug(2, "SIP TLS server failed to determine authentication timeout\n");
return -1;
}
if (timeout == 0) {
- ast_debug(2, "SIP %s server timed out\n", tcptls_session->ssl ? "SSL": "TCP");
+ ast_debug(2, "SIP TLS server timed out\n");
return -1;
}
} else {
@@ -2551,11 +2552,11 @@
after_poll = 1;
res = ast_wait_for_input(tcptls_session->fd, timeout);
if (res < 0) {
- ast_debug(2, "SIP TCP server :: ast_wait_for_input returned %d\n", res);
+ ast_debug(2, "SIP TLS server :: ast_wait_for_input returned %d\n", res);
return -1;
} else if (res == 0) {
/* timeout */
- ast_debug(2, "SIP TCP server timed out\n");
+ ast_debug(2, "SIP TLS server timed out\n");
return -1;
}
}
@@ -2576,6 +2577,13 @@
return -1;
}
ast_str_append(&req->data, 0, "%s", buf);
+
+ datalen = ast_str_strlen(req->data);
+ if (datalen > SIP_MAX_PACKET_SIZE) {
+ ast_log(LOG_WARNING, "Rejecting TLS packet from '%s' because way too large: %zu\n",
+ ast_sockaddr_stringify(&tcptls_session->remote_address), datalen);
+ return -1;
+ }
}
copy_request(reqcpy, req);
parse_request(reqcpy);
@@ -2589,7 +2597,7 @@
}
if (timeout == 0) {
- ast_debug(2, "SIP SSL server timed out\n");
+ ast_debug(2, "SIP TLS server timed out\n");
return -1;
}
} else {
@@ -2601,11 +2609,11 @@
after_poll = 1;
res = ast_wait_for_input(tcptls_session->fd, timeout);
if (res < 0) {
- ast_debug(2, "SIP TCP server :: ast_wait_for_input returned %d\n", res);
+ ast_debug(2, "SIP TLS server :: ast_wait_for_input returned %d\n", res);
return -1;
} else if (res == 0) {
/* timeout */
- ast_debug(2, "SIP TCP server timed out\n");
+ ast_debug(2, "SIP TLS server timed out\n");
return -1;
}
}
@@ -2628,6 +2636,13 @@
}
content_length -= strlen(buf);
ast_str_append(&req->data, 0, "%s", buf);
+
+ datalen = ast_str_strlen(req->data);
+ if (datalen > SIP_MAX_PACKET_SIZE) {
+ ast_log(LOG_WARNING, "Rejecting TLS packet from '%s' because way too large: %zu\n",
+ ast_sockaddr_stringify(&tcptls_session->remote_address), datalen);
+ return -1;
+ }
}
}
/*! \todo XXX If there's no Content-Length or if the content-length and what
@@ -2801,6 +2816,8 @@
enum message_integrity message_integrity = MESSAGE_FRAGMENT;
while (message_integrity == MESSAGE_FRAGMENT) {
+ size_t datalen;
+
if (ast_str_strlen(tcptls_session->overflow_buf) == 0) {
char readbuf[4097];
int timeout;
@@ -2840,6 +2857,13 @@
ast_str_append(&req->data, 0, "%s", ast_str_buffer(tcptls_session->overflow_buf));
ast_str_reset(tcptls_session->overflow_buf);
}
+
+ datalen = ast_str_strlen(req->data);
+ if (datalen > SIP_MAX_PACKET_SIZE) {
+ ast_log(LOG_WARNING, "Rejecting TCP packet from '%s' because way too large: %zu\n",
+ ast_sockaddr_stringify(&tcptls_session->remote_address), datalen);
+ return -1;
+ }
message_integrity = check_message_integrity(&req->data, &tcptls_session->overflow_buf);
}
@@ -2911,7 +2935,7 @@
}
me->threadid = pthread_self();
- ast_debug(2, "Starting thread for %s server\n", tcptls_session->ssl ? "SSL" : "TCP");
+ ast_debug(2, "Starting thread for %s server\n", tcptls_session->ssl ? "TLS" : "TCP");
/* set up pollfd to watch for reads on both the socket and the alert_pipe */
fds[0].fd = tcptls_session->fd;
@@ -2945,7 +2969,7 @@
}
if (timeout == 0) {
- ast_debug(2, "SIP %s server timed out\n", tcptls_session->ssl ? "SSL": "TCP");
+ ast_debug(2, "SIP %s server timed out\n", tcptls_session->ssl ? "TLS": "TCP");
goto cleanup;
}
} else {
@@ -2955,11 +2979,11 @@
if (ast_str_strlen(tcptls_session->overflow_buf) == 0) {
res = ast_poll(fds, 2, timeout); /* polls for both socket and alert_pipe */
if (res < 0) {
- ast_debug(2, "SIP %s server :: ast_wait_for_input returned %d\n", tcptls_session->ssl ? "SSL": "TCP", res);
+ ast_debug(2, "SIP %s server :: ast_wait_for_input returned %d\n", tcptls_session->ssl ? "TLS": "TCP", res);
goto cleanup;
} else if (res == 0) {
/* timeout */
- ast_debug(2, "SIP %s server timed out\n", tcptls_session->ssl ? "SSL": "TCP");
+ ast_debug(2, "SIP %s server timed out\n", tcptls_session->ssl ? "TLS": "TCP");
goto cleanup;
}
}
@@ -3041,7 +3065,7 @@
}
}
- ast_debug(2, "Shutting down thread for %s server\n", tcptls_session->ssl ? "SSL" : "TCP");
+ ast_debug(2, "Shutting down thread for %s server\n", tcptls_session->ssl ? "TLS" : "TCP");
cleanup:
if (tcptls_session && !tcptls_session->client && !authenticated) {
@@ -6366,7 +6390,7 @@
}
if (p) {
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", p->name);
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "SIP/%s", p->name);
unref_peer(p, "update_call_counter: unref_peer from call counter");
}
return 0;
@@ -7557,6 +7581,9 @@
if (i->rtp)
ast_jb_configure(tmp, &global_jbconf);
+ if (!i->relatedpeer) {
+ tmp->flags |= AST_FLAG_DISABLE_DEVSTATE_CACHE;
+ }
/* Set channel variables for this call from configuration */
for (v = i->chanvars ; v ; v = v->next) {
char valuebuf[1024];
@@ -14140,7 +14167,7 @@
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Unregistered\r\nCause: Expired\r\n", peer->name);
register_peer_exten(peer, FALSE); /* Remove regexten */
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", peer->name);
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "SIP/%s", peer->name);
/* Do we need to release this peer from memory?
Only for realtime peers and autocreated peers
@@ -14922,8 +14949,9 @@
ast_atomic_fetchadd_int(&p->relatedpeer->onHold, (hold ? +1 : -1));
/* Request device state update */
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", p->relatedpeer->name);
-
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, (p->owner->flags & AST_FLAG_DISABLE_DEVSTATE_CACHE ? AST_DEVSTATE_NOT_CACHABLE : AST_DEVSTATE_CACHABLE),
+ "SIP/%s", p->relatedpeer->name);
+
return;
}
@@ -15341,7 +15369,7 @@
} else {
update_peer_lastmsgssent(peer, -1, 0);
}
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", peer->name);
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "SIP/%s", peer->name);
}
if (res < 0) {
switch (res) {
@@ -21328,7 +21356,7 @@
ast_log(LOG_NOTICE, "Peer '%s' is now %s. (%dms / %dms)\n",
peer->name, s, pingtime, peer->maxms);
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", peer->name);
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "SIP/%s", peer->name);
if (sip_cfg.peer_rtupdate) {
ast_update_realtime(ast_check_realtime("sipregs") ? "sipregs" : "sippeers", "name", peer->name, "lastms", str_lastms, SENTINEL);
}
@@ -26774,7 +26802,7 @@
/* Don't send a devstate change if nothing changed. */
if (peer->lastms > -1) {
peer->lastms = -1;
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", peer->name);
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "SIP/%s", peer->name);
}
/* Try again quickly */
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/channels/chan_skinny.c
^
|
@@ -31,7 +31,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 367843 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include <sys/socket.h>
#include <netinet/in.h>
@@ -1925,7 +1925,7 @@
register_exten(l);
/* initialize MWI on line and device */
mwi_event_cb(0, l);
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Skinny/%s@%s", l->name, d->name);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "Skinny/%s@%s", l->name, d->name);
}
--instance;
}
@@ -1963,7 +1963,7 @@
l->instance = 0;
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: Skinny\r\nPeer: Skinny/%s@%s\r\nPeerStatus: Unregistered\r\n", l->name, d->name);
unregister_exten(l);
- ast_devstate_changed(AST_DEVICE_UNAVAILABLE, "Skinny/%s@%s", l->name, d->name);
+ ast_devstate_changed(AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, "Skinny/%s@%s", l->name, d->name);
}
}
}
@@ -5321,7 +5321,7 @@
ast_verb(1, "RECEIVED UNKNOWN STIMULUS: %d(%d/%d)\n", event, instance, callreference);
break;
}
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "Skinny/%s@%s", l->name, d->name);
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "Skinny/%s@%s", l->name, d->name);
return 1;
}
@@ -5372,7 +5372,7 @@
transmit_ringer_mode(d, SKINNY_RING_OFF);
l->hookstate = SKINNY_OFFHOOK;
- ast_devstate_changed(AST_DEVICE_INUSE, "Skinny/%s@%s", l->name, d->name);
+ ast_devstate_changed(AST_DEVICE_INUSE, AST_DEVSTATE_CACHABLE, "Skinny/%s@%s", l->name, d->name);
if (sub && sub->onhold) {
return 1;
@@ -5448,7 +5448,7 @@
return 0;
}
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Skinny/%s@%s", l->name, d->name);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "Skinny/%s@%s", l->name, d->name);
if (sub->onhold) {
return 0;
@@ -5834,7 +5834,7 @@
return 0;
}
- ast_devstate_changed(AST_DEVICE_INUSE, "Skinny/%s@%s", l->name, d->name);
+ ast_devstate_changed(AST_DEVICE_INUSE, AST_DEVSTATE_CACHABLE, "Skinny/%s@%s", l->name, d->name);
switch(event) {
case SOFTKEY_NONE:
@@ -6049,7 +6049,7 @@
transmit_callstate(d, l->instance, sub->callid, l->hookstate);
}
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Skinny/%s@%s", l->name, d->name);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "Skinny/%s@%s", l->name, d->name);
if (skinnydebug)
ast_verb(1, "Skinny %s@%s went on hook\n", l->name, d->name);
if (l->transfer && sub->xferor && sub->owner->_state >= AST_STATE_RING) {
@@ -6073,7 +6073,7 @@
}
}
if ((l->hookstate == SKINNY_ONHOOK) && (AST_LIST_NEXT(sub, list) && !AST_LIST_NEXT(sub, list)->rtp)) {
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Skinny/%s@%s", l->name, d->name);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "Skinny/%s@%s", l->name, d->name);
}
}
break;
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/channels/sip/include/sip.h
^
|
@@ -96,6 +96,7 @@
#define SIP_MAX_HEADERS 64 /*!< Max amount of SIP headers to read */
#define SIP_MAX_LINES 256 /*!< Max amount of lines in SIP attachment (like SDP) */
+#define SIP_MAX_PACKET_SIZE 20480 /*!< Max SIP packet size */
#define SIP_MIN_PACKET 4096 /*!< Initialize size of memory to allocate for packets */
#define MAX_HISTORY_ENTRIES 50 /*!< Max entires in the history list for a sip_pvt */
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/funcs/func_devstate.c
^
|
@@ -36,7 +36,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 366094 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include "asterisk/module.h"
#include "asterisk/channel.h"
@@ -132,7 +132,7 @@
ast_db_put(astdb_family, data, value);
- ast_devstate_changed(state_val, "Custom:%s", data);
+ ast_devstate_changed(state_val, AST_DEVSTATE_CACHABLE, "Custom:%s", data);
return 0;
}
@@ -295,7 +295,7 @@
ast_db_put(astdb_family, dev, state);
- ast_devstate_changed(state_val, "Custom:%s", dev);
+ ast_devstate_changed(state_val, AST_DEVSTATE_CACHABLE, "Custom:%s", dev);
return CLI_SUCCESS;
}
@@ -341,7 +341,7 @@
if (dev_name <= (const char *) 1)
continue;
ast_devstate_changed(ast_devstate_val(db_entry->data),
- "Custom:%s\n", dev_name);
+ AST_DEVSTATE_CACHABLE, "Custom:%s\n", dev_name);
}
ast_db_freetree(db_tree);
db_tree = NULL;
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/include/asterisk/channel.h
^
|
@@ -936,6 +936,12 @@
* some non-traditional dialplans (like AGI) to continue to function.
*/
AST_FLAG_DISABLE_WORKAROUNDS = (1 << 20),
+ /*! Disable device state event caching. This allows allows channel
+ * drivers to selectively prevent device state events from being cached
+ * by certain channels such as anonymous calls which have no persistent
+ * represenatation that can be tracked.
+ */
+ AST_FLAG_DISABLE_DEVSTATE_CACHE = (1 << 21),
};
/*! \brief ast_bridge_config flags */
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/include/asterisk/devicestate.h
^
|
@@ -61,6 +61,14 @@
AST_DEVICE_TOTAL, /*/ Total num of device states, used for testing */
};
+/*! \brief Device State Cachability
+ * \note This is used to define the cachability of a device state when set.
+ */
+enum ast_devstate_cache {
+ AST_DEVSTATE_NOT_CACHABLE, /*!< This device state is not cachable */
+ AST_DEVSTATE_CACHABLE, /*!< This device state is cachable */
+};
+
/*! \brief Devicestate provider call back */
typedef enum ast_device_state (*ast_devstate_prov_cb_type)(const char *data);
@@ -129,6 +137,7 @@
* \brief Tells Asterisk the State for Device is changed
*
* \param state the new state of the device
+ * \param cachable whether this device state is cachable
* \param fmt device name like a dial string with format parameters
*
* The new state of the device will be sent off to any subscribers
@@ -138,13 +147,14 @@
* \retval 0 on success
* \retval -1 on failure
*/
-int ast_devstate_changed(enum ast_device_state state, const char *fmt, ...)
- __attribute__((format(printf, 2, 3)));
+int ast_devstate_changed(enum ast_device_state state, enum ast_devstate_cache cachable, const char *fmt, ...)
+ __attribute__((format(printf, 3, 4)));
/*!
* \brief Tells Asterisk the State for Device is changed
*
* \param state the new state of the device
+ * \param cachable whether this device state is cachable
* \param device device name like a dial string with format parameters
*
* The new state of the device will be sent off to any subscribers
@@ -154,7 +164,7 @@
* \retval 0 on success
* \retval -1 on failure
*/
-int ast_devstate_changed_literal(enum ast_device_state state, const char *device);
+int ast_devstate_changed_literal(enum ast_device_state state, enum ast_devstate_cache cachable, const char *device);
/*!
* \brief Tells Asterisk the State for Device is changed.
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/include/asterisk/event_defs.h
^
|
@@ -283,8 +283,14 @@
AST_EVENT_IE_CHALLENGE = 0x0032,
AST_EVENT_IE_RESPONSE = 0x0033,
AST_EVENT_IE_EXPECTED_RESPONSE = 0x0034,
+ /*!
+ * \brief Event non-cachability flag
+ * Used by: All events
+ * Payload type: UINT
+ */
+ AST_EVENT_IE_CACHABLE = 0x0035,
/*! \brief Must be the last IE value +1 */
- AST_EVENT_IE_TOTAL = 0x0035,
+ AST_EVENT_IE_TOTAL = 0x0036,
};
/*!
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/main/channel.c
^
|
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 375893 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include "asterisk/_private.h"
@@ -295,6 +295,7 @@
ast_data_add_bool(tree, "BRIDGE_HANGUP_RUN", ast_test_flag(chan, AST_FLAG_BRIDGE_HANGUP_RUN));
ast_data_add_bool(tree, "BRIDGE_HANGUP_DONT", ast_test_flag(chan, AST_FLAG_BRIDGE_HANGUP_DONT));
ast_data_add_bool(tree, "DISABLE_WORKAROUNDS", ast_test_flag(chan, AST_FLAG_DISABLE_WORKAROUNDS));
+ ast_data_add_bool(tree, "DISABLE_DEVSTATE_CACHE", ast_test_flag(chan, AST_FLAG_DISABLE_DEVSTATE_CACHE));
}
#if defined(KEEP_TILL_CHANNEL_PARTY_NUMBER_INFO_NEEDED)
@@ -2511,7 +2512,7 @@
* instance is dead, we don't know the state of all other possible
* instances.
*/
- ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, device_name);
+ ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, (chan->flags & AST_FLAG_DISABLE_DEVSTATE_CACHE ? AST_DEVSTATE_NOT_CACHABLE : AST_DEVSTATE_CACHABLE), device_name);
}
ast_atomic_fetchadd_int(&chancount, -1);
}
@@ -7013,7 +7014,7 @@
/* We have to pass AST_DEVICE_UNKNOWN here because it is entirely possible that the channel driver
* for this channel is using the callback method for device state. If we pass in an actual state here
* we override what they are saying the state is and things go amuck. */
- ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, name);
+ ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, (chan->flags & AST_FLAG_DISABLE_DEVSTATE_CACHE ? AST_DEVSTATE_NOT_CACHABLE : AST_DEVSTATE_CACHABLE), name);
/* setstate used to conditionally report Newchannel; this is no more */
ast_manager_event(chan, EVENT_FLAG_CALL, "Newstate",
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/main/devicestate.c
^
|
@@ -119,7 +119,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 369001 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include "asterisk/_private.h"
#include "asterisk/channel.h"
@@ -174,6 +174,7 @@
struct state_change {
AST_LIST_ENTRY(state_change) list;
+ enum ast_devstate_cache cachable;
char device[1];
};
@@ -191,6 +192,7 @@
AST_LIST_ENTRY(devstate_change) entry;
uint32_t state;
struct ast_eid eid;
+ enum ast_devstate_cache cachable;
char device[1];
};
@@ -424,7 +426,7 @@
return res;
}
-static void devstate_event(const char *device, enum ast_device_state state)
+static void devstate_event(const char *device, enum ast_device_state state, int cachable)
{
struct ast_event *event;
enum ast_event_type event_type;
@@ -440,18 +442,23 @@
ast_debug(3, "device '%s' state '%d'\n", device, state);
if (!(event = ast_event_new(event_type,
- AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, device,
- AST_EVENT_IE_STATE, AST_EVENT_IE_PLTYPE_UINT, state,
- AST_EVENT_IE_END))) {
+ AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, device,
+ AST_EVENT_IE_STATE, AST_EVENT_IE_PLTYPE_UINT, state,
+ AST_EVENT_IE_CACHABLE, AST_EVENT_IE_PLTYPE_UINT, cachable,
+ AST_EVENT_IE_END))) {
return;
}
- ast_event_queue_and_cache(event);
+ if (cachable) {
+ ast_event_queue_and_cache(event);
+ } else {
+ ast_event_queue(event);
+ }
}
/*! Called by the state change thread to find out what the state is, and then
* to queue up the state change event */
-static void do_state_change(const char *device)
+static void do_state_change(const char *device, int cachable)
{
enum ast_device_state state;
@@ -459,10 +466,10 @@
ast_debug(3, "Changing state for %s - state %d (%s)\n", device, state, ast_devstate2str(state));
- devstate_event(device, state);
+ devstate_event(device, state, cachable);
}
-int ast_devstate_changed_literal(enum ast_device_state state, const char *device)
+int ast_devstate_changed_literal(enum ast_device_state state, enum ast_devstate_cache cachable, const char *device)
{
struct state_change *change;
@@ -483,14 +490,15 @@
*/
if (state != AST_DEVICE_UNKNOWN) {
- devstate_event(device, state);
+ devstate_event(device, state, cachable);
} else if (change_thread == AST_PTHREADT_NULL || !(change = ast_calloc(1, sizeof(*change) + strlen(device)))) {
/* we could not allocate a change struct, or */
/* there is no background thread, so process the change now */
- do_state_change(device);
+ do_state_change(device, cachable);
} else {
/* queue the change */
strcpy(change->device, device);
+ change->cachable = cachable;
AST_LIST_LOCK(&state_changes);
AST_LIST_INSERT_TAIL(&state_changes, change, list);
ast_cond_signal(&change_pending);
@@ -502,10 +510,10 @@
int ast_device_state_changed_literal(const char *dev)
{
- return ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, dev);
+ return ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, dev);
}
-int ast_devstate_changed(enum ast_device_state state, const char *fmt, ...)
+int ast_devstate_changed(enum ast_device_state state, enum ast_devstate_cache cachable, const char *fmt, ...)
{
char buf[AST_MAX_EXTENSION];
va_list ap;
@@ -514,7 +522,7 @@
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
- return ast_devstate_changed_literal(state, buf);
+ return ast_devstate_changed_literal(state, cachable, buf);
}
int ast_device_state_changed(const char *fmt, ...)
@@ -526,7 +534,7 @@
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
- return ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, buf);
+ return ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, buf);
}
/*! \brief Go through the dev state change queue and update changes in the dev state thread */
@@ -546,7 +554,7 @@
/* Process each state change */
while ((current = next)) {
next = AST_LIST_NEXT(current, list);
- do_state_change(current->device);
+ do_state_change(current->device, current->cachable);
ast_free(current);
}
}
@@ -590,7 +598,7 @@
collection->num_states++;
}
-static void process_collection(const char *device, struct change_collection *collection)
+static void process_collection(const char *device, enum ast_devstate_cache cachable, struct change_collection *collection)
{
int i;
struct ast_devstate_aggregate agg;
@@ -641,7 +649,11 @@
return;
}
- ast_event_queue_and_cache(event);
+ if (cachable) {
+ ast_event_queue_and_cache(event);
+ } else {
+ ast_event_queue(event);
+ }
}
static void handle_devstate_change(struct devstate_change *sc)
@@ -667,7 +679,7 @@
/* Populate the collection of device states from the cache */
ast_event_dump_cache(tmp_sub);
- process_collection(sc->device, &collection);
+ process_collection(sc->device, sc->cachable, &collection);
ast_event_sub_destroy(tmp_sub);
}
@@ -696,10 +708,12 @@
const char *device;
const struct ast_eid *eid;
uint32_t state;
+ enum ast_devstate_cache cachable = AST_DEVSTATE_CACHABLE;
device = ast_event_get_ie_str(event, AST_EVENT_IE_DEVICE);
eid = ast_event_get_ie_raw(event, AST_EVENT_IE_EID);
state = ast_event_get_ie_uint(event, AST_EVENT_IE_STATE);
+ cachable = ast_event_get_ie_uint(event, AST_EVENT_IE_CACHABLE);
if (ast_strlen_zero(device) || !eid) {
ast_log(LOG_ERROR, "Invalid device state change event received\n");
@@ -712,6 +726,7 @@
strcpy(sc->device, device);
sc->eid = *eid;
sc->state = state;
+ sc->cachable = cachable;
ast_mutex_lock(&devstate_collector.lock);
AST_LIST_INSERT_TAIL(&devstate_collector.devstate_change_q, sc, entry);
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/main/event.c
^
|
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 374177 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include "asterisk/_private.h"
@@ -268,6 +268,7 @@
[AST_EVENT_IE_CHALLENGE] = { AST_EVENT_IE_PLTYPE_STR, "Challenge" },
[AST_EVENT_IE_RESPONSE] = { AST_EVENT_IE_PLTYPE_STR, "Response" },
[AST_EVENT_IE_EXPECTED_RESPONSE] = { AST_EVENT_IE_PLTYPE_STR, "ExpectedResponse" },
+ [AST_EVENT_IE_CACHABLE] = { AST_EVENT_IE_PLTYPE_UINT, "Cachable" },
};
const char *ast_event_get_type_name(const struct ast_event *event)
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/main/features.c
^
|
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 375388 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include "asterisk/_private.h"
@@ -1094,7 +1094,7 @@
ast_debug(4, "Notification of state change to metermaids %s@%s\n to state '%s'",
exten, context, ast_devstate2str(state));
- ast_devstate_changed(state, "park:%s@%s", exten, context);
+ ast_devstate_changed(state, AST_DEVSTATE_CACHABLE, "park:%s@%s", exten, context);
}
/*! \brief metermaids callback from devicestate.c */
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/main/http.c
^
|
@@ -36,7 +36,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 370642 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include <time.h>
#include <sys/time.h>
@@ -622,6 +622,7 @@
int content_length = 0;
struct ast_variable *v, *post_vars=NULL, *prev = NULL;
char *buf, *var, *val;
+ int res;
for (v = headers; v; v = v->next) {
if (!strcasecmp(v->name, "Content-Type")) {
@@ -634,20 +635,28 @@
for (v = headers; v; v = v->next) {
if (!strcasecmp(v->name, "Content-Length")) {
- content_length = atoi(v->value) + 1;
+ content_length = atoi(v->value);
break;
}
}
- if (!content_length) {
+ if (content_length <= 0) {
return NULL;
}
- buf = ast_alloca(content_length);
- if (!fgets(buf, content_length, ser->f)) {
+ buf = ast_malloc(content_length + 1);
+ if (!buf) {
return NULL;
}
+ res = fread(buf, 1, content_length, ser->f);
+ if (res < content_length) {
+ /* Error, distinguishable by ferror() or feof(), but neither
+ * is good. */
+ goto done;
+ }
+ buf[content_length] = '\0';
+
while ((val = strsep(&buf, "&"))) {
var = strsep(&val, "=");
if (val) {
@@ -665,6 +674,9 @@
prev = v;
}
}
+
+done:
+ ast_free(buf);
return post_vars;
}
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/res/res_calendar.c
^
|
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 366880 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include "asterisk/_private.h"
#include "asterisk/calendar.h"
@@ -575,9 +575,9 @@
* but haven't hit the end event yet, go ahead and set the devicestate to the current busy status */
if (event->bs_start_sched < 0 && event->bs_end_sched >= 0) {
if (!calendar_is_busy(event->owner)) {
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Calendar:%s", event->owner->name);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "Calendar:%s", event->owner->name);
} else {
- ast_devstate_changed(AST_DEVICE_BUSY, "Calendar:%s", event->owner->name);
+ ast_devstate_changed(AST_DEVICE_BUSY, AST_DEVSTATE_CACHABLE, "Calendar:%s", event->owner->name);
}
}
@@ -818,9 +818,9 @@
/* We can have overlapping events, so ignore the event->busy_state and check busy state
* based on all events in the calendar */
if (!calendar_is_busy(event->owner)) {
- ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Calendar:%s", event->owner->name);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, AST_DEVSTATE_CACHABLE, "Calendar:%s", event->owner->name);
} else {
- ast_devstate_changed(AST_DEVICE_BUSY, "Calendar:%s", event->owner->name);
+ ast_devstate_changed(AST_DEVICE_BUSY, AST_DEVSTATE_CACHABLE, "Calendar:%s", event->owner->name);
}
event = ast_calendar_unref_event(event);
|
[-]
[+]
|
Changed |
asterisk-1.8.19.1.tar.xz/res/res_jabber.c
^
|
@@ -38,7 +38,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 374335 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378341 $")
#include <ctype.h>
#include <iksemel.h>
@@ -349,7 +349,7 @@
static void aji_create_affiliations(struct aji_client *client, const char *node);
static iks* aji_pubsub_iq_create(struct aji_client *client, const char *type);
static void aji_publish_device_state(struct aji_client *client, const char * device,
- const char *device_state);
+ const char *device_state, unsigned int cachable);
static int aji_handle_pubsub_error(void *data, ikspak *pak);
static int aji_handle_pubsub_event(void *data, ikspak *pak);
static void aji_pubsub_subscribe(struct aji_client *client, const char *node);
@@ -363,7 +363,7 @@
static void aji_devstate_cb(const struct ast_event *ast_event, void *data);
static void aji_mwi_cb(const struct ast_event *ast_event, void *data);
static iks* aji_build_publish_skeleton(struct aji_client *client, const char *node,
- const char *event_type);
+ const char *event_type, unsigned int cachable);
/* No transports in this version */
/*
static int aji_create_transport(char *label, struct aji_client *client);
@@ -766,7 +766,7 @@
*/
static int acf_jabberreceive_read(struct ast_channel *chan, const char *name, char *data, char *buf, size_t buflen)
{
- char *aux = NULL, *parse = NULL;
+ char *parse = NULL;
int timeout;
int jidlen, resourcelen;
struct timeval start;
@@ -883,7 +883,7 @@
continue;
}
found = 1;
- aux = ast_strdupa(tmp->message);
+ ast_copy_string(buf, tmp->message, buflen);
AST_LIST_REMOVE_CURRENT(list);
aji_message_destroy(tmp);
break;
@@ -908,7 +908,6 @@
ast_log(LOG_NOTICE, "Timed out : no message received from %s\n", args.jid);
return -1;
}
- ast_copy_string(buf, aux, buflen);
return 0;
}
@@ -3208,6 +3207,7 @@
{
const char *device;
const char *device_state;
+ unsigned int cachable;
struct aji_client *client;
if (ast_eid_cmp(&ast_eid_default, ast_event_get_ie_raw(ast_event, AST_EVENT_IE_EID)))
{
@@ -3219,7 +3219,8 @@
client = ASTOBJ_REF((struct aji_client *) data);
device = ast_event_get_ie_str(ast_event, AST_EVENT_IE_DEVICE);
device_state = ast_devstate_str(ast_event_get_ie_uint(ast_event, AST_EVENT_IE_STATE));
- aji_publish_device_state(client, device, device_state);
+ cachable = ast_event_get_ie_uint(ast_event, AST_EVENT_IE_CACHABLE);
+ aji_publish_device_state(client, device, device_state, cachable);
ASTOBJ_UNREF(client, ast_aji_client_destroy);
}
@@ -3259,11 +3260,13 @@
*/
static int aji_handle_pubsub_event(void *data, ikspak *pak)
{
- char *item_id, *device_state, *context;
+ char *item_id, *device_state, *context, *cachable_str;
int oldmsgs, newmsgs;
iks *item, *item_content;
struct ast_eid pubsub_eid;
struct ast_event *event;
+ unsigned int cachable = AST_DEVSTATE_CACHABLE;
+
item = iks_find(iks_find(iks_find(pak->x, "event"), "items"), "item");
if (!item) {
ast_log(LOG_ERROR, "Could not parse incoming PubSub event\n");
@@ -3278,11 +3281,14 @@
}
if (!strcasecmp(iks_name(item_content), "state")) {
device_state = iks_find_cdata(item, "state");
+ if ((cachable_str = iks_find_cdata(item, "cachable"))) {
+ sscanf(cachable_str, "%30d", &cachable);
+ }
if (!(event = ast_event_new(AST_EVENT_DEVICE_STATE_CHANGE,
- AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, item_id, AST_EVENT_IE_STATE,
- AST_EVENT_IE_PLTYPE_UINT, ast_devstate_val(device_state), AST_EVENT_IE_EID,
- AST_EVENT_IE_PLTYPE_RAW, &pubsub_eid, sizeof(pubsub_eid),
- AST_EVENT_IE_END))) {
+ AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, item_id, AST_EVENT_IE_STATE,
+ AST_EVENT_IE_PLTYPE_UINT, ast_devstate_val(device_state), AST_EVENT_IE_EID,
+ AST_EVENT_IE_PLTYPE_RAW, &pubsub_eid, sizeof(pubsub_eid),
+ AST_EVENT_IE_END))) {
return IKS_FILTER_EAT;
}
} else if (!strcasecmp(iks_name(item_content), "mailbox")) {
@@ -3302,7 +3308,13 @@
iks_name(item_content));
return IKS_FILTER_EAT;
}
- ast_event_queue_and_cache(event);
+
+ if (cachable == AST_DEVSTATE_CACHABLE) {
+ ast_event_queue_and_cache(event);
+ } else {
+ ast_event_queue(event);
+ }
+
return IKS_FILTER_EAT;
}
@@ -3377,7 +3389,7 @@
* \return iks *
*/
static iks* aji_build_publish_skeleton(struct aji_client *client, const char *node,
- const char *event_type)
+ const char *event_type, unsigned int cachable)
{
iks *request = aji_pubsub_iq_create(client, "set");
iks *pubsub, *publish, *item;
@@ -3391,8 +3403,24 @@
}
item = iks_insert(publish, "item");
iks_insert_attrib(item, "id", node);
- return item;
+ if (cachable == AST_DEVSTATE_NOT_CACHABLE) {
+ iks *options, *x, *field_form_type, *field_persist;
+
+ options = iks_insert(pubsub, "publish-options");
+ x = iks_insert(options, "x");
+ iks_insert_attrib(x, "xmlns", "jabber:x:data");
+ iks_insert_attrib(x, "type", "submit");
+ field_form_type = iks_insert(x, "field");
+ iks_insert_attrib(field_form_type, "var", "FORM_TYPE");
+ iks_insert_attrib(field_form_type, "type", "hidden");
+ iks_insert_cdata(iks_insert(field_form_type, "value"), "http://jabber.org/protocol/pubsub#publish-options", 0);
+ field_persist = iks_insert(x, "field");
+ iks_insert_attrib(field_persist, "var", "pubsub#persist_items");
+ iks_insert_cdata(iks_insert(field_persist, "value"), "0", 1);
+ }
+
+ return item;
}
/*!
@@ -3403,11 +3431,11 @@
* \return void
*/
static void aji_publish_device_state(struct aji_client *client, const char *device,
- const char *device_state)
+ const char *device_state, unsigned int cachable)
{
- iks *request = aji_build_publish_skeleton(client, device, "device_state");
+ iks *request = aji_build_publish_skeleton(client, device, "device_state", cachable);
iks *state;
- char eid_str[20];
+ char eid_str[20], cachable_str[2];
if (ast_test_flag(&pubsubflags, AJI_PUBSUB_AUTOCREATE)) {
if (ast_test_flag(&pubsubflags, AJI_XEP0248)) {
aji_create_pubsub_node(client, "leaf", device, "device_state");
@@ -3419,6 +3447,8 @@
state = iks_insert(request, "state");
iks_insert_attrib(state, "xmlns", "http://asterisk.org");
iks_insert_attrib(state, "eid", eid_str);
+ snprintf(cachable_str, sizeof(cachable_str), "%u", cachable);
+ iks_insert_attrib(state, "cachable", cachable_str);
iks_insert_cdata(state, device_state, strlen(device_state));
ast_aji_send(client, iks_root(request));
iks_delete(request);
@@ -3438,7 +3468,7 @@
char eid_str[20];
iks *mailbox_node, *request;
snprintf(full_mailbox, sizeof(full_mailbox), "%s@%s", mailbox, context);
- request = aji_build_publish_skeleton(client, full_mailbox, "message_waiting");
+ request = aji_build_publish_skeleton(client, full_mailbox, "message_waiting", 1);
ast_eid_to_str(eid_str, sizeof(eid_str), &ast_eid_default);
mailbox_node = iks_insert(request, "mailbox");
iks_insert_attrib(mailbox_node, "xmlns", "http://asterisk.org");
|