mirror of
https://github.com/asterisk/asterisk.git
synced 2025-08-23 13:53:03 +00:00
Compare commits
11 Commits
12.2.0-rc1
...
12.2.0
Author | SHA1 | Date | |
---|---|---|---|
|
45361ec864 | ||
|
1d8ef4658a | ||
|
ddfefdfdcc | ||
|
86c659ba46 | ||
|
4f90ecce4d | ||
|
aca4881112 | ||
|
2866849e98 | ||
|
f4f8266f32 | ||
|
1904d4b3a8 | ||
|
ccb9fd0a66 | ||
|
0fa2dcd3ab |
23
CHANGES
23
CHANGES
@@ -8,6 +8,8 @@
|
||||
===
|
||||
==============================================================================
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
--- Functionality changes from Asterisk 12.1.0 to Asterisk 12.2.0 ------------
|
||||
------------------------------------------------------------------------------
|
||||
@@ -51,6 +53,25 @@ RealTime
|
||||
* A new set of Alembic scripts has been added for CDR tables. This will create
|
||||
a 'cdr' table with the default schema that Asterisk expects.
|
||||
|
||||
chan_sip
|
||||
-----------
|
||||
* SIP peers can now specify 'trust_id_outbound' which affects RPID/PAI
|
||||
fields for prohibited callingpres information. Values are legacy, no, and
|
||||
yes. By default, legacy is used.
|
||||
trust_id_outbound=legacy - behavior remains the same as 1.8.26.1. When
|
||||
dealing with prohibited callingpres and sendrpid=pai/rpid, RPID/PAI
|
||||
headers are appended to outbound SIP messages just as they are with
|
||||
allowed callingpres values, but data about the remote party's identity is
|
||||
anonymized.
|
||||
When sendrpid=rpid, only the remote party's domain is anonymized.
|
||||
trust_id_outbound=no - when dealing with prohibited callingpres, RPID/PAI
|
||||
headers are not sent.
|
||||
trust_id_outbound=yes - RPID/PAI headers are applied with the full remote
|
||||
party information in tact even for prohibited callingpres information.
|
||||
In the case of PAI, a Privacy: id header will be appended for prohibited
|
||||
calling information to communicate that the private information should
|
||||
not be relayed to untrusted parties.
|
||||
|
||||
res_hep
|
||||
------------------
|
||||
* A new module, res_hep, has been added, that acts as a generic packet
|
||||
@@ -1376,8 +1397,8 @@ sip_to_res_pjsip.py
|
||||
a chan_pjsip configuration, but it is expected that configuration beyond
|
||||
what the script provides will be needed.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
>>>>>>> .merge-right.r412746
|
||||
--- Functionality changes from Asterisk 10 to Asterisk 11 --------------------
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
86
ChangeLog
86
ChangeLog
@@ -1,3 +1,89 @@
|
||||
2014-04-23 Asterisk Development Team <asteriskteam@digium.com>
|
||||
|
||||
* Asterisk 12.2.0 Released.
|
||||
|
||||
2014-04-21 Asterisk Development Team <asteriskteam@digium.com>
|
||||
|
||||
* Asterisk 12.2.0-rc3 Released.
|
||||
|
||||
* 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.
|
||||
|
||||
* main/asterisk: Fix startup sequence for realtime features
|
||||
|
||||
When ASTERISK-23265/ASTERISK-23320 was fixed, it inadvertently led to
|
||||
realtime features breaking. This was due to features loading prior to
|
||||
realtime. This patch fixes this by loading features after loading
|
||||
dynamic modules.
|
||||
|
||||
2014-04-14 Asterisk Development Team <asteriskteam@digium.com>
|
||||
|
||||
* Asterisk 12.2.0-rc2 Released.
|
||||
|
||||
* 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
|
||||
|
||||
* res_hep_pjsip: Use the channel name instead of the call ID when it is
|
||||
available
|
||||
|
||||
During discussions with Alexandr Dubovikov at Kamailio World, it
|
||||
became apparent that while the SIP call ID is a useful identifier
|
||||
prior to an Asterisk channel being created, it is far more preferable
|
||||
to use the channel name (or some channel based identifier) when the
|
||||
channel is available. Homer is smart enough to tie the various
|
||||
messages together. This patch opts to use the channel name when it
|
||||
is available, falling back to the call ID otherwise.
|
||||
|
||||
* res_pjsip_pubsub: Set the body generation result to 0 for a valid
|
||||
path
|
||||
|
||||
The result of the "ast_sip_pubsub_generate_body_content" was not
|
||||
set/initialized. Consequently, the nominal path potentially returned
|
||||
an invalid value, thus not sending mwi notifications.
|
||||
|
||||
* Stasis: Fix Stasis() bridge refcount issue
|
||||
|
||||
The Stasis() dialplan application monitors what bridge a channel is
|
||||
in and so necessarily holds on to a bridge pointer. This change
|
||||
ensures that it also holds on to a reference for that bridge to
|
||||
prevent the bridge pointer from becoming a dangling pointer.
|
||||
|
||||
* http: Fix spurious ERROR message in responses with no content
|
||||
|
||||
When a response has a 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 out the content
|
||||
if the calculated content_length is non-zero.
|
||||
|
||||
* res_hep: Fix crash when hep.conf not available
|
||||
|
||||
Parts of res_hep properly checked for a valid configuration object
|
||||
before attempting to access the configuration. A check, however,
|
||||
was missed when a packet is sent. This patch fixes the crash caused
|
||||
by not checking if the configuration object is valid.
|
||||
|
||||
2014-03-28 Asterisk Development Team <asteriskteam@digium.com>
|
||||
|
||||
* Asterisk 12.2.0-rc1 Released.
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<!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-12.2.0-rc1</title></head>
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-12.2.0</title></head>
|
||||
<body>
|
||||
<h1 align="center"><a name="top">Release Summary</a></h1>
|
||||
<h3 align="center">asterisk-12.2.0-rc1</h3>
|
||||
<h3 align="center">Date: 2014-03-28</h3>
|
||||
<h3 align="center">asterisk-12.2.0</h3>
|
||||
<h3 align="center">Date: 2014-04-23</h3>
|
||||
<h3 align="center"><asteriskteam@digium.com></h3>
|
||||
<hr/>
|
||||
<h2 align="center">Table of Contents</h2>
|
||||
@@ -35,6 +35,7 @@
|
||||
18 mmichelson<br/>
|
||||
9 file<br/>
|
||||
9 sgriepentrog<br/>
|
||||
8 bebuild<br/>
|
||||
7 jcolp<br/>
|
||||
7 jrose<br/>
|
||||
7 kmoore<br/>
|
||||
@@ -656,12 +657,22 @@ Coders: kmoore<br/>
|
||||
<td><a href="https://issues.asterisk.org/jira/browse/ASTERISK-23459">ASTERISK-23459</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=411514">411514</a></td><td>mmichelson</td><td>Add alembic script that adds contact user_agent and endpoint message_context.</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=411529">411529</a></td><td>mjordan</td><td>Update API versions and UPGRADE/CHANGES for 12.2.0</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=411534">411534</a></td><td>mjordan</td><td>res_hep/res_hep_pjsip: Add a HEPv3 capture agent module and a logger for PJSIP</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=412322">412322</a></td><td>bebuild</td><td>Create 12.2.0-rc2</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=412325">412325</a></td><td>bebuild</td><td>Merge changes for 12.2.0-rc2; remove old summaries; update ChangeLog</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=412327">412327</a></td><td>bebuild</td><td>Importing release summary for 12.2.0-rc2 release.</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=412807">412807</a></td><td>bebuild</td><td>Create 12.2.0-rc3</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=412820">412820</a></td><td>bebuild</td><td>Update .version, remove summaries</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=412874">412874</a></td><td>bebuild</td><td>Merge r412823,412747,412330,412698 for ASTERISK-23487,ASTERISK-19465</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=412899">412899</a></td><td>bebuild</td><td>Importing release summary for 12.2.0-rc3 release.</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/12?view=revision&revision=412900">412900</a></td><td>bebuild</td><td>Importing release summary for 12.2.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>
|
||||
CHANGES | 98 +
|
||||
.version | 2
|
||||
CHANGES | 121 +
|
||||
ChangeLog | 25
|
||||
Makefile | 6
|
||||
Makefile.rules | 2
|
||||
UPGRADE.txt | 71 +
|
||||
@@ -701,6 +712,10 @@ apps/confbridge/conf_state_multi_marked.c
|
||||
apps/confbridge/conf_state_single.c | 3
|
||||
apps/confbridge/conf_state_single_marked.c | 3
|
||||
apps/confbridge/include/confbridge.h | 9
|
||||
asterisk-12.2.0-rc2-summary.html | 64
|
||||
asterisk-12.2.0-rc2-summary.txt | 94 -
|
||||
asterisk-12.2.0-rc3-summary.html | 68
|
||||
asterisk-12.2.0-rc3-summary.txt | 101 +
|
||||
bridges/bridge_native_rtp.c | 14
|
||||
bridges/bridge_softmix.c | 3
|
||||
channels/chan_alsa.c | 12
|
||||
@@ -719,7 +734,7 @@ channels/chan_nbs.c
|
||||
channels/chan_oss.c | 12
|
||||
channels/chan_phone.c | 18
|
||||
channels/chan_pjsip.c | 17
|
||||
channels/chan_sip.c | 507 +++----
|
||||
channels/chan_sip.c | 569 ++++----
|
||||
channels/chan_skinny.c | 36
|
||||
channels/chan_unistim.c | 92 -
|
||||
channels/chan_vpb.cc | 24
|
||||
@@ -728,14 +743,14 @@ channels/sig_pri.c
|
||||
channels/sig_pri.h | 8
|
||||
channels/sig_ss7.c | 16
|
||||
channels/sig_ss7.h | 8
|
||||
channels/sip/include/sip.h | 2
|
||||
channels/sip/include/sip.h | 9
|
||||
configs/confbridge.conf.sample | 5
|
||||
configs/hep.conf.sample | 16
|
||||
configs/iax.conf.sample | 20
|
||||
configs/indications.conf.sample | 12
|
||||
configs/res_fax.conf.sample | 8
|
||||
configs/res_odbc.conf.sample | 8
|
||||
configs/sip.conf.sample | 3
|
||||
configs/sip.conf.sample | 15
|
||||
configs/sorcery.conf.sample | 2
|
||||
configs/voicemail.conf.sample | 3
|
||||
configure.ac | 6
|
||||
@@ -799,7 +814,7 @@ include/asterisk/stasis_app_recording.h
|
||||
include/asterisk/stasis_app_snoop.h | 2
|
||||
include/asterisk/stasis_internal.h | 12
|
||||
main/app.c | 128 +
|
||||
main/asterisk.c | 34
|
||||
main/asterisk.c | 44
|
||||
main/astobj2.c | 1
|
||||
main/bridge.c | 18
|
||||
main/bridge_basic.c | 8
|
||||
@@ -936,7 +951,7 @@ tests/test_voicemail_api.c
|
||||
utils/astman.c | 1
|
||||
utils/conf2ael.c | 2
|
||||
utils/extconf.c | 37
|
||||
275 files changed, 11161 insertions(+), 2732 deletions(-)
|
||||
281 files changed, 11458 insertions(+), 2903 deletions(-)
|
||||
</pre><br/>
|
||||
<hr/>
|
||||
</body>
|
@@ -1,8 +1,8 @@
|
||||
Release Summary
|
||||
|
||||
asterisk-12.2.0-rc1
|
||||
asterisk-12.2.0
|
||||
|
||||
Date: 2014-03-28
|
||||
Date: 2014-04-23
|
||||
|
||||
<asteriskteam@digium.com>
|
||||
|
||||
@@ -54,33 +54,33 @@
|
||||
18 mmichelson 1 Dmitry Melekhov 3 coreyfarrell
|
||||
9 file 1 Gabriele Odone 2 rmudgett
|
||||
9 sgriepentrog 1 ibercom 2 skrusty
|
||||
7 jcolp 1 Joel Vandal 2 xrobau
|
||||
7 jrose 1 Michal Rybarik 1 aragon
|
||||
7 kmoore 1 myself in a virtualized environment 1 asemych
|
||||
6 coreyfarrell with multiple interfaces 1 axonaro
|
||||
5 gtjoseph 1 wushumasters 1 bford
|
||||
5 may 1 chillman
|
||||
4 wdoekes 1 danjenkins
|
||||
3 kharwell 1 davidw
|
||||
3 moy 1 fabled
|
||||
3 newtonr 1 gabrieleodone
|
||||
3 seanbright 1 hexanol
|
||||
2 dlee 1 ibercom
|
||||
2 elguero 1 jamicque
|
||||
2 igorg 1 jamuel
|
||||
2 rmeyerriecks 1 jcolp
|
||||
2 tzafrir 1 jmls
|
||||
1 Corey Farrell 1 jvandal
|
||||
1 Etienne Lessard 1 kgoedert
|
||||
1 ibercom 1 lordvadr
|
||||
1 marcelloceschia 1 manobela
|
||||
1 Michal Rybarik 1 marcelloceschia
|
||||
1 nbansal 1 mmichelson
|
||||
1 rsw686 1 n8ideas
|
||||
1 russell 1 nbansal
|
||||
1 Steve Davies 1 oleke
|
||||
1 Trevor Peirce 1 rmeyerriecks
|
||||
1 rnewton
|
||||
8 bebuild 1 Joel Vandal 2 xrobau
|
||||
7 jcolp 1 Michal Rybarik 1 aragon
|
||||
7 jrose 1 myself in a virtualized environment 1 asemych
|
||||
7 kmoore with multiple interfaces 1 axonaro
|
||||
6 coreyfarrell 1 wushumasters 1 bford
|
||||
5 gtjoseph 1 chillman
|
||||
5 may 1 danjenkins
|
||||
4 wdoekes 1 davidw
|
||||
3 kharwell 1 fabled
|
||||
3 moy 1 gabrieleodone
|
||||
3 newtonr 1 hexanol
|
||||
3 seanbright 1 ibercom
|
||||
2 dlee 1 jamicque
|
||||
2 elguero 1 jamuel
|
||||
2 igorg 1 jcolp
|
||||
2 rmeyerriecks 1 jmls
|
||||
2 tzafrir 1 jvandal
|
||||
1 Corey Farrell 1 kgoedert
|
||||
1 Etienne Lessard 1 lordvadr
|
||||
1 ibercom 1 manobela
|
||||
1 marcelloceschia 1 marcelloceschia
|
||||
1 Michal Rybarik 1 mmichelson
|
||||
1 nbansal 1 n8ideas
|
||||
1 rsw686 1 nbansal
|
||||
1 russell 1 oleke
|
||||
1 Steve Davies 1 rmeyerriecks
|
||||
1 Trevor Peirce 1 rnewton
|
||||
1 rsw686
|
||||
1 sgriepentrog
|
||||
1 shadow431
|
||||
@@ -959,6 +959,27 @@
|
||||
| | |res_hep/res_hep_pjsip: Add a HEPv3 | |
|
||||
|411534 |mjordan |capture agent module and a logger | |
|
||||
| | |for PJSIP | |
|
||||
|--------+------------+------------------------------------+--------------|
|
||||
|412322 |bebuild |Create 12.2.0-rc2 | |
|
||||
|--------+------------+------------------------------------+--------------|
|
||||
|412325 |bebuild |Merge changes for 12.2.0-rc2; remove| |
|
||||
| | |old summaries; update ChangeLog | |
|
||||
|--------+------------+------------------------------------+--------------|
|
||||
|412327 |bebuild |Importing release summary for | |
|
||||
| | |12.2.0-rc2 release. | |
|
||||
|--------+------------+------------------------------------+--------------|
|
||||
|412807 |bebuild |Create 12.2.0-rc3 | |
|
||||
|--------+------------+------------------------------------+--------------|
|
||||
|412820 |bebuild |Update .version, remove summaries | |
|
||||
|--------+------------+------------------------------------+--------------|
|
||||
|412874 |bebuild |Merge r412823,412747,412330,412698 | |
|
||||
| | |for ASTERISK-23487,ASTERISK-19465 | |
|
||||
|--------+------------+------------------------------------+--------------|
|
||||
|412899 |bebuild |Importing release summary for | |
|
||||
| | |12.2.0-rc3 release. | |
|
||||
|--------+------------+------------------------------------+--------------|
|
||||
|412900 |bebuild |Importing release summary for | |
|
||||
| | |12.2.0-rc3 release. | |
|
||||
+-------------------------------------------------------------------------+
|
||||
|
||||
----------------------------------------------------------------------
|
||||
@@ -970,7 +991,9 @@
|
||||
This is a summary of the changes to the source code that went into this
|
||||
release that was generated using the diffstat utility.
|
||||
|
||||
CHANGES | 98 +
|
||||
.version | 2
|
||||
CHANGES | 121 +
|
||||
ChangeLog | 25
|
||||
Makefile | 6
|
||||
Makefile.rules | 2
|
||||
UPGRADE.txt | 71 +
|
||||
@@ -1010,6 +1033,10 @@
|
||||
apps/confbridge/conf_state_single.c | 3
|
||||
apps/confbridge/conf_state_single_marked.c | 3
|
||||
apps/confbridge/include/confbridge.h | 9
|
||||
asterisk-12.2.0-rc2-summary.html | 64
|
||||
asterisk-12.2.0-rc2-summary.txt | 94 -
|
||||
asterisk-12.2.0-rc3-summary.html | 68
|
||||
asterisk-12.2.0-rc3-summary.txt | 101 +
|
||||
bridges/bridge_native_rtp.c | 14
|
||||
bridges/bridge_softmix.c | 3
|
||||
channels/chan_alsa.c | 12
|
||||
@@ -1028,7 +1055,7 @@
|
||||
channels/chan_oss.c | 12
|
||||
channels/chan_phone.c | 18
|
||||
channels/chan_pjsip.c | 17
|
||||
channels/chan_sip.c | 507 +++----
|
||||
channels/chan_sip.c | 569 ++++----
|
||||
channels/chan_skinny.c | 36
|
||||
channels/chan_unistim.c | 92 -
|
||||
channels/chan_vpb.cc | 24
|
||||
@@ -1037,14 +1064,14 @@
|
||||
channels/sig_pri.h | 8
|
||||
channels/sig_ss7.c | 16
|
||||
channels/sig_ss7.h | 8
|
||||
channels/sip/include/sip.h | 2
|
||||
channels/sip/include/sip.h | 9
|
||||
configs/confbridge.conf.sample | 5
|
||||
configs/hep.conf.sample | 16
|
||||
configs/iax.conf.sample | 20
|
||||
configs/indications.conf.sample | 12
|
||||
configs/res_fax.conf.sample | 8
|
||||
configs/res_odbc.conf.sample | 8
|
||||
configs/sip.conf.sample | 3
|
||||
configs/sip.conf.sample | 15
|
||||
configs/sorcery.conf.sample | 2
|
||||
configs/voicemail.conf.sample | 3
|
||||
configure.ac | 6
|
||||
@@ -1108,7 +1135,7 @@
|
||||
include/asterisk/stasis_app_snoop.h | 2
|
||||
include/asterisk/stasis_internal.h | 12
|
||||
main/app.c | 128 +
|
||||
main/asterisk.c | 34
|
||||
main/asterisk.c | 44
|
||||
main/astobj2.c | 1
|
||||
main/bridge.c | 18
|
||||
main/bridge_basic.c | 8
|
||||
@@ -1245,6 +1272,6 @@
|
||||
utils/astman.c | 1
|
||||
utils/conf2ael.c | 2
|
||||
utils/extconf.c | 37
|
||||
275 files changed, 11161 insertions(+), 2732 deletions(-)
|
||||
281 files changed, 11458 insertions(+), 2903 deletions(-)
|
||||
|
||||
----------------------------------------------------------------------
|
@@ -12668,6 +12668,7 @@ static int add_rpid(struct sip_request *req, struct sip_pvt *p)
|
||||
const char *privacy = NULL;
|
||||
const char *screen = NULL;
|
||||
struct ast_party_id connected_id;
|
||||
const char *anonymous_string = "\"Anonymous\" <sip:anonymous@anonymous.invalid>";
|
||||
|
||||
if (!ast_test_flag(&p->flags[0], SIP_SENDRPID)) {
|
||||
return 0;
|
||||
@@ -12687,16 +12688,41 @@ static int add_rpid(struct sip_request *req, struct sip_pvt *p)
|
||||
}
|
||||
lid_pres = ast_party_id_presentation(&connected_id);
|
||||
|
||||
fromdomain = S_OR(p->fromdomain, ast_sockaddr_stringify_host_remote(&p->ourip));
|
||||
if (((lid_pres & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED) &&
|
||||
(ast_test_flag(&p->flags[1], SIP_PAGE2_TRUST_ID_OUTBOUND) == SIP_PAGE2_TRUST_ID_OUTBOUND_NO)) {
|
||||
/* If pres is not allowed and we don't trust the peer, we don't apply an RPID header */
|
||||
return 0;
|
||||
}
|
||||
|
||||
fromdomain = p->fromdomain;
|
||||
if (!fromdomain ||
|
||||
((ast_test_flag(&p->flags[1], SIP_PAGE2_TRUST_ID_OUTBOUND) == SIP_PAGE2_TRUST_ID_OUTBOUND_YES) &&
|
||||
!strcmp("anonymous.invalid", fromdomain))) {
|
||||
/* If the fromdomain is NULL or if it was set to anonymous.invalid due to privacy settings and we trust the peer,
|
||||
* use the host IP address */
|
||||
fromdomain = ast_sockaddr_stringify_host_remote(&p->ourip);
|
||||
}
|
||||
|
||||
lid_num = ast_uri_encode(lid_num, tmp2, sizeof(tmp2), ast_uri_sip_user);
|
||||
|
||||
if (ast_test_flag(&p->flags[0], SIP_SENDRPID_PAI)) {
|
||||
ast_str_set(&tmp, -1, "\"%s\" <sip:%s@%s>", lid_name, lid_num, fromdomain);
|
||||
add_header(req, "P-Asserted-Identity", ast_str_buffer(tmp));
|
||||
if ((lid_pres & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED) {
|
||||
add_header(req, "Privacy", "id");
|
||||
if (ast_test_flag(&p->flags[1], SIP_PAGE2_TRUST_ID_OUTBOUND) != SIP_PAGE2_TRUST_ID_OUTBOUND_LEGACY) {
|
||||
/* trust_id_outbound = yes - Always give full information even if it's private, but append a privacy header
|
||||
* When private data is included */
|
||||
ast_str_set(&tmp, -1, "\"%s\" <sip:%s@%s>", lid_name, lid_num, fromdomain);
|
||||
if ((lid_pres & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED) {
|
||||
add_header(req, "Privacy", "id");
|
||||
}
|
||||
} else {
|
||||
/* trust_id_outbound = legacy - behave in a non RFC-3325 compliant manner and send anonymized data when
|
||||
* when handling private data. */
|
||||
if ((lid_pres & AST_PRES_RESTRICTION) == AST_PRES_ALLOWED) {
|
||||
ast_str_set(&tmp, -1, "\"%s\" <sip:%s@%s>", lid_name, lid_num, fromdomain);
|
||||
} else {
|
||||
ast_str_set(&tmp, -1, "%s", anonymous_string);
|
||||
}
|
||||
}
|
||||
add_header(req, "P-Asserted-Identity", ast_str_buffer(tmp));
|
||||
} else {
|
||||
ast_str_set(&tmp, -1, "\"%s\" <sip:%s@%s>;party=%s", lid_name, lid_num, fromdomain, p->outgoing_call ? "calling" : "called");
|
||||
|
||||
@@ -19857,6 +19883,18 @@ static const char *allowoverlap2str(int mode)
|
||||
return map_x_s(allowoverlapstr, mode, "<error>");
|
||||
}
|
||||
|
||||
static const struct _map_x_s trust_id_outboundstr[] = {
|
||||
{ SIP_PAGE2_TRUST_ID_OUTBOUND_LEGACY, "Legacy" },
|
||||
{ SIP_PAGE2_TRUST_ID_OUTBOUND_NO, "No" },
|
||||
{ SIP_PAGE2_TRUST_ID_OUTBOUND_YES, "Yes" },
|
||||
{ -1, NULL }, /* terminator */
|
||||
};
|
||||
|
||||
static const char *trust_id_outbound2str(int mode)
|
||||
{
|
||||
return map_x_s(trust_id_outboundstr, mode, "<error>");
|
||||
}
|
||||
|
||||
/*! \brief Destroy disused contexts between reloads
|
||||
Only used in reload_config so the code for regcontext doesn't get ugly
|
||||
*/
|
||||
@@ -20532,6 +20570,7 @@ static char *_sip_show_peer(int type, int fd, struct mansession *s, const struct
|
||||
}
|
||||
ast_cli(fd, "\n");
|
||||
}
|
||||
ast_cli(fd, " TrustIDOutbnd: %s\n", trust_id_outbound2str(ast_test_flag(&peer->flags[1], SIP_PAGE2_TRUST_ID_OUTBOUND)));
|
||||
ast_cli(fd, " Subscriptions: %s\n", AST_CLI_YESNO(ast_test_flag(&peer->flags[1], SIP_PAGE2_ALLOWSUBSCRIBE)));
|
||||
ast_cli(fd, " Overlap dial : %s\n", allowoverlap2str(ast_test_flag(&peer->flags[1], SIP_PAGE2_ALLOWOVERLAP)));
|
||||
if (peer->outboundproxy)
|
||||
@@ -30074,6 +30113,19 @@ static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask
|
||||
} else if (!strcasecmp(v->name, "rpid_immediate")) {
|
||||
ast_set_flag(&mask[1], SIP_PAGE2_RPID_IMMEDIATE);
|
||||
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_RPID_IMMEDIATE);
|
||||
} else if (!strcasecmp(v->name, "trust_id_outbound")) {
|
||||
ast_set_flag(&mask[1], SIP_PAGE2_TRUST_ID_OUTBOUND);
|
||||
ast_clear_flag(&flags[1], SIP_PAGE2_TRUST_ID_OUTBOUND);
|
||||
if (!strcasecmp(v->value, "legacy")) {
|
||||
ast_set_flag(&flags[1], SIP_PAGE2_TRUST_ID_OUTBOUND_LEGACY);
|
||||
} else if (ast_true(v->value)) {
|
||||
ast_set_flag(&flags[1], SIP_PAGE2_TRUST_ID_OUTBOUND_YES);
|
||||
} else if (ast_false(v->value)) {
|
||||
ast_set_flag(&flags[1], SIP_PAGE2_TRUST_ID_OUTBOUND_NO);
|
||||
} else {
|
||||
ast_log(LOG_WARNING, "Unknown trust_id_outbound mode '%s' on line %d, using legacy\n", v->value, v->lineno);
|
||||
ast_set_flag(&flags[1], SIP_PAGE2_TRUST_ID_OUTBOUND_LEGACY);
|
||||
}
|
||||
} else if (!strcasecmp(v->name, "g726nonstandard")) {
|
||||
ast_set_flag(&mask[0], SIP_G726_NONSTANDARD);
|
||||
ast_set2_flag(&flags[0], ast_true(v->value), SIP_G726_NONSTANDARD);
|
||||
|
@@ -359,13 +359,18 @@
|
||||
#define SIP_PAGE2_HAVEPEERCONTEXT (1 << 28) /*< Are we associated with a configured peer context? */
|
||||
#define SIP_PAGE2_USE_SRTP (1 << 29) /*!< DP: Whether we should offer (only) SRTP */
|
||||
|
||||
#define SIP_PAGE2_TRUST_ID_OUTBOUND (3 << 30) /*!< DP: Do we trust the peer with private presence information? */
|
||||
#define SIP_PAGE2_TRUST_ID_OUTBOUND_LEGACY (0 << 30) /*!< Legacy, Do not provide private presence information, but include PAI/RPID when private */
|
||||
#define SIP_PAGE2_TRUST_ID_OUTBOUND_NO (1 << 30) /*!< No, Do not provide private presence information, do not include PAI/RPID when private */
|
||||
#define SIP_PAGE2_TRUST_ID_OUTBOUND_YES (2 << 30) /*!< Yes, provide private presence information in PAI/RPID headers */
|
||||
|
||||
#define SIP_PAGE2_FLAGS_TO_COPY \
|
||||
(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_IGNORESDPVERSION | \
|
||||
SIP_PAGE2_VIDEOSUPPORT | SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | \
|
||||
SIP_PAGE2_BUGGY_MWI | SIP_PAGE2_TEXTSUPPORT | SIP_PAGE2_FAX_DETECT | \
|
||||
SIP_PAGE2_UDPTL_DESTINATION | SIP_PAGE2_VIDEOSUPPORT_ALWAYS | SIP_PAGE2_PREFERRED_CODEC | \
|
||||
SIP_PAGE2_RPID_IMMEDIATE | SIP_PAGE2_RPID_UPDATE | SIP_PAGE2_SYMMETRICRTP |\
|
||||
SIP_PAGE2_Q850_REASON | SIP_PAGE2_HAVEPEERCONTEXT | SIP_PAGE2_USE_SRTP)
|
||||
SIP_PAGE2_Q850_REASON | SIP_PAGE2_HAVEPEERCONTEXT | SIP_PAGE2_USE_SRTP | SIP_PAGE2_TRUST_ID_OUTBOUND)
|
||||
|
||||
|
||||
#define SIP_PAGE3_SNOM_AOC (1 << 0) /*!< DPG: Allow snom aoc messages */
|
||||
|
@@ -350,6 +350,17 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
|
||||
; transmit such UPDATE messages to it, then you must enable this option.
|
||||
; Otherwise, we will have to wait until we can send a reinvite to
|
||||
; transmit the information.
|
||||
;trust_id_outbound = no ; Controls whether or not we trust this peer with private identity
|
||||
; information (when the remote party has callingpres=prohib or equivalent).
|
||||
; no - RPID/PAI headers will not be included for private peer information
|
||||
; yes - RPID/PAI headers will include the private peer information. Privacy
|
||||
; requirements will be indicated in a Privacy header for sendrpid=pai
|
||||
; legacy - RPID/PAI will be included for private peer information. In the
|
||||
; case of sendrpid=pai, private data that would be included in them
|
||||
; will be anonymized. For sendrpid=rpid, private data may be included
|
||||
; but the remote party's domain will be anonymized. The way legacy
|
||||
; behaves may violate RFC-3325, but it follows historic behavior.
|
||||
; This option is set to 'legacy' by default
|
||||
;prematuremedia=no ; Some ISDN links send empty media frames before
|
||||
; the call is in ringing or progress state. The SIP
|
||||
; channel will then send 183 indicating early media
|
||||
@@ -1219,6 +1230,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
|
||||
; autoframing
|
||||
; insecure
|
||||
; trustrpid
|
||||
; trust_id_outbound
|
||||
; progressinband
|
||||
; promiscredir
|
||||
; useclientcode
|
||||
|
@@ -4427,11 +4427,6 @@ int main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ast_features_init()) {
|
||||
printf("%s", term_quit());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ast_pickup_init()) {
|
||||
printf("%s", term_quit());
|
||||
exit(1);
|
||||
@@ -4462,6 +4457,11 @@ int main(int argc, char *argv[])
|
||||
exit(moduleresult == -2 ? 2 : 1);
|
||||
}
|
||||
|
||||
if (ast_features_init()) {
|
||||
printf("%s", term_quit());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (dnsmgr_init()) { /* Initialize the DNS manager */
|
||||
printf("%s", term_quit());
|
||||
exit(1);
|
||||
|
@@ -131,6 +131,9 @@ static void *autoservice_run(void *ign)
|
||||
|
||||
callid = ast_channel_callid(chan);
|
||||
ast_callid_threadassoc_change(callid);
|
||||
if (callid) {
|
||||
callid = ast_callid_unref(callid);
|
||||
}
|
||||
|
||||
f = ast_read(chan);
|
||||
|
||||
@@ -180,11 +183,6 @@ static void *autoservice_run(void *ign)
|
||||
* If we did, we'd need to ast_frfree(f) if (f). */
|
||||
}
|
||||
|
||||
if (callid) {
|
||||
ast_callid_threadassoc_remove();
|
||||
callid = ast_callid_unref(callid);
|
||||
}
|
||||
|
||||
asthread = AST_PTHREADT_NULL;
|
||||
|
||||
return NULL;
|
||||
|
@@ -416,7 +416,7 @@ void ast_http_send(struct ast_tcptls_session_instance *ser,
|
||||
|
||||
/* calc content length */
|
||||
if (out) {
|
||||
content_length += strlen(ast_str_buffer(out));
|
||||
content_length += ast_str_strlen(out);
|
||||
}
|
||||
|
||||
if (fd) {
|
||||
@@ -443,7 +443,7 @@ void ast_http_send(struct ast_tcptls_session_instance *ser,
|
||||
|
||||
/* send content */
|
||||
if (method != AST_HTTP_HEAD || status_code >= 400) {
|
||||
if (out) {
|
||||
if (content_length) {
|
||||
if (fwrite(ast_str_buffer(out), content_length, 1, ser->f) != 1) {
|
||||
ast_log(LOG_ERROR, "fwrite() failed: %s\n", strerror(errno));
|
||||
}
|
||||
|
@@ -532,7 +532,7 @@ int hepv3_send_packet(struct hepv3_capture_info *capture_info)
|
||||
RAII_VAR(struct module_config *, config, ao2_global_obj_ref(global_config), ao2_cleanup);
|
||||
int res;
|
||||
|
||||
if (!config->general->enabled) {
|
||||
if (!config || !config->general->enabled) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -27,6 +27,7 @@
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<depend>res_hep</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
<support_level>extended</support_level>
|
||||
@@ -37,12 +38,37 @@
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
|
||||
#include <pjsip.h>
|
||||
#include <pjsip_ua.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
#include "asterisk/res_hep.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/netsock2.h"
|
||||
|
||||
static char *assign_uuid(const pj_str_t *call_id, const pj_str_t *local_tag, const pj_str_t *remote_tag)
|
||||
{
|
||||
RAII_VAR(struct ast_sip_session *, session, NULL, ao2_cleanup);
|
||||
pjsip_dialog *dlg;
|
||||
char *uuid = NULL;
|
||||
|
||||
if ((dlg = pjsip_ua_find_dialog(call_id, local_tag, remote_tag, PJ_FALSE))
|
||||
&& (session = ast_sip_dialog_get_session(dlg))
|
||||
&& (session->channel)) {
|
||||
|
||||
uuid = ast_strdup(ast_channel_name(session->channel));
|
||||
} else {
|
||||
|
||||
uuid = ast_malloc(pj_strlen(call_id) + 1);
|
||||
if (uuid) {
|
||||
ast_copy_pj_str(uuid, call_id, pj_strlen(call_id) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
return uuid;
|
||||
}
|
||||
|
||||
static pj_status_t logging_on_tx_msg(pjsip_tx_data *tdata)
|
||||
{
|
||||
char local_buf[256];
|
||||
@@ -50,6 +76,8 @@ static pj_status_t logging_on_tx_msg(pjsip_tx_data *tdata)
|
||||
char *uuid;
|
||||
struct hepv3_capture_info *capture_info;
|
||||
pjsip_cid_hdr *cid_hdr;
|
||||
pjsip_from_hdr *from_hdr;
|
||||
pjsip_to_hdr *to_hdr;
|
||||
|
||||
capture_info = hepv3_create_capture_info(tdata->buf.start, (size_t)(tdata->buf.cur - tdata->buf.start));
|
||||
if (!capture_info) {
|
||||
@@ -60,12 +88,14 @@ static pj_status_t logging_on_tx_msg(pjsip_tx_data *tdata)
|
||||
pj_sockaddr_print(&tdata->tp_info.dst_addr, remote_buf, sizeof(remote_buf), 3);
|
||||
|
||||
cid_hdr = PJSIP_MSG_CID_HDR(tdata->msg);
|
||||
uuid = ast_malloc(pj_strlen(&cid_hdr->id) + 1);
|
||||
from_hdr = PJSIP_MSG_FROM_HDR(tdata->msg);
|
||||
to_hdr = PJSIP_MSG_TO_HDR(tdata->msg);
|
||||
|
||||
uuid = assign_uuid(&cid_hdr->id, &to_hdr->tag, &from_hdr->tag);
|
||||
if (!uuid) {
|
||||
ao2_ref(capture_info, -1);
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
ast_copy_pj_str(uuid, &cid_hdr->id, pj_strlen(&cid_hdr->id) + 1);
|
||||
|
||||
ast_sockaddr_parse(&capture_info->src_addr, local_buf, PARSE_PORT_REQUIRE);
|
||||
ast_sockaddr_parse(&capture_info->dst_addr, remote_buf, PARSE_PORT_REQUIRE);
|
||||
@@ -95,12 +125,11 @@ static pj_bool_t logging_on_rx_msg(pjsip_rx_data *rdata)
|
||||
pj_sockaddr_print(&rdata->tp_info.transport->local_addr, local_buf, sizeof(local_buf), 3);
|
||||
pj_sockaddr_print(&rdata->pkt_info.src_addr, remote_buf, sizeof(remote_buf), 3);
|
||||
|
||||
uuid = ast_malloc(pj_strlen(&rdata->msg_info.cid->id) + 1);
|
||||
uuid = assign_uuid(&rdata->msg_info.cid->id, &rdata->msg_info.to->tag, &rdata->msg_info.from->tag);
|
||||
if (!uuid) {
|
||||
ao2_ref(capture_info, -1);
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
ast_copy_pj_str(uuid, &rdata->msg_info.cid->id, pj_strlen(&rdata->msg_info.cid->id) + 1);
|
||||
|
||||
ast_sockaddr_parse(&capture_info->src_addr, remote_buf, PARSE_PORT_REQUIRE);
|
||||
ast_sockaddr_parse(&capture_info->dst_addr, local_buf, PARSE_PORT_REQUIRE);
|
||||
|
@@ -1161,7 +1161,7 @@ int ast_sip_pubsub_generate_body_content(const char *type, const char *subtype,
|
||||
{
|
||||
struct ast_sip_pubsub_body_supplement *supplement;
|
||||
struct ast_sip_pubsub_body_generator *generator;
|
||||
int res;
|
||||
int res = 0;
|
||||
void *body;
|
||||
|
||||
generator = find_body_generator_type_subtype(type, subtype);
|
||||
|
@@ -777,7 +777,7 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
|
||||
RAII_VAR(struct ast_frame *, f, NULL, ast_frame_dtor);
|
||||
int r;
|
||||
int command_count;
|
||||
struct ast_bridge *last_bridge;
|
||||
RAII_VAR(struct ast_bridge *, last_bridge, NULL, ao2_cleanup);
|
||||
|
||||
/* Check to see if a bridge absorbed our hangup frame */
|
||||
if (ast_check_hangup_locked(chan)) {
|
||||
@@ -785,7 +785,7 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
|
||||
}
|
||||
|
||||
last_bridge = bridge;
|
||||
bridge = stasis_app_get_bridge(control);
|
||||
bridge = ao2_bump(stasis_app_get_bridge(control));
|
||||
|
||||
if (bridge != last_bridge) {
|
||||
app_unsubscribe_bridge(app, last_bridge);
|
||||
@@ -839,6 +839,7 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
|
||||
|
||||
app_unsubscribe_bridge(app, stasis_app_get_bridge(control));
|
||||
app_unsubscribe_channel(app, chan);
|
||||
ao2_cleanup(bridge);
|
||||
|
||||
res = send_end_msg(app, chan);
|
||||
if (res != 0) {
|
||||
|
Reference in New Issue
Block a user