chan_misdn: Remove deprecated module.

ASTERISK-29596

Change-Id: Ibae9490c1b35cadbf7028d24610f745277c8535e
This commit is contained in:
Joshua C. Colp 2021-08-16 15:18:14 -03:00
parent 6ecc48086c
commit 1eb2d85c99
18 changed files with 6 additions and 24607 deletions

View File

@ -23,7 +23,6 @@ ICONV=@PBX_ICONV@
IKSEMEL=@PBX_IKSEMEL@
IMAP_TK=@PBX_IMAP_TK@
IODBC=@PBX_IODBC@
ISDNNET=@PBX_ISDNNET@
JACK=@PBX_JACK@
JANSSON=@PBX_JANSSON@
URIPARSER=@PBX_URIPARSER@
@ -34,7 +33,6 @@ LIBXML2=@PBX_LIBXML2@
XMLSTARLET=@PBX_XMLSTARLET@
BASH=@PBX_BASH@
LUA=@PBX_LUA@
MISDN=@PBX_MISDN@
MYSQLCLIENT=@PBX_MYSQLCLIENT@
NETSNMP=@PBX_NETSNMP@
NEWT=@PBX_NEWT@
@ -64,7 +62,6 @@ SQLITE=@PBX_SQLITE@
SRTP=@PBX_SRTP@
SS7=@PBX_SS7@
OPENSSL=@PBX_OPENSSL@
SUPPSERV=@PBX_SUPPSERV@
SYSLOG=@PBX_SYSLOG@
TONEZONE=@PBX_TONEZONE@
UNBOUND=@PBX_UNBOUND@

View File

@ -29,7 +29,6 @@ iax2/parser.o: _ASTCFLAGS+=$(call get_menuselect_cflags,MALLOC_DEBUG)
$(call MOD_ADD_C,chan_sip,$(wildcard sip/*.c))
$(call MOD_ADD_C,chan_pjsip,$(wildcard pjsip/*.c))
$(call MOD_ADD_C,chan_dahdi,$(wildcard dahdi/*.c) sig_analog.c sig_pri.c sig_ss7.c)
$(call MOD_ADD_C,chan_misdn,misdn_config.c misdn/isdn_lib.c misdn/isdn_msg_parser.c)
chan_dahdi.o: _ASTCFLAGS+=$(call get_menuselect_cflags,LOTS_OF_SPANS)
chan_mgcp.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
@ -37,8 +36,4 @@ chan_unistim.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
chan_phone.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
chan_sip.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
chan_misdn.o: _ASTCFLAGS+=-Imisdn
misdn_config.o: _ASTCFLAGS+=-Imisdn
misdn/isdn_lib.o: _ASTCFLAGS+=-Wno-strict-aliasing
$(call MOD_ADD_C,chan_oss,console_video.c vgrabbers.c console_board.c)

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +0,0 @@
#
# Makefile for chan_misdn support
#
ifneq ($(wildcard /usr/include/linux/mISDNdsp.h),)
CFLAGS+=-DMISDN_1_2
endif
all:
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
portinfo: portinfo.o
$(CC) -o $@ $^ -lisdnnet -lmISDN -lpthread
clean:
rm -rf *.a *.o *.so portinfo *.i *.gcda *.gcno

View File

@ -1,172 +0,0 @@
/*
* Chan_Misdn -- Channel Driver for Asterisk
*
* Interface to mISDN
*
* Copyright (C) 2004, Christian Richter
*
* Christian Richter <crich@beronet.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
/*! \file
* \brief Interface to mISDN - Config
* \author Christian Richter <crich@beronet.com>
*/
#ifndef CHAN_MISDN_CONFIG_H
#define CHAN_MISDN_CONFIG_H
#define BUFFERSIZE 512
enum misdn_cfg_elements {
/* port config items */
MISDN_CFG_FIRST = 0,
MISDN_CFG_GROUPNAME, /* char[] */
MISDN_CFG_ALLOWED_BEARERS, /* char[] */
MISDN_CFG_FAR_ALERTING, /* int (bool) */
MISDN_CFG_RXGAIN, /* int */
MISDN_CFG_TXGAIN, /* int */
MISDN_CFG_TE_CHOOSE_CHANNEL, /* int (bool) */
MISDN_CFG_PMP_L1_CHECK, /* int (bool) */
MISDN_CFG_REJECT_CAUSE, /* int */
MISDN_CFG_ALARM_BLOCK, /* int (bool) */
MISDN_CFG_HDLC, /* int (bool) */
MISDN_CFG_CONTEXT, /* char[] */
MISDN_CFG_LANGUAGE, /* char[] */
MISDN_CFG_MUSICCLASS, /* char[] */
MISDN_CFG_CALLERID, /* char[] */
MISDN_CFG_INCOMING_CALLERID_TAG, /* char[] */
MISDN_CFG_APPEND_MSN_TO_CALLERID_TAG, /* int (bool) */
MISDN_CFG_METHOD, /* char[] */
MISDN_CFG_DIALPLAN, /* int */
MISDN_CFG_LOCALDIALPLAN, /* int */
MISDN_CFG_CPNDIALPLAN, /* int */
MISDN_CFG_TON_PREFIX_UNKNOWN, /* char[] */
MISDN_CFG_TON_PREFIX_INTERNATIONAL, /* char[] */
MISDN_CFG_TON_PREFIX_NATIONAL, /* char[] */
MISDN_CFG_TON_PREFIX_NETWORK_SPECIFIC,/* char[] */
MISDN_CFG_TON_PREFIX_SUBSCRIBER, /* char[] */
MISDN_CFG_TON_PREFIX_ABBREVIATED, /* char[] */
MISDN_CFG_PRES, /* int */
MISDN_CFG_SCREEN, /* int */
MISDN_CFG_DISPLAY_CONNECTED, /* int */
MISDN_CFG_DISPLAY_SETUP, /* int */
MISDN_CFG_ALWAYS_IMMEDIATE, /* int (bool) */
MISDN_CFG_NODIALTONE, /* int (bool) */
MISDN_CFG_IMMEDIATE, /* int (bool) */
MISDN_CFG_SENDDTMF, /* int (bool) */
MISDN_CFG_ASTDTMF, /* int (bool) */
MISDN_CFG_HOLD_ALLOWED, /* int (bool) */
MISDN_CFG_EARLY_BCONNECT, /* int (bool) */
MISDN_CFG_INCOMING_EARLY_AUDIO, /* int (bool) */
MISDN_CFG_ECHOCANCEL, /* int */
MISDN_CFG_CC_REQUEST_RETENTION,/* bool */
MISDN_CFG_OUTGOING_COLP, /* int */
#ifdef MISDN_1_2
MISDN_CFG_PIPELINE, /* char[] */
#endif
#ifdef WITH_BEROEC
MISDN_CFG_BNECHOCANCEL,
MISDN_CFG_BNEC_ANTIHOWL,
MISDN_CFG_BNEC_NLP,
MISDN_CFG_BNEC_ZEROCOEFF,
MISDN_CFG_BNEC_TD,
MISDN_CFG_BNEC_ADAPT,
#endif
MISDN_CFG_NEED_MORE_INFOS, /* bool */
MISDN_CFG_NOAUTORESPOND_ON_SETUP, /* bool */
MISDN_CFG_NTTIMEOUT, /* bool */
MISDN_CFG_BRIDGING, /* bool */
MISDN_CFG_JITTERBUFFER, /* int */
MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, /* int */
MISDN_CFG_CALLGROUP, /* ast_group_t */
MISDN_CFG_PICKUPGROUP, /* ast_group_t */
MISDN_CFG_NAMEDCALLGROUP, /* ast_namedgroups * */
MISDN_CFG_NAMEDPICKUPGROUP, /* ast_namedgroups * */
MISDN_CFG_MAX_IN, /* int */
MISDN_CFG_MAX_OUT, /* int */
MISDN_CFG_L1_TIMEOUT, /* int */
MISDN_CFG_OVERLAP_DIAL, /* int (bool)*/
MISDN_CFG_MSNS, /* char[] */
MISDN_CFG_FAXDETECT, /* char[] */
MISDN_CFG_FAXDETECT_CONTEXT, /* char[] */
MISDN_CFG_FAXDETECT_TIMEOUT, /* int */
MISDN_CFG_PTP, /* int (bool) */
MISDN_CFG_LAST,
/* general config items */
MISDN_GEN_FIRST,
#ifndef MISDN_1_2
MISDN_GEN_MISDN_INIT, /* char[] */
#endif
MISDN_GEN_DEBUG, /* int */
MISDN_GEN_TRACEFILE, /* char[] */
MISDN_GEN_BRIDGING, /* int (bool) */
MISDN_GEN_STOP_TONE, /* int (bool) */
MISDN_GEN_APPEND_DIGITS2EXTEN, /* int (bool) */
MISDN_GEN_DYNAMIC_CRYPT, /* int (bool) */
MISDN_GEN_CRYPT_PREFIX, /* char[] */
MISDN_GEN_CRYPT_KEYS, /* char[] */
MISDN_GEN_NTKEEPCALLS, /* int (bool) */
MISDN_GEN_NTDEBUGFLAGS, /* int */
MISDN_GEN_NTDEBUGFILE, /* char[] */
MISDN_GEN_LAST
};
enum misdn_cfg_method {
METHOD_STANDARD = 0,
METHOD_ROUND_ROBIN,
METHOD_STANDARD_DEC
};
/* you must call misdn_cfg_init before any other function of this header file */
int misdn_cfg_init(int max_ports, int reload);
void misdn_cfg_reload(void);
void misdn_cfg_destroy(void);
void misdn_cfg_update_ptp( void );
/* if you requst a general config element, the port value is ignored. if the requested
* value is not available, or the buffer is too small, the buffer will be nulled (in
* case of a char* only its first byte will be nulled). */
void misdn_cfg_get(int port, enum misdn_cfg_elements elem, void* buf, int bufsize);
/* returns the enum element for the given name, returns MISDN_CFG_FIRST if none was found */
enum misdn_cfg_elements misdn_cfg_get_elem (const char *name);
/* fills the buffer with the name of the given config element */
void misdn_cfg_get_name (enum misdn_cfg_elements elem, void *buf, int bufsize);
/* fills the buffer with the description of the given config element */
void misdn_cfg_get_desc (enum misdn_cfg_elements elem, void *buf, int bufsize, void *buf_default, int bufsize_default);
/* fills the buffer with a ',' separated list of all active ports */
void misdn_cfg_get_ports_string(char *ports);
/* fills the buffer with a nice printable string representation of the config element */
void misdn_cfg_get_config_string(int port, enum misdn_cfg_elements elem, char* buf, int bufsize);
/* returns the next available port number. returns -1 if the last one was reached. */
int misdn_cfg_get_next_port(int port);
int misdn_cfg_get_next_port_spin(int port);
int misdn_cfg_is_msn_valid(int port, char* msn);
int misdn_cfg_is_port_valid(int port);
int misdn_cfg_is_group_method(char *group, enum misdn_cfg_method meth);
#if 0
char *misdn_cfg_get_next_group(char *group);
int misdn_cfg_get_next_port_in_group(int port, char *group);
#endif
struct ast_jb_conf *misdn_get_global_jbconf(void);
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,833 +0,0 @@
/*
* Chan_Misdn -- Channel Driver for Asterisk
*
* Interface to mISDN
*
* Copyright (C) 2004, Christian Richter
*
* Christian Richter <crich@beronet.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
/*! \file
* \brief Interface to mISDN
*
* \author Christian Richter <crich@beronet.com>
*/
#ifndef TE_LIB
#define TE_LIB
#include <mISDNuser/suppserv.h>
/** For initialization usage **/
/* typedef int ie_nothing_t ;*/
/** end of init usage **/
/*
* uncomment the following to make chan_misdn create
* record files in /tmp/misdn-{rx|tx}-PortChannel format
* */
/*#define MISDN_SAVE_DATA*/
#ifdef WITH_BEROEC
typedef int beroec_t;
enum beroec_type {
BEROEC_FULLBAND=0,
BEROEC_SUBBAND,
BEROEC_FASTSUBBAND
};
void beroec_init(void);
void beroec_exit(void);
beroec_t *beroec_new(int tail, enum beroec_type type, int anti_howl,
int tonedisable, int zerocoeff, int adapt, int nlp);
void beroec_destroy(beroec_t *ec);
int beroec_cancel_alaw_chunk(beroec_t *ec,
char *send,
char *receive,
int len);
int beroec_version(void);
#endif
enum tone_e {
TONE_NONE=0,
TONE_DIAL,
TONE_ALERTING,
TONE_FAR_ALERTING,
TONE_BUSY,
TONE_HANGUP,
TONE_CUSTOM,
TONE_FILE
};
#define MAX_BCHANS 31
enum bchannel_state {
BCHAN_CLEANED=0,
BCHAN_EMPTY,
BCHAN_ACTIVATED,
BCHAN_BRIDGED,
BCHAN_RELEASE,
BCHAN_ERROR
};
enum misdn_err_e {
ENOCHAN=1
};
enum mISDN_NUMBER_PLAN {
NUMPLAN_UNKNOWN = 0x0,
NUMPLAN_ISDN = 0x1, /* ISDN/Telephony numbering plan E.164 */
NUMPLAN_DATA = 0x3, /* Data numbering plan X.121 */
NUMPLAN_TELEX = 0x4, /* Telex numbering plan F.69 */
NUMPLAN_NATIONAL = 0x8,
NUMPLAN_PRIVATE = 0x9
};
enum mISDN_NUMBER_TYPE {
NUMTYPE_UNKNOWN = 0x0,
NUMTYPE_INTERNATIONAL = 0x1,
NUMTYPE_NATIONAL = 0x2,
NUMTYPE_NETWORK_SPECIFIC = 0x3,
NUMTYPE_SUBSCRIBER = 0x4,
NUMTYPE_ABBREVIATED = 0x5
};
enum event_response_e {
RESPONSE_IGNORE_SETUP_WITHOUT_CLOSE,
RESPONSE_IGNORE_SETUP,
RESPONSE_RELEASE_SETUP,
RESPONSE_ERR,
RESPONSE_OK
};
enum event_e {
EVENT_NOTHING,
EVENT_TONE_GENERATE,
EVENT_BCHAN_DATA,
EVENT_BCHAN_ACTIVATED,
EVENT_BCHAN_ERROR,
EVENT_CLEANUP,
EVENT_PROCEEDING,
EVENT_PROGRESS,
EVENT_SETUP,
EVENT_REGISTER,
EVENT_ALERTING,
EVENT_CONNECT,
EVENT_SETUP_ACKNOWLEDGE,
EVENT_CONNECT_ACKNOWLEDGE ,
EVENT_USER_INFORMATION,
EVENT_SUSPEND_REJECT,
EVENT_RESUME_REJECT,
EVENT_HOLD,
EVENT_SUSPEND,
EVENT_RESUME,
EVENT_HOLD_ACKNOWLEDGE,
EVENT_SUSPEND_ACKNOWLEDGE,
EVENT_RESUME_ACKNOWLEDGE,
EVENT_HOLD_REJECT,
EVENT_RETRIEVE,
EVENT_RETRIEVE_ACKNOWLEDGE,
EVENT_RETRIEVE_REJECT,
EVENT_DISCONNECT,
EVENT_RESTART,
EVENT_RELEASE,
EVENT_RELEASE_COMPLETE,
EVENT_FACILITY,
EVENT_NOTIFY,
EVENT_STATUS_ENQUIRY,
EVENT_INFORMATION,
EVENT_STATUS,
EVENT_TIMEOUT,
EVENT_DTMF_TONE,
EVENT_NEW_L3ID,
EVENT_NEW_BC,
EVENT_PORT_ALARM,
EVENT_NEW_CHANNEL,
EVENT_UNKNOWN
};
enum ie_name_e {
IE_DUMMY,
IE_LAST
};
enum { /* bearer capability */
INFO_CAPABILITY_SPEECH=0,
INFO_CAPABILITY_AUDIO_3_1K=0x10 ,
INFO_CAPABILITY_AUDIO_7K=0x11 ,
INFO_CAPABILITY_VIDEO =0x18,
INFO_CAPABILITY_DIGITAL_UNRESTRICTED =0x8,
INFO_CAPABILITY_DIGITAL_RESTRICTED =0x09,
INFO_CAPABILITY_DIGITAL_UNRESTRICTED_TONES
};
enum { /* progress indicators */
INFO_PI_CALL_NOT_E2E_ISDN =0x01,
INFO_PI_CALLED_NOT_ISDN =0x02,
INFO_PI_CALLER_NOT_ISDN =0x03,
INFO_PI_CALLER_RETURNED_TO_ISDN =0x04,
INFO_PI_INBAND_AVAILABLE =0x08,
INFO_PI_DELAY_AT_INTERF =0x0a,
INFO_PI_INTERWORKING_WITH_PUBLIC =0x10,
INFO_PI_INTERWORKING_NO_RELEASE =0x11,
INFO_PI_INTERWORKING_NO_RELEASE_PRE_ANSWER =0x12,
INFO_PI_INTERWORKING_NO_RELEASE_POST_ANSWER =0x13
};
/*!
* \brief Q.931 encoded redirecting reason
*/
enum mISDN_REDIRECTING_REASON {
mISDN_REDIRECTING_REASON_UNKNOWN = 0x0,
/*! Call forwarding busy or called DTE busy */
mISDN_REDIRECTING_REASON_CALL_FWD_BUSY = 0x1,
/*! Call forwarding no reply */
mISDN_REDIRECTING_REASON_NO_REPLY = 0x2,
/*! Call deflection */
mISDN_REDIRECTING_REASON_DEFLECTION = 0x4,
/*! Called DTE out of order */
mISDN_REDIRECTING_REASON_OUT_OF_ORDER = 0x9,
/*! Call forwarding by the called DTE */
mISDN_REDIRECTING_REASON_CALL_FWD_DTE = 0xA,
/*! Call forwarding unconditional or systematic call redirection */
mISDN_REDIRECTING_REASON_CALL_FWD = 0xF
};
/*!
* \brief Notification description code enumeration
*/
enum mISDN_NOTIFY_CODE {
mISDN_NOTIFY_CODE_INVALID = -1,
/*! Call is placed on hold (Q.931) */
mISDN_NOTIFY_CODE_USER_SUSPEND = 0x00,
/*! Call is taken off of hold (Q.931) */
mISDN_NOTIFY_CODE_USER_RESUME = 0x01,
/*! Call is diverting (EN 300 207-1 Section 7.2.1) */
mISDN_NOTIFY_CODE_CALL_IS_DIVERTING = 0x7B,
/*! Call diversion is enabled (cfu, cfb, cfnr) (EN 300 207-1 Section 7.2.1) */
mISDN_NOTIFY_CODE_DIVERSION_ACTIVATED = 0x68,
/*! Call transfer, alerting (EN 300 369-1 Section 7.2) */
mISDN_NOTIFY_CODE_CALL_TRANSFER_ALERTING = 0x69,
/*! Call transfer, active(answered) (EN 300 369-1 Section 7.2) */
mISDN_NOTIFY_CODE_CALL_TRANSFER_ACTIVE = 0x6A,
};
enum { /*CODECS*/
INFO_CODEC_ULAW=2,
INFO_CODEC_ALAW=3
};
enum layer_e {
L3,
L2,
L1,
UNKNOWN
};
/*! Maximum phone number (address) length plus null terminator */
#define MISDN_MAX_NUMBER_LEN (31 + 1)
/*! Maximum name length plus null terminator (From ECMA-164) */
#define MISDN_MAX_NAME_LEN (50 + 1)
/*! Maximum subaddress length plus null terminator */
#define MISDN_MAX_SUBADDRESS_LEN (23 + 1)
/*! Maximum keypad facility content length plus null terminator */
#define MISDN_MAX_KEYPAD_LEN (31 + 1)
/*! \brief Dialed/Called information struct */
struct misdn_party_dialing {
/*! \brief Type-of-number in ISDN terms for the dialed/called number */
enum mISDN_NUMBER_TYPE number_type;
/*! \brief Type-of-number numbering plan. */
enum mISDN_NUMBER_PLAN number_plan;
/*! \brief Dialed/Called Phone Number (Address) */
char number[MISDN_MAX_NUMBER_LEN];
/*! \brief Dialed/Called Subaddress number */
char subaddress[MISDN_MAX_SUBADDRESS_LEN];
};
/*! \brief Connected-Line/Calling/Redirecting ID info struct */
struct misdn_party_id {
/*! \brief Number presentation restriction code
* 0=Allowed, 1=Restricted, 2=Unavailable
*/
int presentation;
/*! \brief Number screening code
* 0=Unscreened, 1=Passed Screen, 2=Failed Screen, 3=Network Number
*/
int screening;
/*! \brief Type-of-number in ISDN terms for the number */
enum mISDN_NUMBER_TYPE number_type;
/*! \brief Type-of-number numbering plan. */
enum mISDN_NUMBER_PLAN number_plan;
/*! \brief Subscriber Name
* \note The name is currently obtained from Asterisk for
* potential use in display ie's since basic ISDN does
* not support names directly.
*/
char name[MISDN_MAX_NAME_LEN];
/*! \brief Phone number (Address) */
char number[MISDN_MAX_NUMBER_LEN];
/*! \brief Subaddress number */
char subaddress[MISDN_MAX_SUBADDRESS_LEN];
};
/*! \brief Redirecting information struct */
struct misdn_party_redirecting {
/*! \brief Who is redirecting the call (Sent to the party the call is redirected toward) */
struct misdn_party_id from;
/*! \brief Where the call is being redirected toward (Sent to the calling party) */
struct misdn_party_id to;
/*! \brief Reason a call is being redirected (Q.931 field value) */
enum mISDN_REDIRECTING_REASON reason;
/*! \brief Number of times the call has been redirected */
int count;
/*! \brief TRUE if the redirecting.to information has changed */
int to_changed;
};
/*! \brief B channel control structure */
struct misdn_bchannel {
/*! \brief B channel send locking structure */
struct send_lock *send_lock;
#if defined(AST_MISDN_ENHANCEMENTS)
/*! \brief The BC, HLC (optional) and LLC (optional) contents from the SETUP message. */
struct Q931_Bc_Hlc_Llc setup_bc_hlc_llc;
#endif /* defined(AST_MISDN_ENHANCEMENTS) */
/*!
* \brief Dialed/Called information struct
* \note The number_type element is set to "dialplan" in /etc/asterisk/misdn.conf for outgoing calls
*/
struct misdn_party_dialing dialed;
/*! \brief Originating/Caller ID information struct
* \note The number_type element can be set to "localdialplan" in /etc/asterisk/misdn.conf for outgoing calls
* \note The number element can be set to "callerid" in /etc/asterisk/misdn.conf for outgoing calls
*/
struct misdn_party_id caller;
/*! \brief Incoming Caller ID string tag for special purpose
* \note The element can be set to "incoming_cid_tag" in /etc/asterisk/misdn.conf for incoming calls
*/
char incoming_cid_tag[MISDN_MAX_NAME_LEN];
/*! \brief Connected-Party/Connected-Line ID information struct
* \note The number_type element can be set to "cpndialplan" in /etc/asterisk/misdn.conf for outgoing calls
*/
struct misdn_party_id connected;
/*! \brief Redirecting information struct (Where a call diversion or transfer was invoked)
* \note The redirecting subaddress is not defined in Q.931 so it is not used.
*/
struct misdn_party_redirecting redirecting;
/*! \brief TRUE if this is a dummy BC record */
int dummy;
/*! \brief TRUE if NT side of protocol (TE otherwise) */
int nt;
/*! \brief TRUE if ISDN-PRI (ISDN-BRI otherwise) */
int pri;
/*! \brief Logical Layer 1 port associated with this B channel */
int port;
/** init stuff **/
/*! \brief B Channel mISDN driver stack ID */
int b_stid;
/* int b_addr; */
/*! \brief B Channel mISDN driver layer ID from mISDN_new_layer() */
int layer_id;
/*! \brief B channel layer; set to 3 or 4 */
int layer;
/* state stuff */
/*! \brief TRUE if DISCONNECT needs to be sent to clear a call */
int need_disconnect;
/*! \brief TRUE if RELEASE needs to be sent to clear a call */
int need_release;
/*! \brief TRUE if RELEASE_COMPLETE needs to be sent to clear a call */
int need_release_complete;
/*! \brief TRUE if allocate higher B channels first */
int dec;
/* var stuff */
/*! \brief Layer 3 process ID */
int l3_id;
/*! \brief B channel process ID (1-5000) */
int pid;
/*! \brief Not used. Saved mISDN stack CONNECT_t ces value */
int ces;
/*! \brief B channel to restart if received a RESTART message */
int restart_channel;
/*! \brief Assigned B channel number B1, B2... 0 if not assigned */
int channel;
/*! \brief TRUE if the B channel number is preselected */
int channel_preselected;
/*! \brief TRUE if the B channel is allocated from the REGISTER pool */
int is_register_pool;
/*! \brief TRUE if B channel record is in use */
int in_use;
/*! \brief Time when empty_bc() last called on this record */
struct timeval last_used;
/*! \brief TRUE if call waiting */
int cw;
/*! \brief B Channel mISDN driver layer ID from mISDN_get_layerid() */
int addr;
/*! \brief B channel speech sample data buffer */
char *bframe;
/*! \brief B channel speech sample data buffer size */
int bframe_len;
int time_usec; /* Not used */
/*! \brief Not used. Contents are setup but not used. */
void *astbuf;
/*! \brief TRUE if the TE side should choose the B channel to use
* \note This value is user configurable in /etc/asterisk/misdn.conf
*/
int te_choose_channel;
/*! \brief TRUE if the call progress indicators can indicate an inband audio message for the user to listen to
* \note This value is user configurable in /etc/asterisk/misdn.conf
*/
int early_bconnect;
/*! \brief Last decoded DTMF digit from mISDN driver */
int dtmf;
/*! \brief TRUE if we should produce DTMF tones ourselves
* \note This value is user configurable in /etc/asterisk/misdn.conf
*/
int send_dtmf;
/*! \brief TRUE if we send SETUP_ACKNOWLEDGE on incoming calls anyway (instead of PROCEEDING).
*
* This requests additional INFORMATION messages, so we can
* wait for digits without issues.
* \note This value is user configurable in /etc/asterisk/misdn.conf
*/
int need_more_infos;
/*! \brief TRUE if all digits necessary to complete the call are available.
* No more INFORMATION messages are needed.
*/
int sending_complete;
/*! \brief TRUE if we will not use jollys dsp */
int nodsp;
/*! \brief TRUE if we will not use the jitter buffer system */
int nojitter;
/*! \brief Progress Indicator IE coding standard field.
* \note Collected from the incoming messages but not used.
*/
int progress_coding;
/*! \brief Progress Indicator IE location field.
* \note Collected from the incoming messages but not used.
*/
int progress_location;
/*! \brief Progress Indicator IE progress description field.
* Used to determine if there is an inband audio message present.
*/
int progress_indicator;
#if defined(AST_MISDN_ENHANCEMENTS)
/*!
* \brief TRUE if waiting for DivertingLegInformation3 to queue redirecting update.
*/
int div_leg_3_rx_wanted;
/*!
* \brief TRUE if a DivertingLegInformation3 needs to be sent with CONNECT.
*/
int div_leg_3_tx_pending;
#endif /* defined(AST_MISDN_ENHANCEMENTS) */
/*! \brief Inbound FACILITY message function type and contents */
struct FacParm fac_in;
/*! \brief Outbound FACILITY message function type and contents.
* \note Filled in by misdn facility commands before FACILITY message sent.
*/
struct FacParm fac_out;
/* storing the current AOCD info here */
enum FacFunction AOCDtype;
union {
struct FacAOCDCurrency currency;
struct FacAOCDChargingUnit chargingUnit;
} AOCD;
/*! \brief TRUE if AOCDtype and AOCD data are ready to export to Asterisk */
int AOCD_need_export;
/*** CRYPTING STUFF ***/
int crypt; /* Initialized, Not used */
int curprx; /* Initialized, Not used */
int curptx; /* Initialized, Not used */
/*! \brief Blowfish encryption key string (secret) */
char crypt_key[255];
int crypt_state; /* Not used */
/*** CRYPTING STUFF END***/
/*! \brief Seems to have been intended for something to do with the jitter buffer.
* \note Used as a boolean. Only initialized to 0 and referenced in a couple places
*/
int active;
int upset; /* Not used */
/*! \brief TRUE if tone generator allowed to start */
int generate_tone;
/*! \brief Number of tone samples to generate */
int tone_cnt;
/*! \brief Current B Channel state */
enum bchannel_state bc_state;
/*! \brief This is used as a pending bridge join request for when bc_state becomes BCHAN_ACTIVATED */
enum bchannel_state next_bc_state;
/*! \brief Bridging conference ID */
int conf_id;
/*! \brief TRUE if this channel is on hold */
int holded;
/*! \brief TRUE if this channel is on the misdn_stack->holding list
* \note If TRUE this implies that the structure is also malloced.
*/
int stack_holder;
/*!
* \brief Put a display ie in the CONNECT message
* \details
* Put a display ie in the CONNECT message containing the following
* information if it is available (nt port only):
* 0 - Do not put the connected line information in the display ie.
* 1 - Put the available connected line name in the display ie.
* 2 - Put the available connected line number in the display ie.
* 3 - Put the available connected line name and number in the display ie.
*/
int display_connected;
/*!
* \brief Put a display ie in the SETUP message
* \details
* Put a display ie in the SETUP message containing the following
* information if it is available (nt port only):
* 0 - Do not put the caller information in the display ie.
* 1 - Put the available caller name in the display ie.
* 2 - Put the available caller number in the display ie.
* 3 - Put the available caller name and number in the display ie.
*/
int display_setup;
/*!
* \brief Select what to do with outgoing COLP information.
* \details
* 0 - pass (Send out COLP information unaltered.)
* 1 - restricted (Force COLP to restricted on all outgoing COLP information.)
* 2 - block (Do not send COLP information.)
*/
int outgoing_colp;
/*! \brief User set presentation restriction code
* 0=Allowed, 1=Restricted, 2=Unavailable
* \note It is settable by the misdn_set_opt() application.
*/
int presentation;
/*! \brief TRUE if the user set the presentation restriction code */
int set_presentation;
/*! \brief Notification indicator ie description code */
enum mISDN_NOTIFY_CODE notify_description_code;
/*! \brief SETUP message bearer capability field code value */
int capability;
/*! \brief Companding ALaw/uLaw encoding (INFO_CODEC_ALAW / INFO_CODEC_ULAW) */
int law;
/* V110 Stuff */
/*! \brief Q.931 Bearer Capability IE Information Transfer Rate field. Initialized to 0x10 (64kbit). Altered by incoming SETUP messages. */
int rate;
/*! \brief Q.931 Bearer Capability IE Transfer Mode field. Initialized to 0 (Circuit). Altered by incoming SETUP messages. */
int mode;
/*! \brief Q.931 Bearer Capability IE User Information Layer 1 Protocol field code.
* \note Collected from the incoming SETUP message but not used.
*/
int user1;
/*! \brief Q.931 Bearer Capability IE Layer 1 User Rate field.
* \note Collected from the incoming SETUP message and exported to Asterisk variable MISDN_URATE.
*/
int urate;
/*! \brief TRUE if call made in digital HDLC mode
* \note This value is user configurable in /etc/asterisk/misdn.conf.
* It is also settable by the misdn_set_opt() application.
*/
int hdlc;
/* V110 */
/*! \brief Display message that can be displayed by the user phone.
* \note Maximum displayable length is 34 or 82 octets.
* It is also settable by the misdn_set_opt() application.
*/
char display[84];
/*! \brief Q.931 Keypad Facility IE contents
* \note Contents exported and imported to Asterisk variable MISDN_KEYPAD
*/
char keypad[MISDN_MAX_KEYPAD_LEN];
/*! \brief Current overlap dialing digits to/from INFORMATION messages */
char info_dad[MISDN_MAX_NUMBER_LEN];
/*! \brief Collected digits to go into info_dad[] while waiting for a SETUP_ACKNOWLEDGE to come in. */
char infos_pending[MISDN_MAX_NUMBER_LEN];
/* unsigned char info_keypad[MISDN_MAX_KEYPAD_LEN]; */
/* unsigned char clisub[24]; */
/* unsigned char cldsub[24]; */
/*! \brief User-User information string.
* \note Contents exported and imported to Asterisk variable MISDN_USERUSER
* \note We only support ASCII strings (IA5 characters).
*/
char uu[256];
/*! \brief User-User information string length in uu[] */
int uulen;
/*! \brief Q.931 Cause for disconnection code (received)
* \note Need to use the AST_CAUSE_xxx code definitions in causes.h
*/
int cause;
/*! \brief Q.931 Cause for disconnection code (sent)
* \note Need to use the AST_CAUSE_xxx code definitions in causes.h
* \note -1 is used to suppress including the cause code in the RELEASE message.
*/
int out_cause;
/* struct misdn_bchannel hold_bc; */
/** list stuf **/
#ifdef MISDN_1_2
/*! \brief The configuration string for the mISDN dsp pipeline in /etc/asterisk/misdn.conf. */
char pipeline[128];
#else
/*! \brief TRUE if the echo cancellor is enabled */
int ec_enable;
/*! \brief Number of taps in the echo cancellor when enabled.
* \note This value is user configurable in /etc/asterisk/misdn.conf (echocancel)
*/
int ec_deftaps;
#endif
/*! \brief TRUE if the channel was allocated from the available B channels */
int channel_found;
/*! \brief Who originated the call (ORG_AST, ORG_MISDN)
* \note Set but not used when the misdn_set_opt() application enables echo cancellation.
*/
int orig;
/*! \brief Tx gain setting (range -8 to 8)
* \note This value is user configurable in /etc/asterisk/misdn.conf.
* It is also settable by the misdn_set_opt() application.
*/
int txgain;
/*! \brief Rx gain setting (range -8 to 8)
* \note This value is user configurable in /etc/asterisk/misdn.conf.
* It is also settable by the misdn_set_opt() application.
*/
int rxgain;
/*! \brief Next node in the misdn_stack.holding list */
struct misdn_bchannel *next;
};
extern enum event_response_e (*cb_event) (enum event_e event, struct misdn_bchannel *bc, void *user_data);
extern void (*cb_log) (int level, int port, char *tmpl, ...)
__attribute__ ((format (printf, 3, 4)));
extern int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
struct misdn_lib_iface {
enum event_response_e (*cb_event)(enum event_e event, struct misdn_bchannel *bc, void *user_data);
void (*cb_log)(int level, int port, char *tmpl, ...)
__attribute__ ((format (printf, 3, 4)));
int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
};
/***** USER IFACE **********/
void misdn_lib_nt_keepcalls(int kc);
void misdn_lib_nt_debug_init( int flags, char *file );
int misdn_lib_init(char *portlist, struct misdn_lib_iface* iface, void *user_data);
int misdn_lib_send_event(struct misdn_bchannel *bc, enum event_e event );
void misdn_lib_destroy(void);
void misdn_lib_isdn_l1watcher(int port);
void misdn_lib_log_ies(struct misdn_bchannel *bc);
char *manager_isdn_get_info(enum event_e event);
struct misdn_bchannel* misdn_lib_get_free_bc(int port, int channel, int inout, int dec);
#if defined(AST_MISDN_ENHANCEMENTS)
struct misdn_bchannel *misdn_lib_get_register_bc(int port);
#endif /* defined(AST_MISDN_ENHANCEMENTS) */
void manager_bchannel_activate(struct misdn_bchannel *bc);
void manager_bchannel_deactivate(struct misdn_bchannel * bc);
int misdn_lib_tx2misdn_frm(struct misdn_bchannel *bc, void *data, int len);
void manager_ph_control(struct misdn_bchannel *bc, int c1, int c2);
void isdn_lib_update_rxgain (struct misdn_bchannel *bc);
void isdn_lib_update_txgain (struct misdn_bchannel *bc);
void isdn_lib_update_ec (struct misdn_bchannel *bc);
void isdn_lib_stop_dtmf (struct misdn_bchannel *bc);
int misdn_lib_port_restart(int port);
int misdn_lib_pid_restart(int pid);
int misdn_lib_send_restart(int port, int channel);
int misdn_lib_get_port_info(int port);
int misdn_lib_is_port_blocked(int port);
int misdn_lib_port_block(int port);
int misdn_lib_port_unblock(int port);
int misdn_lib_port_is_pri(int port);
int misdn_lib_port_is_nt(int port);
int misdn_lib_port_up(int port, int notcheck);
int misdn_lib_get_port_down(int port);
int misdn_lib_get_port_up (int port) ;
int misdn_lib_maxports_get(void) ;
struct misdn_bchannel *misdn_lib_find_held_bc(int port, int l3_id);
void misdn_lib_release(struct misdn_bchannel *bc);
int misdn_cap_is_speech(int cap);
int misdn_inband_avail(struct misdn_bchannel *bc);
void manager_ec_enable(struct misdn_bchannel *bc);
void manager_ec_disable(struct misdn_bchannel *bc);
void misdn_lib_send_tone(struct misdn_bchannel *bc, enum tone_e tone);
void get_show_stack_details(int port, char *buf);
void misdn_lib_tone_generator_start(struct misdn_bchannel *bc);
void misdn_lib_tone_generator_stop(struct misdn_bchannel *bc);
void misdn_lib_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel *bc2);
void misdn_lib_split_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel *bc2);
void misdn_lib_echo(struct misdn_bchannel *bc, int onoff);
int misdn_lib_is_ptp(int port);
int misdn_lib_get_maxchans(int port);
void misdn_lib_reinit_nt_stack(int port);
#define PRI_TRANS_CAP_SPEECH 0x0
#define PRI_TRANS_CAP_DIGITAL 0x08
#define PRI_TRANS_CAP_RESTRICTED_DIGITAL 0x09
#define PRI_TRANS_CAP_3_1K_AUDIO 0x10
#define PRI_TRANS_CAP_7K_AUDIO 0x11
char *bc_state2str(enum bchannel_state state);
void bc_state_change(struct misdn_bchannel *bc, enum bchannel_state state);
void misdn_dump_chanlist(void);
void misdn_make_dummy(struct misdn_bchannel *dummybc, int port, int l3id, int nt, int channel);
#endif /* TE_LIB */

View File

@ -1,159 +0,0 @@
#ifndef ISDN_LIB_INTERN
#define ISDN_LIB_INTERN
#include <mISDNuser/mISDNlib.h>
#include <mISDNuser/isdn_net.h>
#include <mISDNuser/l3dss1.h>
#include <mISDNuser/net_l3.h>
#include <pthread.h>
#include "isdn_lib.h"
#ifndef MISDNUSER_VERSION_CODE
#error "You need a newer version of mISDNuser ..."
#elif MISDNUSER_VERSION_CODE < MISDNUSER_VERSION(1, 0, 3)
#error "You need a newer version of mISDNuser ..."
#endif
#define QI_ELEMENT(a) a.off
#ifndef mISDNUSER_HEAD_SIZE
#define mISDNUSER_HEAD_SIZE (sizeof(mISDNuser_head_t))
/*#define mISDNUSER_HEAD_SIZE (sizeof(mISDN_head_t))*/
#endif
#if 0
ibuffer_t *astbuf; /* Not used */
ibuffer_t *misdnbuf; /* Not used */
#endif
struct send_lock {
pthread_mutex_t lock;
};
struct isdn_msg {
unsigned long misdn_msg;
enum event_e event;
void (*msg_parser)(struct isdn_msg *msgs, msg_t *msg, struct misdn_bchannel *bc, int nt);
msg_t *(*msg_builder)(struct isdn_msg *msgs, struct misdn_bchannel *bc, int nt);
char *info;
} ;
/* for isdn_msg_parser.c */
msg_t *create_l3msg(int prim, int mt, int dinfo , int size, int nt);
#if defined(AST_MISDN_ENHANCEMENTS)
/* Max call-completion REGISTER signaling links per stack/port */
#define MISDN_MAX_REGISTER_LINKS MAX_BCHANS
#else
/* Max call-completion REGISTER signaling links per stack/port */
#define MISDN_MAX_REGISTER_LINKS 0
#endif /* defined(AST_MISDN_ENHANCEMENTS) */
#define MAXPROCS 0x100
struct misdn_stack {
/** is first element because &nst equals &mISDNlist **/
net_stack_t nst;
manager_t mgr;
pthread_mutex_t nstlock;
/*! \brief Stack struct critical section lock. */
pthread_mutex_t st_lock;
/*! \brief D Channel mISDN driver stack ID (Parent stack ID) */
int d_stid;
/*! /brief Number of B channels supported by this port */
int b_num;
/*! \brief B Channel mISDN driver stack IDs (Child stack IDs) */
int b_stids[MAX_BCHANS + 1];
/*! \brief TRUE if Point-To-Point(PTP) (Point-To-Multipoint(PTMP) otherwise) */
int ptp;
/*! \brief Number of consecutive times PTP Layer 2 declared down */
int l2upcnt;
int l2_id; /* Not used */
/*! \brief Lower layer mISDN ID (addr) (Layer 1/3) */
int lower_id;
/*! \brief Upper layer mISDN ID (addr) (Layer 2/4) */
int upper_id;
/*! \brief TRUE if port is blocked */
int blocked;
/*! \brief TRUE if Layer 2 is UP */
int l2link;
/*! \brief TRUE if Layer 1 is UP */
int l1link;
/*! \brief TRUE if restart has been sent to the other side after stack startup */
int restart_sent;
/*! \brief mISDN device handle returned by mISDN_open() */
int midev;
/*! \brief TRUE if NT side of protocol (TE otherwise) */
int nt;
/*! \brief TRUE if ISDN-PRI (ISDN-BRI otherwise) */
int pri;
/*! \brief CR Process ID allocation table. TRUE if ID allocated */
int procids[MAXPROCS];
/*! \brief Queue of Event messages to send to mISDN */
msg_queue_t downqueue;
msg_queue_t upqueue; /* No code puts anything on this queue */
int busy; /* Not used */
/*! \brief Logical Layer 1 port associated with this stack */
int port;
/*!
* \brief B Channel record pool array
* (Must be dimensioned the same as struct misdn_stack.channels[])
*/
struct misdn_bchannel bc[MAX_BCHANS + 1 + MISDN_MAX_REGISTER_LINKS];
/*!
* \brief Array of B channels in use (a[0] = B1). TRUE if B channel in use.
* (Must be dimensioned the same as struct misdn_stack.bc[])
*/
char channels[MAX_BCHANS + 1 + MISDN_MAX_REGISTER_LINKS];
/*! \brief List of held channels */
struct misdn_bchannel *holding;
/*! \brief Next stack in the list of stacks */
struct misdn_stack *next;
};
struct misdn_stack* get_stack_by_bc(struct misdn_bchannel *bc);
int isdn_msg_get_index(struct isdn_msg msgs[], msg_t *frm, int nt);
enum event_e isdn_msg_get_event(struct isdn_msg msgs[], msg_t *frm, int nt);
int isdn_msg_parse_event(struct isdn_msg msgs[], msg_t *frm, struct misdn_bchannel *bc, int nt);
char * isdn_get_info(struct isdn_msg msgs[], enum event_e event, int nt);
msg_t * isdn_msg_build_event(struct isdn_msg msgs[], struct misdn_bchannel *bc, enum event_e event, int nt);
int isdn_msg_get_index_by_event(struct isdn_msg msgs[], enum event_e event, int nt);
char * isdn_msg_get_info(struct isdn_msg msgs[], msg_t *msg, int nt);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,205 +0,0 @@
/*! \file
* \brief Interface to mISDN - port info
* \author Christian Richter <crich@beronet.com>
*/
/*** MODULEINFO
<support_level>extended</support_level>
***/
#include "isdn_lib.h"
#include "isdn_lib_intern.h"
/*
* global function to show all available isdn ports
*/
void isdn_port_info(void)
{
int err;
int i, ii, p;
int useable, nt, pri;
unsigned char buff[1025];
iframe_t *frm = (iframe_t *)buff;
stack_info_t *stinf;
int device;
/* open mISDN */
if ((device = mISDN_open()) < 0)
{
fprintf(stderr, "mISDN_open() failed: ret=%d errno=%d (%s) Check for mISDN modules and device.\n", device, errno, strerror(errno));
exit(-1);
}
/* get number of stacks */
i = 1;
ii = mISDN_get_stack_count(device);
printf("\n");
if (ii <= 0)
{
printf("Found no card. Please be sure to load card drivers.\n");
}
/* loop the number of cards and get their info */
while(i <= ii)
{
err = mISDN_get_stack_info(device, i, buff, sizeof(buff));
if (err <= 0)
{
fprintf(stderr, "mISDN_get_stack_info() failed: port=%d err=%d\n", i, err);
break;
}
stinf = (stack_info_t *)&frm->data.p;
nt = pri = 0;
useable = 1;
/* output the port info */
printf("Port %2d: ", i);
switch(stinf->pid.protocol[0] & ~ISDN_PID_FEATURE_MASK)
{
case ISDN_PID_L0_TE_S0:
printf("TE-mode BRI S/T interface line (for phone lines)");
#if 0
if (stinf->pid.protocol[0] & ISDN_PID_L0_TE_S0_HFC & ISDN_PID_FEATURE_MASK)
printf(" HFC multiport card");
#endif
break;
case ISDN_PID_L0_NT_S0:
nt = 1;
printf("NT-mode BRI S/T interface port (for phones)");
#if 0
if (stinf->pid.protocol[0] & ISDN_PID_L0_NT_S0_HFC & ISDN_PID_FEATURE_MASK)
printf(" HFC multiport card");
#endif
break;
case ISDN_PID_L0_TE_U:
printf("TE-mode BRI U interface line");
break;
case ISDN_PID_L0_NT_U:
nt = 1;
printf("NT-mode BRI U interface port");
break;
case ISDN_PID_L0_TE_UP2:
printf("TE-mode BRI Up2 interface line");
break;
case ISDN_PID_L0_NT_UP2:
nt = 1;
printf("NT-mode BRI Up2 interface port");
break;
case ISDN_PID_L0_TE_E1:
pri = 1;
printf("TE-mode PRI E1 interface line (for phone lines)");
#if 0
if (stinf->pid.protocol[0] & ISDN_PID_L0_TE_E1_HFC & ISDN_PID_FEATURE_MASK)
printf(" HFC-E1 card");
#endif
break;
case ISDN_PID_L0_NT_E1:
nt = 1;
pri = 1;
printf("NT-mode PRI E1 interface port (for phones)");
#if 0
if (stinf->pid.protocol[0] & ISDN_PID_L0_NT_E1_HFC & ISDN_PID_FEATURE_MASK)
printf(" HFC-E1 card");
#endif
break;
default:
useable = 0;
printf("unknown type 0x%08x",stinf->pid.protocol[0]);
}
printf("\n");
if (nt)
{
if (stinf->pid.protocol[1] == 0)
{
useable = 0;
printf(" -> Missing layer 1 NT-mode protocol.\n");
}
p = 2;
while(p <= MAX_LAYER_NR) {
if (stinf->pid.protocol[p])
{
useable = 0;
printf(" -> Layer %d protocol 0x%08x is detected, but not allowed for NT lib.\n", p, stinf->pid.protocol[p]);
}
p++;
}
if (useable)
{
if (pri)
printf(" -> Interface is Point-To-Point (PRI).\n");
else
printf(" -> Interface can be Poin-To-Point/Multipoint.\n");
}
} else
{
if (stinf->pid.protocol[1] == 0)
{
useable = 0;
printf(" -> Missing layer 1 protocol.\n");
}
if (stinf->pid.protocol[2] == 0)
{
useable = 0;
printf(" -> Missing layer 2 protocol.\n");
}
if (stinf->pid.protocol[2] & ISDN_PID_L2_DF_PTP)
{
printf(" -> Interface is Poin-To-Point.\n");
}
if (stinf->pid.protocol[3] == 0)
{
useable = 0;
printf(" -> Missing layer 3 protocol.\n");
} else
{
printf(" -> Protocol: ");
switch(stinf->pid.protocol[3] & ~ISDN_PID_FEATURE_MASK)
{
case ISDN_PID_L3_DSS1USER:
printf("DSS1 (Euro ISDN)");
break;
default:
useable = 0;
printf("unknown protocol 0x%08x",stinf->pid.protocol[3]);
}
printf("\n");
}
p = 4;
while(p <= MAX_LAYER_NR) {
if (stinf->pid.protocol[p])
{
useable = 0;
printf(" -> Layer %d protocol 0x%08x is detected, but not allowed for TE lib.\n", p, stinf->pid.protocol[p]);
}
p++;
}
printf(" -> childcnt: %d\n",stinf->childcnt);
}
if (!useable)
printf(" * Port NOT useable for PBX\n");
printf("--------\n");
i++;
}
printf("\n");
/* close mISDN */
if ((err = mISDN_close(device)))
{
fprintf(stderr, "mISDN_close() failed: err=%d '%s'\n", err, strerror(err));
exit(-1);
}
}
int main()
{
isdn_port_info();
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,537 +0,0 @@
;
; chan_misdn sample config
;
; general section:
;
; for debugging and general setup, things that are not bound to port groups
;
[general]
;
; Sets the Path to the misdn-init.conf (for nt_ptp mode checking)
;
misdn_init=/etc/misdn-init.conf
; set debugging flag:
; 0 - No Debug
; 1 - mISDN Messages and * - Messages, and * - State changes
; 2 - Messages + Message specific Informations (e.g. bearer capability)
; 3 - very Verbose, the above + lots of Driver specific infos
; 4 - even more Verbose than 3
;
; default value: 0
;
debug=0
; set debugging file and flags for mISDNuser (NT-Stack)
;
; flags can be or'ed with the following values:
;
; DBGM_NET 0x00000001
; DBGM_MSG 0x00000002
; DBGM_FSM 0x00000004
; DBGM_TEI 0x00000010
; DBGM_L2 0x00000020
; DBGM_L3 0x00000040
; DBGM_L3DATA 0x00000080
; DBGM_BC 0x00000100
; DBGM_TONE 0x00000200
; DBGM_BCDATA 0x00000400
; DBGM_MAN 0x00001000
; DBGM_APPL 0x00002000
; DBGM_ISDN 0x00004000
; DBGM_SOCK 0x00010000
; DBGM_CONN 0x00020000
; DBGM_CDATA 0x00040000
; DBGM_DDATA 0x00080000
; DBGM_SOUND 0x00100000
; DBGM_SDATA 0x00200000
; DBGM_TOPLEVEL 0x40000000
; DBGM_ALL 0xffffffff
;
ntdebugflags=0
ntdebugfile=/var/log/misdn-nt.log
; some pbx systems do cut the L1 for some milliseconds, to avoid
; dropping running calls, we can set this flag to yes and tell
; mISDNuser not to drop the calls on L2_RELEASE
ntkeepcalls=no
; the big trace
;
; default value: [not set]
;
;tracefile=/var/log/asterisk/misdn.log
; set to yes if you want mISDN_dsp to bridge the calls in HW
;
; default value: yes
;
bridging=no
; stops dialtone after getting first digit on nt Port
;
; default value: yes
;
stop_tone_after_first_digit=yes
; whether to append overlapdialed Digits to Extension or not
;
; default value: yes
;
append_digits2exten=yes
;;; CRYPTION STUFF
; Whether to look for dynamic crypting attempt
;
; default value: no
;
dynamic_crypt=no
; crypt_prefix, what is used for crypting Protocol
;
; default value: [not set]
;
crypt_prefix=**
; Keys for cryption, you reference them in the dialplan
; later also in dynamic encr.
;
; default value: [not set]
;
crypt_keys=test,muh
; ----------------------------- JITTER BUFFER CONFIGURATION --------------------------
; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
; SIP channel. Defaults to "no". An enabled jitterbuffer will
; be used only if the sending side can create and the receiving
; side can not accept jitter. The SIP channel can accept jitter,
; thus a jitterbuffer on the receive SIP side will be used only
; if it is forced and enabled.
; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a SIP
; channel. Defaults to "no".
; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
; resynchronized. Useful to improve the quality of the voice, with
; big jumps in/broken timestamps, usually sent from exotic devices
; and programs. Defaults to 1000.
; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP
; channel. Two implementations are currently available - "fixed"
; (with size always equals to jbmaxsize) and "adaptive" (with
; variable size, actually the new jb of IAX2). Defaults to fixed.
; jbtargetextra = 40 ; This option only affects the jb when 'jbimpl = adaptive' is set.
; The option represents the number of milliseconds by which the new
; jitter buffer will pad its size. the default is 40, so without
; modification, the new jitter buffer will set its size to the jitter
; value plus 40 milliseconds. increasing this value may help if your
; network normally has low jitter, but occasionally has spikes.
; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
; ----------------------------------------------------------------------------------
; users sections:
;
; name your sections as you wish but not "general" or "default" !
; the sections are Groups, you can dial out in extensions.conf
; with Dial(mISDN/g:extern/101) where extern is a section name,
; chan_misdn tries every port in this section to find a
; new free channel
;
; The default section is not a group section, it just contains config elements
; which are inherited by group sections.
;
[default]
; define your default context here
;
; default value: default
;
context=misdn
; language
;
; default value: en
;
language=en
;
; This option specifies a default music on hold class to
; use when put on hold if the channel's moh class was not
; explicitly set with Set(CHANNEL(musicclass)=whatever) and
; the peer channel did not suggest a class to use.
;
musicclass=default
;
; Either if we should produce DTMF Tones ourselves
;
senddtmf=yes
;
; If we should generate Ringing for chan_sip and others
;
far_alerting=no
;
; Here you can list which bearer capabilities should be allowed:
; all - allow any bearer capability
; speech - allow speech
; 3_1khz - allow 3.1KHz audio
; digital_unrestricted - allow unrestricted digital
; digital_restricted - allow restricted digital
; video - allow video
;
; Example:
; allowed_bearers=speech,3_1khz
;
allowed_bearers=all
; Incoming number prefixes for the indicated Type-Of-Number. These are
; inserted before any number (caller, dialed, connected, redirecting,
; redirection) received from the ISDN link if that number has the
; corresponding Type-Of-Number.
; See the dialplan options.
;
; default values:
; unknownprefix=
; internationalprefix=00
; nationalprefix=0
; netspecificprefix=
; subscriberprefix=
; abbreviatedprefix=
;
;unknownprefix=
internationalprefix=00
nationalprefix=0
;netspecificprefix=
;subscriberprefix=
;abbreviatedprefix=
; set rx/tx gains between -8 and 8 to change the RX/TX Gain
;
; default values: rxgain: 0
; txgain: 0
;
rxgain=0
txgain=0
; some telcos especially in NL seem to need this set to yes, also in
; switzerland this seems to be important
;
; default value: no
;
te_choose_channel=no
;
; Monitors L1 of the port. If L1 is down it tries
; to bring it up. The polling timeout is given in seconds.
; Setting the value to 0 disables monitoring L1 of the port.
;
; default value: 0
;
; This option is only read at chan_misdn loading time.
; You need to unload and load chan_misdn to change the
; value. An asterisk restart will also do the trick.
;
l1watcher_timeout=0
;
; This option defines, if chan_misdn should check the L1 on a PMP
; before making a group call on it. The L1 may go down for PMP Ports
; so we might need this.
; But be aware! a broken or plugged off cable might be used for a group call
; as well, since chan_misdn has no chance to distinguish if the L1 is down
; because of a lost Link or because the Provider shut it down...
;
; default: no
;
pmp_l1_check=no
;
; in PMP this option defines which cause should be sent out to
; the 3. caller. chan_misdn does not support callwaiting on TE
; PMP side. This allows to modify the RELEASE_COMPLETE cause
; at least.
;
reject_cause=16
;
; Send Setup_Acknowledge on incoming calls anyway (instead of PROCEEDING),
; this requests additional Infos, so we can waitfordigits
; without much issues. This works only for PTP Ports
;
; default value: no
;
need_more_infos=no
;
; set this to yes if you want to disconnect calls when a timeout occurs
; for example during the overlapdial phase
;
nttimeout=no
; Set the method to use for channel selection:
; standard - Use the first free channel starting from the lowest number.
; standard_dec - Use the first free channel starting from the highest number.
; round_robin - Use the round robin algorithm to select a channel. Use this
; if you want to balance your load.
;
; default value: standard
;
method=standard
; specify if chan_misdn should collect digits before going into the
; dialplan, you can choose yes=4 Seconds, no, or specify the amount
; of seconds you need;
;
overlapdial=yes
;
; dialplan means Type Of Number in ISDN Terms
; There are different types of the dialplan:
;
; dialplan -> for outgoing call's dialed number
; localdialplan -> for outgoing call's callerid
; (if -1 is set use the value from the asterisk channel)
; cpndialplan -> for incoming call's connected party number sent to caller
; (if -1 is set use the value from the asterisk channel)
;
; dialplan options:
;
; 0 - unknown
; 1 - International
; 2 - National
; 3 - Network-Specific
; 4 - Subscriber
; 5 - Abbreviated
;
; default value: 0
;
dialplan=0
localdialplan=0
cpndialplan=0
;
; turn this to no if you don't mind correct handling of Progress Indicators
;
early_bconnect=yes
;
; turn this on if you like to send Tone Indications to a Incoming
; isdn channel on a TE Port. Rarely used, only if the Telco allows
; you to send indications by yourself, normally the Telco sends the
; indications to the remote party.
;
; default: no
;
incoming_early_audio=no
; uncomment the following to get into s extension at extension conf
; there you can use DigitTimeout if you can't or don't want to use
; isdn overlap dial.
; note: This will jump into the s exten for every exten!
;
; default value: no
;
;always_immediate=no
;
; set this to yes if you want to generate your own dialtone
; with always_immediate=yes, else chan_misdn generates the dialtone
;
; default value: no
;
nodialtone=no
; uncomment the following if you want callers which called exactly the
; base number (so no extension is set) jump to the s extension.
; if the user dials something more it jumps to the correct extension
; instead
;
; default value: no
;
;immediate=no
; uncomment the following to have hold and retrieve support
;
; default value: no
;
;hold_allowed=yes
; Pickup and Callgroup
;
; default values: not set = 0
; range: 0-63
;
;callgroup=1
;pickupgroup=1
; Named pickup groups and named call groups
;
; give a name to groups and configure any number of groups
;
;namedcallgroup=engineering,sales,netgroup,protgroup
;namedpickupgroup=sales
; Set the outgoing caller id to the value.
;callerid="name" <number>
;
; these are the exact isdn screening and presentation indicators
; if -1 is given for either value the presentation indicators are used
; from asterisks CALLERPRES function.
; s=0, p=0 -> callerid presented
; s=1, p=1 -> callerid restricted (the remote end does not see it!)
;
; default values s=-1, p=-1
presentation=-1
screen=-1
; Incoming calls will have a caller ID tag set to this value
;
;incoming_cid_tag = "asterisk"
; With this set, you can automatically append the MSN of a party
; to the cid_tag. Incoming calls have the dialed number appended
; to the tag, and outgoing calls have the caller number appended
; to the tag. An '_' is used to separate the tag from the
; MSN.
; Default is no.
;
;append_msn_to_cid_tag = no
; Select what to do with outgoing COLP information on this port.
;
; 0 - Send out COLP information unaltered. (default)
; 1 - Force COLP to restricted on all outgoing COLP information.
; 2 - Do not send COLP information.
outgoing_colp=0
; Put a display ie in the CONNECT message containing the following
; information if it is available (nt port only):
;
; 0 - Do not put the connected line information in the display ie.
; 1 - Put the available connected line name in the display ie.
; 2 - Put the available connected line number in the display ie.
; 3 - Put the available connected line name and number in the display ie.
;
display_connected=0
; Put a display ie in the SETUP message containing the following
; information if it is available (nt port only):
;
; 0 - Do not put the caller information in the display ie.
; 1 - Put the available caller name in the display ie.
; 2 - Put the available caller number in the display ie.
; 3 - Put the available caller name and number in the display ie.
;
display_setup=0
; This enables echo cancellation with the given number of taps.
; Be aware: Move this setting only to outgoing portgroups!
; A value of zero turns echo cancellation off.
;
; possible values are: 0,32,64,128,256,yes(=128),no(=0)
;
; default value: no
;
;echocancel=no
;
; chan_misdns jitterbuffer, default 4000
;
jitterbuffer=4000
;
; change this threshold to enable dejitter functionality
;
jitterbuffer_upper_threshold=0
;
; change this to yes, if you want to bridge a mISDN data channel to
; another channel type or to an application.
;
hdlc=no
;
; defines the maximum amount of incoming calls per port for
; this group. Calls which exceed the maximum will be marked with
; the channel variable MAX_OVERFLOW. It will contain the amount of
; overflowed calls
;
max_incoming=-1
;
; defines the maximum amount of outgoing calls per port for this group
; exceeding calls will be rejected
;
max_outgoing=-1
;
; Enable/disable the call-completion retention option support (ptp only).
;
; Note: To use the CCBS/CCNR supplementary service feature and other
; supplementary services using FACILITY messages requires a
; modified version of mISDN from:
; http://svn.digium.com/svn/thirdparty/mISDN/trunk
; http://svn.digium.com/svn/thirdparty/mISDNuser/trunk
;
cc_request_retention=yes
[intern]
; define your ports, e.g. 1,2 (depends on mISDN-driver loading order)
ports=1,2
; context where to go to when incoming Call on one of the above ports
context=Intern
[internPP]
;
; adding the postfix 'ptp' to a port number is obsolete now, chan_misdn
; parses /etc/misdn-init.conf and sets the ptp mode to the corresponding
; configs. For backwards compatibility you can still set ptp here.
;
ports=3
[first_extern]
; again port defs
ports=4
; again a context for incoming calls
context=Extern1
; msns for te ports, listen on those numbers on the above ports, and
; indicate the incoming calls to asterisk
; here you can give a comma separated list or simply an '*' for
; any msn.
msns=*
; here an example with given msns
[second_extern]
ports=5
context=Extern2
callerid="Asterisk" <1234>
msns=102,144,101,104

519
configure vendored
View File

@ -667,8 +667,6 @@ CONFIG_NETSNMP
CONFIG_NEON29
CONFIG_NEON
CONFIG_MYSQLCLIENT
PBX_MISDN_FAC_ERROR
PBX_MISDN_FAC_RESULT
ILBC_LIBS
ILBC_CFLAGS
ILBC_INTERNAL
@ -750,10 +748,6 @@ PBX_FREETDS
FREETDS_DIR
FREETDS_INCLUDE
FREETDS_LIB
PBX_SUPPSERV
SUPPSERV_DIR
SUPPSERV_INCLUDE
SUPPSERV_LIB
PBX_RT
RT_DIR
RT_INCLUDE
@ -1038,10 +1032,6 @@ PBX_MYSQLCLIENT
MYSQLCLIENT_DIR
MYSQLCLIENT_INCLUDE
MYSQLCLIENT_LIB
PBX_MISDN
MISDN_DIR
MISDN_INCLUDE
MISDN_LIB
LUA_VERSIONS
PBX_LUA
LUA_DIR
@ -1088,10 +1078,6 @@ PBX_JACK
JACK_DIR
JACK_INCLUDE
JACK_LIB
PBX_ISDNNET
ISDNNET_DIR
ISDNNET_INCLUDE
ISDNNET_LIB
PBX_IODBC
IODBC_DIR
IODBC_INCLUDE
@ -1394,7 +1380,6 @@ with_iksemel
with_imap
with_inotify
with_iodbc
with_isdnnet
with_jack
with_jansson
with_uriparser
@ -1405,7 +1390,6 @@ with_libedit
with_libxml2
with_libxslt
with_lua
with_misdn
with_mysqlclient
with_neon
with_neon29
@ -1436,7 +1420,6 @@ with_sqlite
with_sqlite3
with_srtp
with_ssl
with_suppserv
with_tds
with_timerfd
with_tonezone
@ -2165,7 +2148,6 @@ Optional Packages:
--with-imap=PATH use UW IMAP Toolkit files in PATH
--with-inotify=PATH use inotify support files in PATH
--with-iodbc=PATH use iODBC files in PATH
--with-isdnnet=PATH use ISDN4Linux files in PATH
--with-jack=PATH use Jack Audio Connection Kit files in PATH
--with-jansson=PATH use Jansson JSON library files in PATH
--with-uriparser=PATH use uriparser library files in PATH
@ -2177,7 +2159,6 @@ Optional Packages:
--with-libxml2=PATH use LibXML2 files in PATH
--with-libxslt=PATH use LibXSLT files in PATH
--with-lua=PATH use Lua files in PATH
--with-misdn=PATH use mISDN user files in PATH
--with-mysqlclient=PATH use MySQL client files in PATH
--with-neon=PATH use neon files in PATH
--with-neon29=PATH use neon29 files in PATH
@ -2209,7 +2190,6 @@ Optional Packages:
--with-sqlite3=PATH use SQLite files in PATH
--with-srtp=PATH use Secure RTP files in PATH
--with-ssl=PATH use OpenSSL Secure Sockets Layer files in PATH
--with-suppserv=PATH use mISDN Supplemental Services files in PATH
--with-tds=PATH use FreeTDS files in PATH
--with-timerfd=PATH use timerfd files in PATH
--with-tonezone=PATH use tonezone files in PATH
@ -10116,38 +10096,6 @@ fi
ISDNNET_DESCRIP="ISDN4Linux"
ISDNNET_OPTION="isdnnet"
PBX_ISDNNET=0
# Check whether --with-isdnnet was given.
if test "${with_isdnnet+set}" = set; then :
withval=$with_isdnnet;
case ${withval} in
n|no)
USE_ISDNNET=no
# -1 is a magic value used by menuselect to know that the package
# was disabled, other than 'not found'
PBX_ISDNNET=-1
;;
y|ye|yes)
ac_mandatory_list="${ac_mandatory_list} ISDNNET"
;;
*)
ISDNNET_DIR="${withval}"
ac_mandatory_list="${ac_mandatory_list} ISDNNET"
;;
esac
fi
JACK_DESCRIP="Jack Audio Connection Kit"
JACK_OPTION="jack"
PBX_JACK=0
@ -10848,38 +10796,6 @@ fi
MISDN_DESCRIP="mISDN user"
MISDN_OPTION="misdn"
PBX_MISDN=0
# Check whether --with-misdn was given.
if test "${with_misdn+set}" = set; then :
withval=$with_misdn;
case ${withval} in
n|no)
USE_MISDN=no
# -1 is a magic value used by menuselect to know that the package
# was disabled, other than 'not found'
PBX_MISDN=-1
;;
y|ye|yes)
ac_mandatory_list="${ac_mandatory_list} MISDN"
;;
*)
MISDN_DIR="${withval}"
ac_mandatory_list="${ac_mandatory_list} MISDN"
;;
esac
fi
MYSQLCLIENT_DESCRIP="MySQL client"
MYSQLCLIENT_OPTION="mysqlclient"
PBX_MYSQLCLIENT=0
@ -12383,38 +12299,6 @@ PBX_RT=0
SUPPSERV_DESCRIP="mISDN Supplemental Services"
SUPPSERV_OPTION="suppserv"
PBX_SUPPSERV=0
# Check whether --with-suppserv was given.
if test "${with_suppserv+set}" = set; then :
withval=$with_suppserv;
case ${withval} in
n|no)
USE_SUPPSERV=no
# -1 is a magic value used by menuselect to know that the package
# was disabled, other than 'not found'
PBX_SUPPSERV=-1
;;
y|ye|yes)
ac_mandatory_list="${ac_mandatory_list} SUPPSERV"
;;
*)
SUPPSERV_DIR="${withval}"
ac_mandatory_list="${ac_mandatory_list} SUPPSERV"
;;
esac
fi
FREETDS_DESCRIP="FreeTDS"
FREETDS_OPTION="tds"
PBX_FREETDS=0
@ -22236,409 +22120,6 @@ fi
if test "x${PBX_MISDN}" != "x1" -a "${USE_MISDN}" != "no"; then
pbxlibdir=""
# if --with-MISDN=DIR has been specified, use it.
if test "x${MISDN_DIR}" != "x"; then
if test -d ${MISDN_DIR}/lib; then
pbxlibdir="-L${MISDN_DIR}/lib"
else
pbxlibdir="-L${MISDN_DIR}"
fi
fi
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mISDN_open in -lmISDN" >&5
$as_echo_n "checking for mISDN_open in -lmISDN... " >&6; }
if ${ac_cv_lib_mISDN_mISDN_open+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmISDN ${pbxlibdir} $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char mISDN_open ();
int
main ()
{
return mISDN_open ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_mISDN_mISDN_open=yes
else
ac_cv_lib_mISDN_mISDN_open=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mISDN_mISDN_open" >&5
$as_echo "$ac_cv_lib_mISDN_mISDN_open" >&6; }
if test "x$ac_cv_lib_mISDN_mISDN_open" = xyes; then :
AST_MISDN_FOUND=yes
else
AST_MISDN_FOUND=no
fi
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_MISDN_FOUND}" = "yes"; then
MISDN_LIB="${pbxlibdir} -lmISDN "
# if --with-MISDN=DIR has been specified, use it.
if test "x${MISDN_DIR}" != "x"; then
MISDN_INCLUDE="-I${MISDN_DIR}/include"
fi
MISDN_INCLUDE="${MISDN_INCLUDE} "
# check for the header
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${MISDN_INCLUDE}"
ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/mISDNlib.h" "ac_cv_header_mISDNuser_mISDNlib_h" "$ac_includes_default"
if test "x$ac_cv_header_mISDNuser_mISDNlib_h" = xyes; then :
MISDN_HEADER_FOUND=1
else
MISDN_HEADER_FOUND=0
fi
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${MISDN_HEADER_FOUND}" = "x0" ; then
MISDN_LIB=""
MISDN_INCLUDE=""
else
PBX_MISDN=1
cat >>confdefs.h <<_ACEOF
#define HAVE_MISDN 1
_ACEOF
fi
fi
fi
if test "${PBX_MISDN}" = 1; then
if test "x${PBX_ISDNNET}" != "x1" -a "${USE_ISDNNET}" != "no"; then
pbxlibdir=""
# if --with-ISDNNET=DIR has been specified, use it.
if test "x${ISDNNET_DIR}" != "x"; then
if test -d ${ISDNNET_DIR}/lib; then
pbxlibdir="-L${ISDNNET_DIR}/lib"
else
pbxlibdir="-L${ISDNNET_DIR}"
fi
fi
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for init_manager in -lisdnnet" >&5
$as_echo_n "checking for init_manager in -lisdnnet... " >&6; }
if ${ac_cv_lib_isdnnet_init_manager+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lisdnnet ${pbxlibdir} -lmISDN -lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char init_manager ();
int
main ()
{
return init_manager ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_isdnnet_init_manager=yes
else
ac_cv_lib_isdnnet_init_manager=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_isdnnet_init_manager" >&5
$as_echo "$ac_cv_lib_isdnnet_init_manager" >&6; }
if test "x$ac_cv_lib_isdnnet_init_manager" = xyes; then :
AST_ISDNNET_FOUND=yes
else
AST_ISDNNET_FOUND=no
fi
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_ISDNNET_FOUND}" = "yes"; then
ISDNNET_LIB="${pbxlibdir} -lisdnnet -lmISDN -lpthread"
# if --with-ISDNNET=DIR has been specified, use it.
if test "x${ISDNNET_DIR}" != "x"; then
ISDNNET_INCLUDE="-I${ISDNNET_DIR}/include"
fi
ISDNNET_INCLUDE="${ISDNNET_INCLUDE} "
# check for the header
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${ISDNNET_INCLUDE}"
ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/isdn_net.h" "ac_cv_header_mISDNuser_isdn_net_h" "$ac_includes_default"
if test "x$ac_cv_header_mISDNuser_isdn_net_h" = xyes; then :
ISDNNET_HEADER_FOUND=1
else
ISDNNET_HEADER_FOUND=0
fi
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${ISDNNET_HEADER_FOUND}" = "x0" ; then
ISDNNET_LIB=""
ISDNNET_INCLUDE=""
else
PBX_ISDNNET=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ISDNNET 1
_ACEOF
fi
fi
fi
if test "x${PBX_SUPPSERV}" != "x1" -a "${USE_SUPPSERV}" != "no"; then
pbxlibdir=""
# if --with-SUPPSERV=DIR has been specified, use it.
if test "x${SUPPSERV_DIR}" != "x"; then
if test -d ${SUPPSERV_DIR}/lib; then
pbxlibdir="-L${SUPPSERV_DIR}/lib"
else
pbxlibdir="-L${SUPPSERV_DIR}"
fi
fi
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for encodeFac in -lsuppserv" >&5
$as_echo_n "checking for encodeFac in -lsuppserv... " >&6; }
if ${ac_cv_lib_suppserv_encodeFac+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsuppserv ${pbxlibdir} $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char encodeFac ();
int
main ()
{
return encodeFac ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_suppserv_encodeFac=yes
else
ac_cv_lib_suppserv_encodeFac=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_suppserv_encodeFac" >&5
$as_echo "$ac_cv_lib_suppserv_encodeFac" >&6; }
if test "x$ac_cv_lib_suppserv_encodeFac" = xyes; then :
AST_SUPPSERV_FOUND=yes
else
AST_SUPPSERV_FOUND=no
fi
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_SUPPSERV_FOUND}" = "yes"; then
SUPPSERV_LIB="${pbxlibdir} -lsuppserv "
# if --with-SUPPSERV=DIR has been specified, use it.
if test "x${SUPPSERV_DIR}" != "x"; then
SUPPSERV_INCLUDE="-I${SUPPSERV_DIR}/include"
fi
SUPPSERV_INCLUDE="${SUPPSERV_INCLUDE} "
# check for the header
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${SUPPSERV_INCLUDE}"
ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/suppserv.h" "ac_cv_header_mISDNuser_suppserv_h" "$ac_includes_default"
if test "x$ac_cv_header_mISDNuser_suppserv_h" = xyes; then :
SUPPSERV_HEADER_FOUND=1
else
SUPPSERV_HEADER_FOUND=0
fi
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${SUPPSERV_HEADER_FOUND}" = "x0" ; then
SUPPSERV_LIB=""
SUPPSERV_INCLUDE=""
else
PBX_SUPPSERV=1
cat >>confdefs.h <<_ACEOF
#define HAVE_SUPPSERV 1
_ACEOF
fi
fi
fi
if test "x${PBX_MISDN_FAC_RESULT}" != "x1"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fac_RESULT in mISDNuser/suppserv.h" >&5
$as_echo_n "checking for Fac_RESULT in mISDNuser/suppserv.h... " >&6; }
saved_cppflags="${CPPFLAGS}"
if test "x${MISDN_FAC_RESULT_DIR}" != "x"; then
MISDN_FAC_RESULT_INCLUDE="-I${MISDN_FAC_RESULT_DIR}/include"
fi
CPPFLAGS="${CPPFLAGS} ${MISDN_FAC_RESULT_INCLUDE}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <mISDNuser/suppserv.h>
int
main ()
{
#if defined(Fac_RESULT)
int foo = 0;
#else
int foo = bar;
#endif
0
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
PBX_MISDN_FAC_RESULT=1
$as_echo "#define HAVE_MISDN_FAC_RESULT 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="${saved_cppflags}"
fi
if test "x${PBX_MISDN_FAC_ERROR}" != "x1"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fac_ERROR in mISDNuser/suppserv.h" >&5
$as_echo_n "checking for Fac_ERROR in mISDNuser/suppserv.h... " >&6; }
saved_cppflags="${CPPFLAGS}"
if test "x${MISDN_FAC_ERROR_DIR}" != "x"; then
MISDN_FAC_ERROR_INCLUDE="-I${MISDN_FAC_ERROR_DIR}/include"
fi
CPPFLAGS="${CPPFLAGS} ${MISDN_FAC_ERROR_INCLUDE}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <mISDNuser/suppserv.h>
int
main ()
{
#if defined(Fac_ERROR)
int foo = 0;
#else
int foo = bar;
#endif
0
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
PBX_MISDN_FAC_ERROR=1
$as_echo "#define HAVE_MISDN_FAC_ERROR 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="${saved_cppflags}"
fi
ac_fn_c_check_header_mongrel "$LINENO" "linux/mISDNdsp.h" "ac_cv_header_linux_mISDNdsp_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_mISDNdsp_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define MISDN_1_2 1
_ACEOF
fi
ac_fn_c_check_member "$LINENO" "Q931_info_t" "redirect_dn" "ac_cv_member_Q931_info_t_redirect_dn" "#include <mISDNuser/mISDNlib.h>
"
if test "x$ac_cv_member_Q931_info_t_redirect_dn" = xyes; then :
else
PBX_MISDN=0
fi
fi
if test "x${PBX_MYSQLCLIENT}" != "x1" -a "${USE_MYSQLCLIENT}" != "no"; then
PBX_MYSQLCLIENT=0
if test -n "$ac_tool_prefix"; then

View File

@ -498,7 +498,6 @@ AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber], [iksemel])
AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap])
AST_EXT_LIB_SETUP([INOTIFY], [inotify support], [inotify])
AST_EXT_LIB_SETUP([IODBC], [iODBC], [iodbc])
AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux], [isdnnet])
AST_EXT_LIB_SETUP([JACK], [Jack Audio Connection Kit], [jack])
AST_EXT_LIB_SETUP([JANSSON], [Jansson JSON library], [jansson])
AST_EXT_LIB_SETUP([URIPARSER], [uriparser library], [uriparser])
@ -512,7 +511,6 @@ AST_EXT_LIB_SETUP([LIBXSLT], [LibXSLT], [libxslt])
AST_EXT_LIB_SETUP_OPTIONAL([LIBXSLT_CLEANUP], [LibXSLT Library Cleanup Function], [LIBXSLT], [libxslt])
AST_EXT_LIB_SETUP([LUA], [Lua], [lua])
AC_ARG_VAR([LUA_VERSIONS],[A space separated list of target lua versions to test.])
AST_EXT_LIB_SETUP([MISDN], [mISDN user], [misdn])
AST_EXT_LIB_SETUP([MYSQLCLIENT], [MySQL client], [mysqlclient])
AST_EXT_LIB_SETUP([NEON], [neon], [neon])
AST_EXT_LIB_SETUP([NEON29], [neon29], [neon29])
@ -594,7 +592,6 @@ AST_EXT_LIB_SETUP_OPTIONAL([SRTP_SHUTDOWN], [SRTP Library Shutdown Function], [S
AST_EXT_LIB_SETUP_OPTIONAL([SRTP_GET_VERSION], [SRTP Library Version Function], [SRTP], [srtp])
AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL Secure Sockets Layer], [ssl])
AST_EXT_LIB_SETUP_OPTIONAL([RT], [Realtime functions], [rt])
AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv])
AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds])
AST_EXT_LIB_SETUP([TIMERFD], [timerfd], [timerfd])
AST_EXT_LIB_SETUP([TONEZONE], [tonezone], [tonezone])
@ -2266,18 +2263,6 @@ AC_CHECK_FUNCS([kevent64])
AST_EXT_LIB_CHECK([LDAP], [ldap], [ldap_initialize], [ldap.h])
AST_EXT_LIB_CHECK([MISDN], [mISDN], [mISDN_open], [mISDNuser/mISDNlib.h])
if test "${PBX_MISDN}" = 1; then
AST_EXT_LIB_CHECK([ISDNNET], [isdnnet], [init_manager], [mISDNuser/isdn_net.h], [-lmISDN -lpthread])
AST_EXT_LIB_CHECK([SUPPSERV], [suppserv], [encodeFac], [mISDNuser/suppserv.h])
AST_C_DEFINE_CHECK([MISDN_FAC_RESULT], [Fac_RESULT], [mISDNuser/suppserv.h])
AST_C_DEFINE_CHECK([MISDN_FAC_ERROR], [Fac_ERROR], [mISDNuser/suppserv.h])
AC_CHECK_HEADER([linux/mISDNdsp.h], [AC_DEFINE_UNQUOTED([MISDN_1_2], 1, [Build chan_misdn for mISDN 1.2 or later.])])
AC_CHECK_MEMBER([Q931_info_t.redirect_dn], [], [PBX_MISDN=0], [#include <mISDNuser/mISDNlib.h>])
fi
AST_EXT_TOOL_CHECK([MYSQLCLIENT], [mysql_config])
if test "${PBX_MYSQLCLIENT}" = 1; then

View File

@ -0,0 +1,6 @@
Subject: chan_misdn
Master-Only: True
This module was deprecated in Asterisk 16
and is now being removed in accordance with
the Asterisk Module Deprecation policy.

View File

@ -404,9 +404,6 @@
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
/* Define to 1 if you have the ISDN4Linux library. */
#undef HAVE_ISDNNET
/* Define to 1 if you have the Jack Audio Connection Kit library. */
#undef HAVE_JACK
@ -510,15 +507,6 @@
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the mISDN user library. */
#undef HAVE_MISDN
/* Define if your system has the MISDN_FAC_ERROR headers. */
#undef HAVE_MISDN_FAC_ERROR
/* Define if your system has the MISDN_FAC_RESULT headers. */
#undef HAVE_MISDN_FAC_RESULT
/* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR
@ -1067,9 +1055,6 @@
/* Define to 1 if `uid' is a member of `struct ucred'. */
#undef HAVE_STRUCT_UCRED_UID
/* Define to 1 if you have the mISDN Supplemental Services library. */
#undef HAVE_SUPPSERV
/* Define to 1 if you have the `swapctl' function. */
#undef HAVE_SWAPCTL
@ -1354,9 +1339,6 @@
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
/* Build chan_misdn for mISDN 1.2 or later. */
#undef MISDN_1_2
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT

View File

@ -331,15 +331,6 @@ DAHDI_INCLUDE=@DAHDI_INCLUDE@
ZLIB_INCLUDE=@ZLIB_INCLUDE@
ZLIB_LIB=@ZLIB_LIB@
ISDNNET_INCLUDE=@ISDNNET_INCLUDE@
ISDNNET_LIB=@ISDNNET_LIB@
MISDN_INCLUDE=@MISDN_INCLUDE@
MISDN_LIB=@MISDN_LIB@
SUPPSERV_INCLUDE=@SUPPSERV_INCLUDE@
SUPPSERV_LIB=@SUPPSERV_LIB@
CAP_LIB=@CAP_LIB@
CAP_INCLUDE=@CAP_INCLUDE@