mirror of
https://github.com/asterisk/asterisk.git
synced 2025-08-25 15:08:27 +00:00
Compare commits
3 Commits
1.2.26.1-n
...
1.2.25-net
Author | SHA1 | Date | |
---|---|---|---|
|
ef83b5943e | ||
|
5162e5d425 | ||
|
c247ee8720 |
2
CREDITS
2
CREDITS
@@ -95,7 +95,7 @@ Leif Madsen, Jared Smith and Jim van Meggelen - the Asterisk book
|
||||
available under a Creative Commons License at http://www.asteriskdocs.org
|
||||
|
||||
=== HOLD MUSIC ===
|
||||
Music provided by www.freeplaymusic.com
|
||||
Music provided by www.opsound.org
|
||||
|
||||
=== OTHER SOURCE CODE IN ASTERISK ===
|
||||
|
||||
|
21
ChangeLog
21
ChangeLog
@@ -1,24 +1,3 @@
|
||||
2007-12-20 Russell Bryant <russell@digium.com>
|
||||
|
||||
* Asterisk 1.2.26.1-netsec released
|
||||
|
||||
2007-12-20 20:21 +0000 [r94214-94255] Russell Bryant <russell@digium.com>
|
||||
|
||||
* channels/chan_iax2.c: Fix another potential seg fault ... (closes
|
||||
issue #11606) Reported by: dimas
|
||||
|
||||
* channels/chan_iax2.c: Fix a couple of places where it's possible
|
||||
to dereference a NULL pointer.
|
||||
|
||||
2007-12-18 Russell Bryant <russell@digium.com>
|
||||
|
||||
* Asterisk 1.2.26-netsec released
|
||||
|
||||
2007-12-18 18:44 +0000 [r93667-93675] Tilghman Lesher <tlesher@digium.com>
|
||||
|
||||
* channels/chan_sip.c, channels/chan_iax2.c: Fixing AST-2007-027
|
||||
(Closes issue #11119)
|
||||
|
||||
2007-11-29 Russell Bryant <russell@digium.com>
|
||||
|
||||
* Asterisk 1.2.25-netsec released
|
||||
|
@@ -1,8 +0,0 @@
|
||||
About Hold Music
|
||||
================
|
||||
Digium has licensed the music included with
|
||||
the Asterisk distribution From FreePlayMusic
|
||||
for use and distribution with Asterisk. It
|
||||
is licensed ONLY for use as hold music within
|
||||
an Asterisk based PBX.
|
||||
|
22
README.opsound
Normal file
22
README.opsound
Normal file
@@ -0,0 +1,22 @@
|
||||
About Hold Music
|
||||
================
|
||||
These files were obtained from http://opsound.org, where the authors placed them
|
||||
under the Creative Commons Attribution-Share Alike 2.5 license, a copy of which
|
||||
may be found at http://creativecommons.org.
|
||||
|
||||
Credits
|
||||
================
|
||||
macroform-cold_day - Paul Shuler (Macroform)
|
||||
paulshuler@gmail.com - http://macroform.bandcamp.com/
|
||||
|
||||
macroform-robot_dity - Paul Shuler (Macroform)
|
||||
paulshuler@gmail.com - http://macroform.bandcamp.com/
|
||||
|
||||
macroform-the_simplicity - Paul Shuler (Macroform)
|
||||
paulshuler@gmail.com - http://macroform.bandcamp.com/
|
||||
|
||||
manolo_camp-morning_coffee - Manolo Camp
|
||||
beatbastard@gmx.net - http://ccmixter.org/people/ManoloCamp
|
||||
|
||||
reno_project-system - Reno Project
|
||||
renoproject@hotmail.com - http://www.jamendo.com/en/album/23661
|
@@ -2620,18 +2620,16 @@ static void realtime_update_peer(const char *peername, struct sockaddr_in *sin,
|
||||
|
||||
static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in *sin)
|
||||
{
|
||||
struct ast_variable *var = NULL;
|
||||
struct ast_variable *var;
|
||||
struct ast_variable *tmp;
|
||||
struct iax2_peer *peer=NULL;
|
||||
time_t regseconds, nowtime;
|
||||
int dynamic=0;
|
||||
char iabuf[INET_ADDRSTRLEN];
|
||||
|
||||
if (peername) {
|
||||
var = ast_load_realtime("iaxpeers", "name", peername, "host", "dynamic", NULL);
|
||||
if (!var && sin)
|
||||
var = ast_load_realtime("iaxpeers", "name", peername, "host", ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr));
|
||||
} else if (sin) {
|
||||
if (peername)
|
||||
var = ast_load_realtime("iaxpeers", "name", peername, NULL);
|
||||
else {
|
||||
char iabuf[INET_ADDRSTRLEN];
|
||||
char porta[25];
|
||||
ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr);
|
||||
sprintf(porta, "%d", ntohs(sin->sin_port));
|
||||
@@ -2646,29 +2644,6 @@ static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!var && peername) { /* Last ditch effort */
|
||||
var = ast_load_realtime("iaxpeers", "name", peername, NULL);
|
||||
/*!\note
|
||||
* If this one loaded something, then we need to ensure that the host
|
||||
* field matched. The only reason why we can't have this as a criteria
|
||||
* is because we only have the IP address and the host field might be
|
||||
* set as a name (and the reverse PTR might not match).
|
||||
*/
|
||||
if (var && sin) {
|
||||
for (tmp = var; tmp; tmp = tmp->next) {
|
||||
if (!strcasecmp(tmp->name, "host")) {
|
||||
struct in_addr sin2 = { 0, };
|
||||
struct ast_dnsmgr_entry *dnsmgr = NULL;
|
||||
if ((ast_dnsmgr_lookup(tmp->value, &sin2, &dnsmgr) < 0) || (memcmp(&sin2, &sin->sin_addr, sizeof(sin2)) != 0)) {
|
||||
/* No match */
|
||||
ast_variables_destroy(var);
|
||||
var = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!var)
|
||||
return NULL;
|
||||
|
||||
@@ -2745,46 +2720,13 @@ static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in
|
||||
return peer;
|
||||
}
|
||||
|
||||
static struct iax2_user *realtime_user(const char *username, struct sockaddr_in *sin)
|
||||
static struct iax2_user *realtime_user(const char *username)
|
||||
{
|
||||
struct ast_variable *var;
|
||||
struct ast_variable *tmp;
|
||||
struct iax2_user *user=NULL;
|
||||
char iabuf[INET_ADDRSTRLEN];
|
||||
|
||||
var = ast_load_realtime("iaxusers", "name", username, "host", "dynamic", NULL);
|
||||
if (!var && sin)
|
||||
var = ast_load_realtime("iaxusers", "name", username, "host", ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr));
|
||||
if (!var && sin) {
|
||||
char porta[6];
|
||||
snprintf(porta, sizeof(porta), "%d", ntohs(sin->sin_port));
|
||||
var = ast_load_realtime("iaxusers", "name", username, "ipaddr", ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr), "port", porta, NULL);
|
||||
if (!var)
|
||||
var = ast_load_realtime("iaxusers", "ipaddr", ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr), "port", porta, NULL);
|
||||
}
|
||||
if (!var) { /* Last ditch effort */
|
||||
var = ast_load_realtime("iaxusers", "name", username, NULL);
|
||||
/*!\note
|
||||
* If this one loaded something, then we need to ensure that the host
|
||||
* field matched. The only reason why we can't have this as a criteria
|
||||
* is because we only have the IP address and the host field might be
|
||||
* set as a name (and the reverse PTR might not match).
|
||||
*/
|
||||
if (var) {
|
||||
for (tmp = var; tmp; tmp = tmp->next) {
|
||||
if (!strcasecmp(tmp->name, "host")) {
|
||||
struct in_addr sin2 = { 0, };
|
||||
struct ast_dnsmgr_entry *dnsmgr = NULL;
|
||||
if ((ast_dnsmgr_lookup(tmp->value, &sin2, &dnsmgr) < 0) || (memcmp(&sin2, &sin->sin_addr, sizeof(sin2)) != 0)) {
|
||||
/* No match */
|
||||
ast_variables_destroy(var);
|
||||
var = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var = ast_load_realtime("iaxusers", "name", username, NULL);
|
||||
if (!var)
|
||||
return NULL;
|
||||
|
||||
@@ -4936,7 +4878,7 @@ static int check_access(int callno, struct sockaddr_in *sin, struct iax_ies *ies
|
||||
ast_mutex_unlock(&userl.lock);
|
||||
user = best;
|
||||
if (!user && !ast_strlen_zero(iaxs[callno]->username)) {
|
||||
user = realtime_user(iaxs[callno]->username, sin);
|
||||
user = realtime_user(iaxs[callno]->username);
|
||||
if (user && !ast_strlen_zero(iaxs[callno]->context) && /* No context specified */
|
||||
!apply_context(user->contexts, iaxs[callno]->context)) { /* Context is permitted */
|
||||
destroy_user(user);
|
||||
|
@@ -81,7 +81,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/dnsmgr.h"
|
||||
#include "asterisk/devicestate.h"
|
||||
#include "asterisk/linkedlists.h"
|
||||
#include "asterisk/dnsmgr.h"
|
||||
|
||||
#ifdef OSP_SUPPORT
|
||||
#include "asterisk/astosp.h"
|
||||
@@ -1726,35 +1725,9 @@ static struct sip_peer *realtime_peer(const char *peername, struct sockaddr_in *
|
||||
char iabuf[80];
|
||||
|
||||
/* First check on peer name */
|
||||
if (newpeername) {
|
||||
var = ast_load_realtime("sippeers", "name", newpeername, "host", "dynamic", NULL);
|
||||
if (!var && sin) {
|
||||
var = ast_load_realtime("sippeers", "name", newpeername, "host", ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr), NULL);
|
||||
if (!var) {
|
||||
var = ast_load_realtime("sippeers", "name", newpeername, NULL);
|
||||
/*!\note
|
||||
* If this one loaded something, then we need to ensure that the host
|
||||
* field matched. The only reason why we can't have this as a criteria
|
||||
* is because we only have the IP address and the host field might be
|
||||
* set as a name (and the reverse PTR might not match).
|
||||
*/
|
||||
if (var) {
|
||||
for (tmp = var; tmp; tmp = tmp->next) {
|
||||
if (!strcasecmp(var->name, "host")) {
|
||||
struct in_addr sin2 = { 0, };
|
||||
struct ast_dnsmgr_entry *dnsmgr = NULL;
|
||||
if ((ast_dnsmgr_lookup(tmp->value, &sin2, &dnsmgr) < 0) || (memcmp(&sin2, &sin->sin_addr, sizeof(sin2)) != 0)) {
|
||||
/* No match */
|
||||
ast_variables_destroy(var);
|
||||
var = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (sin) { /* Then check on IP address */
|
||||
if (newpeername)
|
||||
var = ast_load_realtime("sippeers", "name", peername, NULL);
|
||||
else if (sin) { /* Then check on IP address */
|
||||
ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr);
|
||||
var = ast_load_realtime("sippeers", "host", iabuf, NULL); /* First check for fixed IP hosts */
|
||||
if (!var)
|
||||
|
@@ -1,3 +1,7 @@
|
||||
Music Provided By www.freeplaymusic.com. These sound files are provided by
|
||||
Digium under license from Freeplay Music Corporation for use in conjunction
|
||||
with the Asterisk software only.
|
||||
About Hold Music
|
||||
================
|
||||
These files were obtained from http://opsound.org, where the authors placed them
|
||||
under the Creative Commons Attribution-Share Alike 2.5 license, a copy of which
|
||||
may be found at http://creativecommons.org.
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
sounds/moh/macroform-cold_day.mp3
Normal file
BIN
sounds/moh/macroform-cold_day.mp3
Normal file
Binary file not shown.
BIN
sounds/moh/macroform-robot_dity.mp3
Normal file
BIN
sounds/moh/macroform-robot_dity.mp3
Normal file
Binary file not shown.
BIN
sounds/moh/macroform-the_simplicity.mp3
Normal file
BIN
sounds/moh/macroform-the_simplicity.mp3
Normal file
Binary file not shown.
BIN
sounds/moh/manolo_camp-morning_coffee.mp3
Normal file
BIN
sounds/moh/manolo_camp-morning_coffee.mp3
Normal file
Binary file not shown.
BIN
sounds/moh/reno_project-system.mp3
Normal file
BIN
sounds/moh/reno_project-system.mp3
Normal file
Binary file not shown.
Reference in New Issue
Block a user