more naming changes
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@971 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
526cb45c93
commit
1b47133795
|
@ -27,7 +27,7 @@
|
|||
* Moises Silva <moy@sangoma.com>
|
||||
*
|
||||
*
|
||||
* mod_freetdm.c -- OPENFTDM Endpoint Module
|
||||
* mod_freetdm.c -- FreeTDM Endpoint Module
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
@ -37,8 +37,8 @@
|
|||
#define __FUNCTION__ __SWITCH_FUNC__
|
||||
#endif
|
||||
|
||||
#define OPENFTDM_VAR_PREFIX "freetdm_"
|
||||
#define OPENFTDM_VAR_PREFIX_LEN 8
|
||||
#define FREETDM_VAR_PREFIX "freetdm_"
|
||||
#define FREETDM_VAR_PREFIX_LEN 8
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_freetdm_load);
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_freetdm_shutdown);
|
||||
|
@ -1181,8 +1181,8 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
|
||||
ftdm_channel_clear_vars(ftdmchan);
|
||||
for (h = var_event->headers; h; h = h->next) {
|
||||
if (!strncasecmp(h->name, OPENFTDM_VAR_PREFIX, OPENFTDM_VAR_PREFIX_LEN)) {
|
||||
char *v = h->name + OPENFTDM_VAR_PREFIX_LEN;
|
||||
if (!strncasecmp(h->name, FREETDM_VAR_PREFIX, FREETDM_VAR_PREFIX_LEN)) {
|
||||
char *v = h->name + FREETDM_VAR_PREFIX_LEN;
|
||||
if (!zstr(v)) {
|
||||
ftdm_channel_add_var(ftdmchan, v, h->value);
|
||||
}
|
||||
|
@ -1204,7 +1204,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||
goto fail;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "OpenFTDM/%u:%u/%s", ftdmchan->span_id, ftdmchan->chan_id, dest);
|
||||
snprintf(name, sizeof(name), "FreeTDM/%u:%u/%s", ftdmchan->span_id, ftdmchan->chan_id, dest);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Connect outbound channel %s\n", name);
|
||||
switch_channel_set_name(channel, name);
|
||||
switch_channel_set_variable(channel, "freetdm_span_name", ftdmchan->span->name);
|
||||
|
@ -1293,7 +1293,7 @@ ftdm_status_t ftdm_channel_from_event(ftdm_sigmsg_t *sigmsg, switch_core_session
|
|||
}
|
||||
|
||||
tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
|
||||
"OpenFTDM",
|
||||
"FreeTDM",
|
||||
SPAN_CONFIG[sigmsg->channel->span_id].dialplan,
|
||||
sigmsg->channel->caller_data.cid_name,
|
||||
sigmsg->channel->caller_data.cid_num.digits,
|
||||
|
@ -1315,7 +1315,7 @@ ftdm_status_t ftdm_channel_from_event(ftdm_sigmsg_t *sigmsg, switch_core_session
|
|||
switch_set_flag(tech_pvt->caller_profile, SWITCH_CPF_HIDE_NAME | SWITCH_CPF_HIDE_NUMBER);
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "OpenFTDM/%u:%u/%s", sigmsg->channel->span_id, sigmsg->channel->chan_id, tech_pvt->caller_profile->destination_number);
|
||||
snprintf(name, sizeof(name), "FreeTDM/%u:%u/%s", sigmsg->channel->span_id, sigmsg->channel->chan_id, tech_pvt->caller_profile->destination_number);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Connect inbound channel %s\n", name);
|
||||
switch_channel_set_name(channel, name);
|
||||
switch_channel_set_caller_profile(channel, tech_pvt->caller_profile);
|
||||
|
@ -1966,7 +1966,7 @@ static switch_status_t load_config(void)
|
|||
}
|
||||
|
||||
if (zstatus != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding OpenFTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding FreeTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1981,7 +1981,7 @@ static switch_status_t load_config(void)
|
|||
"hotline", hotline,
|
||||
"enable_callerid", enable_callerid,
|
||||
TAG_END) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting OpenFTDM span %d\n", span_id);
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting FreeTDM span %d\n", span_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2081,7 +2081,7 @@ static switch_status_t load_config(void)
|
|||
}
|
||||
|
||||
if (zstatus != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding OpenFTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding FreeTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2095,7 +2095,7 @@ static switch_status_t load_config(void)
|
|||
"digit_timeout", &to,
|
||||
"max_dialstr", &max,
|
||||
TAG_END) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting OpenFTDM span %d\n", span_id);
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting FreeTDM span %d\n", span_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2194,7 +2194,7 @@ static switch_status_t load_config(void)
|
|||
}
|
||||
|
||||
if (zstatus != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding OpenFTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding FreeTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2215,7 +2215,7 @@ static switch_status_t load_config(void)
|
|||
"q921loglevel", q921loglevel,
|
||||
"q931loglevel", q931loglevel,
|
||||
TAG_END) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting OpenFTDM span %d mode: %s dialect: %s error: %s\n", span_id, mode, dialect, span->last_error);
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting FreeTDM span %d mode: %s dialect: %s error: %s\n", span_id, mode, dialect, span->last_error);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2291,7 +2291,7 @@ static switch_status_t load_config(void)
|
|||
}
|
||||
|
||||
if (zstatus != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding OpenFTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding FreeTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2308,7 +2308,7 @@ static switch_status_t load_config(void)
|
|||
"debug", o_debug,
|
||||
"opts", opts,
|
||||
TAG_END) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting OpenFTDM span %d node: %s switch: %s dp: %s l1: %s debug: %s error: %s\n",
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting FreeTDM span %d node: %s switch: %s dp: %s l1: %s debug: %s error: %s\n",
|
||||
span_id, switch_str_nil(o_node), switch_str_nil(o_switch), switch_str_nil(o_dp), switch_str_nil(o_l1), switch_str_nil(o_debug),
|
||||
span->last_error);
|
||||
continue;
|
||||
|
@ -2386,7 +2386,7 @@ static switch_status_t load_config(void)
|
|||
}
|
||||
|
||||
if (zstatus != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding OpenFTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding FreeTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2395,7 +2395,7 @@ static switch_status_t load_config(void)
|
|||
}
|
||||
|
||||
if (ftdm_configure_span_signaling("sangoma_boost", span, on_clear_channel_signal, spanparameters) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting OpenFTDM span %d error: %s\n", span_id, span->last_error);
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting FreeTDM span %d error: %s\n", span_id, span->last_error);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2521,7 +2521,7 @@ static switch_status_t load_config(void)
|
|||
}
|
||||
|
||||
if (zstatus != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding OpenFTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding FreeTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2548,7 +2548,7 @@ static switch_status_t load_config(void)
|
|||
"mfback_timeout", mfback_timeout,
|
||||
"metering_pulse_timeout", metering_pulse_timeout,
|
||||
TAG_END) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error configuring R2 OpenFTDM span %d, error: %s\n",
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error configuring R2 FreeTDM span %d, error: %s\n",
|
||||
span_id, span->last_error);
|
||||
continue;
|
||||
}
|
||||
|
@ -2567,7 +2567,7 @@ static switch_status_t load_config(void)
|
|||
switch_copy_string(SPAN_CONFIG[span->span_id].type, "r2", sizeof(SPAN_CONFIG[span->span_id].type));
|
||||
|
||||
if (ftdm_span_start(span) == FTDM_FAIL) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting R2 OpenFTDM span %d, error: %s\n", span_id, span->last_error);
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting R2 FreeTDM span %d, error: %s\n", span_id, span->last_error);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -2579,7 +2579,7 @@ static switch_status_t load_config(void)
|
|||
boost_span = boost_spans[i];
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Starting boost span %d\n", boost_span->span_id);
|
||||
if (ftdm_span_start(boost_span) == FTDM_FAIL) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting boost OpenFTDM span %d, error: %s\n", boost_span->span_id, boost_span->last_error);
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error starting boost FreeTDM span %d, error: %s\n", boost_span->span_id, boost_span->last_error);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -2954,7 +2954,7 @@ SWITCH_STANDARD_APP(disable_ec_function)
|
|||
int x = 0;
|
||||
|
||||
if (!switch_core_session_check_interface(session, freetdm_endpoint_interface)) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "This application is only for OpenFTDM channels.\n");
|
||||
ftdm_log(FTDM_LOG_ERROR, "This application is only for FreeTDM channels.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2976,12 +2976,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_freetdm_load)
|
|||
ftdm_global_set_logger(ftdm_logger);
|
||||
|
||||
if (ftdm_global_init() != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error loading OpenFTDM\n");
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error loading FreeTDM\n");
|
||||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
||||
if (ftdm_global_configuration() != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error configuring OpenFTDM\n");
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error configuring FreeTDM\n");
|
||||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
||||
|
@ -2996,7 +2996,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_freetdm_load)
|
|||
freetdm_endpoint_interface->io_routines = &freetdm_io_routines;
|
||||
freetdm_endpoint_interface->state_handler = &freetdm_state_handlers;
|
||||
|
||||
SWITCH_ADD_API(commands_api_interface, "ft", "OpenFTDM commands", ft_function, FT_SYNTAX);
|
||||
SWITCH_ADD_API(commands_api_interface, "ft", "FreeTDM commands", ft_function, FT_SYNTAX);
|
||||
|
||||
SWITCH_ADD_APP(app_interface, "disable_ec", "Disable Echo Canceller", "Disable Echo Canceller", disable_ec_function, "", SAF_NONE);
|
||||
|
||||
|
|
|
@ -1025,7 +1025,7 @@ static L3INT ftdm_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen)
|
|||
/*
|
||||
* !! HACK ALERT !!
|
||||
*
|
||||
* Map OpenFTDM channel states to Q.931 states
|
||||
* Map FreeTDM channel states to Q.931 states
|
||||
*/
|
||||
Q931ie_CallState state;
|
||||
Q931ie_Cause cause;
|
||||
|
|
|
@ -524,7 +524,7 @@ static unsigned pika_open_range(ftdm_span_t *span, unsigned boardno, unsigned sp
|
|||
chan_data->play_config.encoding = PKH_RECORD_ENCODING_MU_LAW;
|
||||
chan_data->play_config.samplingRate = PKH_RECORD_SAMPLING_RATE_8KHZ;
|
||||
chan_data->play_config.AGC.enabled = PK_FALSE;
|
||||
ftdm_log(FTDM_LOG_INFO, "configuring device b%ds%dc%d as OpenFTDM device %d:%d\n", boardno, spanno, x, chan->span_id, chan->chan_id);
|
||||
ftdm_log(FTDM_LOG_INFO, "configuring device b%ds%dc%d as FreeTDM device %d:%d\n", boardno, spanno, x, chan->span_id, chan->chan_id);
|
||||
|
||||
if (profile) {
|
||||
ftdm_log(FTDM_LOG_INFO, "applying config profile %s to device %d:%d\n", profile->name, chan->span_id, chan->chan_id);
|
||||
|
|
|
@ -334,7 +334,7 @@ static unsigned wp_open_range(ftdm_span_t *span, unsigned spanno, unsigned start
|
|||
ftdm_copy_string(chan->chan_number, number, sizeof(chan->chan_number));
|
||||
}
|
||||
configured++;
|
||||
ftdm_log(FTDM_LOG_INFO, "configuring device s%dc%d as OpenFTDM device %d:%d fd:%d DTMF: %s\n",
|
||||
ftdm_log(FTDM_LOG_INFO, "configuring device s%dc%d as FreeTDM device %d:%d fd:%d DTMF: %s\n",
|
||||
spanno, x, chan->span_id, chan->chan_id, sockfd, dtmf);
|
||||
|
||||
} else {
|
||||
|
|
|
@ -279,7 +279,7 @@ static unsigned zt_open_range(ftdm_span_t *span, unsigned start, unsigned end, f
|
|||
binfo.numbufs = 32;
|
||||
binfo.bufsize = 1024;
|
||||
if (ioctl(sockfd, codes.SET_BUFINFO, &binfo)) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as OpenFTDM device %d:%d fd:%d\n", chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd);
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as FreeTDM device %d:%d fd:%d\n", chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd);
|
||||
close(sockfd);
|
||||
continue;
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ static unsigned zt_open_range(ftdm_span_t *span, unsigned start, unsigned end, f
|
|||
cc.sigtype = ZT_SIG_CAS;
|
||||
cc.idlebits = cas_bits;
|
||||
if (ioctl(CONTROL_FD, codes.CHANCONFIG, &cc)) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as OpenFTDM device %d:%d fd:%d err:%s", chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd, strerror(errno));
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as FreeTDM device %d:%d fd:%d err:%s", chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd, strerror(errno));
|
||||
close(sockfd);
|
||||
continue;
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ static unsigned zt_open_range(ftdm_span_t *span, unsigned start, unsigned end, f
|
|||
if (ftdmchan->type != FTDM_CHAN_TYPE_DQ921 && ftdmchan->type != FTDM_CHAN_TYPE_DQ931) {
|
||||
len = zt_globals.codec_ms * 8;
|
||||
if (ioctl(ftdmchan->sockfd, codes.SET_BLOCKSIZE, &len)) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as OpenFTDM device %d:%d fd:%d err:%s\n",
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as FreeTDM device %d:%d fd:%d err:%s\n",
|
||||
chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd, strerror(errno));
|
||||
close(sockfd);
|
||||
continue;
|
||||
|
@ -365,7 +365,7 @@ static unsigned zt_open_range(ftdm_span_t *span, unsigned start, unsigned end, f
|
|||
}
|
||||
|
||||
if (ioctl(sockfd, codes.GET_PARAMS, &ztp) < 0) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as OpenFTDM device %d:%d fd:%d\n", chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd);
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as FreeTDM device %d:%d fd:%d\n", chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd);
|
||||
close(sockfd);
|
||||
continue;
|
||||
}
|
||||
|
@ -376,13 +376,13 @@ static unsigned zt_open_range(ftdm_span_t *span, unsigned start, unsigned end, f
|
|||
(ztp.sig_type != ZT_SIG_HDLCFCS) &&
|
||||
(ztp.sig_type != ZT_SIG_HARDHDLC)
|
||||
) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Failure configuring device %s as OpenFTDM device %d:%d fd:%d, hardware signaling is not HDLC, fix your Zap/DAHDI configuration!\n", chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd);
|
||||
ftdm_log(FTDM_LOG_ERROR, "Failure configuring device %s as FreeTDM device %d:%d fd:%d, hardware signaling is not HDLC, fix your Zap/DAHDI configuration!\n", chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd);
|
||||
close(sockfd);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
ftdm_log(FTDM_LOG_INFO, "configuring device %s channel %d as OpenFTDM device %d:%d fd:%d\n", chanpath, x, ftdmchan->span_id, ftdmchan->chan_id, sockfd);
|
||||
ftdm_log(FTDM_LOG_INFO, "configuring device %s channel %d as FreeTDM device %d:%d fd:%d\n", chanpath, x, ftdmchan->span_id, ftdmchan->chan_id, sockfd);
|
||||
|
||||
ftdmchan->rate = 8000;
|
||||
ftdmchan->physical_span_id = ztp.span_no;
|
||||
|
@ -411,7 +411,7 @@ static unsigned zt_open_range(ftdm_span_t *span, unsigned start, unsigned end, f
|
|||
ztp.flash_time = zt_globals.flash_ms;
|
||||
|
||||
if (ioctl(sockfd, codes.SET_PARAMS, &ztp) < 0) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as OpenFTDM device %d:%d fd:%d\n", chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd);
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as FreeTDM device %d:%d fd:%d\n", chanpath, ftdmchan->span_id, ftdmchan->chan_id, sockfd);
|
||||
close(sockfd);
|
||||
continue;
|
||||
}
|
||||
|
@ -632,7 +632,7 @@ static ZIO_OPEN_FUNCTION(zt_open)
|
|||
ftdm_log(FTDM_LOG_INFO, "Setting txgain to %f on channel %d\n", zt_globals.txgain, gains.chan_no);
|
||||
|
||||
if (ioctl(ftdmchan->sockfd, codes.SETGAINS, &gains) < 0) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as OpenFTDM device %d:%d fd:%d\n", chanpath, ftdmchan->span_id, ftdmchan->chan_id, ftdmchan->sockfd);
|
||||
ftdm_log(FTDM_LOG_ERROR, "failure configuring device %s as FreeTDM device %d:%d fd:%d\n", chanpath, ftdmchan->span_id, ftdmchan->chan_id, ftdmchan->sockfd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -282,11 +282,11 @@ int main(int argc, char *argv[])
|
|||
|
||||
ftdm_global_set_default_logger(FTDM_LOG_LEVEL_DEBUG);
|
||||
if (ftdm_global_init() != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error loading OpenFTDM\n");
|
||||
fprintf(stderr, "Error loading FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
printf("OpenFTDM loaded\n");
|
||||
printf("FreeTDM loaded\n");
|
||||
|
||||
|
||||
debug = PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE;
|
||||
|
|
|
@ -85,14 +85,14 @@ int main(int argc, char *argv[])
|
|||
ftdm_global_set_default_logger(FTDM_LOG_LEVEL_DEBUG);
|
||||
|
||||
if (ftdm_global_init() != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error loading OpenFTDM\n");
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error loading FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
ftdm_log(FTDM_LOG_DEBUG, "OpenFTDM loaded\n");
|
||||
ftdm_log(FTDM_LOG_DEBUG, "FreeTDM loaded\n");
|
||||
|
||||
if (ftdm_span_find(span_id, &span) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding OpenFTDM span\n");
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error finding FreeTDM span\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ int main(int argc, char *argv[])
|
|||
"max_dialstr", &max_dialstr,
|
||||
TAG_END
|
||||
) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error configuring OpenFTDM span\n");
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error configuring FreeTDM span\n");
|
||||
goto done;
|
||||
}
|
||||
ftdm_span_start(span);
|
||||
|
|
|
@ -10,11 +10,11 @@ int main(int argc, char *argv[])
|
|||
|
||||
|
||||
if (ftdm_global_init() != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error loading OpenFTDM\n");
|
||||
fprintf(stderr, "Error loading FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
printf("OpenFTDM loaded\n");
|
||||
printf("FreeTDM loaded\n");
|
||||
|
||||
top:
|
||||
//if (ftdm_channel_open_any("wanpipe", 0, FTDM_TOP_DOWN, &chan) == FTDM_SUCCESS) {
|
||||
|
|
|
@ -31,18 +31,18 @@ int main(int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
if (ftdm_global_init() != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error loading OpenFTDM\n");
|
||||
fprintf(stderr, "Error loading FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
if (ftdm_global_configuration() != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error configuring OpenFTDM\n");
|
||||
fprintf(stderr, "Error configuring FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
printf("OpenFTDM loaded\n");
|
||||
printf("FreeTDM loaded\n");
|
||||
|
||||
if (ftdm_span_find_by_name("wp1", &span) != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error finding OpenFTDM span %s\n", argv[1]);
|
||||
fprintf(stderr, "Error finding FreeTDM span %s\n", argv[1]);
|
||||
goto done;
|
||||
}
|
||||
parameters[0].var = "sigmod";
|
||||
|
|
|
@ -27,14 +27,14 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (ftdm_global_init() != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error loading OpenFTDM\n");
|
||||
fprintf(stderr, "Error loading FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
printf("OpenFTDM loaded\n");
|
||||
printf("FreeTDM loaded\n");
|
||||
|
||||
if (ftdm_span_find(atoi(argv[1]), &span) != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error finding OpenFTDM span\n");
|
||||
fprintf(stderr, "Error finding FreeTDM span\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,14 +29,14 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (ftdm_global_init() != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error loading OpenFTDM\n");
|
||||
fprintf(stderr, "Error loading FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
printf("OpenFTDM loaded\n");
|
||||
printf("FreeTDM loaded\n");
|
||||
|
||||
if (ftdm_span_find(atoi(argv[1]), &span) != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error finding OpenFTDM span\n");
|
||||
fprintf(stderr, "Error finding FreeTDM span\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
@ -104,14 +104,14 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (ftdm_global_init() != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error loading OpenFTDM\n");
|
||||
fprintf(stderr, "Error loading FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
printf("OpenFTDM loaded\n");
|
||||
printf("FreeTDM loaded\n");
|
||||
|
||||
if (ftdm_span_find(atoi(argv[1]), &span) != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error finding OpenFTDM span\n");
|
||||
fprintf(stderr, "Error finding FreeTDM span\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,14 +31,14 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (ftdm_global_init() != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error loading OpenFTDM\n");
|
||||
fprintf(stderr, "Error loading FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
printf("OpenFTDM loaded\n");
|
||||
printf("FreeTDM loaded\n");
|
||||
|
||||
if (ftdm_span_find(atoi(argv[1]), &span) != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error finding OpenFTDM span\n");
|
||||
fprintf(stderr, "Error finding FreeTDM span\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,19 +29,19 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (ftdm_global_init() != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error loading OpenFTDM\n");
|
||||
fprintf(stderr, "Error loading FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (ftdm_global_configuration() != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error configuring OpenFTDM\n");
|
||||
fprintf(stderr, "Error configuring FreeTDM\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
printf("OpenFTDM loaded\n");
|
||||
printf("FreeTDM loaded\n");
|
||||
|
||||
if (ftdm_span_find(atoi(argv[1]), &span) != FTDM_SUCCESS) {
|
||||
fprintf(stderr, "Error finding OpenFTDM span\n");
|
||||
fprintf(stderr, "Error finding FreeTDM span\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue