mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 23:24:18 +00:00
Merge remote branch 'fsorig/master'
This commit is contained in:
commit
1f08e2b0ec
683 files changed
+43414
-75312
No files matched your search
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, Anthony Minessale II
|
||||
* Copyright (c) 2008-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, Anthony Minessale II
|
||||
* Copyright (c) 2008-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* Copyright (c) 2010, Stefan Knoblich <s.knoblich@axsentis.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -114,42 +114,40 @@ static FIO_CHANNEL_REQUEST_FUNCTION(isdn_channel_request)
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
/**
|
||||
* \brief Logs a libpri error
|
||||
* \param s Error string
|
||||
*/
|
||||
static void s_pri_error(char *s)
|
||||
#else
|
||||
/**
|
||||
* \brief Logs a libpri error
|
||||
* \param pri libpri structure (unused)
|
||||
* \param s Error string
|
||||
*/
|
||||
static void s_pri_error(struct pri *pri, char *s)
|
||||
#endif
|
||||
{
|
||||
ftdm_log(FTDM_LOG_ERROR, "%s", s);
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
/**
|
||||
* \brief Logs a libpri message
|
||||
* \param s Message string
|
||||
*/
|
||||
static void s_pri_message(char *s)
|
||||
#else
|
||||
/**
|
||||
* \brief Logs a libpri message
|
||||
* \param pri libpri structure (unused)
|
||||
* \param s Message string
|
||||
* \param pri libpri structure
|
||||
* \param s Message string
|
||||
*/
|
||||
static void s_pri_message(struct pri *pri, char *s)
|
||||
#endif
|
||||
{
|
||||
ftdm_log(FTDM_LOG_DEBUG, "%s", s);
|
||||
struct lpwrap_pri *spri = pri_get_userdata(pri);
|
||||
|
||||
if (spri && spri->dchan) {
|
||||
ftdm_log_chan(spri->dchan, FTDM_LOG_DEBUG, "%s", s);
|
||||
} else {
|
||||
ftdm_log(FTDM_LOG_DEBUG, "%s", s);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Logs a libpri error
|
||||
* \param pri libpri structure
|
||||
* \param s Error string
|
||||
*/
|
||||
static void s_pri_error(struct pri *pri, char *s)
|
||||
{
|
||||
struct lpwrap_pri *spri = pri_get_userdata(pri);
|
||||
|
||||
if (spri && spri->dchan) {
|
||||
ftdm_log_chan(spri->dchan, FTDM_LOG_ERROR, "%s", s);
|
||||
} else {
|
||||
ftdm_log(FTDM_LOG_ERROR, "%s", s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define PRI_DEBUG_Q921_ALL (PRI_DEBUG_Q921_RAW | PRI_DEBUG_Q921_DUMP | PRI_DEBUG_Q921_STATE)
|
||||
#define PRI_DEBUG_Q931_ALL (PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q931_ANOMALY)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, Anthony Minessale II
|
||||
* Copyright (c) 2009-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, Anthony Minessale II
|
||||
* Copyright (c) 2009-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, Anthony Minessale II
|
||||
* Copyright (c) 2009-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -45,8 +45,6 @@
|
||||
#include <poll.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <sys/timerfd.h>
|
||||
|
||||
/* this is how it should have been...
|
||||
#ifdef HAVE_FREETDM_FREETDM_H
|
||||
#include <freetdm/freetdm.h>
|
||||
@@ -256,7 +254,6 @@ struct misdn_chan_private {
|
||||
/* */
|
||||
int state;
|
||||
int debugfd;
|
||||
int timerfd;
|
||||
int active;
|
||||
|
||||
/* hw addr of channel */
|
||||
@@ -941,36 +938,7 @@ static FIO_OPEN_FUNCTION(misdn_open)
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "mISDN channel activation request sent\n");
|
||||
|
||||
switch (ftdmchan->type) {
|
||||
case FTDM_CHAN_TYPE_B: {
|
||||
#if 0
|
||||
struct itimerspec its = {
|
||||
.it_interval = { 0, 0 },
|
||||
.it_value = { 0, 0 },
|
||||
};
|
||||
|
||||
its.it_interval.tv_nsec = (ftdmchan->effective_interval * 1000000);
|
||||
its.it_value.tv_nsec = (ftdmchan->effective_interval * 1000000);
|
||||
|
||||
/* create tx timerfd */
|
||||
chan_priv->timerfd = timerfd_create(CLOCK_MONOTONIC, O_NONBLOCK);
|
||||
if (chan_priv->timerfd < 0) {
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "mISDN failed to create b-channel tx interval timer: %s\n",
|
||||
strerror(errno));
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
/* start tx timerfd */
|
||||
ret = timerfd_settime(chan_priv->timerfd, 0, &its, NULL);
|
||||
if (ret < 0) {
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "mISDN failed to start b-channel tx interval timer: %s\n",
|
||||
strerror(errno));
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "mISDN created tx interval (%d ms) timer\n",
|
||||
ftdmchan->effective_interval);
|
||||
#endif
|
||||
}
|
||||
case FTDM_CHAN_TYPE_B:
|
||||
case FTDM_CHAN_TYPE_DQ921:
|
||||
chan_priv->state = MISDN_CHAN_STATE_OPEN;
|
||||
break;
|
||||
@@ -998,15 +966,6 @@ static FIO_CLOSE_FUNCTION(misdn_close)
|
||||
|
||||
/* deactivate b-channels on close */
|
||||
if (ftdm_channel_get_type(ftdmchan) == FTDM_CHAN_TYPE_B) {
|
||||
#if 0
|
||||
/*
|
||||
* Stop tx timerfd
|
||||
*/
|
||||
if (chan_priv->timerfd >= 0) {
|
||||
close(chan_priv->timerfd);
|
||||
chan_priv->timerfd = -1;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Send deactivation request (don't wait for answer)
|
||||
*/
|
||||
@@ -1570,7 +1529,6 @@ static ftdm_status_t misdn_open_range(ftdm_span_t *span, ftdm_chan_type_t type,
|
||||
|
||||
priv->addr = addr;
|
||||
priv->debugfd = -1;
|
||||
priv->timerfd = -1;
|
||||
|
||||
/*
|
||||
* Create event queue
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -953,6 +953,12 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event)
|
||||
break;
|
||||
case 2: /* overlap sending */
|
||||
switch (ftdmchan->state) {
|
||||
case FTDM_CHANNEL_STATE_COLLECT:
|
||||
/* T302 Timeout reached */
|
||||
/* Send the call to user, and see if they accept it */
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "T302 Timer expired, proceeding with call\n");
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_RING);
|
||||
break;
|
||||
case FTDM_CHANNEL_STATE_PROCEED:
|
||||
case FTDM_CHANNEL_STATE_PROGRESS:
|
||||
case FTDM_CHANNEL_STATE_RINGING:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -561,7 +561,7 @@ static FIO_CONFIGURE_FUNCTION(zt_configure)
|
||||
}
|
||||
} else if (!strcasecmp(var, "echo_cancel_level")) {
|
||||
num = atoi(val);
|
||||
if (num < 0 || num > 256) {
|
||||
if (num < 0 || num > 1024) {
|
||||
ftdm_log(FTDM_LOG_WARNING, "invalid echo can val at line %d\n", lineno);
|
||||
} else {
|
||||
zt_globals.eclevel = num;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Anthony Minessale II
|
||||
* Copyright (c) 2007-2012, Anthony Minessale II
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
Reference in new issue
Block a user