inbound calls milestone

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@255 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale
2007-06-14 03:54:02 +00:00
parent 06c9547078
commit 2ac9929c05
9 changed files with 164 additions and 75 deletions

View File

@@ -195,7 +195,7 @@
#define zap_set_state_locked(obj, s) if ( obj->state == s ) { \
zap_log(ZAP_LOG_WARNING, "Why bother changing state from %s to %s\n", zap_channel_state2str(obj->state), zap_channel_state2str(s)); \
} else { \
} else if (zap_test_flag(obj, ZAP_CHANNEL_READY)) { \
int st = obj->state; \
zap_channel_set_state(obj, s); \
if (obj->state == s) zap_log(ZAP_LOG_DEBUG, "Changing state from %s to %s\n", zap_channel_state2str(st), zap_channel_state2str(s)); \
@@ -297,6 +297,7 @@ struct zap_caller_data {
char dnis[25];
char rdnis[25];
int CRV;
int hangup_cause;
uint8_t raw_data[1024];
uint32_t raw_data_len;
};

View File

@@ -224,7 +224,8 @@ typedef enum {
typedef enum {
ZAP_SPAN_CONFIGURED = (1 << 0),
ZAP_SPAN_READY = (1 << 1)
ZAP_SPAN_READY = (1 << 1),
ZAP_SPAN_STATE_CHANGE = (1 << 2)
} zap_span_flag_t;
typedef enum {
@@ -258,10 +259,13 @@ typedef enum {
ZAP_CHANNEL_STATE_DIALING,
ZAP_CHANNEL_STATE_GET_CALLERID,
ZAP_CHANNEL_STATE_CALLWAITING,
ZAP_CHANNEL_STATE_TERMINATING,
ZAP_CHANNEL_STATE_RESTART,
ZAP_CHANNEL_STATE_INVALID
} zap_channel_state_t;
#define CHANNEL_STATE_STRINGS "DOWN", "UP", "HANGUP", "HOLD", "DIALTONE", "COLLECT", \
"RING", "BUSY", "ATTN", "IDLE", "GENRING", "DIALING", "GET_CALLERID", "CALLWAITING", "INVALID"
"RING", "BUSY", "ATTN", "IDLE", "GENRING", "DIALING", "GET_CALLERID", "CALLWAITING", \
"TERMINATING", "RESTART", "INVALID"
ZAP_STR2ENUM_P(zap_str2zap_channel_state, zap_channel_state2str, zap_channel_state_t)
typedef enum {
@@ -285,7 +289,6 @@ typedef enum {
ZAP_CHANNEL_CALLERID_DETECT = (1 << 17)
} zap_channel_flag_t;
typedef struct zap_channel zap_channel_t;
typedef struct zap_event zap_event_t;
typedef struct zap_sigmsg zap_sigmsg_t;