## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301, USA.
-#INSTALLATION_DEFINES = \
-# -DCONFIG_DATA="\"$(pkgsysconfdir)\"" \
-# -DSHARE_DATA="\"$(pkgdatadir)\"" \
-# -DLOG_DIR="\"$(pkglogdir)\"" \
-# -DEXTENSION_DATA="\"$(localstatedir)/lib/lcr\""
+INSTALLdir = $(DESTDIR)/usr/local/lcr
-INSTALLdir = /usr/local/lcr
+pkglogdir=$(localstatedir)/log/@PACKAGE@
+pkgsysconfdir=$(sysconfdir)/@PACKAGE@
+
+#CONFIGdir=$(DESTDIR)$(pkgsysconfdir)
+#SHAREdir=$(DESTDIR)$(pkgdatadir)
+#LOGdir=$(DESTDIR)$(pkglogdir)
+#EXTENSIONdir=$(DESTDIR)$(localstatedir)/lib/lcr
-astmoddir = /usr/lib/asterisk/modules
+CONFIGdir=$(INSTALLdir)
+SHAREdir=$(INSTALLdir)
+LOGdir=$(INSTALLdir)
+EXTENSIONdir=$(INSTALLdir)/extensions
+
+astmoddir = $(DESTDIR)/usr/lib/asterisk/modules
INSTALLATION_DEFINES = \
- -DCONFIG_DATA="\"$(INSTALLdir)\"" \
- -DSHARE_DATA="\"$(INSTALLdir)\"" \
- -DLOG_DIR="\"$(INSTALLdir)\"" \
- -DEXTENSION_DATA="\"$(INSTALLdir)/extensions\""
+ -DCONFIG_DATA="\"$(CONFIGdir)\"" \
+ -DSHARE_DATA="\"$(SHAREdir)\"" \
+ -DLOG_DIR="\"$(LOGdir)\"" \
+ -DEXTENSION_DATA="\"$(EXTENSIONdir)/extensions\""
INCLUDES = $(all_includes) -I/usr/include/mISDNuser $(INSTALLATION_DEFINES)
bin_PROGRAMS = lcradmin gentones genwave
+sbin_PROGRAMS = lcr genrc genextension
+
if ENABLE_ASTERISK_CHANNEL_DRIVER
-sbin_PROGRAMS = lcr genrc genextension chan_lcr.so
-chan_lcr_so_SOURCES =
+noinst_PROGRAMS = chan_lcr.so
+chan_lcr_so_SOURCES =
chan_lcr_so_LDFLAGS = -shared
-chan_lcr_so_LDADD = chan_lcr.o bchannel.o options.o
+chan_lcr_so_LDADD = chan_lcr.po bchannel.po options.po callerid.po
+
+chan_lcr.po: chan_lcr.c chan_lcr.h
+ $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c chan_lcr.c -o chan_lcr.po
-chan_lcr.o: chan_lcr.c chan_lcr.h
- $(CC) $(INCLUDES) -D_GNU_SOURCE -c chan_lcr.c
+bchannel.po: bchannel.c bchannel.h
+ $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c bchannel.c -o bchannel.po
-bchannel.o: bchannel.c bchannel.h
- $(CC) $(INCLUDES) -D_GNU_SOURCE -c bchannel.c
+callerid.po: callerid.c callerid.h
+ $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c callerid.c -o callerid.po
-else
-sbin_PROGRAMS = lcr genrc genextension
+options.po: options.c options.h
+ $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c options.c -o options.po
+
+install-exec-hook:
+ mkdir -p $(astmoddir)
+ $(INSTALL) -d $(astmoddir)
+ $(INSTALL) chan_lcr.so $(astmoddir)
endif
lcr_SOURCES = action.cpp mISDN.cpp tones.c \
@sh -c 'grep -n strncat *.c* --exclude chan_lcr.c --exclude bchannel.c --exclude callerid.c ; if test $$''? = 0 ; then echo "dont use strncat, use makro instead." ; exit -1 ; fi'
@sh -c 'grep -n sprintf *.c* --exclude chan_lcr.c --exclude bchannel.c --exclude callerid.c ; if test $$''? = 0 ; then echo "dont use sprintf, use makro instead." ; exit -1 ; fi'
@sh -c 'grep -n snprintf *.c* --exclude chan_lcr.c --exclude bchannel.c --exclude callerid.c ; if test $$''? = 0 ; then echo "dont use snprintf, use makro instead." ; exit -1 ; fi'
- mkdir -p $(INSTALLdir)
- mkdir -p $(INSTALLdir)/extensions
- @if test -a $(INSTALLdir)/options.conf ; then \
+ mkdir -p $(CONFIGdir)
+ mkdir -p $(SHAREdir)
+ mkdir -p $(LOGdir)
+ mkdir -p $(EXTENSIONdir)
+ @if test -a $(CONFIGdir)/options.conf ; then \
echo "NOTE: options.conf already exists, not changed." ; else \
- cp -v default/options.conf $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/interface.conf ; then \
+ cp -v default/options.conf $(CONFIGdir) ; fi
+ @if test -a $(CONFIGdir)/interface.conf ; then \
echo "NOTE: interface.conf already exists, not changed." ; else \
- cp -v default/interface.conf $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/routing.conf ; then \
+ cp -v default/interface.conf $(CONFIGdir) ; fi
+ @if test -a $(CONFIGdir)/routing.conf ; then \
echo "NOTE: routing.conf already exists, not changed." ; else \
- cp -v default/routing.conf $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/numbering_int.conf ; then \
+ cp -v default/routing.conf $(CONFIGdir) ; fi
+ @if test -a $(CONFIGdir)/numbering_int.conf ; then \
echo "NOTE: numbering_int.conf is obsolete, please use routing." ; fi
- @if test -a $(INSTALLdir)/numbering_ext.conf ; then \
+ @if test -a $(CONFIGdir)/numbering_ext.conf ; then \
echo "NOTE: numbering_ext.conf is obsolete, please use routing." ; fi
- @if test -a $(INSTALLdir)/directory.list ; then \
+ @if test -a $(CONFIGdir)/directory.list ; then \
echo "NOTE: directory.list already exists, not changed." ; else \
- cp -v default/directory.list $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/tones_american ; then \
+ cp -v default/directory.list $(CONFIGdir) ; fi
+ @if test -a $(SHAREdir)/tones_american ; then \
echo "NOTE: american tones already exists, not overwritten." ; else \
- cp -a tones_american $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/tones_german ; then \
+ cp -a tones_american $(SHAREdir) ; fi
+ @if test -a $(SHAREdir)/tones_german ; then \
echo "NOTE: german tones already exists, not overwritten." ; else \
- cp -a tones_german $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/vbox_german ; then \
+ cp -a tones_german $(SHAREdir) ; fi
+ @if test -a $(SHAREdir)/vbox_german ; then \
echo "NOTE: german vbox tones already exists, not overwritten." ; else \
- cp -a vbox_german $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/vbox_english ; then \
+ cp -a vbox_german $(SHAREdir) ; fi
+ @if test -a $(SHAREdir)/vbox_english ; then \
echo "NOTE: english vbox tones already exists, not overwritten." ; else \
- cp -a vbox_english $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/tones_efi ; then \
+ cp -a vbox_english $(SHAREdir) ; fi
+ @if test -a $(SHAREdir)/tones_efi ; then \
echo "NOTE: special efi tones already exists, not overwritten." ; else \
- cp -a tones_efi $(INSTALLdir) ; fi
-if ENABLE_ASTERISK_CHANNEL_DRIVER
- @echo "Moving chan_lcr.so (if it fails, do it manually)"
- mv $(sbindir)/chan_lcr.so $(astmoddir)
-endif
+ cp -a tones_efi $(SHAREdir) ; fi
# test rule, nothing important
#echo:
COMPILE=$(CXXCOMPILE)
LINK=$(CXXLINK)
-pkglogdir=$(localstatedir)/log/@PACKAGE@
-pkgsysconfdir=$(sysconfdir)/@PACKAGE@
-
@SET_MAKE@
-#INSTALLATION_DEFINES = \
-# -DCONFIG_DATA="\"$(pkgsysconfdir)\"" \
-# -DSHARE_DATA="\"$(pkgdatadir)\"" \
-# -DLOG_DIR="\"$(pkglogdir)\"" \
-# -DEXTENSION_DATA="\"$(localstatedir)/lib/lcr\""
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = lcradmin$(EXEEXT) gentones$(EXEEXT) genwave$(EXEEXT)
-@ENABLE_ASTERISK_CHANNEL_DRIVER_FALSE@sbin_PROGRAMS = lcr$(EXEEXT) \
-@ENABLE_ASTERISK_CHANNEL_DRIVER_FALSE@ genrc$(EXEEXT) \
-@ENABLE_ASTERISK_CHANNEL_DRIVER_FALSE@ genextension$(EXEEXT)
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@sbin_PROGRAMS = lcr$(EXEEXT) \
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ genrc$(EXEEXT) \
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ genextension$(EXEEXT) \
+sbin_PROGRAMS = lcr$(EXEEXT) genrc$(EXEEXT) genextension$(EXEEXT)
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@noinst_PROGRAMS = \
@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ chan_lcr.so$(EXEEXT)
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(sbin_PROGRAMS)
am_chan_lcr_so_OBJECTS =
chan_lcr_so_OBJECTS = $(am_chan_lcr_so_OBJECTS)
@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr_so_DEPENDENCIES = \
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ chan_lcr.o bchannel.o \
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ options.o
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ chan_lcr.po bchannel.po \
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ options.po callerid.po
am_genextension_OBJECTS = genext.$(OBJEXT) options.$(OBJEXT) \
extension.$(OBJEXT)
genextension_OBJECTS = $(am_genextension_OBJECTS)
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-INSTALLdir = /usr/local/lcr
-astmoddir = /usr/lib/asterisk/modules
+INSTALLdir = $(DESTDIR)/usr/local/lcr
+pkglogdir = $(localstatedir)/log/@PACKAGE@
+pkgsysconfdir = $(sysconfdir)/@PACKAGE@
+
+#CONFIGdir=$(DESTDIR)$(pkgsysconfdir)
+#SHAREdir=$(DESTDIR)$(pkgdatadir)
+#LOGdir=$(DESTDIR)$(pkglogdir)
+#EXTENSIONdir=$(DESTDIR)$(localstatedir)/lib/lcr
+CONFIGdir = $(INSTALLdir)
+SHAREdir = $(INSTALLdir)
+LOGdir = $(INSTALLdir)
+EXTENSIONdir = $(INSTALLdir)/extensions
+astmoddir = $(DESTDIR)/usr/lib/asterisk/modules
INSTALLATION_DEFINES = \
- -DCONFIG_DATA="\"$(INSTALLdir)\"" \
- -DSHARE_DATA="\"$(INSTALLdir)\"" \
- -DLOG_DIR="\"$(INSTALLdir)\"" \
- -DEXTENSION_DATA="\"$(INSTALLdir)/extensions\""
+ -DCONFIG_DATA="\"$(CONFIGdir)\"" \
+ -DSHARE_DATA="\"$(SHAREdir)\"" \
+ -DLOG_DIR="\"$(LOGdir)\"" \
+ -DEXTENSION_DATA="\"$(EXTENSIONdir)/extensions\""
INCLUDES = $(all_includes) -I/usr/include/mISDNuser $(INSTALLATION_DEFINES)
@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr_so_SOURCES =
@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr_so_LDFLAGS = -shared
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr_so_LDADD = chan_lcr.o bchannel.o options.o
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr_so_LDADD = chan_lcr.po bchannel.po options.po callerid.po
lcr_SOURCES = action.cpp mISDN.cpp tones.c \
action_efi.cpp crypt.cpp mail.c trace.c \
action_vbox.cpp dss1.cpp main.c \
# This should better be removed and all .c files renamed to .cpp
COMPILE = $(CXXCOMPILE)
LINK = $(CXXLINK)
-pkglogdir = $(localstatedir)/log/@PACKAGE@
-pkgsysconfdir = $(sysconfdir)/@PACKAGE@
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@ENABLE_ASTERISK_CHANNEL_DRIVER_FALSE@install-exec-hook:
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-sbinPROGRAMS \
- mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \
+ clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-info: install-info-am
uninstall-sbinPROGRAMS
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
- clean-binPROGRAMS clean-generic clean-sbinPROGRAMS ctags dist \
- dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
- distcheck distclean distclean-compile distclean-generic \
- distclean-hdr distclean-tags distcleancheck distdir \
- distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-data-hook install-exec install-exec-am \
- install-info install-info-am install-man install-sbinPROGRAMS \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-info-am uninstall-sbinPROGRAMS
-
-
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr.o: chan_lcr.c chan_lcr.h
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(CC) $(INCLUDES) -D_GNU_SOURCE -c chan_lcr.c
-
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@bchannel.o: bchannel.c bchannel.h
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(CC) $(INCLUDES) -D_GNU_SOURCE -c bchannel.c
+ clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \
+ clean-sbinPROGRAMS ctags dist dist-all dist-bzip2 dist-gzip \
+ dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-compile distclean-generic distclean-hdr \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am \
+ install-data-hook install-exec install-exec-am \
+ install-exec-hook install-info install-info-am install-man \
+ install-sbinPROGRAMS install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-info-am \
+ uninstall-sbinPROGRAMS
+
+
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr.po: chan_lcr.c chan_lcr.h
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c chan_lcr.c -o chan_lcr.po
+
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@bchannel.po: bchannel.c bchannel.h
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c bchannel.c -o bchannel.po
+
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@callerid.po: callerid.c callerid.h
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c callerid.c -o callerid.po
+
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@options.po: options.c options.h
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c options.c -o options.po
+
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@install-exec-hook:
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ mkdir -p $(astmoddir)
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(INSTALL) -d $(astmoddir)
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(INSTALL) chan_lcr.so $(astmoddir)
# Special install function to preserve existing configs.
# Optimization with equivalen results are welcome
@sh -c 'grep -n strncat *.c* --exclude chan_lcr.c --exclude bchannel.c --exclude callerid.c ; if test $$''? = 0 ; then echo "dont use strncat, use makro instead." ; exit -1 ; fi'
@sh -c 'grep -n sprintf *.c* --exclude chan_lcr.c --exclude bchannel.c --exclude callerid.c ; if test $$''? = 0 ; then echo "dont use sprintf, use makro instead." ; exit -1 ; fi'
@sh -c 'grep -n snprintf *.c* --exclude chan_lcr.c --exclude bchannel.c --exclude callerid.c ; if test $$''? = 0 ; then echo "dont use snprintf, use makro instead." ; exit -1 ; fi'
- mkdir -p $(INSTALLdir)
- mkdir -p $(INSTALLdir)/extensions
- @if test -a $(INSTALLdir)/options.conf ; then \
+ mkdir -p $(CONFIGdir)
+ mkdir -p $(SHAREdir)
+ mkdir -p $(LOGdir)
+ mkdir -p $(EXTENSIONdir)
+ @if test -a $(CONFIGdir)/options.conf ; then \
echo "NOTE: options.conf already exists, not changed." ; else \
- cp -v default/options.conf $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/interface.conf ; then \
+ cp -v default/options.conf $(CONFIGdir) ; fi
+ @if test -a $(CONFIGdir)/interface.conf ; then \
echo "NOTE: interface.conf already exists, not changed." ; else \
- cp -v default/interface.conf $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/routing.conf ; then \
+ cp -v default/interface.conf $(CONFIGdir) ; fi
+ @if test -a $(CONFIGdir)/routing.conf ; then \
echo "NOTE: routing.conf already exists, not changed." ; else \
- cp -v default/routing.conf $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/numbering_int.conf ; then \
+ cp -v default/routing.conf $(CONFIGdir) ; fi
+ @if test -a $(CONFIGdir)/numbering_int.conf ; then \
echo "NOTE: numbering_int.conf is obsolete, please use routing." ; fi
- @if test -a $(INSTALLdir)/numbering_ext.conf ; then \
+ @if test -a $(CONFIGdir)/numbering_ext.conf ; then \
echo "NOTE: numbering_ext.conf is obsolete, please use routing." ; fi
- @if test -a $(INSTALLdir)/directory.list ; then \
+ @if test -a $(CONFIGdir)/directory.list ; then \
echo "NOTE: directory.list already exists, not changed." ; else \
- cp -v default/directory.list $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/tones_american ; then \
+ cp -v default/directory.list $(CONFIGdir) ; fi
+ @if test -a $(SHAREdir)/tones_american ; then \
echo "NOTE: american tones already exists, not overwritten." ; else \
- cp -a tones_american $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/tones_german ; then \
+ cp -a tones_american $(SHAREdir) ; fi
+ @if test -a $(SHAREdir)/tones_german ; then \
echo "NOTE: german tones already exists, not overwritten." ; else \
- cp -a tones_german $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/vbox_german ; then \
+ cp -a tones_german $(SHAREdir) ; fi
+ @if test -a $(SHAREdir)/vbox_german ; then \
echo "NOTE: german vbox tones already exists, not overwritten." ; else \
- cp -a vbox_german $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/vbox_english ; then \
+ cp -a vbox_german $(SHAREdir) ; fi
+ @if test -a $(SHAREdir)/vbox_english ; then \
echo "NOTE: english vbox tones already exists, not overwritten." ; else \
- cp -a vbox_english $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/tones_efi ; then \
+ cp -a vbox_english $(SHAREdir) ; fi
+ @if test -a $(SHAREdir)/tones_efi ; then \
echo "NOTE: special efi tones already exists, not overwritten." ; else \
- cp -a tones_efi $(INSTALLdir) ; fi
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ @echo "Moving chan_lcr.so (if it fails, do it manually)"
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ mv $(sbindir)/chan_lcr.so $(astmoddir)
+ cp -a tones_efi $(SHAREdir) ; fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
{
int cause, ret;
union parameter newparam;
+ char *exten = ast->exten;
+ if (!*exten)
+ exten = "s";
- CDEBUG(call, ast, "Try to start pbx. (exten=%s context=%s complete=%s)\n", ast->exten, ast->context, complete?"yes":"no");
+ CDEBUG(call, ast, "Try to start pbx. (exten=%s context=%s complete=%s)\n", exten, ast->context, complete?"yes":"no");
if (complete)
{
/* if not match */
- if (!ast_canmatch_extension(ast, ast->context, ast->exten, 1, call->oad))
+ if (!ast_canmatch_extension(ast, ast->context, exten, 1, call->oad))
{
- CDEBUG(call, ast, "Got 'sending complete', but extension '%s' will not match at context '%s' - releasing.\n", ast->exten, ast->context);
+ CDEBUG(call, ast, "Got 'sending complete', but extension '%s' will not match at context '%s' - releasing.\n", exten, ast->context);
cause = 1;
goto release;
}
- if (!ast_exists_extension(ast, ast->context, ast->exten, 1, call->oad))
+ if (!ast_exists_extension(ast, ast->context, exten, 1, call->oad))
{
- CDEBUG(call, ast, "Got 'sending complete', but extension '%s' would match at context '%s', if more digits would be dialed - releasing.\n", ast->exten, ast->context);
+ CDEBUG(call, ast, "Got 'sending complete', but extension '%s' would match at context '%s', if more digits would be dialed - releasing.\n", exten, ast->context);
cause = 28;
goto release;
}
goto start;
}
- if (ast_canmatch_extension(ast, ast->context, ast->exten, 1, call->oad))
+ if (ast_canmatch_extension(ast, ast->context, exten, 1, call->oad))
{
/* send setup acknowledge to lcr */
if (call->state != CHAN_LCR_STATE_IN_DIALING) {
call->state = CHAN_LCR_STATE_IN_DIALING;
/* if match, start pbx */
- if (ast_exists_extension(ast, ast->context, ast->exten, 1, call->oad)) {
+ if (ast_exists_extension(ast, ast->context, exten, 1, call->oad)) {
CDEBUG(call, ast, "Extensions matches.\n");
goto start;
}
goto release;
}
call->pbx_started = 1;
-// if (call->state == CHAN_LCR_STATE_IN_DIALING)
- ast_setstate(ast, AST_STATE_RINGING);
-// else
-// ast_setstate(ast, AST_STATE_RINGING);
-// return;
+ ast_setstate(ast, AST_STATE_RING);
}
/*
/* during prepare, we change to release state */
CDEBUG(call, ast, "We must wait until we received our ref, until we can free call instance.\n");
call->state = CHAN_LCR_STATE_RELEASE;
+ call->ast = NULL;
}
}
if (!pthread_equal(tid, chan_tid))
ast_moh_stop(ast);
call->on_hold = 0;
break;
-#ifdef AST_CONTROL_SRCUPDATE
+#if ASTERISK_VERSION_NUM >= 10600
case AST_CONTROL_SRCUPDATE:
- CDEBUG(call, ast, "Received indicate AST_CONTROL_SRCUPDATE from Asterisk.\n");
- res = -1;
+ CDEBUG(call, ast, "Received AST_CONTROL_SRCUPDATE from Asterisk.\n");
break;
#endif
default:
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for lcr 1.2.
+# Generated by GNU Autoconf 2.63 for lcr 1.3.
#
# Report bugs to <andreas@eversberg.eu>.
#
# Identity of this package.
PACKAGE_NAME='lcr'
PACKAGE_TARNAME='lcr'
-PACKAGE_VERSION='1.2'
-PACKAGE_STRING='lcr 1.2'
+PACKAGE_VERSION='1.3'
+PACKAGE_STRING='lcr 1.3'
PACKAGE_BUGREPORT='andreas@eversberg.eu'
ac_unique_file="main.c"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures lcr 1.2 to adapt to many kinds of systems.
+\`configure' configures lcr 1.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of lcr 1.2:";;
+ short | recursive ) echo "Configuration of lcr 1.3:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-lcr configure 1.2
+lcr configure 1.3
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by lcr $as_me 1.2, which was
+It was created by lcr $as_me 1.3, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE=lcr
- VERSION=1.2
+ VERSION=1.3
cat >>confdefs.h <<_ACEOF
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by lcr $as_me 1.2, which was
+This file was extended by lcr $as_me 1.3, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-lcr config.status 1.2
+lcr config.status 1.3
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
dnl This keeps being the first instruction.
dnl Change the 2nd argument if the version increases
dnl 1st + 2nd argument is used for distribution package name
-AC_INIT(lcr, 1.2, andreas@eversberg.eu)
+AC_INIT(lcr, 1.3, andreas@eversberg.eu)
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR([main.c])
AM_CONFIG_HEADER(config.h)
# fix warnings from autoconf + automake
AC_GNU_SOURCE
# AC_USE_SYSTEM_EXTENSIONS
-AM_INIT_AUTOMAKE(lcr,1.2)
+AM_INIT_AUTOMAKE(lcr,1.3)
printf("dial <extension> <number> - Tell LCR the next number to dial for extension.\n");
printf("release <number> - Tell LCR to release endpoint with given number.\n");
printf("block <port> - Block given port.\n");
- printf("unblock <port> - Unblock given port.\n");
+ printf("unblock/load <port> - Unblock given port.\n");
printf("unload <port> - Unload port. To load port use 'block' or 'unblock'.\n");
printf("testcall [options] <interface> <callerid> <number> [present|restrict [<capability>]] - Testcall\n");
printf(" -> options = --setup-timeout <seconds> --proceeding-timeout <seconds>\n");
goto usage;
mode = MODE_RELEASE;
} else
- if (!(strcasecmp(argv[1],"unblock")))
+ if (!(strcasecmp(argv[1],"unblock"))
+ || !(strcasecmp(argv[1],"load")))
{
if (argc <= 2)
goto usage;