-DLOG_DIR="\"$(LOGdir)\"" \
-DEXTENSION_DATA="\"$(EXTENSIONdir)\""
+if ENABLE_MISDN
+
+MISDN_INCLUDE = -DWITH_MISDN -DWITH_CRYPT
+MISDN_SOURCE = mISDN.cpp dss1.cpp loop.c crypt.cpp remote.cpp joinremote.cpp
+MISDN_LIB = -lmisdn
+
+endif
+
GSM_INCLUDE =
GSM_SOURCE =
GSM_LIB =
$(INSTALL) chan_lcr.so $(astmoddir)
endif
-INCLUDES = $(all_includes) $(GSM_INCLUDE) $(SS5_INCLUDE) $(SIP_INCLUDE) -Wall $(INSTALLATION_DEFINES)
+INCLUDES = $(all_includes) $(MISDN_INCLUDE) $(GSM_INCLUDE) $(SS5_INCLUDE) $(SIP_INCLUDE) -Wall $(INSTALLATION_DEFINES)
lcr_SOURCES = \
main.c select.c trace.c options.c tones.c alawulaw.c cause.c interface.c message.c callerid.c socket_server.c \
- port.cpp vbox.cpp mISDN.cpp dss1.cpp loop.c remote.cpp \
- $(GSM_SOURCE) $(SS5_SOURCE) $(SIP_SOURCE) \
+ port.cpp vbox.cpp \
+ $(MISDN_SOURCE) $(GSM_SOURCE) $(SS5_SOURCE) $(SIP_SOURCE) \
endpoint.cpp endpointapp.cpp \
- appbridge.cpp apppbx.cpp route.c action.cpp action_efi.cpp action_vbox.cpp extension.c crypt.cpp mail.c \
- join.cpp joinpbx.cpp joinremote.cpp
+ appbridge.cpp apppbx.cpp route.c action.cpp action_efi.cpp action_vbox.cpp extension.c mail.c \
+ join.cpp joinpbx.cpp
-lcr_LDADD = $(LIBCRYPTO) -lmisdn -lpthread $(GSM_LIB) $(SIP_LIB)
+lcr_LDADD = $(LIBCRYPTO) $(MISDN_LIB) -lpthread $(GSM_LIB) $(SIP_LIB)
lcradmin_SOURCES = lcradmin.c cause.c options.c
int EndpointAppPBX::_action_init_call(char *remote)
{
class Join *join;
- struct port_list *portlist = ea_endpoint->ep_portlist;
- struct admin_list *admin;
/* a created call, this should never happen */
if (ea_endpoint->ep_join_id) {
/* create join */
PDEBUG(DEBUG_EPOINT, "EPOINT(%d): Creating new join instance.\n", ea_endpoint->ep_serial);
+#ifdef WITH_MISDN
if (remote) {
+ struct port_list *portlist = ea_endpoint->ep_portlist;
+ struct admin_list *admin;
+
admin = admin_first;
while(admin) {
if (admin->remote_name[0] && !strcmp(admin->remote_name, remote))
return(0);
}
join = new JoinRemote(ea_endpoint->ep_serial, remote, admin->sock);
- }
- else
+ } else
+#endif
join = new JoinPBX(ea_endpoint);
if (!join)
FATAL("No memoy for Join instance.\n");
{
class EndpointAppPBX **apppointer;
+#ifdef WITH_CRYPT
memset(&e_crypt_handler, 0, sizeof(e_crypt_handler));
add_timer(&e_crypt_handler, crypt_handler, this, 0);
+#endif
memset(&e_vbox_refresh, 0, sizeof(e_vbox_refresh));
add_timer(&e_vbox_refresh, vbox_refresh, this, 0);
memset(&e_action_timeout, 0, sizeof(e_action_timeout));
e_multipoint_cause = 0;
e_multipoint_location = 0;
e_dialing_queue[0] = '\0';
+#ifdef WITH_CRYPT
e_crypt = CRYPT_OFF;
e_crypt_state = CM_ST_NULL;
e_crypt_keyengine_busy = 0;
- e_crypt_info[0] = '\0';
+ e_crypt_info[0] = '\0';
+#endif
e_overlap = 0;
e_vbox[0] = '\0';
e_tx_state = NOTIFY_STATE_ACTIVE;
{
class EndpointAppPBX *temp, **tempp;
+#ifdef WITH_CRYPT
del_timer(&e_crypt_handler);
+#endif
del_timer(&e_vbox_refresh);
del_timer(&e_action_timeout);
del_timer(&e_match_timeout);
e_multipoint_cause = 0;
e_multipoint_location = 0;
e_dialing_queue[0] = '\0';
+#ifdef WITH_CRYPT
e_crypt = 0;
e_crypt_state = CM_ST_NULL;
e_crypt_keyengine_busy = 0;
e_crypt_info[0] = '\0';
+#endif
e_tone[0] = '\0';
e_overlap = 0;
e_vbox[0] = '\0';
join_join();
break;
+#ifdef WITH_CRYPT
/* crypt shared */
case '7':
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) shared key encryption selected.\n", ea_endpoint->ep_serial);
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) encryption off selected.\n", ea_endpoint->ep_serial);
encrypt_off();
break;
+#endif
default:
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) unsupported keypad digit '%c'.\n", ea_endpoint->ep_serial, digit);
}
+#ifdef WITH_MISDN
/*
* hunts an mISDNport that is available for an outgoing call
* if no ifname was given, any interface that is not an extension
return(NULL); /* no port found */
}
+#endif
/* outgoing setup to port(s)
* ports will be created and a setup is sent if everything is ok. otherwhise
const char *p;
char cfp[64];
struct interface *interface;
+#ifdef WITH_MISDN
struct mISDNport *mISDNport;
+#endif
char portname[32];
char *dirname;
class EndpointAppPBX *atemp;
char ifname[sizeof(e_ext.interfaces)],
number[256];
struct port_settings port_settings;
+#ifdef WITH_MISDN
int channel = 0;
+ struct admin_list *admin;
+#endif
int earlyb;
int mode = B_MODE_TRANSPARENT;
- struct admin_list *admin;
/* set bchannel mode */
mode = e_capainfo.source_mode;
} else
#endif
{
+#ifdef WITH_MISDN
/* hunt for mISDNport and create Port */
mISDNport = hunt_port(ifname, &channel);
if (!mISDNport) {
} else
port = new Pdss1((mISDNport->ntmode)?PORT_TYPE_DSS1_NT_OUT:PORT_TYPE_DSS1_TE_OUT, mISDNport, portname, &port_settings, channel, mISDNport->ifport->channel_force, mode);
earlyb = mISDNport->earlyb;
+#else
+ trace_header("INTERFACE (has no function)", DIRECTION_NONE);
+ add_trace("interface", NULL, "%s", ifname);
+ end_trace();
+ continue;
+#endif
}
if (!port)
FATAL("Failed to create Port instance\n");
p++;
/* external call */
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) cfp external %s\n", ea_endpoint->ep_serial, cfp);
+#ifdef WITH_MISDN
/* hunt for mISDNport and create Port */
mISDNport = hunt_port(e_dialinginfo.interfaces[0]?e_dialinginfo.interfaces:NULL, &channel);
if (mISDNport) {
if (!port)
FATAL("No memory for Port instance\n");
earlyb = mISDNport->earlyb;
- } else {
+ } else
+#endif
+ {
port = NULL;
trace_header("INTERFACE (too busy)", DIRECTION_NONE);
add_trace("interface", NULL, "%s", e_dialinginfo.interfaces[0]?e_dialinginfo.interfaces:"any interface");
} else
#endif
{
+#ifdef WITH_MISDN
/* hunt for mISDNport and create Port */
mISDNport = hunt_port(e_dialinginfo.interfaces[0]?e_dialinginfo.interfaces:NULL, &channel);
if (!mISDNport) {
} else
port = new Pdss1((mISDNport->ntmode)?PORT_TYPE_DSS1_NT_OUT:PORT_TYPE_DSS1_TE_OUT, mISDNport, portname, &port_settings, channel, mISDNport->ifport->channel_force, mode);
earlyb = mISDNport->earlyb;
+#else
+ trace_header("INTERFACE (has no function)", DIRECTION_NONE);
+ add_trace("interface", NULL, "%s", ifname);
+ end_trace();
+ continue;
+#endif
}
if (!port)
FATAL("No memory for Port instance\n");
/* port MESSAGE_CRYPT */
void EndpointAppPBX::port_crypt(struct port_list *portlist, int message_type, union parameter *param)
{
+#ifdef WITH_CRYPT
/* send crypt response to cryptman */
if (param->crypt.type == CR_MESSAGE_IND)
cryptman_msg2man(param->crypt.data, param->crypt.len);
else
cryptman_message(param->crypt.type, param->crypt.data, param->crypt.len);
+#endif
}
/* port MESSAGE_OVERLAP */
message_put(message);
/* disable encryption if disconnected */
//PERROR("REMOVE ME: state =%d, %d\n", e_crypt_state, e_crypt);
+#ifdef WITH_CRYPT
if (e_crypt_state)
cryptman_message(CI_DISCONNECT_IND, NULL, 0);
+#endif
return;
} else {
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) the port has no patterns.\n", ea_endpoint->ep_serial);
/* join MESSAGE_CRYPT */
void EndpointAppPBX::join_crypt(struct port_list *portlist, int message_type, union parameter *param)
{
+#ifdef WITH_CRYPT
switch(param->crypt.type) {
/* message from remote port to "crypt manager" */
case CU_ACTK_REQ: /* activate key-exchange */
default:
PERROR("EPOINT(%d) epoint with terminal '%s' (caller id '%s') unknown crypt message: '%d'\n", ea_endpoint->ep_serial, e_ext.number, e_callerinfo.id, param->crypt.type);
}
+#endif
}
/* join MESSAGE_INFORMATION */
*/
void EndpointAppPBX::join_join(void)
{
+#ifdef WITH_MISDN
struct lcr_msg *message;
struct join_relation *our_relation, *other_relation;
struct join_relation **our_relation_pointer, **other_relation_pointer;
/* we send a retrieve to that endpoint */
// mixer will update the hold-state of the join and send it to the endpoints is changes
+#else
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d) cannot join: no mISDN support anyway.\n", ea_endpoint->ep_serial);
+#endif
}
/* efi */
int e_efi_state; /* current spoken sample */
int e_efi_digit; /* current spoken digit */
-
+
+#ifdef WITH_CRYPT
/* crypt states and vars */
int e_crypt; /* current user level crypt state */
int e_crypt_state; /* current crypt manager state */
int e_crypt_keyengine_busy; /* current job and busy state */
int e_crypt_keyengine_return; /* return */
struct lcr_timer e_crypt_handler; /* poll timer for crypt events */
+#endif
/* messages */
void hookflash(void);
dnl enable this to have all special options on one place
dnl AC_PRESERVE_HELP_ORDER
+# check for mISDN
+AC_ARG_WITH([misdn],
+ [AS_HELP_STRING([--with-misdn],
+ [compile with mISDN driver @<:@default=check@:>@])
+ ],
+ [],
+ [with_misdn="check"])
+
+AS_IF([test "x$with_misdn" != xno],
+ [AC_CHECK_HEADERS([mISDN/mISDNif.h],
+ [with_misdn="yes"],
+ [if test "x$with_misdn" != xcheck ; then
+ AC_MSG_FAILURE(
+ [--with-misdn was given, but test for header-file mISDN/mISDNif.h failed])
+ fi
+ ])
+ ])
+
+AM_CONDITIONAL(ENABLE_MISDN, test "x$with_misdn" == "xyes" )
+
# check for asterisk
AC_ARG_WITH([asterisk],
[AS_HELP_STRING([--with-asterisk],
AC_OUTPUT
+AS_IF([test "x$with_misdn" == xyes],[AC_MSG_NOTICE( Compiled with mISDN support )],[AC_MSG_NOTICE( Not compiled with mISDN support)])
AS_IF([test "x$with_gsm_bs" == xyes],[AC_MSG_NOTICE( Compiled with GSM network side support )],[AC_MSG_NOTICE( Not compiled with GSM network side support)])
AS_IF([test "x$with_gsm_ms" == xyes],[AC_MSG_NOTICE( Compiled with GSM mobile side support )],[AC_MSG_NOTICE( Not compiled with GSM mobile side support)])
AS_IF([test "x$with_asterisk" == xyes],[AC_MSG_NOTICE( Compiled with Asterisk channel driver support )],[AC_MSG_NOTICE( Not compiled with Asterisk channel driver support)])
if (port_id) {
port = find_port_id(port_id);
if (port) {
+#ifdef WITH_MISDN
if ((port->p_type&PORT_CLASS_MASK) == PORT_CLASS_mISDN)
earlyb = ((class PmISDN *)port)->p_m_mISDNport->earlyb;
+#else
+ earlyb = 0;
+#endif
if (!portlist_new(port_id, port->p_type, earlyb))
FATAL("No memory for portlist.\n");
}
struct interface *interface_newlist = NULL; /* first interface in new list */
+#ifdef WITH_MISDN
/* set default out_channel */
void default_out_channel(struct interface_port *ifport)
{
selchannel = (struct select_channel *)MALLOC(sizeof(struct select_channel));
memuse++;
-
+
if (ifport->mISDNport->ntmode)
selchannel->channel = CHANNEL_FREE;
else
ifport->in_channel = selchannel;
}
+#endif
/* parse string for a positive number */
}
static int inter_portnum(struct interface *interface, char *filename, int line, char *parameter, char *value)
{
+#ifndef WITH_MISDN
+ SPRINT(interface_error, "Error in %s (line %d): mISDN support is not compiled in.\n", filename, line);
+ return(-1);
+#else
struct interface_port *ifport, **ifportp;
struct interface *searchif;
int val;
ifportp = &((*ifportp)->next);
*ifportp = ifport;
return(0);
+#endif
}
static int inter_portname(struct interface *interface, char *filename, int line, char *parameter, char *value)
{
+#ifndef WITH_MISDN
+ SPRINT(interface_error, "Error in %s (line %d): mISDN support is not compiled in.\n", filename, line);
+ return(-1);
+#else
struct interface_port *ifport, **ifportp;
struct interface *searchif;
ifportp = &((*ifportp)->next);
*ifportp = ifport;
return(0);
+#endif
}
static int inter_l1hold(struct interface *interface, char *filename, int line, char *parameter, char *value)
{
}
}
+#ifdef WITH_MISDN
/*
* defaults of ports if not specified by config
*/
-static void set_defaults(struct interface_port *ifport)
+static void set_mISDN_defaults(struct interface_port *ifport)
{
/* default channel selection list */
if (!ifport->out_channel)
else
ifport->mISDNport->locally = 0;
}
+#endif
/*
*/
void relink_interfaces(void)
{
+#ifdef WITH_MISDN
struct mISDNport *mISDNport;
- struct interface *interface, *temp;
struct interface_port *ifport;
+#endif
+ struct interface *interface, *temp;
int found;
interface = interface_first;
interface = interface->next;
}
+#ifdef WITH_MISDN
/* unlink all mISDNports */
mISDNport = mISDNport_first;
while(mISDNport) {
PDEBUG(DEBUG_ISDN, "Port %d:%s relinking!\n", ifport->portnum, ifport->portname);
ifport->mISDNport = mISDNport;
mISDNport->ifport = ifport;
- set_defaults(ifport);
+ set_mISDN_defaults(ifport);
}
mISDNport = mISDNport->next;
}
while(ifport) {
if (!ifport->mISDNport) {
if (!interface->shutdown) {
- load_port(ifport);
+ load_mISDN_port(ifport);
} else {
ifport->block = 2;
}
}
interface = interface->next;
}
-
+#endif
}
+#ifdef WITH_MISDN
/*
* load port
*/
-void load_port(struct interface_port *ifport)
+void load_mISDN_port(struct interface_port *ifport)
{
struct mISDNport *mISDNport;
ifport->portnum = mISDNport->portnum;
SCPY(ifport->portname, mISDNport->name);
/* set defaults */
- set_defaults(ifport);
+ set_mISDN_defaults(ifport);
/* load static port instances */
mISDNport_static(mISDNport);
} else {
ifport->block = 2; /* not available */
}
}
+#endif
/*
* give summary of interface syntax
struct interface *read_interfaces(void);
void free_interfaces(struct interface *interface_start);
void relink_interfaces(void);
-void load_port(struct interface_port *ifport);
+void load_mISDN_port(struct interface_port *ifport);
void doc_interface(void);
void do_screen(int out, char *id, int idsize, int *type, int *present, const char *interface_name);
struct interface *getinterfacebyname(const char *name);
epoint->ep_app = new_endpointapp(epoint, 1, EAPP_TYPE_PBX); // outgoing
}
+#ifdef WITH_MISDN
/* set serial on bchannel message
* also ref is given, so we send message with ref */
if (message_type == MESSAGE_BCHANNEL) {
message_bchannel_from_remote(this, param->bchannel.type, param->bchannel.handle);
return;
}
+#endif
/* cannot just forward, because param is not of container "struct lcr_msg" */
message = message_create(j_serial, j_epoint_id, JOIN_TO_EPOINT, message_type);
int i;
struct sched_param schedp;
int created_mutexd = 0,/* created_mutext = 0,*/ created_mutexe = 0,
- created_lock = 0, created_signal = 0, created_debug = 0,
- created_misdn = 0, created_message = 0;
+ created_lock = 0, created_signal = 0, created_message = 0;
+#ifdef WITH_MISDN
+ int created_misdn = 0;
+#endif
char tracetext[256], lock[128];
char options_error[256];
int polling = 0;
goto free;
}
+#ifdef WITH_CRYPT
/* init crc */
crc_init();
+#endif
/* the mutex init */
if (pthread_mutex_init(&mutexd, NULL)) {
}
polling = options.polling;
+#ifdef WITH_MISDN
/* init mISDN */
if (mISDN_initialize() < 0)
goto free;
created_misdn = 1;
- created_debug = 1;
+#endif
/* read ruleset(s) */
if (!(ruleset_first = ruleset_parse()))
free_interfaces(interface_first);
interface_first = NULL;
+#ifdef WITH_MISDN
/* close isdn ports */
mISDNport_close_all();
+#endif
/* flush messages */
debug_count++;
if (pthread_mutex_destroy(&mutexd))
fprintf(stderr, "cannot destroy 'PDEBUG' mutex\n");
+#ifdef WITH_MISDN
/* deinitialize mISDN */
if (created_misdn)
mISDN_deinitialize();
+#endif
/* free gsm */
#if 0
sip_exit();
#endif
+#ifdef WITH_MISDN
/* close loopback, if used by GSM or remote */
if (mISDNloop.sock > -1)
mISDNloop_close();
+#endif
/* display memory leak */
#define MEMCHECK(a, b) \
#define BUDETECT ;
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <mISDN/mbuffer.h>
-#ifdef __cplusplus
-}
+#ifdef WITH_MISDN
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ #include <mISDN/mbuffer.h>
+ #ifdef __cplusplus
+ }
+ #endif
#endif
#include "macro.h"
#include "select.h"
#include "callerid.h"
#include "route.h"
#include "port.h"
+#ifdef WITH_MISDN
#include "mISDN.h"
#include "dss1.h"
#include "loop.h"
#include "remote.h"
+#endif
#if defined WITH_GSM_BS || defined WITH_GSM_MS
#include "gsm.h"
#endif
istrue,
couldbetrue,
condition,
- dialing_required,
- avail,
- any;
+ dialing_required;
struct route_rule *rule = ruleset->rule_first;
struct route_cond *cond;
struct route_action *action = NULL;
unsigned long comp_len;
- int j, jj;
+ int j;
char isdn_port[10];
char *argv[11]; /* check also number of args below */
char callerid[64], callerid2[64], redirid[64];
FILE *tfp;
long long timeout, now_ll = 0, match_timeout = 0;
struct timeval current_time;
+#ifdef WITH_MISDN
struct mISDNport *mISDNport;
+ int avail,
+ any;
+ int jj;
+#endif
struct admin_list *admin;
time_t now;
struct tm *now_tm;
break;
case MATCH_PORT:
+#ifdef WITH_MISDN
if (ea_endpoint->ep_portlist)
if ((ea_endpoint->ep_portlist->port_type & PORT_CLASS_MASK) != PORT_CLASS_mISDN)
break;
integer = e_callerinfo.isdn_port;
goto match_integer;
+#endif
+ break;
case MATCH_INTERFACE:
if (!e_callerinfo.interface[0])
case MATCH_FREE:
case MATCH_NOTFREE:
+#ifdef WITH_MISDN
if (!(comp_len = (unsigned long)strchr(cond->string_value, ':')))
break;
comp_len = comp_len-(unsigned long)cond->string_value;
if (avail < atoi(cond->string_value + comp_len + 1))
istrue = 1;
}
+#endif
break;
case MATCH_DOWN:
+#ifdef WITH_MISDN
mISDNport = mISDNport_first;
while(mISDNport) {
if (mISDNport->ifport)
}
if (!mISDNport) /* all down */
istrue = 1;
+#endif
break;
case MATCH_UP:
+#ifdef WITH_MISDN
mISDNport = mISDNport_first;
while(mISDNport) {
if (mISDNport->ifport)
}
if (mISDNport) /* one link at least */
istrue = 1;
+#endif
break;
case MATCH_BUSY:
case MATCH_IDLE:
+#ifdef WITH_MISDN
any = 0;
mISDNport = mISDNport_first;
while(mISDNport) {
istrue = 1;
if (!mISDNport && cond->match==MATCH_IDLE)
istrue = 1;
+#endif
break;
case MATCH_REMOTE:
{
struct admin_queue *response;
void *temp;
+#ifdef WITH_MISDN
union parameter param;
class Join *join, *joinnext;
struct mISDNport *mISDNport;
int i, ii;
- struct admin_list **adminp;
class Port *port, *portnext;
class Premote *remote;
+#endif
+ struct admin_list **adminp;
/* free remote joins */
if (admin->remote_name[0]) {
"REMOTE APP release");
add_trace("app", "name", "%s", admin->remote_name);
end_trace();
+#ifdef WITH_MISDN
/* release all exported channels */
mISDNport = mISDNport_first;
while(mISDNport) {
}
mISDNport = mISDNport->next;
}
+#endif
+#ifdef WITH_MISDN
/* release join */
join = join_first;
while(join) {
}
port = portnext;
}
+#endif
}
if (admin->sock >= 0) {
goto out;
}
+#ifdef WITH_MISDN
/* no interface */
if (!ifport->mISDNport) {
/* not loaded anyway */
/* try loading interface */
ifport->block = block;
- load_port(ifport);
+ load_mISDN_port(ifport);
/* port cannot load */
if (ifport->block >= 2) {
ifport->block = 2;
goto out;
}
+#endif
/* port new blocking state */
ifport->block = response->am[0].u.x.block = block;
*/
int admin_message_to_lcr(struct admin_msg *msg, struct admin_list *admin)
{
+#ifdef WITH_MISDN
struct mISDNport *mISDNport;
- class Join *join;
- class JoinRemote *joinremote = NULL; /* make GCC happy */
class Port *port;
class Premote *remote = NULL; /* make GCC happy */
+ class Join *join;
+ class JoinRemote *joinremote = NULL; /* make GCC happy */
+#endif
struct admin_list *temp;
/* hello message */
return(-1);
}
+#ifdef WITH_MISDN
/* new join. the reply (NEWREF assignment) is sent from constructor */
if (msg->type == MESSAGE_NEWREF) {
if (msg->param.newref.mode) {
}
return(0);
}
+#endif
+#ifdef WITH_MISDN
/* bchannel message
* no ref given for *_ack */
if (msg->type == MESSAGE_BCHANNEL)
message_bchannel_from_remote(NULL, msg->param.bchannel.type, msg->param.bchannel.handle);
return(0);
}
+#endif
/* check for ref */
if (!msg->ref) {
return(-1);
}
+#ifdef WITH_MISDN
/* find join instance */
join = join_first;
while(join) {
return(0);
}
+#endif
PDEBUG(DEBUG_LOG, "No remote instance found with ref %d. (May have been already released.)\n", msg->ref);
return(0);
class Port *port;
class EndpointAppPBX *apppbx;
class Join *join;
+#ifdef WITH_MISDN
class Pdss1 *pdss1;
- struct interface *interface;
- struct interface_port *ifport;
struct mISDNport *mISDNport;
struct select_channel *selchannel;
+ int anybusy;
+#endif
+ struct interface *interface;
+ struct interface_port *ifport;
int i;
int num;
- int anybusy;
struct admin_queue *response;
struct admin_list *admin;
struct tm *now_tm;
response->am[num].u.i.extension = interface->extension;
/* block */
response->am[num].u.i.block = ifport->block;
+#ifdef WITH_MISDN
if (ifport->mISDNport) {
mISDNport = ifport->mISDNport;
i++;
}
}
+#endif
num++;
ifport = ifport->next;
if (apppbx->ea_endpoint->ep_park && apppbx->ea_endpoint->ep_park_len && apppbx->ea_endpoint->ep_park_len<=(int)sizeof(response->am[num].u.e.park_callid))
memcpy(response->am[num].u.e.park_callid, apppbx->ea_endpoint->ep_park_callid, apppbx->ea_endpoint->ep_park_len);
response->am[num].u.e.park_len = apppbx->ea_endpoint->ep_park_len;
+#ifdef WITH_CRYPT
/* crypt */
if (apppbx->e_crypt == CRYPT_ON)
response->am[num].u.e.crypt = 1;
+#endif
/* */
apppbx = apppbx->next;
num++;
default:
response->am[num].u.p.state = ADMIN_STATE_IDLE;
}
+#ifdef WITH_MISDN
/* isdn */
if ((port->p_type & PORT_CLASS_mISDN_MASK) == PORT_CLASS_DSS1) {
response->am[num].u.p.isdn = 1;
response->am[num].u.p.isdn_hold = pdss1->p_m_hold;
response->am[num].u.p.isdn_ces = pdss1->p_m_d_ces;
}
+#endif
/* */
port = port->next;
num++;
char buffer[256];
time_t ti = trace.sec;
struct tm *tm;
+#ifdef WITH_MISDN
struct mISDNport *mISDNport;
+#endif
int i;
trace_string[0] = '\0'; // always clear string
/* head */
if (detail >= 3) {
SCAT(trace_string, "------------------------------------------------------------------------------\n");
+#ifdef WITH_MISDN
/* "Port: 1 (BRI PTMP TE)" */
if (trace.port >= 0) {
mISDNport = mISDNport_first;
SPRINT(buffer, "Port: %d (does not exist)\n", trace.port);
SCAT(trace_string, buffer);
} else
+#endif
SCAT(trace_string, "Port: ---");
if (trace.interface[0]) {