Merge remote branch 'fsorig/master'
This commit is contained in:
commit
11a7b1f9a0
|
@ -707,6 +707,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_distributor", "src\mod\
|
||||||
EndProject
|
EndProject
|
||||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup", "w32\Setup\Setup.wixproj", "{47213370-B933-487D-9F45-BCA26D7E2B6F}"
|
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup", "w32\Setup\Setup.wixproj", "{47213370-B933-487D-9F45-BCA26D7E2B6F}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_pt", "src\mod\say\mod_say_pt\mod_say_pt.2010.vcxproj", "{7C22BDFF-CC09-400C-8A09-660733980028}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
All|Win32 = All|Win32
|
All|Win32 = All|Win32
|
||||||
|
@ -3619,6 +3621,23 @@ Global
|
||||||
{47213370-B933-487D-9F45-BCA26D7E2B6F}.Release|x64 Setup.Build.0 = Release|x64
|
{47213370-B933-487D-9F45-BCA26D7E2B6F}.Release|x64 Setup.Build.0 = Release|x64
|
||||||
{47213370-B933-487D-9F45-BCA26D7E2B6F}.Release|x86 Setup.ActiveCfg = Release|x86
|
{47213370-B933-487D-9F45-BCA26D7E2B6F}.Release|x86 Setup.ActiveCfg = Release|x86
|
||||||
{47213370-B933-487D-9F45-BCA26D7E2B6F}.Release|x86 Setup.Build.0 = Release|x86
|
{47213370-B933-487D-9F45-BCA26D7E2B6F}.Release|x86 Setup.Build.0 = Release|x86
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.All|Win32.ActiveCfg = Release|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.All|x64.ActiveCfg = Release|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.All|x64.Build.0 = Release|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.All|x64 Setup.ActiveCfg = Release|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.All|x86 Setup.ActiveCfg = Release|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Debug|x64 Setup.ActiveCfg = Debug|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Debug|x86 Setup.ActiveCfg = Debug|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Release|x64.Build.0 = Release|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Release|x64 Setup.ActiveCfg = Release|x64
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028}.Release|x86 Setup.ActiveCfg = Release|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -3769,6 +3788,7 @@ Global
|
||||||
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
|
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
|
||||||
{B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
|
{B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
|
||||||
{0382E8FD-CFDC-41C0-8B03-792C7C84FC31} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
|
{0382E8FD-CFDC-41C0-8B03-792C7C84FC31} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
|
||||||
|
{7C22BDFF-CC09-400C-8A09-660733980028} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
|
||||||
{3B08FEFD-4D3D-4C16-BA94-EE83509E32A0} = {57D119DC-484F-420F-B9E9-8589FD9A8DF8}
|
{3B08FEFD-4D3D-4C16-BA94-EE83509E32A0} = {57D119DC-484F-420F-B9E9-8589FD9A8DF8}
|
||||||
{7BFD517E-7F8F-4A40-A78E-8D3632738227} = {57D119DC-484F-420F-B9E9-8589FD9A8DF8}
|
{7BFD517E-7F8F-4A40-A78E-8D3632738227} = {57D119DC-484F-420F-B9E9-8589FD9A8DF8}
|
||||||
{6374D55C-FABE-4A02-9CF1-4145308A56C5} = {57D119DC-484F-420F-B9E9-8589FD9A8DF8}
|
{6374D55C-FABE-4A02-9CF1-4145308A56C5} = {57D119DC-484F-420F-B9E9-8589FD9A8DF8}
|
||||||
|
|
|
@ -2086,7 +2086,7 @@ static FIO_SIGNAL_CB_FUNCTION(on_r2_signal)
|
||||||
|
|
||||||
case FTDM_SIGEVENT_SIGSTATUS_CHANGED:
|
case FTDM_SIGEVENT_SIGSTATUS_CHANGED:
|
||||||
{
|
{
|
||||||
ftdm_signaling_status_t sigstatus = sigmsg->raw_data ? *((ftdm_signaling_status_t*)(sigmsg->raw_data)) : sigmsg->ev_data.sigstatus.status;
|
ftdm_signaling_status_t sigstatus = sigmsg->ev_data.sigstatus.status;
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%d:%d signalling changed to: %s\n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%d:%d signalling changed to: %s\n",
|
||||||
spanid, chanid, ftdm_signaling_status2str(sigstatus));
|
spanid, chanid, ftdm_signaling_status2str(sigstatus));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5421,8 +5421,7 @@ FT_DECLARE(ftdm_status_t) ftdm_span_send_signal(ftdm_span_t *span, ftdm_sigmsg_t
|
||||||
|
|
||||||
case FTDM_SIGEVENT_SIGSTATUS_CHANGED:
|
case FTDM_SIGEVENT_SIGSTATUS_CHANGED:
|
||||||
{
|
{
|
||||||
ftdm_signaling_status_t sigstatus = ftdm_test_flag(span, FTDM_SPAN_USE_SIGNALS_QUEUE) ? sigmsg->ev_data.sigstatus.status : *((ftdm_signaling_status_t*)(sigmsg->raw_data));
|
if (sigmsg->ev_data.sigstatus.status == FTDM_SIG_STATE_UP) {
|
||||||
if (sigstatus == FTDM_SIG_STATE_UP) {
|
|
||||||
ftdm_set_flag(sigmsg->channel, FTDM_CHANNEL_SIG_UP);
|
ftdm_set_flag(sigmsg->channel, FTDM_CHANNEL_SIG_UP);
|
||||||
} else {
|
} else {
|
||||||
ftdm_clear_flag(sigmsg->channel, FTDM_CHANNEL_SIG_UP);
|
ftdm_clear_flag(sigmsg->channel, FTDM_CHANNEL_SIG_UP);
|
||||||
|
|
|
@ -1397,8 +1397,7 @@ static int on_dchan_up(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_ev
|
||||||
sig.chan_id = ftdm_channel_get_id(chan);
|
sig.chan_id = ftdm_channel_get_id(chan);
|
||||||
sig.channel = chan;
|
sig.channel = chan;
|
||||||
sig.event_id = FTDM_SIGEVENT_SIGSTATUS_CHANGED;
|
sig.event_id = FTDM_SIGEVENT_SIGSTATUS_CHANGED;
|
||||||
sig.raw_data = &status;
|
sig.ev_data.sigstatus.status = status;
|
||||||
|
|
||||||
ftdm_span_send_signal(span, &sig);
|
ftdm_span_send_signal(span, &sig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1434,7 +1433,7 @@ static int on_dchan_down(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_
|
||||||
sig.chan_id = ftdm_channel_get_id(chan);
|
sig.chan_id = ftdm_channel_get_id(chan);
|
||||||
sig.channel = chan;
|
sig.channel = chan;
|
||||||
sig.event_id = FTDM_SIGEVENT_SIGSTATUS_CHANGED;
|
sig.event_id = FTDM_SIGEVENT_SIGSTATUS_CHANGED;
|
||||||
sig.raw_data = &status;
|
sig.ev_data.sigstatus.status = status;
|
||||||
|
|
||||||
ftdm_span_send_signal(span, &sig);
|
ftdm_span_send_signal(span, &sig);
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,9 +127,8 @@ static int __pri_lpwrap_read(struct pri *pri, void *buf, int buflen)
|
||||||
} else {
|
} else {
|
||||||
ftdm_log(FTDM_LOG_CRIT, "span %d D-READ TIMEOUT\n", spri->span->span_id);
|
ftdm_log(FTDM_LOG_CRIT, "span %d D-READ TIMEOUT\n", spri->span->span_id);
|
||||||
}
|
}
|
||||||
|
/* we cannot return -1, libpri seems to expect values >= 0 */
|
||||||
ftdm_clear_flag(spri, LPWRAP_PRI_READY);
|
return 0;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
spri->errs = 0;
|
spri->errs = 0;
|
||||||
res = (int)len;
|
res = (int)len;
|
||||||
|
@ -156,8 +155,8 @@ static int __pri_lpwrap_write(struct pri *pri, void *buf, int buflen)
|
||||||
|
|
||||||
if (ftdm_channel_write(spri->dchan, buf, buflen, &len) != FTDM_SUCCESS) {
|
if (ftdm_channel_write(spri->dchan, buf, buflen, &len) != FTDM_SUCCESS) {
|
||||||
ftdm_log(FTDM_LOG_CRIT, "span %d D-WRITE FAIL! [%s]\n", spri->span->span_id, spri->dchan->last_error);
|
ftdm_log(FTDM_LOG_CRIT, "span %d D-WRITE FAIL! [%s]\n", spri->span->span_id, spri->dchan->last_error);
|
||||||
ftdm_clear_flag(spri, LPWRAP_PRI_READY);
|
/* we cannot return -1, libpri seems to expect values >= 0 */
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef IODEBUG
|
#ifdef IODEBUG
|
||||||
|
|
|
@ -2478,7 +2478,7 @@ static BOOST_SIG_STATUS_CB_FUNCTION(ftdm_boost_sig_status_change)
|
||||||
sig.span_id = ftdmchan->span_id;
|
sig.span_id = ftdmchan->span_id;
|
||||||
sig.channel = ftdmchan;
|
sig.channel = ftdmchan;
|
||||||
sig.event_id = FTDM_SIGEVENT_SIGSTATUS_CHANGED;
|
sig.event_id = FTDM_SIGEVENT_SIGSTATUS_CHANGED;
|
||||||
sig.raw_data = &status;
|
sig.ev_data.sigstatus.status = status;
|
||||||
ftdm_span_send_signal(ftdmchan->span, &sig);
|
ftdm_span_send_signal(ftdmchan->span, &sig);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1152,6 +1152,7 @@ static FIO_WRITE_FUNCTION(zt_write)
|
||||||
bytes += 2;
|
bytes += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tryagain:
|
||||||
w = write(ftdmchan->sockfd, data, bytes);
|
w = write(ftdmchan->sockfd, data, bytes);
|
||||||
|
|
||||||
if (w >= 0) {
|
if (w >= 0) {
|
||||||
|
@ -1159,6 +1160,17 @@ static FIO_WRITE_FUNCTION(zt_write)
|
||||||
return FTDM_SUCCESS;
|
return FTDM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (errno == ELAST) {
|
||||||
|
zt_event_t zt_event_id = 0;
|
||||||
|
if (ioctl(ftdmchan->sockfd, codes.GETEVENT, &zt_event_id) == -1) {
|
||||||
|
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "Failed retrieving event after ELAST on write: %s\n", strerror(errno));
|
||||||
|
return FTDM_FAIL;
|
||||||
|
}
|
||||||
|
/* we should enqueue this event somewhere so it can be retrieved by the user, for now, dropping it to see what it is! */
|
||||||
|
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "Dropping event %d to be able to write data\n", zt_event_id);
|
||||||
|
goto tryagain;
|
||||||
|
}
|
||||||
|
|
||||||
return FTDM_FAIL;
|
return FTDM_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ struct ftdm_sigmsg {
|
||||||
union {
|
union {
|
||||||
ftdm_event_sigstatus_t sigstatus; /*!< valid if event_id is FTDM_SIGEVENT_SIGSTATUS_CHANGED */
|
ftdm_event_sigstatus_t sigstatus; /*!< valid if event_id is FTDM_SIGEVENT_SIGSTATUS_CHANGED */
|
||||||
ftdm_event_trace_t logevent; /*!< valid if event_id is FTDM_SIGEVENT_TRACE or FTDM_SIGEVENT_TRACE_RAW */
|
ftdm_event_trace_t logevent; /*!< valid if event_id is FTDM_SIGEVENT_TRACE or FTDM_SIGEVENT_TRACE_RAW */
|
||||||
}ev_data;
|
} ev_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \brief Crash policy
|
/*! \brief Crash policy
|
||||||
|
|
|
@ -48,7 +48,7 @@ sub _find {
|
||||||
my ($name, $value) = ($1,hex($2));
|
my ($name, $value) = ($1,hex($2));
|
||||||
$sub{$name} = sub () { $value };
|
$sub{$name} = sub () { $value };
|
||||||
$const{$name} = $value;
|
$const{$name} = $value;
|
||||||
} elsif(/^\s*struct\s+([a-z_]+)\s*\{\s*$/) {
|
} elsif(/^\s*struct\s+PACKED\s+([a-z_]+)\s*\{\s*$/) {
|
||||||
my $struct_name = $1;
|
my $struct_name = $1;
|
||||||
$struct{$struct_name} = [];
|
$struct{$struct_name} = [];
|
||||||
while(<$fh>) {
|
while(<$fh>) {
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#define SKINNY_EVENT_UNREGISTER "skinny::unregister"
|
#define SKINNY_EVENT_UNREGISTER "skinny::unregister"
|
||||||
#define SKINNY_EVENT_EXPIRE "skinny::expire"
|
#define SKINNY_EVENT_EXPIRE "skinny::expire"
|
||||||
#define SKINNY_EVENT_ALARM "skinny::alarm"
|
#define SKINNY_EVENT_ALARM "skinny::alarm"
|
||||||
|
#define SKINNY_EVENT_XML_ALARM "skinny::xml_alarm"
|
||||||
#define SKINNY_EVENT_CALL_STATE "skinny::call_state"
|
#define SKINNY_EVENT_CALL_STATE "skinny::call_state"
|
||||||
#define SKINNY_EVENT_USER_TO_DEVICE "skinny::user_to_device"
|
#define SKINNY_EVENT_USER_TO_DEVICE "skinny::user_to_device"
|
||||||
#define SKINNY_EVENT_DEVICE_TO_USER "skinny::device_to_user"
|
#define SKINNY_EVENT_DEVICE_TO_USER "skinny::device_to_user"
|
||||||
|
|
|
@ -627,8 +627,7 @@ union skinny_data {
|
||||||
struct extended_data_message extended_data;
|
struct extended_data_message extended_data;
|
||||||
|
|
||||||
uint16_t as_uint16;
|
uint16_t as_uint16;
|
||||||
char as_char;
|
char as_char[1];
|
||||||
void *raw;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1963,6 +1963,26 @@ switch_status_t skinny_handle_extended_data_message(listener_t *listener, skinny
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch_status_t skinny_handle_xml_alarm(listener_t *listener, skinny_message_t *request)
|
||||||
|
{
|
||||||
|
switch_event_t *event = NULL;
|
||||||
|
char *tmp = NULL;
|
||||||
|
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO,
|
||||||
|
"Received XML alarm.\n");
|
||||||
|
/* skinny::xml_alarm event */
|
||||||
|
skinny_device_event(listener, &event, SWITCH_EVENT_CUSTOM, SKINNY_EVENT_XML_ALARM);
|
||||||
|
/* Ensure that the body is null-terminated */
|
||||||
|
tmp = malloc(request->length - 4 + 1);
|
||||||
|
memcpy(tmp, request->data.as_char, request->length - 4);
|
||||||
|
tmp[request->length - 4] = '\0';
|
||||||
|
switch_event_add_body(event, "%s", tmp);
|
||||||
|
switch_safe_free(tmp);
|
||||||
|
switch_event_fire(&event);
|
||||||
|
|
||||||
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *request)
|
switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *request)
|
||||||
{
|
{
|
||||||
if (listener->profile->debug >= 10 || request->type != KEEP_ALIVE_MESSAGE) {
|
if (listener->profile->debug >= 10 || request->type != KEEP_ALIVE_MESSAGE) {
|
||||||
|
@ -2032,6 +2052,8 @@ switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *re
|
||||||
return skinny_handle_extended_data_message(listener, request);
|
return skinny_handle_extended_data_message(listener, request);
|
||||||
case DEVICE_TO_USER_DATA_RESPONSE_VERSION1_MESSAGE:
|
case DEVICE_TO_USER_DATA_RESPONSE_VERSION1_MESSAGE:
|
||||||
return skinny_handle_extended_data_message(listener, request);
|
return skinny_handle_extended_data_message(listener, request);
|
||||||
|
case XML_ALARM_MESSAGE:
|
||||||
|
return skinny_handle_xml_alarm(listener, request);
|
||||||
default:
|
default:
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
|
||||||
"Unhandled request %s (type=%x,length=%d).\n", skinny_message_type2str(request->type), request->type, request->length);
|
"Unhandled request %s (type=%x,length=%d).\n", skinny_message_type2str(request->type), request->type, request->length);
|
||||||
|
|
|
@ -250,6 +250,10 @@ static ssize_t skypopen_read(struct file *filp, char __user *buf, size_t count,
|
||||||
{
|
{
|
||||||
DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
struct skypopen_dev *dev = filp->private_data;
|
struct skypopen_dev *dev = filp->private_data;
|
||||||
|
|
||||||
|
if(unload)
|
||||||
|
return -1;
|
||||||
|
|
||||||
#ifdef WANT_HRTIMER
|
#ifdef WANT_HRTIMER
|
||||||
#if 1
|
#if 1
|
||||||
if(dev->timer_inq_started == 0){
|
if(dev->timer_inq_started == 0){
|
||||||
|
@ -278,6 +282,10 @@ static ssize_t skypopen_write(struct file *filp, const char __user *buf, size_t
|
||||||
{
|
{
|
||||||
DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
struct skypopen_dev *dev = filp->private_data;
|
struct skypopen_dev *dev = filp->private_data;
|
||||||
|
|
||||||
|
if(unload)
|
||||||
|
return -1;
|
||||||
|
|
||||||
#ifdef WANT_HRTIMER
|
#ifdef WANT_HRTIMER
|
||||||
#if 1
|
#if 1
|
||||||
if(dev->timer_outq_started == 0){
|
if(dev->timer_outq_started == 0){
|
||||||
|
@ -372,10 +380,14 @@ void skypopen_cleanup_module(void)
|
||||||
ret= del_timer( &lptr->device.timer_outq );
|
ret= del_timer( &lptr->device.timer_outq );
|
||||||
printk( "Stopped skypopen OSS driver write timer\n");
|
printk( "Stopped skypopen OSS driver write timer\n");
|
||||||
#else// WANT_HRTIMER
|
#else// WANT_HRTIMER
|
||||||
ret = hrtimer_cancel( &lptr->device.timer_inq );
|
if(lptr->device.timer_inq_started){
|
||||||
printk( "Stopped skypopen OSS driver read HRtimer\n");
|
ret = hrtimer_cancel( &lptr->device.timer_inq );
|
||||||
ret = hrtimer_cancel( &lptr->device.timer_outq );
|
printk( "Stopped skypopen OSS driver read HRtimer\n");
|
||||||
printk( "Stopped skypopen OSS driver write HRtimer\n");
|
}
|
||||||
|
if(lptr->device.timer_outq_started){
|
||||||
|
ret = hrtimer_cancel( &lptr->device.timer_outq );
|
||||||
|
printk( "Stopped skypopen OSS driver write HRtimer\n");
|
||||||
|
}
|
||||||
|
|
||||||
#endif// WANT_HRTIMER
|
#endif// WANT_HRTIMER
|
||||||
list_del(&lptr->list);
|
list_del(&lptr->list);
|
||||||
|
|
|
@ -818,7 +818,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
|
||||||
sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sofia_presence_dialog_callback, &dh);
|
sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sofia_presence_dialog_callback, &dh);
|
||||||
switch_safe_free(sql);
|
switch_safe_free(sql);
|
||||||
|
|
||||||
if ((sql = switch_mprintf("select sip_subscriptions.proto,sip_subscriptions.sip_user,sip_subscriptions.sip_host,"
|
if ((sql = switch_mprintf("select distinct sip_subscriptions.proto,sip_subscriptions.sip_user,sip_subscriptions.sip_host,"
|
||||||
"sip_subscriptions.sub_to_user,sip_subscriptions.sub_to_host,sip_subscriptions.event,"
|
"sip_subscriptions.sub_to_user,sip_subscriptions.sub_to_host,sip_subscriptions.event,"
|
||||||
"sip_subscriptions.contact,sip_subscriptions.call_id,sip_subscriptions.full_from,"
|
"sip_subscriptions.contact,sip_subscriptions.call_id,sip_subscriptions.full_from,"
|
||||||
"sip_subscriptions.full_via,sip_subscriptions.expires,sip_subscriptions.user_agent,"
|
"sip_subscriptions.full_via,sip_subscriptions.expires,sip_subscriptions.user_agent,"
|
||||||
|
|
|
@ -1139,30 +1139,24 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auth_res != AUTH_OK && !stale) {
|
if (auth_res != AUTH_OK && !stale) {
|
||||||
if (sofia_test_pflag(profile, PFLAG_LOG_AUTH_FAIL)) {
|
if (auth_res == AUTH_FORBIDDEN) {
|
||||||
if (regtype == REG_REGISTER) {
|
nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END());
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SIP auth %s (REGISTER) on sofia profile '%s' "
|
forbidden = 1;
|
||||||
"for [%s@%s] from ip %s\n", forbidden ? "failure" : "challenge", profile->name, to_user, to_host, network_ip);
|
} else {
|
||||||
}
|
nua_respond(nh, SIP_401_UNAUTHORIZED, NUTAG_WITH_THIS(nua), TAG_END());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile->debug) {
|
if (profile->debug) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send %s for [%s@%s]\n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send %s for [%s@%s]\n",
|
||||||
forbidden ? "forbidden" : "challenge", to_user, to_host);
|
forbidden ? "forbidden" : "challenge", to_user, to_host);
|
||||||
}
|
}
|
||||||
if (auth_res == AUTH_FORBIDDEN) {
|
/* Log line added to support Fail2Ban */
|
||||||
nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END());
|
if (sofia_test_pflag(profile, PFLAG_LOG_AUTH_FAIL)) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "SIP auth %s (%s) on sofia profile '%s' "
|
||||||
/* Log line added to support Fail2Ban */
|
"for [%s@%s] from ip %s\n", forbidden ? "failure" : "challenge",
|
||||||
if (sofia_test_pflag(profile, PFLAG_LOG_AUTH_FAIL)) {
|
(regtype == REG_INVITE) ? "INVITE" : "REGISTER", profile->name, to_user, to_host, network_ip);
|
||||||
if (regtype == REG_INVITE) {
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "SIP auth failure (INVITE) on sofia profile '%s' "
|
|
||||||
"for [%s@%s] from ip %s\n", profile->name, to_user, to_host, network_ip);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
nua_respond(nh, SIP_401_UNAUTHORIZED, NUTAG_WITH_THIS(nua), TAG_END());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_goto_int(r, 1, end);
|
switch_goto_int(r, 1, end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1193,14 +1187,18 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
|
||||||
realm = from_host;
|
realm = from_host;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regtype == REG_REGISTER) {
|
sofia_reg_auth_challenge(nua, profile, nh, regtype, realm, stale);
|
||||||
sofia_reg_auth_challenge(nua, profile, nh, regtype, realm, stale);
|
|
||||||
if (profile->debug) {
|
if (profile->debug) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Requesting Registration from: [%s@%s]\n", to_user, to_host);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send challenge for [%s@%s]\n", to_user, to_host);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
sofia_reg_auth_challenge(nua, profile, nh, regtype, realm, stale);
|
|
||||||
}
|
}
|
||||||
|
/* Log line added to support Fail2Ban */
|
||||||
|
if (sofia_test_pflag(profile, PFLAG_LOG_AUTH_FAIL)) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "SIP auth challenge (%s) on sofia profile '%s' "
|
||||||
|
"for [%s@%s] from ip %s\n", (regtype == REG_INVITE) ? "INVITE" : "REGISTER",
|
||||||
|
profile->name, to_user, to_host, network_ip);
|
||||||
|
}
|
||||||
|
|
||||||
switch_goto_int(r, 1, end);
|
switch_goto_int(r, 1, end);
|
||||||
}
|
}
|
||||||
reg:
|
reg:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9.00"
|
Version="9.00"
|
||||||
Name="mod_say_pt"
|
Name="mod_say_pt"
|
||||||
ProjectGUID="{FA429E98-8B03-45E6-A096-A4BC5E821DE4}"
|
ProjectGUID="{7C22BDFF-CC09-400C-8A09-660733980028}"
|
||||||
RootNamespace="mod_say_pt"
|
RootNamespace="mod_say_pt"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
TargetFrameworkVersion="131072"
|
TargetFrameworkVersion="131072"
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectName>mod_say_pt</ProjectName>
|
<ProjectName>mod_say_pt</ProjectName>
|
||||||
<ProjectGuid>{FA429E98-8B03-45E6-A096-A4BC5E821DE4}</ProjectGuid>
|
<ProjectGuid>{7C22BDFF-CC09-400C-8A09-660733980028}</ProjectGuid>
|
||||||
<RootNamespace>mod_say_pt</RootNamespace>
|
<RootNamespace>mod_say_pt</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="mod_say_pt"
|
Name="mod_say_pt"
|
||||||
ProjectGUID="{FA429E98-8B03-45E6-A096-A4BC5E821DE4}"
|
ProjectGUID="{7C22BDFF-CC09-400C-8A09-660733980028}"
|
||||||
RootNamespace="mod_say_pt"
|
RootNamespace="mod_say_pt"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
>
|
>
|
||||||
|
|
|
@ -723,6 +723,15 @@
|
||||||
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
||||||
<RefTargetDir>MODLOCATION</RefTargetDir>
|
<RefTargetDir>MODLOCATION</RefTargetDir>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\src\mod\say\mod_say_pt\mod_say_pt.2010.vcxproj">
|
||||||
|
<Name>mod_say_pt</Name>
|
||||||
|
<Project>{7c22bdff-cc09-400c-8a09-660733980028}</Project>
|
||||||
|
<Private>True</Private>
|
||||||
|
<DoNotHarvest>
|
||||||
|
</DoNotHarvest>
|
||||||
|
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
||||||
|
<RefTargetDir>MODLOCATION</RefTargetDir>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\src\mod\say\mod_say_ru\mod_say_ru.2010.vcxproj">
|
<ProjectReference Include="..\..\src\mod\say\mod_say_ru\mod_say_ru.2010.vcxproj">
|
||||||
<Name>mod_say_ru</Name>
|
<Name>mod_say_ru</Name>
|
||||||
<Project>{0382e8fd-cfdc-41c0-8b03-792c7c84fc31}</Project>
|
<Project>{0382e8fd-cfdc-41c0-8b03-792c7c84fc31}</Project>
|
||||||
|
|
Loading…
Reference in New Issue