提交 7f746a70 authored 作者: Michael Jerris's avatar Michael Jerris

update to new boost api SIGBOOST_VERSION 101. Fixes multiple race condition…

update to new boost api SIGBOOST_VERSION 101.  Fixes multiple race condition issues with thread waiting for chan and better handling of call rejects.  This requires sangoma_prid v1.48 or later

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@1001 a93c3328-9c30-0410-af19-c9cd2b2d52af
上级 cec17903
......@@ -198,13 +198,14 @@ int sangomabc_connection_open(sangomabc_connection_t *mcon, char *local_ip, int
}
int sangomabc_exec_command(sangomabc_connection_t *mcon, int span, int chan, int id, int cmd, int cause)
int sangomabc_exec_command(sangomabc_connection_t *mcon, int span, int chan, int id, int cmd, int cause, int flags)
{
sangomabc_short_event_t oevent;
int retry = 5;
sangomabc_event_init(&oevent, cmd, chan, span);
oevent.release_cause = cause;
oevent.flags = flags;
if (cmd == SIGBOOST_EVENT_SYSTEM_RESTART || cmd == SIGBOOST_EVENT_SYSTEM_RESTART_ACK) {
mcon->rxseq_reset = 1;
......
......@@ -130,7 +130,7 @@ int __sangomabc_connection_writep(sangomabc_connection_t *mcon, sangomabc_event_
void sangomabc_event_init(sangomabc_short_event_t *event, sangomabc_event_id_t event_id, int chan, int span);
void sangomabc_call_init(sangomabc_event_t *event, const char *calling, const char *called, int setup_id);
const char *sangomabc_event_id_name(uint32_t event_id);
int sangomabc_exec_command(sangomabc_connection_t *mcon, int span, int chan, int id, int cmd, int cause);
int sangomabc_exec_command(sangomabc_connection_t *mcon, int span, int chan, int id, int cmd, int cause, int flags);
int sangomabc_exec_commandp(sangomabc_connection_t *pcon, int span, int chan, int id, int cmd, int cause);
#endif
......
......@@ -14,7 +14,7 @@
#ifndef _SIGBOOST_H_
#define _SIGBOOST_H_
#define SIGBOOST_VERSION 100
#define SIGBOOST_VERSION 101
#include <stdint.h>
#include <sys/time.h>
......@@ -76,6 +76,11 @@ enum e_sigboost_event_info_par_values
SIGBOOST_EVI_PROGRESS = 0x02,
};
enum e_sigboost_progress_flags
{
SIGBOOST_PROGRESS_RING = (1 << 0),
SIGBOOST_PROGRESS_MEDIA = (1 << 1)
};
#define MAX_DIALED_DIGITS 31
......@@ -108,6 +113,7 @@ typedef struct
uint32_t trunk_group;
uint8_t span;
uint8_t chan;
uint32_t flags;
/* struct timeval tv; */
uint8_t called_number_digits_count;
char called_number_digits [MAX_DIALED_DIGITS + 1]; /* it's a null terminated string */
......@@ -136,6 +142,7 @@ typedef struct
uint32_t trunk_group;
uint8_t span;
uint8_t chan;
uint32_t flags;
/* struct timeval tv; */
uint8_t release_cause;
} t_sigboost_short;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论