Add initial Basic Rate Interface (BRI) support...

Short summary of changes:
    (Massive) rework of the Q.921 layer
    Q.931 changes to get BRI PTMP working and cleanups (more to come...)
    Add Hi-Layer compat and Progress IE to outgoing SETUP messages
    Improve handling of call tear-down in zap_isdn.c
    Open ZAP I/O channels after processing the dialplan for incoming calls
    Bearer Capability and Channel ID IE handling improved for BRI/PRI and A-law/u-law

    ...and a lot of other small changes



git-svn-id: http://svn.openzap.org/svn/openzap/trunk@512 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Stefan Knoblich
2008-08-22 16:55:01 +00:00
parent 9e4558ab13
commit ff19726bd0
25 changed files with 5149 additions and 1060 deletions

View File

@@ -134,8 +134,8 @@
#include "libteletone.h"
#include "zap_buffer.h"
#include "zap_threadmutex.h"
#include "Q931.h"
#include "Q921.h"
#include "Q931.h"
#define XX if (0)
@@ -232,6 +232,19 @@
else zap_log(ZAP_LOG_WARNING, "VETO Changing state on %d:%d from %s to %s\n", obj->span_id, obj->chan_id, zap_channel_state2str(st), zap_channel_state2str(s)); \
}
#define zap_set_state_locked_wait(obj, s) \
do { \
int __safety = 100; \
zap_set_state_locked(obj, s); \
while(__safety-- && zap_test_flag(obj, ZAP_CHANNEL_STATE_CHANGE)) { \
zap_sleep(10); \
} \
if(!__safety) { \
zap_log(ZAP_LOG_CRIT, "State change not completed\n"); \
} \
} while(0);
typedef enum {
ZAP_STATE_CHANGE_FAIL,
ZAP_STATE_CHANGE_SUCCESS,

View File

@@ -53,10 +53,11 @@ struct zap_isdn_data {
struct zap_sigmsg sigmsg;
zio_signal_cb_t sig_cb;
uint32_t flags;
int32_t mode;
zap_isdn_opts_t opts;
zap_caller_data_t *outbound_crv[32768];
zap_channel_t *channels_local_crv[32768];
zap_channel_t *channels_remote_crv[32768];
zap_isdn_opts_t opts;
};

View File

@@ -117,11 +117,12 @@ typedef enum {
ZAP_TRUNK_T1,
ZAP_TRUNK_J1,
ZAP_TRUNK_BRI,
ZAP_TRUNK_BRI_PTMP,
ZAP_TRUNK_FXO,
ZAP_TRUNK_FXS,
ZAP_TRUNK_NONE
} zap_trunk_type_t;
#define TRUNK_STRINGS "E1", "T1", "J1", "BRI", "FXO", "FXS", "NONE"
#define TRUNK_STRINGS "E1", "T1", "J1", "BRI", "BRI_PTMP", "FXO", "FXS", "NONE"
ZAP_STR2ENUM_P(zap_str2zap_trunk_type, zap_trunk_type2str, zap_trunk_type_t)
typedef enum {