mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
fix strange openzap build issue
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@626 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
442754e7d1
commit
d5f2bf456d
@ -142,5 +142,6 @@ fi
|
|||||||
|
|
||||||
COMP_VENDOR_CFLAGS="$COMP_VENDOR_CFLAGS"
|
COMP_VENDOR_CFLAGS="$COMP_VENDOR_CFLAGS"
|
||||||
AC_SUBST(COMP_VENDOR_CFLAGS)
|
AC_SUBST(COMP_VENDOR_CFLAGS)
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile
|
||||||
|
mod_openzap/Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
|
OZ_CFLAGS=@CFLAGS@ @COMP_VENDOR_CFLAGS@ @DEFS@
|
||||||
|
|
||||||
BASE=../../..
|
BASE=../../..
|
||||||
OZ_DIR=..
|
OZ_DIR=..
|
||||||
VERBOSE=1
|
VERBOSE=1
|
||||||
OZSO=$(OZ_DIR)/libopenzap.so
|
OZSO=$(OZ_DIR)/libopenzap.so
|
||||||
LOCAL_CFLAGS=-I$(OZ_DIR)/src/include -I$(OZ_DIR)/src/isdn/include
|
LOCAL_CFLAGS=-I$(OZ_DIR)/src/include -I$(OZ_DIR)/src/isdn/include $(OZ_CFLAGS)
|
||||||
LOCAL_LDFLAGS=-L$(OZ_DIR) -lopenzap
|
LOCAL_LDFLAGS=-L$(OZ_DIR) -lopenzap
|
||||||
include $(BASE)/build/modmake.rules
|
include $(BASE)/build/modmake.rules
|
||||||
|
|
||||||
local_depend: $(OZSO)
|
local_depend: $(OZSO)
|
||||||
|
|
||||||
$(OZSO): $(OZ_DIR)/.update
|
$(OZSO): $(OZ_DIR)/.update
|
||||||
cd $(OZ_DIR) && $(MAKE) ZAP_CFLAGS="$(ALL_CXXFLAGS)"
|
cd $(OZ_DIR) && $(MAKE)
|
||||||
|
|
||||||
local_install:
|
local_install:
|
||||||
cd $(OZ_DIR) && $(MAKE) install ZAP_CFLAGS="$(ALL_CXXFLAGS)"
|
cd $(OZ_DIR) && $(MAKE) install
|
||||||
[ -f $(DESTDIR)$(PREFIX)/conf/autoload_configs/openzap.conf.xml ] || cp -f $(OZ_DIR)/conf/openzap.conf.xml $(DESTDIR)$(PREFIX)/conf/autoload_configs
|
[ -f $(DESTDIR)$(PREFIX)/conf/autoload_configs/openzap.conf.xml ] || cp -f $(OZ_DIR)/conf/openzap.conf.xml $(DESTDIR)$(PREFIX)/conf/autoload_configs
|
||||||
|
|
||||||
local_clean:
|
local_clean:
|
@ -127,6 +127,8 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||||||
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id);
|
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id);
|
||||||
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id);
|
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id);
|
||||||
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
|
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
|
||||||
|
zap_status_t zap_channel_from_event(zap_sigmsg_t *sigmsg, switch_core_session_t **sp);
|
||||||
|
void dump_chan(zap_span_t *span, uint32_t chan_id, switch_stream_handle_t *stream);
|
||||||
|
|
||||||
|
|
||||||
static switch_core_session_t *zap_channel_get_session(zap_channel_t *channel, int32_t id)
|
static switch_core_session_t *zap_channel_get_session(zap_channel_t *channel, int32_t id)
|
||||||
@ -271,7 +273,7 @@ static void cycle_foreground(zap_channel_t *zchan, int flash, const char *bcast)
|
|||||||
|
|
||||||
static switch_status_t tech_init(private_t *tech_pvt, switch_core_session_t *session, zap_channel_t *zchan)
|
static switch_status_t tech_init(private_t *tech_pvt, switch_core_session_t *session, zap_channel_t *zchan)
|
||||||
{
|
{
|
||||||
char *dname = NULL;
|
const char *dname = NULL;
|
||||||
uint32_t interval = 0, srate = 8000;
|
uint32_t interval = 0, srate = 8000;
|
||||||
zap_codec_t codec;
|
zap_codec_t codec;
|
||||||
|
|
||||||
@ -888,7 +890,8 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||||||
switch_originate_flag_t flags)
|
switch_originate_flag_t flags)
|
||||||
{
|
{
|
||||||
|
|
||||||
char *dest = NULL, *data = NULL;
|
const char *dest = NULL;
|
||||||
|
char *data = NULL;
|
||||||
int span_id = 0, chan_id = 0;
|
int span_id = 0, chan_id = 0;
|
||||||
zap_channel_t *zchan = NULL;
|
zap_channel_t *zchan = NULL;
|
||||||
switch_call_cause_t cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
|
switch_call_cause_t cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
|
||||||
@ -1554,7 +1557,7 @@ static uint32_t enable_analog_option(const char *str, uint32_t current_options)
|
|||||||
|
|
||||||
static switch_status_t load_config(void)
|
static switch_status_t load_config(void)
|
||||||
{
|
{
|
||||||
char *cf = "openzap.conf";
|
const char *cf = "openzap.conf";
|
||||||
switch_xml_t cfg, xml, settings, param, spans, myspan;
|
switch_xml_t cfg, xml, settings, param, spans, myspan;
|
||||||
|
|
||||||
memset(&globals, 0, sizeof(globals));
|
memset(&globals, 0, sizeof(globals));
|
||||||
@ -1584,16 +1587,16 @@ static switch_status_t load_config(void)
|
|||||||
char *id = (char *) switch_xml_attr(myspan, "id");
|
char *id = (char *) switch_xml_attr(myspan, "id");
|
||||||
char *name = (char *) switch_xml_attr(myspan, "name");
|
char *name = (char *) switch_xml_attr(myspan, "name");
|
||||||
zap_status_t zstatus = ZAP_FAIL;
|
zap_status_t zstatus = ZAP_FAIL;
|
||||||
char *context = "default";
|
const char *context = "default";
|
||||||
char *dialplan = "XML";
|
const char *dialplan = "XML";
|
||||||
char *tonegroup = NULL;
|
const char *tonegroup = NULL;
|
||||||
char *digit_timeout = NULL;
|
char *digit_timeout = NULL;
|
||||||
char *max_digits = NULL;
|
char *max_digits = NULL;
|
||||||
char *hotline = NULL;
|
char *hotline = NULL;
|
||||||
char *dial_regex = NULL;
|
char *dial_regex = NULL;
|
||||||
char *hold_music = NULL;
|
char *hold_music = NULL;
|
||||||
char *fail_dial_regex = NULL;
|
char *fail_dial_regex = NULL;
|
||||||
char *enable_callerid = "true";
|
const char *enable_callerid = "true";
|
||||||
|
|
||||||
uint32_t span_id = 0, to = 0, max = 0;
|
uint32_t span_id = 0, to = 0, max = 0;
|
||||||
zap_span_t *span = NULL;
|
zap_span_t *span = NULL;
|
||||||
@ -1706,9 +1709,9 @@ static switch_status_t load_config(void)
|
|||||||
char *id = (char *) switch_xml_attr(myspan, "id");
|
char *id = (char *) switch_xml_attr(myspan, "id");
|
||||||
char *name = (char *) switch_xml_attr(myspan, "name");
|
char *name = (char *) switch_xml_attr(myspan, "name");
|
||||||
zap_status_t zstatus = ZAP_FAIL;
|
zap_status_t zstatus = ZAP_FAIL;
|
||||||
char *context = "default";
|
const char *context = "default";
|
||||||
char *dialplan = "XML";
|
const char *dialplan = "XML";
|
||||||
char *tonegroup = NULL;
|
const char *tonegroup = NULL;
|
||||||
char *digit_timeout = NULL;
|
char *digit_timeout = NULL;
|
||||||
char *max_digits = NULL;
|
char *max_digits = NULL;
|
||||||
char *dial_regex = NULL;
|
char *dial_regex = NULL;
|
||||||
@ -1820,15 +1823,15 @@ static switch_status_t load_config(void)
|
|||||||
char *id = (char *) switch_xml_attr(myspan, "id");
|
char *id = (char *) switch_xml_attr(myspan, "id");
|
||||||
char *name = (char *) switch_xml_attr(myspan, "name");
|
char *name = (char *) switch_xml_attr(myspan, "name");
|
||||||
zap_status_t zstatus = ZAP_FAIL;
|
zap_status_t zstatus = ZAP_FAIL;
|
||||||
char *context = "default";
|
const char *context = "default";
|
||||||
char *dialplan = "XML";
|
const char *dialplan = "XML";
|
||||||
//Q921NetUser_t mode = Q931_TE;
|
//Q921NetUser_t mode = Q931_TE;
|
||||||
//Q931Dialect_t dialect = Q931_Dialect_National;
|
//Q931Dialect_t dialect = Q931_Dialect_National;
|
||||||
char *mode = NULL;
|
char *mode = NULL;
|
||||||
char *dialect = NULL;
|
char *dialect = NULL;
|
||||||
uint32_t span_id = 0;
|
uint32_t span_id = 0;
|
||||||
zap_span_t *span = NULL;
|
zap_span_t *span = NULL;
|
||||||
char *tonegroup = NULL;
|
const char *tonegroup = NULL;
|
||||||
char *digit_timeout = NULL;
|
char *digit_timeout = NULL;
|
||||||
uint32_t to = 0;
|
uint32_t to = 0;
|
||||||
uint32_t opts = 0;
|
uint32_t opts = 0;
|
||||||
@ -1927,11 +1930,11 @@ static switch_status_t load_config(void)
|
|||||||
char *id = (char *) switch_xml_attr(myspan, "id");
|
char *id = (char *) switch_xml_attr(myspan, "id");
|
||||||
char *name = (char *) switch_xml_attr(myspan, "name");
|
char *name = (char *) switch_xml_attr(myspan, "name");
|
||||||
zap_status_t zstatus = ZAP_FAIL;
|
zap_status_t zstatus = ZAP_FAIL;
|
||||||
char *context = "default";
|
const char *context = "default";
|
||||||
char *dialplan = "XML";
|
const char *dialplan = "XML";
|
||||||
uint32_t span_id = 0;
|
uint32_t span_id = 0;
|
||||||
zap_span_t *span = NULL;
|
zap_span_t *span = NULL;
|
||||||
char *tonegroup = NULL;
|
const char *tonegroup = NULL;
|
||||||
char *local_ip = NULL;
|
char *local_ip = NULL;
|
||||||
int local_port = 0;
|
int local_port = 0;
|
||||||
char *remote_ip = NULL;
|
char *remote_ip = NULL;
|
||||||
@ -2101,7 +2104,7 @@ SWITCH_STANDARD_API(oz_function)
|
|||||||
int j;
|
int j;
|
||||||
for (j = 0 ; j < ZAP_MAX_SPANS_INTERFACE; j++) {
|
for (j = 0 ; j < ZAP_MAX_SPANS_INTERFACE; j++) {
|
||||||
if (SPAN_CONFIG[j].span) {
|
if (SPAN_CONFIG[j].span) {
|
||||||
char *flags = "none";
|
const char *flags = "none";
|
||||||
|
|
||||||
if (SPAN_CONFIG[j].analog_options & ANALOG_OPTION_3WAY) {
|
if (SPAN_CONFIG[j].analog_options & ANALOG_OPTION_3WAY) {
|
||||||
flags = "3way";
|
flags = "3way";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user